2020-11-09 17:15:41 -05:00
|
|
|
: XYPOS [ GRID_MEM LITN ] ;
|
2020-11-10 19:06:39 -05:00
|
|
|
: _cl* COLS LINES * ;
|
|
|
|
: AT-XY ( x y -- ) LINES * + _cl* MOD XYPOS ! ;
|
2020-11-10 20:30:37 -05:00
|
|
|
'? NEWLN NIP NOT [IF]
|
|
|
|
: NEWLN ( ln -- ) COLS * DUP COLS + SWAP DO 0 I CELL! LOOP ;
|
2020-11-10 19:19:44 -05:00
|
|
|
[THEN]
|
2020-11-09 17:15:41 -05:00
|
|
|
: _lf
|
2020-11-10 20:30:37 -05:00
|
|
|
XYPOS @ COLS / 1+ LINES MOD DUP NEWLN
|
|
|
|
COLS * XYPOS ! ;
|
2020-11-09 17:15:41 -05:00
|
|
|
: _bs 0 ( blank ) XYPOS @ TUCK CELL! ( pos ) 1-
|
2020-11-10 19:06:39 -05:00
|
|
|
_cl* MOD XYPOS ! ;
|