mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 16:28:05 +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+ @ ;
|
: C<? 0x06 RAM+ @ ;
|
||||||
|
SYSVARS 0x0c + :** C<*
|
||||||
: C<
|
: C<
|
||||||
0x08 RAM+ @ ( 08 == C<* override )
|
0x08 RAM+ ( C<* override ) @
|
||||||
?DUP NOT IF 0x0c RAM+ @ THEN ( 0c == C<* )
|
?DUP NOT IF C<* ELSE EXECUTE THEN ;
|
||||||
EXECUTE
|
|
||||||
;
|
|
||||||
: , H@ ! H@ 2+ HERE ! ;
|
: , H@ ! H@ 2+ HERE ! ;
|
||||||
: C, H@ C! H@ 1+ 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. )
|
the last typed 0x0a and one for the following NULL. )
|
||||||
IN) IN( - ALLOT
|
IN) IN( - ALLOT
|
||||||
(infl)
|
(infl)
|
||||||
['] RDLN< 0x0c RAM+ !
|
['] RDLN< ['] C<* **!
|
||||||
1 0x06 RAM+ ! ( 06 == C<? )
|
1 0x06 RAM+ ! ( 06 == C<? )
|
||||||
;
|
;
|
||||||
|
2
blk/396
2
blk/396
@ -7,7 +7,7 @@
|
|||||||
['] (key) ['] KEY **!
|
['] (key) ['] KEY **!
|
||||||
['] CRLF ['] NL **!
|
['] CRLF ['] NL **!
|
||||||
( 0c == C<* )
|
( 0c == C<* )
|
||||||
['] (boot<) 0x0c RAM+ !
|
['] (boot<) ['] C<* **!
|
||||||
['] C@ ['] A@ ! ['] C! ['] A! **!
|
['] C@ ['] A@ ! ['] C! ['] A! **!
|
||||||
( boot< always has a char waiting. 06 == C<?* )
|
( boot< always has a char waiting. 06 == C<?* )
|
||||||
1 0x06 RAM+ ! INTERPRET
|
1 0x06 RAM+ ! INTERPRET
|
||||||
|
BIN
cvm/forth.bin
BIN
cvm/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user