This commit is contained in:
Miloslav Ciz 2024-08-05 22:39:28 +02:00
parent 275c83d379
commit 793eff5870
19 changed files with 2117 additions and 1835 deletions

View file

@ -41,25 +41,26 @@ Built-in words include:
```
GENERAL:
+ add a b -> (a + b)
- subtract a b -> (b - a)
* multiply a b -> (a * b)
/ divide a b -> (b / a)
= equals a b -> (-1 if a = b else 0)
< less than a b -> (-1 if a < b else 0)
> greater than a b -> (-1 if a > b else 0)
mod modulo a b -> (b % a)
dup duplicate a -> a a
drop pop stack top a ->
swap swap items a b -> b a
rot rotate 3 a b c -> b c a
+ add a b -> (a + b)
- subtract a b -> (a . b)
* multiply a b -> (a * b)
/ divide a b -> (a / b)
= equals a b -> (-1 if a = b else 0)
< less than a b -> (-1 if a < b else 0)
> greater than a b -> (-1 if a > b else 0)
mod modulo a b -> (a % b)
dup duplicate a -> a a
drop pop stack top a ->
swap swap items a b -> b a
rot rotate 3 a b c -> b c a
pick push Nth item xN ... x0 N -> ... x0 xN
. print top & pop
key read char on top
.s print stack
emit print char & pop
cr print newline
cells times cell width a -> (a * cell width in bytes)
depth pop all & get d. a ... -> (previous stack size)
cells times cell width a -> (a * cell width in bytes)
depth pop all & get d. a ... -> (previous stack size)
bye quit
VARIABLES/CONSTS: