about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-09-21 15:28:11 -0700
committerKartik Agaram <vc@akkartik.com>2018-09-21 15:29:59 -0700
commit9c50655a26712727d2b9020373967470139b90d7 (patch)
treef8d2d5291883c013f9edbfe2cc4d7bb94ff07ffd /subx
parentd9818a5333805148586b7ac14c22f5dd413f593e (diff)
downloadmu-9c50655a26712727d2b9020373967470139b90d7.tar.gz
4576
Diffstat (limited to 'subx')
-rw-r--r--subx/apps/crenshaw2-1.subx12
-rw-r--r--subx/examples/ex3.subx4
-rw-r--r--subx/examples/ex8.subx6
3 files changed, 11 insertions, 11 deletions
diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx
index 484bfe0b..97ef55ec 100644
--- a/subx/apps/crenshaw2-1.subx
+++ b/subx/apps/crenshaw2-1.subx
@@ -23,7 +23,7 @@
     # push args
   68/push                         .               .             .           .             .           .           .               Error_integer/imm32
     # call
-  e8/call                         .               .             .           .             .           .           abort/disp32
+  e8/call  abort/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # exit(0)
@@ -38,7 +38,7 @@ abort:  # s : (address array byte) -> <void>
     # push args
   ff          6/subop/push        1/mod/*+disp8   4/rm32/sib    4/base/ESP  4/index/none  .           .           4/disp8         .                 # push *(ESP+4)
     # call
-  e8/call                         .               .             .           .             .           .           error/disp32
+  e8/call  error/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # exit(1)
@@ -52,28 +52,28 @@ error:  # s : (address array byte) -> <void>
     # push args
   68/push                         .               .             .           .             .           .           .               Error/imm32
     # call
-  e8/call                         .               .             .           .             .           .           write_stderr/disp32
+  e8/call  write_stderr/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # write_stderr(s)
     # push args
   ff          6/subop/push        1/mod/*+disp8   4/rm32/sib    4/base/ESP  4/index/none  .           .           4/disp8         .                 # push *(ESP+4)
     # call
-  e8/call                         .               .             .           .             .           .           write_stderr/disp32
+  e8/call  write_stderr/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # write_stderr(" expected")
     # push args
   68/push                         .               .             .           .             .           .           .               Expected_suffix/imm32
     # call
-  e8/call                         .               .             .           .             .           .           write_stderr/disp32
+  e8/call  write_stderr/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # write_stderr("\n")
     # push args
   68/push                         .               .             .           .             .           .           .               Newline/imm32
     # call
-  e8/call                         .               .             .           .             .           .           write_stderr/disp32
+  e8/call  write_stderr/disp32
     # discard arg
   81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add 4 to ESP
   # end
diff --git a/subx/examples/ex3.subx b/subx/examples/ex3.subx
index eb4d6c01..41a8900a 100644
--- a/subx/examples/ex3.subx
+++ b/subx/examples/ex3.subx
@@ -19,13 +19,13 @@
 $loop:
   # while (counter <= 10)
   81          7/subop/compare     3/mod/direct    1/rm32/ECX                                                                      0xa/imm32         # compare ECX, 10/imm
-  7f/jump-if                                                                                                      $exit/disp8                       # jump-if-greater $exit
+  7f/jump-if-greater  $exit/disp8
   # result += counter
   01/add                          3/mod/direct    3/rm32/EBX                                          1/r32/ECX                                     # add ECX to EBX
   # ++counter
   81          0/subop/add         3/mod/direct    1/rm32/ECX                                                                      1/imm32           # add 1 to ECX
   # loop
-  eb/jump                                                                                                         $loop/disp8                       # jump $loop
+  eb/jump  $loop/disp8
 
 $exit:
   # exit(EBX)
diff --git a/subx/examples/ex8.subx b/subx/examples/ex8.subx
index 1d9e9341..6ec8d4b0 100644
--- a/subx/examples/ex8.subx
+++ b/subx/examples/ex8.subx
@@ -27,7 +27,7 @@
     # push args
   53/push                         .               .             .           .             .           .           .               .                       # push EBX
     # call
-  e8/call                         .               .             .           .             .           .           ascii_length/disp32
+  e8/call  ascii_length/disp32
     # discard args
   5a/pop                          .               .             .           .             .           .           .               .                       # pop into EDX
     # clean up after call
@@ -49,13 +49,13 @@ $al_loop:
   8a/copy                         0/mod/*         2/rm32/EDX    .           .             .           1/r32/ECX   .               .                       # copy byte at *EDX to lower byte of ECX
   # if c == '\0' break
   81          7/subop/compare     3/mod/direct    1/rm32/ECX    .           .             .           .           .               0/imm32                 # compare ECX with 0
-  74/jump-if-zero                 .               .             .           .             .           .           .               $al_ret/disp8           # jump if equal
+  74/jump-if-equal  $al_ret/disp8
   # ++s
   81          0/subop/add         3/mod/direct    2/rm32/EDX    .           .             .           .           .               1/imm32                 # add 1 to EDX
   # ++result
   81          0/subop/add         3/mod/direct    0/rm32/EAX    .           .             .           .           .               1/imm32                 # add 1 to EAX
   # loop
-  eb/jump                         .               .             .           .             .           .           .               $al_loop/disp8          # jump $al_loop
+  eb/jump  $al_loop/disp8
 $al_ret:
   # return (result in EAX)
   c3/return