diff options
Diffstat (limited to 'subx')
-rwxr-xr-x | subx/apps/assort | bin | 34326 -> 34326 bytes | |||
-rw-r--r-- | subx/apps/assort.subx | 72 | ||||
-rwxr-xr-x | subx/apps/dquotes | bin | 40882 -> 40882 bytes | |||
-rwxr-xr-x | subx/apps/hex | bin | 27743 -> 36881 bytes | |||
-rwxr-xr-x | subx/apps/pack | bin | 46978 -> 46978 bytes | |||
-rw-r--r-- | subx/apps/subx-common.subx | 4 | ||||
-rwxr-xr-x | subx/apps/survey | bin | 42976 -> 42976 bytes | |||
-rwxr-xr-x | subx/apps/tests | bin | 33138 -> 33138 bytes |
8 files changed, 74 insertions, 2 deletions
diff --git a/subx/apps/assort b/subx/apps/assort index 61aadb87..01813914 100755 --- a/subx/apps/assort +++ b/subx/apps/assort Binary files differdiff --git a/subx/apps/assort.subx b/subx/apps/assort.subx index 911cbad4..801e52d0 100644 --- a/subx/apps/assort.subx +++ b/subx/apps/assort.subx @@ -109,6 +109,15 @@ convert: # in : (address buffered-file), out : (address buffered-file) -> <void # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP $convert:read: +#? # print("read\n") {{{ +#? # . . push args +#? 68/push "read\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} # read-segments(in, table) # . . push args 51/push-ECX @@ -118,6 +127,15 @@ $convert:read: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP $convert:write: +#? # print("write\n") {{{ +#? # . . push args +#? 68/push "write\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} # write-segments(out, table) # . . push args 51/push-ECX @@ -550,6 +568,15 @@ $read-segments:check0: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP $read-segments:check1: +#? # print("check1\n") {{{ +#? # . . push args +#? 68/push "check1\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} # if (slice-empty?(word-slice)) continue # . EAX = slice-empty?(word-slice) # . . push args @@ -562,6 +589,15 @@ $read-segments:check1: 3d/compare-EAX-and 0/imm32 0f 85/jump-if-not-equal $read-segments:loop/disp32 $read-segments:check-for-comment: +#? # print("check for comment\n") {{{ +#? # . . push args +#? 68/push "check for comment\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} # if (slice-starts-with?(word-slice, "#")) continue # . start/ESI = word-slice->start 8b/copy 0/mod/indirect 2/rm32/EDX . . . 6/r32/ESI . . # copy *ECX to ESI @@ -572,6 +608,15 @@ $read-segments:check-for-comment: 3d/compare-EAX-and 0x23/imm32/hash 0f 84/jump-if-equal $read-segments:loop/disp32 $read-segments:check-for-segment-header: +#? # print("check for segment header\n") {{{ +#? # . . push args +#? 68/push "check for segment header\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} #? # dump word-slice {{{ #? # . write(2/stderr, "AA: ") #? # . . push args @@ -710,6 +755,15 @@ $read-segments:check-for-segment-header: 89/copy 0/mod/indirect 0/rm32/EAX . . . 3/r32/EBX . . # copy EBX to *EAX # fall through $read-segments:regular-line: +#? # print("regular line\n") {{{ +#? # . . push args +#? 68/push "regular line\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} #? # dump line {{{ #? # . write(2/stderr, "regular line: ") #? # . . push args @@ -750,6 +804,15 @@ $read-segments:regular-line: e8/call rewind-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +#? # print("write stream\n") {{{ +#? # . . push args +#? 68/push "write stream\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} # write-stream(curr-segment, line) # . . push args 51/push-ECX @@ -759,6 +822,15 @@ $read-segments:regular-line: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP # loop +#? # print("loop\n") {{{ +#? # . . push args +#? 68/push "loop\n"/imm32 +#? 68/push 2/imm32/stderr +#? # . . call +#? e8/call write/disp32 +#? # . . discard args +#? 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +#? # }}} e9/jump $read-segments:loop/disp32 $read-segments:break: $read-segments:end: diff --git a/subx/apps/dquotes b/subx/apps/dquotes index 3bcefaf0..be36b0c4 100755 --- a/subx/apps/dquotes +++ b/subx/apps/dquotes Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex index f3ad62f1..8b903e5d 100755 --- a/subx/apps/hex +++ b/subx/apps/hex Binary files differdiff --git a/subx/apps/pack b/subx/apps/pack index 737d0c33..792c30ba 100755 --- a/subx/apps/pack +++ b/subx/apps/pack Binary files differdiff --git a/subx/apps/subx-common.subx b/subx/apps/subx-common.subx index 962053f7..413edc9a 100644 --- a/subx/apps/subx-common.subx +++ b/subx/apps/subx-common.subx @@ -9,11 +9,11 @@ Heap-size: # maximum size of a single segment Segment-size: - 0x8000/imm32/32KB + 0x40000/imm32/256KB # maximum size of input textual stream (spanning all segments) Input-size: - 0x10000/imm32/64KB # should be enough for everyone + 0x80000/imm32/512KB == code # instruction effective address register displacement immediate diff --git a/subx/apps/survey b/subx/apps/survey index 299ea71c..308c6ee8 100755 --- a/subx/apps/survey +++ b/subx/apps/survey Binary files differdiff --git a/subx/apps/tests b/subx/apps/tests index 00201e83..20375e67 100755 --- a/subx/apps/tests +++ b/subx/apps/tests Binary files differ |