Phoneboard
Jump to navigation
Jump to search
Phoneboard is an esolang which use just the 12 keys on a phone [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, #, *]. It uses two stacks to store data.
Commands
The language offers twelve commands, each one corresponding to a phone key. Operations consume the data they use.
| Name | Function |
|---|---|
0 |
Subtract the top elements of the stack (The top goes on the left) |
1 |
Push 1 |
2 |
Push 2 |
3 |
Add the top elements of the stack |
4 |
Swap what stack is being used to store data |
5 |
Take input and push its Unicode code point to the top |
6 |
ROTCCW |
7 |
Swap the top 2 elements |
8 |
Duplicate the top element |
9 |
Output the top as a Unicode character |
# |
While the top 2 elements are equal |
* |
End While |
Examples
Cat program
An infinitely repeating cat program follows:
11#5911*
Truth-machine
The following program provides a truth-machine:
22322332233223322332233223322332233223322332233120388589#9888*
Interpreter
- Common Lisp implementation of the Phoneboard programming language.