|
|
@@ -1,16 +1,16 @@ |
|
|
|
XCURRENT @ ( to PSP ) |
|
|
|
: : |
|
|
|
(entry) |
|
|
|
( We cannot use LITN as IMMEDIATE because of bootstrapping |
|
|
|
issues. Same thing for ",". |
|
|
|
32 == NUMBER 14 == compiledWord ) |
|
|
|
[ 32 H@ ! 2 ALLOT 14 H@ ! 2 ALLOT ] C, |
|
|
|
BEGIN |
|
|
|
WORD |
|
|
|
(find) |
|
|
|
( is word ) |
|
|
|
IF DUP IMMED? IF EXECUTE ELSE , THEN |
|
|
|
( maybe number ) |
|
|
|
ELSE (parse) LITN THEN |
|
|
|
AGAIN ; |
|
|
|
( from PSP ) ';' SWAP 4 - C! |
|
|
|
( handle backspace: go back one char in IN>, if possible, then |
|
|
|
emit SPC + BS ) |
|
|
|
: (inbs) |
|
|
|
( already at IN( ? ) |
|
|
|
IN> @ IN( = IF EXIT THEN |
|
|
|
IN> @ 1- IN> ! |
|
|
|
SPC BS |
|
|
|
; |
|
|
|
|
|
|
|
: KEY |
|
|
|
85 RAM+ @ ( (key) override ) |
|
|
|
DUP IF EXECUTE ELSE DROP (key) THEN ; |
|
|
|
|
|
|
|
|
|
|
|
( cont.: read one char into input buffer and returns whether we |
|
|
|
should continue, that is, whether CR was not met. ) |