SML
(Redirected from Stack Manipulation Lang (SML))
- Not to be confused with Standard ML.
- This is still a work in progress. It may be changed in the future.
Stack Manipulation language (SML) is an Stack based esolang thought up by User:Froginstarch
In this programming language, the only structure is THE STACK (if you couldn't guess). Variable are references to value on the stack, so you can imagine variables as a pointer to a value on stack.
Instructions
Instruction | arg/s | Description |
---|---|---|
label: | none | defines a label that can be jumped to |
push | value | pushes value (number or string) onto the stack |
pop | stack[0] | pops the top value on the stack |
add | a (stack[0] if no arg), b (stack[1] if no arg) | pops and adds 2 numbers together |
def | var, value | adds value to the stack and var points to value in stack |
stack[0] | prints the top value on the stack | |
jump | label | jumps to the specified label unconditionally |
jumpif | condition, label | pops top 2 values off stack, if condition is truths jump to label |
getin | none | gets STDIN |
Examples
Hello, world!
push "Hello, world!" print
Add more below :)
Interpreters
there are none as of now
frog :) |