mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 08:50:56 +11:00
ti84: HelloWorld!
In emulator of course...
This commit is contained in:
parent
b90efb0f7f
commit
ffdc58739a
4
blk/522
4
blk/522
@ -10,7 +10,7 @@
|
|||||||
LOOP ;
|
LOOP ;
|
||||||
: CPFNT3x5
|
: CPFNT3x5
|
||||||
0 , 0 , 0 C, ( space char )
|
0 , 0 , 0 C, ( space char )
|
||||||
530 BLK@ BLK( 21 _l 192 + 21 _l 192 + 21 _l ( 63 )
|
530 BLK@ BLK( 21 _l 320 + 21 _l 320 + 21 _l ( 63 )
|
||||||
531 BLK@ BLK( 21 _l 192 + 10 _l ( 94! )
|
531 BLK@ BLK( 21 _l 320 + 10 _l ( 94! )
|
||||||
;
|
;
|
||||||
|
|
||||||
|
7
blk/557
7
blk/557
@ -3,10 +3,9 @@
|
|||||||
: _data@ LCD_PORT_DATA PC@ LCDWAIT ;
|
: _data@ LCD_PORT_DATA PC@ LCDWAIT ;
|
||||||
: LCDOFF 0x02 ( CMD_DISABLE ) _cmd ;
|
: LCDOFF 0x02 ( CMD_DISABLE ) _cmd ;
|
||||||
: LCDON 0x03 ( CMD_ENABLE ) _cmd ;
|
: LCDON 0x03 ( CMD_ENABLE ) _cmd ;
|
||||||
: _col! ( col -- )
|
: _yinc 0x07 _cmd ; : _xinc 0x05 _cmd ;
|
||||||
0x20 ( CMD_COL ) + _cmd ;
|
: _col! ( col -- ) 0x20 ( CMD_COL ) + _cmd ;
|
||||||
: _row! ( row -- )
|
: _row! ( row -- ) 0x80 ( CMD_ROW ) + _cmd ;
|
||||||
0x80 ( CMD_ROW ) + _cmd ;
|
|
||||||
: LCD$
|
: LCD$
|
||||||
H@ TI_MEM ! FNTH 2 * 2+ ALLOT
|
H@ TI_MEM ! FNTH 2 * 2+ ALLOT
|
||||||
LCDON 0x01 ( 8-bit mode ) _cmd
|
LCDON 0x01 ( 8-bit mode ) _cmd
|
||||||
|
29
blk/558
29
blk/558
@ -1,16 +1,13 @@
|
|||||||
: _glyph> ( a -- )
|
: _clrrows ( n u -- Clears u rows starting at n )
|
||||||
LCD_CURY C@ _row! LCD_CURX C@ 8 /MOD _col! ( a coff )
|
SWAP _row!
|
||||||
0x05 ( XINC ) _cmd _data@ DROP SWAP
|
( u ) 0 DO
|
||||||
FNTH 0 DO ( coff a )
|
_yinc 0 _col!
|
||||||
C@+ 2 PICK 8 -^ LSHIFT
|
11 0 DO 0 _data! LOOP
|
||||||
_data@ 8 LSHIFT OR
|
_xinc 0 _data!
|
||||||
LCD_BUF I + 2DUP FNTH + C!
|
LOOP ;
|
||||||
SWAP 8 RSHIFT SWAP C!
|
: _clrln ( n ) FNTH 1+ _clrrows ;
|
||||||
LOOP 2DROP
|
: LCDCLR 0 64 _clrrows ;
|
||||||
LCD_CURY C@ _row!
|
( Changes the current line and go back to leftmost column )
|
||||||
FNTH 0 DO LCD_BUF I + C@ _data! LOOP
|
: _lf
|
||||||
LCD_CURY C@ _row! LCD_CURX C@ 8 / 1+ _col!
|
LCD_CURY C@ FNTH 1+ + DUP 63 > IF DROP 0 THEN
|
||||||
FNTH 0 DO LCD_BUF FNTH + I + C@ _data! LOOP
|
DUP _clrln LCD_CURY C! 0 LCD_CURX C! ;
|
||||||
LCD_CURX C@ FNTW + 1+
|
|
||||||
DUP [ 96 FNTW - LITN ] > IF DROP 0 THEN
|
|
||||||
LCD_CURX C! ;
|
|
||||||
|
16
blk/559
Normal file
16
blk/559
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
: _glyph> ( a -- )
|
||||||
|
LCD_CURY C@ _row! LCD_CURX C@ 8 /MOD _col! ( a coff )
|
||||||
|
_xinc _data@ DROP SWAP
|
||||||
|
FNTH 0 DO ( coff a )
|
||||||
|
C@+ 2 PICK 8 -^ LSHIFT
|
||||||
|
_data@ 8 LSHIFT OR
|
||||||
|
LCD_BUF I + 2DUP FNTH + C!
|
||||||
|
SWAP 8 RSHIFT SWAP C!
|
||||||
|
LOOP 2DROP
|
||||||
|
LCD_CURY C@ _row!
|
||||||
|
FNTH 0 DO LCD_BUF I + C@ _data! LOOP
|
||||||
|
LCD_CURY C@ _row! LCD_CURX C@ 8 / 1+ _col!
|
||||||
|
FNTH 0 DO LCD_BUF FNTH + I + C@ _data! LOOP
|
||||||
|
LCD_CURX C@ FNTW + 1+ DUP LCD_CURX C! ( x )
|
||||||
|
[ 96 FNTW - LITN ] > IF _lf THEN ;
|
||||||
|
|
4
blk/560
Normal file
4
blk/560
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
: (emit)
|
||||||
|
DUP 0xd = IF DROP _lf EXIT THEN
|
||||||
|
DUP 0x20 0x7e =><= NOT IF DROP EXIT THEN
|
||||||
|
0x20 - FNTH * ['] ~FNT + _glyph> ;
|
@ -19,7 +19,8 @@ CURRENT @ XCURRENT !
|
|||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
422 437 XPACKR ( core )
|
422 437 XPACKR ( core )
|
||||||
556 558 XPACKR ( ti )
|
556 560 XPACKR ( ti )
|
||||||
," 42 42 PC! LCD$ ' ~FNT 5 + _glyph> 43 43 PC! BYE "
|
438 446 XPACKR ( print fmt )
|
||||||
|
," : _ LCD$ LIT< Hello (print) LIT< World! (print) BYE ; _ "
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
Loading…
Reference in New Issue
Block a user