diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-12-06 09:27:26 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-12-06 09:34:55 -0800 |
commit | 33e7c3a75196fbf8bd8412eda797cfa170eb189d (patch) | |
tree | 7132d877c6b8f7813fdc1c5057742698fdf75818 /subx/051test.subx | |
parent | 33cf1f90be1e9d92513775edccf96cf2f5a971b7 (diff) | |
download | mu-33e7c3a75196fbf8bd8412eda797cfa170eb189d.tar.gz |
4846
Clean up a few things: a) Call scan-next-byte in hex.subx with the right number of args. Turns out tests continue to work fine if they never use the other args. b) Tear down a test for 'stop' in the right order. Not important since we have no EBP to restore. But can still be misleading. c) Have 'check-ints-equal' return nothing. Handy for it to not mess up EAX. I never use the result anyway, and the name also is imperative suggesting callers won't expect a return value.
Diffstat (limited to 'subx/051test.subx')
-rw-r--r-- | subx/051test.subx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/subx/051test.subx b/subx/051test.subx index e19b243c..3fe51218 100644 --- a/subx/051test.subx +++ b/subx/051test.subx @@ -21,11 +21,12 @@ cd/syscall 0x80/imm8 # print msg to stderr if a != b, otherwise print "." -check-ints-equal: # (a : int, b : int, msg : (address array byte)) -> boolean +check-ints-equal: # (a : int, b : int, msg : (address array byte)) -> <void> # . prolog 55/push-EBP 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP # . save registers + 50/push-EAX 51/push-ECX 53/push-EBX # load first 2 args into EAX and EBX @@ -69,6 +70,7 @@ $check-ints-equal:end: # . restore registers 5b/pop-to-EBX 59/pop-to-ECX + 58/pop-to-EAX # . epilog 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . . # copy EBP to ESP 5d/pop-to-EBP |