collapseos/blk/396
Virgil Dupras 038c25957b Make C<* into a switch word
Slightly larger binary, but clearer code and slightly faster.
2020-10-28 16:18:37 -04:00

17 lines
514 B
Plaintext

: (main) INTERPRET BYE ;
: BOOT
0x02 RAM+ CURRENT* !
CURRENT @ 0x2e RAM+ ! ( 2e == BOOT C< PTR )
0 0x08 RAM+ ! ( 08 == C<* override )
['] (emit) ['] EMIT **!
['] (key) ['] KEY **!
['] CRLF ['] NL **!
( 0c == C<* )
['] (boot<) ['] C<* **!
['] C@ ['] A@ ! ['] C! ['] A! **!
( boot< always has a char waiting. 06 == C<?* )
1 0x06 RAM+ ! INTERPRET
RDLN$ LIT" _sys" [entry]
LIT" Collapse OS" (print) NL (main) ;
XCURRENT @ _xapply ORG @ 0x04 ( stable ABI BOOT ) + !