From 7cad9ffe4086fd413346390df4e25174ad760076 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 10 Jun 2020 19:00:03 -0400 Subject: [PATCH] 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. --- blk/111 | 2 +- blk/391 | 3 +-- emul/forth.bin | Bin 6187 -> 6153 bytes 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blk/111 b/blk/111 index 851f3be..c7351f9 100644 --- a/blk/111 +++ b/blk/111 @@ -1,5 +1,5 @@ : _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 ) EDPOS @ 64 MOD 63 -^ ; : i COMPILE I ; IMMEDIATE ( save overshadowed ) diff --git a/blk/391 b/blk/391 index f34b504..7156520 100644 --- a/blk/391 +++ b/blk/391 @@ -1,11 +1,10 @@ : .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 + I C@ 0x20 MAX EMIT LOOP NL LOOP diff --git a/emul/forth.bin b/emul/forth.bin index eeb152e7b6b93e1a81e344f0965b8437653e4216..8b9a35ca1e34971617ba8d51705cfc21414626e4 100644 GIT binary patch delta 358 zcmZ2&&}qPVn3M6a8Y2V4m5rQ*!mK`?!6D+4rwbd(DKIE7{9-HPZ(#WJ{|Asf^WTZV z(=Ws|C?Lo+#Aosc;f10SA_@!~48E+*%-dNM7}&t93zL_L1ccj&I5GJ6JGul3FtGAn zWYJ~X$#9SPH{(BnAN)2V4Gdp^W`U)(Wf|D`9`a6LmS)yvg3%9vnjIaqBp8_a6d3G) zrh>TK3`~5|lYK>H7%e7eiOO(mioRf!Wxog1=r(zxs4(M&$xB6jRY5M|0lPzmVJ)+? zXfv}4!$M{YAdT!oaWPrO#>u8)0gQ5!+r&Z{3nt$Y)0UGH(`9OAc4Bb#33e4`XyH>~ z2xbuGQea?W*vx%TY_h7jgQ}dEFqacUs9%Vuj~GKMP(?aW#R66>W{5 z7&sVwS(}-+vnVjIfmxp>w}=GD#EAe6^>=g$5@2BEyU3!;w3Fc;^KZs~0zdfUCVvo7 zlwuNfVsLcOl3-xwQ(&+I>I8AQ8JPHNCu@t!Fh))G5S5Yl7Jb1e%YKhpnmI$Xf#KEv zE}&C2auYN2G}Rf{_&!Z;7WH)oxq%04vkJpnW?Ru_W)+5o%uzrZ$xXth!b%J*@x_(J zJ9(5CxSaEIauN%QQ~iTy^8espJXu&QfYD)cidZP)q{+L)wB;PcbeWo&ofuqwf?b6f zTKH5Lf*FLl6d0HoHghwGPi7W(P<0R!=5k^P^$YRz5o2ftsz?W_Siq{q43UTyVrT?9 TFhg9IasK3K;$}edthfyT1s!97