ALGOL DESCRIPTION The ALGOL Compiler accepts as input, paper tape containing a control statement and a source language program. The output produced by the Compiler may include a punched paper tape containing the object program; a listing of the source language program with diagnostic codes defining the errors, if any; and a listing of the object program. ALGOL requires a configuration including an 8K memory. CONTROL STATEMENT The first record that is input to the ALGOL compiler is a control statement. This contains the word HPAL followed by any, or all, of the following symbols, separat- ed by commas: L: produce source program listing A: produce object code listing B: produce object tape P: a procedure only is to be compiled S: sense switch control Furthermore, the program name (that is, the NAM record name) may appear in quotation marks. It must be a legitimate identifier with no blanks. Example: HPAL,B,P,"INVRT" Sense Switch Control If the character "S" is included in the control statement, the B,L, and A options are read by the Compiler from the Switch Register. The switches corresponding to the options: Switch Control Statement (Up) Equivalent 15 B - produce object tape 14 L - produce source listing 13 A - produce object listing The switches are read at the beginning of each line so that the list option, for ex- ample, may be "turned off" partway through compilation. Note that the P option, if used, must still be placed in the control statement. COMPILER OUTPUT The output from the ALGOL Compiler consists of: A relocatable binary tape (B) which must be loaded with the BCS Loader. A listing of the source program, (L) with each line preceded by its sequence number and the value of the program counter (with 2000(8) added) at the time the line is read. A listing (A) of the binary instructions produced by the Compiler. Compilation With One Output Device If only one output device is available, such as a 2752A Teleprinter, ALGOL may still be used, but will require two passes. One pass will be for a binary tape, and the other for a listing. This is accomplished most easily if the S option is used (see above). 6-1 OPERATING INSTRUCTIONS The following procedures indicate the sequence of steps for compilation of a source program: A. Set Teleprinter to LINE and check that all equipment to be used is operable. B. Load ALGOL compiler using the Basic Binary Loader. C. Turn on punch and list units. D. Set Switch Register to starting address of ALGOL; 000100 E. Press LOAD ADDRESS. F. Place source language tape in device serving as the Standard Input unit (e.g., Punch Tape Reader). G. Press RUN. The source listing will be produced on the list unit, and relocatable binary tape on the punch unit. This tape may now be loaded using the BCS Relocating Loader (See below). H. If another program is to be compiled, return to Step F. L. If the computer prints "HPAL??", the control statement is incorrect. To re- start compilation, place corrected control statement in input unit and press RUN. 6-2 BASIC CONTROL SYSTEM LOADER OPERATING PROCEDURES SUMMARY The Basic Control System Loader is used to load the object programs generated by ALGOL and any referenced library routines. Listed below is a summary of pro- cedures for normal loading of relocatable object programs and library routines (and for the printing of a Memory Allocation Listing):t 1. Load the Basic Control System tape using the Basic Binary Loader. 2. Set Switch Register to 000002, press LOAD ADDRESS, and set Switch Register to 000000. 3. Place ALGOL generated relocatable object tape in Standard Input unit. 4. Press RUN. The loader types "LOAD" it expects another relocatable or library program. 5. If more than one relocatable object tape is to be loaded, repeat Steps 3 and 4 for each. Otherwise, set Switch Register to 000004 to load library routines. 6. Place Program library tape in dedice serving as Program Library unit. 7. Press RUN. When the loading operation is complete, the loader types "*LST". Press RUN. The Loader types "*RUN" indicating the program is ready for execution. Diagnostic messages or halts might occur for the following: Operation System Reference Loading ALGOL Basic Binary Loader Chapter 1 compiler or SIO Magnetic Tape Binary Chapter 2 tapes Loader ALGOL ALGOL Appendix B compilation Loading object BCS Relocating Chapter 3 programs and Loader library routines Executing I/O I/O system Appendix D Operations (FRMTR) during running of object program Executing Basic Program Library Appendix E External Functions during running of object program ------------------- t See Chapter 3 for details and options. 6-3