1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 20:38:08 +11:00
collapseos/arch/z80/sms/blk/607
Virgil Dupras f09950a12a sms/vdp: clear rest of line on line feed
This allows us (in the following commit), to stop unvariably
spitting 64 chars by line in LIST. This way, short lines don't use
3 rows per line (the line number uses 3 chars, which brings us to
67 chars per line).

If we don't do that, we end up with the old contents of the line
being kept at the right of the printed line.
2020-11-08 16:43:37 -05:00

10 lines
335 B
Plaintext

: _cell! ( tilenum pos )
2 * 0x7800 OR _ctl ( tilenum ) _data 1 _zero ;
: _lf
XYPOS @ BEGIN ( pos )
0 ( blank ) SWAP TUCK _cell!
1+ DUP [ VDP_COLS LITN ] MOD NOT UNTIL
[ VDP_COLS VDP_ROWS * LITN ] MOD XYPOS ! ;
: _bs 0 ( blank ) XYPOS @ TUCK _cell! ( pos ) 1-
[ VDP_COLS VDP_ROWS * LITN ] MOD XYPOS ! ;