mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:18:06 +11:00
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
|
||||
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.
|
||||
|
3
blk/102
3
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
|
||||
|
8
blk/438
8
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
|
||||
;
|
||||
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user