mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 23:08:06 +11:00
94cb76520a
Previously, it was impossible to cross-compile Collapse OS from a binary-offsetted Collapse OS because stable ABI wordrefs would have a wrongly offsetted address. This solves the problem by replacing those wordrefs by direct, hardcoded stable ABI offset references.
16 lines
600 B
Plaintext
16 lines
600 B
Plaintext
( Now we have "as late as possible" stuff. See B70 and B270. )
|
|
: _bchk DUP 0x7f + 0xff > IF LIT< br-ovfl (print) ABORT THEN ;
|
|
: DO 0xa9 ( 2>R ) , H@ ; IMMEDIATE
|
|
: LOOP 0x80 ( loop ) , H@ - _bchk , ; IMMEDIATE
|
|
( LEAVE is implemented in low xcomp )
|
|
: LITN 0xbf ( 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 ;
|