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 2 changed one line
[{TableOfContents }]
At line 4 changed one line
Atari BASIC is the "standard" BASIC dialect for the 8-bit series. It was originally sold separately as a (relatively expensive) 8k ROM cartridge. Starting with the 1200XL, the ROMs were included inside the machine. There are three versions, the original version, retroactively known as Revision A, and the updated Revision B and C which fixed various bugs.
Atari BASIC is the "standard" BASIC dialect for the 8-bit series. It was originally sold separately as a (relatively expensive) 8k ROM cartridge. Starting with the 600XL/800XL, the ROMs were included inside the machine. There are three versions, the original version, retroactively known as Revision A, and the updated Revision B and C which fixed various bugs.
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, and eventually chose Shepardson Microsystems.
Atari originally licensed the 6502-assembler code for Microsoft BASIC. This came in two versions, one that was about 7900 bytes that used a 32-bit (6-digit) floating point number format, and another that was closer to 9000 that included an expanded floating point format with a 40-bit (9-digit) numbers. The vast majority of 8-bit machines used the larger 9k/40-bit version, and then further expanded it with additional functions for basic input/output. For instance, the BASIC, character set and I/O in the early PET machines was supplied in a total of 16k of ROM.
At line 8 changed one line
Shepardson, or SMI for short, won the contract. They proposed cutting some features and adding others to provide access to the capabilities of the new machine. The result required about 10k, so to cross the remaining gap to 8k, 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.
When the project was still a games console, Atari had selected an 8k cartridge format because that was an easy size to supply in a single ROM. So the Atari programmers started with the smaller 8k version of the MS code and struggled to cut it down enough to fit in a cart. That was hard enough of its own, but they really wanted to add additional instructions to take advantage of the Atari's graphics and sound. Eventually, some time in the summer of 1978, they gave up and went looking for a 3rd party to do it for them.
At line 10 changed one line
By the time SMI was hired, Atari was in something of a rush to get the BASIC. They were planning to show the machines in January 1979, and the contract required SMI to deliver the final version by April of that year. SMI completed it well in advance of the deadline, in October 1978, so Atari took an early version of the code with them to the CES show in January. To SMI's surprise, they learned that Atari had begun burning that version to ROM, even though it had several known bugs. SMI offered an updated version with various fixes, but Atari didn't bother using it, and instead shipped the buggy version for years.
Atari approached Shepardson Microsystems Inc, or SMI for short, who had written a number of 6502-based products and a series of BASICs for other machines. They proposed a simplified syntax and the cutting of a number of rarely-used features, leaving more room for new commands for graphics and sound. Even then, the result required about 10k, so to cross the remaining gap to 8k, 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.
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.
By the time SMI was hired, Atari was in something of a rush to get a working BASIC. They were planning to show the machines in January 1979, using the working MS version, but then sell the machines later that year with the SMI version instead. The original contract required SMI to make its final delivery in April 1979, but it contained bonus clauses if they finished early. They did: a working version was delivered in October 1978, so Atari to that to CES instead. To SMI's surprise, they learned that Atari had begun burning that version to ROM for sale, even though it had several known bugs. SMI offered an updated version with various fixes, but Atari didn't bother using it, and instead shipped the buggy version for years.
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].
In order to fit the code into a 8k ROM, 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 16 added 5 lines
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.
[{Image src='Atari_Basic-Box.jpg' width=359 height=483 }]
Atari BASIC - Computing Language box
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 28 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
At line 37 changed one line
!! Books
!!Source Code
[{Image src='The_Atari_BASIC_Source_Book-Bill_Wilkinson-Kathleen_O_Brien-Paul_Laughton.jpg' width=305 height=467 }]
[The Atari BASIC Source Book - Bill Wilkinson, Kathleen O'Brien and Paul Laughton|https://data.atariwiki.org/DOC/The_Atari_BASIC_Source_Book-Bill_Wilkinson-Kathleen_O'Brien-Paul_Laughton.pdf] ; size: 76.8 MB ; 316 pages
At line 39 removed 12 lines
* [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.
* [Atari Basic Rev C Reference Manual]
* [ATARI Basic Leitfaden.pdf]
* [Atari BASIC Quick Reference Guide-Gilbert Held.pdf]
* [ATARI BASIC-Handbuch für Selbststudium und Praxis-BOB ALBRECHT, Le Roy Finkel, JERALD BROWN-Screen.pdf] 214 Doppelseiten, OCR, 44,8 MB
!! CAR-Images
* [Basic Rev. C.car]
* [The Monkey Wrench.car] Tool for better editing Basic programs, version I
* [The Monkey Wrench II.car] Tool for better editing Basic programs, version II
At line 48 added 5 lines
[{Image src='Cart_800er.jpg' width=200 height=247 }]
Atari Basic Cartridge - brown - Revison A\\
\\
[{Image src='Cart_XE.jpg' width=200 height=247 }]
Atari Basic Cartridge - silver - Revison C ; Revision B was soldered in the machines only and therefore not available as a stand-alone cartridge
At line 53 changed 3 lines
* [Atari Basic Rev. A.rom]
* [Atari Basic Rev. B.rom]
* [Atari Basic Rev. C.rom]
* [Atari Basic Rev. A.rom] ; ? PEEK(43234) should return: 162
* [Atari Basic Rev. B.rom] ; ? PEEK(43234) should return: 96
* [Atari Basic Rev. C.rom] ; ? PEEK(43234) should return: 234
* [Monkey_Wrench_with_BASIC_(Rev._C).rom] ; both roms in just one 16 KiB file
* [Monkey_Wrench_II_OS-B_right_v1.rom] ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [Monkey_Wrench_II_OS-B_right_v2.rom] ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [Monkey Wrench II (OS-B, right, v1) with BASIC Rev. C.rom] ; both roms in just one 16 KiB file
* [Monkey Wrench II (OS-B, right, v2) with BASIC Rev. C.rom] ; both roms in just one 16 KiB file
* [Monkey_Wrench_II_XL_with_BASIC_(Rev._C).rom] ; both roms in just one 16 KiB file
At line 57 changed one line
!! Atari Basic Course: An Invitation to Programming 1-3
To create one 16 KiB-ROM out of 2 8 KiB ROMs, use the following method:
At line 59 changed 3 lines
* [An Invitation to Programming 1 CX4101]
* [An Invitation to Programming 2 CX4106]
* [An Invitation to Programming 3 CX4117]
__Windows:__
Go to the CMD shell and there to the directory, where the 2 files are, which should be combined, then type:\\
\\
copy /b monkey.rom+basic.rom allinone16k.rom\\
\\
and the resulting rom file can be found in the same directory.
At line 63 changed one line
!! Kurs 1: Programmieren leicht gemacht-Lernen Sie BASIC mit Dagmar Berghoff-TXG4110
__Unix/Mac:__
Start application shell/Terminal and then type cd and a blank. Drag the folder, in which the 2 files are, directly behind the blank. Check with typing ls -a, whether the 2 files can be seen. Then type:\\
\\
cat monkey.rom basic.rom > allinone16k.rom\\
\\
and the resulting rom file can be found in the same directory.\\
At line 65 changed one line
* [Programmieren leicht gemacht TXG4110]
!! CAR-Images
* [Atari_Basic_Rev._A.car] ; ? PEEK(43234) should return: 162
* [Atari_Basic_Rev._B.car] ; ? PEEK(43234) should return: 96
* [Atari_Basic_Rev._C.car] ; ? PEEK(43234) should return: 234
* [The Monkey Wrench.car] Tool for better editing Basic programs, version I
* [The Monkey Wrench II.car] Tool for better editing Basic programs, version II v2
* [Monkey_Wrench_with_BASIC_(Rev._C).car] ; both cartridges in just one 16 KiB file
* [Monkey_Wrench_II_OS-B_right_v1.car] ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [Monkey_Wrench_II_OS-B_right_v2.car] ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [Monkey_Wrench_II_XL_with_BASIC_(Rev._C).car] ; both cartridges in just one 16 KiB file. This is a patched BASIC, when initialized jumps to $8002 (right cartridge). Only this way it is runnig on a XL machine.
At line 67 changed one line
!! Kurs 2: Noch mehr BASIC-Lernen Sie BASIC mit Dagmar Berghoff-RXG 55007
!! Manuals
* [Atari Basic Reference Manual Rev. A (1980)|https://data.atariwiki.org/DOC/ATARI_BASIC_Reference_Manual.pdf] ; size: 77.7 MB ; 122 pages
* [Atari Basic Reference Manual-Product Update-C061038 Rev. A, Errata for the above manual (1982)|Atari_Basic_Reference_Manual-Product_Update-C061038_Rev._A-©_1982_Atari,_Inc.pdf] ; size: 4.2 MB ; 6 pages
* [Atari Basic Reference Manual Rev. C (1983)|https://data.atariwiki.org/DOC/Atari_Basic_Reference_Manual_Rev._C.pdf] ; size: 47.9 MB ; 134 pages
* [Atari BASIC - Bob_Albrecht, LeRoy Finkel and Jerald R. Brown (1979)|https://data.atariwiki.org/DOC/Atari_Basic_1979.pdf] ; size: 80.9 MB ; OCR ; 348 pages
* [Atari_Basic-Richard_Haskell (1983)|https://data.atariwiki.org/DOC/Atari_Basic_1983.pdf] ; size: 74.7 MB ; OCR ; 196 pages
* [Atari BASIC-XL Edition - Bob_Albrecht, LeRoy Finkel and Jerald R. Brown (1985)|https://data.atariwiki.org/DOC/Atari_BASIC_XL_Edition-Bob_Albrecht,_LeRoy_Finkel_and_Jerald_R._Brown_1985.pdf] ; size: 86.5 MB ; OCR ; 404 pages
* [ATARI BASIC-Handbuch für Selbststudium und Praxis-BOB ALBRECHT, Le Roy Finkel, JERALD BROWN|https://data.atariwiki.org/DOC/ATARI_BASIC-Handbuch_fuer_Selbststudium_und_Praxis-BOB_ALBRECHT,_Le_Roy_Finkel,_JERALD_BROWN.pdf] ; Größe: 44,8 MB ; OCR ; 214 Doppelseiten
* [ATARI Basic Leitfaden|ATARI Basic Leitfaden.pdf] ; Größe: 5,2 MB ; 11 Seiten
* [Atari BASIC - Quick Reference Guide - Gilbert Held|Atari BASIC Quick Reference Guide-Gilbert Held.pdf] ; size: 10.4 MB ; 8 pages
* [OSS Quick reference card for Atari Basic|oss-quick-reference-card-basic-a-plus.pdf] ; size: 3.4 MB ; 8 pages ; thank you so much Bill Lange for finding this very rare cards. :-)
* [Atari Basic Referenz-Karten|Atari_Basic_Referenz-Karten.pdf] ; Größe: 3,1 MB ; OCR ; 271 Seiten
* [Atari BASIC Source Book (2006)|Atari_BASIC_Source_Book_2006.pdf] ; size: 10.4 MB ; OCR ; 80 pages ; converted 2006 by Andreas Bertelmann for ABBUC ; thank you Andreas
* [Monkey_Wrench_-_Manual.pdf|http://data.atariwiki.org/DOC/Monkey_Wrench_-_Manual.pdf] ; size: 67.5 MB ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [Monkey_Wrench_II_-_Manual.pdf] ; size: 2.5 MB ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
* [The major differences between the Monkey Wrench II and Monkey Wrench II-XL cartridges|Monkey_Wrench_II_XL_-_Notes.rtf] ; thanks to [serious computerist|http://seriouscomputerist.altervista.org/pages/utility/utility.atari.htm], we really appreciate! :-)
At line 69 changed one line
* [Noch mehr BASIC RXG 55007]
!!Atari Basic Keywords
An incredible good site for all [Atari BASIC keywords|http://www.abbuc.de/software/133-software/softwarereferenz/309-atari-basic-referenz] ; thank you ABBUC, greatly appreciated! :-)
[{Image src='Atari_Basic_Keywords.jpg' width=718 height=323 }]
Atari Basic Keywords
At line 71 changed one line
!! Kurs 3: BASIC für Fortgeschrittene-Lernen Sie BASIC mit Dagmar Berghoff
!!Atari Basic Error Codes
2 - INSUFFICIENT MEMORY\\
3 - BAD VALUE\\
4 - TOO MANY VARIABLES\\
5 - STRING LENGHT ERROR\\
6 - OUT OF DATA\\
7 - BAD LINE NUMBER\\
8 - INPUT ERROR\\
9 - DIMENSION ERROR\\
10 - STACK OVERFLOW\\
11 - OVERFLOW/UNDERFLOW\\
12 - LINE NOT FOUND\\
13 - NO MATCHING FOR\\
14 - LINE TOO LONG\\
15 - GOSUB/FOR DELETED\\
16 - RETURN ERROR\\
17 - SYNTAX ERROR\\
18 - INVALID CHARACTER\\
19 - PROGRAM TOO LONG\\
20 - BAD DEVICE NUMBER\\
21 - LOAD FILE ERROR
At line 73 changed one line
* [BASIC für Fortgeschrittene]
!! Atari Basic Course: An Invitation to Programming 1-3
* [Course 1: An Invitation to Programming 1 - Fundamentals of Basic Programming CX4101|An Invitation to Programming 1 CX4101]
* [Course 2: An Invitation to Programming 2 - Writing Programs one and two CX4106|An Invitation to Programming 2 CX4106]
* [Course 3: An Invitation to Programming 3 - Introduction to Sound and Graphics CX4117|An Invitation to Programming 3 CX4117]
At line 75 changed one line
!! Source and Tools
!! Atari Basic Kurs (deutsch): Teil 1 und 2 sind vorhanden, Teil 3 wurde leider nie fertig
* [Kurs 1: Programmieren leicht gemacht-Lernen Sie BASIC mit Dagmar Berghoff-TXG4110|Programmieren leicht gemacht TXG4110]
* [Kurs 2: Noch mehr BASIC-Lernen Sie BASIC mit Dagmar Berghoff-TXG 55007|Noch mehr BASIC TXG 55007]
* [Kurs 3: BASIC für Fortgeschrittene-Lernen Sie BASIC mit Dagmar Berghoff|BASIC für Fortgeschrittene]
At line 145 added one line
!! Source and Tools
At line 165 added 28 lines
!!Pictures
[{Image src='Atari_Basic_Reference_Manual_800_.jpg' width=533 height=723 }]
[Atari Basic Reference Manual Rev. A|https://data.atariwiki.org/DOC/ATARI_BASIC_Reference_Manual.pdf] ; size: 77.7 MB ; 122 pages\\
\\
[{Image src='Atari_Basic_Reference_Manual_XE.jpg' width=437 height=643 }]
[Atari Basic Reference Manual Rev. C|https://data.atariwiki.org/DOC/Atari_Basic_Reference_Manual_Rev._C.pdf] ; size: 47.9 MB ; 134 pages\\
\\
[{Image src='Atari_Basic_1979.jpg' width=364 height=467 }]
[Atari BASIC - Bob_Albrecht, LeRoy Finkel and Jerald R. Brown (1979)|https://data.atariwiki.org/DOC/Atari_Basic_1979.pdf] ; size: 80.9 MB ; OCR ; 348 pages\\
\\
[{Image src='Atari_Basic-Richard_Haskell.jpg' width=354 height=468 }]
[Atari_Basic-Richard_Haskell.jpg (1983)|https://data.atariwiki.org/DOC/Atari_Basic_1983.pdf] ; size: 74.7 MB ; OCR ; 196 pages\\
\\
[{Image src='Atari_Basic-XL-Edition.jpg' width=308 height=467 }]
[Atari BASIC-XL Edition - Bob_Albrecht, LeRoy Finkel and Jerald R. Brown (1985)|https://data.atariwiki.org/DOC/Atari_BASIC_XL_Edition-Bob_Albrecht,_LeRoy_Finkel_and_Jerald_R._Brown_1985.pdf] ; size: 86.5 MB ; OCR ; 404 pages\\
\\
[{Image src='ATARI_BASIC-Handbuch_fuer_Selbststudium_und_Praxis-BOB_ALBRECHT,_Le_Roy_Finkel,_JERALD_BROWN-2.jpg' width=336 height=466 }]
[ATARI BASIC-Handbuch für Selbststudium und Praxis-BOB ALBRECHT, Le Roy Finkel, JERALD BROWN|https://data.atariwiki.org/DOC/ATARI_BASIC-Handbuch_fuer_Selbststudium_und_Praxis-BOB_ALBRECHT,_Le_Roy_Finkel,_JERALD_BROWN.pdf] ; Größe: 44,8 MB ; OCR ; 214 Doppelseiten\\
\\
[{Image src='Atari_Basic_Reference_Guide_XL.jpg' width=331 height=233 }]
[ATARI Basic Leitfaden|ATARI Basic Leitfaden.pdf] ; Größe: 5,2 MB ; 11 Seiten\\
\\
[{Image src='Atari BASIC Quick Reference Guide-Gilbert Held.jpg' width=254 height=445 }]
[Atari BASIC - Quick Reference Guide - Gilbert Held|Atari BASIC Quick Reference Guide-Gilbert Held.pdf] ; size: 10.4 MB ; 8 pages\\
\\
[{Image src='Atari_Basic_Referenz-Karten3.jpg' width=336 height=231 }]
[Atari Basic Referenz-Karten|Atari_Basic_Referenz-Karten.pdf] ; Größe: 3,1 MB ; OCR ; 271 Seiten