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