ArticleslgStudy

computer science

Atari BASIC

Atari 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 Atari BASIC rather than just read about it. In short: Atari BASIC is an interpreter for the BASIC programming language that shipped with Atari 8-bit computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways.

Atari BASIC — main illustration
Atari BASIC — illustration

Key takeaways

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

Reference excerpt

Atari BASIC is an interpreter for the BASIC programming language that shipped with Atari 8-bit computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays. The language was distributed as an 8 KB ROM cartridge for use with the 1979 Atari 400 and 800 computers. Starting with the 600XL and 800XL in 1983, BASIC is built into the system. There are three versions of the software: the original cartridge-based "A", the built-in "B" for the 600XL/800XL, and the final "C" version in late-model XLs and the XE series. They only differ in terms of stability, with revision "C" fixing the bugs of the previous two. Despite the Atari 8-bit computers running at a higher speed than most of its contemporaries, several technical decisions placed Atari BASIC near the bottom in performance benchmarks.

Development The machines that would become the Atari 8-bit computers were originally developed as second-generation video game consoles intended to replace the Atari VCS. Ray Kassar, the new president of Atari, decided to challenge Apple Computer by building a home computer instead. This meant the designs needed to include the BASIC programming language, the standard for home computers. In early 1978, Atari licensed the source code to the MOS 6502 version of Microsoft BASIC. It was offered in two versions: one using a 32-bit floating point format that is about 7800 bytes when assembled, and another using an extended 40-bit format that is close to 9 KB. Even the 32-bit version barely fit into the 8 KB size of the machine's ROM cartridge format. Atari also felt that they needed to expand the language to support the hardware features of their computers, similar to what Apple had done with Applesoft BASIC. This increased the size of Atari's version to around 11 KB; Applesoft BASIC on the Apple II+ is 10,240 bytes long. After six months the code was pared down to almost fit in an 8 KB ROM, but Atari had a January 1979 deadline for the Consumer Electronics Show (CES) where the machines would be demonstrated. They decided to ask for help to get a version of BASIC ready in time for the show.

Shepardson Microsystems

In September 1978, Shepardson Microsystems won the bid on completing BASIC. At the time they were finishing Cromemco 16K Structured BASIC for the Z80-based Cromemco S-100 bus machines. Developers Kathleen O'Brien and Paul Laughton used Data General Business Basic, an integer-only implementation, as the inspiration for their BASIC, given Laughton's experience with Data General on a time-sharing system. Cromemco BASIC includes an extended floating point implementation using a 14-digit binary-coded decimal (BCD) format made possible using all 16 registers of the Zilog Z80 processor. As it converts all data to the internal format at edit time, small constants like "1" use ~8 bytes of memory, and this could be a particular issue when storing arrays of numbers. To address this, the language also supports a smaller 6-digit BCD format. Even the smallest BASICs on the 6502 used about 10K. For instance, Commodore BASIC used 9K but also relies on support from the KERNAL, while Applesoft BASIC is 10,780 bytes. To meet the goal of fitting in an 8K ROM, the new BASIC would be in two parts: the language itself on the cartridge and a 2K floating point library in the system's 10K ROM supporting only the 6-digit format. Atari accepted the proposal, and when the specifications were finalized in October 1978, Laughton and O'Brien began work on the new language. The contract specified the delivery date on or before 6 April 1979 and this also included a File Manager System (later known as DOS 1.0). Atari's plans were to take an early 8K version of Microsoft BASIC to the 1979 CES, then switch to Atari BASIC for production. Development proceeded quickly, helped by a bonus clause in the contract, which led to the initial version being delivered in October. Atari took an 8K cartridge version to CES instead of Microsoft's. Atari Microsoft BASIC was later a separate product.

Releases The version Shepardson gave to Atari for the CES demo was not intended to be final, and Shepardson continued to fix bugs. Unknown to Shepardson, Atari had already sent the CES version to manufacturing. This version is known as Revision A. It contains a major bug in a routine that copies memory: deleting lines of code that are exactly 256 bytes long causes a lockup after the next command is entered. The Reset key does not fix it. The language was distributed as an 8 KB cartridge for use with the 1979 Atari 400 and 800 computers and included the Atari BASIC Reference Manual written by Carol Shaw and Keith Brewster. Revision B attempted to fix the major bugs in Revision A and was released in 1983 as a built-in ROM in the 600XL and 800XL models. While fixing the memory copying bug, the programmer noticed the same pattern of code in the section for inserting lines, and applied the same fix. This instead introduced the original bug into this code. Inserting new lines is much more common than deleting old ones, so the change dramatically increased the number of crashes. Revision B also adds 16 bytes to a program every time it is SAVEd and LOADed, eventually causing the machine to run out of memory for even the smallest programs. Mapping the Atari described these as "awesome bugs" and advised Revision B owners "Don't fool around; get the new ROM, which is available on cartridge" from Atari. The book provides a type-in program to patch Revision B to Revision C for those without the cartridge. Revision C eliminates the memory leaks in Revision B. It is built-in on later versions of the 800XL and all XE models including the XEGS. Revision C was also available as a cartridge. The version can be determined by typing PRINT PEEK(43234) at the READY prompt. The result is 162 for Revision A, 96 for Revision B, and 234 for Revision C. The complete, annotated source code and design specifications of Atari BASIC were published as The Atari BASIC Source Book in 1983.

Description

Program editing

… excerpt ends here. Continue reading the full article.

Illustrations

Atari BASIC illustration
Atari BASIC: 8K Atari BASIC cartridge
8K Atari BASIC cartridge
Atari BASIC: Syntax errors are reported immediately after a line is entered.
Syntax errors are reported immediately after a line is entered.

Worked examples

Example 1 — a first encounter with Atari BASIC

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

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

How to study Atari BASIC in 20 minutes

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

Frequently asked questions

What is Atari BASIC in simple terms?

Atari BASIC is an interpreter for the BASIC programming language that shipped with Atari 8-bit computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways.

Why does Atari 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 Atari 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 Atari BASIC.

Tags

  • Atari 8-bit computer software
  • BASIC interpreters
  • BASIC programming language family
  • Discontinued BASICs
  • Programming languages created in 1978

Keep exploring