mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 04:18:07 +11:00
58ece9f9a1
Also, made LIST properly handle full 64-chars lines not ending with a null or CR. Previously, such a line would be accompanied by its following line, duplicating that line's output.
13 lines
368 B
Plaintext
13 lines
368 B
Plaintext
: _type ( buf -- )
|
|
C< DUP 0xd = IF 2DROP EXIT THEN OVER DUP _zbuf ( c a )
|
|
BEGIN ( c a )
|
|
C!+ C< SWAP
|
|
OVER 0x0d = UNTIL ( c a ) C! ;
|
|
( user-facing lines are 1-based )
|
|
: T 1- DUP 64 * EDPOS ! _pln ;
|
|
: P IBUF _type IBUF EDPOS @ _cpos 64 MOVE BLK!! ;
|
|
: _mvln+ ( ln -- move ln 1 line further )
|
|
DUP 14 > IF DROP EXIT THEN
|
|
_lpos DUP 64 + 64 MOVE
|
|
;
|