Add word ,"
This commit is contained in:
parent
4b7247a971
commit
0e3cf7fa02
4
blk/061
4
blk/061
@ -1,3 +1,4 @@
|
||||
," xxx" -- Write xxx to HERE
|
||||
." xxx" -- *I* Compiles string literal xxx followed by a
|
||||
call to (print).
|
||||
C<? -- f Returns whether there's a char waiting in buf.
|
||||
@ -11,6 +12,5 @@ IN> -- a Address of variable containing current pos in
|
||||
KEY -- c Get char c from direct input
|
||||
PC! c a -- Spit c to port a
|
||||
PC@ a -- c Fetch c from port a
|
||||
WORD -- a Read one word from buffered input and push its
|
||||
addr.
|
||||
|
||||
(cont.)
|
||||
|
4
blk/062
4
blk/062
@ -1,4 +1,5 @@
|
||||
(cont.)
|
||||
WORD -- a Read one word from buffered input and push its
|
||||
addr.
|
||||
There are also ascii const emitters:
|
||||
BS
|
||||
CR
|
||||
@ -13,4 +14,3 @@ SPC
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
blk/443
11
blk/443
@ -1,11 +1,12 @@
|
||||
: ."
|
||||
34 , ( 34 == litWord )
|
||||
: ,"
|
||||
BEGIN
|
||||
C<
|
||||
( 34 is ASCII for " )
|
||||
DUP 34 = IF DROP 0 THEN
|
||||
DUP C,
|
||||
NOT UNTIL
|
||||
DUP 34 = IF DROP EXIT THEN C,
|
||||
AGAIN ;
|
||||
|
||||
: ."
|
||||
34 , ( 34 == litWord ) ," 0 C,
|
||||
COMPILE (print)
|
||||
; IMMEDIATE
|
||||
|
||||
|
@ -12,14 +12,15 @@
|
||||
AGAIN
|
||||
;
|
||||
|
||||
: ."
|
||||
34 , ( 34 == litWord )
|
||||
: ,"
|
||||
BEGIN
|
||||
C<
|
||||
( 34 is ASCII for " )
|
||||
DUP 34 = IF DROP 0 THEN
|
||||
DUP C,
|
||||
NOT UNTIL
|
||||
DUP 34 = IF DROP EXIT THEN C,
|
||||
AGAIN ;
|
||||
|
||||
: ."
|
||||
34 , ( 34 == litWord ) ," 0 C,
|
||||
COMPILE (print)
|
||||
; IMMEDIATE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user