ArticleslgStudy

computer science

Commodore BASIC

Commodore BASIC 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 Commodore BASIC rather than just read about it. In short: Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985). The core is based on 6502 Microsoft BASIC, and as such it shares many characteristics with other 6502 BASICs of the time, such as Applesoft BASIC.

Commodore BASIC — main illustration
Commodore BASIC — illustration

Key takeaways

  • Commodore BASIC 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 Commodore BASIC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Commodore BASIC from memory before moving on to harder problems.

Reference excerpt

Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985). The core is based on 6502 Microsoft BASIC, and as such it shares many characteristics with other 6502 BASICs of the time, such as Applesoft BASIC. Commodore licensed BASIC from Microsoft in 1977 on a "pay once, no royalties" basis after Jack Tramiel turned down Bill Gates' offer of a $3 per unit fee, stating, "I'm already married," and would pay no more than $25,000 for a perpetual license. The original PET version was very similar to the original Microsoft implementation with few modifications. BASIC 2.0 on the C64 was also similar, and was also seen on C128s (in C64 mode) and other models. Later PETs featured BASIC 4.0, similar to the original but adding a number of commands for working with floppy disks. BASIC 3.5 was the first to really deviate, adding a number of commands for graphics and sound support as well as a mini-assembler integrated into the machine language monitor on the C16 and Plus/4. BASIC 7.0 was included with the Commodore 128, and included structured programming commands from the Plus/4's BASIC 3.5, as well as a sprite editor and keywords designed specifically to take advantage of the machine's new capabilities. The last, BASIC 10.0, was part of the unreleased Commodore 65.

History Commodore took the source code of the flat-fee BASIC and further developed it internally for all their other 8-bit home computers. It was not until the Commodore 128 (with V7.0) that a Microsoft copyright notice was displayed. However, Microsoft had built an easter egg into their software to prove its provenance: the command WAIT 6502,1 on a PET with the version 2 or "upgrade" BASIC will show MICROSOFT! at the top of the screen. (The easter egg was well-obfuscated—the message did not show up in any disassembly of the interpreter.) The popular Commodore 64 came with BASIC v2.0 in ROM even though the computer was released after the PET/CBM series that had version 4.0 because the 64 was intended as a home computer, while the PET/CBM series were targeted at business and educational use where their built-in programming language was presumed to be more heavily used. This saved manufacturing costs, as the V2 fit into smaller ROMs.

Technical details

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Commodore BASIC

Start with the simplest possible case. Write down what Commodore BASIC 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 Commodore BASIC 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 Commodore BASIC 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 Commodore BASIC

In research
Commodore BASIC 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 Commodore BASIC 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
Commodore BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC interpreters, BASIC programming language family, Commodore 64 software, so understanding it makes those chapters shorter.
In everyday life
Look for Commodore BASIC 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 “Commodore BASIC” →

How to study Commodore BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Commodore BASIC 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 Commodore BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Commodore BASIC in simple terms?

Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985). The core is based on 6502 Microsoft BASIC, and as such it shares many chara…

Why does Commodore BASIC 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 Commodore BASIC?

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 Commodore BASIC.

Tags

  • BASIC interpreters
  • BASIC programming language family
  • Commodore 64 software
  • Commodore software
  • Discontinued Microsoft BASICs
  • Microsoft programming languages
  • Programming languages created in 1977
  • VIC-20 software

Keep exploring