2020-05-06 12:19:36 -04:00
|
|
|
: _ilen ( length of str in IBUF )
|
|
|
|
IBUF BEGIN C@+ EOL? UNTIL IBUF - 1- ;
|
2020-05-06 21:10:27 -04:00
|
|
|
: _I
|
|
|
|
IBUF _type EDPOS @ 64 MOD ( cno )
|
|
|
|
63 -^ _ilen ( rbuffsize ilen )
|
2020-05-06 12:19:36 -04:00
|
|
|
2DUP > IF
|
2020-05-06 21:10:27 -04:00
|
|
|
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 )
|
2020-05-06 12:19:36 -04:00
|
|
|
THEN
|
2020-05-06 21:10:27 -04:00
|
|
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen )
|
2020-05-06 17:41:49 -04:00
|
|
|
EDPOS +! EDPOS @ 64 / _pln
|
2020-05-06 12:19:36 -04:00
|
|
|
;
|