A while back I wrote a Brainfuck interpreter in ZZT as a programming challenge and for nostalgia's sake. It doesn't really use any special ascii-graphics and it isn't really a game, so I wanted to check before submitting it. Is there any interest?
If you don't know, brainfuck is a minimalistic esoteric programming language. It has a very restricted set of operators while being theoretically equivalent to C, Java, and any other language. See http://esoteric.voxelperfect.net/wiki/Brainfuck for more information.
-D
Brainfuck Interpreter in ZZT-OOP
Moderators: Commodore, Zenith Nadir
- LANCER ECKS
- is a lady of leisure and drinks of fine wine
- Posts: 51
- Joined: Thu Jan 11, 2007 12:32 am
It can accept at most 116 BF instructions in a program. (With a slight tweak, this could be increased to 120).
The memory consists of 54 8-bit cells. (Likewise expandable to 60 with a slight modification).
The main limitation is that the only way that I've found of storing the information is using physical walls on the board, which each wall being a bit. Instructions require three bits and memory eight bits. With two banks of instructions, and one of memory, the entire board is pretty much used up.
-D
The memory consists of 54 8-bit cells. (Likewise expandable to 60 with a slight modification).
The main limitation is that the only way that I've found of storing the information is using physical walls on the board, which each wall being a bit. Instructions require three bits and memory eight bits. With two banks of instructions, and one of memory, the entire board is pretty much used up.
-D
Well, since there was at least one reply, I uploaded it to the archive. When I did, I noticed that I violate the >10kB rule as well. Regardless, until the database is updated and a decision is made as to whether to make an exception in my case, you can find a copy at:
http://www.anotbnotornot.com/brain.zip
The program above also includes a documentation board which describes how the system is implemented for those who are interested. If there are any other questions about it, I will be happy to answer them.
-D
http://www.anotbnotornot.com/brain.zip
The program above also includes a documentation board which describes how the system is implemented for those who are interested. If there are any other questions about it, I will be happy to answer them.
-D
-
- Posts: 371
- Joined: Fri Sep 01, 2006 1:30 am
wil wrote one too, but you can't find it by searching brainfuck because it's abbreviated
here:
http://zzt.org/zgames/b/BFI.zip
here:
http://zzt.org/zgames/b/BFI.zip
Hmm. I'm a bit disappointed that my interpreter isn't as original as I thought it was. It does have a couple of advantages over wil's, such as displaying your program symbolically rather than as just colors. But wil manages to get 3 bits per square rather than 1.
I thought about how to use that extra information, and I realize that by combining my interpreter with wil's 3-bit storage, I can create a mark 2 version that is vastly improved. It could have up to 644 instructions in a program and 174 9-bit memory locations. These numbers could be adjusted by trading 6 memory cells for 23 code instructions.
I thought about how to use that extra information, and I realize that by combining my interpreter with wil's 3-bit storage, I can create a mark 2 version that is vastly improved. It could have up to 644 instructions in a program and 174 9-bit memory locations. These numbers could be adjusted by trading 6 memory cells for 23 code instructions.
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact: