mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-16 19:28:06 +11:00
c7d8de25b2
Also, rename CLRLN to NEWLN and make it clear that it's only called on entering a new line. This way, we can set Z offset in there for the TI-84+ LCD driver.
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 ! ;
|