borth
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
borth is an esolang created by User:Ractangle.
Commands
Commands | Action |
---|---|
S: | Starts the program |
Prints the top value of the stack | |
input | Self explanatory |
print.ll | Prints the top value of the stack without emiting a newline |
print.var | Prints a varible |
var | Declares a variable |
var.stk | Pushes a variable to the stack |
lable.make | Creates a label |
label if 0 | Jumps to a label if a variable is 0 |
label if var | Jumps to a label if a variable is equal to an another variable |
label if > var | label if var but instead it check if the variable is greater then another variable
|
label if not var | The opisite of label if var
|
label > 0 | Jumps to a label if a variable is greather than 0 |
plus | adds two elements on the stack, pops the two elements and pushes a result on a stack |
E: | Ends the program |
Anything else will be pushed to the stack
Examples
Hello, world!
S: Hello, world print E:
Cat program
S: var i !input! print.var i E:
Truth-machine
S: var i !input! label if 0 i z label > 0 o i label.make z 0 print E: label.make o 1 print label o
Disan Count
S: var i !input! var a 1 lable.make loop print.var a var.stk a 1 plus var a label if not var loop a i E: