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.
This commit is contained in:
parent
c681cb639d
commit
fa79e3d8a6
2
blk/060
2
blk/060
@ -4,7 +4,7 @@ I/O
|
|||||||
result in n as well as whether parsing was a
|
result in n as well as whether parsing was a
|
||||||
success in f (false = failure, true =
|
success in f (false = failure, true =
|
||||||
success)
|
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
|
. n -- Print n in its decimal form
|
||||||
.x n -- Print n's LSB in hex form. Always 2
|
.x n -- Print n's LSB in hex form. Always 2
|
||||||
characters.
|
characters.
|
||||||
|
3
blk/102
3
blk/102
@ -2,7 +2,8 @@
|
|||||||
1 5 LOADR+
|
1 5 LOADR+
|
||||||
|
|
||||||
: BROWSE
|
: BROWSE
|
||||||
L BEGIN
|
0 ACC ! L
|
||||||
|
BEGIN
|
||||||
KEY CASE
|
KEY CASE
|
||||||
'Q' OF EXIT ENDOF
|
'Q' OF EXIT ENDOF
|
||||||
'B' OF B ENDOF
|
'B' OF B ENDOF
|
||||||
|
8
blk/438
8
blk/438
@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
: (print)
|
: (print)
|
||||||
BEGIN
|
BEGIN
|
||||||
C@+ ( a+1 c )
|
C@+ ( a+1 c )
|
||||||
( exit if null )
|
( exit if null or 0xd )
|
||||||
DUP NOT IF 2DROP EXIT THEN
|
DUP 13 = OVER NOT OR IF 2DROP EXIT THEN
|
||||||
EMIT ( a )
|
EMIT ( a )
|
||||||
AGAIN
|
AGAIN
|
||||||
;
|
;
|
||||||
|
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user