about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-09-01 23:57:29 -0700
committerKartik Agaram <vc@akkartik.com>2019-09-01 23:57:29 -0700
commit604c8315bd7251daa898dd646cb8595f3700ed21 (patch)
treecb8709650e2a4b5889de02cfd684d022cb10310e /apps
parent7a81a4505cb98e4e07e2201f3846c5a81a7785ec (diff)
downloadmu-604c8315bd7251daa898dd646cb8595f3700ed21.tar.gz
5607
Diffstat (limited to 'apps')
-rw-r--r--apps/assort.subx6
-rw-r--r--apps/crenshaw2-1.subx6
-rw-r--r--apps/crenshaw2-1b.subx6
-rw-r--r--apps/dquotes.subx6
-rw-r--r--apps/factorial.subx3
-rw-r--r--apps/hex.subx6
-rw-r--r--apps/pack.subx6
-rw-r--r--apps/sigils.subx4
-rw-r--r--apps/survey.subx4
-rw-r--r--apps/tests.subx4
10 files changed, 26 insertions, 25 deletions
diff --git a/apps/assort.subx b/apps/assort.subx
index f1d76df6..57ed1eb2 100644
--- a/apps/assort.subx
+++ b/apps/assort.subx
@@ -55,7 +55,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -66,7 +66,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return convert(Stdin, Stdout, Stderr, ed)
+    # convert(Stdin, Stdout, Stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  Stderr/imm32
@@ -76,7 +76,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/crenshaw2-1.subx b/apps/crenshaw2-1.subx
index e4e78e9c..5d1c9c0c 100644
--- a/apps/crenshaw2-1.subx
+++ b/apps/crenshaw2-1.subx
@@ -62,7 +62,7 @@ Entry:  # run tests if necessary, call 'compile' if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -73,7 +73,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return compile(Stdin, 1/stdout, 2/stderr, ed)
+    # compile(Stdin, 1/stdout, 2/stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  2/imm32/stderr
@@ -83,7 +83,7 @@ $run-main:
     e8/call  compile/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/crenshaw2-1b.subx b/apps/crenshaw2-1b.subx
index cbd18d46..908ca942 100644
--- a/apps/crenshaw2-1b.subx
+++ b/apps/crenshaw2-1b.subx
@@ -62,7 +62,7 @@ Entry:  # run tests if necessary, call 'compile' if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -73,7 +73,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return compile(Stdin, 1/stdout, 2/stderr, ed)
+    # compile(Stdin, 1/stdout, 2/stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  2/imm32/stderr
@@ -83,7 +83,7 @@ $run-main:
     e8/call  compile/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/dquotes.subx b/apps/dquotes.subx
index 95d3bc15..b22758de 100644
--- a/apps/dquotes.subx
+++ b/apps/dquotes.subx
@@ -51,7 +51,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -62,7 +62,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return convert(Stdin, 1/stdout, 2/stderr, ed)
+    # convert(Stdin, 1/stdout, 2/stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  Stderr/imm32
@@ -72,7 +72,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/factorial.subx b/apps/factorial.subx
index 1fb111d0..23cb8294 100644
--- a/apps/factorial.subx
+++ b/apps/factorial.subx
@@ -50,11 +50,12 @@ Entry:  # run tests if necessary, compute `factorial(5)` if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
     # - otherwise return factorial(5)
+    # eax = factorial(5)
     # . . push args
     68/push  5/imm32
     # . . call
diff --git a/apps/hex.subx b/apps/hex.subx
index a28d9461..57b112ab 100644
--- a/apps/hex.subx
+++ b/apps/hex.subx
@@ -49,7 +49,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -60,7 +60,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return convert(Stdin, 1/stdout, 2/stderr, ed)
+    # convert(Stdin, 1/stdout, 2/stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  Stderr/imm32
@@ -70,7 +70,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/pack.subx b/apps/pack.subx
index fe695c4f..36896669 100644
--- a/apps/pack.subx
+++ b/apps/pack.subx
@@ -50,7 +50,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -61,7 +61,7 @@ $run-main:
     # configure ed to really exit()
     # . ed->target = 0
     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
-    # return convert(Stdin, Stdout, Stderr, ed)
+    # convert(Stdin, Stdout, Stderr, ed)
     # . . push args
     50/push-eax/ed
     68/push  Stderr/imm32
@@ -71,7 +71,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/sigils.subx b/apps/sigils.subx
index 35ebf6cd..2e1daa4a 100644
--- a/apps/sigils.subx
+++ b/apps/sigils.subx
@@ -83,7 +83,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -96,7 +96,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/survey.subx b/apps/survey.subx
index e19befc2..2738da38 100644
--- a/apps/survey.subx
+++ b/apps/survey.subx
@@ -79,7 +79,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -100,7 +100,7 @@ $run-main:
 #?     e8/call  write-stream/disp32
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit
diff --git a/apps/tests.subx b/apps/tests.subx
index 8f825a3a..92447067 100644
--- a/apps/tests.subx
+++ b/apps/tests.subx
@@ -48,7 +48,7 @@ Entry:  # run tests if necessary, convert stdin if not
     74/jump-if-equal  $run-main/disp8
     # run-tests()
     e8/call  run-tests/disp32
-    # return *Num-test-failures
+    # syscall(exit, *Num-test-failures)
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/ebx   Num-test-failures/disp32          # copy *Num-test-failures to ebx
     eb/jump  $main:end/disp8
 $run-main:
@@ -61,7 +61,7 @@ $run-main:
     e8/call  convert/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
-    # . syscall(exit, 0)
+    # syscall(exit, 0)
     bb/copy-to-ebx  0/imm32
 $main:end:
     b8/copy-to-eax  1/imm32/exit