From 9594b2fd119e9145fec8b035737fb82e95cedf64 Mon Sep 17 00:00:00 2001 From: kitty Date: Mon, 16 Mar 2026 21:24:52 +1100 Subject: moving some stuff over from jewelforth i would like to at some point add $ and % prefixes to the number interpreter. --- readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 440c02a..10ee749 100644 --- a/readme.md +++ b/readme.md @@ -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 -- a u )` parse one word from the input buffer, separated by a newline or the character c, -- cgit v1.2.3