@L|}6CD l0C)HCC WhL/h `CmCDiD`  R@W1   Y0@R !L` D  C D     )16CS S)  C)D1 p p 0 C9DI pCDL~CiCDiD`Ǫ D  C D     )16CS S)  C)D1 p p }0 C9DI pCDL~CiCDiD` DD˙` d J)L !}D L(( LL()  L| L( S LH 0p n  } CY?  q  L L  ` )}ǝ `A! d߰")-݆ "  $G@LLL&0") $G% }DžH0 3S8`G ȱG ȱG   Gȭ Gȭ GG}GHiH8(()) G$H% `(0 }ǥ)8` d)L ݆ & LGȘ ݆LL d  ! LL d)N>Q  HH) }  hyhyB q L> Lm JJ  Ln*` dB%' }ǰ8  H H` 1 { LL   !L     Hh SY?  q  1L }  !? S   q 1 L   Ll  Lg E`L   !L)  q 1L}) `L0AM݊L݉ ML  N݆LLLNLMLHG!@}1F GȱGLLEEȩÑEȑEEȑE Ed E7EȩE  q} L !,0,0SGɛ L 1 !L EHEh W G gLLSROTCES EERF } G) *Gȩ GȽG GȌd q q G`  8   0G  `D}GCEDC0X:Ȣ Y ȱC* ? 0.. , 0%n ?A[ 0 : L`L  `, 0`Y}`piH n0)բY? 08`0 }  0$L GGȽG L `8L`L}Nj8`  05G)݁,G)ȱGȱGHh0})Hh` B! 8`8iiiLE`}ǠE8FEh( l0`ɃLL L8^~jj8jHi hEEEiEȱEiE` dTE} H8EEȱEEȩEh J E8   . m  i`LI!)E1FR}1LJ舩9GIH`LJJ`HGHh l`} S gL   8 rii `дCDCG W  }#C  Lq` X٨`DOS( ySYS IIIIIIIIIIIIIIIC`0 ߩ0}} ~} HE %|+-3G||DDOS PVDOSDOS[ `SYS sx}~}}#'}F~} CDOS SYS~}V 0`BDELV !B }`LVUQ   ]   TU J ]L!T  #      TU  } L ? .  t`GBJ V~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}ǢDEL8HI   0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$}G V0 0`B;DELV䌚 !B y`@ʆ v s? F`05: [ BDEHI%}% VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J V (` 9 V⪍ ઍ  -'}ǔLLu DEHILV 9 .l 9 .l  `` s$B VBH(}I|DE V BLV nB,DE J V* \*` B V BLVDEHI BLVL)}Ǫ1u H232435; 1 ;  hh@2 e1i1LHҍ 00) 08 109hh@ Ҡ2e*}(1i1232435ޥ<<823Z\}} 3E:}ӠɠîŮƠԠŠҮӛԠɛA. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDGE J. D,}UPLICATE DISKC. COPY FILE ^K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILEb M. RUN AT ADDRESSF. LOCK F-}ILE )N. CREATE MEM.SAVG. UNLOCK FILE- RO. DUPLICATE FILEH. WRITE DOS FILESW9!&x#!7&p))'&X*./)L''-؆莟.}R'S  vW DEHHI 1A#! @ ~0ɛ8A0.) ȅ 1 1i/}ǥil ! 1L NO SUCH ITEMSELECT ITEM OR FOR MENU! 0 .{z:*{}.|~ 1 0 00}JB 18L^%|DLl%DIRECTORY--SEARCH SPEC,LIST FILE? # 0 0 n&|D! 1L NOT A DISK FILE1}ǛN !B 1L " 1 !BDED:}:1BJ|DE 1DEBH2}I 1 h0ߢ 0.  0?詛 1 ~0YЛ 1 "L<" "L 3} BL1TYPE "Y" TO DELETE...DELETE FILE SPECCOPY--FROM, TO?OPTION NOT ALLOWED* HELPG003DAT 023 COPYING---D1:HELP4} G003.DAT # 0|D .L$A#B#C#JB|DE 1BHIDD#E 1D#0: B5} 1L B#C#C#B# B 1N#$0SYS1}:e#D# d# D# .d#ȽD# d# 𩛙d#X# 1,A#6}GPdD#ELO- A.BJdD#E 1 1HH 0hh|DL^%1}:e# Lt% e#dD#EL%7}7 1 0 . .0% 1L WILD CARDS NOT ALLOWED IN DESTINATION 0 A.|K@C}ǩ//3Hu ξL/L DRIVE TO WRITE DOS FILES TO?WRITING NEW DOS FILESTYPE "Y" TO WRITE DOS TO DRIVE 1.?}D1:DOS.SYSERROR - NOT VERSION 2 FORMAT. , &* բ( 1L `[) 0NΞ 0 L1M) 1@} L BAD LOAD FILELOAD FROM WHAT FILE?) 0 0#B 1L WHAT FILE TO LOCK?) 0 0$B 1L WHAT FILE TO UNLOCK?DUA}P DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO USE PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV. h  ,B}  `)  <0 2 2 0  ,   ,,ޢ* 1L ,K* 1 ~0 0C}FINSERT BOTH DISKS, TYPE RETURNERROR - DRIVES INCOMPATIBLE., 1 ~038  , 1L D}Ǿ, &*  Lz+, 0 , 1 ~0 + Y,0!,0 ,L+ ,mm  v,"ǭE}0Ξ, 05,Lt+L +,Hh` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNF}INSERT DESTINATION DISK,TYPE RETURN`    `L,8,0( rG}L1(`ߢ) 1* 1 ~0Y`hhL S SL1) 8`NAME OF FILE TO MOVE?- 0 0|DLtH}G% A., 1 <0 0 .@L# .BJ 1  DEHIB V L1 ,5 1 <0,L. I}I JB|,A#Pd#DE 1 HI BDEHHII 1 B 1 , 1 <0,0Lf- B VJ},A#P, 1 <0 0L#L ߢ) 1* 1 ~0Yj383}mm ݭK}}`8}``|* ? ɛ,`|:(|/ 1L `DESTINATION CANT L}BE DOS.SYS0 0H{ $22Δ $28/L /) $2 Π $2 0 ξM}ǩhAΞB,0 J 1 BޝDEHI,HDE 1HIHIDELSAVE-N}GIVE FILE,START,END(,INIT,RUN)O X0 1`BDEPHI V` X0H 1 L O}ǭ0 0 1L0`PLEASE TYPE 1 LETTER,0`hhL <0 1L0LA1 ,;ɛ7,"ɛ:ݦ1ݥP}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{Q}?NAME TOO LONG B VL ` L1I H1EӝDL1DEI|mDiE` V0`8d/8 i:"2!22 1R} L ERROR- 128ɛ+,' 20*.. өw2 1``2TOO MANY DIGITSINVALIDS} HEXADECIMAL PARAMETER800 0 8 00`,0'D800H,ɛh`2L1NEED D1 THRU D4 uT}~ . =DRAPER PASCAL_ lVersion 2.1} V} Copyright 1989@ Qby Norm Draper` For the Atari 400, 800, XL, oW}r XE series computers##? YDisk Based Documentation` This document contains the "GX}#etting Started" section plus other* lsections from the actual Draper Pascal manual. It is designed tos get you upY}8 and running and doing useful things with Draper Pascal? in a very short time. It does not, however, contain a detaileZ}Cd Kdescription of all the Draper Pascal definitions or pretend to beR a comprehensive tutorial or user's referenc[}[e. Registered users ^will receive the actual Draper Pascal manual which does contain ae complete description of \}(all definitions plus other information./ eDetails on registering are in the last section titledl "Registration For]}m". 1Draper Pascal 2.1O `Table of Contentsee} ^} Table of Contents! 7The ShareWare Concept X-\ 2c lFeatures }-_}-! 3( 5Introduction _-c 5l What is Pascal? -`}$-( 51 HWhat is Draper Pascal? f-j 5s About thisa} manual +-/ 58 WWhat is Draper Pascal made of? m-q 5z Abob} ut the DOS 2-6 6? ORamdisk support t-x 6} c} Getting Started 9-= 7D RThe Main Menu {- 1d}4 1 - Run Program @-D 15M `2 - Disk Directory }-e}- 15 &3 - Compile Program G-K 15T g4 - Edit a Program }-f} - 15 )5 - Exit to DOS N-R 15[ k6 - List a file }-g}- 16 -7 - Trace on U-Y 16` kThe Editor }-h}- 17' 7General Prompts \-` 18i vThe Commands }-i}!-% 190 GA - Add line(s) at end c-g 19r C - Change j}line(s) (-, 197 JD - Delete line(s) j-n 19y E - k} Edit line(s) /-3 20> MF - Filer menu q-u 20} l}C A - Append file 6-: 20G ZD - Directory list x- 20 m}m L - Load file =-A 20N \S - Save file }-n}-- 21 (I - Insert before line D-H 21S dL - List line(s) }-o} - 21 !M - Menu K-O 21Z lP - Print line(s) }-p}- 21 (Q - Quit R-V 22a rS - Scan line(s) }-q}- 22& ;X - Exit to Compiler Y-] 22d qThe Compiler }-r}-" 23) 8The Supervisor `-d 26k Pascal Definitionss} %-) 270 CSystem Information g-k 32r Reserved Wot}rd List ,-0 337 AOperators n-r 34y Errou} r Messages 3-7 35> PRegistration Form u-x 38}v}, -1229 JDraper Pascal 2.1d yThe Shareware Concept}w} 5The Shareware Concept< Draper Pascal is distributed on a Shareware basis. You may use x} FDraper Pascal without charge for the purpose of evaluating it'sM suitability for your use. If you find that Drapey}r Pascal is worth Zcontinuing to use, then you are requested to become a registereda user and gain the additionalz}! benefits that go along with it.( hSimply complete the registration form and mail it in to us witho the very reaso{}5nable payment of only $15.00. When you register your< copy of Draper Pascal, you'll receive the latest version of the |} Gsoftware if your registered version is not current, along with aN rcomprehensive printed user manual.y If y}}:ou have received this copy from a Users' Group, "SoftwareA Library" or "SIG", and have paid a small fee (usually $3 to ~}C$10), Oyou have NOT acquired the registered rights or continued right toV use Draper Pascal. This fee was for the} convenience of obtaining! bthe diskette with Draper Pascal on it. The fee does NOT apply toi the registration fee}. GYou may freely copy Draper Pascal for distribution under theN rShareware concept, without charge.y You }8may NOT charge any fee for the Draper Pascal program or? ldocumentation without our written approval.s You may NO}4T distribute Draper Pascal or it's documentation in; connection with ANY commercial venture, product, publication or } ;service unless you obtain the royalty-free license byB Nregistering.ii} } 2 1Draper Pascal 2.1X `Featuresee} } Features Y* Draper Pascal is a complete package allowing the user toc create, compile, and execu}"te programs written in the Pascal, 7language.> * Many features from both UCSD and ISO standard Pascals plus m}any Iextensions, such as sound and graphics, to make use of theS nversatile Atari hardware.u * Pasca};l structured programming features, including IF-THEN-ELSE,E WHILE-DO, CASE-OF-ELSE, FOR-TO/DOWNTO-DO, and REPEAT-UNT}IL are included.# `* FUNCTIONs and PROCEDUREs using local or global variables.j Integer type variab}les can be passed directly.$ g* Data types supported include: Character, String, Integer, Real,q Boolean, Rec}1ord, and File. One and two dimension arrays are; also supported for all data types other than File and Record. } C* Only one disk drive and 48K RAM are required. Multiple, andM ydouble density, disk drives are supported.} }> * Machine language subroutines may be loaded and called.E h* Program chaining is supported.o * No limit on}+ source program size. "Include" files are5 Asupported.H * One-pass compiler generates pseudo code directly.} A* Maximum program pseudo code size is about 30K bytes.H m* Textual compiler error messages.t * Execut}C5ion debugging features include instruction trace and? Ostack display.V * Special options for error display an}d break key disable. `* Single keystroke program execution repeat, exit to DOS, or exitj to Main Menu progra}m are featured. W* Includes Editor program to create, modify, and print Pascala source files, or other text } type files. T* Includes Main Menu program (Pascal source included) for easy^ select of Compiler, Editor, or }utility functions, such as% bdirectory or file listing. Main Menu program may be replacedl with a user writt})en program to create a turnkey operation...U V3[[b sDraper Pascal 2.1} } %Features**1 l* Ramdisk support. Details provided to registered users.s * Works w}#ith most popular versions of DOS.* d* Easy to use. No linking required. Compile and executen immediately. } >* Royalty free license available to registered users.E c* Includes sample programs.j * Comprehensive us}(er manual provided to registered users.2 rComplete examples and BASIC equivalents given for each reserved| w}ord.//V W4\\c tDraper Pascal 2.1} } &Introduction++M [Introductionb 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? XPascal is a high-level structured programming language developed_ by Niklaus Wirth in 1971. It i}%s easy to understand and well suited, Vfor program development and maintenance.s What is Dr}aper Pascal? RDraper Pascal is not a "standard" Pascal. It has a number ofY commands which are exactly like ISO }and UCSD versions, some which% gare similar, and many "extensions" which bring out the true powern of the Atari co}4mputer in an easy to use manner. It was designed to; require only one disk drive for operation, but not be limited to }C Aonly one. At this time, it has been shown to work with allH hardware and software configurations where enough mem}ory is Pprovided. This implementation also has a number of commands whichW are familiar to Atari BASIC users, suc}h as POKE, PEEK, SETCOLOR," 6NOTE, POINT, etc..U hAbout this manualo This manual is}3 intended to familiarize you with all the features: of Draper Pascal. It is not intended to teach you how to program } Gin Pascal. However, if you already know Atari BASIC, then you canN understand the Pascal statements more easily by} referring to their WBASIC equivalents shown after the definition of each Pascal^ reserved word in the complete m}$anual provided to registered users.+ hIt is recommended that you read this manual completely to beo familiarized w}$ith its features and restrictions.= ]What is Draper Pascal made of?d This implementation of Pa}*scal is made up of three main components.1 kThey are the Supervisor (sometimes referred to as runtimer routines), }7the Compiler, and the Editor. The Supervisor is a high> performance machine language program which simulates a 16-bit } Gpseudo computer. The Compiler translates Pascal source code intoN pseudo-code instructions to be executed by the }Supervisor. The YEditor 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- pLISTed to a disk or tape. These components are explained in detailw within} this manual. VFor a description of the various files included on the supplied] diskette, refer to the 'System I}nformation' section.B C5HHO `Draper Pascal 2.1} } Introduction8 GAbout the DOSN Draper Pascal can be used with most popular Dis} k Operating SSystems. It has been tested with Atari DOS 2.5, SpartaDOS 3.2d,Z and MYDOS. You should format a disk}ette with DOS on it to contain& fthe Draper Pascal system. Since the Draper Pascal Supervisor ism named AUTORUN.SY}C1S, it will execute immediately after the disk is8 booted. For XL and XE computers, you do not need to hold down the } FOption key while booting unless you are using SpartaDOS. If usingM SpartaDOS, you may want to rename AUTORUN.SYS to} PASCAL.COM and Vcreate a STARTUP.BAT file containing the following two lines:_ iBASIC OFFr PASCAL } ?This documentation file is not required to be on that sameF Qdiskette.q Ramdisk supp}ort GDraper Pascal supports the use of the "Ramdisk" capabilityN provided by using a DOS that supports a ramdisk} like Atari DOS 2.5 \or SpartaDOS 3.x with an Atari computer system having sufficientc memory to support the ramd}#isk. While using this feature, the* lEditor takes less than two seconds to load and the Compiler takess less than }8three seconds. Details on setup and use of this feature? are provided in the complete manual provided to registered use}rs.!!H I6NNU fDraper Pascal 2.1} } Getting Started= NGetting StartedU This section is intended to show by exam}ple how to use the Draper! bPascal system. You will edit, compile, and run a sample program.i Information displaye}*d by the computer is shown in normal type1 pwhile responses to be entered by you are shown underlined withw dashes}< (---). To begin with, make sure you have 48K RAM installedC and no cartridge in place. Boot the disk now by placing it} in disk Rdrive 1 and turning on the power to the Atari computer. After theY Supervisor has finished loading, you} will see a screen that looks% /like this:33E TDRAPER PASCALg tVERSION 2.1} } 1 - Run Program& :2 - Disk DirectoryI ^3 - Compile Programm 4 - Edit a Progr}am $5 - Exit to DOS3 D6 - List a fileS _7 - Trace onccu Copyrigh}t 1989 'by Norm Draper,,; <4Z lSelect the Editor{ -}C5 67;;B SDraper Pascal 2.1s Getting St}arted  +DRAPER SOFTWARE@ IEDITORX oA - Add line(s) at end} } C - Change line(s)# 6D - Delete line(s)E UE - Edit a lined sF - Filer menu} } I - Insert before line+ F} } Select Filer menu9 =-L \A - Append filek D - Directory list} L - Load file- SAMPLE1: UEnter the name of the fileo ov-v} } to be loaded. The name ofN dthe last file edited,} } .compiled, or run will be\ ufilled in by the Editor.} }& ?You may have to overtypem it with the name} shown.  .A,C,D,E,F,I,L,M,P,Q,S,X,?->L9 NList the file on thep q-| s}creen Line from ->5 KJust press RETURN for^ _-y 'Lin}e from' and 'Line to'. *Line to ->E ^This will give a list ofq r-} } %the entire program inS Zmemory.dd} } 8 ,Draper Pascal 2.1L [Getting Startedaaj 1:PROGRAM KALEIDOSC}OPE; '2:VAR I,J,K,W,X:INTEGER;0 83:BEGINA R4: MAXGRAPH(19);[ l5: GRAPHICS(19);u 6: X:=0;} 7: REPEAT 28: FOR W:=3 TO 50 DO; E9: BEGINM P10:T fFOR I:=1 TO 10 DOn q11:u BEGIN }C 12: FOR J:=0 TO 10 DO( +13:1 7BEGIN? B14:I QK:=I+J;Y \15:c COLOR(J*3/(I+3)+I*W/12); } 16: PLOT(I+8,K);& )17:0 =PLOT(K+8,I);E H18:O `PLOT(32-I,24-K);h k19:r PLOT(32-K,2}4-I); 20: (PLOT(K+8,24-I);0 321:: HPLOT(32-I,K);P S22:Z jPLOT(I+8,24-K);r u23:| P} LOT(32-K,I) 24: !END) ,25:0 4END< E26: ENDM p27: UNTIL X=99 (* UNENDING LOOP *)x 28:EN}D. &A,C,D,E,F,I,L,M,P,Q,S,X,?->I1 HLet's insert a commentj k-v before } line 15. Line -> 15* .--6 915:@ S(* MY FIRST EDIT *)\ qEnter the data to be} } -" =inserted when prompted forE H16:k line 15. Just pres} s RETURN -7 Rwhen prompted for line 16.} } This will terminate insertL Smode.Z vA,C,D,E,F,I,L,M,P,Q,S,X,?->L} } List again to verify that@ A-L `the change was made} } correctly.$ 1Line from ->D F-M ZLine to ->m p-y 1:PR}OGRAM KALEIDOSCOPE; 52:VAR I,J,K,W,X:INTEGER;::a b9ggn Draper Pascal 2}.1" 1Getting Started66? G3:BEGINP a4: MAXGRAPH(19);j 5: GRAPHICS(19); } 6: X:=0; #7: REPEAT, A8: FOR W:=3 TO 50 DOJ T9: BEGIN\ _10:c uFOR I:=1 TO 10 DO} }11: BEGIN 12: /FOR J:=0 TO 10 DO7 :13:@ FBEGINN Q14:X `K:=I+J;h k15:r (* MY FIRST} EDIT *) 16: 4COLOR(J*3/(I+3)+I*W/12);< ?17:F SPLOT(I+8,K);[ ^18:e rPLOT(K+8,I);z 19:} PLOT(32-I,24-K); #20:* ;PLOT(32-K,24-I);C F21:M ]PLOT(K+8,24-I);e h22:o PLOT(32-I,K);} 23: "PLOT(I+8,24-K);* -24:4 APLOT(32-K,I)I L25:R VEND^ a26:e iENDq 27: END }C (28: UNTIL X=99 (* UNENDING LOOP *)0 829:END.? [A,C,D,E,F,I,L,M,P,Q,S,X,?->Ff Let's save the program}EE" #-. Cback to disk drive 1q under the sa} me name. )A - Append file8 KD - Directory listZ hL - Load filew S - Sa} ve file S* ,-3 NEnter filename -> SAMPLE1h ho-pw A,C,D,}E,F,I,L,M,P,Q,S,X,?->X! Repeat,Menu,Exitp If you press }6the START key, your Pascal program will execute again= from the beginning. If you press the SELECT key, control will be } Itransfered to the main menu program (INIT.PCD). If you press theP ESC key, you will exit to the DOS utility men }Cu. You also have two Zother options at this point. They are both used for debugginga purposes. If you press CTRL- }&S (the 'S' key while holding down the- gCTRL key), the stack values, at termination time, will ben displayed. If y }.ou press CTRL-T, the internal trace table, if5 sactive, will be displayed. With either of these two debuggingz opt }@ions, you will be asked where the display should be sent by theG prompt 'WHERE? (FILESPEC)'. To see it on the screen, e } nter 'E:'. MIt also may be sent to printer or disk by following normalT filespec naming conventions. If the displ }ay is sent to the screen,! cyou may stop the scrolling by use of the space bar. Press the ESCj key if you have see }.n enough and wish to return to the Supervisor5 wtermination prompt. Any other key causes scrolling to continue as} } normal. 4 626;;B SDraper Pascal 2.1p Pascal Defini }tions ) >Pascal DefinitionsE Syntax is shown below for each of the Draper Pascal rese }rved Owords. The complete manual provided to registered users, however,V contains COMPLETE definitions, COMPLETE } sample programs Vdemonstrating the use of each reserved word, as well as BASIC] kequivalents.r uABS} } 'FUNCTION ABS(Number):INTEGER;. 2ADDRA ^FUNCTION ADDR(Var):INTEGER;e jANDq wARCTAN} } #FUNCTION ARCTAN(Var):REAL;* /ARRAY= TARRAY[Number1] OF Typen ARRAY[Number1,N }umber2] OF Type ASC+ HFUNCTION ASC(Cvar):INTEGER;O VBEGIN] bBLOADp PROCEDURE BLO }AD(Program); BOOLEAN% )CALL8 RPROCEDURE CALL(Address);Y ]CASEl CASE expr1 OF con } st1 : stmt1;5 Econst2 : stmt2;m q...} } +constn : stmtnE KEND;e CASE expr1 OF const1 : s }tmt1;. >const2 : stmt2;f j...} }C $constn : stmtn> IELSE stmtxc jEND;q wCHAR} }  CHR /FUNCTION CHR(expr1):CHAR;6 ;CLOSEI aPROCEDURE CLOSE(File);h mCOLOR{ PR }OCEDURE COLOR(Number);C E27JJQ bDraper Pascal 2.1} } Pascal Definitions &CONCAT3 ^PROCEDURE CONCAT(Parm1,Parm2,...):STRING;e jCONSTx CONST }" name1=value1; name2=value2; ...) -COPY< jFUNCTION COPY(Source,Index,Length) : STRING;q tCOS} } FUNCTION COS(Var):REAL;' .CVTREAL: WFUNCTION CVTREAL(Ivar):REAL^ aDEGq PROCEDURE DE }G; DELETE DPROCEDURE DELETE(Source,Index,Size);K PDIVW ZDOSj PROCEDURE DOS; } DRAWTO /PROCEDURE DRAWTO(X,Y);6 =DUMPSTKI ]PROCEDURE DUMPSTK;d jDVSTATw PROCED }URE DVSTAT(A,B,C,D); "END) ,EOF< HEOF(File);O SEOLNb oEOLN(File);v EXIT } PROCEDURE EXIT;$ 'EXP7 PFUNCTION EXP(Var):REAL;W \EXP10j FUNCTION EXP10(Var) }:REAL; FALSE #FILE* -FOR= eFOR var := expr1 TO expr2 DO statement;} }/ FOR var := expr1 DOWNTO expr2 DO statement;6 @FUNCTIONG MGOTOXYZ rPROCEDURE GOTOXY(X,Y);y GRAP }HICS ,PROCEDURE GRAPHICS(Number);3 8HIMEMF ]PROCEDURE HIMEM(Value);dd} } 28 -Draper Pascal 2.1J \Pascal Definitionsaah jIF{ IF } expr1 THEN stmt1;- NIF expr1 THEN stmt1 ELSE stmt2;U [INSERTh PROCEDURE INSERT(Sour }ce,Destination,Index); (INTEGER/ 7IORESULTB ^FUNCTION IORESULT:INTEGER;e mKEYPRESSx FUNCT }ION KEYPRESS:INTEGER; $LENGTH1 QFUNCTION LENGTH(svar):INTEGER;X ZLNk FUNCTION LN(Var):R }EAL; LOCATE ?FUNCTION LOCATE(X,Y):INTEGER;F JLOCKY tPROCEDURE LOCK(Filename);{ LO }CG *FUNCTION LOG(Var):REAL;1 =LPENH, LPENVD \FUNCTION LPENH:INTEGER;v FUNCTIO }N LPENV:INTEGER; !MAXGRAPH, GPROCEDURE MAXGRAPH(Mode);N SMODZ _NOTf jNOTEy PROC }!EDURE NOTE(Iocbno,Sector,Byte);( +ODD; PFUNCTION ODD(iexp);W [OPENj PROCEDURE OPEN(File }no,Aux1,Aux2,Filename);;! ,OPTIONKEY3 :OPTIONSF dOPTIONS(Opt1,Opt2,...,Optn);k oORv yORD} } ,FUNCTION ORD(Realvar):INTEGER;3 9PADDLEF hFUNCTION PADDLE(Number):INTEGER;o sPEEK} } &FUNCTION PEEK(Address):INTEGER;- 1PLOT@ VPROCEDURE PLOT(X,Y);] bPOINTp PROCEDURE POI !}NT(Iocbno,Sector,Byte);D F29KKR cDraper Pascal 2.1} "} Pascal Definitions! %POKE4 TPROCEDURE POKE(Address,Value);[ ^POSn FUNCTION POS(Pa #}ttern,Source):INTEGER; (PROCEDURE2 BPROCEDURE Name;\ PROCEDURE Name(Parm1,Parm2,...,Pa $}rmn); PROGRAM! 0PROGRAM Name;7 Expr1 SHR Expr2E HSINX qFUNCTION SIN(Var):REAL;x SOUND *} @PROCEDURE SOUND(Voice,Pitch,Distortion,Volume);G JSQRZ sFUNCTION SQR(Var):REAL;z SQR +}T *FUNCTION SQRT(Var):REAL;1 ;STARTKEYB HSTATUSU uPROCEDURE STATUS(Iocbno,Ivar);| S ,}TICK 1FUNCTION STICK(Number):INTEGER;77^ `30eel Draper Pascal 2.1 -}C /Pascal Definitions44; >STRN iFUNCTION STR(Var):STRING;p uSTRIG} .}. 'FUNCTION STRIG(Number):INTEGER;. 6STRING= ETRACEOFFP ePROCEDURE TRACEOFF;l sTRACEON} /} PROCEDURE TRACEON;/ LPROCEDURE TRACEON('Number);S YTRUE` fUNLOCKs PROCEDURE 0}UNLOCK(Filespec); VAL- RFUNCTION VAL(Svar):INTEGER or REAL;Y \VARl VAR Name1,Name2,. 1}..,Namen : Type;+ UVAR Name1,Name2,...,Namen : ARRAY[Number]s OF Type; 2} WAIT 3PROCEDURE WAIT(Number);: ?WHILEM lWHILE Condition DO Statement;s xWRITE} 3} &WRITE(File,Expr1,Expr2,...);@ ^WRITE(File,Expr1:Fldwdth...);x WRITE 4}!(File,Expr1:Fldwdth:Numdec...);( /WRITELN; ZWRITELN(File,Expr1,Expr2,...);t WRITELN(F 5}ile,Expr1:Fldwdth...);1 YWRITELN(File,Expr1:Fldwdth:Numdec...);` dXCTLs PROCEDURE 6}XCTL(Filespec); XIO+ YPROCEDURE XIO(Number,File,Aux1,Aux2,Filespec);nn} 7} 31& 7Draper Pascal 2.1T fSystem Informationkk} 8} !System Information( kThe Supervisor uses zero page locations $A0 - $BF. Locations $80 -r $9F are ava 9}2ilable for your use if desired. Various locations9 between $D4 and $FD are used by the floating point routines. Page :} Esix ($600 - $6FF) is available for your use and not used by theL \Pascal system.c The Supervisor is loaded i ;}(nto memory by DOS at the address $1D7C./ rIf this memory location is not available, then an error message isy give <}:n, along with an explanation of the probable cause of theA problem. The pseudo code program to be executed is loaded in =} Gmemory immediately after the end of the Supervisor. The pseudoN machine stack extends from the end of the pseud >}o code program to Kthe MEMTOP position, just before screen memory.h Filename Descriptions ?}C @The files named below are included in this ARC file:G RAUTORUN.SYS_ vSupervisor object code} @}@ COMPILER.PCD 'Compiler pcode. 8EDITOR.PCDF SEditor pcodeZ bINIT.PCDr Main Menu p A}code INIT.PAS$
Kaleidoscope sample program sourceE PSAMPLE2.PAS] Roman numeral sample program sou G}rce PASCAL.DOC# ;This introduction manualMMt v32{ H} Draper Pascal 2.13 EReserved Word ListJJi Reserved Word List I} ABS DEG 'FUNCTION ODD. 4READLN8 ?STRINGF JADDRO UDELETEY _GOTOXYc eOFm qREALw THEN J} AND DIV 'GRAPHICS OPEN- 3RECORD7 :TOA LARCTAN DOT YHIMEM^ nOPTIONKEY REPEATr TRACEOFF K} ARRAY DOS IF" 1OPTIONS RESET6 >TRACEONE HASCN TDOWNTOX ^INSERTb dORl REWRITE TRUE L} BEGIN DRAWTO %INTEGER ORD, /RND6 =UNLOCKD IBLOADM gDUMPSTK IORESULT PADDLEk SELECTKEY UNTIL M} BOOLEAN DVSTAT &KEYPRESS PEEK, :SETCOLOR VALA ECALLJ NELSET ZLENGTH^ bPLOTh kSHLr vVAR} N}CASE END LN "POINT' *SHR1 6WAIT= ACHARF IEOFP VLOCATEZ ^POKEd gSINn tWHILE{ CH O}R EOLN LOCK POS% *SOUND/ 5WRITE< ACLOSEE IEXITO RLOGY ]PROCc fSQRm uWRITELN| C P}OLOR EXP LPENH *PROCEDURE SQRT0 5XCTL< JCONCAT EXP10O TLPENVY qPROGRAM STARTKEY XIOx CONST Q}C FALSE MAXGRAPH PTRIG" )STATUS0 4COPY9 =FILEC FMODM RPURGEW ]STICKd gCOSm pFORw NOT R}R RAD STR &CVTREAL FUNC, 0NOTE6 :READ@ ESTRIGhh} S} 33 1Draper Pascal 2.1W `Operatorsee} T} Operators %Operator? IOperationP PX_Xr r{_ U} :=* 7assignment> Jarithmetic:S T+s addition V} -( 4subtraction= >*] lmultiplicationu / or DIV W} !division* -MODJ bmodulo (remainder after} X} !division)( 4Relational:= >=] fequalityo q<>} Y} inequality& 'y grea Z} ter than <=2 Hless than or equal toQ S>=q greater than [} or equal to Logical:( +OR4 8ANDA DNOT__} \} 34 (Draper Pascal 2.1I WError Messages\\} ]}Error Messages* GCOMPILE TIME ERROR MESSAGESM s01: Compiler table overflow (max 170)y 02: ^}Number expected '03: '=' expected- E04: Identifier expectedK 05: Constant type identifier, number, or string co _}nstant expected +06: 'BEGIN' expected1 M07: Too many nesting levelsS d08: ':' expectedj 09: '.' expected `} 10: ';' expected 511: Undeclared identifier; Z12: Invalid type of identifier` r13: ':=' expectedx 14: ' a}END' expected 715: ';', 'ELSE', or 'END' expected= Q16: 'THEN' expectedW h17: '#' expectedn 18: 'DO' expect b}ed 219: '#' or FILE type identifier expected8 I20: '[' expectedO `21: ']' expectedf w22: ')' expected} c}C&23: Illegal factor or identifier type, N24: INCLUDE file nesting too deepT X25:^ p26: 'OF' expectedv 27: Mis d}dmatched data types 728: 'TO' or 'DOWNTO' expected= R29: 'UNTIL' expectedX h30: Range errorn 31: '(' expecte e}d 32: ',' expected M33: Literal too long or missing end quote (')S s34: 'END' but no RECORD startedy 35: f}Incorrect number of parameters% J36: INTEGER type identifier expectedP t37: STRING type identifier expectedz 38: g} REAL type identifier expected% G39: CHAR type identifier expectedM o40: FILE type identifier expectedu 41: HEX h}type identifier expected ;42: STRING constant expectedFFm o35tt{ Dr i}aper Pascal 2.10 >Error MessagesDD] EXECUTION TIME ERROR MESSAGES j} INDEX TOO HIGH1 ^This message occurs if an attempt is made toy stor k}+e a string array element into an occuranceF tthat is higher than defined for the variable.} l} 9For example, if you tried to store theT twentieth entry of an array that was only m} Jdefined to hold ten occurances, you would gete the message. This messag n}e only applies to- [string arrays since other array types are notv checked o} for valid occurance numbers.' FUNABLE TO OPEN DEBUG IOCB (7)a This message is issued if th p}e list output) Wdevice you specify in response to the 'WHERE?r (FILESPEC)' q} prompt cannot be opened. The9 fprompt is issued only for the debug features} r} trace and stack display.& BCIO ERROR xxx FOR IOCB # y] Some kind of Input-Output operat s}ion was# Rperformed which resulted in an abnormal returnm code from the At t}ari operating system. Refer to: fyour BASIC or DOS manual for the meaning of} u}C 3the error number 'xxx'. 'y' is the IOCB numberN ywhich the error occured on. Note that this} v}v Dmessage will not be printed if OPTIONS(0) is_ in effect. In this case it is w}your Kresponsibility to check the return code byf interrogating IORESULT x}after each I/O type/ >instruction.E PAT OFFSETk This message accom y}panies some other error3 _message and refers to the offset within thez pse z})udo code of the instruction that had theD merror. Refer to the offset shown on your} {} 3compile listing to determine the PascalN uinstruction that experienced the error.} |}( *36//6 GDraper Pascal 2.1h vError Messages{ }} STOPPED BY KEY8 eThis message indicates that execution of the} ~}1 program was stopped because the BREAK key wasL spressed. The offset of the instruction} } @executing is shown in the 'AT OFFSET' message.[ Note that this message will not oc } cur (and the( Vprogram will not stop after BREAK is pressed)q if OPTIONS(4 }) is in effect. .INSUFFICIENT MEMORYI tThis message indicates that an attempt was} } :made to increase the value of the stackU pointer to a value which would overlay s }creen! Nmemory or the trace buffer, if the trace wasi active. It may also }be caused by manipulation5 aof a record without sufficient room between| t }-he top of the stack and the top of availableH rmemory (MEMTOP) to temporarily hold it.y INVA } LID OPCODE' SThis message should not occur. It indicatesn that a pseudo i }Cnstruction was encountered6 dwhich is invalid. If you get this message, it} }1 means that your '.PCD' file has been corruptedL somehow or an XCTL was made to a file that was } Hnot a pseudo code file. To correct, re-compilec the program in question. I }t may also occur if/ Zyou attempt to run a Draper Pascal programu which wa }'s compiled under a previous release ofB Pthis software.ff} } 37 /Draper Pascal 2.1M ^Registration Formcc} } Registration Form ^When you register for a fee of only $15.00, you will receive ae copy of the latest versi }*on of the Draper Pascal manual. Also, if1 ra later version of the software is more current than the versiony you } YRichardson, TX 75080-1939` Texas residents: Please add } 8% tax. FNote: Please allow three to five weeks for delivery.M SNAME |_ } COMPANY (if any) 7_9@ IADDRESS o_qx CITY/ }STATE *_,3 8ZIP J_MT Where did you obtain this copy of Draper } Pascal? A_CJ J{_ } 8_:A A}= }C=D I39}IEE