about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-14 12:53:50 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-14 12:53:50 -0700
commita9a5718d086d9df52b84b96a6ab4ee751dc26a5e (patch)
treeae28bcf9243aa220e529a1ffd8e7f67bd03041c8 /subx/apps
parent0e0a90420e2e0b3a86b2fcaad08938b2feba6274 (diff)
downloadmu-a9a5718d086d9df52b84b96a6ab4ee751dc26a5e.tar.gz
4698
Diffstat (limited to 'subx/apps')
-rw-r--r--subx/apps/crenshaw2-1.subx8
1 files changed, 4 insertions, 4 deletions
diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx
index d5bd2a01..7b4a8deb 100644
--- a/subx/apps/crenshaw2-1.subx
+++ b/subx/apps/crenshaw2-1.subx
@@ -26,7 +26,7 @@
   e8/call  abort/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-  # exit(0)
+  # syscall(exit, 0)
   bb/copy-to-EBX  0/imm32
   b8/copy-to-EAX  1/imm32/exit
   cd/syscall  0x80/imm8
@@ -43,7 +43,7 @@ abort:  # s : (address array byte) -> <void>
   e8/call  error/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-  # exit(1)
+  # syscall(exit, 1)
   bb/copy-to-EBX  1/imm32
   b8/copy-to-EAX  1/imm32/exit
   cd/syscall  0x80/imm8
@@ -90,7 +90,7 @@ write-stdout:  # s : (address array byte) -> <void>
   51/push-ECX
   52/push-EDX
   53/push-EBX
-  # write(1/stdout, (data) s+4, (size) *s)
+  # syscall(write, 1/stdout, (data) s+4, (size) *s)
     # fd = 1 (stdout)
   bb/copy-to-EBX  1/imm32
     # x = s+4
@@ -99,7 +99,7 @@ write-stdout:  # s : (address array byte) -> <void>
     # size = *s
   8b/copy                         1/mod/*+disp8   4/rm32/sib    5/base/EBP  4/index/none  .           2/r32/EDX   8/disp8         .                 # copy *(EBP+8) to EDX
   8b/copy                         0/mod/indirect  2/rm32/EDX    .           .             .           2/r32/EDX   .               .                 # copy *EDX to EDX
-    # call write()
+    # syscall
   b8/copy-to-EAX  4/imm32/write
   cd/syscall  0x80/imm8
   # restore registers