1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 08:58:06 +11:00

ti84: enable alpha key

This commit is contained in:
Virgil Dupras 2020-05-09 20:54:47 -04:00
parent abafd6d67b
commit 244776a7eb
6 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,6 @@
Keyboard driver
Low layer range: 566-569
Low layer range: 566-570
Implement a (key) word that interpret keystrokes from the
builtin keyboard. The word waits for a digit to be pressed and

View File

@ -4,7 +4,7 @@
0xff. )
: _wait 64 BEGIN 0 _get 0xff = NOT IF DROP 64 THEN
1- DUP NOT UNTIL DROP ;
( digits table. seach row represents a group. 0 means
( digits table. each row represents a group. 0 means
unsupported. no group 7 because it has no key. )
CREATE _dtbl
0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,

10
blk/568
View File

@ -1,9 +1,9 @@
( alpha table. same as _dtbl, for when we're in alpha mode. )
CREATE _atbl
0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,
0xd C, '"' C, 'w' C, 'r' C, 'm' C, 'h' C, 0 C, 0 C,
'?' C, 0 C, 'v' C, 'q' C, 'l' C, 'g' C, 0 C, 0 C,
':' C, 'z' C, 'u' C, 'p' C, 'k' C, 'f' C, 'c' C, 0 C,
0x20 C, 'y' C, 't' C, 'o' C, 'j' C, 'e' C, 'b' C, 0 C,
0 C, 'x' C, 's' C, 'n' C, 'i' C, 'd' C, 'a' C, 0x80 C,
0xd C, '"' C, 'W' C, 'R' C, 'M' C, 'H' C, 0 C, 0 C,
'?' C, 0 C, 'V' C, 'Q' C, 'L' C, 'G' C, 0 C, 0 C,
':' C, 'Z' C, 'U' C, 'P' C, 'K' C, 'F' C, 'C' C, 0 C,
0x20 C, 'Y' C, 'T' C, 'O' C, 'J' C, 'E' C, 'B' C, 0 C,
0 C, 'X' C, 'S' C, 'N' C, 'I' C, 'D' C, 'A' C, 0x80 C,
0 C, 0 C, 0 C, 0 C, 0 C, 0x81 ( 2nd ) C, 0 C, 0x7f C,

View File

@ -1,4 +1,4 @@
: _
: _gti ( -- tindex, that it, index in _dtbl or _atbl )
0 ( gid ) 0 ( dummy )
BEGIN ( loop until a digit is pressed )
DROP
@ -9,5 +9,4 @@
0xff XOR ( dpos ) 0 ( dindex )
BEGIN 1+ 2DUP RSHIFT NOT UNTIL 1-
( gid dpos dindex ) SWAP DROP
( gid dindex ) SWAP 8 * + _dtbl + C@ _wait ;
: (key) 0 ( dummy ) BEGIN DROP _ DUP UNTIL ;
( gid dindex ) SWAP 8 * + ;

6
blk/570 Normal file
View File

@ -0,0 +1,6 @@
: (key)
_dtbl 0 ( dummy ) BEGIN ( tbl 0 )
DROP DUP ( tbl ) _gti + C@
DUP 0x80 = IF ( alpha ) 2DROP _atbl 0 THEN
DUP UNTIL ( tbl c -- loop if null ) SWAP DROP
_wait ;

View File

@ -16,7 +16,7 @@ CURRENT @ XCURRENT !
282 LOAD ( boot.z80 )
393 LOAD ( icore low )
555 557 LOADR ( LCD low )
566 569 LOADR ( KBD low )
566 570 LOADR ( KBD low )
415 LOAD ( icore high )
(entry) ~FNT CPFNT3x5
(entry) _