2020-05-13 09:28:32 -04:00
|
|
|
( handle backspace: go back one char in IN>, if possible, then
|
2020-05-15 20:51:09 -04:00
|
|
|
emit BS + SPC + BS )
|
2020-06-11 22:29:05 -04:00
|
|
|
: _bs
|
2020-05-13 09:28:32 -04:00
|
|
|
( already at IN( ? )
|
|
|
|
IN> @ IN( = IF EXIT THEN
|
|
|
|
IN> @ 1- IN> !
|
2020-05-15 20:51:09 -04:00
|
|
|
BS SPC BS
|
2020-05-13 09:28:32 -04:00
|
|
|
;
|
2020-06-11 22:29:05 -04:00
|
|
|
( del is same as backspace )
|
|
|
|
: BS? DUP 0x7f = SWAP 0x8 = OR ;
|
2020-05-13 09:28:32 -04:00
|
|
|
|
|
|
|
: KEY
|
|
|
|
85 RAM+ @ ( (key) override )
|
2020-05-22 13:48:30 -04:00
|
|
|
?DUP IF EXECUTE ELSE (key) THEN ;
|
2020-05-13 09:28:32 -04:00
|
|
|
( cont.: read one char into input buffer and returns whether we
|
|
|
|
should continue, that is, whether CR was not met. )
|