mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 15:30:55 +11:00
1094ec9c57
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...
12 lines
167 B
Plaintext
12 lines
167 B
Plaintext
: ROLL
|
|
DUP NOT IF EXIT THEN
|
|
1+ DUP PICK ( n val )
|
|
SWAP 2 * (roll) ( val )
|
|
SWAP DROP
|
|
;
|
|
|
|
: 2OVER 3 PICK 3 PICK ;
|
|
: 2SWAP 3 ROLL 3 ROLL ;
|
|
|
|
|