mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-15 19:48:05 +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.
17 lines
540 B
Plaintext
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 ;
|