ti84: add Z offset mechanism

This commit is contained in:
Virgil Dupras 2020-05-08 13:24:55 -04:00
parent afc2327770
commit b2d71cb1ee
2 changed files with 6 additions and 3 deletions

View File

@ -4,9 +4,11 @@
: LCDOFF 0x02 ( CMD_DISABLE ) _cmd ;
: LCDON 0x03 ( CMD_ENABLE ) _cmd ;
: _yinc 0x07 _cmd ; : _xinc 0x05 _cmd ;
: _col! ( col -- ) 0x20 ( CMD_COL ) + _cmd ;
: _row! ( row -- ) 0x80 ( CMD_ROW ) + _cmd ;
: _zoff! ( off -- ) 0x40 + _cmd ;
: _col! ( col -- ) 0x20 + _cmd ;
: _row! ( row -- ) 0x80 + _cmd ;
: LCD$
H@ TI_MEM ! FNTH 2 * 2+ ALLOT
LCDON 0x01 ( 8-bit mode ) _cmd
FNTH 1+ _zoff!
;

View File

@ -10,4 +10,5 @@
( Changes the current line and go back to leftmost column )
: _lf
LCD_CURY C@ FNTH 1+ + DUP 63 > IF DROP 0 THEN
DUP _clrln LCD_CURY C! 0 LCD_CURX C! ;
DUP _clrln DUP FNTH 1+ _zoff!
LCD_CURY C! 0 LCD_CURX C! ;