1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 12:38:05 +11:00

icore: simplify definition of ":" and ";"

This commit is contained in:
Virgil Dupras 2020-04-09 09:38:59 -04:00
parent 784b109652
commit 0c3067ed9a
2 changed files with 10 additions and 16 deletions

Binary file not shown.

View File

@ -201,12 +201,17 @@
: IMMED? 1 - C@ 0x80 AND ; : IMMED? 1 - C@ 0x80 AND ;
( : and ; have to be defined last because it can't be ( ';' can't have its name right away because, when created, it
executed now also, they can't have their real name is not an IMMEDIATE yet and will not be treated properly by
right away. xcomp. )
) : _
['] EXIT ,
R> DROP ( exit : )
; IMMEDIATE
: X ';' XCURRENT @ 4 - C!
: :
(entry) (entry)
( We cannot use LITN as IMMEDIATE because of bootstrapping ( We cannot use LITN as IMMEDIATE because of bootstrapping
issues. Same thing for ",". issues. Same thing for ",".
@ -222,16 +227,5 @@
AGAIN AGAIN
; ;
XCURRENT @ ( to PSP )
: Y
['] EXIT ,
R> DROP ( exit : )
; IMMEDIATE
( Give ":" and ";" their real name )
';' XCURRENT @ 4 - C!
':' SWAP ( from PSP ) 4 - C!
(xentry) _ (xentry) _
H@ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!