A Brainfuck compiler and interpretor fully written in c, that generates x86 assembly for the NASM asssembler. Currently the compiler supports Linux 64-bits/32-bits, Windows 32-bits, Windows 64-bits.
If you think the repository is interesting, consider giving it a star.
To install you just need to run the make file:
$ make
Make sure to also install, and place on your PATH enviroment variable, the following programs:
When ciobf is executed, it can be in one of two modes, the interpretation mode that interprets the source code directly without generating any machine code, and the compilation mode that generates the machine code for the platform that it is currently running on.
By default the program runs in compilation mode, but if you want to run the interpretor instead, add the '-int' flag to the command:
$ ciobf src_file_name -int
ciobf offers multiple flags to change the behaviour of the program, some of those only work on compilation mode and others work on both modes.
With this flag you can specify the name of the output file of the compiler, if this flag is not used than the default value for the output file name is 'out'.
Example of the usage of this flag, by setting the name of the output file to 'hello':
$ ciobf src_file_name -o hello
This flag allows you to specify the size of the buffer to be used by the '.'(print) instruction, if this flag is not used than the default size of the buffer is 200.
Example of the usage of the flag, setting the buffer size to 30:
$ ciobf src_file_name -b 30
This flag makes the compiler stop before the assembling stage, generating only the assembly file.
This flag makes the compiler stop before the linking stage, generating only the assembly file and the object file.
This flag forces the compiler to compile to 32-bits instead of 64-bits, if the platform is already 32-bits this flag has no effect.
This flag allows you to specify the number of cells to be used by Brainfuck, the default number is 500.
Example of the usage of the flag, setting the cell count to 1000:
$ ciobf src_file_name -c 1000