1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 20:08:06 +11:00
collapseos/blk/108

16 lines
456 B
Plaintext
Raw Normal View History

: _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
;