summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index a4aaad5..3b3edfb 100644
--- a/readme.md
+++ b/readme.md
@@ -38,6 +38,10 @@ start compilation of the word 'name'.
### `; ( -- ) IMMEDIATE`
end compilation of the currently compiling word.
+### `-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.
+
### `>body ( xt -- a )`
yield the code field of xt.
@@ -45,6 +49,15 @@ yield the code field of xt.
variable containing the index of the first unparsed character
in the input buffer.
+### `>r ( u -- ) ( R: -- u )`
+move a value from the working stack to the return stack.
+
+### `2drop ( u1 u2 -- )`
+remove the two topmost values from the stack.
+
+### `2dup ( u1 u2 -- u1 u2 u1 u2 )`
+duplicate the two topmost values on the stack.
+
### `brk@ ( -- a )`
yields current program break.
@@ -60,6 +73,9 @@ a variable that contains the first byte of user memory.
### `dp$ ( -- )`
a variable that contains the last available byte of user memory.
+### `drop ( u -- )`
+remove the value at the top of the stack.
+
### `dup ( u -- u u )`
duplicate the value at the top of the stack.
@@ -110,6 +126,15 @@ and return as a string.
tabs (ascii 0x09), newlines (ascii 0x10), and spaces (ascii 0x20)
are considered whitespace.
+### `r> ( -- u ) ( R: u -- )`
+move a value from the return stack to the working stack.
+
+### `rdrop ( R: u -- )`
+remove the value at the top of the return stack.
+
+### `rot ( u1 u2 u3 -- u2 u3 u1 )`
+rotate the top three values on the stack so that the third highest value is moved to the top.
+
### `smudge ( -- )`
toggles the smudge bit on the xt in latest.
@@ -118,6 +143,9 @@ a variable containing a boolean value.
if 0 (false), the system is in interpreting mode,
if -1 (true), the system is in compiling mode.
+### `swap ( u1 u2 -- u2 u1 )`
+swap the two topmost values on the stack.
+
### `syscall0 ( rax -- u )`
perform the syscall with the id in `rax`,
and push the value of the `rax` register to the stack.
@@ -143,6 +171,9 @@ a variable containing the address of the current input buffer.
### `type ( a u -- )`
write u characters at a to output.
+### `over ( u1 u2 -- u1 u2 u1 )`
+copy the second-highest value on the stack and move it to the top of the stack.
+
## dictionary format
note that the string length of one byte limits a word's name to 255 characters.