Vous êtes sur la page 1sur 10
Addendum to the Apple Pascal Language Reference Manual BLE OF CONTENTS Introduction ‘One-Drive Startup Chaining Progeans ‘The SETCHAIN Procedure The SETCVAL Procedure The GETCVAL Procedure SHAPON and SWAPOFF an Exanple of Chaining Te °V" Option The "Swapping" Option Strings Turtlegraphics Error Messages Memory Space for Conptler Pile Space for Compiler Prograa Segmentation Segnents ‘The Segaent Dictionary The Run-Time Sogeent Table Seguent Nunbers The "Next Segaent™ Optton Loading of SEGMENT Procedures and Functions Hing of UNIT Segaeccs © Moloed" Opeton Tre "Resident™ Option APPLE Part 931-@101-8 INTRODUCTION This decunent is an addenda to the Apple Pascal Language Reference Manual, Most of the items described are features that have been added ro the systen since the printing of the manual. Corrections to the anual are also included. ONE-DRIVE STARTUP The one- rive startup described on pages 148-159 of the Apple Pascal Language Reference Manual 1s not correct. Instead a one-drive startup ‘works as Follows: Insert the diskette marked APPLES: {n the disk drive. Close the door to the disk drive and turn on the computer. The message apple ALL appear on the screen and the disk drive’s IN USE light will cone fons The disk drive ealts a whirring sound, Lights up for a second oF ‘s0 with a screenful of black at-signs ( @) on a white background, and Ehen goos black again. Next che folloving message is displayed: INSERT BOOT DISK WITH SYSTEM. PASCAL, ON IT, THEN PRESS RESET To complete the booting process, insert APPLE) After about 1 seconds, this mea and then press RESET. ge appears in the center of the WELCOME APPLE@, TO APPLE TT PASCAL 1.1 BASED ON USCD PASCAL. I. ‘CURRENT DATE 18. 14-AUC~89 (c) APPLE compuTER INC. 1979, 1989 (©) U.ce REGENTS 1979 The date may be different. The top of the screen will contain the Connand level prompt line. LANGUAGE REFERENCE ADDENDUM 4 CHAINING PROGRAMS Version 1+1 provides 4 neu UNIT called CHAINSTUFF in the SYSTEM.LIBRARY files This untt allows one program to "chain to another program. This scans that the first progran specifies the second one by giving its filename; the systea then executes the second program as soon as the first one terminates noraally. ‘The CHAINSTUFF untt also allows the first program to pase a STRING value to the second program; note that this allows alaost any Anformatton to be passed, since the string can he a fllenane and cen thus apectty a communications file containing almost anything. CHAINSTUFF also allove a program to turn the systen svapping feature fon and off. (Systen svapping 1s a nev feature doseribed in the ‘Addendua to the Apple Paseal Operating System Reference Manual.) CHAINSTUFY provides those capabilities in the fore of Five procedures fnaned SETCHAIN, SETCVAL, CETCVAL, SWAPON, and SMAPOFF. To use these procedures, the progran mst have a USES declaration immediately after the program heading? PROGRAM STARTER; USES CHATNSTUPPS ‘The SYSTIM-LIARARY File mist be on Line when the progran ta compiled and executed. THE SETCHAIN PROCEDURE ‘The SETCHAIN procedure call has the form SETCHAIN ( NEXTFILE ) where NEXIFILE is 2 STRING value (up to 23 characters). Tt should be etther the nane of code file, or the name of an exec file with the prefix EXEC/. As soon as che progran terninates normally, the systes will proceed to execute the file whose naae is the value of NEXTFILE. The file ts executed exactly as if the X(ecute command had been used; thus 1t 1s not necessary to supply the suffix .CODE for a code file or sTEXT for an exec files 2 LANGUAGE REFERENCE ADDENDUM If the prograa 1s halted because cf any run-tize error, the chaining does not occur. Note that this ircludes a halt caused by the WALT procedure. Mowever a teralaation caused by the EXIT procedure 1s Considered 4 normal termination ard the chaining will work. THE SETCVAL PROCEDURE ‘The SETCVAL procedure call has the form SETCVAL ( MESSAGE ) where MESSAGE 1s @ STRING value (up to 89 characters). SETCVAL stores the MESSAGE {n a cystea Location called CVAL, vhere it can be picked ‘up by another progran. THE GETCVAL PROCEDURE The GHTCVAL procedure call has the fors GETGVAL ( MESSAGE ) where MESSAGE 1s @ STRING variable vhose value is altered by GEICVAL. GETCVAL picks up the current value of GVAL from the system and stores At in the MESSAGE variable. Noce chat Lf CVAL has not been set by another program (using SETGVAL), chen the value of CVAL 1 4 Zero-length seeing. Once CVAL has been set, it reaaing set to the Sane STRING value until it te changed or the system ts reinitial{zed or rebooted. SWAPON. AND SWAPOFF procedures have no pacanete:. They allow « progras to turn the spitea’ oapping iaaviie oo cr off open totutogcion ot Em ochezes (before chaining to another program). AN EXAMPLE OF CHAINING Suppose that a diskette narod GAXS: contains prograas whose code files have the following nam collection of game LANGUAGE REFERENCE ADDENDUM 3

Vous aimerez peut-être aussi