A very simple browser-based Brainfuck interpreter in Javascript, HTML & CSS
The Quine Brainfuck example is taken from here whilst the 'Hello World' program was taken from here
Brainfuck is a simple turing complete programming language which consists of only eight commands. The commands operate on a memory array which is indexed by a pointer.
The eight commands in Brainfuck are detailed below. Any non-Brainfuck characters are treated as comments.
Command | Meaning |
---|---|
> | Increment the data pointer by one |
< | Decrement the data pointer by one |
+ | Increment the byte in memory location pointed at by data pointer by one |
− | Decrement the byte in memory location pointed at by data pointer by one |
. | Output the byte in memory location pointed at by data pointer |
, | Input a byte and place in memory location pointed at by data pointer |
[ | While the current byte pointed at in memory is zero |
] | End-while |