Draper Pascal
- Medium
- Disk
- Year
- 1985
- Publisher
- Draper Software (Richardson, Texas)
- Type
- Language
- Category
- One-drive Pascal compiler with P-code supervisor (later shareware)
- Developer
- Norm Draper
- Language
- 6502 machine language (supervisor); compiler, editor and menu written in Draper Pascal
- Requirements
- Atari 400/800/XL/XE with 48K for compiling (32K to run compiled programs) and one 810/1050 or compatible drive; 130XE RAM disk supported from release 1.6
Overview
Draper Pascal was the Pascal for Atari owners who had only one disk drive. Atari's own APX Pascal needed two 810s and a separate linking step. Norm Draper's system, sold by his Draper Software of Richardson, Texas from 1985, needed one drive and 48K, compiled in a single pass and ran the result straight away with no linking. The manual is frank that it is "not a 'standard' Pascal": some statements match ISO or UCSD Pascal exactly, some are similar, and many are Atari extensions, including BASIC-like commands such as POKE, PEEK, SETCOLOR, NOTE and POINT. Each reserved word in the manual is followed by its Atari BASIC equivalent, which makes it an easy step up for BASIC programmers.
By late 1985 Antic thought it had disappeared, but Draper Software wrote in to say the product was still on sale. In 1989 Draper released version 2.1 as shareware: free to copy and evaluate, $15 to register for the printed manual, the latest disk and a royalty-free licence to distribute compiled programs.
The system
Draper Pascal has three parts:
- The Supervisor, a fast machine-language interpreter that simulates a 16-bit stack-oriented pseudo-computer and executes the compiled P-code.
- The Compiler, about 28K and itself written in Draper Pascal. It reads
name.PASand writesname.PCDon the same drive, listing hex P-code offsets and variable stack offsets for debugging. - The Editor, a line-numbered editor with single-letter commands (Add, Change, Delete, Edit, Insert, List, Print, Scan, Filer), which can also edit text files or LISTed BASIC programs. X jumps straight into the compiler.
The disk boots to a Main Menu (Run program, Disk directory, Compile, Edit, Exit to DOS, List a file, Trace on). The menu is an ordinary Draper Pascal program supplied as source, so you can replace it with your own and build a turnkey disk. The DOS on the disk is a special version by Charles Marslett (of MyDOS fame), similar to DOS 2.0S but with a P command to switch a Percom-style drive between single and double density.
Here is the manual's first sample program, a kaleidoscope in GRAPHICS 19:
PROGRAM KALEIDOSCOPE;
VAR I,J,K,W,X:INTEGER;
BEGIN
MAXGRAPH(19);
GRAPHICS(19);
X:=0;
REPEAT
FOR W:=3 TO 50 DO
BEGIN
FOR I:=1 TO 10 DO
BEGIN
FOR J:=0 TO 10 DO
BEGIN
K:=I+J;
COLOR(J*3/(I+3)+I*W/12);
PLOT(I+8,K);
PLOT(K+8,I);
PLOT(32-I,24-K);
PLOT(32-K,24-I);
PLOT(K+8,24-I);
PLOT(32-I,K);
PLOT(I+8,24-K);
PLOT(32-K,I)
END
END
END
UNTIL X=99 (* UNENDING LOOP *)
END.
Language notes
- Data types: character, string, integer, real, boolean, record and file, with one- and two-dimensional arrays of everything except files and records.
- IF-THEN-ELSE, WHILE, CASE-OF-ELSE, FOR TO/DOWNTO and REPEAT-UNTIL. Nested and recursive procedures are allowed, but no forward references.
- Only integers can be passed as parameters, and functions return only integers. Other data goes through global variables.
$marks hex constants, and%before a variable writes it in hex. Include files use(*$I D1:FILE.PAS *)and must follow that exact spacing.- Extras include BLOAD and CALL for machine-language routines, program chaining, GOTOXY, DRAWTO, sound, TRACEON instruction tracing and DUMPSTK stack dumps. The compiler option
(*$S+*)switches ANTIC off during compilation for extra speed. - Limits: about 200 symbol-table entries per compile and roughly 30K of P-code per program, but no limit on source size.
Versions
Release 1.5 (1985) was copy-protected: the special master disk had to be in drive 1 for every compile. Release 1.6 checked the disk only when the supervisor loaded, and added a RAM disk option for DOS 2.5 on a 130XE. A SETUPD8 program copies the system to D8:, after which the editor loads in under two seconds and the compiler in under three. The shareware 2.1 (1989) claimed to work with most popular DOSes and came with a disk-based starter manual. The full printed manual went to registered users.
Using it today
Draper Pascal still has users. An AtariAge programmer chose it in recent years to rewrite an old adventure game because, apart from Action!, it was the classic compiler that worked best for him. Boot the 2.1 disk in Altirra or atari800 as a 48K or larger machine with BASIC disabled. On an emulated 130XE, use the RAM-disk setup to make the edit-compile-run loop almost instant. Remember that compiled .PCD files need the supervisor to run, so distribute them with the run-time files as the licence allowed.
Credits
- Picture: Title page of the Draper Pascal manual (release 1.5, 1985). — Manual title page from the Internet Archive item 'Draper Pascal 1.5 and 1.6 Manual' (© 1985 Norm Draper — used for identification/commentary)
- Draper Pascal manual, release 1.5 with release 1.6 addendum (Norm Draper, 1985) — Internet Archive — Manual title page from the Internet Archive item 'Draper Pascal 1.5 and 1.6 Manual' (© 1985 Norm Draper — used for identification/commentary), 1985
- Draper Pascal 2.1 complete manual (1989) — Internet Archive item atari_draper — Internet Archive, 1989
- Antic Vol. 4 No. 5 — I/O Board (Draper and ISO Pascal 'not presently available') — AtariMagazines.com (Kevin Savetz)
- Antic Vol. 4 No. 10 — I/O Board (Draper Pascal still on the market) — AtariMagazines.com (Kevin Savetz)
- AtariAge forum — rewriting an adventure game in Draper Pascal — AtariAge forum members
