mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +01:00
Add TICK-like operator
This commit is contained in:
parent
c8397e1dbe
commit
16852539a3
1 changed files with 13 additions and 1 deletions
14
core.fs
14
core.fs
|
@ -104,9 +104,11 @@ l!
|
|||
|
||||
\ That's all for the brief explanation. Let's restart bootstrap!
|
||||
|
||||
\ === COMMA and TICK ===
|
||||
|
||||
\ The COMMA operator
|
||||
\ ',' ( a -- ) Store a to 'here' and increment 'here' CELL bytes.
|
||||
h@l@h@! h@C+h!
|
||||
h@l@ h@!h@C+h!
|
||||
k1k0-h@$ k,h@k1k0-+$ h@C+h!
|
||||
i h@!h@C+h! \ docol
|
||||
\ store 'a' to here
|
||||
|
@ -124,4 +126,14 @@ k1k0-h@$ k,h@k1k0-+$ h@C+h!
|
|||
kef h@!h@C+h!
|
||||
l!
|
||||
|
||||
\ TICK-like operator
|
||||
\ '\'' ( "c" -- xt ) Get execution token of following character
|
||||
\ NB: This definition is different from the usual definition of tick
|
||||
\ because it does not skip leading spaces and can read only a single
|
||||
\ character. It will be redefined in later stage.
|
||||
h@l@,
|
||||
k1k0-h@$ k'h@k1k0-+$ h@C+h!
|
||||
i, kkf, kff, kef,
|
||||
l!
|
||||
|
||||
Q
|
||||
|
|
Loading…
Reference in a new issue