NAME
SYNOPSIS
bfa INFILE OUTFILE
DESCRIPTION
EXAMPLES
SOURCE CODE
EXIT STATUS
SEE ALSO
HISTORY
Version 0.1 - 12/19/1999
Version 0.2 - 01/26/2000
AUTHOR

NAME

bfa - Brain Fuck Assembler

SYNOPSIS

bfa INFILE OUTFILE

DESCRIPTION

bfa is an assembler for the minimalized programming language Brain Fuck. It translates a better readable BFA source code to native absolutely unreadable Brain Fuck code. The produced code can be executed with a Brain Fuck Interpreter like bfi from Urban Mueller, or directly on a system providing a Brain Fuck processor.

The first argument INFILE is the file name of the BFA source code. This file will be translated to native Brain Fuck code and written to the file given by the second argument. Use - instead of a filename to use stdin or stdout.

EXAMPLES

bfa order.bfa order.b Read BFA code from order.bfa translate it to Brain Fuck code and write it to order.b.

bfa - order.b Read BFA code from stdin translate it to Brain Fuck code and write it to order.b.

bfa order.bfa - Read BFA code from order.bfa translate it to Brain Fuck code and write it to stdout.

SOURCE CODE

One command per line. Empty lines will be ignored. Text behind the comment char ; will be ignored. Spaces and tabs outside quotation marks will be ignored. To print a quotation mark it must be escaped with \. The sequence \n will brake a line. To print the char \ itself it must be written as \\.

The following standard commands are currently supported:

MVL

MVR

ADD

SUB

GET

PUT

LOB

LOE

Move left. This is equivalent to the Brain Fuck command <.

Move right. This is equivalent to the Brain Fuck command >.

Add one. This is equivalent to the Brain Fuck command +.

Subtract one. This is equivalent to the Brain Fuck command -.

Get char from stdin. This is equivalent to the Brain Fuck command ,.

Write char to stdout. This is equivalent to the Brain Fuck command ..

Begin loop. This is equivalent to the Brain Fuck command [.

End loop. This is equivalent to the Brain Fuck command ].

The following extended commands are currently supported:

MVL x

MVR x

ADD x

SUB x

GET x

PUT x

PUT ``Text''

SET

SET x

CPL x

Move left x times.

Move right x times.

Add x.

Subtract x.

Get x chars from stdin.

Write character number x to stdout.

Write text to stdout.

Set current value to zero.

Set current value to x.

Create x copies of current value to the left. After this copy action the current value will be zeroed.

CPR x

Create x copies of the current value to the right. After this copy action the current value
will be zeroed.


EXIT STATUS

0

1

Successfull program execution.

Unsuccessfull program execution. An error message was sent to stderr.


SEE ALSO

bfi.

HISTORY

Version 0.1 - 12/19/1999

Initial release.

Version 0.2 - 01/26/2000

bfa now creates optimized Brain Fuck code. Man page added. Some other file changes in
the archive.


AUTHOR

bfa was written by Klaus Reimer <kr@ailis.de> and is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.