about summary refs log tree commit diff stats
path: root/subx/apps/crenshaw2-1.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-02-18 21:48:19 -0800
committerKartik Agaram <vc@akkartik.com>2019-02-18 21:48:19 -0800
commit8188bbbc9408322c18cdc2d1049126900abf793c (patch)
tree2141b32bc1b7df6106980e12f0edbacc7dcfd329 /subx/apps/crenshaw2-1.subx
parent6607a30415e2bede27c43b57ce3c5cbc42278fa9 (diff)
downloadmu-8188bbbc9408322c18cdc2d1049126900abf793c.tar.gz
4981 - no, go back to 3 phases
Considering how much trouble a merge phase would be (commit 4978), it seems
simpler to just add the extra syntax for controlling the entry point of
the generated ELF binary.

But I wouldn't have noticed this if I hadn't taken the time to write out
the commit messages of 4976 and 4978.

Even if we happened to already have linked list primitives built, this
may still be a good idea considering that I'm saving quite a lot of code
in duplicated entrypoints.
Diffstat (limited to 'subx/apps/crenshaw2-1.subx')
-rw-r--r--subx/apps/crenshaw2-1.subx3
1 files changed, 2 insertions, 1 deletions
diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx
index ad8dad46..8acdde59 100644
--- a/subx/apps/crenshaw2-1.subx
+++ b/subx/apps/crenshaw2-1.subx
@@ -30,11 +30,12 @@
 # . 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
 
+Entry:  # run tests if necessary, call 'compile' if not
+
 #?     # for debugging: run a single test; don't bother setting status code
 #?     e8/call test-get-num-reads-single-digit/disp32
 #?     eb/jump  $main:end/disp8
 
-# main: run tests if necessary, call 'compile' if not
     # . prolog
     89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
     # - if argc > 1 and argv[1] == "test", then return run_tests()