Encyclopedia > BASIC09

  Article Content

BASIC09 programming language

Redirected from BASIC09

BASIC09 is a structured BASIC dialect developed by Microware for the then-new Motorola 6809 CPU. In the fashion of UCSD Pascal it was implemented via a virtual machine. The language processor turned the source code into a bytecode, called I-code in the BASIC09 literature, that an emulator for the virtual machine executed.

BASIC09 provided some very impressive features for its time (it was first available in 1980) and for its size:

  • reasonable structured control flow (line numbers were mainly needed for computed GOTO, as BASIC09 did not have a switch/case statement, or computed GOSUB[?])
  • the ability to declare structures
  • integer and Boolean data types
  • more than two significant characters in variable names
  • procedures with local variables (indeed, all variables in BASIC09 are local) and parameters passed by reference
  • a reasonable debugger (its sole drawback was that one could not examine the contents of fields in structures)
  • a way to call out 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 typical appearance of a program of any size in the interpreted BASICs of the time, for which programmers would cram as many lines together as possible to avoid line number overhead

Once one or more BASIC09 procedures are debugged to the programmer's satisfaction, they can be "packed" or converted permanently to the bytecode form. Comments and names of local variables are discarded during packing, so that in BASIC09, unlike the typical interpreted BASICs of the time, comments and intelligible variable names were not considered a burden to be avoided in the name of efficiency. Packed BASIC09 procedures are in fact OS-9 modules, and the OS-9 shell recognizes them as I-code and passes them off to the virtual machine emulator RunB for execution. RunB avoids a great deal of the overhead of the typical interpreted BASICs of the day--not to mention that one can do integer calculations where appropriate rather than doing everything in floating point--so that BASIC09 programs run very quickly in comparison with interpreted BASICs of the time.

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).



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
BBC News 24

... News 24 is the BBC's 24-hour news television channel. It first broadcast in November 1997 and at first only cable television subscribers could view it. In 1999, with ...

 
 
 
This page was created in 22.2 ms