diff options
Diffstat (limited to 'subx')
-rw-r--r-- | subx/057stop.subx | 2 | ||||
-rw-r--r-- | subx/065error-byte.subx | 2 | ||||
-rwxr-xr-x | subx/apps/crenshaw2-1 | bin | 7870 -> 7865 bytes | |||
-rw-r--r-- | subx/apps/crenshaw2-1.subx | 8 | ||||
-rwxr-xr-x | subx/apps/crenshaw2-1b | bin | 8431 -> 8424 bytes | |||
-rw-r--r-- | subx/apps/crenshaw2-1b.subx | 12 | ||||
-rwxr-xr-x | subx/apps/factorial | bin | 6761 -> 6760 bytes | |||
-rwxr-xr-x | subx/apps/hex | bin | 11385 -> 11372 bytes | |||
-rw-r--r-- | subx/apps/hex.subx | 24 |
9 files changed, 24 insertions, 24 deletions
diff --git a/subx/057stop.subx b/subx/057stop.subx index ff4a52b4..92938d53 100644 --- a/subx/057stop.subx +++ b/subx/057stop.subx @@ -131,7 +131,7 @@ test-stop-skips-returns-on-exit: # containing function returns we'll need a new exit descriptor. # var ed/EAX : (address exit-descriptor) 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # Size the exit-descriptor precisely for the next call below, to _test-stop-1. # tailor-exit-descriptor(ed, 4) # . . push args diff --git a/subx/065error-byte.subx b/subx/065error-byte.subx index dd14df4c..13a828be 100644 --- a/subx/065error-byte.subx +++ b/subx/065error-byte.subx @@ -9,7 +9,7 @@ # manual test #? # . var ed/EAX : exit-descriptor #? 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -#? 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +#? 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX #? # . configure ed to really exit() #? # . . ed->target = 0 #? c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1 index b7bdc148..383f1b16 100755 --- a/subx/apps/crenshaw2-1 +++ b/subx/apps/crenshaw2-1 Binary files differdiff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx index 6feabcfb..abb9c9c2 100644 --- a/subx/apps/crenshaw2-1.subx +++ b/subx/apps/crenshaw2-1.subx @@ -60,7 +60,7 @@ $run-main: # - otherwise read a program from stdin and emit its translation to stdout # var ed/EAX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # configure ed to really exit() # . ed->target = 0 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -102,7 +102,7 @@ compile: # in : (address buffered-file), out : fd or (address stream), err : fd # Add 12 bytes for 'read', 'write' and 'length' fields, for a total of 19 bytes, or 0x13 in hex. # The stack pointer is no longer aligned, so dump_stack() can be misleading past this point. 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x13/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # initialize the stream # . num->length = 7 c7/copy 1/mod/*+disp8 1/rm32/ECX . . . . 8/disp8 7/imm32 # copy to *(ECX+8) @@ -349,7 +349,7 @@ test-get-num-reads-single-digit: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -440,7 +440,7 @@ test-get-num-aborts-on-non-digit-in-Look: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : (address exit-descriptor) 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num diff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b index 6f05f0f6..4989d59e 100755 --- a/subx/apps/crenshaw2-1b +++ b/subx/apps/crenshaw2-1b Binary files differdiff --git a/subx/apps/crenshaw2-1b.subx b/subx/apps/crenshaw2-1b.subx index 0b4fc27c..23aa9c63 100644 --- a/subx/apps/crenshaw2-1b.subx +++ b/subx/apps/crenshaw2-1b.subx @@ -60,7 +60,7 @@ $run-main: # - otherwise read a program from stdin and emit its translation to stdout # var ed/EAX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # configure ed to really exit() # . ed->target = 0 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -102,7 +102,7 @@ compile: # in : (address buffered-file), out : fd or (address stream), err : fd # Add 12 bytes for 'read', 'write' and 'length' fields, for a total of 19 bytes, or 0x13 in hex. # The stack pointer is no longer aligned, so dump_stack() can be misleading past this point. 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x13/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # initialize the stream # . num->length = 7 c7/copy 1/mod/*+disp8 1/rm32/ECX . . . . 8/disp8 7/imm32 # copy to *(ECX+8) @@ -366,7 +366,7 @@ test-get-num-reads-single-digit: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -457,7 +457,7 @@ test-get-num-aborts-on-non-digit-in-Look: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : (address exit-descriptor) 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -542,7 +542,7 @@ test-get-num-reads-multiple-digits: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : (address exit-descriptor) 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -633,7 +633,7 @@ test-get-num-reads-multiple-digits-followed-by-nondigit: # initialize exit-descriptor 'ed' for the call to 'get-num' below # . var ed/EAX : (address exit-descriptor) 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # . tailor-exit-descriptor(ed, 16) # . . push args 68/push 0x10/imm32/nbytes-of-args-for-get-num diff --git a/subx/apps/factorial b/subx/apps/factorial index 1222b823..d4575e16 100755 --- a/subx/apps/factorial +++ b/subx/apps/factorial Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex index 0cd55209..d9bd1872 100755 --- a/subx/apps/hex +++ b/subx/apps/hex Binary files differdiff --git a/subx/apps/hex.subx b/subx/apps/hex.subx index e88bfb55..c544a27c 100644 --- a/subx/apps/hex.subx +++ b/subx/apps/hex.subx @@ -54,7 +54,7 @@ $run-main: # - otherwise convert stdin # var ed/EAX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX # configure ed to really exit() # . ed->target = 0 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -251,7 +251,7 @@ test-convert-next-octet: # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -345,7 +345,7 @@ test-convert-next-octet-handles-eof: # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -447,7 +447,7 @@ test-convert-next-octet-aborts-on-single-hex-byte: # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -620,7 +620,7 @@ test-scan-next-byte: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -722,7 +722,7 @@ test-scan-next-byte-skips-whitespace: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -840,7 +840,7 @@ test-scan-next-byte-skips-comment: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -958,7 +958,7 @@ test-scan-next-byte-skips-comment-and-whitespace: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1076,7 +1076,7 @@ test-scan-next-byte-skips-whitespace-and-comment: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1178,7 +1178,7 @@ test-scan-next-byte-reads-final-byte: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1272,7 +1272,7 @@ test-scan-next-byte-handles-eof: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1374,7 +1374,7 @@ test-scan-next-byte-aborts-on-invalid-byte: # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below # . var ed/ECX : exit-descriptor 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX # . tailor-exit-descriptor(ed, 12) # . . push args 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte |