BASIC09

BASIC09 is a structured BASIC programming language 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 microcomputer BASICs. Most of the features listed below have significant benefits for those writing more than example programs.

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

Significant features

  • 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 Microsoft BASIC variants 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

Procedure packing

Once one or more BASIC09 procedures are debugged to the programmer's satisfaction, they can be "packed" (or converted permanently to the I-code (ie, bytecode) form) into a file. Among other things, line numbers, comments and names of local variables are discarded during packing, so that, unlike the typical interpreted BASICs of the time, comments and intelligible variable names incur no runtime cost and were therefore not a 'burden' programmers learned to avoid to maximize runtime execution time or memory efficiency. For the BASIC09 releases intended for the OS-9 operating systems, "packed" procedures are in fact OS-9 modules; the OS-9 shell recognizes them as I-code and automatically calls the RunB interpreter to execute them. RunB avoids much of the runtime overhead found in 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 extremely quickly in comparison with equivalent programs in the interpreted BASICs of the time. RunB was also smaller than nearly every other BASIC interpreter package of even remotely comparable capabilities.

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools