mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 02:48:05 +11:00
9ab5cda397
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.
13 lines
383 B
Plaintext
13 lines
383 B
Plaintext
: $g ACC @ selblk ;
|
|
: $[ BLK> @ acc@ - selblk ;
|
|
: $] BLK> @ acc@ + selblk ;
|
|
: $t PREVBLK @ selblk ;
|
|
: $I mode! 'I' EMIT IBUF 1 buftype _i contents mode! SPC ;
|
|
: $F mode! 'F' EMIT FBUF 2 buftype _F setpos mode! SPC ;
|
|
: $Y Y ;
|
|
: $E E contents ;
|
|
: $X acc@ X contents ;
|
|
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
|
: $H EDPOS @ 0x3c0 AND pos! ;
|
|
: $L EDPOS @ 0x3f OR pos! ;
|