@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@W!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `8  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D8:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D8:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED171 FREE SECTORS COPYING---D1:SAMPLE2.PCDl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 144ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8ouR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8ouM) !"`3!3. < MIDCOBAKCOTITCODUPPEADKEFILESTARFLALINEWIDTER@@P@BB@ U}@2@  A @7 AA@ 36-@6-@P V}'6-@B36-@##@@K:( AA2##(@ picture breaker4"" W}(@ 7_-@@5(@1) PICTURE BREAKER@(@_(@ 2) INSTRUCTIONS X}K<)@6-&@H< )!@@uP@AQΠà͛RB +A Y}1A B% D:BATTLE.BINSΠŠŠTe;@,$6. D:AUTORUN.CTB/@L@ Z}@V+e6-?:AUv,l -@@6?P<2A@@ b2 [}l A################################## TEXT DISPLAY TO SCREEN OR #### PRINTER by Les El \}lingham ################################;;@,#6. D:BRAKER.DOC/6-;6-&V@@ ]}6@@V@@K:0" A:) A6-%@)-@ ^}D)@N/!&@*"@2"( %'/ A0X(@>:,b*"AU' 6-%@*  _}A0l v"F:@,!@!" A`!@T A` Ap(ԠΠϠ)@ `}(>:A%,$ F:A,A6AP:F:A,"A6#@.@:6-@a(0( a}%END OF MANUAL - PRESS TO RE-RUND(ANY KEY TO EXITVAdAUa@F:B2y,"@%5F:A b}d,AU*AdAU5%D:MENU A *'(ERROR F:A, CHECK DISK*@*@$ c}&-@@"(@&  6-$) +@@) A  )-@@)(PI d}CTURE BREAKER*'('( (S)creen or (P)rinter4)@>!!"@)"AApH!!"@)"A e}A`R A \26-@7/@@E:2$f""? :? "Width 1) 40 columns"p? " 2) f} 80 columns"z66GET #2,KEY:KEY=KEY-48:IF KEY<1 OR KEY>2 THEN 61026-@@/@@P:2$B A g}0(ˠҠĠԠBAdAU)@@ A / +@/6 h}-F:A`,%AV$F:Aa,+%@@q+%@A@'AA'A $ i}D:MENU,%AV$F:Aa,+%@@q+%@A@'AA'A $ DRAPER PASCAL Version 2.1 k} Copyright 1989 by Norm Draper For the Atari 400, 800, XL, ol}r XE series computers Disk Based Documentation This document contains the "Gm}etting Started" section plus other sections from the actual Draper Pascal manual. It is designed to get you upn} and running and doing useful things with Draper Pascal in a very short time. It does not, however, contain a detaileo}d description of all the Draper Pascal definitions or pretend to be a comprehensive tutorial or user's referencp}e. Registered users will receive the actual Draper Pascal manual which does contain a complete description of q}all definitions plus other information. Details on registering are in the last section titled "Registration Forr}m". Draper Pascal 2.1 Table of Contents s} Table of Contents The ShareWare Concept --------------------------------- 2 Features -----------------t}----------------------------- 3 Introduction ------------------------------------------ 5 What is Pascal? -u}------------------------------------ 5 What is Draper Pascal? ------------------------------ 5 About thisv} manual ----------------------------------- 5 What is Draper Pascal made of? ---------------------- 5 Abow}ut the DOS --------------------------------------- 6 Ramdisk support ------------------------------------- 6 x} Getting Started --------------------------------------- 7 The Main Menu ----------------------------------------- 1y}4 1 - Run Program ------------------------------------- 15 2 - Disk Directory -----------------------------z}----- 15 3 - Compile Program --------------------------------- 15 4 - Edit a Program ----------------------{}------------ 15 5 - Exit to DOS ------------------------------------- 15 6 - List a file ------------------|}------------------- 16 7 - Trace on ---------------------------------------- 16 The Editor ------------------}}-------------------------- 17 General Prompts ------------------------------------- 18 The Commands -------~}--------------------------------- 19 A - Add line(s) at end ---------------------------- 19 C - Change }line(s) -------------------------------- 19 D - Delete line(s) -------------------------------- 19 E - }Edit line(s) ---------------------------------- 20 F - Filer menu ------------------------------------ 20 } A - Append file --------------------------------- 20 D - Directory list ------------------------------ 20 } L - Load file ----------------------------------- 20 S - Save file ---------------------------------}-- 21 I - Insert before line ---------------------------- 21 L - List line(s) -------------------------}--------- 21 M - Menu ------------------------------------------ 21 P - Print line(s) -----------------}---------------- 21 Q - Quit ------------------------------------------ 22 S - Scan line(s) -----------}----------------------- 22 X - Exit to Compiler ------------------------------ 22 The Compiler ------------}------------------------------ 23 The Supervisor ---------------------------------------- 26 Pascal Definitions} ------------------------------------ 27 System Information ------------------------------------ 32 Reserved Wo}rd List ------------------------------------ 33 Operators --------------------------------------------- 34 Erro}r Messages ---------------------------------------- 35 Registration Form ------------------------------------- 38} 1 Draper Pascal 2.1 The Shareware Concept} The Shareware Concept Draper Pascal is distributed on a Shareware basis. You may use } Draper Pascal without charge for the purpose of evaluating it's suitability for your use. If you find that Drape}r Pascal is worth continuing to use, then you are requested to become a registered user and gain the additional} benefits that go along with it. Simply complete the registration form and mail it in to us with the very reaso}nable payment of only $15.00. When you register your copy of Draper Pascal, you'll receive the latest version of the } software if your registered version is not current, along with a comprehensive printed user manual. If y}ou have received this copy from a Users' Group, "Software Library" or "SIG", and have paid a small fee (usually $3 to }$10), you have NOT acquired the registered rights or continued right to use Draper Pascal. This fee was for the} convenience of obtaining the diskette with Draper Pascal on it. The fee does NOT apply to the registration fee}. You may freely copy Draper Pascal for distribution under the Shareware concept, without charge. You }may NOT charge any fee for the Draper Pascal program or documentation without our written approval. You may NO}T distribute Draper Pascal or it's documentation in connection with ANY commercial venture, product, publication or } service unless you obtain the royalty-free license by registering. } 2 Draper Pascal 2.1 Features } Features * Draper Pascal is a complete package allowing the user to create, compile, and execu}te programs written in the Pascal language. * Many features from both UCSD and ISO standard Pascals plus m}any extensions, such as sound and graphics, to make use of the versatile Atari hardware. * Pasca}l structured programming features, including IF-THEN-ELSE, WHILE-DO, CASE-OF-ELSE, FOR-TO/DOWNTO-DO, and REPEAT-UNT}IL are included. * FUNCTIONs and PROCEDUREs using local or global variables. Integer type variab}les can be passed directly. * Data types supported include: Character, String, Integer, Real, Boolean, Rec}ord, and File. One and two dimension arrays are also supported for all data types other than File and Record. } * Only one disk drive and 48K RAM are required. Multiple, and double density, disk drives are supported. } * Machine language subroutines may be loaded and called. * Program chaining is supported. * No limit on} source program size. "Include" files are supported. * One-pass compiler generates pseudo code directly.} * Maximum program pseudo code size is about 30K bytes. * Textual compiler error messages. * Execut}ion debugging features include instruction trace and stack display. * Special options for error display an}d break key disable. * Single keystroke program execution repeat, exit to DOS, or exit to Main Menu progra}m are featured. * Includes Editor program to create, modify, and print Pascal source files, or other text }type files. * Includes Main Menu program (Pascal source included) for easy select of Compiler, Editor, or }utility functions, such as directory or file listing. Main Menu program may be replaced with a user writt}en program to create a turnkey operation. 3 Draper Pascal 2.1 } Features * Ramdisk support. Details provided to registered users. * Works w}ith most popular versions of DOS. * Easy to use. No linking required. Compile and execute immediately. } * Royalty free license available to registered users. * Includes sample programs. * Comprehensive us}er manual provided to registered users. Complete examples and BASIC equivalents given for each reserved w}ord. 4 Draper Pascal 2.1 } Introduction Introduction Draper Software welcomes yo}u to the world of Pascal for the Atari 400/800, XL, and XE series Computer systems. W}hat is Pascal? Pascal is a high-level structured programming language developed by Niklaus Wirth in 1971. It i}s easy to understand and well suited for program development and maintenance. What is Dr}aper Pascal? Draper Pascal is not a "standard" Pascal. It has a number of commands which are exactly like ISO }and UCSD versions, some which are similar, and many "extensions" which bring out the true power of the Atari co}mputer in an easy to use manner. It was designed to require only one disk drive for operation, but not be limited to } only one. At this time, it has been shown to work with all hardware and software configurations where enough mem}ory is provided. This implementation also has a number of commands which are familiar to Atari BASIC users, suc}h as POKE, PEEK, SETCOLOR, NOTE, POINT, etc.. About this manual This manual is} intended to familiarize you with all the features of Draper Pascal. It is not intended to teach you how to program } in Pascal. However, if you already know Atari BASIC, then you can understand the Pascal statements more easily by} referring to their BASIC equivalents shown after the definition of each Pascal reserved word in the complete m}anual provided to registered users. It is recommended that you read this manual completely to be familiarized w}ith its features and restrictions. What is Draper Pascal made of? This implementation of Pa}scal is made up of three main components. They are the Supervisor (sometimes referred to as runtime routines), }the Compiler, and the Editor. The Supervisor is a high performance machine language program which simulates a 16-bit } pseudo computer. The Compiler translates Pascal source code into pseudo-code instructions to be executed by the }Supervisor. The Editor is used to enter and modify Pascal source programs. It may also be used to edit data fil}es, or BASIC programs which have been LISTed to a disk or tape. These components are explained in detail within} this manual. For a description of the various files included on the supplied diskette, refer to the 'System I}nformation' section. 5 Draper Pascal 2.1 } Introduction About the DOS Draper Pascal can be used with most popular Dis}k Operating Systems. It has been tested with Atari DOS 2.5, SpartaDOS 3.2d, and MYDOS. You should format a disk}ette with DOS on it to contain the Draper Pascal system. Since the Draper Pascal Supervisor is named AUTORUN.SY}S, it will execute immediately after the disk is booted. For XL and XE computers, you do not need to hold down the } Option key while booting unless you are using SpartaDOS. If using SpartaDOS, you may want to rename AUTORUN.SYS to} PASCAL.COM and create a STARTUP.BAT file containing the following two lines: BASIC OFF PASCAL } This documentation file is not required to be on that same diskette. Ramdisk supp}ort Draper Pascal supports the use of the "Ramdisk" capability provided by using a DOS that supports a ramdisk} like Atari DOS 2.5 or SpartaDOS 3.x with an Atari computer system having sufficient memory to support the ramd}isk. While using this feature, the Editor takes less than two seconds to load and the Compiler takes less than }three seconds. Details on setup and use of this feature are provided in the complete manual provided to registered use}rs. 6 Draper Pascal 2.1 } Getting Started Getting Started This section is intended to show by exam}ple how to use the Draper Pascal system. You will edit, compile, and run a sample program. Information displaye}d by the computer is shown in normal type while responses to be entered by you are shown underlined with dashes} (---). To begin with, make sure you have 48K RAM installed and no cartridge in place. Boot the disk now by placing it} in disk drive 1 and turning on the power to the Atari computer. After the Supervisor has finished loading, you} will see a screen that looks like this: DRAPER PASCAL VERSION 2.1 } 1 - Run Program 2 - Disk Directory 3 - Compile Program 4 - Edit a Progr}am 5 - Exit to DOS 6 - List a file 7 - Trace on Copyrigh}t 1989 by Norm Draper 4 Select the Editor -} 7 Draper Pascal 2.1 Getting St}arted DRAPER SOFTWARE EDITOR A - Add line(s) at end } C - Change line(s) D - Delete line(s) E - Edit a line F - Filer menu } I - Insert before line L - List line(s) M - Menu P - Print line(s) } Q - Quit S - Scan line(s) X - Exit to Compiler A,C,D,E,F,I,L,M,P,Q,S,X,?->F } Select Filer menu - A - Append file D - Directory list} L - Load file S - Save file L Load a file } - Enter filename -> SAMPLE1 Enter the name of the file ------- } to be loaded. The name of the last file edited, } compiled, or run will be filled in by the Editor. } You may have to overtype it with the name} shown. A,C,D,E,F,I,L,M,P,Q,S,X,?->L List the file on the - s}creen Line from -> Just press RETURN for - 'Lin}e from' and 'Line to'. Line to -> This will give a list of - } the entire program in memory. } 8 Draper Pascal 2.1 Getting Started 1:PROGRAM KALEIDOSC}OPE; 2:VAR I,J,K,W,X:INTEGER; 3:BEGIN 4: MAXGRAPH(19); 5: GRAPHICS(19); 6: X:=0;} 7: REPEAT 8: FOR W:=3 TO 50 DO 9: BEGIN 10: FOR I:=1 TO 10 DO 11: BEGIN } 12: FOR J:=0 TO 10 DO 13: BEGIN 14: K:=I+J; 15: COLOR(J*3/(I+3)+I*W/12); } 16: PLOT(I+8,K); 17: PLOT(K+8,I); 18: PLOT(32-I,24-K); 19: PLOT(32-K,2}4-I); 20: PLOT(K+8,24-I); 21: PLOT(32-I,K); 22: PLOT(I+8,24-K); 23: P}LOT(32-K,I) 24: END 25: END 26: END 27: UNTIL X=99 (* UNENDING LOOP *) 28:EN}D. A,C,D,E,F,I,L,M,P,Q,S,X,?->I Let's insert a comment - before }line 15. Line -> 15 -- 15: (* MY FIRST EDIT *) Enter the data to be } ------------------- inserted when prompted for 16: line 15. Just pres}s RETURN - when prompted for line 16. } This will terminate insert mode. A,C,D,E,F,I,L,M,P,Q,S,X,?->L } List again to verify that - the change was made } correctly. Line from -> - Line to -> - 1:PR}OGRAM KALEIDOSCOPE; 2:VAR I,J,K,W,X:INTEGER; 9 Draper Pascal 2}.1 Getting Started 3:BEGIN 4: MAXGRAPH(19); 5: GRAPHICS(19); } 6: X:=0; 7: REPEAT 8: FOR W:=3 TO 50 DO 9: BEGIN 10: FOR I:=1 TO 10 DO }11: BEGIN 12: FOR J:=0 TO 10 DO 13: BEGIN 14: K:=I+J; 15: (* MY FIRST} EDIT *) 16: COLOR(J*3/(I+3)+I*W/12); 17: PLOT(I+8,K); 18: PLOT(K+8,I); 19:} PLOT(32-I,24-K); 20: PLOT(32-K,24-I); 21: PLOT(K+8,24-I); 22: PLOT(32-I,K);} 23: PLOT(I+8,24-K); 24: PLOT(32-K,I) 25: END 26: END 27: END } 28: UNTIL X=99 (* UNENDING LOOP *) 29:END. A,C,D,E,F,I,L,M,P,Q,S,X,?->F Let's save the program} - back to disk drive 1 under the sa}me name. A - Append file D - Directory list L - Load file S - Sa}ve file S - Enter filename -> SAMPLE1 ------- A,C,D,}E,F,I,L,M,P,Q,S,X,?->X Now let's exit directly to - the Compiler.} 10 Draper Pascal 2.1 Getting Started} Draper Software Pascal Compiler Version 2.1 Copyri}ght 1989 by Norm Draper Enter Filename: SAMPLE1 Ente}r name of program to ------- be compiled. The name of } the last program edited, compiled, or run will be  } filled in by the Compiler. Enter List Out }put Filespec Default is E: Just press RETURN at this -  } point to have the compile list directed to the  } screen. 0000 PROGRAM KALEIDOSCOPE; 0000 VAR I,J,K,W,X:INTEGER; 0003 BEGIN 00 }03 MAXGRAPH(19); 0017 GRAPHICS(19); 001B X:=0; 001E REPEAT 0022 FOR W:=3 TO 50 DO 002}A BEGIN 0035 FOR I:=1 TO 10 DO 003D BEGIN 0048 FOR J:=0 TO 10 DO 004F BEGIN} 005A K:=I+J; 0062 COLOR(J*3/(I+3)+I*W/12); 008A PLOT(I+8,K); 0098 PLO}T(K+8,I); 00A6 PLOT(32-I,24-K); 00B8 PLOT(32-K,24-I); 00CA PLOT(K+8,24-I); 0}0DC PLOT(32-I,K); 00EA PLOT(I+8,24-K); 00FC PLOT(32-K,I) 010A END 010A} END 010C END 11 Draper Pascal 2.1 } Getting Started 011C UNTIL X=99 (* UNENDING LOOP *) 0142 END. 0147 ADDR NAME } ---- -------- 0003 I 0004 J 0005 K 0006 W 0007 X 5 Compiler table entries used } *** Program Execution Completed *** Press the SELECT key at Highest Stack Address Used = $AFF8 this point }to take us to Repeat,Menu,Exit If you press  }the START key, your Pascal program will execute again from the beginning. If you press the SELECT key, control will be } transfered to the main menu program (INIT.PCD). If you press the ESC key, you will exit to the DOS utility men }u. You also have two other options at this point. They are both used for debugging purposes. If you press CTRL- }S (the 'S' key while holding down the CTRL key), the stack values, at termination time, will be displayed. If y}ou press CTRL-T, the internal trace table, if active, will be displayed. With either of these two debugging opt}ions, you will be asked where the display should be sent by the prompt 'WHERE? (FILESPEC)'. To see it on the screen, e}nter 'E:'. It also may be sent to printer or disk by following normal filespec naming conventions. If the displ}ay is sent to the screen, you may stop the scrolling by use of the space bar. Press the ESC key if you have see}n enough and wish to return to the Supervisor termination prompt. Any other key causes scrolling to continue as } normal. 26 Draper Pascal 2.1 Pascal Defini}tions Pascal Definitions Syntax is shown below for each of the Draper Pascal rese}rved words. The complete manual provided to registered users, however, contains COMPLETE definitions, COMPLETE} sample programs demonstrating the use of each reserved word, as well as BASIC equivalents. ABS } FUNCTION ABS(Number):INTEGER; ADDR FUNCTION ADDR(Var):INTEGER; AND ARCTAN } FUNCTION ARCTAN(Var):REAL; ARRAY ARRAY[Number1] OF Type ARRAY[Number1,N}umber2] OF Type ASC FUNCTION ASC(Cvar):INTEGER; BEGIN BLOAD PROCEDURE BLO}AD(Program); BOOLEAN CALL PROCEDURE CALL(Address); CASE CASE expr1 OF con}st1 : stmt1; const2 : stmt2; ... } constn : stmtn END; CASE expr1 OF const1 : s}tmt1; const2 : stmt2; ... } constn : stmtn ELSE stmtx END; CHAR } CHR FUNCTION CHR(expr1):CHAR; CLOSE PROCEDURE CLOSE(File); COLOR PR }OCEDURE COLOR(Number); 27 Draper Pascal 2.1 !} Pascal Definitions CONCAT PROCEDURE CONCAT(Parm1,Parm2,...):STRING; CONST CONST"} name1=value1; name2=value2; ... COPY FUNCTION COPY(Source,Index,Length) : STRING; COS #} FUNCTION COS(Var):REAL; CVTREAL FUNCTION CVTREAL(Ivar):REAL DEG PROCEDURE DE$}G; DELETE PROCEDURE DELETE(Source,Index,Size); DIV DOS PROCEDURE DOS; %} DRAWTO PROCEDURE DRAWTO(X,Y); DUMPSTK PROCEDURE DUMPSTK; DVSTAT PROCED&}URE DVSTAT(A,B,C,D); END EOF EOF(File); EOLN EOLN(File); EXIT '} PROCEDURE EXIT; EXP FUNCTION EXP(Var):REAL; EXP10 FUNCTION EXP10(Var)(}:REAL; FALSE FILE FOR FOR var := expr1 TO expr2 DO statement; )} FOR var := expr1 DOWNTO expr2 DO statement; FUNCTION GOTOXY PROCEDURE GOTOXY(X,Y); GRAP*}HICS PROCEDURE GRAPHICS(Number); HIMEM PROCEDURE HIMEM(Value); +} 28 Draper Pascal 2.1 Pascal Definitions IF IF,} expr1 THEN stmt1; IF expr1 THEN stmt1 ELSE stmt2; INSERT PROCEDURE INSERT(Sour-}ce,Destination,Index); INTEGER IORESULT FUNCTION IORESULT:INTEGER; KEYPRESS FUNCT.}ION KEYPRESS:INTEGER; LENGTH FUNCTION LENGTH(svar):INTEGER; LN FUNCTION LN(Var):R/}EAL; LOCATE FUNCTION LOCATE(X,Y):INTEGER; LOCK PROCEDURE LOCK(Filename); LO0}G FUNCTION LOG(Var):REAL; LPENH, LPENV FUNCTION LPENH:INTEGER; FUNCTIO1}N LPENV:INTEGER; MAXGRAPH PROCEDURE MAXGRAPH(Mode); MOD NOT NOTE PROC2}EDURE NOTE(Iocbno,Sector,Byte); ODD FUNCTION ODD(iexp); OPEN PROCEDURE OPEN(File3}no,Aux1,Aux2,Filename);; OPTIONKEY OPTIONS OPTIONS(Opt1,Opt2,...,Optn); OR ORD 4} FUNCTION ORD(Realvar):INTEGER; PADDLE FUNCTION PADDLE(Number):INTEGER; PEEK 5} FUNCTION PEEK(Address):INTEGER; PLOT PROCEDURE PLOT(X,Y); POINT PROCEDURE POI6}NT(Iocbno,Sector,Byte); 29 Draper Pascal 2.1 7} Pascal Definitions POKE PROCEDURE POKE(Address,Value); POS FUNCTION POS(Pa8}ttern,Source):INTEGER; PROCEDURE PROCEDURE Name; PROCEDURE Name(Parm1,Parm2,...,Pa9}rmn); PROGRAM PROGRAM Name; PTRIG FUNCTION PTRIG(Number):INTEGER; PURGE :} PROCEDURE PURGE(Filespec); RAD READ, READLN PROCEDURE READ(File,Var1,Var2,...Varn); REA;}L RECORD REPEAT REPEAT Stmt1; ... ;Stmtn UNTIL Condition; RESET PROCEDURE RE<}SET(File,Filespec); REWRITE PROCEDURE REWRITE(File,Filespec); RND FUNCTION RND(Iexp=}):INTEGER; SELECTKEY SETCOLOR PROCEDURE SETCOLOR(Register,Hue,Luminance); SHL >} Expr1 SHL Expr2 SHR Expr1 SHR Expr2 SIN FUNCTION SIN(Var):REAL; SOUND?} PROCEDURE SOUND(Voice,Pitch,Distortion,Volume); SQR FUNCTION SQR(Var):REAL; SQR@}T FUNCTION SQRT(Var):REAL; STARTKEY STATUS PROCEDURE STATUS(Iocbno,Ivar); SA}TICK FUNCTION STICK(Number):INTEGER; 30 Draper Pascal 2.1B} Pascal Definitions STR FUNCTION STR(Var):STRING; STRIG C} FUNCTION STRIG(Number):INTEGER; STRING TRACEOFF PROCEDURE TRACEOFF; TRACEON D} PROCEDURE TRACEON; PROCEDURE TRACEON('Number); TRUE UNLOCK PROCEDURE E}UNLOCK(Filespec); VAL FUNCTION VAL(Svar):INTEGER or REAL; VAR VAR Name1,Name2,.F}..,Namen : Type; VAR Name1,Name2,...,Namen : ARRAY[Number] OF Type;G} WAIT PROCEDURE WAIT(Number); WHILE WHILE Condition DO Statement; WRITE H} WRITE(File,Expr1,Expr2,...); WRITE(File,Expr1:Fldwdth...); WRITEI}(File,Expr1:Fldwdth:Numdec...); WRITELN WRITELN(File,Expr1,Expr2,...); WRITELN(FJ}ile,Expr1:Fldwdth...); WRITELN(File,Expr1:Fldwdth:Numdec...); XCTL PROCEDURE K}XCTL(Filespec); XIO PROCEDURE XIO(Number,File,Aux1,Aux2,Filespec); L} 31 Draper Pascal 2.1 System Information M} System Information The Supervisor uses zero page locations $A0 - $BF. Locations $80 - $9F are avaN}ilable for your use if desired. Various locations between $D4 and $FD are used by the floating point routines. Page O} six ($600 - $6FF) is available for your use and not used by the Pascal system. The Supervisor is loaded iP}nto memory by DOS at the address $1D7C. If this memory location is not available, then an error message is giveQ}n, along with an explanation of the probable cause of the problem. The pseudo code program to be executed is loaded inR} memory immediately after the end of the Supervisor. The pseudo machine stack extends from the end of the pseudS}o code program to the MEMTOP position, just before screen memory. Filename DescriptionsT} The files named below are included in this ARC file: AUTORUN.SYS Supervisor object code U}COMPILER.PCD Compiler pcode EDITOR.PCD Editor pcode INIT.PCD Main Menu pV}code INIT.PAS Main Menu Pascal source EXPLNERR.PCD Error code explainor (used by CompW}iler) RSVDWRDS.TXT Reserved word list (used by Compiler) ERRORS.TXT Text for compile erX}rors (used by EXPLNERR.PCD) RAMDISK1.DAT Ramdisk setup (See complete manuaY}l) RAMDISK2.DAT Ramdisk setup (See complete manual) RAMDISK3.DAT Ramdisk setup (See complZ}ete manual) NOTITLE.OBJ Used to suppress title (See complete manual) [} SAMPLE1.PAS Kaleidoscope sample program source SAMPLE2.PAS Roman numeral sample program sou\}rce PASCAL.DOC This introduction manual 32 ]} Draper Pascal 2.1 Reserved Word List Reserved Word List^} ABS DEG FUNCTION ODD READLN STRING ADDR DELETE GOTOXY OF REAL THEN _} AND DIV GRAPHICS OPEN RECORD TO ARCTAN DO HIMEM OPTIONKEY REPEAT TRACEOFF `} ARRAY DOS IF OPTIONS RESET TRACEON ASC DOWNTO INSERT OR REWRITE TRUE a} BEGIN DRAWTO INTEGER ORD RND UNLOCK BLOAD DUMPSTK IORESULT PADDLE SELECTKEY UNTIL b} BOOLEAN DVSTAT KEYPRESS PEEK SETCOLOR VAL CALL ELSE LENGTH PLOT SHL VAR c}CASE END LN POINT SHR WAIT CHAR EOF LOCATE POKE SIN WHILE CHd}R EOLN LOCK POS SOUND WRITE CLOSE EXIT LOG PROC SQR WRITELN Ce}OLOR EXP LPENH PROCEDURE SQRT XCTL CONCAT EXP10 LPENV PROGRAM STARTKEY XIO CONSTf} FALSE MAXGRAPH PTRIG STATUS COPY FILE MOD PURGE STICK COS FOR NOT g} RAD STR CVTREAL FUNC NOTE READ STRIG h} 33 Draper Pascal 2.1 Operators i} Operators Operator Operation ________ _________j} := assignment arithmetic: + addition k} - subtraction * multiplication / or DIVl} division MOD modulo (remainder after m} division) Relational: = equality <> n} inequality < less than > greao}ter than <= less than or equal to >= greater thanp} or equal to Logical: OR AND NOT q} 34 Draper Pascal 2.1 Error Messages r}Error Messages COMPILE TIME ERROR MESSAGES 01: Compiler table overflow (max 170) 02: s}Number expected 03: '=' expected 04: Identifier expected 05: Constant type identifier, number, or string cot}nstant expected 06: 'BEGIN' expected 07: Too many nesting levels 08: ':' expected 09: '.' expected u} 10: ';' expected 11: Undeclared identifier 12: Invalid type of identifier 13: ':=' expected 14: 'v}END' expected 15: ';', 'ELSE', or 'END' expected 16: 'THEN' expected 17: '#' expected 18: 'DO' expectw}ed 19: '#' or FILE type identifier expected 20: '[' expected 21: ']' expected 22: ')' expected x}23: Illegal factor or identifier type 24: INCLUDE file nesting too deep 25: 26: 'OF' expected 27: Misy}matched data types 28: 'TO' or 'DOWNTO' expected 29: 'UNTIL' expected 30: Range error 31: '(' expectez}d 32: ',' expected 33: Literal too long or missing end quote (') 34: 'END' but no RECORD started 35: {}Incorrect number of parameters 36: INTEGER type identifier expected 37: STRING type identifier expected 38:|} REAL type identifier expected 39: CHAR type identifier expected 40: FILE type identifier expected 41: HEX }}type identifier expected 42: STRING constant expected 35 Dr~}aper Pascal 2.1 Error Messages EXECUTION TIME ERROR MESSAGES } INDEX TOO HIGH This message occurs if an attempt is made to stor}e a string array element into an occurance that is higher than defined for the variable. } For example, if you tried to store the twentieth entry of an array that was only} defined to hold ten occurances, you would get the message. This messag}e only applies to string arrays since other array types are not checked} for valid occurance numbers. UNABLE TO OPEN DEBUG IOCB (7) This message is issued if th}e list output device you specify in response to the 'WHERE? (FILESPEC)'} prompt cannot be opened. The prompt is issued only for the debug features } trace and stack display. CIO ERROR xxx FOR IOCB # y Some kind of Input-Output operat}ion was performed which resulted in an abnormal return code from the At}ari operating system. Refer to your BASIC or DOS manual for the meaning of } the error number 'xxx'. 'y' is the IOCB number which the error occured on. Note that this } message will not be printed if OPTIONS(0) is in effect. In this case it is }your responsibility to check the return code by interrogating IORESULT }after each I/O type instruction. AT OFFSET This message accom}panies some other error message and refers to the offset within the pse}udo code of the instruction that had the error. Refer to the offset shown on your } compile listing to determine the Pascal instruction that experienced the error.} 36 Draper Pascal 2.1 Error Messages } STOPPED BY KEY This message indicates that execution of the } program was stopped because the BREAK key was pressed. The offset of the instruction } executing is shown in the 'AT OFFSET' message. Note that this message will not oc}cur (and the program will not stop after BREAK is pressed) if OPTIONS(4}) is in effect. INSUFFICIENT MEMORY This message indicates that an attempt was } made to increase the value of the stack pointer to a value which would overlay s}creen memory or the trace buffer, if the trace was active. It may also }be caused by manipulation of a record without sufficient room between t}he top of the stack and the top of available memory (MEMTOP) to temporarily hold it. INVA}LID OPCODE This message should not occur. It indicates that a pseudo i}nstruction was encountered which is invalid. If you get this message, it } means that your '.PCD' file has been corrupted somehow or an XCTL was made to a file that was } not a pseudo code file. To correct, re-compile the program in question. I}t may also occur if you attempt to run a Draper Pascal program which wa}s compiled under a previous release of this software. } 37 Draper Pascal 2.1 Registration Form } Registration Form When you register for a fee of only $15.00, you will receive a copy of the latest versi}on of the Draper Pascal manual. Also, if a later version of the software is more current than the version you }are registering, you will receive a diskette containing it. In addition to all relative information in this manual, th}e complete manual provided to registered users contains the following: * Complete Draper Pascal reserv}ed word definitions * Complete Draper Pascal example programs demonstrating the use of each reserved word} * BASIC equivalents for each reserved word, where applicable * Information on setup and use of a Ramdisk fo}r Draper Pascal. After proper initialization, the Editor will take less than two seconds to load and the }Compiler will take less than three seconds. Also, the default drive will be automatically set to the Ram}disk. * A royalty-free, non-exclusive license to allow you to distribute software developed using Draper P}ascal * Complete Draper Pascal source listings for the Editor, Main Menu program, Ramdisk initialization p}rogram, and sample programs * Editor command summary * Information on how to suppress the title s}creen from being displayed * Trace format descriptions * Internal data format descriptions } * Notes on printer usage with Draper Pascal * Technical support, by mail, at no charge If you purchased }Draper Pascal directly from Draper Software in your own name, then your copy is already registered and you will } recieve all the benefits of registration. You do not need to send in a registration form. If you received Dr}aper Pascal some other way, you may register your copy by filling out the following form and mailing it to the }listed address along with your check or money order. 38 Draper Pascal 2}.1 Registration Form ================================================================} Draper Pascal 2.1 Registration Form Mail payment to: Draper Software } 307 Forest Grove Drive Richardson, TX 75080-1939 Texas residents: Please add }8% tax. Note: Please allow three to five weeks for delivery. NAME _________________________________________} COMPANY (if any) ______________________________ ADDRESS ______________________________________ CITY/}STATE ___________________________________ ZIP __________________ Where did you obtain this copy of Draper }Pascal? _________________________________________________ _________________________________________________} _________________________________________________ ============================================================}==== 39====================================================I