1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-26 18:38:06 +11:00
collapseos/blk/387

17 lines
439 B
Plaintext
Raw Normal View History

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