BASIC09 is a structured BASIC dialect developed by Microware for the then-new Motorola 6809 CPU. Somewhat in the fashion of UCSD Pascal it was implemented via 'compilation' into an intermediate representation. The language processor turned BASIC09 source code into a tokenized, optimized, bytecode, called I-code in the BASIC09 literature. If that bytecode version of the source were saved (called packing), it could also be executed by a much more compact version of the interpreter, called RunB (no editor, no prettyprinter, no extraneous information included for human convenience, no debugger, ...).
BASIC09 provided very impressive features for its time (it was first available in 1980), and most especially for its memory requirements. It was also fast, in comparison with nearly all other BASICs. Most of the features listed below have significant benefits for those writing more than example programs.
- reasonably structured control flow provisions (eg, line numbers were mainly needed for computed GOTO, as BASIC09 did not have a switch/case statement, or computed GOSUB)
- structure declaration (rare in any BASIC variant then; more common now)
- intrinsic integer and Boolean data types
- more than two significant characters in variable names (some BASICs of the time allowed only 1(!), many allowed only 2)
- procedures with local variables (indeed, all variables in BASIC09 are local to procedures) and parameter passing by reference
- a reasonable debugger (its only significant drawback was that one could not examine the contents of fields in structures)
- a way to interface to machine language code, which could be passed parameters using the BASIC09 calling sequence
- automatic prettyprinting of source, which enforced a standard layout and avoided the ghastly mess that was the usual appearance of a program of any size in the interpreted BASICs of the time. Programmers normally would cram as many lines together as possible to avoid line number memory overhead -- not a problem in BASIC09
Microware produced a version of BASIC09 for OS-9/68000, calling it Microware BASIC, but has not developed a version for OS-9000 (the portable version of OS-9).