BF-M
BF-M describes a brainfuck derivative invented by the user User:AshuraTheHedgehog, and first presented on their user page, conceived as an extension which introduces an isolated memory cell as an adminiculum for the data management, as well as two operations serving to facilitate the printing of numbers.
Architecture
Proceeding from its brainfuck cleronomy, BF-M allocates to the traditional tape of unsigned byte values a single isolated cell, capable of perquisitions and manipulations, measuring the same capacity as any other cell.
Instructions
BF-M retains brainfuck's octuple instruction set verbatim:
Command | Description |
---|---|
>
|
Move the cell pointer one step to the right |
<
|
Move the cell pointer one step to the left |
+
|
Increment the memory cell at the pointer |
-
|
Decrement the memory cell at the pointer |
.
|
Output the character signified by the cell at the pointer |
,
|
Input a character and store its ASCII code in the cell at the pointer |
[
|
Jump past the matching ] if the cell at the pointer is 0
|
]
|
Jump back to the matching [ if the cell at the pointer is nonzero
|
Its veridicous contribution, however, resides in these eight operative novelties:
Instruction | What it does |
---|---|
| | Increment the memory |
_ | Decrement the memory |
( | Jump past the matching ) if the memory is 0 |
) | Jump to the matching ( if the memory is nonzero |
/ | Put input in memory |
\ | Print memory |
" | Print memory as number |
' | Print the cell under the pointer as a number |
Examples
Hello, World!
This program prints the message “Hello, World!” to the standard output:
+[-->-[>>+>-----<<]<--<---]>-.>>>+.>>..+++[.>]<<<<.+++.------.<<-.>>>>+.
Truth-Machine
The following truth-machine implementation relies on the isolated memory cell:
/________________________________________________(")"
Cat Program
This repeating cat program, which employs the isolated memory cell only, continues until the null character has been issued:
/(\/)
Interpreter
- Common Lisp implementation of the BF-M programming language.