Skip to content

Brainfuck compiler that runs on the Commodore 64 (or any 6502-based computer supported by cc65 that has enough RAM)

Notifications You must be signed in to change notification settings

gergoerdi/brainfuck64

Repository files navigation

Brainfuck compiler and BASIC transpiler for the Commodore 64

This compiler runs on the Commodore 64 and emits either C64 machine code directly, or C64 BASIC. The memory region to use as the Brainfuck memory and also as the location of the resulting program is configurable.

Limitations

  • The , instruction for input is not supported (it is ignored by the compiler)

  • A maximum of 20 loops can be nested in each other

  • Only 256 cells available. Doing a < on cell 0 wraps the pointer around to cell 255; similarly for >.

  • There's no check in the compiler to make sure no important bits of the RAM is overwritten. For example, using the right memory and program base addresses, you can get overlap between the two. You can even use a program base address that results in the compiler overwriting itself as it emits the results of the compilation.

Screencast

Brainfuck64 screecast

About

Brainfuck compiler that runs on the Commodore 64 (or any 6502-based computer supported by cc65 that has enough RAM)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published