mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:58:06 +11:00
LIST: simplify logic
There wasn't much of a reason to leave a loop early on 0x0d or null. The idea was that once you have a CR or null, the rest is garbage and you shouldn't see it. However, it brought a problem: In VE, you couldn't insert characters past that limit. It would be written, but never displayed. So let's get rid of this logic and simply always display a 64x16 grid.
This commit is contained in:
parent
bc951a5ff1
commit
7cad9ffe40
2
blk/111
2
blk/111
@ -1,5 +1,5 @@
|
|||||||
: _blen ( buf -- length of str in buf )
|
: _blen ( buf -- length of str in buf )
|
||||||
DUP BEGIN C@+ EOL? UNTIL -^ 1- ;
|
DUP BEGIN C@+ 0x20 < UNTIL -^ 1- ;
|
||||||
: _rbufsz ( size of linebuf to the right of curpos )
|
: _rbufsz ( size of linebuf to the right of curpos )
|
||||||
EDPOS @ 64 MOD 63 -^ ;
|
EDPOS @ 64 MOD 63 -^ ;
|
||||||
: i COMPILE I ; IMMEDIATE ( save overshadowed )
|
: i COMPILE I ; IMMEDIATE ( save overshadowed )
|
||||||
|
3
blk/391
3
blk/391
@ -1,11 +1,10 @@
|
|||||||
: .2 DUP 10 < IF SPC THEN . ;
|
: .2 DUP 10 < IF SPC THEN . ;
|
||||||
: EOL? ( c -- f ) DUP 0xd = SWAP NOT OR ;
|
|
||||||
: LIST
|
: LIST
|
||||||
BLK@
|
BLK@
|
||||||
16 0 DO
|
16 0 DO
|
||||||
I 1+ .2 SPC
|
I 1+ .2 SPC
|
||||||
64 I * BLK( + DUP 64 + SWAP DO
|
64 I * BLK( + DUP 64 + SWAP DO
|
||||||
I C@ DUP EOL? IF DROP LEAVE ELSE EMIT THEN
|
I C@ 0x20 MAX EMIT
|
||||||
LOOP
|
LOOP
|
||||||
NL
|
NL
|
||||||
LOOP
|
LOOP
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user