mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 04:38:06 +11:00
Make C<* into a switch word
Slightly larger binary, but clearer code and slightly faster.
This commit is contained in:
parent
5e13dcedf3
commit
038c25957b
7
blk/364
7
blk/364
@ -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 ! ;
|
||||
|
2
blk/390
2
blk/390
@ -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<? )
|
||||
;
|
||||
|
2
blk/396
2
blk/396
@ -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
|
||||
|
BIN
cvm/forth.bin
BIN
cvm/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user