1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-13 10:38:06 +11:00
collapseos/arch/z80/ti84/blk/609
Virgil Dupras c7d8de25b2 ti84: use Grid subsystem
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.
2020-11-10 20:30:37 -05:00

17 lines
540 B
Plaintext

: _atrow! ( pos -- ) COLS / FNTH 1+ * _row! ;
: _tocol ( pos -- col off ) COLS MOD FNTW 1+ * 8 /MOD ;
: CELL! ( g pos -- )
DUP _atrow! DUP _tocol _col! ROT ( pos coff g )
FNTH * ~FNT + ( pos coff a )
_xinc _data@ DROP
FNTH 0 DO ( pos coff a )
C@+ 2 PICK 8 -^ LSHIFT
_data@ 8 LSHIFT OR
LCD_BUF I + 2DUP FNTH + C!
SWAP 8 RSHIFT SWAP C!
LOOP 2DROP
DUP _atrow!
FNTH 0 DO LCD_BUF I + C@ _data! LOOP
DUP _atrow! _tocol NIP 1+ _col!
FNTH 0 DO LCD_BUF FNTH + I + C@ _data! LOOP ;