mirror of https://github.com/falsovsky/z80.git
|
||
---|---|---|
.. | ||
Makefile | ||
README.md | ||
bf2data.py | ||
brainfuck.asm | ||
helloworld.bf | ||
loader.bas | ||
main.asm |
README.md
zxBrainfuck
zxBrainfuck is a Brainfuck interpreter in Z80 assembly for the ZX Spectrum.
- Supports all the Brainfuck instructions.
- User defined Brainfuck memory size in the memory_size variable. The default is 5000.
- The memory wraps at the beginning and end.
- Clears all the memory cells before use.
- Correctly counts the number of ] equivalent to [, for example, it does not run the . in this code:
[[].]
- Uses a nice lookup table to run the instruction.
Requirements
Build
git clone https://github.com/falsovsky/z80.git
cd z80/zxbrainfuck
To convert a brainfuck source file to Spectrum DATA
make brainfuck SOURCE="helloworld.bf"
And finally
make
Demos
- Hello World
- Bad Hello World from esolang wiki article about Brainfuck
- Arvorezinha
- Arvorezinha with loops
- Input/Output test
- Fibonacci from Daniel B Cristofani - source
- Number Warper also by Daniel B Cristofani - source
License
BSD