Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rohitjha/brainfuck
An interpreter for the Brainfuck programming language, written in C.
https://github.com/rohitjha/brainfuck
Last synced: 3 months ago
JSON representation
An interpreter for the Brainfuck programming language, written in C.
- Host: GitHub
- URL: https://github.com/rohitjha/brainfuck
- Owner: rohitjha
- License: unlicense
- Created: 2013-06-27T14:20:08.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T16:50:48.000Z (about 7 years ago)
- Last Synced: 2024-04-24T15:15:53.578Z (7 months ago)
- Language: C
- Size: 30.3 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- AwesomeInterpreter - brainfuck
README
brainfuck
===========An interpreter for the Brainfuck programming language written in C.
Version: 0.5.2
Features
--------
1. Circular memory tape of size 64KB
2. Tape cells can store signed integers
3. Can take Brainfuck programs as input in the form of files or directly as sequence of operators, passed as argument.
4. Sample Brainfuck programs can be found in the 'examples' directory.Installation
-----------
Simply running 'make' at the command prompt will create the executable named 'bf' in the current working directory.
For proper installation, run these two commands at the command prompt:$ make
\# make install (as root/superuser)
To uninstall, run:
\# make uninstall (as root/superuser)
Usage
-----
1. Running a Brainfuck program, stored in a file:
To run the Hello World! example, which is available as 'hello_world.bf' in the examples directory, run the following line:$ bf -f examples/hello_world.bf
To get the output "Hello World!" (without quotes).
2. Passing a sequence of Brainfuck operators directly to the interpreter:
To execute a set of operations, such as >>+++. (which prints the content of the third cell after incrementing the existing value by three), run the 'bf' program as:$ bf -e '>>+++.'
3. Displaying help:
$ bf -h4. Running a program and then obtaining contents of tape cells:
Run a program, as shown in either case 1 or case 2, with the only change being the addition of a '-t' option:$ bf -f examples/hello_world.bf -t 10
This will display the result and then display the contents of cells 0 through 10.
Help
----
View the man page for brainfuck by typing 'man bf' at the command line.E-mail: [email protected] (Rohit Jha)