mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 01:58:06 +11:00
838548843e
With cross compiling and IMMEDIATE words, things get icky with stable ABI references. For the same reason that EXIT, (br) and (br?) need to stay at stable offsets, these word references will not have BIN( properly applied at Inner core xcomp. The solution for now is to adjust during EXECUTE, which is ugly and inefficient, but I don't see a better solution right now.
16 lines
407 B
Plaintext
16 lines
407 B
Plaintext
L3 BSET PC ORG @ 0x34 + ! ( execute )
|
|
EXDEHL, ( HL now points to wordref )
|
|
( We don't apply BIN( reliably on stable ABI stuff, we
|
|
might need to adjust addr. Ugly, but well... )
|
|
BIN( @ [IF]
|
|
A XORr, H ORr, IFZ, H BIN( @ 256 / LDrn,
|
|
[THEN]
|
|
E (HL) LDrr,
|
|
D BIN( @ 256 / LDrn,
|
|
EXDEHL,
|
|
( HL points to code pointer )
|
|
DE INCss,
|
|
( DE points to PFA )
|
|
JP(HL),
|
|
|