ArticleslgStudy

computer science

BASIC09

BASIC09 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand BASIC09 rather than just read about it. In short: BASIC09 is a structured BASIC programming language dialect developed by Microware on behalf of Motorola for the then-new Motorola 6809 CPU and released in February 1980. It is primarily used with the OS-9 operating system, released in 1979.

Key takeaways

  • BASIC09 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect BASIC09 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of BASIC09 from memory before moving on to harder problems.

Reference excerpt

BASIC09 is a structured BASIC programming language dialect developed by Microware on behalf of Motorola for the then-new Motorola 6809 CPU and released in February 1980. It is primarily used with the OS-9 operating system, released in 1979. Microware also released a version for OS-9/68k on the 68000 as Microware BASIC. 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. Users can further compile code using the PACK command, at which point it can be called directly by OS-9 and operated as native code. 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. The language includes a number of structured programming additions, including local variables, the ability to ignore line numbers in favor of named routines, user-defined structures, and several distinct base data types including 16-bit and 8-bit (byte) integers, in addition to floating point and strings. In June 2026, open source developer Boisy Gene Pitre announce BASIC09 front-end for LLVM.

Syntax

Program organization A key difference between BASIC09 and conventional BASICs of the era, like the canonical Microsoft BASIC, is the addition of the PROCEDURE structure which created separately executable blocks of code. Code in a PROCEDURE had more in common with complete programs in other BASICs, including the variables being local to the code, and their ability to be executed in a stand-alone fashion. 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. Parameters were imported into the procedure using the PARAM keyword, in this example PARAM a,b:

PROCEDURE add PARAM a,b PRINT a+b

A side-effect of the use of named procedures is that the resulting memory workspace is, in effect, its own namespace. In this respect, the BASIC09 system appears to the user to be a directory of callable programs. This contrasts with typical BASICs, where only one program is available at a given time and the construction of larger programs calling library-like code generally requires the source code to be copied and pasted between separate programs. In BASIC09, the user can LOAD procedures by name into the workspace and then call them from their own code to construct larger programs from the separately stored procedures. In addition to code in the workspace, if the program invokes RUN with a procedure name that could not be found, it would then look for a disk file with the same name and load and run that file. This worked not only with BASIC09 code, but also any other executable program, including machine language files. This meant that BASIC09 could easily call system routines. In addition to RUN, other common BASIC commands likewise used names. For instance, LIST bob would print out the source code ("list") the procedure named "bob", while LIST* prints out all of the procedures currently in memory. The prettyprinted output from LIST could be redirected to a file or a printer with a shell-like notation, e.g. LIST bob >/p. One could also SAVE and LOAD procedures from storage.

Structured programming 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. For instance, the IF statement could be used in the traditional IF...THEN format on a single line, or it could be used in a structured multi-line format:

IF x>10 THEN PRINT "x is larger than 10" ELSE PRINT "x is smaller than 10" ENDIF

FOR/NEXT loops naturally have a structured format as the NEXT can be placed on any line, but BASIC09 also added WHILE/ENDWHILE and REPEAT/UNTIL for additional clarity when working with non-indexed loops. It also included the center-exit LOOP/ENDLOOP which used the EXITIF statement for testing anywhere in the loop's body.

Data types BASIC09 included several built-in data types. In addition to the traditional string (STRING) and 40-bit floating point (REAL) types found in most BASICs of the era, it also included the 16-bit signed INTEGER, the 8-bit unsigned BYTE, and the logical BOOLEAN type. The BOOLEAN types were not packed into bytes, a single BOOLEAN used an entire 8-bit byte to store a single value. The language provided separate bytewise boolean operators for bitwise operations on BYTEs and INTEGERs. In contrast to other BASICs that also operated different base types, BASIC09 did not "decorate" the variable name to indicate the type, and instead used the DIM for definitions; for instance, DIM a,b:BOOLEAN to declare two BOOLEAN variables, or DIM c(5):INTEGER for an array of five INTEGERs. Additionally, BASIC09 included the TYPE keyword, which allowed compound types to be defined, with each "element" listed on a single line separated by semicolons. For instance:

TYPE employee_record=name:STRING;number(2):INTEGER;former:BOOLEAN

defines an employee record type named employee_record with three elements, name, number and former. The employee_record type can now be used in a definition like any other type, for instance, DIM employees(100):employee_record, which defines an array of 100 employee_record's. The elements are accessed in code using dot notation, for instance, employees(50).name="Bob".

Runtime

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with BASIC09

Start with the simplest possible case. Write down what BASIC09 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to BASIC09 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about BASIC09 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of BASIC09

In research
BASIC09 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses BASIC09 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
BASIC09 is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC interpreters, TRS-80 Color Computer software, so understanding it makes those chapters shorter.
In everyday life
Look for BASIC09 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “BASIC09” →

How to study BASIC09 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what BASIC09 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain BASIC09 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is BASIC09 in simple terms?

BASIC09 is a structured BASIC programming language dialect developed by Microware on behalf of Motorola for the then-new Motorola 6809 CPU and released in February 1980. It is primarily used with the OS-9 operating system, released in 1979.

Why does BASIC09 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study BASIC09?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on BASIC09.

Tags

  • BASIC interpreters
  • TRS-80 Color Computer software

Keep exploring