Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/id101010/bfckr
A little brainfuck interpreter and debugger written in C.
https://github.com/id101010/bfckr
bandtape brainfuck debugger interpreter memory-visualizer
Last synced: about 1 month ago
JSON representation
A little brainfuck interpreter and debugger written in C.
- Host: GitHub
- URL: https://github.com/id101010/bfckr
- Owner: id101010
- License: wtfpl
- Created: 2016-11-08T01:00:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-27T11:29:51.000Z (about 3 years ago)
- Last Synced: 2024-08-03T18:16:40.267Z (5 months ago)
- Topics: bandtape, brainfuck, debugger, interpreter, memory-visualizer
- Language: C
- Homepage:
- Size: 957 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - bfckr
README
# bfckr [![Build Status](https://travis-ci.org/id101010/bfckr.svg?branch=master)](https://travis-ci.org/id101010/bfckr)
A simple to use brainfuck interpreter with built in debugger written in C.# How to run
* Type "make"
* Read [this](https://en.wikipedia.org/wiki/Brainf**k)
* Create your own brainfuck software
* let bfckr run your own .bf code# Usage
~~~~
Usage: ./bfckr [OPTION]
-h Show this help.
-d Enable debugger.
-f Execute brainfuck code given as file.
-e Execute brainfuck expression given as argument.
~~~~## examples:
**./bfckr -f examples/pi.bf**
~~~~
3.14070455282885
~~~~**./bfckr -d -f examples/pi.bf**
~~~~
[ENTER]: single step [c]: continue
Source viewer:
------------------------------------------------------------
>+++++++++++++++[<+>>>>>>>>+++
^
ip=0
------------------------------------------------------------Memory viewer:
------------------------------------------------------------
000 000 000 000 000 000 000 000 000 000 000 000 000 000 000^
mp=1
000 000 000 000 000 000 001 002 003 004 005 006 007 008 009
------------------------------------------------------------Output viewer:
------------------------------------------------------------------------------------------------------------------------
~~~~**./bfckr -e "----[---->+<]>++."**
~~~~
A
~~~~**echo "42=" | ./bfckr -f examples/bintodec.bf**
~~~
42=101010
~~~# Breakpoints
A # in the brainfuck source will be interpreted as breakpoint. You can use them if you want to stop the program flow at a specific point and start the debugger from there. If you are in debugger mode pressing c will get you back to executing the program.
**./bfckr -e "----[#---->+<]>++."**
~~~~
[ENTER]: single step [c]: continueSource viewer:
------------------------------------------------------------
----[#---->+<]>++.
^
ip=5
------------------------------------------------------------Memory viewer:
------------------------------------------------------------
000 000 000 000 000 000 000 -04 000 000 000 000 000 000 000
^
mp=0
993 994 995 996 997 998 999 000 001 002 003 004 005 006 007
------------------------------------------------------------Output viewer:
------------------------------------------------------------------------------------------------------------------------
~~~~# Licence
![WTFPL](http://www.wtfpl.net/wp-content/uploads/2012/12/logo-220x1601.png)
Copyright © 2016 Aaron [email protected]
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the COPYING file for more details.