BF instruction extension
Jump to navigation
Jump to search
Our goal is to extend the instructions of Brainf*ck as far as possible. Anything that you thought of could be one of the instructions. We'll start with the standard commands:
+-><[],.
Then add commands to set the cell to zero, and loops that only loop if the cell is zero:
=()
Then use base-36 to set the cell to that value:
1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
Then use more base-36 to set the cell to 1 if it's equal to that value, else set to 0:
$§¥€¢£₩«»•abcdefghijklmnopwrstuvwxyz
Now we have this set:
+-><[],.=()1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ$§¥€¢£₩«»•abcdefghijklmnopwrstuvwxyz
Examples
Cat program
This infinitely repeating cat program employs the loop-while-zero iteration construct (…)
:
=(,.=)
Truth-machine
This implementation of a truth-machine harnesses the ability to simulate Boolean test results:
,[->+>+<<]>.--------------z[>.<]
Interpreter
- Common Lisp implementation of the brainfuck instruction extension project.