Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 784 Bytes

README.md

File metadata and controls

35 lines (32 loc) · 784 Bytes

bfci

A simple, small, moderately optimizing compiling interpreter for the brainfuck programming language, targeting Linux x86-64.

Compile

cc -Wall -Wextra -O3 -s -o bfci bfci.c src/*.c

Usage

As a compiler:

bfci -o program program.bf
./program
bfci -o hello -c"+[++[<+++>->+++<]>+++++++]<<<--.<.<--..<<---.<+++.<+.>>.>+.>.>-.<<<<+.[<]>+."
./hello

As a compiling interpreter:

bfci -x program.bf
bfci -xc"+[++[<+++>->+++<]>+++++++]<<<--.<.<--..<<---.<+++.<+.>>.>+.>.>-.<<<<+.[<]>+."

Implementation Details

Cell Behavior
Unsigned 8-bit, wrapping
Tape Behavior
65536 cells, circular
EOF Behavior
Leaves cell unmodified