Unsquare
Jump to navigation
Jump to search
Unsquare was named after Dave Brubeck's Unsquare Dance. Unsquare Dance is unusual in rhythm, and so is the esolang.
Instructions
| Command | Meaning |
|---|---|
| O | Push 0. |
| I | Push 1. |
| A | Pop the top of the stack into the accumulator. |
| S | Swap the top 2 items of the stack. |
| + | Add 2 to the accumulator. |
| - | Subtract 2 from the accumulator. |
| x | Multiply the accumulator by 2 |
| P | Push the accumulator. |
| o | Output the top of the stack. (Note: This does not discard the top of the stack.) |
| i | Wait for user input, then push it onto the stack. |
| > | If the accumulator is 0 or 1, jump to the corresponding <. |
| < | If the accumulator is not 0 nor 1, jump to the corresponding >. |
Examples
Hello, world!
Note: This was made before multiplication.
OA++++++++++++++++++++++++++++++++++++oIA++++++++++++++++++++++++++++++++++++++++++++++++++oOA+++++++++++++++++++++++++++++++++++++++++++++++++++ooIA++++++++++++++++++++++++++++++++++++++++++++++++++++oOA++++++++++++++++++++++o------oIA+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++o----oOA+++++++++++++++++++++++++++++++++++++++++++++++++++++++++o---o----o
Cat program
iA>PoiA<
Truth-machine
ioAx>Io<
Implementations
A Ruby interpreter and x86 assembly compiler (written in Python) by User:Bangyen.