aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinweiClarkChao <[email protected]>2015-01-08 01:01:53 +0800
committerJinweiClarkChao <[email protected]>2015-01-08 01:01:53 +0800
commite85bf9281710facb2664f732af03951997810408 (patch)
tree604f8ddc76b7f4e5978547a97ece2c50d41fbf72
parent303aadd34414ae31aceb170cc99c948ac2388597 (diff)
downloadbrainfuck-e85bf9281710facb2664f732af03951997810408.tar.gz
brainfuck helloworld
-rw-r--r--README.md17
-rw-r--r--brainfuck.bf1
2 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index 294413c..66b2fa1 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,19 @@
1brainfuck 1brainfuck
2========= 2=========
3 3
4brainfuck 4Brainfuck is represented by an array with 30,000 cells initialized to zero
5and a data pointer pointing at the current cell.
6
7There are eight commands:
8```
9+ : Increments the value at the current cell by one.
10- : Decrements the value at the current cell by one.
11> : Moves the data pointer to the next cell (cell on the right).
12< : Moves the data pointer to the previous cell (cell on the left).
13. : Prints the ASCII value at the current cell (i.e. 65 = 'A').
14, : Reads a single input character into the current cell.
15[ : If the value at the current cell is zero, skips to the corresponding ] .
16 Otherwise, move to the next instruction.
17] : If the value at the current cell is zero, move to the next instruction.
18 Otherwise, move backwards in the instructions to the corresponding [ .
19``` \ No newline at end of file
diff --git a/brainfuck.bf b/brainfuck.bf
new file mode 100644
index 0000000..e0a8381
--- /dev/null
+++ b/brainfuck.bf
@@ -0,0 +1 @@
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)