Brainfuck+ is an extended version of the classic Brainfuck language,
featuring additional functionalities such as the --memdump
and --warning
flags, as well as debugging and analysis tools. This interpreter allows you to run programs written in BrainfuckPlus, providing useful options for debugging and inspecting program execution.
;>; read two bytes as int
[-<+>]< perform add
: print result as int
BrainfuckPlus uses the same basic commands as Brainfuck, with potential for extensions. Here are the core commands:
Command | Description |
---|---|
> |
Move the memory pointer to the right |
< |
Move the memory pointer to the left |
+ |
Increment the byte at the memory pointer |
- |
Decrement the byte at the memory pointer |
. |
Output the byte at the memory pointer (usually as an ASCII character) |
: * |
Output the int at the memory pointer |
, |
Accept one byte of input, storing its value at the memory pointer |
; * |
Accept int in range <0; 255>, storing its value at the memory pointer |
[ |
Jump forward to the command after the corresponding ] if the byte at the memory pointer is 0 |
] |
Jump back to the command after the corresponding [ if the byte at the memory pointer is nonzero |
$ * |
Stops execution of script |
? * |
Pauses execution of script and prints memory dump. Press enter to continue. |
--warning
: Shows warnings if potential issues are detected during execution.--memdump
: Displays a memory dump after program execution.--memdumpfile=<filename>
: Dump memory into file after program execution.
To run a BrainfuckPlus program, use the following command:
./brainfuckplus [options] <file>...
-
Running a program without any flags:
./brainfuckplus program.bf
-
Displaying a memory dump after program execution:
./brainfuckplus --memdump program.bf
Flag | Description |
---|---|
--memdump |
Displays a memory dump after program execution |
--memdumpfile=<filename> |
Dump memory into file after program execution. |
--warning |
Shows warnings during execution |
--version |
Displays the version of the interpreter |
--help |
Displays the possible flags |
Feel free to submit bug reports or feature requests via the Issues tab.