diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-10-15 19:35:19 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-10-15 19:35:19 -0700 |
commit | 7a5832204a80ff43d23c3a384c26e2217ef5908b (patch) | |
tree | 5d3dce95369bf30b84735afd6e21bf1a43db16b7 | |
parent | 6a51218e12ce75e51301b834e1c48e86aefedc1e (diff) | |
download | mu-7a5832204a80ff43d23c3a384c26e2217ef5908b.tar.gz |
5698
Thanks Andrew Owen for reporting this typo.
57 files changed, 886 insertions, 886 deletions
diff --git a/050_write.subx b/050_write.subx index 28abad8a..dd6892af 100644 --- a/050_write.subx +++ b/050_write.subx @@ -12,7 +12,7 @@ Entry: # just exit; can't test _write just yet cd/syscall 0x80/imm8 _write: # fd : int, s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -41,7 +41,7 @@ $_write:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/051test.subx b/051test.subx index 1619c847..c5282446 100644 --- a/051test.subx +++ b/051test.subx @@ -22,7 +22,7 @@ Entry: # manual test # print msg to stderr if a != b, otherwise print "." check-ints-equal: # (a : int, b : int, msg : (address array byte)) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -71,7 +71,7 @@ $check-ints-equal:end: 5b/pop-to-ebx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/052kernel-string-equal.subx b/052kernel-string-equal.subx index 60c3e905..357591e1 100644 --- a/052kernel-string-equal.subx +++ b/052kernel-string-equal.subx @@ -50,7 +50,7 @@ kernel-string-equal?: # s : null-terminated ascii string, benchmark : length-pr # c1: eax # c2: ebx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -109,7 +109,7 @@ $kernel-string-equal?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/053new-segment.subx b/053new-segment.subx index 4ca74e63..51f321fd 100644 --- a/053new-segment.subx +++ b/053new-segment.subx @@ -39,7 +39,7 @@ Entry: # manual test cd/syscall 0x80/imm8 new-segment: # len : int, ad : (address allocation-descriptor) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -64,7 +64,7 @@ $new-segment:end: # . restore registers 5b/pop-to-ebx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/054string-equal.subx b/054string-equal.subx index 073e7dbb..2dfad4b5 100644 --- a/054string-equal.subx +++ b/054string-equal.subx @@ -33,7 +33,7 @@ string-equal?: # s : (address string), benchmark : (address string) -> eax : bo # c1: eax # c2: ebx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -87,7 +87,7 @@ $string-equal?:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -176,7 +176,7 @@ test-compare-inequal-strings-equal-lengths: # helper for later tests check-string-equal: # s : (address string), expected : (address string), msg : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -201,7 +201,7 @@ check-string-equal: # s : (address string), expected : (address string), msg : $check-string-equal:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/055stream.subx b/055stream.subx index 32b389bd..4534f84f 100644 --- a/055stream.subx +++ b/055stream.subx @@ -15,7 +15,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes clear-stream: # f : (address stream) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -46,13 +46,13 @@ $clear-stream:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return rewind-stream: # f : (address stream) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -64,7 +64,7 @@ rewind-stream: # f : (address stream) -> <void> $rewind-stream:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/056trace.subx b/056trace.subx index 6b706a0a..1d5c5a0b 100644 --- a/056trace.subx +++ b/056trace.subx @@ -42,7 +42,7 @@ _test-trace-stream: # Allocate a new segment for the trace stream, initialize its length, and save its address to Trace-stream. # The Trace-stream segment will consist of variable-length lines separated by newlines (0x0a) initialize-trace-stream: # n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -72,7 +72,7 @@ $initialize-trace-stream:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -80,7 +80,7 @@ $initialize-trace-stream:end: # Append a string to the given trace stream. # Silently give up if it's already full. Or truncate the string if there isn't enough room. trace: # line : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -141,7 +141,7 @@ $trace:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -247,7 +247,7 @@ test-trace-empty-line: c3/return check-trace-contains: # line : (address string), msg : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # rewind-stream(*Trace-stream) @@ -266,13 +266,13 @@ check-trace-contains: # line : (address string), msg : (address string) # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $check-trace-contains:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return check-trace-scans-to: # line : (address string), msg : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -296,7 +296,7 @@ check-trace-scans-to: # line : (address string), msg : (address string) $check-trace-scans-to:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -316,7 +316,7 @@ trace-scan: # line : (address string) -> result/eax : boolean # pop saved copy of Trace-stream->read # return false # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -373,7 +373,7 @@ $trace-scan:false: $trace-scan:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -564,7 +564,7 @@ next-line-matches?: # t : (address stream), line : (address string) -> result/e # ++currl # return *currt == '\n' # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -640,7 +640,7 @@ $next-line-matches?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -742,7 +742,7 @@ skip-next-line: # t : (address stream) # ++curr # t->read = i # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -789,7 +789,7 @@ $skip-next-line:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -839,7 +839,7 @@ test-skip-next-line-filled: c3/return clear-trace-stream: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -870,7 +870,7 @@ $clear-trace-stream:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -879,7 +879,7 @@ $clear-trace-stream:end: # 3-argument variant of _append _append-3: # out : address, outend : address, s : (array byte) -> num_bytes_appended/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -904,14 +904,14 @@ _append-3: # out : address, outend : address, s : (array byte) -> num_bytes_app $_append-3:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # 4-argument variant of _append _append-4: # out : address, outend : address, in : address, inend : address -> num_bytes_appended/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -954,7 +954,7 @@ $_append-4:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/057write.subx b/057write.subx index 4b46a5d5..a55202db 100644 --- a/057write.subx +++ b/057write.subx @@ -22,7 +22,7 @@ # TODO: come up with a way to signal when a write to disk fails write: # f : fd or (address stream), s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # if (f < 0x08000000) _write(f, s) and return # f can't be a user-mode address, so treat it as a kernel file descriptor @@ -70,7 +70,7 @@ $write:fake: 59/pop-to-ecx 58/pop-to-eax $write:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/058stream-equal.subx b/058stream-equal.subx index b6b3048a..25330a52 100644 --- a/058stream-equal.subx +++ b/058stream-equal.subx @@ -7,7 +7,7 @@ # compare all the data in a stream (ignoring the read pointer) stream-data-equal?: # f : (address stream), s : (address string) -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -61,13 +61,13 @@ $stream-data-equal?:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-stream-data-equal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -102,13 +102,13 @@ test-stream-data-equal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-stream-data-equal-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -143,13 +143,13 @@ test-stream-data-equal-2: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-stream-data-equal-length-check: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -184,14 +184,14 @@ test-stream-data-equal-length-check: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # helper for later tests check-stream-equal: # f : (address stream), s : (address string), msg : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -216,7 +216,7 @@ check-stream-equal: # f : (address stream), s : (address string), msg : (addres $check-stream-equal:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -263,7 +263,7 @@ next-stream-line-equal?: # f : (address stream), s : (address string) -> eax : # f[currf]: eax # s[currs]: ebx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -323,13 +323,13 @@ $next-stream-line-equal?:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-stream-line-equal-stops-at-newline: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -364,13 +364,13 @@ test-next-stream-line-equal-stops-at-newline: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-stream-line-equal-stops-at-newline-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -405,13 +405,13 @@ test-next-stream-line-equal-stops-at-newline-2: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-stream-line-equal-skips-newline: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -454,13 +454,13 @@ test-next-stream-line-equal-skips-newline: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-stream-line-equal-handles-final-line: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -503,13 +503,13 @@ test-next-stream-line-equal-handles-final-line: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-stream-line-equal-always-fails-after-Eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # clear-stream(_test-stream) @@ -554,14 +554,14 @@ test-next-stream-line-equal-always-fails-after-Eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # helper for later tests check-next-stream-line-equal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -585,7 +585,7 @@ check-next-stream-line-equal: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/059stop.subx b/059stop.subx index 03c8c4ca..c099d66f 100644 --- a/059stop.subx +++ b/059stop.subx @@ -42,7 +42,7 @@ # Ugly that we need to know the size of args. Don't allocate variables between # tailor-exit-descriptor and the call it's for. tailor-exit-descriptor: # ed : (address exit-descriptor), nbytes : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -84,13 +84,13 @@ $tailor-exit-descriptor:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return stop: # ed : (address exit-descriptor), value : int - # no prolog; one way or another, we're going to clobber registers + # no prologue; one way or another, we're going to clobber registers # eax = ed 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # copy *(esp+4) to eax # if (ed->target == 0) really exit @@ -112,7 +112,7 @@ $stop:end: c3/return # doesn't return to caller test-stop-skips-returns-on-exit: - # This looks like the standard prolog, but is here for different reasons. + # This looks like the standard prologue, but is here for different reasons. # A function calling 'stop' can't rely on ebp persisting past the call. # # Use ebp here as a stable base to refer to locals and arguments from in the @@ -155,14 +155,14 @@ test-stop-skips-returns-on-exit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp c3/return _test-stop-1: # ed : (address exit-descriptor) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # _test-stop-2(ed) @@ -183,13 +183,13 @@ $_test-stop-1:dead-end: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return _test-stop-2: # ed : (address exit-descriptor) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . stop(ed, 1) @@ -200,7 +200,7 @@ _test-stop-2: # ed : (address exit-descriptor) e8/call stop/disp32 # should never get past this point $_test-stop-2:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/060read.subx b/060read.subx index 6eabb2e5..1fe37da7 100644 --- a/060read.subx +++ b/060read.subx @@ -46,7 +46,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes read: # f : fd or (address stream), s : (address stream) -> num-bytes-read/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # if (f < 0x08000000) return _read(f, s) # f can't be a user-mode address, so treat it as a kernel file descriptor @@ -100,7 +100,7 @@ $read:fake: 5f/pop-to-edi 5e/pop-to-esi $read:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -111,7 +111,7 @@ $read:end: # 3-argument variant of _buffer _buffer-3: # out : address, outend : address, s : (array byte) -> num_bytes_buffered/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -136,14 +136,14 @@ _buffer-3: # out : address, outend : address, s : (array byte) -> num_bytes_buf $_buffer-3:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # 4-argument variant of _buffer _buffer-4: # out : address, outend : address, in : address, inend : address -> num_bytes_buffered/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -186,7 +186,7 @@ $_buffer-4:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -197,7 +197,7 @@ $_buffer-4:end: # Maybe a better helper would be 'empty-stream?' _read: # fd : int, s : (address stream) -> num-bytes-read/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -229,7 +229,7 @@ $_read:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/061read-byte.subx b/061read-byte.subx index 4ce13099..87af5efd 100644 --- a/061read-byte.subx +++ b/061read-byte.subx @@ -34,7 +34,7 @@ Stdin: # return next byte value in eax, with top 3 bytes cleared. # On reaching end of file, return 0xffffffff (Eof). read-byte-buffered: # f : (address buffered-file) -> byte-or-Eof/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -81,7 +81,7 @@ $read-byte-buffered:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/062write-stream.subx b/062write-stream.subx index d6b9af8c..a85cf40c 100644 --- a/062write-stream.subx +++ b/062write-stream.subx @@ -16,7 +16,7 @@ #? cd/syscall 0x80/imm8 write-stream: # f : fd or (address stream), s : (address stream) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # if (f < 0x08000000) _write-stream(f, s), return # f can't be a user-mode address, so treat it as a kernel file descriptor @@ -70,13 +70,13 @@ $write-stream:fake: 5e/pop-to-esi 58/pop-to-eax $write-stream:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return _write-stream: # fd : int, s : (address stream) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -114,7 +114,7 @@ _write-stream: # fd : int, s : (address stream) -> <void> 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/063error.subx b/063error.subx index c40586c7..10f10667 100644 --- a/063error.subx +++ b/063error.subx @@ -7,7 +7,7 @@ # write(out, "Error: "+msg+"\n") then stop(ed, 1) error: # ed : (address exit-descriptor), out : fd or (address stream), msg : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(out, "Error: ") @@ -42,7 +42,7 @@ error: # ed : (address exit-descriptor), out : fd or (address stream), msg : (a e8/call stop/disp32 # should never get past this point $error:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/064write-byte.subx b/064write-byte.subx index 80031972..1864a53d 100644 --- a/064write-byte.subx +++ b/064write-byte.subx @@ -29,7 +29,7 @@ Stdout: # Write lower byte of 'n' to 'f'. write-byte-buffered: # f : (address buffered-file), n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -71,13 +71,13 @@ $write-byte-buffered:end: # . restore registers 5f/pop-to-edi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return flush: # f : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -98,7 +98,7 @@ $flush:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -210,7 +210,7 @@ test-write-byte-buffered-multiple-flushes: # Write lower byte of 'n' to 'f'. append-byte: # f : (address stream), n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -235,7 +235,7 @@ $append-byte:end: # . restore registers 5f/pop-to-edi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/065write-buffered.subx b/065write-buffered.subx index a0161d45..a765d4ee 100644 --- a/065write-buffered.subx +++ b/065write-buffered.subx @@ -26,7 +26,7 @@ write-buffered: # f : (address buffered-file), msg : (address array byte) -> <v # f->write: ebx (cached; need to keep in sync) # c: eax # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -99,7 +99,7 @@ $write-buffered:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/066print-int.subx b/066print-int.subx index e4416557..6c7a55fd 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -18,7 +18,7 @@ $to-hex-char:else: c3/return append-byte-hex: # f : (address stream), n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -53,7 +53,7 @@ append-byte-hex: # f : (address stream), n : int -> <void> $append-byte-hex:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -90,7 +90,7 @@ test-append-byte-hex: # print the hex representation for the lowest byte of a number print-byte-buffered: # f : (address buffered-file), n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -125,7 +125,7 @@ print-byte-buffered: # f : (address buffered-file), n : int -> <void> $print-byte-buffered:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -187,7 +187,7 @@ print-int32: # f : (address stream), n : int -> <void> # append-byte(f, AL) # ecx -= 4 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -229,7 +229,7 @@ $print-int32:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -275,7 +275,7 @@ print-int32-buffered: # f : (address buffered-file), n : int -> <void> # write-byte-buffered(f, AL) # ecx -= 4 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -317,7 +317,7 @@ $print-int32-buffered:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/067parse-hex.subx b/067parse-hex.subx index 06eae408..3707e40b 100644 --- a/067parse-hex.subx +++ b/067parse-hex.subx @@ -7,7 +7,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes is-hex-int?: # in : (address slice) -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -79,13 +79,13 @@ $is-hex-int?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34" @@ -113,13 +113,13 @@ test-is-hex-int: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-handles-letters: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34a" @@ -147,13 +147,13 @@ test-is-hex-int-handles-letters: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-with-trailing-char: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34q" @@ -181,13 +181,13 @@ test-is-hex-int-with-trailing-char: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-with-leading-char: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "q34" @@ -215,13 +215,13 @@ test-is-hex-int-with-leading-char: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-empty: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "" @@ -244,13 +244,13 @@ test-is-hex-int-empty: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-handles-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x3a" @@ -278,13 +278,13 @@ test-is-hex-int-handles-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-handles-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-34a" @@ -312,13 +312,13 @@ test-is-hex-int-handles-negative: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-hex-int-handles-negative-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-0x3a" @@ -346,13 +346,13 @@ test-is-hex-int-handles-negative-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return parse-hex-int: # in : (address slice) -> result/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -426,13 +426,13 @@ $parse-hex-int:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-single-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a" @@ -460,13 +460,13 @@ test-parse-hex-int-single-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-multi-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34a" @@ -494,13 +494,13 @@ test-parse-hex-int-multi-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x34" @@ -528,13 +528,13 @@ test-parse-hex-int-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-zero: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0" @@ -562,13 +562,13 @@ test-parse-hex-int-zero: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-0-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "03" @@ -596,13 +596,13 @@ test-parse-hex-int-0-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-hex-int-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-03" @@ -630,13 +630,13 @@ test-parse-hex-int-negative: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-hex-digit?: # c : byte -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -662,7 +662,7 @@ is-hex-digit?: # c : byte -> eax : boolean $is-hex-digit?:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/068error-byte.subx b/068error-byte.subx index bf0655ae..0d6ddafe 100644 --- a/068error-byte.subx +++ b/068error-byte.subx @@ -25,7 +25,7 @@ # write(out, "Error: "+msg+": "+byte) then stop(ed, 1) error-byte: # ed : (address exit-descriptor), out : (address buffered-file), msg : (address array byte), n : byte -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write-buffered(out, "Error: ") @@ -83,7 +83,7 @@ error-byte: # ed : (address exit-descriptor), out : (address buffered-file), ms e8/call stop/disp32 # should never get past this point $error-byte:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/069allocate.subx b/069allocate.subx index 5e7a170d..aee30144 100644 --- a/069allocate.subx +++ b/069allocate.subx @@ -59,7 +59,7 @@ $array-equal-main:end: # Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr. # Abort if there isn't enough memory in 'ad'. allocate: # ad : (address allocation-descriptor), n : int -> address-or-null/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -82,7 +82,7 @@ $allocate:end: # . restore registers 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -103,7 +103,7 @@ $allocate:abort: # never gets here test-allocate-success: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ad/ecx : (address allocation-descriptor) = {11, 15} @@ -136,13 +136,13 @@ test-allocate-success: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return _pending-test-allocate-failure: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ad/ecx : (address allocation-descriptor) = {11, 15} @@ -176,14 +176,14 @@ _pending-test-allocate-failure: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # helper: create a nested allocation descriptor (useful for tests) allocate-region: # ad : (address allocation-descriptor), n : int -> new-ad : (address allocation-descriptor) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -210,7 +210,7 @@ allocate-region: # ad : (address allocation-descriptor), n : int -> new-ad : (a 89/copy 1/mod/*+disp8 0/rm32/eax . . . 1/r32/ecx 4/disp8 . # copy ecx to *(eax+4) # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/070new-stream.subx b/070new-stream.subx index c3f204d2..e1bea314 100644 --- a/070new-stream.subx +++ b/070new-stream.subx @@ -6,7 +6,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes new-stream: # ad : (address allocation-descriptor), length : int, elemsize : int -> address/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -44,7 +44,7 @@ new-stream: # ad : (address allocation-descriptor), length : int, elemsize : in $new-stream:end: # . restore registers 5a/pop-to-edx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -65,7 +65,7 @@ $new-stream:abort: # never gets here test-new-stream: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/ecx : (address allocation-descriptor) = {0, 0} @@ -110,7 +110,7 @@ test-new-stream: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # the rest is delegated to clear-stream() so we won't bother checking it - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/071read-line.subx b/071read-line.subx index bce42750..a68a76c2 100644 --- a/071read-line.subx +++ b/071read-line.subx @@ -17,7 +17,7 @@ read-line-buffered: # f : (address buffered-file), s : (address stream byte) -> # ++f->read # ++s->write # if (AL == '\n') break - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -88,7 +88,7 @@ $read-line-buffered:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -230,7 +230,7 @@ read-line: # f : (address stream), s : (address stream byte) -> <void> # ++f->read # ++s->write # if (AL == '\n') break - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -277,7 +277,7 @@ $read-line:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/072slice.subx b/072slice.subx index 09f45e18..338c39b0 100644 --- a/072slice.subx +++ b/072slice.subx @@ -7,7 +7,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes slice-empty?: # s : (address slice) -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -25,13 +25,13 @@ slice-empty?: # s : (address slice) -> eax : boolean $slice-empty?:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-empty-true: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = {34, 34} @@ -54,13 +54,13 @@ test-slice-empty-true: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-empty-false: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = {34, 23} @@ -83,7 +83,7 @@ test-slice-empty-false: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -108,7 +108,7 @@ slice-equal?: # s : (address slice), p : (address string) -> eax : boolean # *currs: eax # *currp: ecx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -171,14 +171,14 @@ $slice-equal?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal: # - slice-equal?(slice("Abc"), "Abc") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -207,14 +207,14 @@ test-slice-equal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-false: # - slice-equal?(slice("bcd"), "Abc") == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "bcd" @@ -243,14 +243,14 @@ test-slice-equal-false: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-too-long: # - slice-equal?(slice("Abcd"), "Abc") == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abcd" @@ -279,14 +279,14 @@ test-slice-equal-too-long: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-too-short: # - slice-equal?(slice("A"), "Abc") == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "A" @@ -315,14 +315,14 @@ test-slice-equal-too-short: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-empty: # - slice-equal?(slice(""), "Abc") == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx @@ -346,14 +346,14 @@ test-slice-equal-empty: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-with-empty: # - slice-equal?(slice("Ab"), "") == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Ab" @@ -382,14 +382,14 @@ test-slice-equal-with-empty: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-empty-with-empty: # - slice-equal?(slice(""), "") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx @@ -413,14 +413,14 @@ test-slice-equal-empty-with-empty: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-equal-with-null: # - slice-equal?(slice("Ab"), null) == 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Ab" @@ -449,7 +449,7 @@ test-slice-equal-with-null: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -476,7 +476,7 @@ slice-starts-with?: # s : (address slice), head : (address string) -> eax : boo # i: ecx # lenh: edx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -536,14 +536,14 @@ $slice-starts-with?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-single-character: # - slice-starts-with?(slice("Abc"), "A") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -572,14 +572,14 @@ test-slice-starts-with-single-character: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-empty-string: # - slice-starts-with?(slice("Abc"), "") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -608,14 +608,14 @@ test-slice-starts-with-empty-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-multiple-characters: # - slice-starts-with?(slice("Abc"), "Ab") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -644,14 +644,14 @@ test-slice-starts-with-multiple-characters: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-entire-string: # - slice-starts-with?(slice("Abc"), "Abc") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -680,14 +680,14 @@ test-slice-starts-with-entire-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-fails: # - slice-starts-with?(slice("Abc"), "Abd") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -716,14 +716,14 @@ test-slice-starts-with-fails: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-slice-starts-with-fails-2: # - slice-starts-with?(slice("Abc"), "Ac") == 1 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "Abc" @@ -752,7 +752,7 @@ test-slice-starts-with-fails-2: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -760,7 +760,7 @@ test-slice-starts-with-fails-2: # write a slice to a stream # abort if the stream doesn't have enough space write-slice: # out : (address stream), s : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -811,7 +811,7 @@ $write-slice:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -832,7 +832,7 @@ $write-slice:abort: # never gets here test-write-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -869,14 +869,14 @@ test-write-slice: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # write a slice to a buffered-file write-slice-buffered: # out : (address buffered-file), s : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -947,13 +947,13 @@ $write-slice-buffered:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-write-slice-buffered: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1006,14 +1006,14 @@ test-write-slice-buffered: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # copy a slice into a new (dynamically allocated) string slice-to-string: # ad : (address allocation-descriptor), in : (address slice) -> out/eax : (address array) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1069,7 +1069,7 @@ $slice-to-string:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1090,7 +1090,7 @@ $slice-to-string:abort: # never gets here test-slice-to-string: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/edx : (address allocation-descriptor) = {0, 0} @@ -1165,7 +1165,7 @@ test-slice-to-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/073next-token.subx b/073next-token.subx index 73a658c1..d11cd8b9 100644 --- a/073next-token.subx +++ b/073next-token.subx @@ -8,7 +8,7 @@ # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval next-token: # in : (address stream), delimiter : byte, out : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -49,13 +49,13 @@ next-token: # in : (address stream), delimiter : byte, out : (address slice) 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-token: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -113,13 +113,13 @@ test-next-token: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-token-Eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -153,7 +153,7 @@ test-next-token-Eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -161,7 +161,7 @@ test-next-token-Eof: # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval next-token-from-slice: # start : (address byte), end : (address byte), delimiter : byte, out : (address slice) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -202,13 +202,13 @@ next-token-from-slice: # start : (address byte), end : (address byte), delimite 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-token-from-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = " ab" @@ -256,13 +256,13 @@ test-next-token-from-slice: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-token-from-slice-Eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var out/edi : (address slice) = {0, 0} @@ -292,13 +292,13 @@ test-next-token-from-slice-Eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-token-from-slice-nothing: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = " " @@ -333,13 +333,13 @@ test-next-token-from-slice-nothing: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return skip-chars-matching: # in : (address stream), delimiter : byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -378,7 +378,7 @@ $skip-chars-matching:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -462,7 +462,7 @@ test-skip-chars-matching-none: c3/return skip-chars-matching-whitespace: # in : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -507,7 +507,7 @@ $skip-chars-matching-whitespace:end: 5b/pop-to-ebx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -552,7 +552,7 @@ test-skip-chars-matching-whitespace: # minor fork of 'skip-chars-matching' skip-chars-not-matching: # in : (address stream), delimiter : byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -591,7 +591,7 @@ $skip-chars-not-matching:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -714,7 +714,7 @@ test-skip-chars-not-matching-all: c3/return skip-chars-not-matching-whitespace: # in : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -758,7 +758,7 @@ $skip-chars-not-matching-whitespace:end: 5b/pop-to-ebx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -802,7 +802,7 @@ test-skip-chars-not-matching-whitespace: c3/return skip-chars-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -833,7 +833,7 @@ $skip-chars-matching-in-slice:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -897,7 +897,7 @@ test-skip-chars-matching-in-slice-none: c3/return skip-chars-matching-whitespace-in-slice: # in : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -935,7 +935,7 @@ $skip-chars-matching-whitespace-in-slice:end: # . restore registers 5b/pop-to-ebx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -970,7 +970,7 @@ test-skip-chars-matching-whitespace-in-slice: # minor fork of 'skip-chars-matching-in-slice' skip-chars-not-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1001,7 +1001,7 @@ $skip-chars-not-matching-in-slice:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1094,7 +1094,7 @@ test-skip-chars-not-matching-in-slice-all: c3/return skip-chars-not-matching-whitespace-in-slice: # in : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1131,7 +1131,7 @@ $skip-chars-not-matching-whitespace-in-slice:end: # . restore registers 5b/pop-to-ebx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1167,7 +1167,7 @@ test-skip-chars-not-matching-whitespace-in-slice: # update line->read to end of string literal surrounded by double quotes # line->read must start out at a double-quote skip-string: # line : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1198,13 +1198,13 @@ $skip-string:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1251,13 +1251,13 @@ test-skip-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-ignores-spaces: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1304,13 +1304,13 @@ test-skip-string-ignores-spaces: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-ignores-escapes: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1357,13 +1357,13 @@ test-skip-string-ignores-escapes: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-works-from-mid-stream: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1403,13 +1403,13 @@ test-skip-string-works-from-mid-stream: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return skip-string-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1455,13 +1455,13 @@ $skip-string-in-slice:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-in-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"abc\" def" @@ -1488,13 +1488,13 @@ test-skip-string-in-slice: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-in-slice-ignores-spaces: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"a b\"/yz" @@ -1521,13 +1521,13 @@ test-skip-string-in-slice-ignores-spaces: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-in-slice-ignores-escapes: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"a\\\"b\"/yz" @@ -1554,13 +1554,13 @@ test-skip-string-in-slice-ignores-escapes: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-string-in-slice-stops-at-end: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"abc" # unbalanced dquote @@ -1587,7 +1587,7 @@ test-skip-string-in-slice-stops-at-end: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1595,7 +1595,7 @@ test-skip-string-in-slice-stops-at-end: # update line->read to ')' # line->read ends at ')' skip-until-close-paren: # line : (address stream) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1626,13 +1626,13 @@ $skip-until-close-paren:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1679,13 +1679,13 @@ test-skip-until-close-paren: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren-ignores-spaces: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1731,13 +1731,13 @@ test-skip-until-close-paren-ignores-spaces: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren-works-from-mid-stream: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1776,13 +1776,13 @@ test-skip-until-close-paren-works-from-mid-stream: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return skip-until-close-paren-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1816,13 +1816,13 @@ $skip-until-close-paren-in-slice:end: # . restore registers 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren-in-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "*(abc) def" @@ -1849,13 +1849,13 @@ test-skip-until-close-paren-in-slice: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren-in-slice-ignores-spaces: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "*(a b)/yz" @@ -1882,13 +1882,13 @@ test-skip-until-close-paren-in-slice-ignores-spaces: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-skip-until-close-paren-in-slice-stops-at-end: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "*(abc" # unbalanced dquote @@ -1915,7 +1915,7 @@ test-skip-until-close-paren-in-slice-stops-at-end: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/074write-stream-data.subx b/074write-stream-data.subx index d5d901b4..72fca897 100644 --- a/074write-stream-data.subx +++ b/074write-stream-data.subx @@ -9,7 +9,7 @@ # - flush the buffered-file and pass the stream directly to its fd (disabling buffering) # we'll go with the first way for now write-stream-data: # f : (address buffered-file), s : (address stream) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -43,13 +43,13 @@ $write-stream-data:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-write-stream-data: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -110,7 +110,7 @@ test-write-stream-data: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/075print-int-decimal.subx b/075print-int-decimal.subx index f7898fe9..a9cfa5fc 100644 --- a/075print-int-decimal.subx +++ b/075print-int-decimal.subx @@ -35,7 +35,7 @@ print-int32-decimal: # out : (address stream), n : int32 # (this pseudocode contains registers because operations like division # require specific registers in x86) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -108,7 +108,7 @@ $print-int32-decimal:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/076next-word.subx b/076next-word.subx index efd99a64..054dfb47 100644 --- a/076next-word.subx +++ b/076next-word.subx @@ -8,7 +8,7 @@ # (re)compute the bounds of the next word in the line # return empty string on reaching end of file next-word: # line : (address stream byte), out : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -78,13 +78,13 @@ $next-word:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -141,13 +141,13 @@ test-next-word: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -204,13 +204,13 @@ test-next-word-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-returns-empty-string-on-eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -246,7 +246,7 @@ test-next-word-returns-empty-string-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/077subx-words.subx b/077subx-words.subx index 5bdf196a..2b53ebb1 100644 --- a/077subx-words.subx +++ b/077subx-words.subx @@ -15,7 +15,7 @@ has-metadata?: # word : (address slice), s : (address string) -> eax : boolean # if (slice-equal?(twig, s)) return true # curr = twig->end # return false - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -93,13 +93,13 @@ $has-metadata?:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-has-metadata-true: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "ab/imm32" @@ -128,13 +128,13 @@ test-has-metadata-true: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-has-metadata-false: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "ab/c" @@ -163,13 +163,13 @@ test-has-metadata-false: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-has-metadata-ignore-name: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a/b" @@ -198,13 +198,13 @@ test-has-metadata-ignore-name: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-has-metadata-multiple-true: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a/b/c" @@ -233,13 +233,13 @@ test-has-metadata-multiple-true: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-has-metadata-multiple-false: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a/b/c" @@ -268,7 +268,7 @@ test-has-metadata-multiple-false: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -282,7 +282,7 @@ test-has-metadata-multiple-false: #: - if it's two characters long, it can't be a name. Either it's a hex #: byte, or it raises an error. is-valid-name?: # in : (address slice) -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -330,13 +330,13 @@ $is-valid-name?:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-digit-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34" @@ -364,13 +364,13 @@ test-is-valid-name-digit-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-negative-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-0x34" @@ -398,13 +398,13 @@ test-is-valid-name-negative-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x34" @@ -432,13 +432,13 @@ test-is-valid-name-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-starts-with-pre-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "/03" @@ -466,13 +466,13 @@ test-is-valid-name-starts-with-pre-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-starts-with-post-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "q34" @@ -500,13 +500,13 @@ test-is-valid-name-starts-with-post-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-valid-name-starts-with-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x34" @@ -534,13 +534,13 @@ test-is-valid-name-starts-with-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-label?: # word : (address slice) -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -562,13 +562,13 @@ is-label?: # word : (address slice) -> eax : boolean $is-label?:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-is-label?: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $test-is-label?:true: @@ -623,7 +623,7 @@ $test-is-label?:false: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/078emit-hex.subx b/078emit-hex.subx index 73912ea0..750db096 100644 --- a/078emit-hex.subx +++ b/078emit-hex.subx @@ -5,7 +5,7 @@ # print 'n' in hex in 'width' bytes in lower-endian order, with a space after every byte emit-hex: # out : (address buffered-file), n : int, width : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -55,7 +55,7 @@ $emit-hex:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/079emit.subx b/079emit.subx index b0c06de6..d8168990 100644 --- a/079emit.subx +++ b/079emit.subx @@ -8,7 +8,7 @@ # Otherwise just print the entire word including metadata. # Always print a trailing space. emit: # out : (address buffered-file), word : (address slice), width : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -90,13 +90,13 @@ $emit:end: 5f/pop-to-edi 5e/pop-to-esi 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-number: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -150,14 +150,14 @@ test-emit-number: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-negative-number: # test support for sign-extending negative numbers - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -211,13 +211,13 @@ test-emit-negative-number: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-number-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -272,13 +272,13 @@ test-emit-number-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-non-number: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -332,13 +332,13 @@ test-emit-non-number: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-non-number-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -392,13 +392,13 @@ test-emit-non-number-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-non-number-with-all-hex-digits-and-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -478,7 +478,7 @@ test-emit-non-number-with-all-hex-digits-and-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/080zero-out.subx b/080zero-out.subx index 1a4c73d1..2dee2665 100644 --- a/080zero-out.subx +++ b/080zero-out.subx @@ -15,7 +15,7 @@ zero-out: # start : address, len : int # ++curr # ++i # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -46,13 +46,13 @@ $zero-out:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-zero-out: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # region/ecx = 34, 35, 36, 37 @@ -76,7 +76,7 @@ test-zero-out: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/081table.subx b/081table.subx index 602cd872..3cc3dbf3 100644 --- a/081table.subx +++ b/081table.subx @@ -33,7 +33,7 @@ get: # table : (address stream {string, _}), key : (address string), row-size : # curr += row-size # abort # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -75,7 +75,7 @@ $get:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -120,7 +120,7 @@ $get:abort: # never gets here test-get: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - setup: create a table with a couple of keys @@ -191,7 +191,7 @@ $test-get:check2: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-get:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -207,7 +207,7 @@ get-slice: # table : (address stream {string, _}), key : (address slice), row-s # curr += row-size # abort # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -249,7 +249,7 @@ $get-slice:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -301,7 +301,7 @@ $get-slice:abort: # never gets here test-get-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - setup: create a table with a couple of keys @@ -390,7 +390,7 @@ $test-get-slice:check2: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-get-slice:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -415,7 +415,7 @@ get-or-insert: # table : (address stream {string, _}), key : (address string), # table->write += row-size # return max+4 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -487,7 +487,7 @@ $get-or-insert:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -508,7 +508,7 @@ $get-or-insert:abort: # never gets here test-get-or-insert: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var table/ecx : (address stream {string, number}) = stream(2 rows * 8 bytes) @@ -642,7 +642,7 @@ $test-get-or-insert:third-call: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-get-or-insert:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -666,7 +666,7 @@ leaky-get-or-insert-slice: # table : (address stream {string, _}), key : (addre # table->write += row-size # return max+4 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -744,7 +744,7 @@ $leaky-get-or-insert-slice:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -765,7 +765,7 @@ $leaky-get-or-insert-slice:abort: # never gets here test-leaky-get-or-insert-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var table/ecx : (address stream {string, number}) = stream(2 rows * 8 bytes) @@ -917,7 +917,7 @@ $test-leaky-get-or-insert-slice:third-call: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-leaky-get-or-insert-slice:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -936,7 +936,7 @@ get-or-stop: # table : (address stream {string, _}), key : (address string), ro # write-buffered(err, msg) # stop(ed) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -978,7 +978,7 @@ $get-or-stop:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1032,7 +1032,7 @@ $get-or-stop:terminus: test-get-or-stop: # This test uses exit-descriptors. Use ebp for setting up local variables. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1134,7 +1134,7 @@ $test-get-or-stop:failure-assertion: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-get-or-stop:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x24/imm32 # add to esp 5d/pop-to-ebp @@ -1154,7 +1154,7 @@ get-slice-or-stop: # table : (address stream {string, _}), key : (address slice # write-buffered(err, msg) # stop(ed) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1196,7 +1196,7 @@ $get-slice-or-stop:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1250,7 +1250,7 @@ $get-slice-or-stop:terminus: test-get-slice-or-stop: # This test uses exit-descriptors. Use ebp for setting up local variables. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1375,7 +1375,7 @@ $test-get-slice-or-stop:failure-assertion: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-get-slice-or-stop:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x2c/imm32 # add to esp 5d/pop-to-ebp @@ -1392,7 +1392,7 @@ maybe-get: # table : (address stream {string, _}), key : (address string), row- # curr += row-size # return 0 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1436,13 +1436,13 @@ $maybe-get:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-maybe-get: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - setup: create a table with one row @@ -1523,7 +1523,7 @@ $test-maybe-get:failure: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-maybe-get:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1539,7 +1539,7 @@ maybe-get-slice: # table : (address stream {string, _}), key : (address slice), # curr += row-size # return 0 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1583,13 +1583,13 @@ $maybe-get-slice:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-maybe-get-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - setup: create a table with one row @@ -1688,7 +1688,7 @@ $test-maybe-get-slice:failure: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-maybe-get-slice:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/082slurp.subx b/082slurp.subx index 36a95d48..1968f69f 100644 --- a/082slurp.subx +++ b/082slurp.subx @@ -15,7 +15,7 @@ slurp: # f : (address buffered-file), s : (address stream byte) -> <void> # s->data[s->write] = AL # ++f->read # ++s->write - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -84,7 +84,7 @@ $slurp:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/083subx-widths.subx b/083subx-widths.subx index 18fe9833..7bd7141f 100644 --- a/083subx-widths.subx +++ b/083subx-widths.subx @@ -4,7 +4,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes compute-width: # word : (address array byte) -> eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -32,13 +32,13 @@ $compute-width:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return compute-width-of-slice: # s : (address slice) -> eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -102,13 +102,13 @@ compute-width-of-slice: # s : (address slice) -> eax : int $compute-width-of-slice:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-compute-width: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $test-compute-width:imm8: @@ -230,7 +230,7 @@ $test-compute-width:no-metadata: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/084emit-hex-array.subx b/084emit-hex-array.subx index eb79d07f..9708f240 100644 --- a/084emit-hex-array.subx +++ b/084emit-hex-array.subx @@ -5,7 +5,7 @@ # print 'arr' in hex with a space after every byte emit-hex-array: # out : (address buffered-file), arr : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -47,13 +47,13 @@ $emit-hex-array:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-hex-array: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -134,7 +134,7 @@ test-emit-hex-array: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/092write-int.subx b/092write-int.subx index 9089cbbe..11ac84fe 100644 --- a/092write-int.subx +++ b/092write-int.subx @@ -6,7 +6,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes write-int: # out : (address stream), n : int -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -31,7 +31,7 @@ $write-int:end: 5f/pop-to-edi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/093array-equal.subx b/093array-equal.subx index d6dec878..95cff9dd 100644 --- a/093array-equal.subx +++ b/093array-equal.subx @@ -27,7 +27,7 @@ array-equal?: # a : (address array int), b : (address array int) -> eax : boole # i1: eax # i2: ebx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -82,13 +82,13 @@ $array-equal?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-compare-empty-with-empty-array: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [] @@ -114,13 +114,13 @@ test-compare-empty-with-empty-array: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-compare-empty-with-non-empty-array: # also checks length-mismatch code path - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1] @@ -147,13 +147,13 @@ test-compare-empty-with-non-empty-array: # also checks length-mismatch code pat e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-compare-equal-arrays: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1, 2, 3] @@ -185,13 +185,13 @@ test-compare-equal-arrays: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-compare-inequal-arrays-equal-lengths: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1, 4, 3] @@ -223,7 +223,7 @@ test-compare-inequal-arrays-equal-lengths: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -253,7 +253,7 @@ parse-array-of-ints: # ad : (address allocation-descriptor), s : (address strin # slice->start = slice->end # return result # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -393,13 +393,13 @@ $parse-array-of-ints:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-array-of-ints: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1, 2, 3] @@ -433,14 +433,14 @@ test-parse-array-of-ints: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-array-of-ints-empty: # - empty string = empty array - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = parse-array-of-ints(Heap, "") @@ -460,14 +460,14 @@ test-parse-array-of-ints-empty: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-array-of-ints-just-whitespace: # - just whitespace = empty array - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = parse-array-of-ints(Heap, " ") @@ -487,13 +487,13 @@ test-parse-array-of-ints-just-whitespace: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-array-of-ints-extra-whitespace: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1, 2, 3] @@ -527,7 +527,7 @@ test-parse-array-of-ints-extra-whitespace: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -535,7 +535,7 @@ test-parse-array-of-ints-extra-whitespace: # helper for later tests # compare an array with a string representation of an array literal check-array-equal: # a : (address array int), expected : (address string), msg : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -571,13 +571,13 @@ check-array-equal: # a : (address array int), expected : (address string), msg $check-array-equal:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-check-array-equal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var ecx = [1, 2, 3] @@ -595,7 +595,7 @@ test-check-array-equal: e8/call check-array-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/094next-word-or-string.subx b/094next-word-or-string.subx index b1b16764..0fe24c6a 100644 --- a/094next-word-or-string.subx +++ b/094next-word-or-string.subx @@ -6,7 +6,7 @@ # (re)compute the bounds of the next word or string literal in the line # return empty string on reaching end of file next-word-or-string: # line : (address stream byte), out : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -94,13 +94,13 @@ $next-word-or-string:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-string: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -167,13 +167,13 @@ test-next-word-or-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-string-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -240,13 +240,13 @@ test-next-word-or-string-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-string-returns-empty-slice-on-eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -282,13 +282,13 @@ test-next-word-or-string-returns-empty-slice-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-string-returns-string-literal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -345,13 +345,13 @@ test-next-word-or-string-returns-string-literal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-string-returns-string-with-escapes: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -408,7 +408,7 @@ test-next-word-or-string-returns-string-with-escapes: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/095stack.subx b/095stack.subx index e776e7d2..2e2f182e 100644 --- a/095stack.subx +++ b/095stack.subx @@ -8,7 +8,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes clear-stack: # s : (address stack) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -36,13 +36,13 @@ $clear-stack:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-clear-stack: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var stack/ecx = stack of size 8 with random data in it @@ -102,13 +102,13 @@ test-clear-stack: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return push: # s : (address stack), n : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -132,7 +132,7 @@ $push:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -161,7 +161,7 @@ $push:abort: # never gets here test-push: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var stack/ecx = empty stack of size 8 @@ -222,13 +222,13 @@ test-push: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return pop: # s : (address stack) -> n/eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -250,7 +250,7 @@ $pop:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -279,7 +279,7 @@ $pop:abort: # never gets here test-pop: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var stack/ecx = stack of size 8 containing just 0x42 @@ -326,13 +326,13 @@ test-pop: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return top: # s : (address stack) -> n/eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -351,7 +351,7 @@ $top:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -380,7 +380,7 @@ $top:abort: # never gets here test-top: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var stack/ecx = stack of size 8 containing just 0x42 @@ -405,7 +405,7 @@ test-top: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/assort.subx b/apps/assort.subx index 6b3eadba..1898d832 100644 --- a/apps/assort.subx +++ b/apps/assort.subx @@ -24,7 +24,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -92,7 +92,7 @@ subx-assort: # in : (address buffered-file), out : (address buffered-file) -> < # read-segments(in, table) # write-segments(out, table) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -151,13 +151,13 @@ $subx-assort:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x5c/imm32 # add to esp # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-assort: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -449,7 +449,7 @@ test-subx-assort: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -489,7 +489,7 @@ read-segments: # in : (address buffered-file), table : (address stream {string, # word-slice->start: esi # temporary: eax # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -844,7 +844,7 @@ $read-segments:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -859,7 +859,7 @@ write-segments: # out : (address buffered-file), table : (address stream {strin # curr += 8 # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -905,7 +905,7 @@ $write-segments:end: 5e/pop-to-esi 5a/pop-to-edx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/braces.subx b/apps/braces.subx index 32042539..87907b95 100644 --- a/apps/braces.subx +++ b/apps/braces.subx @@ -51,7 +51,7 @@ == code Entry: # run tests if necessary, a REPL if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap (new-segment Heap-size Heap) @@ -111,7 +111,7 @@ subx-braces: # in : (address buffered-file), out : (address buffered-file) -> < # print(out, word-slice " ") # print(out, "\n") # flush(out) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -251,13 +251,13 @@ $subx-braces:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-subx-braces-passes-most-words-through: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -282,7 +282,7 @@ test-subx-braces-passes-most-words-through: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "== abcd 0x1 \n" "F - test-subx-braces-passes-most-words-through") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -300,7 +300,7 @@ test-subx-braces-1: # cd _loop1/imm32 # _break1: # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -325,7 +325,7 @@ test-subx-braces-1: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "_loop0x00000001:\nab _break0x00000001/imm32 \ncd _loop0x00000001/imm32 \n_break0x00000001:\n" "F - test-subx-braces-1") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -347,7 +347,7 @@ test-subx-braces-2: # cd _loop1/imm32 # _break1: # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -372,7 +372,7 @@ test-subx-braces-2: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "_loop0x00000001:\n_loop0x00000002:\nab _break0x00000002/imm32 \n_break0x00000002:\ncd _loop0x00000001/imm32 \n_break0x00000001:\n" "F - test-subx-braces-2") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/calls.subx b/apps/calls.subx index 4747d4c5..88e963a5 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -25,7 +25,7 @@ == code Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap @@ -97,7 +97,7 @@ subx-calls: # in : (address buffered-file), out : (address buffered-file) -> <v # emit-call(out, words) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -226,7 +226,7 @@ $subx-calls:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -241,7 +241,7 @@ parse-line: # line : (address stream byte), words : (address stream slice) # write-int(words, word-slice->start) # write-int(words, word-slice->end) # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -341,7 +341,7 @@ $parse-line:end: 81 0/subop/add %esp 8/imm32 # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -372,7 +372,7 @@ emit-call: # out : (address buffered-file), words : (address stream slice) # print-int32-buffered(out, words->write >> 1 - 4) # write-buffered(out, "/imm32\n") # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -517,7 +517,7 @@ $emit-call:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -546,7 +546,7 @@ $emit-call:error1: # never gets here test-subx-calls-passes-most-lines-through: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -615,13 +615,13 @@ test-subx-calls-passes-most-lines-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-subx-calls-processes-calls: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -750,7 +750,7 @@ test-subx-calls-processes-calls: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -812,7 +812,7 @@ next-word-string-or-expression-without-metadata: # line : (address stream), out # ecx: often line->read # eax: often line->data[line->read] # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -993,7 +993,7 @@ $next-word-string-or-expression-without-metadata:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -1194,7 +1194,7 @@ $next-word-string-or-expression-without-metadata:error5: # never gets here test-next-word-string-or-expression-without-metadata: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1261,13 +1261,13 @@ test-next-word-string-or-expression-without-metadata: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1334,13 +1334,13 @@ test-next-word-string-or-expression-without-metadata-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-empty-slice-on-eof: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1376,13 +1376,13 @@ test-next-word-string-or-expression-without-metadata-returns-empty-slice-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-literal: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1439,13 +1439,13 @@ test-next-word-string-or-expression-without-metadata-returns-string-literal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1502,13 +1502,13 @@ test-next-word-string-or-expression-without-metadata-returns-string-with-escapes e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-expression: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1565,13 +1565,13 @@ test-next-word-string-or-expression-without-metadata-returns-whole-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1620,13 +1620,13 @@ test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-clo e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-handles-comment-after-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1675,13 +1675,13 @@ test-next-word-string-or-expression-without-metadata-handles-comment-after-trail e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-handles-newline-after-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1730,13 +1730,13 @@ test-next-word-string-or-expression-without-metadata-handles-newline-after-trail e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-stops-at-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1793,7 +1793,7 @@ test-next-word-string-or-expression-without-metadata-stops-at-close-paren: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/crenshaw2-1.subx b/apps/crenshaw2-1.subx index f78f03ae..9fc2cb08 100644 --- a/apps/crenshaw2-1.subx +++ b/apps/crenshaw2-1.subx @@ -31,7 +31,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, call 'compile' if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -91,7 +91,7 @@ $main:end: # the main entry point compile: # in : (address buffered-file), out : fd or (address stream), err : fd or (address stream), ed : (address exit-descriptor) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -182,7 +182,7 @@ $compile:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -210,7 +210,7 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - if (is-digit?(Look)) expected(ed, err, "integer") @@ -288,7 +288,7 @@ $get-num:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -473,7 +473,7 @@ test-get-num-aborts-on-non-digit-in-Look: # write(f, "Error: "+s+" expected\n") then stop(ed, 1) expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(f, "Error: ") @@ -508,14 +508,14 @@ expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (ad e8/call stop/disp32 # should never get past this point $expected:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # read a byte from 'f', and save it in 'Look' get-char: # f : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -532,13 +532,13 @@ get-char: # f : (address buffered-file) -> <void> $get-char:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-digit?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = false @@ -552,7 +552,7 @@ is-digit?: # c : int -> eax : boolean # otherwise return true b8/copy-to-eax 1/imm32 $is-digit?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/crenshaw2-1b.subx b/apps/crenshaw2-1b.subx index 2956e396..2a321281 100644 --- a/apps/crenshaw2-1b.subx +++ b/apps/crenshaw2-1b.subx @@ -31,7 +31,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, call 'compile' if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -91,7 +91,7 @@ $main:end: # the main entry point compile: # in : (address buffered-file), out : fd or (address stream), err : fd or (address stream), ed : (address exit-descriptor) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -182,7 +182,7 @@ $compile:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -216,7 +216,7 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - if (is-digit?(Look)) expected(ed, err, "integer") @@ -306,7 +306,7 @@ $get-num:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -673,7 +673,7 @@ test-get-num-reads-multiple-digits-followed-by-nondigit: # write(f, "Error: "+s+" expected\n") then stop(ed, 1) expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(f, "Error: ") @@ -708,14 +708,14 @@ expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (ad e8/call stop/disp32 # should never get past this point $expected:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # read a byte from 'f', and save it in 'Look' get-char: # f : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -732,13 +732,13 @@ get-char: # f : (address buffered-file) -> <void> $get-char:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-digit?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = false @@ -752,7 +752,7 @@ is-digit?: # c : int -> eax : boolean # otherwise return true b8/copy-to-eax 1/imm32 $is-digit?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/dquotes.subx b/apps/dquotes.subx index 7146a8d3..8d85b45b 100644 --- a/apps/dquotes.subx +++ b/apps/dquotes.subx @@ -20,7 +20,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -106,7 +106,7 @@ subx-dquotes: # in : (address buffered-file), out : (address buffered-file) -> # write-stream-data(out, new-data-segment) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -271,7 +271,7 @@ $subx-dquotes:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -286,7 +286,7 @@ process-string-literal: # string-literal : (address slice), out : (address buff # emit-metadata(out, string-literal) # ++ *Next-string-literal # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -378,13 +378,13 @@ $process-string-literal:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x16/imm32 # add to esp # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-dquotes-is-idempotent-by-default: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -635,13 +635,13 @@ test-subx-dquotes-is-idempotent-by-default: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-dquotes-processes-string-literals: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -839,7 +839,7 @@ test-subx-dquotes-processes-string-literals: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -873,7 +873,7 @@ emit-string-literal-data: # out : (address stream), word : (address slice) # idx = 0 # write(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1015,13 +1015,13 @@ $emit-string-literal-data:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-alphanumeric?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = c @@ -1051,13 +1051,13 @@ $is-alphanumeric?:false: $is-alphanumeric?:true: b8/copy-to-eax 1/imm32/true $is-alphanumeric?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1115,13 +1115,13 @@ test-emit-string-literal-data: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-empty: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1179,14 +1179,14 @@ test-emit-string-literal-data-empty: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # just to keep things simple test-emit-string-literal-data-no-metadata-for-non-alphanumerics: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1244,13 +1244,13 @@ test-emit-string-literal-data-no-metadata-for-non-alphanumerics: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-handles-escape-sequences: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1308,13 +1308,13 @@ test-emit-string-literal-data-handles-escape-sequences: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-handles-newline-escape: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1372,7 +1372,7 @@ test-emit-string-literal-data-handles-newline-escape: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1394,7 +1394,7 @@ emit-metadata: # out : (address buffered-file), word : (address slice) # slice->start = curr # write-slice-buffered(out, slice) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1464,13 +1464,13 @@ $emit-metadata:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1523,13 +1523,13 @@ test-emit-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-none: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1582,13 +1582,13 @@ test-emit-metadata-none: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-multiple: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1641,13 +1641,13 @@ test-emit-metadata-multiple: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-when-no-datum: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1702,13 +1702,13 @@ test-emit-metadata-when-no-datum: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-in-string-literal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1782,13 +1782,13 @@ test-emit-metadata-in-string-literal: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return string-length-at-start-of-slice: # curr : (address byte), end : (address byte) -> length/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1833,13 +1833,13 @@ $string-length-at-start-of-slice:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-string-length-at-start-of-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"abc\" def" @@ -1864,13 +1864,13 @@ test-string-length-at-start-of-slice: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-string-length-at-start-of-slice-escaped: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"ab\\c\" def" @@ -1895,7 +1895,7 @@ test-string-length-at-start-of-slice-escaped: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/factorial.subx b/apps/factorial.subx index 66fc4be0..b6635016 100644 --- a/apps/factorial.subx +++ b/apps/factorial.subx @@ -19,7 +19,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, compute `factorial(5)` if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -69,7 +69,7 @@ $main:end: cd/syscall 0x80/imm8 factorial: # n : int -> int/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 53/push-ebx @@ -91,7 +91,7 @@ factorial: # n : int -> int/eax f7 4/subop/multiply 1/mod/*+disp8 5/rm32/ebp . . 8/disp8 . # multiply *(ebp+8) into eax # TODO: check for overflow $factorial:end: - # . epilog + # . epilogue 5b/pop-to-ebx 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp diff --git a/apps/handle.subx b/apps/handle.subx index 6ebf35b2..7df44741 100644 --- a/apps/handle.subx +++ b/apps/handle.subx @@ -45,7 +45,7 @@ $handle-main:end: cd/syscall 0x80/imm8 new: # ad : (address allocation-descriptor), n : int, out : (address handle) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -87,13 +87,13 @@ $new:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-new: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/edx : (address allocation-descriptor) = {0, 0} @@ -154,13 +154,13 @@ test-new: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return _pending-test-new-failure: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . *Next-alloc-id = 0x34 @@ -216,13 +216,13 @@ _pending-test-new-failure: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return lookup: # h : (handle T) -> eax : (address T) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - as a proof of concept for future inlining, uses no general-purpose registers besides the output (eax) @@ -258,7 +258,7 @@ lookup: # h : (handle T) -> eax : (address T) #? # add 4 to eax #? 05/add-to-eax 4/imm32 # - } - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -278,7 +278,7 @@ $lookup:abort: cd/syscall 0x80/imm8 test-lookup-success: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -341,13 +341,13 @@ test-lookup-success: # . restore registers 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-lookup-failure: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/esi : (address allocation-descriptor) = {0, 0} @@ -414,7 +414,7 @@ test-lookup-failure: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/hex.subx b/apps/hex.subx index e5f13077..98e14a25 100644 --- a/apps/hex.subx +++ b/apps/hex.subx @@ -18,7 +18,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -85,7 +85,7 @@ subx-hex: # in : (address buffered-file), out : (address buffered-file), err : # write-byte-buffered(out, AL) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -124,7 +124,7 @@ $subx-hex:loop-end: $subx-hex:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -146,7 +146,7 @@ convert-next-octet: # in : (address buffered-file), err : (address buffered-fil # eax = (ecx << 4) | eax # return # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -198,7 +198,7 @@ $convert-next-octet:convert: $convert-next-octet:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -299,7 +299,7 @@ test-convert-next-octet: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -393,7 +393,7 @@ test-convert-next-octet-handles-Eof: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet-handles-Eof:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -483,7 +483,7 @@ test-convert-next-octet-aborts-on-single-hex-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet-aborts-on-single-hex-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -503,7 +503,7 @@ scan-next-byte: # in : (address buffered-file), err : (address buffered-file), # if (eax == '#') skip-until-newline(in) # else error-byte(ed, err, "invalid byte: " eax) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -567,7 +567,7 @@ $scan-next-byte:check3: e8/call error-byte/disp32 # never returns $scan-next-byte:end: # . restore registers - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -668,7 +668,7 @@ test-scan-next-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -770,7 +770,7 @@ test-scan-next-byte-skips-whitespace: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-whitespace:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -880,7 +880,7 @@ test-scan-next-byte-skips-comment: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-comment:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -990,7 +990,7 @@ test-scan-next-byte-skips-comment-and-whitespace: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-comment-and-whitespace:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1100,7 +1100,7 @@ test-scan-next-byte-skips-whitespace-and-comment: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-whitespace-and-comment:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1202,7 +1202,7 @@ test-scan-next-byte-reads-final-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-reads-final-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1296,7 +1296,7 @@ test-scan-next-byte-handles-Eof: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-handles-Eof:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1386,7 +1386,7 @@ test-scan-next-byte-aborts-on-invalid-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-aborts-on-invalid-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1400,7 +1400,7 @@ skip-until-newline: # in : (address buffered-file) -> <void> # if (eax == Eof) break # if (eax == 0x0a) break # pop eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1422,7 +1422,7 @@ $skip-until-newline:loop: $skip-until-newline:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/mulisp.subx b/apps/mulisp.subx index e1365e60..226042c2 100644 --- a/apps/mulisp.subx +++ b/apps/mulisp.subx @@ -11,7 +11,7 @@ == code Entry: # run tests if necessary, a REPL if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap (new-segment Heap-size Heap) @@ -75,7 +75,7 @@ $main:end: # tag for them all repl: # in : (address buffered-file), out : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -93,7 +93,7 @@ repl: # in : (address buffered-file), out : (address buffered-file) -> <void> $repl:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -105,7 +105,7 @@ $repl:end: # symbols start with anything else but quote, backquote, unquote or splice # only one s-expression per line lisp-read: # in : (address buffered-file) -> eax : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -137,7 +137,7 @@ $lisp-read:end: 81 0/subop/add %esp 0x20c/imm32 # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -182,14 +182,14 @@ next-mulisp-token: # in : (address buffered-file), line : (address stream), res # result->en = &line->data[line->read] # return # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers $next-mulisp-token:end: # . reclaim locals # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -199,20 +199,20 @@ new-int-cell: # in : (address slice) -> eax : (address cell) new-string-cell: # in : (address slice) -> eax : (address cell) lisp-eval: # in : (address cell) -> eax : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers 8b/-> *(ebp+8) 0/r32/eax $lisp-eval:end: # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return lisp-print: # out : (address buffered-file), x : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -222,7 +222,7 @@ lisp-print: # out : (address buffered-file), x : (address cell) (flush Stdout) $lisp-print:end: # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/pack.subx b/apps/pack.subx index 1be0c4c4..3f300f3a 100644 --- a/apps/pack.subx +++ b/apps/pack.subx @@ -19,7 +19,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -120,7 +120,7 @@ subx-pack: # in : (address buffered-file), out : (address buffered-file) -> <vo # convert-data(line, out) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -384,14 +384,14 @@ $subx-pack:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-empty-lines-through: # if a line is empty, pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -453,14 +453,14 @@ test-subx-pack-passes-empty-lines-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-lines-with-just-whitespace-through: # if a line is empty, pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -530,14 +530,14 @@ test-subx-pack-passes-lines-with-just-whitespace-through: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-segment-headers-through: # if a line starts with '==', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -607,14 +607,14 @@ test-subx-pack-passes-segment-headers-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-in-data-segment: # correctly process lines in the data segment - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -747,14 +747,14 @@ test-subx-pack-in-data-segment: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-code-and-data-segments: # correctly process lines in both code and data segments - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -928,7 +928,7 @@ test-subx-pack-code-and-data-segments: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -953,7 +953,7 @@ convert-data: # line : (address stream byte), out : (address buffered-file) -> # emit(out, word-slice, 1) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1146,14 +1146,14 @@ $convert-data:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-passes-comments-through: # if a line starts with '#', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1240,14 +1240,14 @@ test-convert-data-passes-comments-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-passes-labels-through: # if the first word ends with ':', pass along the entire line unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1308,7 +1308,7 @@ test-convert-data-passes-labels-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1316,7 +1316,7 @@ test-convert-data-passes-labels-through: test-convert-data-passes-names-through: # If a word is a valid name, just emit it unchanged. # Later phases will deal with it. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1377,14 +1377,14 @@ test-convert-data-passes-names-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-handles-imm32: # If a word has the /imm32 metadata, emit it in 4 bytes. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1445,7 +1445,7 @@ test-convert-data-handles-imm32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1453,7 +1453,7 @@ test-convert-data-handles-imm32: test-convert-data-handles-single-byte: # Any metadata but /imm32 will emit a single byte. # Data segments can't have /disp32, and SubX doesn't support 16-bit operands. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1514,14 +1514,14 @@ test-convert-data-handles-single-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-multiple-bytes: # Multiple single-byte words in input stream get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1582,14 +1582,14 @@ test-convert-data-multiple-bytes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-byte-then-name: # Single-byte word followed by valid name get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1650,14 +1650,14 @@ test-convert-data-byte-then-name: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-multiple-words: # Multiple words in input stream get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1744,14 +1744,14 @@ test-convert-data-multiple-words: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-trailing-comment: # Trailing comments in data segment get appropriately ignored. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1838,7 +1838,7 @@ test-convert-data-trailing-comment: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1874,7 +1874,7 @@ convert-instruction: # line : (address stream byte), out : (address buffered-fi # emit-imm(line, out) # emit-line-in-comment(line, out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1992,7 +1992,7 @@ $convert-instruction:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2030,7 +2030,7 @@ emit-opcodes: # line : (address stream byte), out : (address buffered-file) -> # op3 = next-token-from-slice(op3->start, op3->end, "/") # write-slice-buffered(out, op3) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2288,7 +2288,7 @@ $emit-opcodes:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2319,7 +2319,7 @@ emit-modrm: # line : (address stream byte), out : (address buffered-file) -> <v # modrm |= rm32 & 0b111 # emit-hex(out, modrm, 1) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2607,7 +2607,7 @@ $emit-modrm:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2637,7 +2637,7 @@ emit-sib: # line : (address stream byte), out : (address buffered-file) -> <voi # sib |= base & 0b111 # emit-hex(out, sib, 1) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2890,7 +2890,7 @@ $emit-sib:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2913,7 +2913,7 @@ emit-disp: # line : (address stream byte), out : (address buffered-file) -> <vo # emit(out, word-slice, 1) # break # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3111,7 +3111,7 @@ $emit-disp:break: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3134,7 +3134,7 @@ emit-imm: # line : (address stream byte), out : (address buffered-file) -> <voi # emit(out, word-slice, 1) # break # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3332,13 +3332,13 @@ $emit-imm:break: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-line-in-comment: # line : (address stream byte), out : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write-buffered(out, " # ") @@ -3358,14 +3358,14 @@ emit-line-in-comment: # line : (address stream byte), out : (address buffered-f # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $emit-line-in-comment:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-passes-comments-through: # if a line starts with '#', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3426,14 +3426,14 @@ test-convert-instruction-passes-comments-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-passes-labels-through: # if the first word ends with ':', pass along the entire line unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3494,14 +3494,14 @@ test-convert-instruction-passes-labels-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-single-opcode: # if the instruction consists of a single opcode, strip its metadata and pass it along - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3588,14 +3588,14 @@ test-convert-instruction-handles-single-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-0f-opcode: # if the instruction starts with 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3682,14 +3682,14 @@ test-convert-instruction-handles-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f2-opcode: # if the instruction starts with f2 opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3776,14 +3776,14 @@ test-convert-instruction-handles-f2-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f3-opcode: # if the instruction starts with f3 opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3870,14 +3870,14 @@ test-convert-instruction-handles-f3-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f2-0f-opcode: # if the instruction starts with f2 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3964,14 +3964,14 @@ test-convert-instruction-handles-f2-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f3-0f-opcode: # if the instruction starts with f3 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4058,14 +4058,14 @@ test-convert-instruction-handles-f3-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-opcodes: # if the instruction doesn't start with f2, f3 or 0f, don't include other opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4152,14 +4152,14 @@ test-convert-instruction-handles-unused-opcodes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-second-opcodes: # if the second opcode isn't 0f, don't include further opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4246,14 +4246,14 @@ test-convert-instruction-handles-unused-second-opcodes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-second-opcodes-2: # if the second opcode isn't 0f, don't include further opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4340,14 +4340,14 @@ test-convert-instruction-handles-unused-second-opcodes-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte: # pack mod, rm32 and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4434,13 +4434,13 @@ test-convert-instruction-emits-modrm-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-non-zero-mod: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4527,14 +4527,14 @@ test-convert-instruction-emits-modrm-byte-with-non-zero-mod: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-from-subop: # pack mod, rm32 and subop operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4621,14 +4621,14 @@ test-convert-instruction-emits-modrm-byte-from-subop: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-mod: # pack rm32 and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4715,14 +4715,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-mod: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-rm32: # pack mod and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4809,14 +4809,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-rm32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-r32: # pack mod and rm32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4903,14 +4903,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-r32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte: # pack base, index and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4997,14 +4997,14 @@ test-convert-instruction-emits-sib-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-base: # pack index and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5091,14 +5091,14 @@ test-convert-instruction-emits-sib-byte-with-missing-base: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-index: # pack base and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5185,14 +5185,14 @@ test-convert-instruction-emits-sib-byte-with-missing-index: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-scale: # pack base and index operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5279,14 +5279,14 @@ test-convert-instruction-emits-sib-byte-with-missing-scale: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp32-operand: # expand /disp32 operand into 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5373,14 +5373,14 @@ test-convert-instruction-handles-disp32-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp16-operand: # expand /disp16 operand into 2 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5467,14 +5467,14 @@ test-convert-instruction-handles-disp16-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp8-operand: # expand /disp8 operand into 1 byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5561,14 +5561,14 @@ test-convert-instruction-handles-disp8-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp8-name: # pass /disp8 name directly through - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5655,14 +5655,14 @@ test-convert-instruction-handles-disp8-name: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-imm32-operand: # expand /imm32 operand into 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5749,7 +5749,7 @@ test-convert-instruction-handles-imm32-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -5757,7 +5757,7 @@ test-convert-instruction-handles-imm32-operand: test-convert-instruction-handles-imm16-operand: # expand /imm16 operand into 2 bytes # we don't have one of these at the moment, so this expands to an invalid instruction - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5844,7 +5844,7 @@ test-convert-instruction-handles-imm16-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -5852,7 +5852,7 @@ test-convert-instruction-handles-imm16-operand: test-convert-instruction-handles-imm8-operand: # expand /imm8 operand into 1 byte # we don't have one of these at the moment, so this expands to an invalid instruction - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5939,14 +5939,14 @@ test-convert-instruction-handles-imm8-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/')) parse-datum-of-word: # word : (address slice) -> value/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -5981,7 +5981,7 @@ $parse-datum-of-word:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/sigils.subx b/apps/sigils.subx index 6e6e76a5..76a956b7 100644 --- a/apps/sigils.subx +++ b/apps/sigils.subx @@ -52,7 +52,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -133,7 +133,7 @@ subx-sigils: # in : (address buffered-file), out : (address buffered-file) -> < # write(out, "\n") # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -376,7 +376,7 @@ $subx-sigils:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -437,7 +437,7 @@ $subx-sigils:error1: # never gets here test-subx-sigils-passes-most-words-through: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -533,13 +533,13 @@ test-subx-sigils-passes-most-words-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-direct-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -635,13 +635,13 @@ test-subx-sigils-direct-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-direct-mode-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -711,13 +711,13 @@ test-subx-sigils-direct-mode-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -813,13 +813,13 @@ test-subx-sigils-register-indirect-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -889,13 +889,13 @@ test-subx-sigils-register-indirect-mode-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-without-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -991,13 +991,13 @@ test-subx-sigils-register-indirect-mode-without-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1093,14 +1093,14 @@ test-subx-sigils-register-indirect-mode-with-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # boss level test-subx-sigils-register-indirect-mode-with-sib-byte: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1196,13 +1196,13 @@ test-subx-sigils-register-indirect-mode-with-sib-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1298,13 +1298,13 @@ test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-indirect-mode-without-register: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1400,13 +1400,13 @@ test-subx-sigils-indirect-mode-without-register: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-direct-mode: # out : (address buffered-file), word-slice : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1468,13 +1468,13 @@ $emit-direct-mode:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-direct-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1553,13 +1553,13 @@ test-emit-direct-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-direct-mode-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1638,7 +1638,7 @@ test-emit-direct-mode-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1676,7 +1676,7 @@ next-word-or-expression: # line : (address stream byte), out : (address slice) # ecx: often line->read # eax: often line->data[line->read] # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1789,7 +1789,7 @@ $next-word-or-expression:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1873,7 +1873,7 @@ $next-word-or-expression:error2: # never gets here test-next-word-or-expression: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1940,13 +1940,13 @@ test-next-word-or-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2013,13 +2013,13 @@ test-next-word-or-expression-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-empty-slice-on-eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2055,13 +2055,13 @@ test-next-word-or-expression-returns-empty-slice-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-string-literal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2118,13 +2118,13 @@ test-next-word-or-expression-returns-string-literal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-string-with-escapes: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2181,13 +2181,13 @@ test-next-word-or-expression-returns-string-with-escapes: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-whole-expression: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2244,7 +2244,7 @@ test-next-word-or-expression-returns-whole-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2294,7 +2294,7 @@ parse-effective-address: # word-slice : (address slice) -> base/eax, index/ecx, # read integer into disp # skip whitespace # if (*local-slice->start != ')') goto error4 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2557,7 +2557,7 @@ $parse-effective-address:end: # . restore registers 5f/pop-to-edi 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2721,7 +2721,7 @@ $parse-effective-address:error4: # assumes 'in' starts with a register name, and returns pointer to its code # side-effect: modifies 'in' to scan past the initial register name next-register: # in : (address slice) -> reg/eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2753,13 +2753,13 @@ $next-register:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-simple: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*esi" @@ -2815,13 +2815,13 @@ test-parse-effective-address-simple: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi )" @@ -2877,13 +2877,13 @@ test-parse-effective-address-base: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+3)" @@ -2939,13 +2939,13 @@ test-parse-effective-address-base-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-negative-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi-3)" @@ -3001,13 +3001,13 @@ test-parse-effective-address-base-negative-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+ecx)" @@ -3063,13 +3063,13 @@ test-parse-effective-address-base-index: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index-scale: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+ecx<<2)" @@ -3125,13 +3125,13 @@ test-parse-effective-address-base-index-scale: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index-scale-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi + ecx<<2 - 0x34)" @@ -3187,7 +3187,7 @@ test-parse-effective-address-base-index-scale-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3200,7 +3200,7 @@ test-parse-effective-address-base-index-scale-displacement: # emit-sib: # if index is not none, then mod = 2 and rm32 = 4 and base = base and index = index and disp32 = disp emit-indirect-mode: # out : (address buffered-file), base : int, index : int, scale : int, disp : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $emit-indirect-mode:check-for-ebp: @@ -3364,13 +3364,13 @@ $emit-indirect-mode:emit-indirect: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $emit-indirect-mode:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3443,13 +3443,13 @@ test-emit-indirect-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3522,13 +3522,13 @@ test-emit-indirect-mode-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-disp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3601,13 +3601,13 @@ test-emit-indirect-mode-with-disp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-disp-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3680,13 +3680,13 @@ test-emit-indirect-mode-with-disp-negative: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-sib: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3759,13 +3759,13 @@ test-emit-indirect-mode-with-sib: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-ebp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3838,13 +3838,13 @@ test-emit-indirect-mode-ebp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-esp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3917,13 +3917,13 @@ test-emit-indirect-mode-esp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return disp32-mode?: # in : (address slice) -> reg/eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3976,13 +3976,13 @@ $disp32-mode?:end: # . restore registers 5f/pop-to-edi 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-indirect-disp32: # out : (address buffered-file), word-slice : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4023,7 +4023,7 @@ $emit-indirect-disp32:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . restore registers 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4032,7 +4032,7 @@ $emit-indirect-disp32:end: # returns the value of the integer # side-effect: modifies 'in' to skip past the integer next-hex-int: # in : (address slice) -> result/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4150,7 +4150,7 @@ $next-hex-int:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4207,7 +4207,7 @@ $next-hex-int:abort: # never gets here test-next-hex-int-single-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+a)" @@ -4235,13 +4235,13 @@ test-next-hex-int-single-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-multi-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+ 34a)" @@ -4269,13 +4269,13 @@ test-next-hex-int-multi-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+0x34)" @@ -4303,13 +4303,13 @@ test-next-hex-int-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-zero: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+0)" @@ -4337,13 +4337,13 @@ test-next-hex-int-zero: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-0-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+ 03)" @@ -4371,13 +4371,13 @@ test-next-hex-int-0-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-03)" @@ -4405,13 +4405,13 @@ test-next-hex-int-negative: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-negative-with-space: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "- 03)" @@ -4439,7 +4439,7 @@ test-next-hex-int-negative-with-space: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4448,7 +4448,7 @@ test-next-hex-int-negative-with-space: # returns the value of the integer # side-effect: modifies 'in' to skip past the integer next-positive-hex-int: # in : (address slice) -> result/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4529,13 +4529,13 @@ $next-positive-hex-int:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-single-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a)" @@ -4563,13 +4563,13 @@ test-next-positive-hex-int-single-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-multi-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34a)" @@ -4597,13 +4597,13 @@ test-next-positive-hex-int-multi-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x34)" @@ -4631,13 +4631,13 @@ test-next-positive-hex-int-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-zero: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0" @@ -4665,13 +4665,13 @@ test-next-positive-hex-int-zero: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-0-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "03)" @@ -4699,7 +4699,7 @@ test-next-positive-hex-int-0-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/survey.subx b/apps/survey.subx index b943fe72..08e7775a 100644 --- a/apps/survey.subx +++ b/apps/survey.subx @@ -42,7 +42,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # Heap = new-segment(Heap-size) @@ -124,7 +124,7 @@ subx-survey: # infile : (address buffered-file), out : (address buffered-file) # rewind-stream(in) # emit-output(in, out, segments, labels) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -447,7 +447,7 @@ $subx-survey:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -467,7 +467,7 @@ test-subx-survey-computes-addresses: # segment code has size 5 # segment data starts at address 0x1079 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -619,7 +619,7 @@ test-subx-survey-computes-addresses: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -694,7 +694,7 @@ compute-offsets: # in : (address stream), segments : (address stream {string, s # *segment-offset += width # *file-offset += width # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1212,7 +1212,7 @@ $compute-offsets:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1249,7 +1249,7 @@ test-compute-offsets: # label 'x' is in segment 'data'. # label 'x' is at segment offset 0x1. # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1414,7 +1414,7 @@ test-compute-offsets: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1442,7 +1442,7 @@ compute-addresses: # segments : (address stream {string, segment-info}), labels # trace-sssns("label " lrow->key " is at address " lrow->address) # lrow += 16 # row-size # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1636,7 +1636,7 @@ $compute-addresses:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1658,7 +1658,7 @@ test-compute-addresses: # label 'l1' is at address 0x00001097. (0x1094 + segment-offset 3) # label 'l2' is at address 0x00002099. (0x2099 + segment-offset 0) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1809,7 +1809,7 @@ test-compute-addresses: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1827,7 +1827,7 @@ test-compute-addresses-large-segments: # segment 'b' starts at address 0x00002678. (0x018 discarded; last 3 nibbles from 0x1074 + 0x5604) # label 'l1' is at address 0x00001077. (0x1074 + segment-offset 3) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1907,7 +1907,7 @@ test-compute-addresses-large-segments: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1917,7 +1917,7 @@ emit-output: # in : (address stream), out : (address buffered-file), segments : # emit-headers(out, segments, labels) # emit-segments(in, out, segments, labels) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp #? # write(2/stderr, "emit-headers\n") {{{ @@ -1958,7 +1958,7 @@ emit-output: # in : (address stream), out : (address buffered-file), segments : # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32 # add to esp $emit-output:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2018,7 +2018,7 @@ emit-segments: # in : (address stream), out : (address buffered-file), segments # info: esi (inner loop only) # temporaries: eax, esi (outer loop) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2503,7 +2503,7 @@ $emit-segments:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2593,7 +2593,7 @@ test-emit-segments-global-variable: # 00 # 34 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2807,7 +2807,7 @@ test-emit-segments-global-variable: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2832,7 +2832,7 @@ test-emit-segments-code-label: # ef gh # ij f9 ff ff ff # -7 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3011,7 +3011,7 @@ test-emit-segments-code-label: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3036,7 +3036,7 @@ test-emit-segments-code-label-absolute: # ef gh # ij 56 10 00 00 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3215,7 +3215,7 @@ test-emit-segments-code-label-absolute: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3230,7 +3230,7 @@ emit-headers: # out : (address buffered-file), segments : (address stream {stri # emit-elf-program-header-entry(out, curr-segment) # curr-segment += 16 # size of a row # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3359,7 +3359,7 @@ $emit-headers:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3371,7 +3371,7 @@ emit-elf-header: # out : (address buffered-file), segments : (address stream {s # emit-hex-array(out, Elf_header) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3427,7 +3427,7 @@ $emit-elf-header:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3446,7 +3446,7 @@ emit-elf-program-header-entry: # out : (address buffered-file), curr-segment : # emit-hex-array(out, Elf_program_header_entry) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3514,7 +3514,7 @@ $emit-elf-program-header-entry:end: # . restore registers 5e/pop-to-esi 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3522,7 +3522,7 @@ $emit-elf-program-header-entry:end: # - some helpers for tests stream-add4: # in : (address stream byte), key : address, val1 : address, val2 : address, val3 : address - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3580,7 +3580,7 @@ $stream-add4:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3608,7 +3608,7 @@ $stream-add4:abort: # one gotcha: 's5' must not be empty trace-sssns: # s1 : (address string), s2 : (address string), s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3651,13 +3651,13 @@ trace-sssns: # s1 : (address string), s2 : (address string), s3 : (address stri # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-sssns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-sssns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3709,13 +3709,13 @@ test-trace-sssns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-snsns: # s1 : (address string), n2 : int, s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3758,13 +3758,13 @@ trace-snsns: # s1 : (address string), n2 : int, s3 : (address string), n4 : int # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-snsns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-snsns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3816,13 +3816,13 @@ test-trace-snsns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsls: # s1 : (address string), l2 : (address slice), s3 : (address string), l4 : (address slice), s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3865,13 +3865,13 @@ trace-slsls: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsls:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsls: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3941,13 +3941,13 @@ test-trace-slsls: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsns: # s1 : (address string), l2 : (address slice), s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3990,13 +3990,13 @@ trace-slsns: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4057,13 +4057,13 @@ test-trace-slsns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsss: # s1 : (address string), l2 : (address slice), s3 : (address string), s4 : (address string), s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -4106,13 +4106,13 @@ trace-slsss: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsss:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsss: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4173,7 +4173,7 @@ test-trace-slsss: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4194,7 +4194,7 @@ num-bytes: # line : (address stream) -> eax : int # result += compute-width(word-slice) # return result # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4376,14 +4376,14 @@ $num-bytes:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-handles-empty-string: # if a line starts with '#', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4418,14 +4418,14 @@ test-num-bytes-handles-empty-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-comments: # if a line starts with '#', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4468,14 +4468,14 @@ test-num-bytes-ignores-comments: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-labels: # if the first word ends with ':', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4518,14 +4518,14 @@ test-num-bytes-ignores-labels: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-segment-headers: # if the first word is '==', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4568,14 +4568,14 @@ test-num-bytes-ignores-segment-headers: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-counts-words-by-default: # without metadata, count words - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4618,14 +4618,14 @@ test-num-bytes-counts-words-by-default: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-trailing-comment: # trailing comments appropriately ignored - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4668,14 +4668,14 @@ test-num-bytes-ignores-trailing-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-handles-imm32: # if a word has the /imm32 metadata, count it as 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4718,7 +4718,7 @@ test-num-bytes-handles-imm32: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/tests.subx b/apps/tests.subx index 9f204198..cb2b5e2a 100644 --- a/apps/tests.subx +++ b/apps/tests.subx @@ -10,7 +10,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -92,7 +92,7 @@ subx-gen-run-tests: # in : (address buffered-file), out : (address buffered-fil # write-stream-data(out, new-code-segment) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -276,7 +276,7 @@ $subx-gen-run-tests:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/examples/ex10.subx b/examples/ex10.subx index 468b3e5a..c091fe52 100644 --- a/examples/ex10.subx +++ b/examples/ex10.subx @@ -18,7 +18,7 @@ Entry: # return argv-equal(argv[1], argv[2]) # argv[0]: *(esp+4) # argv[1]: *(esp+8) # ... - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # argv-equal(argv[1], argv[2]) # . . push argv[2] diff --git a/examples/ex11.subx b/examples/ex11.subx index 1590b010..b235927d 100644 --- a/examples/ex11.subx +++ b/examples/ex11.subx @@ -49,7 +49,7 @@ kernel-string-equal?: # s : null-terminated ascii string, benchmark : length-pr # c1: eax # c2: ebx # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -108,7 +108,7 @@ $kernel-string-equal?:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -259,7 +259,7 @@ test-compare-kernel-string-with-longer-array: # print msg to stderr if a != b, otherwise print "." check-ints-equal: # (a : int, b : int, msg : (address array byte)) -> boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -308,7 +308,7 @@ $check-ints-equal:end: c3/return write-stderr: # s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers diff --git a/examples/ex8.subx b/examples/ex8.subx index 0cda5908..0e44a883 100644 --- a/examples/ex8.subx +++ b/examples/ex8.subx @@ -20,7 +20,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = ascii-length(argv[1]) # . . push args diff --git a/examples/ex9.subx b/examples/ex9.subx index 3ba0acc0..443e443e 100644 --- a/examples/ex9.subx +++ b/examples/ex9.subx @@ -23,7 +23,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # ascii-difference(argv[1], argv[2]) # . . push argv[2] |