1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 04:48:05 +11:00
collapseos/blk/402
Virgil Dupras b97e761942 Add Grid subsystem
The goal is to offload the SMS VDP driver a little bit.
2020-11-09 17:26:15 -05:00

11 lines
341 B
Plaintext

: XYPOS [ GRID_MEM LITN ] ;
: AT-XY ( x y -- ) [ ROWS LITN ] * +
[ COLS ROWS * LITN ] MOD XYPOS ! ;
: _lf
XYPOS @ BEGIN ( pos )
0 ( blank ) SWAP TUCK CELL!
1+ DUP [ COLS LITN ] MOD NOT UNTIL
[ COLS ROWS * LITN ] MOD XYPOS ! ;
: _bs 0 ( blank ) XYPOS @ TUCK CELL! ( pos ) 1-
[ COLS ROWS * LITN ] MOD XYPOS ! ;