mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 19:48:06 +11:00
ti84: enable alpha key
This commit is contained in:
parent
abafd6d67b
commit
244776a7eb
2
blk/564
2
blk/564
@ -1,6 +1,6 @@
|
|||||||
Keyboard driver
|
Keyboard driver
|
||||||
|
|
||||||
Low layer range: 566-569
|
Low layer range: 566-570
|
||||||
|
|
||||||
Implement a (key) word that interpret keystrokes from the
|
Implement a (key) word that interpret keystrokes from the
|
||||||
builtin keyboard. The word waits for a digit to be pressed and
|
builtin keyboard. The word waits for a digit to be pressed and
|
||||||
|
2
blk/567
2
blk/567
@ -4,7 +4,7 @@
|
|||||||
0xff. )
|
0xff. )
|
||||||
: _wait 64 BEGIN 0 _get 0xff = NOT IF DROP 64 THEN
|
: _wait 64 BEGIN 0 _get 0xff = NOT IF DROP 64 THEN
|
||||||
1- DUP NOT UNTIL DROP ;
|
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. )
|
unsupported. no group 7 because it has no key. )
|
||||||
CREATE _dtbl
|
CREATE _dtbl
|
||||||
0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,
|
0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,
|
||||||
|
10
blk/568
10
blk/568
@ -1,9 +1,9 @@
|
|||||||
( alpha table. same as _dtbl, for when we're in alpha mode. )
|
( alpha table. same as _dtbl, for when we're in alpha mode. )
|
||||||
CREATE _atbl
|
CREATE _atbl
|
||||||
0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,
|
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,
|
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, 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,
|
':' 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,
|
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, '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,
|
0 C, 0 C, 0 C, 0 C, 0 C, 0x81 ( 2nd ) C, 0 C, 0x7f C,
|
||||||
|
5
blk/569
5
blk/569
@ -1,4 +1,4 @@
|
|||||||
: _
|
: _gti ( -- tindex, that it, index in _dtbl or _atbl )
|
||||||
0 ( gid ) 0 ( dummy )
|
0 ( gid ) 0 ( dummy )
|
||||||
BEGIN ( loop until a digit is pressed )
|
BEGIN ( loop until a digit is pressed )
|
||||||
DROP
|
DROP
|
||||||
@ -9,5 +9,4 @@
|
|||||||
0xff XOR ( dpos ) 0 ( dindex )
|
0xff XOR ( dpos ) 0 ( dindex )
|
||||||
BEGIN 1+ 2DUP RSHIFT NOT UNTIL 1-
|
BEGIN 1+ 2DUP RSHIFT NOT UNTIL 1-
|
||||||
( gid dpos dindex ) SWAP DROP
|
( gid dpos dindex ) SWAP DROP
|
||||||
( gid dindex ) SWAP 8 * + _dtbl + C@ _wait ;
|
( gid dindex ) SWAP 8 * + ;
|
||||||
: (key) 0 ( dummy ) BEGIN DROP _ DUP UNTIL ;
|
|
||||||
|
6
blk/570
Normal file
6
blk/570
Normal 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 ;
|
@ -16,7 +16,7 @@ CURRENT @ XCURRENT !
|
|||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore low )
|
||||||
555 557 LOADR ( LCD low )
|
555 557 LOADR ( LCD low )
|
||||||
566 569 LOADR ( KBD low )
|
566 570 LOADR ( KBD low )
|
||||||
415 LOAD ( icore high )
|
415 LOAD ( icore high )
|
||||||
(entry) ~FNT CPFNT3x5
|
(entry) ~FNT CPFNT3x5
|
||||||
(entry) _
|
(entry) _
|
||||||
|
Loading…
Reference in New Issue
Block a user