2020-05-02 11:52:38 +10:00
|
|
|
: _type ( buf -- )
|
2020-05-07 02:19:36 +10:00
|
|
|
C< DUP 0xd = IF 2DROP EXIT THEN OVER DUP _zbuf ( c a )
|
2020-05-02 11:52:38 +10:00
|
|
|
BEGIN ( c a )
|
|
|
|
C!+ C< SWAP
|
|
|
|
OVER 0x0d = UNTIL ( c a ) C! ;
|
2020-05-02 03:17:40 +10:00
|
|
|
( user-facing lines are 1-based )
|
|
|
|
: T 1- DUP 64 * EDPOS ! _pln ;
|
2020-05-02 11:52:38 +10:00
|
|
|
: P IBUF _type IBUF EDPOS @ _cpos 64 MOVE BLK!! ;
|
2020-06-07 23:30:31 +10:00
|
|
|
: _mvln+ ( ln -- move ln 1 line down )
|
2020-04-17 21:51:59 +10:00
|
|
|
DUP 14 > IF DROP EXIT THEN
|
2020-06-07 23:30:31 +10:00
|
|
|
_lpos DUP 64 + 64 MOVE ;
|
|
|
|
: _mvln- ( ln -- move ln 1 line up )
|
|
|
|
DUP 14 > IF DROP 15 _lpos _zbuf
|
|
|
|
ELSE 1+ _lpos DUP 64 - 64 MOVE THEN ;
|