Atari Pascal Language System (APX)
- Medium
- Disk
- Year
- 1982
- Publisher
- Atari Program Exchange (APX-20102)
- Type
- Language
- Category
- ISO Pascal compiler, linker and P-code interpreter (disk)
- Developer
- Atari, Inc. (credited to Wink Saville and Michael G. Lehman)
- Language
- 6502 machine language
- Requirements
- Atari 800 with 48K, two Atari 810 disk drives, the Atari Program-Text Editor (APX-20075) or another editor; no cartridge inserted. 850 and 825 printer optional.
- Tags
- pascal, compiler, apx, atari-inc, p-code, iso-pascal, disk, two-drives, 1982
Overview
The Atari Pascal Language System was Atari's official Pascal for the 400/800. After months of promises, it appeared in March 1982, not as a boxed Atari product but through the Atari Program Exchange (catalogue number APX-20102, $49.95) as unsupported software. The manual says plainly that it was meant for experienced developers who already knew Pascal and the Atari 800, and was "not suited for learning Pascal". It also required two 810 disk drives, a luxury in 1982. Despite all that, early reviewers liked the language itself. ANALOG's Raymond Tillman called it "an extremely well designed, powerful programming language" that was badly let down by its release. The programming is credited to Wink Saville and Michael G. Lehman.
What you get
The language follows the ISO draft standard (DPS/7185) rather than UCSD Pascal. It adds the extra types BYTE, WORD and STRING, absolute variables at fixed addresses, external procedures, modular compilation, bitwise operations, heap management with pointers and garbage collection, and an ELSE clause on CASE. Include files supply the extras: GSPROCS (graphics, sound and controllers), FLTPROCS (reals and transcendental functions), STRPROCS (strings), BITPROCS, HEAPSTUF, DSKPROCS and others.
The graphics and sound package mirrors Atari BASIC. You include GSPROCS, call INITGRAPHICS(mode), and then use GRAPHICS, PLOT, DRAWTO, FILL, LOCATE, SETCOLOR, SOUND, SOUNDOFF, STICK and the paddle and trigger functions. Errors are reported in a GRRESULT variable, and text can be written to the graphics screen through the SCRNFILE file. The manual includes a player/missile demonstration program, and the package was released royalty-free: buyers could ship the five run-time files (PASCAL, MON, PASLIB.ERL, FPLIB.ERL, GRSND.ERL) with their own programs.
How it works
Compiled programs are P-code, optimised for the 6502 and executed by an interpreter. The workflow has several stages, each with its own disk swaps:
- Write the source with the Atari Program-Text Editor (or Text Wizard, or the OSS editor; numbered source means included files must be numbered too).
- Boot DOS 2.0S with disk 1 (PASCAL/LINKER), load
PASCAL, and pick C)ompile from the monitor menu (E)dit, C)ompile, L)ink, R)un, D)os, Q)uit). - The compiler on disk 2 runs as phases PH0–PH4 (syntax scan, symbol tables, code generation) and produces a relocatable
.ERLfile. - L)ink combines it with the run-time library, with PASLIB.ERL always linked last, to make a
.COMprogram, which you then R)un.
Atari had written the system for a double-density drive. Splitting it across two 810 single-density disks caused problems: the compiler expected the monitor on its own disk, and a wrong disk in drive 1 at the "Insert D1" prompt crashed the system. Modules were limited to about 300 lines, though several could be linked or chained. The interpreter uses page six for its evaluation stack, so that memory is off-limits to your own routines. Machine-code routines must be relocatable and must maintain the stack themselves.
Reception
Antic's first look (June 1982, Gary and Susan Frederick) found it a bargain at under $50 but complained about the disk juggling, oversized sets (a two-element set took 32 bytes) and slow WRITE. ANALOG #11 (1983) reported that it could beat Apple Pascal by up to seven times in some benchmarks. Real arithmetic, however, used the slow BCD floating point in the OS ROM: an Archimedes spiral took over three and a half hours, longer than in BASIC. Tillman also found that Atari had held back parts of the system, including the debugger, the segmented (random-access) file library and a relocatable assembler. He also noticed that page after page of the manual matched the documentation for Pascal/MT+, the CP/M compiler sold by Digital Research.
Using it today
Pascal fans can run it in an emulator configured as an 800 with 48K, BASIC off and two drives holding the two system disks, plus room for a work disk. It is compiled in single density; finished programs can then be moved to other densities. One archived copy lacks the editor, so plan to write source with another editor or on a PC and transfer it. For new work, Kyan Pascal or the cross-compiler Mad Pascal are far more practical. Atari's APX Pascal is mainly of interest as history, and for anyone who wants to see what Atari's own development tools looked like in 1982.
Credits
- Picture: The APX-20102 manual cover, March 1982. — Manual cover scan from the Internet Archive item 'Atari Pascal Language System APX' (© 1982 Atari, Inc. — used for identification/commentary)
- Atari Pascal Language System manual, APX-20102 (March 1982) — Internet Archive — Manual cover scan from the Internet Archive item 'Atari Pascal Language System APX' (© 1982 Atari, Inc. — used for identification/commentary), 1982
- ANALOG Computing #11 (1983) — Atari Pascal: A Good Product?, Raymond T. Tillman — Internet Archive, 1983
- Antic Vol. 1 No. 2 (June 1982) — Pascal: A First Look, Gary and Susan Frederick (magazine PDF text) — Internet Archive, 1982
- AtariMania — Atari Pascal Language System — AtariMania
- Gury — Atari Pascal (APX, 1982) — Gury (Atari 8-bit Forever portal), 1982
- The Creative Atari — Atari Languages ('Atari Pascal is brand new... not a UCSD Pascal') — AtariArchives.org
