about summary refs log tree commit diff stats
path: root/subx/apps/hex.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-04-05 23:03:18 -0700
committerKartik Agaram <vc@akkartik.com>2019-04-05 23:03:18 -0700
commit615a7e957535dabeac826674859e33a01ed2bab4 (patch)
tree3f37be029105c6d51d364d5f6310977b31747bb2 /subx/apps/hex.subx
parent688a3d717e87994e311d4db73fe82d1217ec62dc (diff)
downloadmu-615a7e957535dabeac826674859e33a01ed2bab4.tar.gz
5059
Diffstat (limited to 'subx/apps/hex.subx')
-rw-r--r--subx/apps/hex.subx16
1 files changed, 8 insertions, 8 deletions
diff --git a/subx/apps/hex.subx b/subx/apps/hex.subx
index a52ff219..88dc19fd 100644
--- a/subx/apps/hex.subx
+++ b/subx/apps/hex.subx
@@ -94,7 +94,7 @@ $convert:loop:
     # . . discard first 2 args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
     # if (EAX == Eof) break
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xffffffff/imm32/Eof  # compare EAX
+    3d/compare-EAX-and  0xffffffff/imm32/Eof
     74/jump-if-equal  $convert:loop-end/disp8
     # write-byte(out, AL)
     # . . push args
@@ -154,7 +154,7 @@ convert-next-octet:  # in : (address buffered-file), err : (address buffered-fil
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
     # if (EAX == Eof) return
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xffffffff/imm32/Eof  # compare EAX
+    3d/compare-EAX-and  0xffffffff/imm32/Eof
     74/jump-if-equal  $convert-next-octet:end/disp8
     # EAX = from-hex-char(EAX)
     e8/call from-hex-char/disp32
@@ -170,7 +170,7 @@ convert-next-octet:  # in : (address buffered-file), err : (address buffered-fil
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
     # if (EAX == Eof) error(ed, err, "partial byte found.")
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xffffffff/imm32/Eof  # compare EAX
+    3d/compare-EAX-and  0xffffffff/imm32/Eof
     75/jump-if-not-equal  $convert-next-octet:convert/disp8
     # . error-byte(ed, err, msg, '.')  # reusing error-byte to avoid creating _yet_ another helper
     # . . push args
@@ -529,13 +529,13 @@ $scan-next-byte:loop:
     75/jump-if-not-equal  $scan-next-byte:end/disp8
 $scan-next-byte:check1:
     # if (EAX == ' ') continue
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0x20/imm32        # compare EAX
+    3d/compare-EAX-and  0x20/imm32/space
     74/jump-if-equal  $scan-next-byte:loop/disp8
     # if (EAX == '\t') continue
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0x9/imm32         # compare EAX
+    3d/compare-EAX-and  9/imm32/tab
     74/jump-if-equal  $scan-next-byte:loop/disp8
     # if (EAX == '\n') continue
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xa/imm32         # compare EAX
+    3d/compare-EAX-and  0xa/imm32/newline
     74/jump-if-equal  $scan-next-byte:loop/disp8
 $scan-next-byte:check2:
     # if (EAX == '#') skip-until-newline(in)
@@ -1431,10 +1431,10 @@ $skip-until-newline:loop:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # . if (EAX == Eof) break
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xffffffff/imm32/Eof  # compare EAX
+    3d/compare-EAX-and  0xffffffff/imm32/Eof
     74/jump-if-equal  $skip-until-newline:end/disp8
     # . if (EAX != 0xa/newline) loop
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0xa/imm32         # compare EAX
+    3d/compare-EAX-and  0xa/imm32/newline
     75/jump-if-not-equal  $skip-until-newline:loop/disp8
 $skip-until-newline:end:
     # . restore registers