aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/README.md b/README.md
index c9eab20..0000ddd 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,20 @@
# CleanBrainfuck
-Brainfuck interpreter in Clean
+[Brainfuck](http://en.wikipedia.org/wiki/Brainfuck) interpreter in [Clean](http://wiki.clean.cs.ru.nl/Clean)
+
+`Brainfuck.dcl` and `Brainfuck.icl` give you everything you need to use the module. In `ExecBrainfuck.icl`, a basic usage example is given.
+
+## Compiling & running the example
+
+You're assumed to have a brainfuck program `program.bf` in the same directory. For an example, see [Wikipedia](http://en.wikipedia.org/wiki/Brainfuck). This program outputs `Hello world!\n`:
+
+ ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
+
+Compiling:
+
+ clm ExecBrainfuck -o ExecBrainfuck
+
+Running:
+
+ ./ExecBrainfuck < program.bf
+
+The example program expects the brainfuck program to be the first line on stdin. Any further lines are seen as input to the brainfuck program.