diff options
| author | kitty <nepeta@canaglie.net> | 2026-03-23 18:51:19 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-03-23 18:51:19 +1100 |
| commit | 1456d7073742e39985aa093bdbc152f4f9cd07a4 (patch) | |
| tree | c0a14bf7bfda1bbe439800c0ffd970d16e89a47b /readme.md | |
| parent | c804a6deb60a60cce4ddcc79495829ad6553728a (diff) | |
value to +to -to
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -71,6 +71,10 @@ add u2 to u1. ### `+! ( a -- )` add one to the value at memory address a. +### `+to ( comp: "name" -- | intr: u "name" -- ) IMMEDIATE` +compile or execute (depending on `state`) code to add u to the contents +of a `value`. (in compile mode u is whatever was on the stack already.) + ### `, ( u -- )` write a 64 bit value to user memory and increment the user memory pointer. @@ -80,6 +84,10 @@ subtract u2 from u1. ### `-! ( a -- )` subtract one from the value at memory address a. +### `-to ( comp: "name" -- | intr: u "name" -- ) IMMEDIATE` +compile or execute (depending on `state`) code to subtract u from the contents +of a `value`. (in compile mode u is whatever was on the stack already.) + ### `-rot ( u1 u2 u3 -- u3 u1 u2 )` rotate the three topmost values on the stack so that the topmost value is moved to the third highest. @@ -441,6 +449,10 @@ conclude an if statement. ### `tib ( -- a )` a variable containing the address of the current input buffer. +### `to ( comp: "name" -- | intr: u "name" -- ) IMMEDIATE` +compile or execute (depending on `state`) code to modify the contents +of a `value`. + ### `true ( -- u )` a cell with all bits set. @@ -450,6 +462,9 @@ write u characters at a to output. ### `until ( ? -- ) IMMEDIATE COMPILE-ONLY` if the given flag is true, loop back to `begin`. +### `value ( u "name" -- )` +create a value called name, the initial value of which is u. + ### `variable ( "name" -- )` create a variable word, which yields an address that can be written and read. |
