1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-27 19:48:08 +11:00
collapseos/blk/627

16 lines
524 B
Plaintext
Raw Normal View History

2020-05-16 06:08:27 +10:00
: _cell! ( tilenum pos )
2 * 0x7800 OR _ctl ( tilenum ) _data 1 _zero ;
: _spc! 0 ( blank ) XYPOS @ _cell! ;
2020-05-16 06:08:27 +10:00
: _lf
_spc! XYPOS @ [ VDP_COLS LITN ] / 1+ [ VDP_ROWS LITN ] MOD
[ VDP_COLS LITN ] * XYPOS ! ;
: _bs _spc! XYPOS @ 1-
[ VDP_COLS VDP_ROWS * LITN ] MOD XYPOS ! ;
2020-05-16 02:14:27 +10:00
: (emit)
DUP 0x08 = IF DROP _bs EXIT THEN
2020-05-16 06:08:27 +10:00
DUP 0x0d = IF DROP _lf EXIT THEN
0x20 - DUP 0< IF DROP EXIT THEN
0x5e MIN ( tilenum ) XYPOS @ _cell!
2020-05-16 02:14:27 +10:00
XYPOS @ 1+ DUP [ VDP_COLS VDP_ROWS * LITN ]
= IF DROP 0 THEN XYPOS ! ;