This page (revision-114) was last changed on 24-Feb-2023 14:10 by Andreas Tartz 

This page was created on 08-Mar-2010 20:15 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
114 24-Feb-2023 14:10 18 KB Andreas Tartz to previous
113 24-Feb-2023 13:11 18 KB Andreas Tartz to previous | to last
112 24-Feb-2023 13:09 18 KB Andreas Tartz to previous | to last
111 24-Feb-2023 13:06 17 KB Andreas Tartz to previous | to last
110 24-Feb-2023 12:57 17 KB Andreas Tartz to previous | to last
109 24-Feb-2023 12:53 17 KB Andreas Tartz to previous | to last
108 24-Feb-2023 12:38 17 KB Andreas Tartz to previous | to last
107 03-Feb-2023 15:21 17 KB Maury Markowitz to previous | to last
106 13-Dec-2021 16:05 17 KB Maury Markowitz to previous | to last
105 16-Sep-2021 13:46 17 KB Maury Markowitz to previous | to last
104 16-Sep-2021 13:30 17 KB Maury Markowitz to previous | to last general cleanup
103 29-Jul-2020 21:57 17 KB Peter Dell to previous | to last TURBO-BASIC XL ==> Turbo-BASIC XL
102 23-May-2020 05:03 17 KB Roland B. Wassenberg to previous | to last
101 01-May-2020 02:03 17 KB Roland B. Wassenberg to previous | to last

Page References

Incoming links Outgoing links
Atari BASIC

Version management

Difference between version and

At line 3 added 30 lines
!Background
Atari BASIC is the "standard" BASIC dialect for the 8-bit series. It was originally sold separately from the machines in a (relatively expensive) 8kB ROM cartridge. Starting with the Atari 1200XL, the ROMs were included inside the machine. There are three versions, Revision A, B and C, which fixed various bugs.
Atari BASIC was written by Shepardson Microsystems in late 1978 as part of a somewhat rushed effort to make a BASIC that would fit in an 8kB ROM. The standard BASIC of the era, Microsoft's "8k basic", was actually closer to 9kB, and the most common versions were about 11kB. In spite of their best efforts, Atari programmers failed to pare it to 8kB, and hired Shepardson to do it for them.
Shepardson cut some features and added others to take advantage of some of the features of the new machine. The result required about 10kB, so to cross the remaining gap, some of the core libraries were moved out of the language and into the operating system ROMs. This had the side-effect of allowing any other language on the Atari to use these routines as well.
Among the code moved to the OS ROMs was the floating point system, which was based on a 6-byte format. MS BASIC was also available in this format, but almost all examples found in contemporary machines used an expanded 9-byte format. The floating point code was also notoriously slow, and this had a significant performance impact on almost all programs.
Generally, Atari BASIC was among the slowest BASICs of its era, both due to the math code and two problems involving loops. The performance issues led to a profusion of 3rd party BASICs, some of which continue to be developed to this day. By replacing the math libraries and fixing these two loop issues, speed improves on the order of 3 to 5 times in most programs.
!Design notes
Atari BASIC has some key differences with the more common MS-derived BASICs found on most contemporary machines. This included the 6-byte vs. 9-byte math, but also included numerous syntax changes as well.
Generally, one can describe Atari BASIC's design philosophy as orthogonal, in that any command could be used anywhere (there was no difference between "immediate mode" other than the lack of a line number) and every output had a corresponding input. For instance, all BASICs include a LIST command that outputs the source in text form to the screen or another device. Atari BASIC added an ENTER command which did the reverse, taking text from a device and putting it into the program. This opened up a number of possible overlay techniques that other versions lacked.
The most noticable difference between Atari BASIC and MS-derived versions is the string handling. Atari BASIC used a greatly simplified system of character-arrays instead of the dynamic strings in MS. This meant that all strings had to be predefined using DIM, and their length could not be changed during run-time. There are a number of advantages to this approach, notably speed, but memory handling is more difficult and conversion of standard programs from MS listings is more difficult.
!What's missing
In addition to differences like string handling, Atari BASIC also lacked some of the less-used features found in MS BASIC. Among these are...
* TAB and SPC, for formatting output
* PRINT USING, which formatted output
* INPUT "prompt", A$, which printed the prompt and placed the cursor at the end
* DEF FN, which defines mathematical functions
* ON X GOTO/GOSUB, similar to C's switch construct
!What's new
To allow BASIC programmers access to the advanced features of the system, Atari BASIC added commands for defining the GRAPHICS, changing COLORs, MOVEing and drawing a LINETO, playing SOUND, and others.
At line 5 changed one line
* [The Atari Basic source book|The Atari Basic Source Book]
* [The Atari Basic source book|The Atari Basic Source Book], contains the complete source code for Atari BASIC, fully described. Useful for anyone interested in interpreter design.
At line 75 added one line
* [Atari BASIC: the good, the bad and the ugly|http://archive.li/njp7N]