1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-28 08:10:55 +10:00
collapseos/blk/382
Virgil Dupras 3171b03335 Allow list to stop spitting a line early
If a line has a char below 0x20, we consider the line ended, we
stop the EMIT loop for this line and spit our NL.

This makes LIST stop wasting rows in environments with a tight
screen.
2020-11-08 16:47:33 -05:00

10 lines
194 B
Plaintext

: LIST
BLK@
16 0 DO
I 1+ DUP 10 < IF SPC THEN . SPC
64 I * BLK( + DUP 64 + SWAP DO
I C@ DUP 0x1f > IF EMIT ELSE LEAVE THEN
LOOP
NL
LOOP ;