about summary refs log tree commit diff stats
path: root/subx/051test.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-28 12:44:34 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-28 12:45:11 -0700
commitbb5cc54f9673ed0a6e5ef6f471e1ed7af1892c19 (patch)
tree96abb57feb7cb76ea34dda2c404cc8d11f2b9cfc /subx/051test.subx
parent93be389bef09b8a93a5bb925871a95fd974eafcb (diff)
downloadmu-bb5cc54f9673ed0a6e5ef6f471e1ed7af1892c19.tar.gz
4732
Diffstat (limited to 'subx/051test.subx')
-rw-r--r--subx/051test.subx7
1 files changed, 3 insertions, 4 deletions
diff --git a/subx/051test.subx b/subx/051test.subx
index 273a5ec5..a9f854c0 100644
--- a/subx/051test.subx
+++ b/subx/051test.subx
@@ -44,17 +44,16 @@ check-ints-equal:  # (a : int, b : int, msg : (address array byte)) -> boolean
   eb/jump  $check-ints-equal:end/disp8
   # else:
 $check-ints-equal:else:
-  # copy third arg (msg) into ECX
-  8b/copy                         1/mod/*+disp8   4/rm32/sib    5/base/EBP  4/index/none  .           1/r32/ECX   0x10/disp8       .                # copy *(EBP+16) to ECX
-    # _write(2/stderr, ECX)
+    # _write(2/stderr, msg)
       # push args
+  8b/copy                         1/mod/*+disp8   4/rm32/sib    5/base/EBP  4/index/none  .           1/r32/ECX   0x10/disp8      .                 # copy *(EBP+16) to ECX
   51/push-ECX
   68/push  2/imm32/stderr
       # call
   e8/call  _write/disp32
       # discard args
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # print newline
+    # _write(2/stderr, Newline)
       # push args
   68/push  Newline/imm32
   68/push  2/imm32/stderr