FBBI

Flaming Bovine Befunge-98 Interpreter

PRE-FINAL version 0.98, Oct 1 1998

Copyunder (u)1998 Cat's-Eye Technologies, http://www.cats-eye.com/. See
http://www.cats-eye.com/license/ for license information.
  ------------------------------------------------------------------------

Description

FBBI is an interpreter for the Befunge-98 language as defined by the
Funge-98 Final Specification, written in 100% ANSI C. A distribution is
provided which includes both interpreter source code, and executables for
MS-DOS and 32-bit Windows. All of the components of FBBI are placed under
the Copyunder public license, which means they can freely be used as a
basis for derivative works, without forcing those works to also be "free
software."

Funge-98 Interpreter Information

FBBI's handprint is 0x46424249 ('FBBI'). FBBI v0.93 implements the
fingerprints 0x4e554c4c NULL and 0x524f4d41 ROMA.

Distribution

     http://www.cats-eye.com/file/c/fbbiv098.zip

If you plan to make derivative works from this work, please make note that
the source code components are not necessarily in their final, polished
state.

If you find any bugs or any places where the implementation does not live
up to the spec, please post them to befunge@cats-eye.com.

Files in this Distribution

 index.html     discombobulated ramblings
 readme.txt     index.html, just less pretty

 compile.bat      MS-DOS batch file to build the Borland and DJGPP
                  executables
 src/makefile     GNU makefile to build FBBI executable
 src/build16.bat  MS-DOS batch file to build 16-bit FBBI executable

 src/build16m.bat MS-DOS batch file to build miniature 16-bit FBBI
                  executable

 src/fbbi.c, .h     main C source file (and C header) for FBBI

 src/bf98spc.c, .h  C source file (and C header) for large dynamic
                    playfield routines

 src/f98stack.c, .h C source file (and C header) for Funge-98 stack stack
                    routines
 src/f98ip.c, .h    C source file (and C header) for Funge-98 IP routines

 src/f98i.c, .h     C source file (and C header) for standard Funge-98
                    instructions

 src/f98fp.c, .h    C source file (and C header) for Funge-98 fingerprint
                    routines

 src/fp/index.h C header file listing all fingerprints
 src/fp/NULL.c  C source file for NULL fingerprint
 src/fp/ROMA.c  C source file for ROMA fingerprint

 eg/finger.b98  Demonstrates NULL and ROMA fingerprints with ( and )
 eg/hello.b98   Demonstrates SGML-style spaces in stringmode
 eg/randdna.b98 Perfect for synthesizing random organic creatures
 eg/script.b98  Demonstrates FBBI's -script command line option
 eg/cgi.b98.cgi Another Befunge-98 script, this one should run as a CGI

 bin/fbbi16m.exestripped-down FBBI executable for MS-DOS (compiled
                w/BC++3.1)

 bin/fbbi.exe   FBBI executable for 32-bit (386+) MS-DOS (compiled
                w/DJGPP1.1; requires DPMI server)
 bin/fbbi32.exe FBBI executable for 32-bit Windows (compiled w/VC++5.0)

Usage

     > fbbi [-f] [-w] [-t] [-s] [-u] [-93] [-mc n] [-ms n] sourcefile
     [funge-prog-args]

Loads the file 'sourcefile' and runs it as a Befunge-98 source file.

   * -f (or -fast, or --fast) makes FBBI run faster at the cost of locking
     up on infinite loops.
   * -w (or -warn, or --warn) issues warnings on unimplemented instructions
     being executed.
   * -t (or -trace, or --trace) interactively traces the program (in lieu
     of an actual debugger.)
   * -s (or -script, or --script) treats the source file as a 'script'
     (begins execution on first line which does not start with a #.)
   * -u (or -unefunge, or --unefunge) restricts the interpreter to one
     dimension and, in conjunction with -w, tells you about it. (Not
     thoroughly tested.)
   * -93 disables Funge-98 instructions, changes stringmode and, in
     conjunction with -w, tells you about it. (Not thoroughly tested.)
   * -mc (or -maxcells, or --max-cells) specifies the maximum number of
     cells on each stack, default 1024.
   * -ms (or -maxstacks, or --max-stacks) specifies the maximum number of
     stacks on the stack stack, default 256.

Limitations

   * Because FBBI is written in ANSI C, end-of-line sequences which consist
     of a single CR may not be readable on MS-DOS machines. FBBI's strict
     ANSI policy can be undefined in config.h, in which case it should
     compile to use binary file mode under MS-DOS.
   * The stack stack, and each stack, is currently of a user-specified
     size, not dynamic.
   * A-Z semantic stacks are currently limited to 26 overloads each.

Compliance

Except for any limitations noted above or hitherto undiscovered, FBBI v0.98
is 100% compliant with the Funge-98 Final Specification, located at

     http://www.cats-eye.com/funge/doc/spec98.html

h, l, and m are all Trefunge-specific, and thus are not implemented. This
is not Concurrent Funge, so t is not implemented either. FBBI passes
Cat's-Eye Technologies' Befunge Diagnostics version 0.98, located at

     http://www.cats-eye.com/funge/diag/

The C source code for the interpreter should be 100% ANSI C (except where
noted above in regards to CR as a sole end-of-line marker on MS-DOS
systems.) FBBI should compile under gcc with both -ansi and -pedantic
switches turned on. It compiles fine with both DJGPP v2.0 and Borland C++
v3.1, both in "strict ANSI" mode.

                                                       Winnipeg, Manitoba,
                                                       Canada
                                                       Oct 1, 1998
