1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-07 14:48:46 +10:00
collapseos/blk/219
Virgil Dupras 1094ec9c57 Make DO..LOOP stable
DO and LOOP now only compile words from stable ABI, which make them
suitable for xcomp. This will greatly simplify driver writing and
allow us to mostly avoid the low/high divide in drivers.

LEAVE is still xcomp-incompatible though.

This make us very very tight for "<0x100" limit for literal words.
Hopefully, we won't need more stuff in that area of the binary...
2020-05-12 10:40:59 -04:00

15 lines
334 B
Plaintext

( also works for cc )
0xc0 OP1r RETcc,
( r -- )
: OP1r0
CREATE C,
DOES>
C@ ( r op )
OR A,
;
0x80 OP1r0 ADDr, 0x88 OP1r0 ADCr,
0xa0 OP1r0 ANDr, 0xb8 OP1r0 CPr,
0xb0 OP1r0 ORr, 0x90 OP1r0 SUBr,
0x98 OP1r0 SBCr, 0xa8 OP1r0 XORr,
: CP(IXY+), CPr, A, ;