diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-10-25 05:54:06 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-10-25 06:10:36 -0700 |
commit | f0b7e327c5e612ea2f72f2e41c046a2105076654 (patch) | |
tree | b598dfdfb31a748634302b6f336aebd356fe372d | |
parent | 76599bb813970f09ddd27d476f5b62be9bf97d4d (diff) | |
download | mu-f0b7e327c5e612ea2f72f2e41c046a2105076654.tar.gz |
5714
Replace calculations of constants with labels.
-rw-r--r-- | 061read-byte.subx | 38 | ||||
-rw-r--r-- | 064write-byte.subx | 30 | ||||
-rw-r--r-- | 065write-buffered.subx | 22 | ||||
-rw-r--r-- | 066print-int.subx | 12 | ||||
-rw-r--r-- | 067parse-hex.subx | 6 | ||||
-rw-r--r-- | 071read-line.subx | 12 | ||||
-rw-r--r-- | 072slice.subx | 6 | ||||
-rw-r--r-- | 074write-stream-data.subx | 6 | ||||
-rw-r--r-- | 078emit-hex.subx | 24 | ||||
-rw-r--r-- | 079emit.subx | 36 | ||||
-rw-r--r-- | 081table.subx | 12 | ||||
-rw-r--r-- | 082slurp.subx | 6 | ||||
-rw-r--r-- | 084emit-hex-array.subx | 6 | ||||
-rwxr-xr-x | apps/assort | bin | 42953 -> 42761 bytes | |||
-rw-r--r-- | apps/assort.subx | 24 | ||||
-rwxr-xr-x | apps/braces | bin | 42998 -> 42776 bytes | |||
-rw-r--r-- | apps/braces.subx | 30 | ||||
-rwxr-xr-x | apps/calls | bin | 47691 -> 47487 bytes | |||
-rw-r--r-- | apps/calls.subx | 34 | ||||
-rwxr-xr-x | apps/crenshaw2-1 | bin | 42364 -> 42172 bytes | |||
-rw-r--r-- | apps/crenshaw2-1.subx | 12 | ||||
-rwxr-xr-x | apps/crenshaw2-1b | bin | 42923 -> 42719 bytes | |||
-rw-r--r-- | apps/crenshaw2-1b.subx | 24 | ||||
-rwxr-xr-x | apps/dquotes | bin | 46645 -> 46411 bytes | |||
-rw-r--r-- | apps/dquotes.subx | 54 | ||||
-rwxr-xr-x | apps/factorial | bin | 41371 -> 41191 bytes | |||
-rwxr-xr-x | apps/handle | bin | 42269 -> 42089 bytes | |||
-rwxr-xr-x | apps/hex | bin | 45319 -> 45007 bytes | |||
-rw-r--r-- | apps/hex.subx | 134 | ||||
-rwxr-xr-x | apps/pack | bin | 55614 -> 55152 bytes | |||
-rw-r--r-- | apps/pack.subx | 324 | ||||
-rwxr-xr-x | apps/sigils | bin | 55654 -> 55294 bytes | |||
-rw-r--r-- | apps/sigils.subx | 190 | ||||
-rwxr-xr-x | apps/survey | bin | 52210 -> 52000 bytes | |||
-rw-r--r-- | apps/survey.subx | 106 | ||||
-rwxr-xr-x | apps/tests | bin | 41738 -> 41558 bytes | |||
-rw-r--r-- | subx.vim | 2 |
37 files changed, 379 insertions, 771 deletions
diff --git a/061read-byte.subx b/061read-byte.subx index 87af5efd..7ba6dc6b 100644 --- a/061read-byte.subx +++ b/061read-byte.subx @@ -10,17 +10,19 @@ == data # The buffered file for standard input. Also illustrates the layout for -# buffered-file. +# buffered-file: a pointer to the backing store, followed by a 'buffer' stream Stdin: # file descriptor or (address stream) 0/imm32 # standard input - # current write index +Stdin->buffer: + # inlined fields for a stream + # current write index 0/imm32 - # current read index + # current read index 0/imm32 - # length + # length 8/imm32 - # data + # data 00 00 00 00 00 00 00 00 # 8 bytes # TODO: 8 bytes is too small. We'll need to grow the buffer for efficiency. But @@ -98,11 +100,9 @@ test-read-byte-buffered-single: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -144,11 +144,9 @@ test-read-byte-buffered-multiple: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -197,11 +195,9 @@ test-read-byte-buffered-end-of-file: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -235,11 +231,9 @@ test-read-byte-buffered-refills-buffer: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -281,6 +275,7 @@ test-read-byte-buffered-refills-buffer: _test-buffered-file: # file descriptor or (address stream) _test-stream/imm32 +_test-buffered-file->buffer: # current write index 0/imm32 # current read index @@ -319,6 +314,7 @@ _test-input-stream: _test-input-buffered-file: # file descriptor or (address stream) _test-input-stream/imm32 +_test-input-buffered-file->buffer: # current write index 0/imm32 # current read index diff --git a/064write-byte.subx b/064write-byte.subx index c8a6f800..3b96bbd6 100644 --- a/064write-byte.subx +++ b/064write-byte.subx @@ -10,13 +10,15 @@ Stdout: # file descriptor or (address stream) 1/imm32 # standard output - # current write index +Stdout->buffer: + # inlined fields for a stream + # current write index 0/imm32 - # current read index + # current read index 0/imm32 - # length + # length 8/imm32 - # data + # data 00 00 00 00 00 00 00 00 # 8 bytes # TODO: 8 bytes is too small. We'll need to grow the buffer for efficiency. But @@ -113,11 +115,9 @@ test-write-byte-buffered-single: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -159,22 +159,18 @@ test-write-byte-buffered-multiple-flushes: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # fill up the buffer for _test-buffered-file - # . write(_test-buffered-file+4, "abcdef") + # . write(_test-buffered-file->buffer, "abcdef") # . . push args 68/push "abcdef"/imm32 - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call write/disp32 # . . discard args @@ -332,6 +328,7 @@ _test-output-stream: _test-output-buffered-file: # file descriptor or (address stream) _test-output-stream/imm32 +_test-output-buffered-file->buffer: # current write index 0/imm32 # current read index @@ -362,6 +359,7 @@ _test-error-stream: _test-error-buffered-file: # file descriptor or (address stream) _test-error-stream/imm32 +_test-error-buffered-file->buffer: # current write index 0/imm32 # current read index diff --git a/065write-buffered.subx b/065write-buffered.subx index 9774a4b1..2361ea3d 100644 --- a/065write-buffered.subx +++ b/065write-buffered.subx @@ -114,11 +114,9 @@ test-write-buffered: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -160,11 +158,9 @@ test-write-buffered-with-intermediate-flush: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -213,13 +209,15 @@ test-write-buffered-with-intermediate-flush: Stderr: # file descriptor or (address stream) 2/imm32 # standard error - # current write index +Stderr->buffer: + # inlined fields for a stream + # current write index 0/imm32 - # current read index + # current read index 0/imm32 - # length + # length 8/imm32 - # data + # data 00 00 00 00 00 00 00 00 # 8 bytes # TODO: 8 bytes is too small. We'll need to grow the buffer for efficiency. But diff --git a/066print-int.subx b/066print-int.subx index 6ba21cab..10fb1000 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -140,11 +140,9 @@ test-print-byte-buffered: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -332,11 +330,9 @@ test-print-int32-buffered: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/067parse-hex.subx b/067parse-hex.subx index 3707e40b..2ba3c740 100644 --- a/067parse-hex.subx +++ b/067parse-hex.subx @@ -829,13 +829,11 @@ $from-hex-char:abort: e8/call _write/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . clear-stream(Stderr+4) + # . clear-stream(Stderr->buffer) # . . save eax 50/push-eax # . . push args - b8/copy-to-eax Stderr/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push Stderr->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/071read-line.subx b/071read-line.subx index 5c4019ab..c729d364 100644 --- a/071read-line.subx +++ b/071read-line.subx @@ -118,11 +118,9 @@ test-read-line-buffered: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -172,11 +170,9 @@ test-read-line-buffered-reads-final-line-until-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/072slice.subx b/072slice.subx index 338c39b0..1d0fe855 100644 --- a/072slice.subx +++ b/072slice.subx @@ -964,11 +964,9 @@ test-write-slice-buffered: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/074write-stream-data.subx b/074write-stream-data.subx index a7bf49d2..dfce0b17 100644 --- a/074write-stream-data.subx +++ b/074write-stream-data.subx @@ -60,11 +60,9 @@ test-write-stream-data: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/078emit-hex.subx b/078emit-hex.subx index 67d851e9..79a599db 100644 --- a/078emit-hex.subx +++ b/078emit-hex.subx @@ -69,11 +69,9 @@ test-emit-hex-single-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -117,11 +115,9 @@ test-emit-hex-multiple-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -163,11 +159,9 @@ test-emit-hex-zero-pad: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -209,11 +203,9 @@ test-emit-hex-negative: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/079emit.subx b/079emit.subx index 9eb79340..117d8d57 100644 --- a/079emit.subx +++ b/079emit.subx @@ -107,11 +107,9 @@ test-emit-number: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -168,11 +166,9 @@ test-emit-negative-number: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -228,11 +224,9 @@ test-emit-number-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -289,11 +283,9 @@ test-emit-non-number: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -349,11 +341,9 @@ test-emit-non-number-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -409,11 +399,9 @@ test-emit-non-number-with-all-hex-digits-and-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/081table.subx b/081table.subx index 3cc3dbf3..ee63c054 100644 --- a/081table.subx +++ b/081table.subx @@ -1043,11 +1043,9 @@ test-get-or-stop: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1261,11 +1259,9 @@ test-get-slice-or-stop: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/082slurp.subx b/082slurp.subx index e116b5e8..0874f1d8 100644 --- a/082slurp.subx +++ b/082slurp.subx @@ -113,11 +113,9 @@ test-slurp: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/084emit-hex-array.subx b/084emit-hex-array.subx index 892c7318..edc509df 100644 --- a/084emit-hex-array.subx +++ b/084emit-hex-array.subx @@ -64,11 +64,9 @@ test-emit-hex-array: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/assort b/apps/assort index e60a40a8..7e191241 100755 --- a/apps/assort +++ b/apps/assort Binary files differdiff --git a/apps/assort.subx b/apps/assort.subx index 1e546f49..c423bc14 100644 --- a/apps/assort.subx +++ b/apps/assort.subx @@ -168,11 +168,9 @@ test-subx-assort: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -184,11 +182,9 @@ test-subx-assort: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -628,11 +624,9 @@ $read-segments:check-for-segment-header: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -690,11 +684,9 @@ $read-segments:check-for-segment-header: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args diff --git a/apps/braces b/apps/braces index 40164153..ef17e643 100755 --- a/apps/braces +++ b/apps/braces Binary files differdiff --git a/apps/braces.subx b/apps/braces.subx index 69e62c2c..aaae30e5 100644 --- a/apps/braces.subx +++ b/apps/braces.subx @@ -263,14 +263,8 @@ test-subx-braces-passes-most-words-through: # setup (clear-stream _test-input-stream) (clear-stream _test-output-stream) - # . clear-stream(_test-input-buffered-file+4) - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) - # . clear-stream(_test-output-buffered-file+4) - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) + (clear-stream _test-input-buffered-file->buffer) + (clear-stream _test-output-buffered-file->buffer) # test (write _test-input-stream "== abcd 0x1") (subx-braces _test-input-buffered-file _test-output-buffered-file) @@ -306,14 +300,8 @@ test-subx-braces-1: # setup (clear-stream _test-input-stream) (clear-stream _test-output-stream) - # . clear-stream(_test-input-buffered-file+4) - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) - # . clear-stream(_test-output-buffered-file+4) - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) + (clear-stream _test-input-buffered-file->buffer) + (clear-stream _test-output-buffered-file->buffer) # test (write _test-input-stream "{\nab break/imm32\ncd loop/imm32\n}") (subx-braces _test-input-buffered-file _test-output-buffered-file) @@ -353,14 +341,8 @@ test-subx-braces-2: # setup (clear-stream _test-input-stream) (clear-stream _test-output-stream) - # . clear-stream(_test-input-buffered-file+4) - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) - # . clear-stream(_test-output-buffered-file+4) - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - (clear-stream %eax) + (clear-stream _test-input-buffered-file->buffer) + (clear-stream _test-output-buffered-file->buffer) # test (write _test-input-stream "{\n{\nab break/imm32\n}\ncd loop/imm32\n}") (subx-braces _test-input-buffered-file _test-output-buffered-file) diff --git a/apps/calls b/apps/calls index 7cabc825..ddd0c5d4 100755 --- a/apps/calls +++ b/apps/calls Binary files differdiff --git a/apps/calls.subx b/apps/calls.subx index a29c52f3..5a306dbc 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -280,19 +280,13 @@ $parse-line:check1: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add %esp 8/imm32 -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add %esp 4/imm32 -#? # . . restore eax -#? 58/pop-to-eax #? # . write-slice-buffered(Stderr, word-slice) #? # . . push args #? 51/push-ecx @@ -557,11 +551,9 @@ test-subx-calls-passes-most-lines-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add %esp 4/imm32 - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -573,11 +565,9 @@ test-subx-calls-passes-most-lines-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add %esp 4/imm32 - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -632,11 +622,9 @@ test-subx-calls-processes-calls: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add %esp 4/imm32 - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -648,11 +636,9 @@ test-subx-calls-processes-calls: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add %esp 4/imm32 - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/crenshaw2-1 b/apps/crenshaw2-1 index ca629e9c..84ca1bd1 100755 --- a/apps/crenshaw2-1 +++ b/apps/crenshaw2-1 Binary files differdiff --git a/apps/crenshaw2-1.subx b/apps/crenshaw2-1.subx index 3f075140..d081e290 100644 --- a/apps/crenshaw2-1.subx +++ b/apps/crenshaw2-1.subx @@ -306,11 +306,9 @@ test-get-num-reads-single-digit: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -397,11 +395,9 @@ test-get-num-aborts-on-non-digit-in-Look: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/crenshaw2-1b b/apps/crenshaw2-1b index dd1292ed..1ff41732 100755 --- a/apps/crenshaw2-1b +++ b/apps/crenshaw2-1b Binary files differdiff --git a/apps/crenshaw2-1b.subx b/apps/crenshaw2-1b.subx index 11115b24..a784e858 100644 --- a/apps/crenshaw2-1b.subx +++ b/apps/crenshaw2-1b.subx @@ -324,11 +324,9 @@ test-get-num-reads-single-digit: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -415,11 +413,9 @@ test-get-num-aborts-on-non-digit-in-Look: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -500,11 +496,9 @@ test-get-num-reads-multiple-digits: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -591,11 +585,9 @@ test-get-num-reads-multiple-digits-followed-by-nondigit: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/dquotes b/apps/dquotes index 351742e6..2449a517 100755 --- a/apps/dquotes +++ b/apps/dquotes Binary files differdiff --git a/apps/dquotes.subx b/apps/dquotes.subx index 7d7cf632..0f50f752 100644 --- a/apps/dquotes.subx +++ b/apps/dquotes.subx @@ -395,11 +395,9 @@ test-subx-dquotes-is-idempotent-by-default: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -411,11 +409,9 @@ test-subx-dquotes-is-idempotent-by-default: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -652,11 +648,9 @@ test-subx-dquotes-processes-string-literals: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -668,11 +662,9 @@ test-subx-dquotes-processes-string-literals: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1481,11 +1473,9 @@ test-emit-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1540,11 +1530,9 @@ test-emit-metadata-none: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1599,11 +1587,9 @@ test-emit-metadata-multiple: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1658,11 +1644,9 @@ test-emit-metadata-when-no-datum: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1719,11 +1703,9 @@ test-emit-metadata-in-string-literal: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/factorial b/apps/factorial index f23fdd0f..c84b0e4d 100755 --- a/apps/factorial +++ b/apps/factorial Binary files differdiff --git a/apps/handle b/apps/handle index c0f4a4fb..8284fc05 100755 --- a/apps/handle +++ b/apps/handle Binary files differdiff --git a/apps/hex b/apps/hex index eade5fa7..aed98e77 100755 --- a/apps/hex +++ b/apps/hex Binary files differdiff --git a/apps/hex.subx b/apps/hex.subx index b3a98838..545d0f2b 100644 --- a/apps/hex.subx +++ b/apps/hex.subx @@ -216,11 +216,9 @@ test-convert-next-octet: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -232,11 +230,9 @@ test-convert-next-octet: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -318,11 +314,9 @@ test-convert-next-octet-handles-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -334,11 +328,9 @@ test-convert-next-octet-handles-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -412,11 +404,9 @@ test-convert-next-octet-aborts-on-single-hex-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -428,11 +418,9 @@ test-convert-next-octet-aborts-on-single-hex-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -585,11 +573,9 @@ test-scan-next-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -601,11 +587,9 @@ test-scan-next-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -687,11 +671,9 @@ test-scan-next-byte-skips-whitespace: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -703,11 +685,9 @@ test-scan-next-byte-skips-whitespace: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -789,11 +769,9 @@ test-scan-next-byte-skips-comment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -805,11 +783,9 @@ test-scan-next-byte-skips-comment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -899,11 +875,9 @@ test-scan-next-byte-skips-comment-and-whitespace: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -915,11 +889,9 @@ test-scan-next-byte-skips-comment-and-whitespace: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1009,7 +981,7 @@ test-scan-next-byte-skips-whitespace-and-comment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args b8/copy-to-eax _test-buffered-file/imm32 05/add-to-eax 4/imm32 @@ -1025,11 +997,9 @@ test-scan-next-byte-skips-whitespace-and-comment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1119,11 +1089,9 @@ test-scan-next-byte-reads-final-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1135,11 +1103,9 @@ test-scan-next-byte-reads-final-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1221,11 +1187,9 @@ test-scan-next-byte-handles-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1237,11 +1201,9 @@ test-scan-next-byte-handles-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1315,11 +1277,9 @@ test-scan-next-byte-aborts-on-invalid-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1331,11 +1291,9 @@ test-scan-next-byte-aborts-on-invalid-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-error-buffered-file+4) + # . clear-stream(_test-error-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-error-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-error-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1437,11 +1395,9 @@ test-skip-until-newline: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-buffered-file+4) + # . clear-stream(_test-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/pack b/apps/pack index a2cd9595..a8688306 100755 --- a/apps/pack +++ b/apps/pack Binary files differdiff --git a/apps/pack.subx b/apps/pack.subx index 51ad879e..5917f735 100644 --- a/apps/pack.subx +++ b/apps/pack.subx @@ -216,11 +216,9 @@ $subx-pack:check2: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -278,11 +276,9 @@ $subx-pack:check2: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -402,11 +398,9 @@ test-subx-pack-passes-empty-lines-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -418,11 +412,9 @@ test-subx-pack-passes-empty-lines-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -471,11 +463,9 @@ test-subx-pack-passes-lines-with-just-whitespace-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -487,11 +477,9 @@ test-subx-pack-passes-lines-with-just-whitespace-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -548,11 +536,9 @@ test-subx-pack-passes-segment-headers-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -564,11 +550,9 @@ test-subx-pack-passes-segment-headers-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -625,11 +609,9 @@ test-subx-pack-in-data-segment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -641,11 +623,9 @@ test-subx-pack-in-data-segment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -765,11 +745,9 @@ test-subx-pack-code-and-data-segments: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -781,11 +759,9 @@ test-subx-pack-code-and-data-segments: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1008,11 +984,9 @@ $convert-data:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -1171,11 +1145,9 @@ test-convert-data-passes-comments-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1265,11 +1237,9 @@ test-convert-data-passes-labels-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1334,11 +1304,9 @@ test-convert-data-passes-names-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1402,11 +1370,9 @@ test-convert-data-handles-imm32: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1471,11 +1437,9 @@ test-convert-data-handles-single-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1539,11 +1503,9 @@ test-convert-data-multiple-bytes: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1607,11 +1569,9 @@ test-convert-data-byte-then-name: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1675,11 +1635,9 @@ test-convert-data-multiple-words: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1769,11 +1727,9 @@ test-convert-data-trailing-comment: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -2399,11 +2355,9 @@ $emit-modrm:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -2710,11 +2664,9 @@ $emit-sib:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -2975,11 +2927,9 @@ $emit-disp:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -3196,11 +3146,9 @@ $emit-imm:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -3383,11 +3331,9 @@ test-convert-instruction-passes-comments-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3451,11 +3397,9 @@ test-convert-instruction-passes-labels-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3519,11 +3463,9 @@ test-convert-instruction-handles-single-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3613,11 +3555,9 @@ test-convert-instruction-handles-0f-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3707,11 +3647,9 @@ test-convert-instruction-handles-f2-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3801,11 +3739,9 @@ test-convert-instruction-handles-f3-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3895,11 +3831,9 @@ test-convert-instruction-handles-f2-0f-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3989,11 +3923,9 @@ test-convert-instruction-handles-f3-0f-opcode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4083,11 +4015,9 @@ test-convert-instruction-handles-unused-opcodes: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4177,11 +4107,9 @@ test-convert-instruction-handles-unused-second-opcodes: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4271,11 +4199,9 @@ test-convert-instruction-handles-unused-second-opcodes-2: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4365,11 +4291,9 @@ test-convert-instruction-emits-modrm-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4458,11 +4382,9 @@ test-convert-instruction-emits-modrm-byte-with-non-zero-mod: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4552,11 +4474,9 @@ test-convert-instruction-emits-modrm-byte-from-subop: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4646,11 +4566,9 @@ test-convert-instruction-emits-modrm-byte-with-missing-mod: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4740,11 +4658,9 @@ test-convert-instruction-emits-modrm-byte-with-missing-rm32: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4834,11 +4750,9 @@ test-convert-instruction-emits-modrm-byte-with-missing-r32: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4928,11 +4842,9 @@ test-convert-instruction-emits-sib-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5022,11 +4934,9 @@ test-convert-instruction-emits-sib-byte-with-missing-base: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5116,11 +5026,9 @@ test-convert-instruction-emits-sib-byte-with-missing-index: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5210,11 +5118,9 @@ test-convert-instruction-emits-sib-byte-with-missing-scale: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5304,11 +5210,9 @@ test-convert-instruction-handles-disp32-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5398,11 +5302,9 @@ test-convert-instruction-handles-disp16-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5492,11 +5394,9 @@ test-convert-instruction-handles-disp8-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5586,11 +5486,9 @@ test-convert-instruction-handles-disp8-name: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5680,11 +5578,9 @@ test-convert-instruction-handles-imm32-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5775,11 +5671,9 @@ test-convert-instruction-handles-imm16-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -5870,11 +5764,9 @@ test-convert-instruction-handles-imm8-operand: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/sigils b/apps/sigils index d8cdaf55..7a8a16f8 100755 --- a/apps/sigils +++ b/apps/sigils Binary files differdiff --git a/apps/sigils.subx b/apps/sigils.subx index 296ad68d..62ce5b19 100644 --- a/apps/sigils.subx +++ b/apps/sigils.subx @@ -216,19 +216,13 @@ $subx-sigils:direct-mode: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . write-slice-buffered(Stderr, word-slice) #? # . . push args #? 52/push-edx @@ -448,11 +442,9 @@ test-subx-sigils-passes-most-words-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -464,11 +456,9 @@ test-subx-sigils-passes-most-words-through: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -550,11 +540,9 @@ test-subx-sigils-direct-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -566,11 +554,9 @@ test-subx-sigils-direct-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -652,11 +638,9 @@ test-subx-sigils-direct-mode-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -668,11 +652,9 @@ test-subx-sigils-direct-mode-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -728,11 +710,9 @@ test-subx-sigils-register-indirect-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -744,11 +724,9 @@ test-subx-sigils-register-indirect-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -830,11 +808,9 @@ test-subx-sigils-register-indirect-mode-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -846,11 +822,9 @@ test-subx-sigils-register-indirect-mode-with-metadata: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -906,11 +880,9 @@ test-subx-sigils-register-indirect-mode-without-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -922,11 +894,9 @@ test-subx-sigils-register-indirect-mode-without-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1008,11 +978,9 @@ test-subx-sigils-register-indirect-mode-with-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1024,11 +992,9 @@ test-subx-sigils-register-indirect-mode-with-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1111,11 +1077,9 @@ test-subx-sigils-register-indirect-mode-with-sib-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1127,11 +1091,9 @@ test-subx-sigils-register-indirect-mode-with-sib-byte: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1213,11 +1175,9 @@ test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1229,11 +1189,9 @@ test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1315,11 +1273,9 @@ test-subx-sigils-indirect-mode-without-register: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1331,11 +1287,9 @@ test-subx-sigils-indirect-mode-without-register: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1485,11 +1439,9 @@ test-emit-direct-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -1570,11 +1522,9 @@ test-emit-direct-mode-2: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3381,11 +3331,9 @@ test-emit-indirect-mode: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3460,11 +3408,9 @@ test-emit-indirect-mode-2: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3539,11 +3485,9 @@ test-emit-indirect-mode-with-disp: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3618,11 +3562,9 @@ test-emit-indirect-mode-with-disp-negative: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3697,11 +3639,9 @@ test-emit-indirect-mode-with-sib: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3776,11 +3716,9 @@ test-emit-indirect-mode-ebp: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3855,11 +3793,9 @@ test-emit-indirect-mode-esp: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -4164,13 +4100,11 @@ $next-hex-int:abort: e8/call _write/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . clear-stream(Stderr+4) + # . clear-stream(Stderr->buffer) # . . save eax 50/push-eax # . . push args - b8/copy-to-eax Stderr/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push Stderr->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args diff --git a/apps/survey b/apps/survey index 6595e7cf..70303562 100755 --- a/apps/survey +++ b/apps/survey Binary files differdiff --git a/apps/survey.subx b/apps/survey.subx index 9c48e928..e4ebba13 100644 --- a/apps/survey.subx +++ b/apps/survey.subx @@ -166,19 +166,13 @@ subx-survey: # infile : (address buffered-file), out : (address buffered-file) #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . print-int32-buffered(Stderr, labels->write) #? # . . push args #? $watch-1: @@ -230,19 +224,13 @@ subx-survey: # infile : (address buffered-file), out : (address buffered-file) #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . print-int32-buffered(Stderr, labels->write) #? # . . push args #? ff 6/subop/push 0/mod/indirect 2/rm32/edx . . . . . . # push *edx @@ -386,19 +374,13 @@ subx-survey: # infile : (address buffered-file), out : (address buffered-file) #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . print-int32-buffered(Stderr, labels) #? # . . push args #? ff 6/subop/push 0/mod/indirect 2/rm32/edx . . . . . . # push *edx @@ -478,11 +460,9 @@ test-subx-survey-computes-addresses: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-input-buffered-file+4) + # . clear-stream(_test-input-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-input-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-input-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -494,11 +474,9 @@ test-subx-survey-computes-addresses: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -789,19 +767,13 @@ $compute-offsets:word-loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . write-slice-buffered(Stderr, word-slice) #? # . . push args #? 52/push-edx @@ -946,11 +918,9 @@ $compute-offsets:construct-next-segment: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args @@ -1129,19 +1099,13 @@ $compute-offsets:case-default: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . print-int32-buffered(Stderr, segment-offset) #? # . . push args #? 52/push-edx @@ -2611,11 +2575,9 @@ test-emit-segments-global-variable: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -2850,11 +2812,9 @@ test-emit-segments-code-label: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3054,11 +3014,9 @@ test-emit-segments-code-label-absolute: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # . clear-stream(_test-output-buffered-file+4) + # . clear-stream(_test-output-buffered-file->buffer) # . . push args - b8/copy-to-eax _test-output-buffered-file/imm32 - 05/add-to-eax 4/imm32 - 50/push-eax + 68/push _test-output-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args @@ -3275,19 +3233,13 @@ $emit-headers:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . print-int32-buffered(Stderr, &curr-segment) #? # . . push args #? 50/push-eax @@ -4258,19 +4210,13 @@ $num-bytes:loop: #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -#? # . clear-stream(Stderr+4) -#? # . . save eax -#? 50/push-eax +#? # . clear-stream(Stderr->buffer) #? # . . push args -#? b8/copy-to-eax Stderr/imm32 -#? 05/add-to-eax 4/imm32 -#? 50/push-eax +#? 68/push Stderr->buffer/imm32 #? # . . call #? e8/call clear-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -#? # . . restore eax -#? 58/pop-to-eax #? # . write-slice-buffered(Stderr, word-slice) #? # . . push args #? 51/push-ecx diff --git a/apps/tests b/apps/tests index 0dd18754..8e5e235a 100755 --- a/apps/tests +++ b/apps/tests Binary files differdiff --git a/subx.vim b/subx.vim index d63f3548..a61372f6 100644 --- a/subx.vim +++ b/subx.vim @@ -15,7 +15,7 @@ set cpo&vim setlocal formatoptions-=t " allow long lines setlocal formatoptions+=c " but comments should still wrap -setlocal iskeyword+=-,? +setlocal iskeyword+=-,?,<,> " blue tones " comment colors for dark terminal: 14, 39, 27, 19 |