So I wrote brain.......... interpreter
Had the morning off so I decided to spend ~1.5 hours of it writing a little brain.......... interpreter. It works so far (the hello world program on the wiki page / website runs, that's the biggest program I've tested it on).
I've added a little feature, where the first line should be a number (signed integer) signifying how much memory should be allocated for you to play with. Also, because I wanted (OK, needed) a corny way to terminate the processing loop, you have to end your program with 'E' :(
So hello world now looks like this:
Code:
120
++++++++++
[
>+++++++>++++++++++>+++>+<<<<-
]
>++.
>+.
+++++++.
.
+++.
>++.
<<+++++++++++++++.
>.
+++.
------.
--------.
>+.
>.
E
120 is way too much, I just left it over from a couple of debugging test runs.
Yeah this thread has nothing to do with anything except I've got nothing to do.
Hmm, maybe would could make this a contest? :eek:
EDIT: Oh yeah, the program: http://www.ahluka.co.uk/bf.rar
EDIT2: Oh yeah, usage. Just write you program in a text file and "b.......... <filename>" on the command line. Obviously change the * to a u.
EDIT3: Stoopid dots. It's b-F WORD.
EDIT4: Actually that one is broken. Taking link down to fix :)
EDIT5: Got there eventually.