1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-25 17:18:06 +11:00
collapseos/blk/108
Virgil Dupras feb0411530 editor: simplify I with the use of MOVE-
Also, delay the shadowing of DO..LOOP's I for as long as possible.
2020-05-06 21:10:27 -04:00

16 lines
456 B
Plaintext

: _ilen ( length of str in IBUF )
IBUF BEGIN C@+ EOL? UNTIL IBUF - 1- ;
: _I
IBUF _type EDPOS @ 64 MOD ( cno )
63 -^ _ilen ( rbuffsize ilen )
2DUP > IF
SWAP OVER - ( ilen chars-to-move )
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
3 PICK MOVE- ( ctm ilen )
SWAP DROP ( ilen )
ELSE DROP ( ilen becomes rbuffsize )
THEN
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen )
EDPOS +! EDPOS @ 64 / _pln
;