Important notice - 06 April 2013

All eosgarden activities have been closed forever, in order to focus on new projects.
The content of this website will stay as is, for archive purpose, but won't be updated anymore.
eosgarden software are still available for download, but are no longer maintained. Support is no longer available.
 
 

GitHub

All our OpenSource projects have been migrated to GitHub.
Feel free to fork!
BrainDead is an interpreter for the BrainFuck programming language, written in C, that can be run in interactive or non-interactive mode.
 
 

Overview

Usage

By default, the executable enters the interactive mode and interprets brainfuck code from stdin as you type.
Type "x", "X", "q" or "Q" to exit the interactive mode.
If a target file is specified, the result will be displayed on the standard output.

Examples

  • Entering into interactive mode:
    $ braindead
  • Running a brainfuck script:
    $ braindead path/to/file
  • Running a brainfuck script by reading characters by characters, allocating only 2 stack cells at a time, and displaying debug informations:
    $ braindead -drm 1 2 path/to/file
  • Running a brainfuck script with input from a file instead of stdin:
    $ braindead path/to/file < path/to/input/file

Language additions

BrainDead adds some features to the BrainFuck language:
  • $
    Debug: prints the full stack
  • @
    Break-point: halt the script
  • %
    Resets all stack cells to 0

Arguments

The available command line arguments are:
  • -h, boolean, --help
    Displays help about the command
  • -v, boolean, --version
    Displays the version number
  • -l, boolean, --license
    Displays the license text
  • -m, integer, --malloc
    Allocates <X> stack cells at a time (default is 85)
  • -r, integer, --read
    Read <X> bytes from input file at a time (default is 1024)
  • -d, boolean, --debug
    Debug mode - Displays every operation
  • -b, boolean, --enable-breakpoints
    Enables the use of '@' symbols in the brainfuck code for breakpoints
  • -s, boolean, --enable-stack-debug
    Enables the use of '$' symbols in the brainfuck code for stack debugging
  • -z, boolean, --enable-stack-reset
    Enables the use of '%' symbols in the brainfuck code for stack reset