1. Tero Koskinen
  2. ada-bfc

Overview

Brainfuck compiler for x86 written in Ada

ada-bfc is a Brainfuck compiler for x86 written in Ada. It parses the Brainfuck programs and generates GAS assembly code from them.

The used cell size is one (1) byte and amount of cells configurable by a compile time option.

Building

For building you need ada-ir module from https://bitbucket.org/tkoskine/ada-ir

Steps:

hg clone https://bitbucket.org/tkoskine/ada-bfc
cd ada-bfc
hg clone https://bitbucket.org/tkoskine/ada-ir
mkdir objects
gnatmake -P brainf

Compiling programs

The compiler generates GAS assembly either to a file or to standard output. This assembly you need to compile/link together yourself with gcc.

Example

./main examples/hello.bf hello.s
gcc hello.s -o hello