BASIC09

[2] In contrast to typical BASICs of the era, BASIC09 includes a multi-pass compiler that produces compact bytecode known as I-code.

I-code replaces a number of data structures found in other BASICs with direct pointers to code and values, speeding performance.

In the case of PACKed code, a cut-down version of the BASIC09 runtime system is used, Runb, further improving memory footprint and load time.

PROCEDUREs were called by name using the RUN command, and could include variables for function-call semantics; for instance, RUN add(4,7) calls a procedure named add that takes two parameters.

[6] In addition to the organizational properties of the PROCEDURE, BASIC09 also included a number of extensions to the flow control statements found in BASIC to provide more structure.

[13] Note that the language is case sensitive for user-provided values like procedure and variable names, but not for keywords.

[16] The internal multipass compiler converts BASIC09 source code into a tokenized, optimized, bytecode, called I-code.

[17] I-code differs from the more traditional tokenizing approach found in most BASICs in that a number of items were placed directly in memory instead of using references that then had to be looked up.

[18][c] For added performance, BASIC09 also included the PACK command which took a procedure name and returned an optimized version.

Some of these optimizations included removing non-coding instructions like code comments and the replacement of constant expressions to a single value.

For instance, PACK would recognize that LET x=x+SQR(100)/2 contains only constants on the right, and replaces it with the code x=x+5, which requires only a single operation at runtime, the addition, removing the division and square root.

[19] Although it was common to run programs within the BASIC09 environment, as it was in other BASICs, BASIC09 also shipped with a separate run-only version of the code known as Runb.

Runb removed the editing and debugging features of the system, and was about half the size of the full BASIC09 as a result.