1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-23 22:10:19 +10:00
collapseos/blk/131
Virgil Dupras 9ab5cda397 ed: rename I to i
Shadowing core "I" is too messy. As soon as ed is loaded in memory,
nothing else that isn't "i-aware" can be loaded anymore.

I guess that's why "contexts" exist in Starting Forth, but adding
this concept just for allowing the shadowing of core words seems
overkill to me. Renaming I to i in ed seems better.
2020-06-23 07:08:21 -04:00

14 lines
391 B
Plaintext

: handle ( c -- f )
DUP '0' '9' =><= IF num 0 EXIT THEN
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
0 ACC ! UPPER 'Q' = ;
: bufp ( buf -- )
DUP 64 + SWAP DO I C@ 0x20 MAX EMIT LOOP ;
: bufs
1 aty ." I: " IBUF bufp
2 aty ." F: " FBUF bufp 0 3 gutter ;
: VE
clrscr 0 ACC ! 0 PREVPOS ! contents
BEGIN status bufs setpos KEY handle UNTIL
19 aty (infl) ;