YASBE
Jump to navigation
Jump to search
Designed by | Lim95 |
---|---|
Appeared in | 2022 |
Memory system | Stack-based |
Dimensions | One-dimensional |
Computational class | Turing complete |
Major implementations | Python |
File extension(s) | .txt , .yas |
YASBE, also known as Yet Another Stack-Based Esolang, (pronounced yahs-bee) is, well, another stack-based esolang. Much like Double, this was made by Lim95 in around an hour, though not live. The language was inspired by someone in the Truttle1 Discord Server known as TARDIInsanity.
Command | Token | What it does |
---|---|---|
Push | 0 | Pushes the value after it to the top of the stack. |
Pop | 1 | Pops the top value on the stack off. If the stack is empty, end the program. |
Copy | 2 | Copies the top value on the stack. |
Flip | 3 | Flips the stack. |
Add | 4 | Adds the top two values of the stack and pushes the result to the top. |
Subt | 5 | Subtracts the top two values of the stack and pushes the result to the top. |
Mult | 6 | Multiplies the top two values of the stack and pushes the result to the top. |
Div | 7 | Divides the top two values of the stack and pushes the result to the top. |
Char | 8 | Prints the ASCII character of the top value of the stack. |
Value | 9 | Prints the top value of the stack. |
CGet | 10 | Gets the ASCII value of a character entered and pushes it to the top of the stack. |
IGet | 11 | Gets the value entered and pushes it to the top of the stack. |
Jump | 12 | Jumps the code pointer to the value specified. |
CondJump | 13 | Jumps the code pointer to the first value if the top of the stack is not equal to the value of the stack at the index specified. |
Break | 14 | Ends the program. |
CondBreak | 15 | Ends the program if the top value of the stack is not equal to the value of the stack at the index specified. |
Swap | 16 | Swaps the top and bottom values of the stack. |
Pushback | 17 | Pushes the value to the back of the stack. |
Debug | 999 | Prints out the stack. |
Example Programs
Hello, World!
push 72 char push 101 char push 108 char push 108 char push 111 char push 44 char push 32 char push 119 char push 111 char push 114 char push 108 char push 100 char push 33 char
iget value condjump 1 0