diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-02-18 21:48:19 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-02-18 21:48:19 -0800 |
commit | 8188bbbc9408322c18cdc2d1049126900abf793c (patch) | |
tree | 2141b32bc1b7df6106980e12f0edbacc7dcfd329 /subx/073next-token.subx | |
parent | 6607a30415e2bede27c43b57ce3c5cbc42278fa9 (diff) | |
download | mu-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/073next-token.subx')
-rw-r--r-- | subx/073next-token.subx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/subx/073next-token.subx b/subx/073next-token.subx index 41dd94f3..1d37ba70 100644 --- a/subx/073next-token.subx +++ b/subx/073next-token.subx @@ -3,13 +3,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 -# main: +#? Entry: # run a single test, while debugging #? e8/call test-next-token-from-slice/disp32 - 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/exit - cd/syscall 0x80/imm8 +#? # 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/exit +#? cd/syscall 0x80/imm8 # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on eof return an empty interval |