                                    BPC

Blaster Master Pascal Compiler (BPC):
  This is a pascal compiler which I created based on the QCC compiler from
Quake. I simply rewrote some of the syntax inside the compiler, and turned
off the case-sensitive string comparing, so everything should be almost like
standard pascal. It's almost a mix of the best of both C and Pascal.

  WHATS DIFFERENT (from QCC):
    + Procedure and Function identifiers are now used.
    + Declare a function or procedure normally:
        Function foo(float a, float b) : float;
        Begin
          ...
        End;

        Function e () : float;
        Begin
          return 2.7182818281828;
        End;

      ****A () must be used if there are no parameters for the function.
          Also, to call a procedure or function a () must be used.
    - The C-type declarations for variables are still used, instead of
      the standard pascal "var <identifier> : <type>". Tell me if you'd
      like this changed. I like it better with C-type declarations.
    + Not case-sensitive.
    + ":=" and "=" are now used, instead of "=" and "==".
    + Operators like "*:=", "+:=", "-:=", and "/:=" are now implemented.
    + "++" and "--" are implemented, but are only to be used IN FRONT
      of the identifier, like so:
        ++q;
      It acts as the normal C operator when the "++" is AFTER the identifier.
    + The "forward" keyword is now implemented and MUST BE USED to declare
      a forwarded procedure. eg:
        Procedure Write(...); #1;
        Function foo(float a, float b) : float; forward;

        Procedure hi(float b);
        Begin
          Local Float a;
          a := foo(b, 5);
          Write('a = %f\n', a);
        End;

        Function foo(float a, float b) : float;
        Begin
          return a + b;
        End;

    + "begin" and "end" are used instead of "{" and "}".
    + The "while" keyword and "repeat..until" keywords are now like pascal.
    + I kept the "return" keyword, instead of using the function name as
      the return variable.
    + The "Write" procedure is used like the "printf" function of C. But,
      the only variables able to be displayed are floats "%f" and vectors
      "%v".
    + External procedure definitions are defined like so:
        Procedure <name> ( <parm, parm, parm..> or <...>); #xx;
                                   or
        Function <name> ( <parm, parm, parm..> or <...>) : <type>; #xx;

      xx is the built-in function number to be called inside the game.
    + Exponents are now implemented with the "^" operator. eg:
        q := (3 ^ 2) * 2;
    + Bit shifting is now implemented with "<<" and ">>".
    + A couple of other changes I maybe forgot to mention...

THE INTERPRETER:

  The code interpreter contains all the built-in functions and console
commands used to execute the code compiled with BPC. It was written with
the Free Pascal PPC386 compiler, and is compatible with TP7.0. All this
coding took me at least 60 hours collectively to get working correctly. I'm
not sure if it is 100% bug-free, but it seems to work fine for me.
  You may use this code in your games/applications freely, but give a little
credit where credit is due (see CREDITS at bottom of document).
  This compiler/interpreter package was originally intended to be written
for my Blaster Master game that I'm creating. I haven't implemented it into
the game yet, but I plan to.

BUGS:

  I just recently fixed a few MAJOR bugs in the interpreter code. Some of the
entity fields' assignment opcodes weren't working properly. I fixed this and
a few other things, plus I've included a cool console-style environment for
the interpreter. The command list shows up at the start to show you how to
use the console.

CREDITS:

  All the coding and testing and debugging was done by me, MetalMassacre. You
can contact me by:

   e-mail:            metalmassacre@hotmail.com
   MSN-messenger:     metalmassacre
   Yahoo! Messenger:  metalmassacre_2000
   ICQ:               85091693

  I'm not online very much, but I do check my e-mail frequently. I'll try to
respond within maybe 2 days or less.
  I will be updating and changing this compiler quite frequently so look for
more releases. Also, tell me what you'd like to be changed, added, or taken
out, and I'll try my best to do it.

  Well, that's it. I've included my example code for you to look over and
get a feel for it.
