diff options
| author | kitty <nepeta@canaglie.net> | 2026-03-16 21:24:52 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-03-16 21:24:52 +1100 |
| commit | 9594b2fd119e9145fec8b035737fb82e95cedf64 (patch) | |
| tree | f0dc2c84a2325f8dae9dd7e54c9d92cc674784ec /readme.md | |
| parent | 152e6c7fd4a00e4fd56d5a55aaaa4c3680eaa815 (diff) | |
moving some stuff over from jewelforth
i would like to at some point add $ and % prefixes
to the number interpreter.
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -21,6 +21,9 @@ the following is a list of words available in this forth. ### `#tib ( -- a )` variable containing the amount of characters in the input buffer. +### `>body ( xt -- a )` +yield the code field of xt. + ### `>in ( -- a )` variable containing the index of the first unparsed character in the input buffer. @@ -57,10 +60,22 @@ grows the user memory space by u bytes. ### `here ( -- a )` yields the address of the first available byte in user memory. +### `interpret ( -- )` +interprets the contents of the terminal input buffer +until it runs out. + ### `latest ( -- a )` a variable containing the execution token of the most recently created word. +### `literal ( n -- ) IMMEDIATE COMPILE-ONLY` +compile a push of the literal value n into the currently compiling word. + +### `number ( a u -- n 0 | -1 )` +convert given string into a number along with a flag. +if parsing a number fails then -1 (false) is returned +and no number is provided. + ### `parse ( "name<c>" c -- a u )` parse one word from the input buffer, separated by a newline or the character c, |
