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 6 changed one line
Atari originally licensed the 6502-assembler code for Microsoft BASIC, which was about 9k in size. The Atari design limited cartridges to 8k, and the Atari programmers struggled to cut the MS code down enough to fit in a cart. That was bad enough of its own, but they really wanted to add additional instructions to take advantage of the Atari's graphics and sound as well. Eventually they gave up and went looking for a 3rd party to do it for them.
Atari originally licensed the 6502-assembler code for Microsoft BASIC. This came in two versions, a 9k one and a more widely used 12k version. The difference between the two was in the math library, the smaller version used 6-byte numbers while the larger used 9-byte numbers. The Atari hardware design limited cartridges to 8k, so the Atari programmers started with the smaller version and struggled to cut it down enough to fit in a cart. That was bad enough of its own, but they really wanted to add additional instructions to take advantage of the Atari's graphics and sound as well. Eventually they gave up and went looking for a 3rd party to do it for them.
At line 12 changed one line
Among the code moved to the OS ROMs was the floating point math system, which was based on a 6-byte binary-coded-decimal (BCD) format. The 9k version of MS BASIC also used this format, while the much more common 11k version (used by Commodore and others) used an expanded 9-byte format. This meant the Atari has somewhat less accuracy, although in practice this meant little (the IBM PC had even less). In contrast, a very real issue was that the SMI floating point code was terribly slow, and this had a significant performance impact on almost all programs.
Two major pieces of code were moved out of the BASIC into the OS ROM. The first was a set of graphics routines to set up the screen, draw lines, and similar. The second was the floating point math system, based on a new implementation of the 6-byte binary-coded-decimal (BCD) format. Both libraries were notoriously slow. Generally, Atari BASIC was among the slowest BASICs of its era, both due to the OS code and two problems involving loops.
At line 14 changed one line
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, and this is a common feature of 3rd party BASICs like [TURBO-BASIC XL] and [FastBasic].
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, and this is a common feature of 3rd party BASICs like [TURBO-BASIC XL] and [Altirra Basic]. For even higher performance, [FastBasic] uses a p-code system that can be quickly interpreted.
At line 17 changed one line
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.
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 "modeless" and "orthogonal".
At line 19 changed one line
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.
Most BASICs of the era had the concept of "immediate mode" and "program mode", and some commands could only be used in one more or the other. A good example in MS BASIC is the {{LIST}} command, which could only be used in immediate mode, at the "command line". Atari BASIC removed this limitation, one could write a program containing {{10 LIST}}.
At line 21 changed one line
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.
Additionally, most BASICs had commands that read input or produced output, for example, the {{INPUT}} can be thought of as the opposite of {{PRINT}}. Atari BASIC was orthogonal in that every such command had a partner. For instance, {{LIST}} produces output, so the new command {{ENTER}} reversed this, reading a program listing from a device. This opened up a number of possible overlay techniques that other BASICs lacked.
At line 23 added 2 lines
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.
At line 26 changed 5 lines
* 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
* {{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