-
Notifications
You must be signed in to change notification settings - Fork 6
Expander
Expander is a program designed to execute bitwidth expansion in brainfuck programs. Using bitwidth expansion one can transform 8 bit brainfuck programs into 16 bit and 32 bit ones. Bitwidth expansion emulates higher bits in 8 bit brainfuck interpreters. This is achieved by applying transforms into each instruction making a longer sequence.
By using this technique, Headache implements 16 bit and 32 bit integers (shorts e ints).
./expander sourcepath [mode]
Receives the path of brainfuck file through paramater
./expander -p "source" [mode]
Receives the brainfuck program between the quotes. Use for small sequences.
./expander -i [mode]
Activate the interactive mode (receives the input from stdin)
Expander outputs to stdout.
The optional paramater mode is one of {0,1,2}. Each number represents a different transform to be applied. Modes 0 and 1 are two different strategies to expand bits x2. Mode 2 its to expand bits x4.