about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-03 10:15:24 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-03 11:41:33 -0800
commit1eb9cc5679ed70dd2e4eceab8f3a547c8560aeba (patch)
tree1a1d33ef05f194b4ebfcceb343a877071fd56d8a /subx
parent0eb0f69616bb928359aed5ec137c973b14b03788 (diff)
downloadmu-1eb9cc5679ed70dd2e4eceab8f3a547c8560aeba.tar.gz
4822
Fix CI.

It's kind of a hassle (and wasteful) that I need to redefine 'main' in
every single layer.
Diffstat (limited to 'subx')
-rw-r--r--subx/061error.subx7
-rwxr-xr-xsubx/apps/crenshaw2-1bin6462 -> 6480 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin7023 -> 7041 bytes
-rwxr-xr-xsubx/apps/factorialbin5353 -> 5371 bytes
4 files changed, 7 insertions, 0 deletions
diff --git a/subx/061error.subx b/subx/061error.subx
index b03cfde2..0868f854 100644
--- a/subx/061error.subx
+++ b/subx/061error.subx
@@ -5,6 +5,13 @@
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
 
+# main:
+    e8/call  run-tests/disp32  # 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.
+    # 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
+    b8/copy-to-EAX  1/imm32
+    cd/syscall  0x80/imm8
+
 # write(out, "Error: "+msg+"\n") then stop(ed, 1)
 error:  # ed : (address exit-descriptor), out : fd or (address stream), msg : (address array byte) -> <void>
     # . prolog
diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index a02751f0..47762af7 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 2c7d0d0d..620c1bad 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 5fb3daf7..d3a50805 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differ