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.



