collapseos/cvm/forth.fs
Virgil Dupras 80d1b59050 Add words |M and |L
Splitting a word into MSB/LSB pairs happens often and is worth, I
think, native words. Also, I'm going to need it in the upcoming
commits.
2020-12-07 20:11:49 -05:00

16 lines
355 B
Forth

: COLS 80 ; : LINES 32 ;
: CURSOR! ( new old -- )
DROP COLS /MOD 6 PC! ( y ) 5 PC! ( x ) ;
: CELL! ( c pos -- ) 0 CURSOR! 0 PC! ;
SYSVARS 0x70 + CONSTANT GRID_MEM
402 403 LOADR ( Grid )
390 LOAD ( xcomp core high )
(entry) _
( Update LATEST )
PC ORG @ 8 + !
," BLK$ ' EFS@ BLK@* ! ' EFS! BLK!* ! GRID$ " EOT,
ORG @ |M 2 PC! 2 PC!
H@ |M 2 PC! 2 PC!