From fa79e3d8a64c728b15a2f61232a9177ba9c3e707 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 5 May 2020 15:49:50 -0400 Subject: [PATCH] Make (print) stop on CR Lines edited with the Block editor end with 0xd and (print) spits spurious CR when printing those lines. Also, properly initialize ACC in BROWSE. --- blk/060 | 2 +- blk/102 | 3 ++- blk/438 | 8 ++++---- emul/forth.bin | Bin 5729 -> 5739 bytes 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/blk/060 b/blk/060 index 25b341f..2fa1807 100644 --- a/blk/060 +++ b/blk/060 @@ -4,7 +4,7 @@ I/O result in n as well as whether parsing was a success in f (false = failure, true = success) -(print) a -- Print string at addr a. +(print) a -- Print string at addr a. Stops at 0x0 or 0xd. . n -- Print n in its decimal form .x n -- Print n's LSB in hex form. Always 2 characters. diff --git a/blk/102 b/blk/102 index fabf2da..210a603 100644 --- a/blk/102 +++ b/blk/102 @@ -2,7 +2,8 @@ 1 5 LOADR+ : BROWSE - L BEGIN + 0 ACC ! L + BEGIN KEY CASE 'Q' OF EXIT ENDOF 'B' OF B ENDOF diff --git a/blk/438 b/blk/438 index 0da95a7..1fe79e5 100644 --- a/blk/438 +++ b/blk/438 @@ -4,10 +4,10 @@ : (print) BEGIN - C@+ ( a+1 c ) - ( exit if null ) - DUP NOT IF 2DROP EXIT THEN - EMIT ( a ) + C@+ ( a+1 c ) + ( exit if null or 0xd ) + DUP 13 = OVER NOT OR IF 2DROP EXIT THEN + EMIT ( a ) AGAIN ; diff --git a/emul/forth.bin b/emul/forth.bin index c93de2618fd372b6cfc1bdb2b237099b105cc5f6..c928a49a17d46b2807d5dafa0738db5fc96fc286 100644 GIT binary patch delta 901 zcmXw%Ur19?9LIm>-aFH|-E;5mowlNO)gfE12}TK$rngI^O(&ZUN2HLTgfWeTKnO*o zUZRF4Sng#|4+F>O55}OE9(*!<@I`tsiXbS8ULpd6xc!cs59b`dzdxVz`~A-O9R3lm z+gyXqHvlm6vTj@U8{mdP#}-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