From 29bec09ee2dfe8d29a32c605daca50d5d7661f0e Mon Sep 17 00:00:00 2001 From: kitty Date: Fri, 20 Mar 2026 12:10:36 +1100 Subject: base words --- readme.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 4280da6..9257664 100644 --- a/readme.md +++ b/readme.md @@ -146,6 +146,13 @@ duplicate the two topmost values on the stack. ### `and ( u1 u2 -- u )` perform bitwise AND on u1 and u2. +### `base ( -- a )` +a variable containing the current numeric input/output base. +by default this is 10. + +### `binary ( -- )` +set current base to binary. + ### `branch ( -- )` compile into user memory an incomplete branch. a 32 bit branch offset must be written immediately after. @@ -179,6 +186,9 @@ bytes are copied in high memory to low memory order. ### `d, ( n -- )` write a 32 bit value to user memory and increment the user memory pointer. +### `decimal ( -- )` +set current base to decimal. + ### `dp ( -- a )` a variable that contains the lowest free byte of memory in user memory. @@ -211,6 +221,9 @@ grows, and marks as executable, the user memory space by u bytes. ### `here ( -- a )` yields the address of the first available byte in user memory. +### `hex ( -- )` +set current base to hexadecimal. + ### `immediate ( -- )` mark the most recently defined word as immediate. @@ -295,6 +308,9 @@ a variable containing the address of the current input buffer. ### `type ( a u -- )` write u characters at a to output. +### `octal ( -- )` +set current base to octal. + ### `over ( u1 u2 -- u1 u2 u1 )` copy the second-highest value on the stack and move it to the top of the stack. -- cgit v1.2.3