collapseos/blk/387

17 lines
382 B
Plaintext
Raw Permalink Normal View History

( handle backspace: go back one char in IN>, if possible, then
emit BS + SPC + BS )
: (inbs)
( already at IN( ? )
IN> @ IN( = IF EXIT THEN
IN> @ 1- IN> !
BS SPC BS
;
: KEY
85 RAM+ @ ( (key) override )
2020-05-22 13:48:30 -04: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. )