Atari BASIC

Atari BASIC (rarely also called Shepardson BASIC) is a ROM - resident BASIC interpreter for the Atari 8- bit home computer. The first version was included with the systems of the Atari 400/800 than 8 KB mortise cartridge in the computers of the Atari XL / XE series it was already installed and started automatically when the cartridge slot was not used and the computer was not booted by holding down the OPTION key. The full commented source code and description of the architecture of Atari BASIC was already published very early in book form. The basic description of the parser and interpreter brought a whole family of them heavily influenced BASIC forth.

History of Atari BASIC

Originally, the Atari 400/800-Serie were planned as successors of the Atari 2600 game console, before they decided to enter the growing market for home computers. It involved the Atari but still urgently a Basic interpreter, as this was a prerequisite to a home computer at the time. Atari as many other computer manufacturer has decided also to use the 8-KB version of Microsoft BASIC, the prevailing BASIC dialect and also acquired a license from Microsoft. However, the memory requirement for the 6502 8-KB grew when porting from 8080 to 11 KB because the 6502 has a smaller instruction set. This was too much for a ROM module this time.

As the announced release date for the Atari computer drawing ever closer, it turned to Shepardson Microsystems, Inc., who had already written some programs for the Apple II computer and were in the process of creating its own BASIC interpreter. Shepardson suggested a complete redesign, the result was a version of BASIC, which greatly differed from the originally planned Microsoft BASIC. Due to a bonus scheme in the contract which grow fast and could be completed in time for publication of the computer. A total of three versions of Atari BASIC were published:

  • Revision A was exclusively the systems of Atari 400/800er-Serie as a cartridge case. The programmers at Shepardson discovered before the publication of some bugs, at the time the cartridges were, however, already in production. The most serious errors of this version was that the keyboard of the computer program code when deleting occasionally completely hung, including the reset button, so that only helped a cold start.
  • Revision B was permanently installed in the Atari XL computers. The "Keyboard Hangup " had indeed eliminated, but a far more serious error built: Each time you save the program were 16 bytes added so that you could run the risk that a prematurely running out of memory. On the 600 XL, which had only 16 KB of RAM for BASIC programs, this was a far more serious problem.
  • Revision C was sold in 1983 in small numbers as a cartridge, in the computers it has not been built before 1984. It came in the last Atari 800 XL computers, and all systems of the Atari XE- series are used.

Special features of Atari BASIC

Speed ​​and data types

Atari BASIC is significantly slower than other versions of BASIC that time, although the processor of the Atari computer with 1.77 MHz ( PAL) or 1.79 (NTSC) was clocked at that time very quickly. Reason is the one that jumps in and recesses not the memory address directly jump, but always the line number is referenced, the program must be checked for each time. An example of this is in BASIC at that time very popular delay loop:

... 10000 FOR I = 1 TO 1000 10010 NEXT I ... When you call the FOR loop, the program line "10000 " is stored as a return address. Where the program to the matching NEXT statement, the interpreter, the program will now scan from the first program line until it meets the line 10000 to it and continues with execution. In loops, especially at the end of a long program, it costs performance.

In addition, Atari BASIC has no integer arithmetic ( integers ), all numbers are always stored as a 7 -byte BCD. In the arithmetic Atari BASIC relies on routines of the operating system that have been optimized for memory and not for speed.

The biggest difference to other Basic dialects, however, lies in the treatment of arrays and strings. Atari BASIC has only one-dimensional arrays, string arrays are not possible at all. Strings must always be sized for program start, commands such as LEFT $, MID $, RIGHT $ string for treatment do not exist in Atari BASIC, but you have direct access to each string element. With A $ ( 5.5 ) one accesses the fifth character in the string A $, with $ A (4,6) to the characters 4-6 and A $ ( 6) on the 6th and last character. Moreover, you can also specifically manipulate individual string elements, which is not possible with other BASIC dialects typically.

Graphic and sound instructions

Unlike other BASIC dialects that time Atari BASIC already has commands for graphics and sound programming. It enables, for example, PLOT and DRAWTO points and draw lines change with SETCOLOR color register (but not read ) and with SOUND you have access to the four separate sound channels of the POKEY chip. Also for querying joystick and paddle exist functions. On other home computers such as the C-64 you had to call operating system routines or use cryptic POKE and PEEK statements.

However, in particular the graphics commands at Atari BASIC only be described as rudimentary. For example, there is no function to draw circles or ellipses, or to fill space. Also for programming Player Missiles ( the Atari equivalent of sprites), is not supported, here we are again dependent on POKEs and partly sub-programs into machine language.

The input and output via XIO

For the output and input on / printers, plotters, tape, diskette, modem, inter alia, there is the universal statement: XIO ( abbreviation for extended input / output). About XIO commands you can rename or delete them without having to go to the DOS menu files on the disk, for example. For some XIO commands have Basic aliases, some XIO functions are exclusive.

Successors of Atari BASIC

1981 programmer Shepardson Microsystems made ​​independently, founded the company Optimized Systems Software (OSS ), acquired the rights to Shepardson BASIC and developed this further BASIC A . This BASIC interpreter eliminated the biggest weaknesses of Atari BASIC, such as the lack of speed and added numerous commands for graphics processing (including player-missile graphics). With BASIC and BASIC XE XL OSS am continuing this series. Atari eventually published his porting of Microsoft BASIC. All of these languages ​​have the disadvantage that the user of the interpreter to execute the programs have had. A compiler did not exist, for BASIC XL a freely distributable runtime was nevertheless included.

Far more successful was finally the unofficial successor of Atari BASIC, Turbo BASIC XL, which was published in 1985 as a listing of the month in the magazine Happy Computer, and later a compiler was added. As programs were typing interpreter and compiler almost at zero cost available, so that this to Atari BASIC backward-compatible dialect could quickly establish itself as a standard.

See also Atari Microsoft BASIC.

85095
de