BCS RELOCATING LOADER DESCRIPTION The Loader is the module of the Basic Control System that provides the capability of loading, linking, and initiating execution of relocatable object programs produced by the Assembler, FORTRAN, and ALGOL. The Loader is stored in an absolute record format on an external medium with the Input/Output Control subroutine, .IOC., and the equipment driver subroutines. It is loaded by the Basic Binary Loader from the device serving as the Standard Input unit. t The Basic Control System may also be loaded from magnetic tape. f The Relocating Loader loads object programs from the Standard Input unit and library routines from the device assigned as the Program Library unit. Comments to the user (e.g., Loader diagnostics) are written on the Teleprinter Output unit. LOADING OPTIONS The Basic Control System Loader is designed to load one or more tapes containing relocatable programs. The message "LOAD" is typed when an end-of-tape condi- tion is encountered. The user then loads the next tape, indicates loading from the program library, specified that loading is complete, etc. When all programs are loaded and no undefined external references remain, the Loader types the message "RUN". The user then initiates program execution. Memory Allocation List A Memory Allocation List may be obtained for the programs being loaded. The list may include the name, main program bounds, and Base Page bounds for each of the programs. This portion of the list may be followed (at the completion of the loading operation) by a list of all entry points and their absolute addresses, the bounds of the common block and the bounds of the linkage area. The setting of Switch 15 determines the contents of the list. To obtain the bounds for each program on a tape, Switch 15 must be set to 0 before the tape is loaded (in response to the "LOAD" message). To bypass the program bounds listing, set Switch 15 to 1 before loading the tape. The switch setting may be altered whenever the "LOAD" message is typed. To obtain the entry point list, the common bounds, and the linkage area bounds, set Switch 15 to 0 in response to the message "LST" which is printed after all programs are loaded. To bypass this portion of the list, set Switch 15 to 1 when "LST" is printed. Absolute Binary Output The user may specify that an absolute binary tape be punched. The process involves a simulated loading operation, however, the absolute program is punched on tape rather than being loaded. The absolute records produced consist of the relocated programs (including all pro- grams loaded from the Program Library), the Linkage area, all referenced seg- ments of the Basic Control System. These might include: --------------- t See Appendix G for description of Standard units. f See Chapters 2 and 8. 3-1 Input/Output control subroutine (.IOC.) All input/output equipment drivers Other BCS system subroutines Memory Table (.MEM.) System Linkage Area Interrupt Processing area Absolute locations 2 and 3 In addition, the Loader Symbol Table, the common and linkage area bounds are punched in ASCII format on the end of the binary tape. Ten inches of feed frames separate the binary instructions and the ASCII data. This feature provides a record of the memory allocation for the absolute program. At the completion of the "loading" process the Loader types the message "END". To execute this absolute program, it must be loaded using the Basic Binary Loader. To initiate execution, set 000002 into the P-Register and press RUN. OPERATING PROCEDURES The following procedures indicate the sequence of steps for loading and execution of the Basic Control System Loader: t A. Set Teleprinter to LINE and check that all equipment to be used is operable. B. Load the Basic Control System tape using the Basic Binary Loader. C. Set Switch Register to 000002, press LOAD ADDRESS, and set Switch Register to 000000. D. Establish Loader parameters: 1. Set Switch 15 to 1 if no Memory Allocation Listing is desired during firload operation. 2. Set Switch 14 to 1 if an absolute binary tape of the program is to be punched.(Turn on punch device if this option is selected.) E. Place relocatable object tape in device serving as Standard Input unit. F. Press RUN. During the operation of the Basic Control System Loader, the following halts may occur: Teleprinter Message Explanation Action LOAD End-of-tape condition on 1. To load next tape, set (T-Register Standard Input device. Switches 2-0 to 0. If contains no Memory Allocation 102001.) Listing of next tape is desired, set Switch 15 to 1. Press RUN to continue loading. -------------------- t See Chaper 8 for Magnetic Tape System usage 3-2 Teleprinter Message Explanation Action 2. To indicate that all programs are loaded and to proceed to the end-of-loading phase, set Switches 2-0 to 001. Press RUN. t 3. To terminate loading operation set Switches 2-0 to 010. Press RUN. (This forces execution even though undefined ex- ternal references have not been matched.) 4. To load from Pro- gram Library, set Switches 2-0 to 100. If no Memory Alloca- tion Listing of library routines is desired, Set Switch 15 to 1. Press RUN to con- tinue loading. When all library routines are loaded the Load- er proceeds directly to the end-of-loading phase. *LST The Loader is ready to If a list of these items is print the LST, common not desired, set Switch bounds,and linkage area 15 to 1. Press RUN. bounds. *RUN All programs are loaded Check that all I/O de- and ready for execution. vices are ready for op- eration. Press RUN. *END The absolute binary out- To execute the program: put has been selected and the punched tape is 1. Load binary tape using complete. Basic Binary Loader. 2. Set Switch Register to 000002. Press LOAD ADDRESS. 3. Press RUN. -------------------- t A list of any undefined external symbols is typed following a Switch Register reply of 1 or 4 to the "LOAD" message. The message "LOAD" is then repeated. The programs containing the matching entry points should be loaded. Loading of user-programs from Standard Input must be completed before loading of routines from Program Library. 3-3 Teleprinter Message Explanation Action *L01 Checksum error: The To re-read record, re- checksum read on the position tape to begin last record does not ning of record and press agree with the checksum RUN. calculated by the Loader. *L02 Illegal record: The last To re-read record, re- record read was not rec- position tape to begin- ognized as one of the five ning of record and press types accepted by the RUN. Loader. *L03 Memory overflow: The Irrecoverable error, length of the main or program must be re- Base Page portion of the vised. program or the common block exceeds the bounds of available memory. *L04 Linkage area overflow: If program consists of Linkage words supplied several subprograms, by the Loader for ref- altering the sequence in erences between pages which the subprograms exceed the size of avail- are loaded may reduce able base page memory. the number of linkage words. Otherwise, ir- recoverable error, pro- gram must be revised. *L05 Loader symbol table Irrecoverable error, overflow: The number program must be re- of EXT/ENT symbols vised. exceed available mem- ory. *L06 Common block error: Revise sequence in The length of the com- which subprograms are mon block in the current loaded and reload pro- program is greater than gram. Otherwise, re- the length of the first vise program. common block allocated. *L07 Duplicate entry points: A tape has been loaded An entry point in the twice: restart. Other current program wise, irrecoverable er- matches a previously ror, program must be declared entry point. revised. *L08 No transfer address: To enter the starting ad- The initial starting lo- dress, set the absolute cation (e.g., END state- value in the Switch Reg- ment operand) was not ister , press LOAD A, present in any of the and press RUN. programs which were loaded. 3-4 Teleprinter Message Explanation Action *L09 Record out of sequence: Irrecoverable error, A NAM record was en- program must be re- countered before the vised. previous program was terminated with an END record. If the absolute binary output option is selected, the following halts may occur: T-Register Contents Explanation Action 102066 Tape supply low on Place new reel of tape 2753A Tape Punch which in unit. Press RUN. is producing absolute Leader is produced. binary output. Trailer follows last valid out- put. 102055 A line is about to be Turn punch unit off. printed on Teleprinter Press RUN. Output device. (See Basic Control System manual.) 102056 A line has been printed Turn punch unit on. while Teleprinter punch Press RUN. unit off. (See Basic Control System Manual.) 3-5