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

16 lines
573 B
Plaintext
Raw Normal View History

2020-05-07 22:44:17 +10:00
: _blen ( buf -- length of str in buf )
DUP BEGIN C@+ EOL? UNTIL -^ 1- ;
: _rbufsz ( size of linebuf to the right of curpos )
EDPOS @ 64 MOD 63 -^ ;
: i COMPILE I ; IMMEDIATE ( save overshadowed )
2020-06-06 03:54:45 +10:00
: _I ( I without _pln. used in VE )
2020-05-07 22:44:17 +10:00
IBUF _type _rbufsz IBUF _blen 2DUP > IF
2020-05-23 04:17:38 +10:00
TUCK - ( ilen chars-to-move )
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
3 PICK MOVE- ( ctm ilen )
2020-05-23 04:03:12 +10:00
NIP ( ilen )
ELSE DROP ( ilen becomes rbuffsize )
THEN
2020-06-06 03:54:45 +10:00
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
: I _I EDPOS @ 64 / _pln ;