about summary refs log tree commit diff stats
path: root/066print-int.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-08-26 11:55:26 -0700
committerKartik Agaram <vc@akkartik.com>2019-08-26 11:59:21 -0700
commit333525360b22f3d3ea31db46a4d2f1b4edbfebdb (patch)
treeed255f308542ba28a99d862d54d4992dcf749622 /066print-int.subx
parent22fb844ba4edf14eb85245a35f42e721658c4f8e (diff)
downloadmu-333525360b22f3d3ea31db46a4d2f1b4edbfebdb.tar.gz
5592 - switch register names to lowercase
Diffstat (limited to '066print-int.subx')
-rw-r--r--066print-int.subx246
1 files changed, 123 insertions, 123 deletions
diff --git a/066print-int.subx b/066print-int.subx
index c5968837..e4416557 100644
--- a/066print-int.subx
+++ b/066print-int.subx
@@ -5,57 +5,57 @@
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
 
-to-hex-char:  # in/EAX : nibble -> out/EAX : byte
-    # no error checking; accepts argument in EAX
-    # if (EAX <= 9) return EAX + '0'
-    3d/compare-EAX-with  0x9/imm32/9
+to-hex-char:  # in/eax : nibble -> out/eax : byte
+    # no error checking; accepts argument in eax
+    # if (eax <= 9) return eax + '0'
+    3d/compare-eax-with  0x9/imm32/9
     7f/jump-if-greater  $to-hex-char:else/disp8
-    05/add-to-EAX  0x30/imm32/0
+    05/add-to-eax  0x30/imm32/0
     c3/return
 $to-hex-char:else:
-    # otherwise return EAX + 'a' - 10
-    05/add-to-EAX  0x57/imm32/a-10
+    # otherwise return eax + 'a' - 10
+    05/add-to-eax  0x57/imm32/a-10
     c3/return
 
 append-byte-hex:  # f : (address stream), n : int -> <void>
     # . prolog
-    55/push-EBP
-    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
+    55/push-ebp
+    89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
     # . save registers
-    50/push-EAX
+    50/push-eax
     # AL = convert upper nibble to hex
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    c1/shift    5/subop/logic-right 3/mod/direct    0/rm32/EAX    .           .             .           .           .               4/imm8            # shift EAX right by 4 bits, while padding zeroes
-    25/and-EAX  0xf/imm32
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    c1/shift    5/subop/logic-right 3/mod/direct    0/rm32/eax    .           .             .           .           .               4/imm8            # shift eax right by 4 bits, while padding zeroes
+    25/and-eax  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
     # append-byte(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  append-byte/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # AL = convert lower nibble to hex
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    25/and-EAX  0xf/imm32
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    25/and-eax  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
     # append-byte(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  append-byte/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 $append-byte-hex:end:
     # . restore registers
-    58/pop-to-EAX
+    58/pop-to-eax
     # . epilog
-    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
-    5d/pop-to-EBP
+    89/copy                         3/mod/direct    4/rm32/esp    .           .             .           5/r32/ebp   .               .                 # copy ebp to esp
+    5d/pop-to-ebp
     c3/return
 
 test-append-byte-hex:
@@ -67,7 +67,7 @@ test-append-byte-hex:
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # append-byte-hex(_test-stream, 0xa)  # exercises digit, non-digit as well as leading zero
     # . . push args
     68/push  0xa/imm32
@@ -75,7 +75,7 @@ test-append-byte-hex:
     # . . call
     e8/call  append-byte-hex/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # check-stream-equal(_test-stream, "0a", msg)
     # . . push args
     68/push  "F - test-append-byte-hex"/imm32
@@ -84,50 +84,50 @@ test-append-byte-hex:
     # . . call
     e8/call  check-stream-equal/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0xc/imm32         # add to esp
     # . end
     c3/return
 
 # print the hex representation for the lowest byte of a number
 print-byte-buffered:  # f : (address buffered-file), n : int -> <void>
     # . prolog
-    55/push-EBP
-    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
+    55/push-ebp
+    89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
     # . save registers
-    50/push-EAX
+    50/push-eax
     # AL = convert upper nibble to hex
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    c1/shift    5/subop/logic-right 3/mod/direct    0/rm32/EAX    .           .             .           .           .               4/imm8            # shift EAX right by 4 bits, while padding zeroes
-    25/and-EAX  0xf/imm32
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    c1/shift    5/subop/logic-right 3/mod/direct    0/rm32/eax    .           .             .           .           .               4/imm8            # shift eax right by 4 bits, while padding zeroes
+    25/and-eax  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
     # write-byte-buffered(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  write-byte-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # AL = convert lower nibble to hex
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    25/and-EAX  0xf/imm32
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    25/and-eax  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
     # write-byte-buffered(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  write-byte-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 $print-byte-buffered:end:
     # . restore registers
-    58/pop-to-EAX
+    58/pop-to-eax
     # . epilog
-    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
-    5d/pop-to-EBP
+    89/copy                         3/mod/direct    4/rm32/esp    .           .             .           5/r32/ebp   .               .                 # copy ebp to esp
+    5d/pop-to-ebp
     c3/return
 
 test-print-byte-buffered:
@@ -139,16 +139,16 @@ test-print-byte-buffered:
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # . clear-stream(_test-buffered-file+4)
     # . . push args
-    b8/copy-to-EAX  _test-buffered-file/imm32
-    05/add-to-EAX  4/imm32
-    50/push-EAX
+    b8/copy-to-eax  _test-buffered-file/imm32
+    05/add-to-eax  4/imm32
+    50/push-eax
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # print-byte-buffered(_test-buffered-file, 0xa)  # exercises digit, non-digit as well as leading zero
     # . . push args
     68/push  0xa/imm32
@@ -156,14 +156,14 @@ test-print-byte-buffered:
     # . . call
     e8/call  print-byte-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # flush(_test-buffered-file)
     # . . push args
     68/push  _test-buffered-file/imm32
     # . . call
     e8/call  flush/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # check-stream-equal(_test-stream, "0a", msg)
     # . . push args
     68/push  "F - test-print-byte-buffered"/imm32
@@ -172,66 +172,66 @@ test-print-byte-buffered:
     # . . call
     e8/call  check-stream-equal/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0xc/imm32         # add to esp
     # . end
     c3/return
 
 print-int32:  # f : (address stream), n : int -> <void>
     # pseudocode:
     #  write(f, "0x")
-    #  ECX = 28
+    #  ecx = 28
     #  while true
-    #    if (ECX < 0) break
-    #    EAX = n >> ECX
-    #    EAX = EAX & 0xf
+    #    if (ecx < 0) break
+    #    eax = n >> ecx
+    #    eax = eax & 0xf
     #    append-byte(f, AL)
-    #    ECX -= 4
+    #    ecx -= 4
     #
     # . prolog
-    55/push-EBP
-    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
+    55/push-ebp
+    89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
     # . save registers
-    50/push-EAX
-    51/push-ECX
-    # ECX = 28
-    b9/copy-to-ECX  0x1c/imm32
+    50/push-eax
+    51/push-ecx
+    # ecx = 28
+    b9/copy-to-ecx  0x1c/imm32
 $print-int32:print-hex-prefix:
     # write(f, "0x")
     # . . push args
     68/push  "0x"/imm32
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  write/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 $print-int32:loop:
-    # if (ECX < 0) break
-    81          7/subop/compare     3/mod/direct    1/rm32/ECX    .           .             .           .           .               0/imm32           # compare ECX
+    # if (ecx < 0) break
+    81          7/subop/compare     3/mod/direct    1/rm32/ecx    .           .             .           .           .               0/imm32           # compare ecx
     7c/jump-if-lesser  $print-int32:end/disp8
-    # EAX = n >> ECX
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    d3/>>ECX    5/subop/pad-zeroes  3/mod/direct    0/rm32/EAX    .           .             .           .           .               .                 # shift EAX right by ECX bits, padding zeroes
-    # EAX = to-hex-char(AL)
-    25/and-EAX  0xf/imm32
+    # eax = n >> ecx
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    d3/>>ecx    5/subop/pad-zeroes  3/mod/direct    0/rm32/eax    .           .             .           .           .               .                 # shift eax right by ecx bits, padding zeroes
+    # eax = to-hex-char(AL)
+    25/and-eax  0xf/imm32
     e8/call  to-hex-char/disp32
     # append-byte(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  append-byte/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # ECX -= 4
-    81          5/subop/subtract    3/mod/direct    1/rm32/ECX    .           .             .           .           .               4/imm32           # subtract from ECX
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
+    # ecx -= 4
+    81          5/subop/subtract    3/mod/direct    1/rm32/ecx    .           .             .           .           .               4/imm32           # subtract from ecx
     eb/jump  $print-int32:loop/disp8
 $print-int32:end:
     # . restore registers
-    59/pop-to-ECX
-    58/pop-to-EAX
+    59/pop-to-ecx
+    58/pop-to-eax
     # . epilog
-    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
-    5d/pop-to-EBP
+    89/copy                         3/mod/direct    4/rm32/esp    .           .             .           5/r32/ebp   .               .                 # copy ebp to esp
+    5d/pop-to-ebp
     c3/return
 
 test-print-int32:
@@ -243,7 +243,7 @@ test-print-int32:
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # print-int32(_test-stream, 0x8899aa)
     # . . push args
     68/push  0x8899aa/imm32
@@ -251,7 +251,7 @@ test-print-int32:
     # . . call
     e8/call  print-int32/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # check-stream-equal(_test-stream, "0x008899aa", msg)
     # . . push args
     68/push  "F - test-print-int32"/imm32
@@ -260,66 +260,66 @@ test-print-int32:
     # . . call
     e8/call  check-stream-equal/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0xc/imm32         # add to esp
     # . end
     c3/return
 
 print-int32-buffered:  # f : (address buffered-file), n : int -> <void>
     # pseudocode:
     #  write-buffered(f, "0x")
-    #  ECX = 28
+    #  ecx = 28
     #  while true
-    #    if (ECX < 0) break
-    #    EAX = n >> ECX
-    #    EAX = EAX & 0xf
+    #    if (ecx < 0) break
+    #    eax = n >> ecx
+    #    eax = eax & 0xf
     #    write-byte-buffered(f, AL)
-    #    ECX -= 4
+    #    ecx -= 4
     #
     # . prolog
-    55/push-EBP
-    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
+    55/push-ebp
+    89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
     # . save registers
-    50/push-EAX
-    51/push-ECX
-    # ECX = 28
-    b9/copy-to-ECX  0x1c/imm32
+    50/push-eax
+    51/push-ecx
+    # ecx = 28
+    b9/copy-to-ecx  0x1c/imm32
 $print-int32-buffered:print-hex-prefix:
     # write-buffered(f, "0x")
     # . . push args
     68/push  "0x"/imm32
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  write-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 $print-int32-buffered:loop:
-    # if (ECX < 0) break
-    81          7/subop/compare     3/mod/direct    1/rm32/ECX    .           .             .           .           .               0/imm32           # compare ECX
+    # if (ecx < 0) break
+    81          7/subop/compare     3/mod/direct    1/rm32/ecx    .           .             .           .           .               0/imm32           # compare ecx
     7c/jump-if-lesser  $print-int32-buffered:end/disp8
-    # EAX = n >> ECX
-    8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0xc/disp8       .                 # copy *(EBP+12) to EAX
-    d3/>>ECX    5/subop/pad-zeroes  3/mod/direct    0/rm32/EAX    .           .             .           .           .               .                 # shift EAX right by ECX bits, padding zeroes
-    # EAX = to-hex-char(AL)
-    25/and-EAX  0xf/imm32
+    # eax = n >> ecx
+    8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   0xc/disp8       .                 # copy *(ebp+12) to eax
+    d3/>>ecx    5/subop/pad-zeroes  3/mod/direct    0/rm32/eax    .           .             .           .           .               .                 # shift eax right by ecx bits, padding zeroes
+    # eax = to-hex-char(AL)
+    25/and-eax  0xf/imm32
     e8/call  to-hex-char/disp32
     # write-byte-buffered(f, AL)
     # . . push args
-    50/push-EAX
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
+    50/push-eax
+    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
     e8/call  write-byte-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # ECX -= 4
-    81          5/subop/subtract    3/mod/direct    1/rm32/ECX    .           .             .           .           .               4/imm32           # subtract from ECX
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
+    # ecx -= 4
+    81          5/subop/subtract    3/mod/direct    1/rm32/ecx    .           .             .           .           .               4/imm32           # subtract from ecx
     eb/jump  $print-int32-buffered:loop/disp8
 $print-int32-buffered:end:
     # . restore registers
-    59/pop-to-ECX
-    58/pop-to-EAX
+    59/pop-to-ecx
+    58/pop-to-eax
     # . epilog
-    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
-    5d/pop-to-EBP
+    89/copy                         3/mod/direct    4/rm32/esp    .           .             .           5/r32/ebp   .               .                 # copy ebp to esp
+    5d/pop-to-ebp
     c3/return
 
 test-print-int32-buffered:
@@ -331,16 +331,16 @@ test-print-int32-buffered:
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # . clear-stream(_test-buffered-file+4)
     # . . push args
-    b8/copy-to-EAX  _test-buffered-file/imm32
-    05/add-to-EAX  4/imm32
-    50/push-EAX
+    b8/copy-to-eax  _test-buffered-file/imm32
+    05/add-to-eax  4/imm32
+    50/push-eax
     # . . call
     e8/call  clear-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
     # print-int32-buffered(_test-buffered-file, 0x8899aa)
     # . . push args
     68/push  0x8899aa/imm32
@@ -348,14 +348,14 @@ test-print-int32-buffered:
     # . . call
     e8/call  print-int32-buffered/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
     # flush(_test-buffered-file)
     # . . push args
     68/push  _test-buffered-file/imm32
     # . . call
     e8/call  flush/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
 #?     # dump line {{{
 #?     # . write-stream(2/stderr, line)
 #?     # . . push args
@@ -364,7 +364,7 @@ test-print-int32-buffered:
 #?     # . . call
 #?     e8/call  write-stream/disp32
 #?     # . . discard args
-#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 #?     # . write(2/stderr, "$\n")
 #?     # . . push args
 #?     68/push  "$\n"/imm32
@@ -372,7 +372,7 @@ test-print-int32-buffered:
 #?     # . . call
 #?     e8/call  write/disp32
 #?     # . . discard args
-#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 #?     # }}}
     # check-stream-equal(_test-stream, "0x008899aa", msg)
     # . . push args
@@ -382,7 +382,7 @@ test-print-int32-buffered:
     # . . call
     e8/call  check-stream-equal/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0xc/imm32         # add to esp
     # . end
     c3/return