Tero Koskinen is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

tkoskine / ada-bfc

Brainf*ck compiler written in Ada. Requires ada-ir repository.

Clone this repository (size: 10.3 KB): HTTPS / SSH
hg clone https://bitbucket.org/tkoskine/ada-bfc
hg clone ssh://hg@bitbucket.org/tkoskine/ada-bfc

ada-bfc overview

Recent commits See more »

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