Marinchip 9900 Pascal User Guide
Table o� contents
Introduction -2 1. 1. Acknowledgem-ents - 2
Pascal - references 2
Using Pascal program -3 3. 1. Writins the -3 Comp i ng 3. 2. 11 th e program -3 3. 3. Executing the program -4 C-f' Program 3. 3.1. compatibilityparameters -4 3. 4. File rile usage -5 3.5. Compiler temporary -5 Pascal J4. Changes to the Sequential language -5 Scanner changes 4. 1. lower -5 4. 1. 1. Upper and operatorcase -5 4.1.2. Standard characters -5 delimiters '-1 4.4.1.1. 4.3. CommentOdd length -6 strings -6 Errol' messages -6 5. 1. Run-tIme errors -6 5. 1. 1. Overflow -6 inter errol' - 5. 1. 2. Po or 6 5. 1. 3. Case subscript out Or range -6 incorrect for variant reference 5. 1.4. Tag fieldoverflow -6 5. 1. 5. Heap -7 overf 5. 1. 6. Stac k I ow -7 5. 2. errol' System messagesname -7 5.2. 1. ,Bad program -7 5.2. 2. Huh? p -7 '�'\ 5.2. 3. Bad arameter -7 S. 2. 4. I/O error -7 I/O errol' on rile
U
.> .' � . J
i arin p Pascal User Guide M chi 9900
Introduction \
Pascal an a apta io of the programming language 9900 is d t n equential Pascal for the Marinchie com t system. Sequential 9900 pu r c, ascal a minicomputer-based v r on programming language Pascal, :-larinchiPis e Sl of which is widely regarded as the l a in language ein use toaay 'or the e d development of reliable software throughg the techniques st u u d the of r ct re · rogramming. contains th� features found in other programming Pascal an gua g es such as tran , and , DASIC, For Algol, but adds the following � o tant capabilities: ·J m p r Pascal allows the user to define new data types. and to thereby extend la gu g . The error-prone coding p rog explicitthe numbers n a e eliminated. of ram items as 1S ,'-.1 Pascal allows st uc es data to be built. This allows the definition and convenientr tu use0' tables containing various kinds of that are essentialr in software0' development. data Pascal has extensive compile-time checking of program correctness. The o i er detects all inconsistencies in use of types, whichc mp cl tc hes most of the frequently-made e ror s invariable For tran. DASIC. or Assemb anguag e prog ramm i ng. r a 1 y I Pascal provides i ter variables and dynamic st rag e allocation. These fe'atures p opermitn v i rt ally all systems .programmingo (e. g. , compiler and operating system)u tasks to e irel be written n � y in Pascal. Pascal provid es pro�ram control statements which eliminate the d forpowerful the "go to Programs written without "go nto"e s tat ments are statement.m c h easier to und erstand and e e u debug. Systems integrated Pascal into Marinchip isc the D Executive, I Pascal r g a s may be i e any program the 0 other that The Pascalp p r m comp i r calledis al Pascalk program that runswithin under I�i]arinChiP ystem. has l e -control the Disc Executive. the ' of e
Acknowledgements :�}. 1. Marinchip Pascal s s te based upon the Sequential Pascal c ompil er y m is by Per r in h Hansen and i mp e m n ed by Alfred Hartmann on a at t e CaliforniaB c ofl Technology.e t The C.design of the .�cl�he DP 11/45 Institute : esigned runtime system which interfaces Pascal programs to the Mar i nchip - ascal Disc dra s upon the d ig the Solo o er t i g system. Executive h w n of p a and implemented Per esBrinch Hansen, and the Concurrent Pascal and kerneL writtenby Robert Deverill and Tom Zepko. ,i'lIesigned ]interpreter by n cf' Pascal references ' hiS manual will attempt to teach the language Pascal. The is not � the following re'erences for a description the language.user to 0' ;i The references will be citeCl by the numbers given throughout the text of .1 referredthis manual.
Hansen. Architecture of Concurrent Programs. Prentice J[1] HalLBrinch Englewood Per. The New .:Jersey, book describes Solo operating systemCliffs, and the Concurrent1977. PascalThis language. Thethe- Solo operating system environment is simulated Pascal, so this r e e ce user-levelby Marinchip pr�gramming in ;Se�uentialbook is th�Pascal. definitive The informationf er n onon the language Concurrent Pascal is Marinchip Concurrent Pascal, om availableitself applicablethe to This is one the anotherb�oks c aboutpiler for also operating M9900.system software designof bestlarge systems developinggeneral that has ever written. and the 0' in been _ lj Marinchip l User 9900 P c as a Guide the a u e on w t e to be a l n a exists It r 1'19900.a or a i t t is g g as-for it any serlousg theuser o-f tis l n used as re-ference to the lan uage, not u i in Pascal. It indispensable Pascal. and - [3] Jensen, K. , N., Pascal Manual s , York. 1974. i THE tutorial e' Wirth, aUser compiler and Report (Second ,cl l edit6600 ionwhich>. Springer-Verlag,respects New from the This mp r in Sequential manual for Pascal. It describes a P sca for the Controc l Data the 1'19900, still is an to P al for users dif-fers someothe r Paswellcal asco thoseile '-for butwith excellent introduction as familiar �rogramming languages as learning programming in Pascal.of I Finally. users become allif e s Pascal, y programsa work the exhortIng llikest e mostr on forever, you ou Pascal fanatic, andp uicontinuen the wonder�newsletter of writlngshould containing the t hat �'lGroup,first which bl ishe all the Pascaltime workingthe world. This majorJoin forum Pascalreporting User�s is s a quarterly implementations, commentarynews \ �'labout'regarding from around use, and proposedthe modi.pications.for To Join, implementations,for one yearexperienc� using and send $4 the language,membership its ofGroup, to: University Computer Mickel 227 EX Pascal UnIonUser�s Street c/o Andy 208 SE of Center: MinneapolIs.University MNMinnesota 55455
Using 3. Pascal
to compile, Pascal r t , run programs on ;lThiS t e m familiar of M9900 sy s The to be the -\he chapter describes. how w i e Text and The the Editor. Disc systemuser o m p ise assumes d withrespective use o ' is Marinchipfor thoseExecutive and nt is reader who .' Guides with c n refe rred to the User r,]UnfamiliarL. . more information regarding them. program the Writing program Pascal accordinga r to n o the the in h 2. t with Editor. is written pt othe elanguager spe cificatiofree-form,ns thein references to the mpil is :rext need not be given c e and entere d iwhen system the . ser with J.' Since input Pascal c totally defines the I ny with which interface between concernethe d column operatingalignments entering the data.must Pascal system. This seque ntialto a program beginsit compiled.a "prefix" This easily be is is most program and the the t prefix by the "RF" te x The user the of theprogram file, be.poree er Ii�JccOmpliShedi a addedtop and ' .. command in editor. should go nt the command: RF PREFIX where nam e or 'rile y em the PREFIX the on s R a pre (The standard supplied ! i-scc 0text t editor,i n .pis i x the x is the st � Systems by name). This will c�py the rloarinchip in g the astandard file that . pre.p i by before line prefix the in the command requiredfirst of user program. with � the Concurrentis compiler,explicitly can define systems e he operating , I user different to to add prefixIn to programs beca�sePascal having order to J:he Pascal the user the new c n to be run interfaces new programs. ability to allowha ge ,', m s be complete of the prefix u these . refix it available.under A be .poundsystems. in of standard the • jrogramsxplaining may section 5. 2 r�ference [1], t definition line by line 11.2. Compiling the program has stored a Pile it Pascal with the Text ��ncema� c i bethe om le withprogram the Pascalbeen Compiler. The compiler is calledEditor, from the in e n S e ,11 p d (' t t : y t h ta b b p :> i :�. ,i ��, � : � �: .::J 0 m:; : � .�:_ : : � : : >�: : : : � : : Pascal Us er Guide - Marinchip 9900
here t file containing the Pascal program, is he source