ti84: we have a prompt

This commit is contained in:
Virgil Dupras 2020-05-09 14:28:55 -04:00
parent 4ce0727c72
commit e06d6c5345
5 changed files with 8 additions and 8 deletions

View File

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

View File

@ -2,8 +2,8 @@
require 64 subsequent polls to indicate all depressed keys.
all keys are considered depressed when the 0 group returns
0xff. )
: _wait 64 0 DO 0 _get 0xff = UNTIL ;
: _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
unsupported. no group 7 because it has no key. )
CREATE _dtbl

View File

@ -7,7 +7,7 @@
DUP 0xff = NOT UNTIL
( gid dmask )
0xff XOR ( dpos ) 0 ( dindex )
BEGIN 2DUP RSHIFT IF 1+ 1 ELSE 0 THEN UNTIL
BEGIN 1+ 2DUP RSHIFT NOT UNTIL 1-
( gid dpos dindex ) SWAP DROP
( gid dindex ) SWAP 8 * + _dtbl + C@
( gid dindex ) SWAP 8 * + _dtbl + C@ _wait
;

View File

@ -21,7 +21,7 @@
#define INTERRUPT_PORT 0x03
#define LCD_CMD_PORT 0x10
#define LCD_DATA_PORT 0x11
#define MAX_ROMSIZE 0x2000
#define MAX_ROMSIZE 0x4000
static xcb_connection_t *conn;
static xcb_screen_t *screen;

View File

@ -24,7 +24,7 @@ CURRENT @ XCURRENT !
PC ORG @ 8 + !
422 437 XPACKR ( core )
558 560 XPACKR ( LCD high )
438 446 XPACKR ( print fmt )
," : _ LCD$ LIT< Hello (print) (key) (emit) BYE ; _ "
438 459 XPACKR ( print fmt readln )
," : _ LCD$ (ok) RDLN$ ; _ "
ORG @ 256 /MOD 2 PC! 2 PC!
H@ 256 /MOD 2 PC! 2 PC!