mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-08 20:28:05 +11:00
2d54c3243d
Instead of clearing the rest of the line on a _lf, it's simpler to just clear any new line we're entering into.
12 lines
327 B
Plaintext
12 lines
327 B
Plaintext
: XYPOS [ GRID_MEM LITN ] ;
|
|
: _cl* COLS LINES * ;
|
|
: AT-XY ( x y -- ) LINES * + _cl* MOD XYPOS ! ;
|
|
'? CLRLN NIP NOT [IF]
|
|
: CLRLN ( ln -- ) COLS * DUP COLS + SWAP DO 0 I CELL! LOOP ;
|
|
[THEN]
|
|
: _lf
|
|
XYPOS @ COLS / 1+ DUP CLRLN
|
|
COLS * _cl* MOD XYPOS ! ;
|
|
: _bs 0 ( blank ) XYPOS @ TUCK CELL! ( pos ) 1-
|
|
_cl* MOD XYPOS ! ;
|