mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 04:18:07 +11:00
705d68deec
With KEY and EMIT being switch words, most of the high layer can be defined before drivers. In addition to this change, I've compacted core blocks which were becoming quite sparse.
14 lines
384 B
Plaintext
14 lines
384 B
Plaintext
( 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 ;
|
|
SYSVARS 0x55 + :** KEY
|
|
( cont.: read one char into input buffer and returns whether we
|
|
should continue, that is, whether CR was not met. )
|