1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 16:08:06 +11:00

Make C<* into a switch word

Slightly larger binary, but clearer code and slightly faster.
This commit is contained in:
Virgil Dupras 2020-10-28 16:18:37 -04:00
parent 5e13dcedf3
commit 038c25957b
4 changed files with 5 additions and 6 deletions

View File

@ -1,8 +1,7 @@
: C<? 0x06 RAM+ @ ;
SYSVARS 0x0c + :** C<*
: C<
0x08 RAM+ @ ( 08 == C<* override )
?DUP NOT IF 0x0c RAM+ @ THEN ( 0c == C<* )
EXECUTE
;
0x08 RAM+ ( C<* override ) @
?DUP NOT IF C<* ELSE EXECUTE THEN ;
: , H@ ! H@ 2+ HERE ! ;
: C, H@ C! H@ 1+ HERE ! ;

View File

@ -5,6 +5,6 @@
the last typed 0x0a and one for the following NULL. )
IN) IN( - ALLOT
(infl)
['] RDLN< 0x0c RAM+ !
['] RDLN< ['] C<* **!
1 0x06 RAM+ ! ( 06 == C<? )
;

View File

@ -7,7 +7,7 @@
['] (key) ['] KEY **!
['] CRLF ['] NL **!
( 0c == C<* )
['] (boot<) 0x0c RAM+ !
['] (boot<) ['] C<* **!
['] C@ ['] A@ ! ['] C! ['] A! **!
( boot< always has a char waiting. 06 == C<?* )
1 0x06 RAM+ ! INTERPRET

Binary file not shown.