mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 07:28: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.
14 lines
250 B
Plaintext
14 lines
250 B
Plaintext
: .2 DUP 10 < IF SPC THEN . ;
|
|
: EOL? ( c -- f ) DUP 0xd = SWAP NOT OR ;
|
|
: LIST
|
|
BLK@
|
|
16 0 DO
|
|
I 1+ .2 SPC
|
|
64 I * BLK( + DUP 64 + SWAP DO
|
|
I C@ DUP EOL? IF DROP LEAVE ELSE EMIT THEN
|
|
LOOP
|
|
NL
|
|
LOOP
|
|
;
|
|
|