1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 12:38:05 +11:00
collapseos/blk/397
Virgil Dupras f2f520cacc Extract (br), (?br) and (loop)'s code out of stable ABI zone
There is now no more actual code in stable ABI, only references.
This makes refactoring of this code much easier. For example,
changing IY to BC as the IP register.
2020-07-05 14:57:18 -04:00

16 lines
600 B
Plaintext

( Now we have "as late as possible" stuff. See B70 and B260. )
: _bchk DUP 0x7f + 0xff > IF LIT< br-ovfl (print) ABORT THEN ;
: DO 0x33 ( 2>R ) , H@ ; IMMEDIATE
: LOOP 0x43 ( loop ) , H@ - _bchk , ; IMMEDIATE
( LEAVE is implemented in low xcomp )
: LITN 0x23 ( n ) , , ;
( gets its name at the very end. can't comment afterwards )
: _ BEGIN LIT< ) WORD S= UNTIL ; IMMEDIATE
: _ ( : will get its name almost at the very end )
(entry) 1 ( compiled ) C,
BEGIN
WORD FIND
IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
ELSE ( maybe number ) (parse) LITN THEN
AGAIN ;