mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 08:40:54 +11:00
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
|
." xxx" -- *I* Compiles string literal xxx followed by a
|
||||||
call to (print).
|
call to (print).
|
||||||
C<? -- f Returns whether there's a char waiting in buf.
|
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
|
KEY -- c Get char c from direct input
|
||||||
PC! c a -- Spit c to port a
|
PC! c a -- Spit c to port a
|
||||||
PC@ a -- c Fetch c from port a
|
PC@ a -- c Fetch c from port a
|
||||||
WORD -- a Read one word from buffered input and push its
|
|
||||||
addr.
|
|
||||||
(cont.)
|
(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:
|
There are also ascii const emitters:
|
||||||
BS
|
BS
|
||||||
CR
|
CR
|
||||||
@ -13,4 +14,3 @@ SPC
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
blk/443
11
blk/443
@ -1,11 +1,12 @@
|
|||||||
: ."
|
: ,"
|
||||||
34 , ( 34 == litWord )
|
|
||||||
BEGIN
|
BEGIN
|
||||||
C<
|
C<
|
||||||
( 34 is ASCII for " )
|
( 34 is ASCII for " )
|
||||||
DUP 34 = IF DROP 0 THEN
|
DUP 34 = IF DROP EXIT THEN C,
|
||||||
DUP C,
|
AGAIN ;
|
||||||
NOT UNTIL
|
|
||||||
|
: ."
|
||||||
|
34 , ( 34 == litWord ) ," 0 C,
|
||||||
COMPILE (print)
|
COMPILE (print)
|
||||||
; IMMEDIATE
|
; IMMEDIATE
|
||||||
|
|
||||||
|
@ -12,14 +12,15 @@
|
|||||||
AGAIN
|
AGAIN
|
||||||
;
|
;
|
||||||
|
|
||||||
: ."
|
: ,"
|
||||||
34 , ( 34 == litWord )
|
|
||||||
BEGIN
|
BEGIN
|
||||||
C<
|
C<
|
||||||
( 34 is ASCII for " )
|
( 34 is ASCII for " )
|
||||||
DUP 34 = IF DROP 0 THEN
|
DUP 34 = IF DROP EXIT THEN C,
|
||||||
DUP C,
|
AGAIN ;
|
||||||
NOT UNTIL
|
|
||||||
|
: ."
|
||||||
|
34 , ( 34 == litWord ) ," 0 C,
|
||||||
COMPILE (print)
|
COMPILE (print)
|
||||||
; IMMEDIATE
|
; IMMEDIATE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user