Wrote ','

This commit is contained in:
Koichi Nakamura 2020-12-30 22:51:29 +09:00
parent edde64d0c1
commit 1009da441a

17
core.fs
View file

@ -104,4 +104,21 @@ l!
\ That's all for the brief explanation. Let's restart bootstrap!
\ The COMMA operator
\ ',' ( a -- ) Store a to 'here' and increment 'here' CELL bytes.
h@l@h@! h@C+h!
k1k0-h@$ k,h@k1k0-+$ h@C+h!
i h@!h@C+h! \ docol
khf h@!h@C+h!
k@f h@!h@C+h!
k!f h@!h@C+h! \ store 'a' to here
khf h@!h@C+h!
k@f h@!h@C+h!
kCf h@!h@C+h!
k+f h@!h@C+h! \ compute here + CELL
khf h@!h@C+h!
k!f h@!h@C+h! \ here <- here + CELL
kef h@!h@C+h! \ exit
l!
Q