mirror of https://github.com/hsoft/collapseos.git
12 lines
328 B
Plaintext
12 lines
328 B
Plaintext
: 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 ! ;
|