1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 03:08:06 +11:00
collapseos/blk/402

12 lines
328 B
Plaintext
Raw Normal View History

: XYPOS [ GRID_MEM LITN ] ;
: _cl* COLS LINES * ;
: AT-XY ( x y -- ) LINES * + _cl* MOD XYPOS ! ;
'? NEWLN NIP NOT [IF]
: NEWLN ( ln -- ) COLS * DUP COLS + SWAP DO 0 I CELL! LOOP ;
[THEN]
: _lf
XYPOS @ COLS / 1+ LINES MOD DUP NEWLN
COLS * XYPOS ! ;
: _bs 0 ( blank ) XYPOS @ TUCK CELL! ( pos ) 1-
_cl* MOD XYPOS ! ;