You are on page 1of 8
MEMORY SPACE FOR ASSEMBLER When assenbling a very lerge progran, {t is possible for the Assenbler to run out of memory space. There are two reaedies to try shen this happens? Use the conmand-Level swepping option to get 1109 words of adéttional menory space. If the progran uses "ineiude" f1les, use the Piler‘s M(ake command to create a 4-block file naned SYSTEM.SWAPDISK on the Sane diskette that conta:ns the Assembler. This allows a segnent of the Assembler to be svapped out onto the diskette before the operating system segnent that opens files is euapped in. FILE SPACE FOR ASSEMBLER When the code file is autouatically sent co the vorkfile the default size for the file 1s [*]. In all other cases, the default size is [0], vuieh means that the code file will be allocated all of the largest space available on the diskette that it ts seat to. If there 1s only one avallable space on the diskette, the code file takes all of its Tole ean cause problens or on the the code file 46 on the boot diskette ane diskette used for the listing file. The Assembler Foguires some space on the boot diskette for temporary files, and Mill fall If che code file takes all of che space on the boot diskette. Likewise, the Asseabler will fall 1f it trles to create a Listing file and the code file has taken all the favellable space on the specified diskette. If you run {nto these problems, spectfy a different diskette for the code file or the isting file, or epecify 2 definite length for the code file that «11 leave enough rooa for other required files. 4d OPERATING SYSTEM ADDENDUM Addendum to the Apple Pascal Operating System Reference Manual TABLE OF CONTENTS Introduction Connand Level Exec Files Using Exec Piles ‘An Exanple Exec File ‘The Swapping Option Upper and Lovercase Capability Keyboard Case Control Other Control Characcere Using Upper and Lowercas Reset The Filer: The Prefix Comaind The Editor: Find and Replace The 6502 Assenbler Error Yessages Assembly Listings . Memory Space for Asseabler File Space for Assenble: APPLE Part #931-G109-00 INTRODUCTION The docunent you are reading is an addendum to the Apple IT Pascal Operating Syston Reference Manual. Most of the {tens descelbed are Features that have boca added to the operating system since the printing of this manual. Corrections to the manual also have been Sneluded COMMAND LEVEL EXEC FILES An exec file 1s coaposed of a gortes of conmanda that have been Stored In a text file. Wien an exec file ie executed, each command included tn the file is executed, just as if you were typing the commands From the keyboard. Exec Files are often used to store Sequences of commande that must be entered into the eyatea over and over agatn. ‘The following sections Include an explanation of exec f1les and a detatled example denonstrating the creation, execution, and editing of an exec filles Using Exec Files To create an exec file, Type M for Make fro the ain Comnand level. You vill be proupted NEW EMEC Nene: Next type the name you vant to give to your exec file, following the sane rules that govern the naning of other Pascal files. If no Ele size ts spoctfied, the file will be opened with eight blocks. Now you will see the proapt TERMINATOR“2 , CHANGE IT? The terainator ts a character that 1s used to signify che beginning fand end of an exec file. The teratnator character that is used to begin the file 1s automatically supplied by the aysten. The two terminator characters that end the file must be typed by the users Tf you anaver the above prompt by typing N for No, the system will OPERATING SYSTEM ADDENDUM 4 luse a percent eign as a terainator. If you type ¥, meaning that you want to change the terainator character, you vill be asked NeW TERMINATOR: Whatever character you enter bocones the terminator character for The system will accept any chat The terminator character that signals the beginning of an exec file 4n supplied by the system. Do not begin an exec file by typing the terminator character. If you do, the aysten-supplied terminator Annediately followed by your typed terminator vill be interpreted as the end-of-File signal and the systea vill close the exec file. Once the systen knove vtat your terainator character is, you can dogin entering the series of commands chat will make up your exec File. Commands will be executed as you enter then. End the exec file by typing the cerainator character twice. When you are ready to execute your exec file, type X for ekecute from the main Command level, hen you are proapted EXECUTE WHAT PILE 7 you should respond by typing ‘HEC / The system will instanteneously perform the sertes of commands Listed in your exec File, Flashing the proapts and your previously- entered respons When using an exec File, you mist mike sure that the aysten will be able to go through EXACTLY the same sequence of events that it went Ehrough vhen you created the exec file. For example, suppose you Create an exec file that entera the Filer, transfers the file MYPILE.TEXT from diskette OLDSTUE: to diskette NEYSTUF: and then Feturns co the naln Command level. If you later run your exec file fAthout removing the original diskette NENSTUF: from ite disk drive, the aysten would find MYFILE.TEXT already prosont on that Sleketee. Consequently, the system vill ask REMOVE OLD NEVSTUF:NYPILE.TEXT BEFORE TRANSFER ? 2. OPERATING SYSTEM ADDENDUM This te a question that vas not asked vhen the exec file wae created. The system will use as {te response the next character in the exec file which, tn thts ease, happens to be Q for Quit. In order for the systes to renove a file under these conditions, 1t must receive an for No as the response to the above question. Thus, the old version of MYFILE will not be renoved and the ne version of MYFILE will not be transferred. Because the Q vas used {0 respond to this question, the exec file nover uses the Q to Quit the Filer and the exec file closes with che systen still at the Filer level. The lesson to be learned from this 1s that, shen creating an exec file, you mist make cure that the steps’ the systen goes through will not change from one execution to another. There are sone conditions under vhich you my want to create your exec file usiag the Editor rather than the Make command. Suppose, for example, that you want to create an exec file that ill transfer several files to the printer. IF you were to use the Make command Eo ereate the file, 1 would be necessary for you to wait at your Eerminal while each of the files te actually sent to the printer. A more sensible approach would be to create the exec file in the Editor. Reneuber, however, that the exec file you create must include every character required ty each consand. Forgetting to include a single key stroke, such as a carriage return, will prevent the proper execution of your exec files TE you do ute the Editor to create an exee file, make sure that you begin the File with a single terminator character and end the file with two terainator characters. s The Eéitor will not put certain spectal characters, such as CTRL-C, into ts text. Thus you cannot use the Editor to create an exec file that creates a text file If you decide to edit an exteting exec file, you vill notice that certain characters, such as , are tncluded in the exec File but do not appear on the screens For this reason exec files are often difficult to edit. = There is no way to stop che execution of an exec file part vay through except by pressing RESET. You can use CTRL-S to teaporarily stop or freeze the output on the s:reen. CTRL-F flushes the output? the progres contioues to mun but ts output ie not sent to the screen or printers OPERATING SYSTEM ADDENDUM 3,