Skip to content

GediminasMasaitis/bft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFT - Brainfuck Toolset

Optimizing Brainfuck interpreter with C and x86-64 assembly backends.

Build

make

Usage

bft [options] <file.b>

Options:
  -r, --run         Run the program (default)
  -c, --emit-c      Generate C code
  -s, --emit-asm    Generate NASM assembly
  -o, --output FILE Write output to FILE
  -d, --dump        Dump optimized instructions
  -h, --help        Show help

Examples

Run directly:

./bft ./programs/mandelbrot.b

Compile to C:

./bft -c -o mandelbrot.c ./programs/mandelbrot.b
gcc -O3 -o mandelbrot mandelbrot.c
./mandelbrot

Compile to assembly:

./bft -s -o mandelbrot.s ./programs/mandelbrot.b
nasm -f elf64 -o mandelbrot.o mandelbrot.s
ld -o mandelbrot mandelbrot.o
./mandelbrot

About

Brainfuck toolset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors