From c78e54e173a92ec5ed2eedb10a5514e2ffcf48c2 Mon Sep 17 00:00:00 2001 From: kitty Date: Fri, 20 Mar 2026 15:20:31 +1100 Subject: =?UTF-8?q?rudimentary=20Error=20Technology=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 9257664..4613d21 100644 --- a/readme.md +++ b/readme.md @@ -23,16 +23,22 @@ store the 64 bit value u into the memory address a. ### `#tib ( -- a )` variable containing the amount of characters in the input buffer. -### `(header) ( a u -- xt )` -create a dictionary header for a word named the provided string. -this word does not set the code field. -this word returns an incompleted xt and does not update latest. - ### `( ( -- ) IMMEDIATE` start a comment which lasts until the next closed bracket. if the unclosed bracket in the description above bothers you, have a closing bracket: ). +### `(0handler) ( -- )` +the very early error handler, which simply quits the program. + +### `(execute) ( a -- )` +call the function at the address. + +### `(header) ( a u -- xt )` +create a dictionary header for a word named the provided string. +this word does not set the code field. +this word returns an incompleted xt and does not update latest. + ### `* ( u1 u2 -- u)` multiply u1 and u2. @@ -143,6 +149,10 @@ remove the two topmost values from the stack. ### `2dup ( u1 u2 -- u1 u2 u1 u2 )` duplicate the two topmost values on the stack. +### `abort ( -- )` +call the error handler +(the address of which is in the variable `handler`) + ### `and ( u1 u2 -- u )` perform bitwise AND on u1 and u2. @@ -209,6 +219,9 @@ marks the u bytes starting at address a as executable. this is used primarily to mark the program break, which is used as the user memory space. +### `execute ( xt -- )` +call the word xt. + ### `find ( a u -- a u 0 | xt -1 )` look in the dictionary for the word a (of u characters). a zero is returned along with the original given string @@ -218,6 +231,9 @@ its xt is returned along with the true flag. ### `grow ( u -- )` grows, and marks as executable, the user memory space by u bytes. +### `handler ( -- a )` +variable containing the address of the current error handler. + ### `here ( -- a )` yields the address of the first available byte in user memory. -- cgit v1.2.3