about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
Diffstat (limited to 'subx/apps')
-rw-r--r--subx/apps/assort.subx2
-rwxr-xr-xsubx/apps/crenshaw2-1bin17845 -> 17835 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin18404 -> 18394 bytes
-rwxr-xr-xsubx/apps/factorialbin16763 -> 16753 bytes
-rwxr-xr-xsubx/apps/handlebin17538 -> 17527 bytes
-rw-r--r--subx/apps/handle.subx2
-rwxr-xr-xsubx/apps/hexbin20824 -> 20806 bytes
-rw-r--r--subx/apps/hex.subx16
-rwxr-xr-xsubx/apps/packbin35374 -> 35341 bytes
-rw-r--r--subx/apps/pack.subx46
10 files changed, 33 insertions, 33 deletions
diff --git a/subx/apps/assort.subx b/subx/apps/assort.subx
index a6457bd7..bf919c45 100644
--- a/subx/apps/assort.subx
+++ b/subx/apps/assort.subx
@@ -717,7 +717,7 @@ $read-segments:check-for-segment-header:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto check3
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $read-segments:check3/disp32
     # . next-word(line, segment-name)
     # . . push args
diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index fe3894ec..70bcfcb4 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 431ec834..c27795ad 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 5c2a50b9..ba22ec90 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index eee59220..0b23d254 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/handle.subx b/subx/apps/handle.subx
index 8f82759a..f866ea59 100644
--- a/subx/apps/handle.subx
+++ b/subx/apps/handle.subx
@@ -51,7 +51,7 @@ new:  # ad : (address allocation-descriptor), n : int, out : (address handle)
     # out->address = EAX
     89/copy                         1/mod/*+disp8   2/rm32/EDX    .           .             .           0/r32/EAX   4/disp8         .                 # copy EAX to *(EDX+4)
     # if (EAX == 0) out->alloc_id = 0, return
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $new:continue/disp8
     c7          0/subop/copy        0/mod/indirect  2/rm32/EDX    .           .             .           .           .               0/imm32           # copy to *EDX
     eb/jump  $new:end/disp8
diff --git a/subx/apps/hex b/subx/apps/hex
index 1bf03e5a..ddcdf7a9 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --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
diff --git a/subx/apps/pack b/subx/apps/pack
index e75a5447..0ba26e29 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differdiff --git a/subx/apps/pack.subx b/subx/apps/pack.subx
index 583ee218..b623d3b2 100644
--- a/subx/apps/pack.subx
+++ b/subx/apps/pack.subx
@@ -272,7 +272,7 @@ $convert:check2:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto check3
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $convert:check3/disp32
     # . next-word(line, word-slice)
     # . . push args
@@ -1222,7 +1222,7 @@ $convert-data:check-for-imm32:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) process as a single byte
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $convert-data:single-byte/disp8
 $convert-data:imm32:
     # emit(out, word-slice, 4)
@@ -2250,7 +2250,7 @@ $emit-opcodes:op1:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX != 0) goto op2
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $emit-opcodes:op2/disp8
     # if (slice-equal?(op1, "f2")) goto op2
     # . EAX = slice-equal?(op1, "f2")
@@ -2262,7 +2262,7 @@ $emit-opcodes:op1:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX != 0) goto op2
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $emit-opcodes:op2/disp8
     # if (slice-equal?(op1, "f3")) goto op2
     # . EAX = slice-equal?(op1, "f3")
@@ -2274,7 +2274,7 @@ $emit-opcodes:op1:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX != 0) goto op2
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $emit-opcodes:op2/disp8
     # otherwise return
     e9/jump  $emit-opcodes:end/disp32
@@ -2343,7 +2343,7 @@ $emit-opcodes:op2:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX != 0) return
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 85/jump-if-not-equal  $emit-opcodes:end/disp32
     # if (!slice-equal?(op2, "0f")) return
     # . EAX = slice-equal?(op2, "0f")
@@ -2355,7 +2355,7 @@ $emit-opcodes:op2:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) return
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $emit-opcodes:end/disp32
 $emit-opcodes:op3:
     # next-word(line, op3)  # reuse op2/EDX
@@ -2610,7 +2610,7 @@ $emit-modrm:check-for-mod:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-modrm:check-for-rm32/disp8
 $emit-modrm:mod:
     # mod = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2638,7 +2638,7 @@ $emit-modrm:check-for-rm32:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-modrm:check-for-r32/disp8
 $emit-modrm:rm32:
     # rm32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2666,7 +2666,7 @@ $emit-modrm:check-for-r32:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-modrm:check-for-subop/disp8
 $emit-modrm:r32:
     # r32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2694,7 +2694,7 @@ $emit-modrm:check-for-subop:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) loop
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $emit-modrm:loop/disp32
 $emit-modrm:subop:
     # r32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2937,7 +2937,7 @@ $emit-sib:check-for-scale:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-sib:check-for-base/disp8
 $emit-sib:scale:
     # scale = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2965,7 +2965,7 @@ $emit-sib:check-for-base:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-sib:check-for-index/disp8
 $emit-sib:base:
     # base = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -2993,7 +2993,7 @@ $emit-sib:check-for-index:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) loop
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $emit-sib:loop/disp32
 $emit-sib:index:
     # index = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
@@ -3214,7 +3214,7 @@ $emit-disp:check-for-disp32:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-disp:check-for-disp16/disp8
 $emit-disp:disp32:
     # emit(out, word-slice, 4)
@@ -3239,7 +3239,7 @@ $emit-disp:check-for-disp16:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-disp:check-for-disp8/disp8
 $emit-disp:disp16:
     # emit(out, word-slice, 2)
@@ -3264,7 +3264,7 @@ $emit-disp:check-for-disp8:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) loop
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $emit-disp:loop/disp32
 $emit-disp:disp8:
     # emit(out, word-slice, 1)
@@ -3451,7 +3451,7 @@ $emit-imm:check-for-imm32:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-imm:check-for-imm16/disp8
 $emit-imm:imm32:
     # emit(out, word-slice, 4)
@@ -3476,7 +3476,7 @@ $emit-imm:check-for-imm16:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) goto next check
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-imm:check-for-imm8/disp8
 $emit-imm:imm16:
     # emit(out, word-slice, 2)
@@ -3501,7 +3501,7 @@ $emit-imm:check-for-imm8:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX == 0) loop
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     0f 84/jump-if-equal  $emit-imm:loop/disp32
 $emit-imm:imm8:
     # emit(out, word-slice, 1)
@@ -6298,7 +6298,7 @@ $has-metadata?:loop:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # . if (EAX != 0) return false
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $has-metadata?:false/disp8
     # if (slice-equal?(twig, s)) return true
     # . EAX = slice-equal?(twig, s)
@@ -6310,7 +6310,7 @@ $has-metadata?:loop:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . if (EAX != 0) return true
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $has-metadata?:true/disp8
     # curr = twig->end
     8b/copy                         1/mod/*+disp8   7/rm32/EDI    .           .             .           1/r32/ECX   4/disp8         .                 # copy *(EDI+4) to ECX
@@ -6545,7 +6545,7 @@ emit:  # out : (address buffered-file), word : (address slice), width : int -> <
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # . if (EAX != 0)
-    81          7/subop/compare     3/mod/direct    0/rm32/EAX    .           .             .           .           .               0/imm32           # compare EAX
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit:hex-int/disp8
 $emit:name:
     # . write-slice(out, word)