Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fe0add
commit 1e8d874
Showing
6 changed files
with
51 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2012 Fabian M. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
# Brainfuck | ||
Brainfuck | ||
=========== | ||
Lightweight Brainfuck interpreter written in C. | ||
|
||
------------ | ||
## License | ||
See LICENSE file. | ||
|
||
Lightweight, open-source Brainfuck interpreter written in C. | ||
## Authors | ||
Fabian M. mail.fabianm@gmail.com http://www.github.com/FabianM | ||
|
||
Notice | ||
---------------- | ||
Written on a machine running Ubuntu (Linux). Not tested on other platforms yet. | ||
|
||
Brainfuck | ||
--------- | ||
Urban Müller created brainfuck in 1993 with the intention of designing a language which could be implemented with the smallest possible compiler. | ||
|
||
### Commands | ||
The eight language commands, each consisting of a single character: | ||
|
||
| Character | Meaning | | ||
|:----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | ||
| > | increment the data pointer (to point to the next cell to the right). | | ||
| < | decrement the data pointer (to point to the next cell to the left). | | ||
| + | increment (increase by one) the byte at the data pointer. | | ||
| - | decrement (decrease by one) the byte at the data pointer. | | ||
| . | output a character, the ASCII value of which being the byte at the data pointer. | | ||
| , | accept one byte of input, storing its value in the byte at the data pointer. | | ||
| [ | if the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching ] command*.| | ||
| ] | if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching [ command*.| | ||
## Notice | ||
Written on a machine running Ubuntu (Linux). Not tested on other platforms yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
#! /home/fabian/workspace/Brainfuck/Debug/Brainfuck | ||
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. | ||
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
#! /home/fabian/workspace/Brainfuck/Debug/Brainfuck | ||
+[+>-]<+. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters