diff --git a/html/subx/057stop.subx.html b/html/subx/057stop.subx.html index cc58ac3e..704ce18a 100644 --- a/html/subx/057stop.subx.html +++ b/html/subx/057stop.subx.html @@ -196,7 +196,7 @@ if ('onhashchange' in window) { 131 # containing function returns we'll need a new exit descriptor. 132 # var ed/EAX : (address exit-descriptor) 133 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -134 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +134 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 135 # Size the exit-descriptor precisely for the next call below, to _test-stop-1. 136 # tailor-exit-descriptor(ed, 4) 137 # . . push args diff --git a/html/subx/065error-byte.subx.html b/html/subx/065error-byte.subx.html index 7e3f437d..130c6da9 100644 --- a/html/subx/065error-byte.subx.html +++ b/html/subx/065error-byte.subx.html @@ -72,7 +72,7 @@ if ('onhashchange' in window) { 9 # manual test 10 #? # . var ed/EAX : exit-descriptor 11 #? 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 12 #? 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 12 #? 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 13 #? # . configure ed to really exit() 14 #? # . . ed->target = 0 15 #? c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX diff --git a/html/subx/apps/crenshaw2-1.subx.html b/html/subx/apps/crenshaw2-1.subx.html index 5372b93c..d741c108 100644 --- a/html/subx/apps/crenshaw2-1.subx.html +++ b/html/subx/apps/crenshaw2-1.subx.html @@ -24,10 +24,10 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } .Constant { color:#00a0a0; } -.subxFunction { color: #ff8700; } +.subxFunction { color: #af5f00; text-decoration: underline; } .subxMinorFunction { color: #875f5f; } .subxTest { color: #5f8700; } -.SpecialChar { color: #ff0000; } +.SpecialChar { color: #d70000; } .subxH1Comment { color:#00ffff; } --> @@ -126,7 +126,7 @@ if ('onhashchange' in window) { 60 # - otherwise read a program from stdin and emit its translation to stdout 61 # var ed/EAX : exit-descriptor 62 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 63 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 63 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 64 # configure ed to really exit() 65 # . ed->target = 0 66 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -168,7 +168,7 @@ if ('onhashchange' in window) { 102 # Add 12 bytes for 'read', 'write' and 'length' fields, for a total of 19 bytes, or 0x13 in hex. 103 # The stack pointer is no longer aligned, so dump_stack() can be misleading past this point. 104 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x13/imm32 # subtract from ESP -105 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +105 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 106 # initialize the stream 107 # . num->length = 7 108 c7/copy 1/mod/*+disp8 1/rm32/ECX . . . . 8/disp8 7/imm32 # copy to *(ECX+8) @@ -415,7 +415,7 @@ if ('onhashchange' in window) { 349 # initialize exit-descriptor 'ed' for the call to 'get-num' below 350 # . var ed/EAX : exit-descriptor 351 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -352 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +352 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 353 # . tailor-exit-descriptor(ed, 16) 354 # . . push args 355 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -506,7 +506,7 @@ if ('onhashchange' in window) { 440 # initialize exit-descriptor 'ed' for the call to 'get-num' below 441 # . var ed/EAX : (address exit-descriptor) 442 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -443 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +443 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 444 # . tailor-exit-descriptor(ed, 16) 445 # . . push args 446 68/push 0x10/imm32/nbytes-of-args-for-get-num diff --git a/html/subx/apps/crenshaw2-1b.subx.html b/html/subx/apps/crenshaw2-1b.subx.html index 37e36821..041f573f 100644 --- a/html/subx/apps/crenshaw2-1b.subx.html +++ b/html/subx/apps/crenshaw2-1b.subx.html @@ -24,10 +24,10 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } .Constant { color:#00a0a0; } -.subxFunction { color: #ff8700; } +.subxFunction { color: #af5f00; text-decoration: underline; } .subxMinorFunction { color: #875f5f; } .subxTest { color: #5f8700; } -.SpecialChar { color: #ff0000; } +.SpecialChar { color: #d70000; } .subxH1Comment { color:#00ffff; } --> @@ -126,7 +126,7 @@ if ('onhashchange' in window) { 60 # - otherwise read a program from stdin and emit its translation to stdout 61 # var ed/EAX : exit-descriptor 62 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 63 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 63 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 64 # configure ed to really exit() 65 # . ed->target = 0 66 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -168,7 +168,7 @@ if ('onhashchange' in window) { 102 # Add 12 bytes for 'read', 'write' and 'length' fields, for a total of 19 bytes, or 0x13 in hex. 103 # The stack pointer is no longer aligned, so dump_stack() can be misleading past this point. 104 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x13/imm32 # subtract from ESP -105 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +105 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 106 # initialize the stream 107 # . num->length = 7 108 c7/copy 1/mod/*+disp8 1/rm32/ECX . . . . 8/disp8 7/imm32 # copy to *(ECX+8) @@ -432,7 +432,7 @@ if ('onhashchange' in window) { 366 # initialize exit-descriptor 'ed' for the call to 'get-num' below 367 # . var ed/EAX : exit-descriptor 368 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -369 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +369 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 370 # . tailor-exit-descriptor(ed, 16) 371 # . . push args 372 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -523,7 +523,7 @@ if ('onhashchange' in window) { 457 # initialize exit-descriptor 'ed' for the call to 'get-num' below 458 # . var ed/EAX : (address exit-descriptor) 459 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -460 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +460 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 461 # . tailor-exit-descriptor(ed, 16) 462 # . . push args 463 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -608,7 +608,7 @@ if ('onhashchange' in window) { 542 # initialize exit-descriptor 'ed' for the call to 'get-num' below 543 # . var ed/EAX : (address exit-descriptor) 544 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -545 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +545 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 546 # . tailor-exit-descriptor(ed, 16) 547 # . . push args 548 68/push 0x10/imm32/nbytes-of-args-for-get-num @@ -699,7 +699,7 @@ if ('onhashchange' in window) { 633 # initialize exit-descriptor 'ed' for the call to 'get-num' below 634 # . var ed/EAX : (address exit-descriptor) 635 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -636 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX +636 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 637 # . tailor-exit-descriptor(ed, 16) 638 # . . push args 639 68/push 0x10/imm32/nbytes-of-args-for-get-num diff --git a/html/subx/apps/factorial.subx.html b/html/subx/apps/factorial.subx.html index 8383b297..026db18a 100644 --- a/html/subx/apps/factorial.subx.html +++ b/html/subx/apps/factorial.subx.html @@ -24,9 +24,9 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } .Constant { color:#00a0a0; } -.subxFunction { color: #ff8700; } +.subxFunction { color: #af5f00; text-decoration: underline; } .subxTest { color: #5f8700; } -.SpecialChar { color: #ff0000; } +.SpecialChar { color: #d70000; } .subxH1Comment { color:#00ffff; } --> diff --git a/html/subx/apps/hex.subx.html b/html/subx/apps/hex.subx.html index a97b1f11..43714f63 100644 --- a/html/subx/apps/hex.subx.html +++ b/html/subx/apps/hex.subx.html @@ -24,10 +24,10 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } .Constant { color:#00a0a0; } -.subxFunction { color: #ff8700; } +.subxFunction { color: #af5f00; text-decoration: underline; } .subxMinorFunction { color: #875f5f; } .subxTest { color: #5f8700; } -.SpecialChar { color: #ff0000; } +.SpecialChar { color: #d70000; } .subxH1Comment { color:#00ffff; } --> @@ -120,7 +120,7 @@ if ('onhashchange' in window) { 54 # - otherwise convert stdin 55 # var ed/EAX : exit-descriptor 56 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 57 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 0/r32/EAX . . # copy ESP to EAX + 57 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . . # copy ESP to EAX 58 # configure ed to really exit() 59 # . ed->target = 0 60 c7/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32 # copy to *EAX @@ -317,7 +317,7 @@ if ('onhashchange' in window) { 251 # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below 252 # . var ed/ECX : exit-descriptor 253 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 254 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 254 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 255 # . tailor-exit-descriptor(ed, 12) 256 # . . push args 257 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -411,7 +411,7 @@ if ('onhashchange' in window) { 345 # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below 346 # . var ed/ECX : exit-descriptor 347 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 348 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 348 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 349 # . tailor-exit-descriptor(ed, 12) 350 # . . push args 351 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -513,7 +513,7 @@ if ('onhashchange' in window) { 447 # initialize exit-descriptor 'ed' for the call to 'convert-next-octet' below 448 # . var ed/ECX : exit-descriptor 449 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 450 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 450 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 451 # . tailor-exit-descriptor(ed, 12) 452 # . . push args 453 68/push 0xc/imm32/nbytes-of-args-for-convert-next-octet @@ -686,7 +686,7 @@ if ('onhashchange' in window) { 620 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 621 # . var ed/ECX : exit-descriptor 622 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 623 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 623 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 624 # . tailor-exit-descriptor(ed, 12) 625 # . . push args 626 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -788,7 +788,7 @@ if ('onhashchange' in window) { 722 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 723 # . var ed/ECX : exit-descriptor 724 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 725 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 725 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 726 # . tailor-exit-descriptor(ed, 12) 727 # . . push args 728 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -906,7 +906,7 @@ if ('onhashchange' in window) { 840 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 841 # . var ed/ECX : exit-descriptor 842 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 843 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 843 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 844 # . tailor-exit-descriptor(ed, 12) 845 # . . push args 846 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1024,7 +1024,7 @@ if ('onhashchange' in window) { 958 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 959 # . var ed/ECX : exit-descriptor 960 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP - 961 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX + 961 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 962 # . tailor-exit-descriptor(ed, 12) 963 # . . push args 964 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1142,7 +1142,7 @@ if ('onhashchange' in window) { 1076 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 1077 # . var ed/ECX : exit-descriptor 1078 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -1079 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +1079 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 1080 # . tailor-exit-descriptor(ed, 12) 1081 # . . push args 1082 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1244,7 +1244,7 @@ if ('onhashchange' in window) { 1178 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 1179 # . var ed/ECX : exit-descriptor 1180 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -1181 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +1181 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 1182 # . tailor-exit-descriptor(ed, 12) 1183 # . . push args 1184 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1338,7 +1338,7 @@ if ('onhashchange' in window) { 1272 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 1273 # . var ed/ECX : exit-descriptor 1274 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -1275 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +1275 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 1276 # . tailor-exit-descriptor(ed, 12) 1277 # . . push args 1278 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte @@ -1440,7 +1440,7 @@ if ('onhashchange' in window) { 1374 # initialize exit-descriptor 'ed' for the call to 'scan-next-byte' below 1375 # . var ed/ECX : exit-descriptor 1376 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # subtract from ESP -1377 8d/copy-address 0/mod/indirect 4/rm32/sib 4/base/ESP 4/index/none . 1/r32/ECX . . # copy ESP to ECX +1377 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . . # copy ESP to ECX 1378 # . tailor-exit-descriptor(ed, 12) 1379 # . . push args 1380 68/push 0xc/imm32/nbytes-of-args-for-scan-next-byte 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 Binary files a/subx/apps/crenshaw2-1 and b/subx/apps/crenshaw2-1 differ diff --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 Binary files a/subx/apps/crenshaw2-1b and b/subx/apps/crenshaw2-1b differ diff --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 Binary files a/subx/apps/factorial and b/subx/apps/factorial differ diff --git a/subx/apps/hex b/subx/apps/hex index 0cd55209..d9bd1872 100755 Binary files a/subx/apps/hex and b/subx/apps/hex differ diff --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