Y26 3752 0_1130_Monitor_Programming_System_PLM_1966 0 1130 Monitor Programming System PLM 1966
Y26-3752-0_1130_Monitor_Programming_System_PLM_1966 Y26-3752-0_1130_Monitor_Programming_System_PLM_1966
User Manual: Y26-3752-0_1130_Monitor_Programming_System_PLM_1966
Open the PDF directly: View PDF .
Page Count: 272
Download | ![]() |
Open PDF In Browser | View PDF |
Z26-3752-0 Progra,m Logic IBM 1130 MONITOR PROGRAMMING SYSTEM PROGRAM LOGIC MANUAL This publication describes the internal logic of the IBM 1130 Monitor Programming System. The contents are intended for use by persons involved in program maintenance, and for system programmers who are altering the program ldesign. Program logic information is not necessary for the use and operation of the program; therefore, distribution of this,manual is limited to those who are performing the aforementioned functions. RESTRICTED DISTRIBUTION -- SEE ABSTRACT PREFACE • Effective use of this publication requires an understanding of the IBM 1130 Computing System and the appropriate programming system. Publications relating to the 1130 System are listed in the IBM 1130 Bibliography (Form A26-5916). --The' contents of this publication describe the internal structure of the programs comprising the 113() Disk Monitor System. The publication is divided mto seven sectiof(ls, the first of which is an introduction. Following this are sections which describe each of the Monitor programs: • Supervisor • • • Disk Utility Program • Subroutine Library System Loader Each section consists of a general description of the program and includes flowcharts depicting the major program components. The component names are the same as those used in the program listings supplied by the Programming Systems Department. It has been necessary to define many terms in order to describe the 1130 Disk Monitor System. Included in this publication is a glossary of special terms. It is recommended that the reader familiarize himself with these terms before attempting to read the rest of the publication. As an aid to the reader, actual core addresses have been specified in the text and on core maps; actual disk sector addresses have also been specified where useful. These addresses are accurate at the time of publication of this manual. However, they are subject to change and must not be construed as applicable at all times and in all cases. Assembler Program FORTRAN Compiler Copies of this and other IBM publications can be obtained through IBM Branch Offices. A form has been provided at the back of this publication for reader's comments. If the form has been detached, comments may be directed to: IBM, Programming Publications Dept. 452, San Jose, Calif. 95114 © International Business Machines Corporation 1966 ii CONTENTS Core Storage Layout. Phase Descriptions • SECTION 1: INTRODUCTION SECTION 2: SUPERVISOR • Introduction Area Description • Control Functions • • • • Resident Routines Phases • • • • • • The Loader • • • Disk System Format Loading Core Image Format Loading Subroutines Used by the Loader The Load-Time Transfer Vector The Flipper-Table • • • • The Object-Time TV. • System Overlay Scheme. • 2 2 2 77 • 82 2 3 7 8 12 13 13 14 14 15 SECTION 6: SUBROUTINE LIBRARY • • • • • Card Subroutine(CARDl) Keyboard, Console Printer or Operator Request Subroutine (TYPEO) •••••••••••• Console Printer or Operator Request Subroutine (WRTYO) Paper Tape Subroutine (PAPTl) Paper Tape Subroutine (PAPTN) Plot Subroutine (PLOTl) • • • • • The IBM 1132 Printer Subroutine (PRNTl) Disk Subroutines (DISKl) Flipper Routines (FLIpO, FLIPl) • FORTRAN I/O ·121 ·122 • ·122 • ·123 ·124 0126 0127 0127 SECTION 3: DISK UTILITY PROGRAM (DUP). Introduction • • • • • • • • • DUP Functions and Routines DUP I/O • • • • • • DUP I/O Routines 17 17 18 41 41 SECTION 7: SYSTEM LOADER/EDITOR FOR THE 1130 MONITOR SYSTEM • • • • • • System Loader/Editor Input General Description Routine Descriptions • • • • .134 -134 • .138 • .143 SECTION 4: ASSEMBLER PROGRAM Program Operation • Relocatability • • • • • • • Notes • • • • • • • Storage Layout. • • Output Format and Error Codes •• Tables and Buffers • • • • • Phase Descriptions • • • • • • Assembler Input -Output Routines • 45 45 46 47 47 49 51 53 74 SECTION 8: THE SYSTEM MAINTENANCE PROGRAM SECTION 5: FORTRAN • • • • Program Purpose • • • • • • • General Compiler Description Phase Objectives • • ••• Control Records • • • • • • 76 76 76 76 77 2 '119 ·119 ·120 .147 FLOWCHARTS • • • • • • • • • • • • • • • • • • • • 149 APPENDIX A. EXAMPLES OF FORTRAN OBJECT CODING • • • • • • • • • 245 iii APPENDIX B. DIAGNOSTIC AIDS· .254 APPENDIX C. DISK MAP .256 GLOSSARY • .257 INDEX' •• • • 262 ILLUSTRATIONS Chart AA. Chart AB. Chart AC. The 1130 Monitor System . • • • . . 149 The Supervisor • . . • • • • • • • 150 The Skeleton Supervisor, Presupervisor, and Cold Start Routine • •• 151 Chart AD. The Supervisor - Phase A • •• 152 Chart AE. The Supervisor - Phase B • • 153 Chart AF. The Supervisor - Phase C • • 154 Chart AG. The Supervisor - Phase D 155 Chart AH. The "upervisor - Phase E • • 156 Chart AJ. The Loader - Disk System Format Load • • • • 157 Chart AK. The Loader - Core Image Format Load 158 Chart BA. DUP Functions • • • 159 Chart IlB. DUP·-DUPCO 160 Chart BC. DUP·-DCTL • •• 161 Chart BD. DUP-DUMP • • • 162 Chart BE. DUP·-DELETE • 163 Chart BF. DUP·-DELETE • •• 164 Chart IlG. DUp·-STORE • • 165 Chart BH. DUP-STOREMOD • 166 Chart BI. DUP-DUMPLET • 167 Chart BJ. DUP·-DWADR 168 Chart BK. DUP-DEFINE 169 Chart IlL. General Assembler Flowchart • •• 170 Chart BM. The Assembler - Phase 0 171 Chart BN. The Assembler - Phase 0 172 Chart BO. The Assembler - Phase 1 173 Chart BP. The Assembler - Phase lA 174 Chart BQ. The Assembler - Phase 2 • •• 175 Chart BR. The Assembler - Phase 3 • • 176 Chart BS: The Assembler - Phase 4 • • 177 Chart BT. The Assembler - Phase 5 • 178 Chart BU. The Assembler - Phase 5 • • 179 Chart BV. The Assembler - Phase 6 • • 180 Chart BW. The Assembler - Phase 6 • •• 181 Chart BX. The Assembler - Phase 7 182 Chart BY. The Assembler - Phase 7 • • • 183 Chart BZ. The Assembler - Phase 7 • • • • 184 Chart CA. The Assembler - Phase 7 • • 185 Chart CB. The Assembler - Phase 8 • • • 186 Chart CC. The Assembler - Phase 8 187 Chart CD. The Assembler - Phase 8 188 Chart CEo The Assembler - Phase 9 • • 189 Chart CF. The Assembler - Phase 9 • •• 190 Chart CG. The Assembler - Phase 9 • •• 191 Chart CH. The Assembler - Phase 9 • •• 192 Chart CI. The Assembler - Phase 9 • • 193 Chart CJ. The Assembler - Phase 9 • • 194 Chart CK. The Assembler - Phase 9 • 195 196 Chart CL. The Assembler - Phase 9 Chart CM. The Assembler - Phase 9 • 197 Chart CN. The Assembler - Phase 9 198 Chart CO. The Assembler - Phase 9 • • 199 Chart CPo The Assembler - Phase 10 • •• 200 Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart Chart CQ. CR. CS. CT. DA. DB • DC • DD. DE. DF. DG. DH. DJ. DK. DL. DM . DN. DP. DQ. DR • DS. DT. DU. DV. DW. DX. DY. DZ. EA . EB. EC . ED. EE. EF . EG. EH • FA. FB. FC. FD. FE. FF. FG. FH. Figure Figure 1. 2. Figure 3. Figure 4. Figure 5. iv The Assembler - Phase 11 The Assembler - Phase 12 The Assembler - Phase 12 The Assembler - Phase 12A • FORTRAN - Phase 1 FORTRAN - Phase 2 FORTRAN - Phase 3 FORTRAN - Phase 4 FORTRAN - Phase 5 FORTRAN - Phase 5 FORTRAN - Phase 6 FORTRAN - Phase 6 FORTRAN - Phase 7 FORTRAN - Phase 7 FORTRAN - Phase 8 FORTRAN - Phase 9 FORTRAN - Phase 10 FORTRAN - Phase 11 FORTRAN - Phase 12 FORTRAN - Phase 13 FORTRAN - Phase 14 FORTRAN - Phase 15 FORTRAN - Phase 16 FORTRAN - Phase 17 FORTRAN - Phase 18 FORTRAN - Phase 19 FORTRAN - Phase 20 FORTRAN - Phase 21 FORTRAN - Phase 22 FORTRAN - Phase 23 FORTRAN - Phase 24 FORTRAN - Phase 25 FORTRAN - Phase 26 FORTRAN - Phase 27 FORTRAN - Phase 28 FORTRAN - Dump Phase FORTRAN I/O System Loader/Editor - Phase El System Loader/Editor - Phase E2 System Loader/Editor - Phase E2 System Loader/Editor - Phase E2 System Maintenance Program System Maintenance Program • System Maintenance Program • •• 201 • • 202 • 203 204 • •• 205 • • • •• • 206 207 208 209 210 • •• 211 212 213 214 215 216 • •• 217 218 • 219 • • • 220 221 • • • • 222 223 224 225 226 • • • • • 227 228 229 230 231 • 232 233 234 • • • • • • 235 236 237 238 239 240 241 242 243 244 Supervisor Phases and Areas • • • • . • Layout of the LOCAL and NOCAL Control Record Areas • • • • <, Layout of the FILES Control Record Area ••••••.••••. Storage Map of the Loader Storage Layout at Object - Time 2 6 7 8 12 Figure Figure 6. 7. Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure 8. 9. to. 11. 12. 13. 14. 15. 16. 17. Figure 18. Figure 19. Figure 20. Layout of the Object - Time TV Area Format Of the CALL TV for System Overlays Storage Layout of DUP Storage Layout of DUPCO Assembler I/O Flow Assembler Storage Layout FORTRA1\J" Input (Card Form) Layout of Storage During Compilation DO Table Subscript Expression Table Scan Example Organization of System Loader/Editor Input Loader/Editor Control Records ISS Subroutines The Bootstrap Loader 15 Figure Figure Figure Figure Figure Figure 16 17 18 46 48 76 77 101 103 106 Table Table Table Table Table Table Table Table 135 135 136 141 v 21. 22. 23. 24. 25. 26. 1. 2. 3. 4. 5. 6. 7. 8. Phase El Ph ase E2 - Part I Phase E2 - Part II • Phase E2 with the Skeleton Supervisor Phase E2 with DUPCO • Storage Layout During Execution of the System Maintenance Program .141 .142 .142 .142 .142 I/O Code Conversion Table Format of the I/O Buffer. Assembler Error Codes • Location Assignment Counter • FORTRAN Communications Area. Symbol Table ID Word Statement ID Word Type Codes Output Code of FORMAT Specification 42 • 49 50 51 79 80 81 95 .147 SECTION 1: INTRODUCTION The major characteristic of a non-process control monitor is that it allows continuous operation of stacked input jobs. It operates in a static environment in that control is regulated by the input data, not by external stimuli. It differs from a process control monitor in that the supervisory section relinquishes complete control to the program whose operation has been requested. In the 1130 Disk System Monitor, the JOB control record defines the starting and ending points of the job; however, the total job can consists of many subjobs. The Assembler Program, the FORTRAN compiler, the Disk Utility Program, and the user I s programs can be called for operation by the ASM, FOR, DUP, and XEQ control records, respectively. These are each considered subjobs, and the successful completion of the job depends on the successful completion of each subjob. In most cases all subjobs subsequent to the unsuccessful completion of a given subjob are bypassed. The Monitor, which resides totally on disk, allows the storage and retrieval of user programs on disk by a referenced name, and it provides a work storage area on disk which can be used by both Monitor programs and user programs. A directory of programs is maintained to keep track of all programs which reside on the disk. The overall flowchart of the Monitor is shown in Chart AA. Supervisor The Supervisor performs the control and loading functions of the Monitor. Monitor control records, which are used to direct the sequence of jobs without operator intervention, are included in a stacked input arrangement and are processed by the Supervisor, which decodes the control records and calls the proper Monitor program to perform the desired operation. Disk Utility Program The Disk Utility Program (DUP) is a gTOUp of routines that automatically allocate disk storage as required by each program stored on the disk and make these programs available in card or paper tape format, in addition to providing printed r1ecords of the status of User Storage and Working Storage. By means of DUP, the required operations of disk maintenance can be performed with minimum effort. Assembler Program The Assembler Program receives program source statements written in the 1130 Assembly Language and produces a machine-language program as output. The input can be in either card or paper tape format. At the conclusion of the assembly process, the assembled program resides in Working Storage. It may also have been outputted on the principal I/O device. Assembler control records are used to specify options and to provide instructions concerning the assembly process. FORTRAN Compiler The FORTRAN compiler accepts statements written in the FORTRAN language as input and produces a machine-language program as output. It provides for calling the necessary subroutines at execution time. SubroutIne Library The subroutine library consists of a group of subroutines designed to aid the programmer in making effiCient use of the machine system. The library contains input/output, data conversion, arithmetic, functional, and selective dump subroutines. The user can delete undesired subroutines from the library as well as add subroutines of his own. System Loader The System Loader is a program that must be used initially to load the Monitor onto the disk pack. The Monitor is supplied to the user on cards or paper tape, which, with the aid of some control records (IBM-supplied in the case of Paper Tape Systems, user-supplied in the case of Card Systems), must be loaded to the disk pack before operation of the Monitor can begin. Section 1: Introduction SECTION 2: SUPERVISOR INTRODUCTION Hardware Area The Supervisor performs the control and loading functions for the 1130 Disk Monitor System. In order to accomplish the control functions, the program is divided into several segments, which are a combination of core-resident logic (Skeleton Supervisor) and separate core load phases. See Chart AB. The relocating and loading-to-core storage functions are performed for the Supervisor by the Loader. / 0028 / 0090 / OOF4 / 0460 / 055C / 09C4 / OFFF Communications Area (COMMA) Skeleton Supervisor Low Core I/O Area: DISKO, TYPEO, CARDO/PAPTl Presuperv isor AREA DESCRIPTIONS The following descriptions summarize the contents or purpose of the areas in core which contain or are used by the Supervisor. See Figure 1. Phase Area COMMA: This area is used and reserved by all Monitor programs. Among other things, it contains the Monitor indicators and switches, the LET /FLET parameters, and the Disk IOCS indicators. Skeleton Supervisor: This area contains the Skeleton Supervisor segment of the Supervisor. The Skeleton Supervisor is located in this area except during the execution of either a FORTRAN core load or an Assembler core load which uses the DISKZ routine. I/O Area (low-core): This area holds the I/O routines (Card or Paper Tape, Disk, and Console Printer) that are used by the Supervisor. The zero, e. g. , CARDO, versions of the I/O routines are used by the Supervisor (except for paper tape, in which case it uses PAPT1.) This area is over laid by the user Disk I/O and/or the user's core load at load time. High Core I/O Area: Conversion Routines, Buffers, Printer Routine \ Figure 1. Supervisor Phases and Areas CONTROL FUNCTIONS Presuperviso.!.3. This area may also be overlaid by the user's core load. It contains the Presupervisor segment of the Supervisor and a routine which gives DISKO the ability to process multiple sectors. Phase Area: This area contains the phases of the Supervisor during its execution. I/O Area (high-core): This area contains the character code conversion routines, the 1132 Printer routine, and the I/O buffer. This area may also be overlaid by the user's core load at load time'. 2 RESIDENT ROUTINES Skeleton Supervisor Chart: AC • Calls the Presupervisor on CALL EXIT or CALL LINK. • Completes the loading of the user's core load and transfers control to that program. Upon a CALL EXIT or a CALL LINK from a successfully completed user mainline or upon the return of a Monitor program to the Supervisor, the Skeleton Supervisor calls the Presupervisor, which determines whether the return was due to a CALL EXI T or a CALL LINK. When entered from the Loader, the Skeleton Supervisor reads the first sector of user's core load into core and transfers control to it. When entered via CALL LINK or CALL EXIT, the Skeleton Supervisor waits for all interrupts to be serviced before continuing. The Master IL routine, which handles all I/O interrupts during Supervisor execution, is contained within the Skeleton Supervisor (00E0 -00F3 ). 16 16 The Supervisor makes use of the I/O routines DISKO, TYPEO, and either CARDO or PAPT1, depending upon the system configuration. These routines are used by all phases of the Supervisor. They are loaded into the low core I/O area, between the Skeleton Supervisor and the Presupervisor. These routines are identical to the corresponding I/O routines in the Subroutine Library but are not taken from the Subroutine Library. They are wholly incorporated in the Supervisor itself. A fourth I/O routine is used by the Supervisor to perform required printing on the 1132 Printer. This routine is loaded into the I/O area in high core. See the Subroutine Library portion of this manual, Section 6. Presupervisor I/O Conversion Routines Chart: AC • • Initializes the Master IL routine. • Saves the areas above and below the Presupervisor on the CIB. • Loads the I/O routines used by the Supervisor. • Calls Phase A. For all CALL LINK entries, before reading the Supervisor into core, the Presupervisor saves core from core location 256 to core location 4095 on the CIB, except for locations 1216 - 1536, which are saved by the Skeleton Supervisor before the Presupervisor is read in. Contained within the Presupervisor is a routine which enables DISKO to read or write more than 320 words. Thus, the Presupervisor can use whatever disk routine happens to be in core at the time it gains control to load its own disk I/O routine. The Pre supervisor then reads DISKO into the Disk I/O area, followed by CARDO or PAPT1, and TYPEO. Phase A is read into core by the Pre supervisor to analyze the Monitor control record. Input/ Output Subroutine s • Perform the servicing functions for the I/O devices. Perform the I/O character code eonversions. These routines provide the interface between the internal character representation and. the I/O devices. The routine EBPRT converts from EBCDIC either to Console Printer code or to hexadeciTIlal (for the 1132 Printer) . The routine HOLEB conveli:'ts EBCDIC to IBM card code and vice-versa. The routine P APEB converts EBCDIC to Paper Tape code and vice-versa. During Supervisor execution these routines reside in the high-core I/O area. They are identical to the routines in the Subroutine Library of the same names. However, they are a part of the Supervisor and. are not loaded from the Subroutine Library. PHASES Phase A Chart: AD • Initializes for the principal print device. • Initializes for the principal I/O device. • Reads the input record. • Analyzes each Monitor control record and calls the requested Monitor program " Section 2: Supervisor 3 • Prints the Monitor control records. • Calls Phase B if an XEQ record is encountered. Phase A is the Monitor Control Record Analyzer and Director. For each type of Monitor control record, Phase A initiates and calls the requested Monitor program. In the case of an XEQ record, additional phases of the Supervisor are required to complete the processing before the Loader can be called. Phase A prints the error messages for the remaining phases of the Supervisor. SUP 1: Tests to determine the type of entry into the Skeleton Supervisor. Entry from a CALL LINK causes the program to transfer into the routine that analyzes the XEQ control record. An entry from a Cold Start or a CALL EXIT causes the program to transfer into the routine that reads the input control record. OKSUP: Detects and prints comments record. PRNT2; Prints the control records. NAME 1: Places the control record name in the accumulator. NAME 2: Tests for the type of control record; branches to JOB1, ASM1, FOR1, XEQ1, DUP1, PAUS1, TYP1, or TEND1 on a valid type; prints an error message on an invalid Monitor control record and returns to SUP1. JOB1: Indicates the end of one job and the beginning of the next. Switches are initialized and the Monitor control record (// JOB) is printed. The control data from the Monitor // JOB record is stored and is used to modify the disk input/output control words. PAUS1: Causes the system to enter the WAIT state to allow for operator intervention. The routine branches to SUP 1 to read the next record in the stack when the PROGRAM START key is pressed. TYP1: Causes the input mode to be switched from the principal I/O device to the keyboard for succeeding Supervisor control records. This allows the operator to type in the control records. TEND1: Causes the input mode to be switched from the keyboard to the principal I/O device for succeeding control records. 4 ASM1: Causes Phase A to initialize and read the first sector of the Assembler Program into core for execution. This is the Assembler caller routine. FOR1: Causes Phase A to initialize and read the first sector of the FORTRAN compiler into core for execution. This is the FORTRAN Compiler caller routine. DUP1: Causes Phase A to initialize and read the first sector of the Disk Utility Program (DUP) into core for execution. This is the Disk Utility Program caller routine. NONDP: Prevents DUP from being read if the nonDUP switch is set. A FORTRAN Compiler or Assembler diagnostic, among other things, sets the non -DUP switch. If it is set, an error message is printed and the program returns to SUP 1. XEQ1: Causes Phase A to continue the Supervisor processing by calling Phase B if either an XEQ Moni tor control record is encountered or an entry to the Supervisor by a CALL LINK occurs. However, a FORTRAN Compiler or Assembler Program diagnostic sets the non-XEQ switch. If XEQ1 finds this switch set, an error message is printed and the program returns to SUP 1. Phase B Chart: AE • Converts the mainline name to modified EBCDIC and compresses it into name code. • Stores the count of *LOCAL, *NOCAL, and *FILES records. • Searches LET /FLET for the sector address of the mainline. • Determines the format of the program: Core Image or Disk System format. • Calls either Phase C or the Loader. Phase B is initialized and brought into core storage when Phase A detects an XEQ Monitor control record. The information contained in the XEQ record is analyzed and processed. Phase C is called if the XEQ record indicates that *LOCAL, *NOCAL and/or *FILES Supervisor control records follow. Otherwise, the Loader is called to load the program to be executed. RITE: Looks up a single character in the EBCDIC table (T AB1). When the input character is verified, it is left-justified and truncated into modified EBCDIC code. VERT 1 contains the converted character. LIMIT: Determines if the converted character falls within a range of decimal 0 through 9. If so, it is right-justified and stored in VERTl. Otherwise, it is considered an invalid character. GOXEQ: Stores each character of the mainline name in a separate word for conversion to modified EBCDIC; compresses the name into name code. LOKUP: Performs the LET /FLET look-up. The routine NAME initializes for the LET search; FLTLK initializes for the FLET search. The equivalent address for the mainline name is obtained from either of these two tables. It is an error if the name is not located. HIT: Analyzes the indicator bits in the located table entry to determine which Loader entry point to use for loading the program. The possible bit combinations are: 1. 2. 3. 4. 00 Disk System Format Load 01 An error condition: Program is considered not to be in loadable form 11 An error condition: Program is considered not to be in loadable form 10 Core Image Load TST2 and TST3 routines specify that the Core Image and Disk System Format entry points, respectively, are required. CPROC: Initializes and calls Phase C into core storage. Phase C is executed repeatedly just after the mainline name is converted from EBCDIC to name code until all of the *LOCAL, *NOCAL and/or * FILES records have been processed. Then the remainder of Phase B is executed. • Calls Phase D to process *LOCAL or *NOCAL control records and Phase E to process * FILES control records. Phase C is initialized and brought into core storage if Phase B detects a count in the XE<;~ record. The count indicates the number of Supervisor control records that follow. Phase C reads and prints the first Supervisor control record. Then, depending upon the control record type, Phase C calls either Phase D or Phase E. Phase D processes *LOCAL and *NOCAL control records; Phase E processes *FILES control records. These phases process control records until a type change is detected. All the Supervisor control records of each type MUST be processed before the type change is made. The Supervisor control record types can be processed in any order. A type change causes Phase C to be recalled. Phase C in turn calls the phase to process the new type control record. BLNK1: Reads and prints the *-type record. LTST: Tests for the name LOCAL in a Supervisor control record. NTST: Tests for the name NOCAL in a Supervisor control record. FTST: Tests for the name FILES in a Supervisor control record. LOCAL: Initializes and calls Phase D for *LOCAL or *NOCAL processing. FPROC: Initializes and calls Phase E for *FILES processing. Phase D Chart: AG • Converts the mainline and subroutine names to name code and stores these names. • Writes the *LOCAL and *NOCAL records on the disk. • Reads and prints all *LOCAL or *NOCAL records (after the first). • Calls Phase C at a type change or Phase B at the end of the Supervisor control records. Phase C Chart: AF • Initializes for processing *LOCAL, *NOCAL and/or * FILES records. Section 2: Supervisor 5 Phase D is initialized and called by Phase C to process *LOCAL and *NOCAL records. A separate pass is made for each type. Phase D extracts from the control records the mainline and subprogram names, converts them to name code, and stores them in the disk output area. Upon detection of a control record type change, or the end of the Supervisor control records, Phase D writes the disk output area on the LOCAL/NOCAL control record area of disk. Figure 2 shows the layout of the LOCAL and NOCAL control record areas. Two sectors are allotted for each area. The word count is the number of words used to store (1) the I-word word count, (2) the 2 -word mainline name, and (3) the names of the LOCAL/NOCAL subprograms applying to the mainline name" each two words. This format is repeated for each mainline name encountered in the *LOCAL and *NOCAL records. Phase D then re-calls Phase C if a type change was detected or Phase B if the last of the Supervisor control records was detected. Phase D, once loaded, reads and prints the Supervisor control records until a type change or the last control record is detected. NAMER: Stores each character of the mainline or subroutine name in a separate word for conversion to modified EBCDIC; compresses the name into name code. RIGHT: Looks up a single character in the EBCDIC table (TAB 1) . When the input character is verified, it is left-justified and truncated into modified EBCDIC code. VERTI contains the converted character. DOFLO: Detects a disk buffer overflow. If the number of words used to store *NOCAL or *LOCAL records exceeds 640, an error is indicated by a printed message and the program returns to Phase A. WNDUP: Initializes to write the. disk output area to disk storage; initializes to read Phase C back into core storage and to re-enter Phase C at LTST. ENDUP: Initializes to write the disk output area on disk storage; initializes to read Phase B back into core storage and to re-enter Phase B at SAVA. Phase E Chart: AH CAL: Initializes the disk output area pointers and switches; contains a routine to read, print, and test the record type of the input record. • Edits and converts the file number to binary and stores the number. NAMEA: Edits and stores the mainline name in the disk output area; adjusts the pOinters, switches, and counts for the disk output area and the record input area. • Converts the file name to name code and stores the name. • Writes the file names and numbers on the disk. SUB: Edits and stores the subroutine name in the disk output area; adjusts the pointers, switches, and counts for the disk output area and the record input area. If the next character is not a comma or a blank, it is in.valid. A blank indicates the end of the subroutine names applying to the current mainline name. If a. comma is followed by a blank, the routine looks for a continuation record. Otherwise, it branches to SUB to process the next subroutine name. • Reads and prints all FILES records (after the first) . • Calls Phase C at a type change or Phase B at the end of the Supervisor control records. Word Count No.1 Name Mainline No.1 Name LOCAVNOCAL ~------~----.------~----~, Figure 2. 6 Name Phase E is initialized and called by Phase C to process *FILES records. The file name is extracted and converted to name code and stored in the disk output area. The Word Count Name Main-line Name ~__L_O_C_A~V_N_O ___ CA_L__~~~ (~l~___N_o_._2___~___N_o_._2______~_L_O_C_A_V~N_O_C_A_L___~I\ layout of the LOCAL and NOCAL Control Record Areas File File File File File Name No. I Name No. J Name file number is also extracted, converted to binary, and then stored in the disk output area. Upon detection of a control record type change or the end of the Supervisor control records, Phase E writes the disk output area (the file names and numbers) in the FILES control record area of disk. Figure 3 shows the layout of the FILES control record area. Two sectors are allotted for this area. The word count is the number of words used to store (1) the I-word word count, (2) a I-word file number for each file designated, and (3) a 2-word file name for each file designated. Phase E then recalls Phase C if a type change was detected or Phase B if the last of the control records was detected. Phase E, once loaded, reads and prints the Supervisor control records until a type change or the last control record is detected. Word File I Count I No. I FILES: Initializes the disk output area pointers and switches; contains a routine to read, print, and test the record type of the input record. THE LOADER NUMER: Edits each position of the file number. Each character is verified as numeric and the required left parenthesis is detected. The number is converted to binary and is stored in the disk output buffer. NAME: Edits each position of the file name. Each character is verified as valid alphameric and the required right parenthesis is detected. The individual characters are converted to a modified EBCDIC and then are compressed into name code. The compressed name is stored in the disk output buffer. NTBLN: Indicates an error if the position following the right parenthesis is other than a comma or blank. An appropriate message is printed and the program returns to Phase A. A comma followed by a blank indicates a continuation record and the program branches back into the FILES routine. A comma followed by a left parenthesis branches the program back within NUMER to process the next entry. SLDR: Right-justifies the file number before it is converted to binary. DOFLO: Detects a disk buffer overflow. If the number of words used to store the file names exceeds 640, an error is indicated by a printed message and the program returns to Phase A. Figure 3. Layout of the FILES Control Record Area WNDUP: Initializes to write the disk output area to disk storage; initializes to read Phase C back into core storage and to re-enter Phase C at L TST . ENDUP: Initializes to write the disk output area on disk storage; initializes to read Phase B back into core storage and to re-enter Phase B at SAVA. There are two entry pOints to the Loader, one for Disk System format loads and the other for Core Image format loads. The format in which the object program is stored on the disk (Disk System format or Core Image format) determines which of these entry points will be entered from the Supervisor or DUP. The appropriate entry point is selected either by Phase B of the Supervisor after detection ofaXEQ Monitor control record or by the Disk Utility Program (DUP) after detection of a *STORECI DUP control record. Detection of either of these control records causes the controlling program to perform the following operations prior to the calling and execution of the loading program: An XEQ control record causes the Supervisor to store in COMMA the mainline name, the code for the disk I/O version requested, and the indicator which causes the Loader to print a storage map. A *STORECI control record causes DUP to store in COMMA the mainline name and the code for the requested version of disk I/O. In addition, the DUP program sets switches in COMMA which cause the Loader to print a storage map and to return to DUP after the core load is built. The Supervisor writes *LOCAL, *NOCAL, and *FILES records in a special area on the disk. (See the Supervisor, Phase C, for the format of these records.) If DUP detects a *LOCAL record, an error message will be printed. If the mainline name appears in the control record, it is located in LET /FLET (Location Equivalence Section 2: Supervisor 7 Table). The mainline name must appear in the *STORECI control record. The mainline name must appear in the XEQ control record if the program to be loaded is in Core Image format or is located in User Storage. Hence, if the mainline name does not appear in the XEQ control record, it is assumed that the program is located in Working Storage and is in Disk System format. From LET /FLET the disk block address is computed and stored in COMMA. Also, the format, i.e., Core Image or Disk System, of the mainline program is determined. The CIB Upon every entry to the CALL LINK entry in the Skeleton Supervisor, the contents of core storage between locations 256 and 4095 are saved on the CIB. This area is assumed by the Supervisor to be COMMON. This constitutes exactly twelve 320-word sectors, which are written on sectors three through fourteen of the CIB. As a core load is built, the first sector of the CIB is used by the Loader to build up the Core Image Header record during a DSF load. In this same type of load the first word of the core load, if it is to reside below core location 4096, is placed in the first word of the second sector of the cm, followed by consecutive words of the core load until the core load is complete, except for those words which should reside (at execution time) at core locations greater than 4095. The Loader, in building the core load, overlays as necessary the saved COMMON, sectors three through fourteen. Thus, at the end of the loading process, the CIB contains the Core Image Header Record, that part of the core load which is to reside below core location 4096, and any part of COMMON which is to reside below core location 4096. If the core load was built as a result of an XEQ control record, Phase 8 will first convert the number of words of COMMON in the CIB to a sector count, rounding the count up by one if there is not an integral number of sectors. This number of 320-word sectors will then be read directly into core storage from the disk, thus restoring COMMON. Then the core load itself is read directly into core storage from the cm, except for the contents of the second sector of the CIB, which is read in by the Skeleton Supervisor. To take an example, suppose that a link to a program with an object program of 626 words has occurred. The object program is to reside at core location 450, and the object-time transfer vector is 25 words long. A COMMON of 3004 words has been defined. Consequently, the core load consists of 641 words (626+25), which is two full sectors plus one word. 8 COMMON occupies ten sectors (3004+320=9+=10). Phase 8 will first read the fifth to the fourteenth sectors of the cm into core, beginning at core location 896 (COMMON actually begins at location 1092). Next, all 320 words of the third sector and one word of the fourth sector will be read into core, beginning at location FFO. At this point all COMMON has been restored (locations 1092-4095) and all but the first 320 words of the core load have been read into core (locations FFO-1091). The Skeleton Supervisor performs the last step of the process, which is to read the second sector of the CIB into core locations 450F69 and to transfer control to the object program. Figure 4 shows relative allocation of core storage during Loader execution. DISK SYSTEM FORMAT LOADING Loading (relocating) from Disk System format requires nine phases of the Loader (0 thru 8) plus the routines to print error messages and a storage map Hardware Area Communi cations Area (COMMA) Skeleton Supervisor / 0028 / 0090 / OOF4 / 026A / / 0578 0630 / / 0944 OAAO I OBBC / / / OBFC 0050 0004 / 1000 Disk I/O Routine (OISKO) Buffers } Phase 8 Phase 0 Phase 1 / Load-time TV Area ) Phase 2} ~ Figure 4. Storage Map of the Loader } Phase 3. :~S~it7 Map and Message Routines (see Chart AJ). The mainline to be relocated can reside in either Working Storage or User storage. TL Phase 0 (When entered for Disk System format loads) EX Exits to the Monitor call routine or to the DUP program, depending upon the entry point used. Exits through routines PM and TL. This routine is entered for those errors which cause the Loader to terminate the loading process. Extracts from the mainline header record the addresses, counts, and indicators required for loading a mainline program. This routine utilizes the BT routine to make the initial entry in the load-time TV, a LIBF entry to the disk I/O routine requested by the user (DISKZ, DISK1, etc.). If no specific version is requested, DISKZ is used. Mter all *LOCAL and *NOCAL records have been processed, the routine reads in and transfers control to Phase 2. Examines all *LOCAL and *NOCAL records in the LOCAL/NOCAL sectors and enters the subprogram names in the load-time TV. All LOCAL subprogram types are checked to determine if they are valid for LOCALs, i. e. , the LOCALs are not mainlines or interrupt level (IL) subroutines. The entry point is BP 100. This phase simply loads Phase 1 and transfers control to it. MC Phase 1 • Initializes the processing of the *LOCAL and *NOCAL records. • Builds the load-time TV and stores the first entry, the TV entry for the requested disk I/O routine. • Processes the mainline header record. LN LK NW RH GP BT LS PM Controls the reading of a given number of words from disk storage to core storage. Fetches the next data word in sequence from the data buffer and, if required, reads the next sequential sector. Reads into the data buffer the sector containing the header record for both mainline and subprograms. Reads or writes one disk sector. The operation to be performed, i. e ., GET or PUT, is determined by the entry point to the routine. Builds the load-time transfer vector (TV). The first entry is always for the disk I/O routine requested. Following this, as LIBF and CALL statements are encountered by the Loader, additional entries are made to the TV. The first entry in the TV occupies words 4086-4089. Subsequent entries are stored in successively descending blocks of four words each (see Load-Time TV). Searches LET /FLET for program and data file names. If the name is not found, the load is terminated. If the name is found, the output from this subroutine is the disk block address of the program or data file. For core image programs the execution address, the loading address, and the word count are also a part of the output. Prints the storage map if requested. Error messages are printed as errors are encountered during the loading functions. Phase 2 • MC RL Relocates and converts the mainline and all subroutines and subprograms from Disk System format to Core Image format. Controls the operation of Phases 3 through 8. After the execution of Phase 6, this routine returns to DUP if the Loader was called by DUP as the result of a *STORECI control record. Otherwise, this routine calls Phase 7, executes it, and then calls the Phase 8 and transfers control to it. Controls the conversion of all programs comprising a core load from Disk System format to Core Image format. As a program is converted, the absolute address of each entry point is placed in the third word of its loadtime TV entry. LmFs within the program are replaced by a short BSI instruction with a tag of 3 and a displacement to the corresponding LIBF TV entry. CALLs within the program are replaced by a long indirect BSI instruction, the second word of which is the execution-time address of the corresponding CALL TV entry. Section 2: Supervisor 9 TR WR xc MV DF 10 The RL routine replaces DSA (define sector address) statements with a sector address, word count, and entry point (this will be zero for data files) from LET /FLET . In addition, the absolute addresses of device servicing routines are inserted into all IL subroutines required by the particular core load. Places the core load being built, one word at a time, into the Core Image Buffer (CIB) or into core storage. If the address at which a word is to be stored is greater than 4095, the word is placed directly into storage. If this address is greater than the capacity of the machine, an error message is printed. If the address at which a word is to be stored is 4095 or less, the word is stored in the Core Image Buffer. Thus the core load can be entirely in core storage, entirely in the Core Image Buffer, or divided between the two. Writes the core load being built, one sector at a time, on the CIB. A disk write occurs when the address at which a word is to be stored falls outside the limits of the onesector buffer which is contained in core. This subroutine also writes LOCALs and SOCALs in Working Storage. Places the core address of the LIBF TV entry associated with a subprogram entry point into the exit control cell for that entry point. For all entry points referenced by LIBF statements the address of the exit control cell is the address of the subprogram entry point +2. For example: if the entry point FLOAT is located at the address 100010 and the corresponding LIBF TV entry is located at the address 407510' then the XC routine places the address 407510 into location 100210. This operation provides for execution time return linkage through the link word contained in the LID F TV. Moves the DEFINE FILE table to a processing area (see DF) and, when processing is complete, saves the table in the Core Image Buffer. Places into the table entry for a given Defined File the sector address assigned to that file. This address can be an absolute sector address taken from LET /FLET or a sector address relative to the beginning of Working Storage. In the latter case the address is calculated and assigned by the DF routine. If the DEFINE FILE table specifies a disk block count for a file defined in User Storage that is greater than the disk block count for that file contained in LET /FLET , the count from LET /FLET replaces the count in the DEFINE FILE table. If only one file is defined in Working Storage and if the disk block count for that file exceeds the available Working Storage, the count in the DEFINE FILE table is reduced to the length of Working Storage. If multiple files are defined in Working Storage and if the total di.sk block count exceeds the available Working Storage, the core load will not be executed. Checks to ensure that COMMON does not extend into the area to be used by Phase 8. An overlap results in an error message. Loading continues, but the non-XEQ and nonDUP switches are set. Checks to ensure that the loading address for the mainline is greater than the highest core location occupied by the requested version of Disk I/O. CK ML Phase 3 • Controls the loading of subprograms by class. • Processes the program header record of all routines named in the load-time TV. • Selects and controls the loading of required IL subroutines. IL HR CC TY SV Selects and relocates the IL subroutines associated with each of the required interrupt levels within a particular core load. Extracts the data required for loading (e. g. , preciSion, type, and entry point names) from the header records of both mainline programs and subprograms. Controls the loading of subprograms by class. The in-core routines are loaded first, followed by LOCALs and then SOCALs. The latter routines will be loaded according to system overlay level if system overlays are used. See System Overlay Scheme. Checks that subprograms requiring an LIBF reference are referenced by LIBFs and that subprograms requiring a CALL reference are referenced by CALLs. Scans the load-time TV twice, first to ensure that the routine has not been previously loaded and then to find any other entry points to the routine being relocated. The first scan examines the entry points in the load-time TV which precede the current one. If another entry point to the same routine is found, the routine has been loaded and the absolute address of the current entry point in that routine is placed in the third word of its load-time TV entry. The routine is not loaded a second time. If no other entry pOints are found in this scan, the routine is loaded. The second scan examines the entry points following the current one. If other entry points to the routine being relocated are found, the absolute addresses of each of those entry points are stored into the third word of their respective load-time TV entries. Phase 4 • • Checks to see if the core load built in Phase 3 fits into core storage. If LOCALs are used, computes the size of the LT (Executed if LOCALs are present) outputs the Flipper table (parameters required for loading and execution of LOCALs) and then outputs the selected Flipper routine. L T sets an indicator which causes Phase 2 to to load the LOCAL subprograms. Phase 2 scans the load-time TV and adds to the core load all LOCAL subprograms referenced. (Executed if no LOCALs are present or if they have already been processed) returns to Phase 2 if no SOCALs are required. If SOCALs are required, this routine sets an indicator to cause the loading of the next SOCAL by class code. See System Over lay Scheme. ST Phase 6 • • Builds the object-time LIBF and CALL TVs. • Completes the Core Image Header record. Ensures the odd boundary for the Floating Accumulator (FAC). ER Builds one object-time TV for LIBFs and one for CALLs. (See Object-time TV.) The Flipper table address is placed in the TV entry of all LOCALs. If it is necessary, a dummy entry is made in the CALL TV by this routine in order to make the address of the rightmost word of the Floating Accumulator (F AC) an odd address. The Core Image Header record is completed by this routine and is then stored in the first sector of the Core Image Buffer. Flipper table and decides which of the two Flipper routines is required, i. e., FLIPO or FLIPl. • Initiates the attempt to fit oversize core loads into core storage through the use of overlays. ET Calculates the amount of storage required for the core load. If the core load fits into the available storage, control is returned to Phase 2 (MC) which reads in Phase 6 to construct the object-time TV. If the core load does not fit, further processing is required. See System Overlay Scheme. Phase 5 Phase 7 • • Loads the requested disk I/O routine into core. • Saves part of the Skeleton Supervisor and COMMA on the disk if DISKZ has been requested. • Moves the interrupt TV for the core load to be executed into the Hardware Area in low core. • • Outputs the Flipper table and Flipper routine if LOCALs are present. If SOCALs are required, outputs a special TV for any 2-word calls (functionals) which are a part of SOCALs. Establishes the class code for loading SOCAL subroutines. LD Tests an indicator in COMMA which indicates the user-requested version of disk I/O Section 2: Supervisor 11 and then reads that disk routine into core. If DISKZ is requested, part of the Skeleton Supervisor and COMMA is written on the disk in order to allot more storage to the mainline program. That portion of the Skeleton Supervisor and COMMA which was overlayed is restored before control is returned to the Monitor after execution. No disk 1/0 loading occurs if DISKO is called, because this routine is used by the loader and therefore is already in the disk 1/0 area . NOTE: Phase 7 has its own disk 1/0 subroutine for reading the user's disk 1/0 routine into the disk 1/0 area. Phase 8 Phase 7 (Same description as in the section Disk System, Format Loading.) Phase 8 First restores COMMON from the crn, if any, if the program being loaded is a CALL LINK. Its other function is to read all but the first sector of the core load into core. It sets up the sector address and word count of the first sector and relinquishes control to the Skeleton Supervisor, which it has supplied with the necessary information for moving the objecttime TV into its execution-time location. The Skeleton Supervisor then completes the loading process and transfers control to the object program. Figure 5 shows the relative allocation of core storage at user execution time. The description of this phase is identical to that which is given in the section on Core Image Format loads except that, for DSF loads, Phase 8 reads into core storage only that part of the core load which is in the crn, including COMMON, before transferring control to the Skeleton Supervisor. NOTE: Phases 7 and 8 are used in Disk System Format Loads only when the relocated program is to be executed. See routine MC in Phase 2. Hardware Area Communications Area (COMMA) r--------------------------~ Skeleton Supervisor r---··-----------------------~ Disk I/O CORE IMAGE FORMAT LOADING r·--··------------------------~ User Mainline For loading programs in Core Image format only three phases of the Loader are required: Phase 0, Phase 7, and Phase 8 (see Chart AK). Phase 0 processes the Core Image Header record and controls the fetching and tr~msfer to Phases 7 and 8. Phase 7 returns control to Phase 0, whereas Phase 8 returns to the Skeleton Supervisor. Phase (? (When entered for Core Image format loads) In-core Subroutines Flipper Tabl. Flipper Program r--.-----------------------~ LOCAL Area SOCAL Area The entry point is BP 200 . It Subroutines Avai fable Core LK GET BP 12 Controls the reading of a given number of words from disk storage to core storage. Performs the disk read function. Extracts the parameters from the Core Image Header record and transfers them to COMMA. It fetches Phase 7 and transfers control to it. It then fetches Phase 8 and relinquishes control to it. LIBF TV CALL TV COMMON Figure S. Storage Layout at Object-Time SUBROUTINES USED BY THE LOADER Most phases of the Loader use the following routines. These routines are located on the disk, and when called are loaded into the LET search buffer. This buffer occupies the first 320 words of the Loader. 1132/Console Printer Print Routine - Performs any printing by the Loader -storage map, error messages, etc. - on the principal print device. The 1132 Print Routine is loaded at system load time only with systems having an 1132 Printer; otherwise the Console Printer Print Routine is loaded. Error Message Routines - Set up the appropriate error messages for printing. See the publication ffiM 1130 Monitor System Reference Manual (Form C26-3750) for a listing of these messages and conditions which cause them to be printed. Map Routines - Set up the titles, messages, etc. required for the printing of the storage map. THE LOAD-TIME TRANSFER VECTOR The load-time TV consists of an entry for: The Disk I/O routine specified by the user on the XEQ or STORECI record. Each LOCAL and NOCAL entry point specified on a *LOCAL or *NOCAL record. Each different CALL or LffiF reference in the relocated core load. If System overlays are employed, one special entry for each overlay. 1. 2. 3. 4. Each entry in the load-time TV is four words in length. The first entry is stored in locations 40864089, the second in 4082-4085, etc. Bit 0 Bit 1 30-Bit j Entry Point Name I I Ir - - - ' ' ' - - - - - - - - - Word 1 Word 2 Absolute Entry Point Address Word 3 Program Class Code or, for LOCALs, the Flipper Table Address I Word 4 During the first load-pass, the first two words of each TV entry contain the symbolic name of the entry point associated with the entry. This 30-bit name is right-justified in the 32 bit pOSitions of the two words. LOCALs are flagged in the TV by setting bit zero in the 32-bit name. Bit one is set to indicate NOCALs and those entry points referenced by CALL statements. NOTE: All subprograms indicated as NOCALs must be type 4 or 6 routines. Phase 1 makes the TV entries for the Disk I/O routine (in routine MC) and for LOCAL and NOCAL subprograms (in LN). The entry for the Disk I/O version is made, even if the program contains no LIBF statements to a Disk I/O routine. Phase 1 also sets bits zero and one of each entry (as necessary) as the entry point name is added to the TV. The third word of each load-time TV entry, initially zero, ultimately contains the absolute core address at which the corresponding entry point will found at execution time. A non-zero value in this word indicates to the Loader that the routine associated with this TV entry has already become a part of the core load and thus is not to be loaded a second time. This absolute address is added by either Phase 2 (routine RL) or Phase 3 (routine SV). The fourth word, also initially zero, is reserved for the class code of the routine to which the loadtime TV entry corresponds. This code is used in determining the order in which subprograms will be loaded if SOCALs are employed. This code is inserted by Phase 3 (routine SV). The class 0 subprograms are subtype 0 subroutines of types 3, 4, 5, and 6. See the publication IBM 1130 Monitor System Reference Manual (Form C26-3750) for descriptions of the type and subtype specification. These subprograms are termed "in-cores" because they are loaded with all mainlines. The IL subroutines are also "in-cores" but they are never a part of any overlay and they technically do not belong to a class. The class 1 subprograms (System Overlay 1) are the Arithmetic and Functional subprograms, which comprise the first SOCAL. The class 2 subprograms (System Over lay 2) are the FORTRAN I/O, and I/O conversion routines which comprise the second SOCAL. Disk FORTRAN I/O is the only class 3 subprogram. It, along with a 320-word buffer, comprises the third SOCAL. Section 2: Supervisor 13 On the first load-pass the mainline is loaded, followed by the subprograms in the order of their appearance in the TV. If the core load fits and no LOCALs are specified, the core load is established as it is. Phase 2 then calls Phase 6 to build the object-time TV. If the core load does fit and if LOCALs are specified, a second load-pass is made. In this case, all subprograms except the LOCALs are considered as class 0 SUbprograms. Thus, the mainline is loaded, followed by the class 0 (all) subprograms, followed by the Flipper table and Flipper routine. The LOCALs are written out on Working Storage following any Defined Files. If the core load does not fit into the available storage as determined by Phase 4, a second loadpass is made. In this case, during the second loadpass, the mainline is loaded, followed by the class 0 SUbprograms. If LOCALs are present, the Flipper table and Flipper program are loaded next,followed by the LOCAL subprograms, which are written out on Working Storage. Mter this, the remaining subprograms are loaded, i. e., written out on Working Storage following the LOCALs, by class code. See System Over lay Scheme. For a LOCAL subprogram the fourth word of the TV entry contains the address of the Flipper table entry for that LOCAL. Phase 5 places word three of the TV entry into the corresponding Flipper table entry. Phase 6 then moves word four of the TV entry into word three. Thus, at execution time, the TV entry causes control to pass to the Flipper routine through the Flipper table rather than to the called subprogram (see Flipper Tabl~). THE FLIPPER TABLE The Flipper table and Flipper routine become part of a core load only if LOCAL subprograms are specified by the user for that core load. The Flipper table consists of a 6-word entry for each of the entry points specified in an *LOCAL record which is referenced by a CALL statement and a 5-word entry for each entry point referenced by an LIBF statement. The word count, sector address, and absolute entry point are computed and inserted into each Flipper table entry by the Loader (Phase 5) as it processes each LOCAL. Phase 5 also builds the linkage to the Flipper routine (a long BSI instruction) and, for CALL entry points, a linkword. The LOCAL subprograms are placed into the Working Storage area on the disk following the Defined Files, if there are any. 14 The Flipper routine is the subroutine which, at object-time, using the parameters of the Flipper table entry, reads a LOCAL subprogram when it is called from Working Storage into the LOCAL overlay area, and transfers control to it. A special Flipper table is created for SOCALs if the System Overlay scheme is employed. See System Overlay Scheme. THE OBJECT-TIME TV Phase 6 of the Loader builds two separate object-time TVs: the CALL TV and the LIBF TV. Each CALL TV entry is a single word containing the absolute address of a subprogram entry point. However, in the case of a LOCAL subprogram referenced by a CALL statement, the absolute address is the address of the corresponding Flipper table entry instead of the subprogram entry point. Each LIBF TV entry is comprised of three words. Word one is the linkword. Words two and three contain a long BSC instruction to the subprogram entry point. However, in the case of a LOCAL subprogram referenced by an LIBF statement, words two and three contain a long BSC instruction to the corresponding Flipper table entry instead of the subprogram entry point. The LIB F TV is preceded by two special entries, each three words in length. The first is the Floating Accumulator (FAC). The address of the first word of FAC must be an odd address. Therefore, if necessary, a dummy entry is made in the CALL TV by Phase 6 in order to make F AC begin at an odd address. The second special entry is one 3-word entry for use by certain subroutines to indicate overflow, underflow, and divide check. If the System Overlay scheme is employed, the object-time LIBF TV contains special entries for SOCAL subprograms referenced by LIBF statements. These entries transfer indirectly either to the referenced subprogram if the overlay containing the subprogram is presently loaded or to the SOCAL Flipper in order to load the required overlay and transfer to the referenced subprogram. See System Overlay Scheme. The object-time CALL TV does not contain entries for SOCAL subprograms referenced by CALL statements, i. e., functionals, if a System Overlay is employed. See System Overlay Scheme. Figure 6 shows the layout of the object-time TVs. I Dummy one - word entry in CALL TV (i f necessary) to ensure odd address for FAC Last First Disk LI BF 1I BF I/O Indicators FAC Last CALL Second First CALL CALL r ---+---+--11 )rr---+---+----t---+-----+--+-!-t-!-If f! .JI- ! ! J ({ ./1-------1 End of Core High Core Low Core _ _-------~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _~Il~_ _ _ _ _ _~~------~Il~_ _ _ _ _ _ _ _~--------~ CALL TV 1I BF TV COMMON Object - time TV Figure 6. Layout of the Object-Time 1V Area SYSTEM OVERLAY SCHEME If, after the first load-pass, Phase 4 determines that the core load will not fit into the available storage, and if the mainline is an Assembly-written program, loading is terminated and a message is printed indicating by how much the core storage capacity has been exceeded. If the mainline is a FORTRAN program, Phase 4 initiates a second load-pass. Phase 2 reloads the mainline program and the class 0 or "in-core" subprograms. If LOCAL subprograms are present, Phase 5 (routine LT) indicates their presence to Phase 2 which then loads the Flipper table, the Flipper routine, and the LOCALs. Phase 4 then attempts to make the core load fit by overlaying the class 1 SOCALs (the arithmetics and functionals), the class 2 SOCALs (FORTRAN I/o, I/O, and I/O conversion routines) and the class 3 SOCALs (Disk FORTRAN I/O plus a 320-word buffer). (This third overlay is made only if Disk FORTRAN I/O is called.) If Phase 4 finds that the core load can be made to fit, it actually causes the Loader to create the overlays described above. otherwise loading is terminated and an error message printed out. A special Flipper table is created for SOCALs. This table, in conjunction with the DISKZ routine, performs the same function for SOCAL subprogram references as do the standard Flipper table and Flipper routine for LOCAL sUbprograms. However, this Flipper table is contained within the DISKZ routine in the disk I/O area. The CALL TV does not contain entries for SOCAL subprograms referenced by CALL statements, i. e., functionals. The one-word CALL TV entries are attached to the front of the System over lay in which the corresponding subprograms appear. Since the subprograms in overlays 2 (FORTRAN I/O, I/O, and I/O conversion routines) and 3 (Disk FORTRAN I/O routines) can be referenced only by LIBF statements, the one-word entries preceding these overlays all cause a return to the SOCAL Flipper to load the arithmetic/functional overlay. Suppose a core load (1) contained a FORTRANwritten main -line, (2) required all three System Overlays to fit into core, and (3) contained references to FSQR and SIN. Then each overlay would start with a special CALL TV two words in length, one word for FSQR and the other for SIN. Any user-written routines referenced by CALL statements would be represented in the normal CALL TV which is found just to the left of COMMON. The two words of the CALL TV for System Overlay 1 would contain the actual core addresses of the entry points FSQR and SIN. The two words of the CALL TV for System Overlays 2 and 3 would contain the addresses of the SOCAL flipper entries for FSQR and SIN. All CALL FSQR/SIN statements would have been replaced with long, indirect BSI instructions to the address of the corresponding special CALL TV entry. Thus, at execution time whenever a CALL FSQR/SIN is encountered, a branch will be made to either FSQR/SIN or to the SOCAL flipper. In the latter case the flipper would first read System Overlay 1 into the overlay area and then re-execute the branch to FSQR/SIN. In either case FSQR/SIN would be entered and executed. Figure 7 shows the CALL TV for the above example. Section 2: Supervisor 15 System Overlay 1 Subroutine FSQR Subroutine SIN (( ~ ~ L 1 ""Word TV: XEQ address for SIN ll-word TV: XEQ address for FSQR System Overlay 2 FORTRAN I/O, I/O, and I/O Conversion Routines ---------It ~~---- L 1- word TV: address of the SOCAL Flipper entry for SIN l 1- word TV: address of the SOCAL Flipper entry for FSOR System Overlay 3 FORTRAN Disk I/O and I/O Buffer ----------I~ 10....-..__'__ ... Lsame as System Overlay 2 Figure 7. 16 Fonnat of the CALL 1V for System Overlays CJ-------' SECTION 3: DISK UTILITY PROGRAM (DUP) INTRODUCTION The Disk Utility Program is designed to accomplish the following: • Automatically allocate disk storage to each program assembled or compiled. • Make these programs available in card or paper tape format. • Print out programs and certain other predetermined areas from disk storage. • Provide automatically printed records of the status of the size of the User Area and Work Storage Area. • Provide automatic file protection for all areas other than Working Storage. • • The principal input/output device routine is called in to read the next record. This sequence of events is repeated until the principal input device reads a Monitor control record, in which case control is returned to the Supervisor. The Supervisor now examines the Monitor control record and acts accordingly. Figure 8 shows the layout of storage during the execution of DUP . Chart BA is an overall flowchart of the DUP functions. Hardware Area / 0028 Communications Area (COMMA) / 0090 Skeleton Supervisor Provide the facility to delete the Assembler Program and/or FORTRAN, and to specify and enlarge the Fixed Area of Disk Storage. Disk I/O Routine / 0272 Provide various other disk and core maintenance operations. The Disk Utility Program (DUP) is called into operation when the Supervisor recognizes a / / DUP record. One sector of DUP, DUP Common (DUP CO), is brought into core storage. DUPCO calls in DUP Control (DCTL). DCTL calls in the principal print device routine (VIPX or TYPX) to print as required. Following this, DCTL calls in the principal input device routine (CARDX or PTX) to read the next record, which should be a DUP control record. The DUP control record is then printed, decoded, and checked for accuracy. Switches are set in DUPCO in accordance with information obtained from the control record. The required DUP function is then called from disk, overlaying the core area of DCTL as required. When DCTL transfers control to other DUP functions, LETAR, the buffer used in the LET/FLET search, contains the sector of LET /FLET last read from disk storage; i. e., the portion of LET /FLET containing the entry involved. Control is turned over to the DUP function which performs its assigned tasks according to the information that was extracted from the DUP control record. Upon completion, the function returns to DUPCO, which calls DCTL back in. DCTL calls in the principal print routine and prints the DUP EXIT message. / 00F4 DUP Common (DUPCO) -- / 03B4 DUP Control (DCTL) or DUP Function required / 0828 CARDX/PTX /OB10 LET AR Buffer /OC42 VIPX/TYPX / OF22 Cord and Print Buffers / OFFF ~ Figure 8. Storage Layout of DUP Section 3: Disk Utility Program (DUP) 17 DUP FUNCTIONS AND ROUTINES DUP Common (DUPCO) Routine Chart: BB • • • Provides entry for Supervisor to DUP. Provides common conclusion of all DUP functions. Provides for the return of the Loader to DUP after performing a Disk System Format Load. All DUP disk read/write operations are done through the multi-sector routine in DUPCO. This provides a maximum word count of 320 words to the DISKO routine and keeps supplying word counts until the original word count requested by the DUP routine has been transmitted. NOTE: 10AR Header, used throughout this description of DUP, refers to the two words required to be in. front of all c'ore areas at the time they are used as buffers for Disk I/O operations. These two words are the word count and the sector address respectively. Figure 9 shows the storage layout of the DUPCO routine. • Provides Disk multi-sector read/write capabilities for DUP. • Provides common system check 'WAIT' for DUP. • Provides a common call and linkage to a DUP error message routine (TERRC/PERRC). SUPDC • Provides and initializes switches available for all of DUP. REST • Initializes the Interrupt Transfer Vector for DUP. • Calls in the Store Core Image function of DUP . • Provides Interrupt Level routines for DUP I/O routines. • Calls in DUP Control (DCTL). Entry Points NYETC Selects blank record. Exit to RDCTL. Calling address in NYETC. Supervisor entry to DUPCO. Supervisor has read DUPCO to core from disk. Exit to SEPT. DUP functions return to this point in DUPCO after completing required operations. Exit to REST2. Return address in REST if valid DUP function completed. IOAR Header / 0272 / 0274 / 0291 / 02B7 / 02F4 / 032B / 0336 / 0383 / 03B4 DUPCO Entry Points DUPCO is a one sector routine that is resident in core all the time that DUP is in control, except while the Loader is converting a Disk System format program into Core Image format for DUP. Switches and routines that are common to many of the DUP functions are kept available in core at all times. Because of this, DUP CO provides many entry points from other DUP functions as well as from the Supervisor and the Loader. An initialized DUPCO is read in by the Supervisor when a DUP control record is read and the nonDUP Switch (word 6416) is zero. A non-initialized DUPCO (DUPCO that is written to the disk before calling the Loader) is read back in by the Loader to continue the Store Core Image function. If DUPCO is entered with a BSI to REST, REST is non-zero and an exit message will be printed. If the entry is a BSC to REST + 1, the message will be inhibited. 18 DUP Switches Multi-sector Routine Initialization Patch Area DUP I LS Routines Patch Area ~ Figure 9. Storage Layout of DUPCO REST+l LDRDC PUT GET SYSCK SEXIT Entry point generally from error point routines whenever a DUP function is not completed successfully. Printing of the exit message is inl;1ibited when REST is left zero. Exit twer limits for Symbol Table 1. ODD8: No listing, one pass mode 2. OD74: No listing, two pass mode Figure 11. 48 Assembler Storage Layout OUTPUT FORMAT AND ERROR CODES Table 2 lists the contents of character positions 1-16 (each character position corresponds to one word in the I/O buffer) of the I/O buffer. The contents are inserted during Pass 2 in hexadecimal format. Just prior to the optional print and/or punch operation, the buffer contents are converted to the proper output format for the output devices. Table 2. Character positions 18 and 19 of the I/O buffer are used for error codes. The code for the first error detected in an erroneous statement is inserted into position 18. The code for any remaining errors is inserted into position 19. Note that if three or more errors are detected within one statement, only the !irst (in position 18) and the last (in position 19) are indicated. The error codes are listed in Table 3. Format of the I/O Buffer Statement Type I/O Buffer Position* I/O Buffer Volue in Hexodecimal ABS 1-16 Blank. BSS, BES 1-4 9-12 Location assigned to the label, if any. Number of reserved words {operand value}. CALL 1-4 6-7 9-16 Location assigned to the branch instruction built by the Loader. 30 {special relocation code for a CALL}. Subroutine name in packed EBCDIC form. DC 1-4 6 9-12 Location assigned to the constant. Relocation code for the constant {O = absolute, 1 = relocatable}. Va lue of the constant. DEC 1-4 6':'7 Location of the left-most word of the constant {always at an even location}. 00 {both words are absolute}. DSA 1-4 6-7 9-16 Same as CALL. 31 {special relocation code for a DSA}. Same as CALL. EBC 1-4 9-12 Location of the left-most word of the operand. Number of core positions reserved for the operand. END 1-4 9-12 Next available even location after this program. Starting address if mainline program. ENT 1-4 9-12 Location of the entry point. Name of relative entry point. EPR 1-16 Blank. EQU 1-4 16-bit operand value. EXIT 1-4 6 9-12 Location assigned to the label. O. 60XX (XX is the address of the EXIT entry point to Skeleton Supervisor; i.e., 6038). 1-16 Blank. HDNG All Imperative Instructions 1-4 6 7 9-12 13-16 Location of the left-most instruction word. Relocation code for word 1 {always zero}. Relocation code for word 2 {blank for a short instruction; 0= absolute, 1 = relocatable}. Machine-language OP code, F and T, and Displacement. Word 2 of long instructions. ISS 1-16 Same as ENT. L1BF 1-4 6-7 8-16 Same as CA LL. 20 (special relocation code for an LlBF). Same as CALL. L1BR 1-16 Blank. LINK 1-4 6-7 9-13 Location assigned to label, if any. 00. Same as CALL. ORG 1-4 Location assigned to the label, ifany. SPR 1-16 Blank. XFLC 1-6 6-7 9-16 Location of the left-most mantissa word. Value of the exponent. Volue of the mantissa. *Buffer positions correspond directly with card columns in the List Deck. Unlisted positions are always blank. Section 4: Assembler Program 49 Table 3. Assembler Error Ccx:les Error Code Error Procedure A Address Error An attempt has been made to specify a displacement, directly or indirectly, outside the range +127 to -128 The displacement is set to zero. c Cond i tion Code Error A character other than +, -, Z, E, C, or 0 (Alpha) has been encountered in a condition operand. The displacement is set to zero. F Format Error A character other than a blank, X, L, or I has been used in the format field or an L or I format has been specified for an OP code valid in short form only. The instruction is processed as a long instruction if the instruction is valid in the long form. Otherwise, it is processed as though an X format code had been specified. L Label Error An invalid symbol has been used as a label. The label is ignored. M Multiply-defined Symbol Error More than one statement has the same symbol in the label field. The first occurrence of the symbol defines the value in the Symbol Table. Subsequent occurrences of the same symbol are ignored. Note: this error wi II appear in statement referencing the multiply-defined symbol. o OP Code Error The mnemonic OP code is not in the OP code table. Header type statements are incorrectly positioned in the source program. The Location Assignment Counter is incremented by two. The statement is treated as comments (except for the error code). R Re location Error The operand is neither absolute nor relocatable, or two relocatable operand elements are multiplied by each other. u so Error Description The effective operand value is set to zero. The operand is absolute in a relocatable assembly when the displacement had to be modified or the operand is relocatable when the displacement did not require modification. The displacement is set to zero. The operand of an ENT or ISS statement is absolute. The effective operand value is set to zero. The operand of an ORG statement is absolute in a relocatable assembly. The operand value is ignored. The operand of a BSS or BES statement is relocatable. The effective operand value is set to zero. Syntax Error Illegal syntax in the operand field (e.g. invalid symbols, adjacent operators, illegal characters in an integer, no I before character va lues) • The affected operand is given a value of absolute zero. Mainline program entry point not specified in an END statement of a mainline program. Posi tions 9-12 of the I/O buffer are left blank. Incorrect syntax in a DEC or XFLC operand (e.g. Illegal character, loss of high order bits, exponent overflow). Constant set to Tag Error The Tag field in an instruction contains a character other than a blank, 0,1,2, or 3. The Tag field is set to zero and the statement is processed as though the Tag field were zero. Undefined Symbol Error An Undefined symbol is found in an operand. The affected expression is given the value of absolute zero. a or 0.0. T ABLES AND BUFFERS Operation Code Table (BEGOP) The operation code table contains three words for each mnemonic entry The first two words of each entry contain the four characters of the op code (packed 2 EBCDIC characters per word). The third word contains the binary machine-language op code and information used by the routine that processes the particular op code. The format of the third word is as follows. r 1:~:~1~15Iil'71819110'1lll'~;;'il5l cates L1BF statement Ones indicate CALL statement One indicates displacement must be modified by Location Assignment Counter routine One indicates valid in short form only One indicates displacement must not be modified by Location Assignment Counter Modification bits for shift instructions The statement-processing routine code (bits 1215) is used to branch to a branch table at the beginning of each instruction-processing overlay. If the overlay required for this instruction is in core, the branch table will branch to the specific routine. Otherwise the branch is to the mainline to set-up the read of the required overlay. See Figure 11. Instruction Buffer (INSBF) The instruction buffer is a one-word work area used when instructions are being formed. It contains only the first word of long instructions. Initially, it is loaded with the op code (bits 0-4) and the modification bits (bits 8-9) for shift instructions (derived from the third word of the op code table). As the instruction is being processed,the format, tag, indirect addressing, and displacement bits are inserted. At the end of the DISP routine, the contents of the instruction buffer are saved in the one-sector DSF output buffer and then are converted to four EBCDIC characters (four bits per character) and stored in pOSitions 9-12 of the I/O buffer. Location Assignment Counter The Location Assignment Counter (named address counter in the listings; symbolic:ADCOW) is a oneword counter used to assign sequential storage addresses to the program statements. It always contains the next available address. The counter is initially set to zero and is set differently or incremented according to the statement type as shown in Table 4. Secondary Location ASSignment Counter The secondary Location ASSignment Counter (ADCW2) is used to detect breaks in sequence in Disk System Format output. It is incremented by one in the DFOUT subroutine for every data word entered in the output buffer (except the first word of an LIBF entry point name) . Table 4. Location Assignment COlUlter Statement Type Effect ~----------r--------------------------------------- ABS Set to the lowest loadable core address. (Address obtained from the symbolic location LDRND.) BSS, BES Incremented by the value of the operand. (If E-format and the counter is odd, increment one more.) DC, LlBF Incremented by one. DEC Incremented by two. (If the Location Assignment Counter is odd, increment one more.) DSA,XFLC Incremented by three. EBC Incremented by one-half the number of operand characters. (An odd character count is incremented by one before the count is halved.) END Incremented by one if the Location Assignment Counter is odd. LINK Incremen ted by four. ORG Set to the va lue of the operand. EXIT Incremented by one. Invalid OP Code Incremented by two. Machine Instruction Statements Short Long or Indirect Incremented by one. Incremented by two. Symbol Table The Symbol Table is a table containing the source statement labels and their assigned values. There are also bit positions to indicate that the label is relocatable or multiply-defined. All symbols defined in the program are entered in the Symbol Table. Symbols that appear in the label field of Assembler instructions which do not use labels (for example, ABS, END, ENT) are not entered. Section 4: Assembler Program 51 The Symbol Table begins at the high address end of core and extends toward one of three lower limits (see Figure 11): 1. 2. 3. The end of the print routine when LIST option selected. The Console Printer and 1132 Printer routines are not the same length, but the lower limit will be adjusted for the print routine loaded at assembly time. The end of Phase 11 when LIST option is not selected. The Symbol Table is allowed to overlay the print routine. The end of Phase 10 when LIST option is not selected and there is no intermediate I/O (two pass mode). Symbols are added to the Symbol Table in alphanumeric order with higher values (Z9999) toward the lower address end. If the lower limit is reached, a one-sector buffer is written on the disk to allow more symbols to be added. This buffer is at the low address end of the table. Each overflow sector is therefore ordered; however, there is no ordering between overflow sectors. There may be up to 32 overflow sectors. Symbol Table Size (Approximate) Size of Core (Words) LIST No LIST 1 PASS No LIST 2 PASS 4096 8192 111 1476 184 1549 217 1582 Max., with Maximum Overflow 3609 4974 Each entry in the Symbol Table requires three words. The format of a Symbol Table entry is: Word 1 o 12 15 0 1 15 1 , , T T Label (packed EBCDIC 5 char. max.) Value Re locatiion bi t Mu Itipl)'-defined bit 52 15 0 Card Code Input Conversion Table Conversion from IBM Card Code to EBCDIC is done by table lookup. The conversion table contains two EBCDIC characters per word with all 256 characters represented. The leftmost eight bits of each word represent the card code characters that can be formed with 12 through 8 punches; the right-most eight bits of each table word represent the card code characters that can be formed with 12 through 9 punches. Thus, if the input character contains a 9 punch, the right half of a conversion table word will be used. Conversely, if the input character does not contain a 9 punch, the left half of a conversion table word will be used. (In searching for the proper word, the 12-8 punches are used to decide which word; the 9 punch is used to determine which half of the chosen word.) (See TLU subroutine description. ) Paper Tape Input Conversion Table Word 3 Word 2 During Pass 1, labels are entered into the Symbol Table by the Symbol Table Add Routine (ST ADD). As each label is processed, the partially built Symbol Table is searched to determine if the label has been previously defined. If it has been previously defined, the multiply-defined bit (of the first entry) is set, and the label is not entered. If the label has not been previously defined, it is entered along with the current value of the label value buffer. If the program is being assembled in relocatable mode (no ABS statement), the relocation bit is set for each relocatable label. (See Relocatability. ) The Symbol Table is used during Pass 2 when evaluating an operand containing symbols. The symbol in the operand field is given the value of the symbol in the Symbol Table. If the multiply-defined bit was set, an M (multiply-defined error code) is entered in the I/O buffer. 1 The conversion of paper tape input to EBCDIC is performed by table lookup. The input character is used as the argument to perform a table search for the equivalent EBCDIC character. The conversion table contains only valid PTTC/8 characters (73 total) and the EBCDIC equivalent. Bits 0-7 of each table word contain the EBCDIC character code and bits 8-15 contain the equivalent PTTC/8 character code. PHASE DESCRIPTIONS The generalized logic flow of the Assembler is shown in Chart BL. The labels beside the chart symbols correspond to the labels used in the program listings. The following phase descriptions are divided into the routines represented in Chart BL. Subroutines are described with the phase in which they reside. When tne Supervisor encounters a ASM Monitor control record, Phase 0 of the Assembler is read into core storage and control is transferred to it. Phase o sets up the lTV for the principal printer and I/O device and reads in the ISS subroutines for these devices. It also initializes the Symbol Table limits, initializes the heading sector on CIB, makes sure there are 33 sectors of Working Storage available, reads in Phase 9, and reads in Phase 1, which overlays part of Phase O. Phase 0 also contains a level 4ILS subroutine, a routine that is used with the DISKO· subroutine to enable it accomodate word counts exceeding 320, and a flipper routine that uses the disk routine to read in overlay phases. These routines remain in core throughout the assembly. Phase 1 reads and processes control records, sets switches for each control record specified, and executes a branch to the print routine to print each control record. When the first non-control record is encountered, Phase lA is read in, overlaying Phase 1. Phase lA modifies the I/O area if paper tape input is used, and during Pass 1 determines the lower limit of the Symbol Table on a basis of the options specified by the control records. Phase 2 is then read in, overlaying Phase lA. Phase 2 processes ABS, ENT, ISS, ILS, LIBR, EPR, SPR, and HDNG statements. When any other type of statement is encountered, Phase 6 is read in, and a branch to Phase 9 is executed. Phase 3 is used to save the Symbol Table (optional) and to print and/or punch the Symbol Table (optional) . It is read in from the disk at the end of the Pass 2 processing of the END statement. Upon conclusion of Phase 3, FLIPR is set up to read Phase 4 from the disk. Phase 4 is used to print the closing message of the number of errors in the assembly and to move the object program output back 4 cylinders (to the beginning of Working Storage). This phase is read from the disk at the end of Phase 3 and returns to the Monitor entry point in the Skeleton Supervisor when completed. Phase 5 processes ORG, EQU, HDNG, BSS, and BES statements. It also contains the subroutine used to print the heading at the top of each new page of the listing. The phase is always in core as a result of one of the above statement types, except when brought in as a result of a Channel 12 condition on the 1132 Printer. Phase 6 processes all imperative instructions (hardware mnemonic op codes) and the DC statement. The phase is always in core as a result of an imperative instruction or a DC statement. Phase 7 processes DEC and XFLC statements. The phase is always in core as a result of encountering a DEC or XFLC constant. Phase 8 processes CALL, LIBF, DSA, LINK, EXIT, and EBC statements. The phase is always in core if one of the above statements is encountered. Phas e 9 checks the mnemonic op code for all statements except ABS, ENT, ISS, ILS, LIBR, EPR, and SPR statements, and executes a branch to the branch table contained in each statement processing phase. If the required phase is in core, the statement is processed. If the required phase is not in core, it is read in, and the statement is processed. Phase 9 also contains subroutines that are common to all phases of the Assembler. Phase 10 consists of two subroutines used during Pass 2 to control the generation of the Disk System Format output. This phase is an overlay which is read over the Symbol Table Add portion of Phase 9 during Pass 1 of the END statement processing. Phase 11 contains a subroutine that is used to read the source statements from the disk during Pass 2 if the assembly is in one pass mode. It is read in when the END statement is processed during Pass 1 and overlays the subroutine used to save the source statements on the disk during Pass 1. Phase 12 is brought into core when the END statement is encountered. This Phase is used in Pass 1 to build the program header record, read in Phase 10 to replace the STADD section of Phase 9, and read in Phase 11 to replace a section of Phase 9 (one pass mode only), and then overlay with Phase 1 after the first record for Pass 2 is in the I/O buffer. In Pass 2, Phase 12 reads in Phase 12A to process the END statement, finishes the DSF output, and then Phase 12A is overlaid. Phase 0 (Initialization Phase) Chart: BM, BN • Contains the non-overlay routines, ILS04, DISKl, and FLIPR. • Reads in non-overlay phase (Phase 9). • Reads in ISS subroutines for the principal printer and I/O device. Section 4: Assembler Program 53 • • Initializes: lTV, Symbol Table Limits, and the listing page heading on the first sector of the CIB. Checks Working Storage available on disk. Overlay Section of Phase 0 STRTO: Start of Phase 0 execution. Also corresponds to the loading address of all instructionprocessing phases. Non-Overlay Section of Phase 0 1. ILS04: Interrupt level subroutine for level 4. This subro~tine senses the interrupt level status work (ILSW) for level 4 to determine which device on this level is responding. When this is determined, a BSI instruction is executed to the interrupt service entry point in the ISS subroutine for the device. When the ISS subroutine returns to ILS04, the interrupt is reset and the routine returns control to the mainline program. 2. DISK1: Multiple sector read/write subroutine. This routine is used with DISKO to read and write more than 320 words at a time. The two words preceding the I/O area are saved and 320 is subtracted from the word count. If the word count is greater than 320, 320 is used as word count and a read or write of one sector is performed. If the word count is less than 320, the specified amount is used and the read or write operation is executed. When the disk operation is completed, the two previously saved words are restored. If the last word count was not less than 320, the subroutine sector address is incremented by 1, the next two words are saved, and a read or write function is executed. This process is repeated until the word count indicates that all data has been read or written. 7. 3. 5. 6. 8. Save the settings of non-XEQ and non-DUP switches and set them on temporarily. Set up interrupt level addresses for levels 0, 2, and 4 (words 8, 9, and 12 of the lTV). Use the DISK1 routine to read in Phase 9. Use the DISK1 routine to read in the ISS subroutine for the principal printer and the principal I/O device. Set the HIEND and LOEND of the Symbol Table. Use the DISK1 routine to write a listing page heading containing EBCDIC blanks on the first sector of the CIB. Make sure there are at least 33 sectors of Working Storage available. Read in Phase 1 overlaying Phase O. LSS33: Less than 33 sectors of Working Storage. Branches to print an error message (A 01) and returns control to the Supervisor. Phase 1 (Control Records) Chart: BO • • Reads a source record. • Sets switches for speCified options. • Prints control record read. • Overlays Phase 1 with Phase 1A. Processes Control Records. DSKER: Disk error exit. ---- TV3 (Pseudo-transfer Vector Entry): Replaces the need for an LIBF statement. Branches to the standard entrance in the Print subroutine. Operation FLIPR (Overlay Flipper): Uses DISKl to read in overlay phases. The sector address and word count are set up before entering FLIPR. BRBCK (Branch Back): A long branch that is modified to branch to the correct location in the branch table of an overlay phase. OVRLY (Overlay): Contains the word count and sector-addresso{ the overlay phase now in core or to be read into core. 54 Phase 1 reads in and processes control records; the data on each control record is compared with data stored in core. When the data in the control record matches the string of data in core, a switch is set indicating the options specified. When a non -control record is encountered, Phase 1A is read in overlaying Phase 1. SlA: Entry Point for Phase 1: Uses the read card (RDCRD) subroutine to read one card or paper tape record. If the record is not a control record, go to ENDCC. XR1 is set to the first word of the input record. XR2 is set to the number of words in the string in core containing a control record. XR3 is set to the address of the first word of the string in core. CKBLN (Check Blank): Check the input record (character by character) for blanks. If all 70 characters are blank, go to NXSTR. When a non -blank character is found, go to PSTBL. PSTBL (Past Blank): Compare the input character with the character in the string stored in core. If they do not match, go to NXSTR. If they match, return to CKBLN to process the next character. If all characters in the input record match the characters in the string in core and a blank follows the last character, go to the routine servicing the record type. If the input record does not match any string in core or if the character following a matching record is not blank, go to NOCTL. NXSTR (N ext String): Update counters and index registers to scan the next string. If the input record has been checked with each string and no matching string is found, go to NOCTL. of numeric information and then use the SCAN routine to evaluate the number of sectors or the interrupt level number contained in the control record. The value will be returned in the accumulator. Any error will cause an exit to NOCTL. PRTST (Print Symbol Table): Sets bit 0 in STOPT (Symbol Table option) switch when a PRINT SYMBOL T ABLE control record is processed. LIST: Set bit 0 in LSTOP (list option) switch when a LIST control record is processed. PCHST (Punch Symbol Table): Sets bit 15 in STOPT switch when a PUNCH SYMBOL TABLE control record is processed. TWOPS (Two Pass Mode): Sets PSMDE (Pass Mode) switch to zero when a TWO PASS MODE control record is processed. LSTDK (List Deck): Sets bit 0 in LDKOP (List Deck option) when a LIST DECK control record is processed. EDIT: Sets bit 15 in LDKOP when a LIST DECK E control card is processed. INTCC: Initializes to scan all strings. This is done after one control record has been completed and before the next record is read. SAVST (Save Symbol Table): Sets SAVSW (Save Symbol Table) switch on (non-zero) when a SAVE SYMBOL TABLE control record is encountered. COMN1: Go to CLCTN to compute size of COMMON. Save the size of COMMON in SCOMN and go to CCCOM. SYSTB (System Symbol Table): Reads the System Symbol Table into the Symbol Table area. The System Symbol Table resides in the Assembler area on the disk. The first word will be a count of the symbols in the System Symbol Table. This will be used to initialize the symbol count (CTSYM) and position the lower limit of the Symbol Table (LOEND). DEFINE (Define File Size): Set FILSW indicating a FILE control record. Go to C LC TN to obtain the number of sectors required by the program at object time. Store the number of sectors at FILSZ (File Size) . Increment ADCOW by 7. Note that when *FILE is used, the first data word that would normally have been assigned to relocatable address zero will now be assigned to relocatable address seven. INTLV (Interrupt Level): Go to CLCTN to obtain the interrupt level number. Save the interrupt level number and decrement the interrupt level count by 1. CLCTN: Used by DFINE, COMN1, and INTLV to obtain numeric information from control records. Sets up the SCAN routine to allow only the processing CCCOM (Current Control Record Common): Use the principal printer to print the control record and go to INTCC to initialize for the next control record. NOCTL (NOT Control Record): Insert ID into the input buffer before listing the control record. This record has an * in the first position indicating a control record, but was not recognizable or was an illegal Level or File record. ENDCC (End Control Record): Read in Phase 1A. Section 4: Assembler Program 55 Phase 1A Chart: BP • Move record right 20 positions if input is from paper tape. • Initialize the Symbol Table limits according to the options specified. • Read in Phase 2. The current record is not a control record. Restore SCAN and go to CRDIO if input is from cards. If the input is from paper tape, move the current record over 20 positions and set the read-in address for position 21 of the I/O area. CRDIO (Card I/O): If Pass 2, go to FTCH2; otherwise initialize for Symbol Table overflow. Compute the End of Symbol Table address (ENDST) on a basis of the options specified by the control records. Set up a word count of 320 and a sector address of 0 (relative to start of Working Storage) at ENDST-2 and ENDST-1 respectively. Go to FTCH2. FTCH2 (Fetch Phase 2): Use the DISK1 routine to read in Phase 2 overlaying Phase 1. Phase 2 (Header Statement Processing) Chart: BQ • Process ABS, ENT, ISS, ILS, EPR, SPR, LIBR, statements. • Initiate reading of Phase 5. • Initiate reading of Phase 6. • Transfer control to Phase 9. This routine is entered at STRT2 when entered from Phase 1A. 8TRT~: Initialize ENTCT to allow 14 entry points. If Save Symbol Table option is in effect, set reloca- tion mode (RLMDE) to 0 for absolute and allow only ABS and HDNG in Program Header group. 82000: Bypass a comment record (* in postion 21). S2003: Pack and save op code. Look up op code in small op code table. If op code not in table, go to SZOUT. S6 OPVC2: Transfer Vector DC Table for Program Header group. Sections of code for a particular op code are reached by an indexed, indirect branch, where an entry in the table becomes the effective address of the branch. TB2ST: Beginning of small op code table. Includes following mnemonics: ABS, ENT, LIBR, ISS, EPR, SPR, and ILS. ENTl: ENT processing. Assembly relocation mode must be relocatable. S2006: Op code error code entered in buffer. This error will occur if mutually exclusive op codes of the Program Header group are in the same source program, 1. e., ABS and ENT. S2008: ENT must not be preceded by ISS or ILS. Up to 14 ENTs allowed. Each ENT increases word 6 of the Program Header (Length of Header -9) by three. In Pass 2, S2100 is used to collect the entry point name and to look up the address of the entry point. ISSl: ISS processing. The relocation mode of the assembly must be relocatable. An ISS cannot be preceded by an ENT, ILS, or another ISS. Set up SCAN to allow only numeric operand. SCAN is then used to evaluate the ISS number in positions 32-33 of the ISS record. If Pass 2, S2100 is used to set up scan for symbolic operand and collect entry point and evaluate its address. LIBRl: LIBR processing. Assembly relocation mode must be relocatable. LIBR not permitted if no entry point in source program (ENT, ILS, or ISS). ABSl: ABS processing. Must not be preceded by LIBR, ENT, ILS, or ISS. RLMDE (Relocation mode) is set to 0 for absolute assembly, and the primary (ADCOW) location counter and secondary (ADCW2) location assignment counter are set equal to ADCNI (Resident Supervisor with DISKN). ILS1: ILS processing. The relocation mode of the assembly must be relocatable. Only one ILS statement is permitted and it must not be preceded by an ENT or ISS statement. The interrupt level (positions 32 and 33 of the I/O buffer) is stored in ISSNO until the program header is constructed in Phase 12. EPR1: EPR processing. Must not be preceded by SPR. SPR1: SPR processing. Must not be preceded by DPR. S2100: Subroutine used by ENT and ISS during Pass 2 to collect entry point name and evaluate its address. Since the pass mode (PSMDE) determines the object output buffer, S2100 will store the entry point name and address in the program header in DFBUF or BUFI for one pass mode or two pass mode, respectively. The name and address of the first entry point will also be stored in COMMA. HDNGA: The HDNG op code is permitted anywhere in the source program. When Phase 2 is in core, Phase 5 must be read in to process the HDNG statement and then Phase 2 is restored. Further Phase 2 type op codes may then still be processed. S20m: Phase 2 exit. Set up FLIPR to unconditionally read in Phase 6 and transfer to BGASM in Phase 9 to process the current source statement. Phase 3 Chart: BR • S3A2: Save the relative sector address of the disk sector of DSF output, and save the relocation mode of the assembly. If any condition causes an inhibit of the Symbol Table save (STPSV non-zero), use GETER to read the error print routine from Disk, and print error message (A 04). S3A3: Go to S30UT if no symbols in Symbol Table (CTSYM = 0). Move the Symbol Table that may reside in the area of the principal print routine and in Phase 11 to Phase 9. LIPH 3: Loop to make move described above. Set up the word count and sector address to read the principal I/O routine and the principal print routine from the disk. Go to RSTIO if print routine already in core (LIST option selected); otherwise, read principal print routine. RSTIO: Read principal I/O routine. Use the PLNIO routine to blank the I/O buffer. If no Symbol Table output (print or punch), go to S30m. Go to NOPRT if PUNCH SYMBOL TABLE only. Use RPAGE to restore the page (printer), and then print a blank line (space). Move the words 'SYMBOL TABLE' to the I/O buffer (centered), and print. Print a blank line to provide a space after the title. Save the Symbol Table (optional). • Print the Symbol Table (optional). • Punch the Symbol Table (optional). • Set up FLIPR to read in Phase 4. S3A: Phase 3 begins at this address. If the SAVE SYMBOL TABLE option was not selected, the Assembler branches to S3A2. If there were any assembly errors (ERCNT non-zero), the Symbol Table cannot be saved. If the number of entries in the Symbol Table exceeds the count contained in the constant at D100, the Symbol Table cannot be saved (STPSV set non-zero). SV1: Set up the word count and sector address to Insert the symbol count (CTSYM) as the first data word of the System Symbol Table (next word after the sector address). Temporarily set the file protect address to zero to allow the System Symbol Table to be written in the Assembler area on disk. save the Symbol Table. BLNIO: Subroutine to move eighty blanks into the I/O buffer. NOPRT: Common point for print and punch. Start output of table at the high -core end.. L4: Use SUDMP to print and/or punch a record of five symbols. If the output is complete, go to S30m; if the output address (PARA 1) has gone below the low-end address of the table (LOEND), go to DOSTO. If the output address is within 14 words of the breakpoint address caused when part of the Symbol Table was moved to Phase 9, the discontj ".uity must be corrected. If it is not within 14 words, go back to L4. In correcting the discontinuity caused by the move, the LOEND value will have to be changed to the address in Phase 9 of the last in -core symbol. The number of words in the discontinuity (one to fourteen) are moven to adjoin to the table moved to Phase 9. The table output now continues from the part of the table that is now in the Phase 9 area. L5: Use SUDMP to output a record of five symbols. If there are any overflow sectors, go to L5A; if WRTST: Write the System Symbol Table and then restore the file protect address. there are no more symbols, go to S30m; otherwise, go back to L5. Section 4: Assembler Program 57 L5A: If the output address (PARA1) has gone below the value of LO END, go to DOSTO. Go back to L 5 if another complete record of five symbols can be outputted. Otherwise, set the temporary symbol count (TCONT) for the exact number of symbols left in the in-core table. SUDMP will then cause a record of fewer than five symbols to be outputted. Set LOEND to a large value before returning to L5. This will cause the test at L5A to go to DOSTO. SUDMP: Subroutine to set up the conversion routine called DUMP, and to print and/or punch the record. If the punch option has been selected, go to S3PCH to read '(if card). If printing the Symbol Table and the principal printing device is the 1132, restore page if printer on channel 12. S3065: Set-up DUMP to output five symbols if more than five to go. Otherwise, set-up DUMP to do the exact number left. Use DUMP to convert to output format from symbol format. S3TPR: Print output record and go to S3PC2 to punch the record if this option is also selected. S3PC2: Punch the output record. Branch here for punch only, or after print if print and punch. DOSTO: Output overflow sectors of table. Set TCONT equal to 106 for each sector of overflow. L8: Read overflow sector. L9: Use SUDMP to output a record of five. First time through the output address (PARA1) is at highcore end of overflow sector. If the sector is completed, decrement the overflow sector count (OFCNT) by one, and go to S3040 if overflow sectors remain. If sector is not complete, return to L9 to continue. When overflow sectors are completed, go to S30UT. S3040: Set-up for next overflow sector, and return to L8. Note that each overflow sector consisting of 106 symbols is outputted as 21 records of five symbols and one record of one symbol. DUMP: Subroutine to convert from name code to EBCDIC. An M is inserted in front of each symbol that is multiply-defined, and an A is inserted in front of a symbol whose value is absolute in a relocatable assembly. NOTE: The characters mentioned should not be considered to be Error Flag Indicators (see Table 3). 58 Phase 4 Chart: BS • Print the number of errors in the assembly. • Move the Disk System format output to the beginning of Working Storage. • Return control to the Supervisor. S4A: Start of Phase 4. SPCE4: Space printer (or typewriter). Go to ERMSG if no assembly errors, and go to ONER if only one assembly error. Use routine starting at BC 06 to convert the error count from binary to a sign and five decimal positions starting at OUTP4. S4110: Move decimal error count into the output message string (MSG4). ERMSG: Move error message into I/O buffer. When there are no assembly errors, the word 'NO' is used instead of an error count. Print message and go to S4A2. ONER: Replace the S in 'ERRORS' by a blank, and move an EBCDIC one (1) into the error count position of the message. Go to ERMSG. S4A2: Move the DSF output down four cylinders to the beginning of Working Storage. The number of sectors moved is rounded to the nearest number of half-cylinders of DSF output, since the move takes place by half-cylinders. READD: Loop to read in one sector of DSF output from its sector position during the assembly, and then write it with its sector address reduced by 32 (four cylinders). When all sectors of DSF output have been moved in this fashion, the non-XEQ switch and the non-DUP switches are restored from TXQSW and TDPSW respectively. These two temporary values reflect the effect of assembly errors (if any) before returning to the Skeleton Supervisor. Phase 5 Chart: BT, BU • Processes OR, EQU, HDNG, BSS, and BES statements. a. b. c. • Sets the Location Assignment Counter equal to the operand value of an ORG statement. Assigns the value of the operand to the label of an EQU statement. Reserves a number of words in core equal to the operand value for a BSS or BES statement. Prints the heading when a channel 12 indicator is sensed. ORGA: Branch table causes ORG processing to begin here. The SCAN routine is used to evaluate the operand, and then the ORGBS subroutine (common to ORG and BSS) is set-up for an ORG entry. ORGBS will under certain conditions insert an error code in position 18 of the I/O buffer. If error M (multiple definition), simply use first value to change the Location Assignment Counter. If any other error, ORG has no effect on the Location Assignment Counter. ORGER: Use LDLBL routine to load label in Pass 1 (if any). The label of an ORG will have the value of the Location Assignment Counter before the ORG changed it. In Pass 2, the output options will be performed by going to LDLBL. Return to BGASM in Phase 9 to process the next statement. BSSA: Branch table starts BSS (or BES) processing here. The label value (LABVL) is made even if odd when an E is present in position 32. NALGN: The SCAN routine is used to evaluate the operand, and the ORGBS subroutine is set-up for a BSS entry. The value of the operand (number of words reserved by BSS or BES) is added to the label value and the sum is stored in the Location Assignment Counter. If BES statement (OPCNT --third word of op code table entry), the label value is set equal to the new value of the Location Assignment Counter (last reserved word plus one). The number of words reserved (Hex) is inserted into positions 9 -12 of the I/O buffer. Exit at ORGER. ORGBS: Common subroutine for BSS and ORG processing. If no error as a result of the operand scan, go to NOER. If error is present in Pass 2, go to ER2, otherwise use ERADD to enter the internal statement number (INTSN) in the 25 word error table (ERTBL). ER2: If assembly is absolute, go to NOER2. In a relocatable assembly, an ORG operand must be relocatable, and a BSS operand must be absolute. AB: Modified instruction. Conditional BSC tests for the condition tested in ER2. The condition codes are modified by ORG or BSS processing. Conditions are plus and minus for ORG (branch on condition zero) and zero for BSS (branch on condition non -zero) . If operand relocation is valid, go to NOER2; otherwise insert an R (relocation error) in the I/O buffer and set the operand value to zero. NOER: If Pass 1, go to ER2. In Pass 2 use ERSCH to determine if the internal statement number for this statement was added to ERTBL in Pass 1. If it was, insert a U (undefined error) in the I/O buffer. NOER2: ORGBS exit. EQUA: Branch table starts EQU processing here. Use SCAN to evaluate operand and store the value returned in the label value word (LABVL). If Pass 2, go to EQU2. If operand contained an undefined symbol, go to EQUER. EQLBL: Save relocation value returned from SCAN in label relocation word (LABRL). EQUER: Use ERADD to enter the internal statement for this statement in the error table. EQU2: Use ERSCH to determine if the internal statement for this statement was added to the error table in Pass 1. If it was, insert U (undefined error) in the I/O buffer, and set the label value equal to zero. EQUXT: Use LDLBL to enter label in Symbol Table or to do output options. Return to BGASM in Phase 9 to process next statement. ERADD: Since any symbol in the operand of an ORG, BSS, BES, or EQU statement must be previously defined, a table is built during Pass 1, containing the internal statement numbers of the above statements whose operands were undefined. This table, known as ERTBL is 25 words long, and the address of the last entry is known as ERPTR. ERSCH: This subroutine is used to search ERTBL. If the internal statement number is found in the table, a switch known as ERSW is set non-zero. HD5: The GTHDG routine in Phase 9 reads Phase 5 into core and transfers to this label. An entry is made into the print routine at RPAGE to restore the page on the printer (dummy entry if print routine is for Console Printer). When the page restore is Section 4: Assembler Program 59 finished, the heading is read into the print area (PAREA) from the first sector of the CIB. L 1: The binary page count (PGCNT) is converted to decimal and stored in positions 78-80 of the print buffer. Leading zeros in the page number are suppressed. OUTVP: Increment the page count by one. Sct up the print routine pseudo-transfer vector (TV3) to enter the print routine beyond the section which moves the I/O buffer to the print buffer. Print the heading line. Restore the pseudo-transfe:r vector for normal entry, and clear the page restore switch (EJECT). Restore the phase which was in core before GTHDG read in Phase 5. Return to GTHXT in Phase 9 to exit GTHDG routine. HDNG5: If Pass 2, and LIST option selected, the HDNG statement is processed. The HDNG statement is punched (optional), and then the HDNG operand is centered, and written on the first sector of the CIB. If typewriter is print device, the heading line is typed, preceded, and followed by a line feed. If the 1132 is the print device, GTHDG is used to perform the new page routine. If HDNG5 entry is from Phase 2, Phase 2 is restored. . Phase 6 --Chart: • SINST: If Pass 2, go to SI2ND; otherwise increment Location Assignment Counter by one and go to INSXT. SI2ND: Save the Location Assignment Counter (TTEMP plus 2), because it must be incremented before going to SCAN and then restored before going to DFOUT. The Location Assignment Counter is then incremented by one (points to next instruction). DISP: If instruction uses special operand (condition codes), go to SPOND. Use SCAN to evaluate operand. If format is non -blank, go to NOMOD (no modification). If op code is STX, go to MOD (displacement modification). If instruction is LDX, LDS, any shift instruction, or WAIT, go to NOMOD. For any other instruction, the tag bits are checked, and if they are zero, the Assembler branches to NOMOD. MOD = Displacement modification. The value of the Location Assignment Counter is subtracted from the value of the operand and relocation value is made absolute. BV, BW Processes DC statements and all imperative instruction statements. a. Converts the operand of a DC statement to its binary value. b. Builds machine-language instructions for all imperative instruction statements. INST A: Branch table starts imperative instruction processing here. The five-bit op code obtained from the op code table is saved in the instruction buffer (INSBF). The tag position (33) is examined, and if it is blank, a branch is made to INST2. A non-blank tag is tested for validity. If it is not a 0, 1, 2, or 3, a T (tag error) is inserted in the I/O buffer. The tag bits, 6-7, are inserted in INSBF (zero if tag error). INST2: The format position (32) is examined, and if it is blank or X a branch is made to SINST. If the long form of this instruction is not valid (controlled by third word of op code entry), go to FC ER to insert F (format error) in I/O buffer and process 60 as a short instruction. If format is I, go to IINST to process an indirect instruction, and if format is L, go to LINST to process a long instruction. Any other format is an error, but since instruction is valid in the long form, after error is inserted in the I/O buffer, Assembler branches to LINST to process as a long instruction. NOMOD: No displacement modification. The displacement must be absolute or an R is inserted in the I/O buffer and the displacement is set equal to zero. The displacement must be in the range of minus 128 to plus 127 or an A (addressing error) is inserted in the I/O buffer and the displacement is set equal to zero. INST3: The displacement is inserted in INSBF, and the Location Assignment Counter is restored from ITEMP plus 2. A zero (relocation code for the first word of a long instruction, or the code for a short instruction) is inserted in position 6 of the I/O buffer. INSBF is outputted in hexadecimal to positions 9-12 of the I/O buffer, and in binary to the object output buffer by DFOUT. The Location Assignment Counter is incremented by one, and if this is a long instruction, the Assembler goes to LI3RD (TWOSW non -zero). INSXT: Uses LDLBL in Pass 1 to load label (if any), and in Pass 2 to do I/O options. Returns to BGASM in Phase 9 to process the next statement. SPOND: Special (conditional) operand processing. This section checks each operand character for the condition codes shown below, and inserts the corresponding condition bits into INSBF for those it finds. It returns to INST3 when it reaches a blank, or when it detects an erroneous condition code (C inserted in I/O buffer). Shown below is a table of the condition codes and the bit each sets: Bit Position Set point to location of the DC plus one before entering SCAN). Use SCAN to evaluate operand and then restore the Location Assignment Counter from DCCN plus 1. Insert the relocation value of the constant in position 6 of the I/O buffer (0 or 1). Output the value of the constant in hexadecimal to positions 9-12 of the I/O buffer and use DFOUT to insert the binary value with its relocation indicator bits into the object output. Go back to DCA plus 4 to exit. Condition Indicated Phase 7 10 11 12 13 14 15 Zero (Z) Minus (-) Plus (+ or &) Even (E) Carry (C) Overflow (0) Charts: • Processes DEC statements. a. b. IINST: Indirect instruction. Inserts indirect addressing bit (8) in INSBF. c. LINST: Long instruction. Inserts long instruction bit (5) in INSBF. If Pass 2, go to LI2ND; otherwise, increment Location Assignment Counter by one and return to SINST plus four to increment (ADCOW) for second word. LI2ND: Turn on TWOSW to indicate a long instruction (for later use). Save Location Assignment Counter as in short instruction processing~ and use SCAN to evaluate operand. Insert relocation property (0 or 1) in position 7 of the I/O buffer and save relocation bits with the operand value in ITEMP (2 words). If instruction may have condition codes (BSC), go to SPOND. Otherwise, return to DISP plus two to output first word of this instruction. Note that after the first word is outputted, if TWOSW is set, the Assembler will branch to LI3RD to output the second word. LI3RD: Set TWOSW equal to zero to return to oneword mode. Output second word (saved in ITEMP) in hexadecimal to positions 13-16 of the I/O buffer, and use DFOUT to output the second word and its relocation indicator bits. Return to INSXT in the short instruction processing section. DCA: Branch table starts DC statement processing here. If Pass 2, go to DC2ND; otherwise increment Location Assignment Counter by one and use LDLBL to load label (if any) . Return to BGASM in Phase 9 to process the next statement. DC 2ND: Save the Location Assignment Counter in DCCN plus 1 before incrementing it by one (it must • BX, BY, BZ, CA Converts decimal integers to a 31-bit binary value. Converts fixed-point numbers to a 31-bit binary value. Converts floating point numbers to a 23-bit binary value plus an exponent. Processes XFLC statements. a. Converts floating point numbers to a 31-bit binary value plus an exponent. DECAl: The branch table starts DEC processing here. If this statement is an XFLC, go to XFLCA. If the Location Assignment Counter value is now odd, go to ADJCT. STOLB: Store the Location Assignment Counter in the label value. If Pass 2, go to DECIN; otherwise increment the Location Assignment Counter by two and go to DECCN -4 to exit to LDLBL. ADJCT: Add one to the Location Assignment Counter to make it even. Go to STOLB to revise label value. DECIN: Use FLOTD to evaluate DEC operand. Go to DECA if non-integer constant, and to DEFXP if integer. Treat integer as fixed point with a binary place value of 31. DECA: If B-value specified, go to DEFXP. Otherwise form two-word constant in DECBF for output at DEOUT. (Convert negative constant to complement form. ) DEFXP: Fixed point section of DEC. Compute the shift count; go to FLERR if minus; if shift count is more than 31 go to FLZER. If sign of constant is plus, shift constant by the first shift count and go to Section 4: Assembler Program 61 (b) If a decimal point is included in the operand, a minus one is added to XR3 for each digit to the right of the decimal point (the operand is treated as an integer). (c) The binary value of the decimal integer or mantissa is stored into a 5-word buffer (BUF5) for further processing. DEOUT. If sign of constant is minus, remove sign bit, shift right by shift constant, and convert to two f s complement. DEOUT: Output section of DEC. Insert relocation code (0) in positions 6-7. Output first word in hexadecimal to positions 9-12 of I/O buffer, and then use DFOUT to output in binary to Disk System format. Increment Location Assignment Counter by one and then output word two of constant in hexadecimal to positions 13-16 of I/O buffer. Use DFOUT to output word two in binary to DSF, and then increment Location Assignment Counter by one. Use LDLBL to load label (if any) in Pass 1 and to do I/O options in Pass 2. Return to BGASM in Phase 9 to process the next statement. 2. 3. The value converted FLE10. The value converted FLOTD - Floating Decimal: The FLOTD subroutine converts the operand of a decimal integer, fixed, or floating point number to their binary equivalents. A floating point number represented in powers of 10 will be converted to powers of 2. The FLOTD subroutine contains a scanning process which converts the operand to its binary equivalent and a post scanning process which converts from powers of 10 to powers of 2. Buffers FLE10 - BUF5 are initialized to zero upon entry to FLOTD; XR3, which is used to count digits to the right of the decimal point, is also set to zero. Scanning Process: This portion of the FLOTD subroutine does the following: 1. 62 Converts the decimal integer or the mantissa of a fixed or floating point number to its binary equivalent. (a) If the decimal integer or mantissa is negative, a /8000 is stored in the FLSGN buffer (the decimal integer or mantissa is processed as a positive number. of a binary point identifier (B-type) is to its binary value _and stored in FLB2. Assume an operand of 4.500 E-1; at the end of the scanning process the contents of buffers would be: XFLCA: If Pass 2, go to XFLIN, otherwise increment the Location Assignment Counter by three and exit at DECCN -4 to LDLBL. XFLIN: Use FLOTD to evaluate XFLC operand. If any B -value specified, go to FLERR. Convert magnitude and sign to complement form. Use DFOUT to insert the binary characteristic as the first word of the constant in the DSF, and then convert to hexadecimal and insert in positions 6-7 of the I/O buffer. Increnlent the Location Assignment Counter by one, and go to DEOUr plus 5 to output words two and three. of a power of 10 exponent (E -type) is to its binary value and stored in BUFS Word 1 Word 2 Word 3 Word 4 Word 5 0000 0000 0000 0000 7194 XR3 = -3 IF F F D I FLEW = -1 IF F F F I At the end of the scanning process, the power of 10 representation is: (a) A binary mantissa representing an integer in BUF5. (b) A binary power of 10 exponent (FLE 10). (c) A binary value equal to the number of digits to the right of the decimal point (XR3). The objective of the post scanning process is: (a) (b) G A binary fraction (left-justfied to the binary point identifier). A binary exponent using 128 as the zero point. Positive exponents will range from 129 (+1) to 255 (+127), and negative exponents will range from 127 (-1) to zero (-128). The post scan processing is initialized to convert to a power of 2 by: (1) Combining the values of XR3 and FLE10 to obtain the effective value of the power of 10 exponents. The result is stored in FLE10. (2) Moving the binary point identifier (decimal point) from the end of word 5 to the end of word 2. This is effectively raising the power of 2 exponent +64. (3) Set XR3 to represent the initial power of 2 exponent. This is 128 (zero) plus 64 (step b) or 192. (4) Shift the mantissa left (normalized) until the high-order bit is in bit position zero of word 2. Decrement XR3 by 1 for each bit position shifted. After initializing for the post scan processing, the buffers contain: BUFS Word 1 Word 2 Word 3 Word 4 Word 5 0000 8CAO 0000 0000 0000 Prior to returning to the DEC or XFLC routines, the contents of word 2 and word 3 are loaded into the accumulator and extension, and shifted right one to clear bit position 0 of the accumulator before performing an OR of the sign bit .. The mantissa and sign are then stored in the FLBMN (Binary Mantissa) buffer. The contents of XR3 are stored in the FLBCH (binary characteristic) buffer. The output of the FLOTD subroutine is: FLBCH (Binary characteristic) 100 831 FLEW = -4 IFF F C XR3 = 192 1 ooco I I The scanning portion of the FLOTD subroutine is entered at FLOTD from the DEC or XFLC statement processing routines. The following steps are performed, during the postscan process, to convert from a power of 10 to a power of 2. 1. 2. 3. 4. Reduce the power of 10 exponent (FLE 10) toward zero' by: (a) Dividing the mantissa by 10 if the exponent is negative and multiplying the mantissa by 10 if the exponent is positive. (b) Add a 1 to FLEI0 for each division and subtract a 1 from FLE 10 for each multiplication. Normalize the mantissa by shifting the highorder bit to bit position 0 of word 2. Determine the effective power of 2 exponent by: (a) Adding a 1 to XR3 for each bit position shifted to the right. (b) Subtracting one for each bit position shifted to the left. Repeat steps 1 to 3 until FLEI0 is equal to zero. At the end of the post-scan process the buffers show: BUFS Word 1 Word 2 Word 3 Word 4 Word 5 0000 9000 0000 0000 0000 XR3 = 131 100831 FLEW 100001 FLOTD FLLP FLSSC Initializes subroutine. (a) Resets buffers and switches. (b) Sets FLSGN equal to /8000 if the mantissa is negative. Converts the mantissa to its binary value and stores the binary value in BUF5. (a) Checks each digit to determine if it is numeric and if it is not, goes to FLSSC. (b) Converts character by character, beginning with the high-order digit. (c) If a decimal point is encountered, add a -1 to XR3 for every digit to the right of the decimal point. (The instruction at FLLP will be changed from a NOP to an ADD by the FLSSC routine.) (d) If BUF5 overflows indicating the mantissa is too large, go to FLERR. Analyzes non-numeric operand characters. (a) Branch to FLBSC if the character is a B (binary point identifier). (b) Branch to FLESC if the character is an E (power of 10 indicator). (c) Modify the instruction at FLLP2 to ADD if the character is a decimal point. (d) Branch to FLFIN when a blank is found. (e) Branch to FLERR if the character is not one of the above. Section 4: Assembler Program 63 FLBSC FLESC FL2 FLFIN FLFNL FLFNX 64 Initializes for the processing of B -type exponents. (a) Set FLNIS to non-zero. i(b) Load the address of FLB2 to FL3+1. (c) Go to step (c) of FLESC. Initializes for the processing of E-type exponents and processes E and B-type exponents. (a) Set FLNIS to non-zero. (b) Load the address of FLEI0 into FL3+ 1. (c) Modify the instruction at FL4 to ADD if the exponent is positive and to SUBTRACT if the exponent is negative. (d) Go to FL2. Converts exponents to their binary value. (a) If the exponent is an E-type, convert it to its binary value and store in FLEI0. (b) If the exponent is a B-type, convert it to its binary value and store it in FLB2. (c) Exit to FLSSC when a character other than numeric is found. The post-scan processing is entered at FLFIN from FLSSC of the scanning process. Initializes for the post-scan processing. (a) Add XR3 and FLEI0 and store in FLEI0. (b) Load XR3 with 192 (128 + 64). (c) Check BUF5 for a zero condition and branch to FLZ ER if zero or FLFNL is not zero. This routine determines the direction of shift and if necessary shifts the mantissa right. (a) Check word 1 of BUF 5; if zero, go to FLFNX. (b) Branch to the SRT subroutine to shift the entire contents of BUF5 one position to the right. (e) Add a 1 to XR3. (d) Repeat steps (b) and (c) until word 1 is zero. This routine determines if word 2 of BUF5 is negative and, if necessary, shifts mantissa left. (a) Check word 2 of BUF5; if negative, go to step (c). Branch to the SLT subroutine to shift the entire contents of BUF5 one position to the left. (c) Subtract 1 from XR3. (d) Repeat steps (b) and (c) until word 2 is negative. (e) Check the value of FLEI0 and if negative or zero go to step (h). (1) Subtract 1 from FLEI0. (g) Branch to the multiply (MPY) subroutine to multiply the contents of BUF5 by 10 and return to FLFNL. (h) Check FLEI0 and branch to FLFEX if zero. (i) Add a 1 to FLEI0. (j) Branch to the Divide (DIV) subroutine to divide the contents of BUF5 by 10 and return to FLFNL. This routine stores the mantissa and exponent into buffers to be used by the DEC or XFLC routines. (a) Store the contents of XR3 into FLBCH (binary characteristic). (b) Load words 2 and 3 of BUF 5 into the accumulator and extension. Shift right one and insert the mantissa sign bit. (FLSGN contains a 18000 if the mantissa is negative.) Store in FLBMN (binary mantissa). (c) Check the binary exponent to determine if it is greater than 256 or less than O. If it is, branch to FLERR. If not, go to FLXXX. Load XR2 with the address of FLBMN. Exit via the return address at FLOTD. Floating zero routine. (a) Clear buffers and switches. (b) Set data in FLNIS. (c) Go to FLXXX. ERROR Routine. (a) Load S (syntax error) into position 18 or 19 of the I/o buffer. (b) Go to FLZER. (b) FLFEX FLXXX FLZER FLERR Phase 8 Charts: • CB, CC, CD Processes CALL, LIBF, DSA, LINK, EXIT, and EBC statements. a. Converts the operand (subroutine name) to name code for CALL and LIBF statements. b. c. d. e. Reserves three words in the program (these will be filled by the Loader) for a DSA. Generates four words in the object program. Words 1 and 2 are a long BSI to MONCL + 1. Words 3 and 4 are the program name in name code for a LINK. Generates a short LDX, tag 0, to MONCL for an EXIT statement. Reserves the needed storage for the operand of EBC. LIBFA Statement: Beginning of LIBF processing. This label is reached from CALL processing on the basis of information contained in the third word of the op code table entry. The relocation bits (in hexadecimal) are 20 and are saved in INDBT. If Pass 2, go to CA2ND; otherwise, increment the Location Assignment Counter by one and go to CLLXT to exit. CALLA: Branch table starts CALL processing at this point. If LIBF (see above), go to LIBF A. Set relocation indicator bits (in hexadecimal) to 30 and save in INDBT. CALLC: If Pass 2, go to CA2ND; otherwise, increment the Location Assignment Counter by two and go to CLIXT to exit. DSAA: Branch table starts DSA processing here. If Pass 2, go to DS2ND, otherwise increment the Location Assignment Counter by three, and go to DSA2-4 to exit. DS2ND: Relocation code for word one is three and for word two, one. Use CLLCT routine to collect the name. Go to DSA2 if the name is all right; otherwise, increment the Location Assignment Counter by three and go to DSA2-4 to exit. DSA2: Insert 3, relocation code for word one of nrulle, into position 6 of the I/O buffer. Output the first word of the name (in hexadecimal) to positions 9-12, and use DFOUT to insert word one (in binary) with its relocation indicator bits into the DSF. Increment the Location Assignment Counter by one. Insert a 1, relocation code for word two of the name, into position 7, and insert word two of the name into positions 13-16. Use DFOUT to output word two and its relocation indicator bits to the DSF. Increment the Location Assignment Counter by two before exiting. Note that the DSA statement will generate a data header in the DSF since only two words are actually output. LINKA: Branch table starts LINK processing here. If Pass 2, go to LK2ND; otherwise increment the Location Assignment Counter by four before going to DSA -4 to exit. CA2ND: Use CLLCT subroutine to collect the name of the call. The name is returned in the accumulator and extension and, if it is blank (accumulator equal zero), the Location Assignment Counter is incremented by one (LIBF) or two (CALL) before going to CLLXT to exit. LK2ND: Use CLLCT routine to collect the name of the program link. If the name is all right, go to LINK2; otherwise, increment the Location Assignment Counter by four, and go to DSA-4 to exit. COP: CALL (or LIBF) output. The relocation code (3 or 2) is inserted in position 6 of the I/O buffer for word one of the call name. The first word of the name (in hexadecimal) is inserted in positions 9-12, and DFOUT is used to enter word one (in binary) with it relocation indicator bits into the DSF. The Location Assignment Counter is incremented by ORe if this is a CALL statement. A zero is inserted into position 7 of the I/O buffer, and word two of the name is inserted into positions 13-16. DFOUT is used to insert word two of the name into the DSF. The Location Assignment Counter is then incremented by one. LINK 2: Insert a zero into position 6 of the I/O buffer, and insert word one (first word of a long BSI--4400 in hexadecimal) into positions 9-12. Use DFOUT to enter this word (in binary) into DSF, and then increment the Location Assignment Counter by one. Insert a zero into position 7, and then insert word two (address of MONCL plus one) into pOSitions 1a-16. Use DFOUT to enter this word into DSF, and then increment ADCOW by one. Use DFOUT to enter word three (first word of link name) into DSF, and then increment ADCOW by one. Use DFOUT to enter word four (second word of link name) into DSF, and then increment ADCOW by one. Go to DSA-4 to exit. CLLXT: Use LDLBL to load label (if any) during Pass 1, and to do output options during Pass 2. Return to BGASM in Phase 9 to process the next statement. EXIT A: Branch table starts EXIT processing here. If Pass 2, go to EX 2ND , otherwise increment ADCOW by one and go to DSA-4 to exit. Section 4: Assembler Program 65 EX2ND: Insert a zero into position 6 of the I/O buffer, and insert a short LDX instruction, tag 0, to MONCL into positions 9-12. Use DFOUT to insert this instruction into DSF, and then increment ADCOW by one. Go to DSA -4 to exit. EBCA: Branch table starts EBC processing here. Position 35 is checked for the presence of the period (.) delimiter. If it is present, go to EBLP-l. If it is missing, an S (syntax error) is entered in the I/O buffer, the Location Assignment Counter is incremented by 18 (maximum number of words generated by an EBC), and the Assembler exits at.EBX. • Contains subroutines common to statement processing. BGASM: Entry point for Phase 9. If the record is a comment record, do not process. Pack the mnemonic op code into two words and save in the OPBUF (Op Code Buffer). Input-Buffer: Position 27 10000,0000,1100,000110000,0000,1100,01001 EBLP: The operand field is scanned from position 71 to the left for the right-end delimiter. When found, go to EBDL. EBDL: A blank is used to replace the delimiter just detected. Then if the character count between the delimiters is odd, the blank for the right half of the last compressed word will be present. The number of characters is stored in EBBF and adjusted to be the next even number if odd before dividing by two to obtain the word count. The number of characters (EBBF) is inserted (in hexadecimal) into positions 9-12 of the I/O buffer. EBXR2: The number of words to be generated by this EBC is stored into the second word of this LDX instruction. EBPC~: Loop used to pack the characters in the EBC operand, two characters per word, and insert into DSF by means of the DFOUT subroutine during Pass 2. Increment the Location Assignment Counter by one for each time through the loop, in Pass 1 and in Pass 2. (Non-Overlaid Mainline) A D First Word Second Word Op Buffer: 11100,0001111001010010000101001°000101001 A D blank blank Representation of the mnemonic AD (Add Double) OPLP: Performs a search of the op code table (BEGOP) using the op buffer contents as the argument. The search is performed using XR3 as the entry pointer. When an equal entry is found, a branch to the OPOK routine is executed. If an equal entry is not found, an 0 (Op code error) is placed in position 17 or 18 of the I/O buffer and the program exits to the LDLBL routine if in Pass 1; otherwise, two zero words are inserted in object output before going to LDLBL. OPOK EBX: Use LDLBL to load label (if any) in Pass 1, and to do I/O options in Pass 2. Return to BGASM in Phase 9 to process the next statement. Phase 9. Position 28 COMPT Charts: CE, CF, CG, CH, CI, CJ, CK, CL, CM, CN, CO Using XR3, the third word of the op code table entry is obtained (see Operation Code Table). Bits 12-15 are used as a transfer vector for transfer of control through a branch table to the individual routine used in processing the statement, or to a routine which reads in the proper overlay and repeats the transfer vector branch to the branch table. Initializes the FLIPR routine to read in the phase required to process the statement. • Searches the op code table to ascertain valid operation mnemonic. Scan: This subroutine converts the expression in the operand field to its binary value. It also determines whether the operand expression is absolute or relocatable. • Transfers control to the proper statement processing routine (directly or through an overlay read -in routine) . SCAN 66 Entry point for the scan routine. Initializes the scan routine. SCNLP TYPE SKPCB FERR SCNEX 5MBOL SYMTP DCINT HXINT INTYP CHRVL STRX (Scan loop) Checks the operand character to determine if it is an operator (+, -, or *) or delimiter (blank or comma) ann branches to the routine that processes the special character. Checks the operand character to determine the type of operand element to be processed and branches to the routine servicing the element. The instruction at TYPE is modified to go directly to the servicing routine once the type is determined. It will be changed to a NOP instruction when an operator or delimiter is encountered. This routine leaves the scan pointer (XR1) pointing at the terminator (if blank) or one character position past the terminator (if comma). (Format error) Clears buffers and enters an S (syntax error) into the I/O buffer when an operand error is detected. (Scan exit) Uses the SKPCB routine to set up for processing the second operand. Exits to the Scan return address. Initializes to process symbols and returns to SCNLP. Modifies TYPE to return to SYMTP. Exits to QENRT+2 if the symbol has five or less characters and to FERR if it has more than five characters. (Decimal integer) Initializes the INTYP routine to collect decimal integers. Modifies TYPE to branch to INTYP. Returns to SCNLP. (Hexadecimal integer) Initializes the INTYP routine to collect hexadecimal integers. Modifies TYPE to branch to INTYP. Returns to SCNLP. (Integer type) Converts decimal or hexadecimal integers to their binary equivalents. Returns to SCNLP. (Character value) Collects character values. Modifies TYPE to branch to FERR if there is more than one character in a character value. (Asterisk) Determines if the asterisk is an operator or an element. Branches to STAR if it is an element. Modifies the CON routine to multiply the previous operand element by the one following the asterisk and to suspend addition or subtraction until all multiplication has been completed. Goes to GENRT. STAR SPLUS SMNUS SCMMA SBLNK RELER UDFER CaLL LABCK Sets RLSCW (relocation switch) equal to the mode of assembly (RLMDE). Assigns the asterisk the current value of the Location Assignment Counter. Goes to CHRVL+ 2 (ensures an operator follows the asterisk). Branches to the CaLL routine to perform the arithmetic operation which was determined by the previous operator. Modifies the CaLL routine to add the next value of the next operand element to the VALUE buffer. Same as SPLUS except it modifies the CaLL routine to subtract the value of the next operand element from the VAL UE buffer. Branches to FERR if the comma is in the operand field of a short instruction. Goes to SBLNK. Branches to the CaLL routine to process the last operand element. Branches to RELER if the operand is neither absolute or relocatable. Normal exit is to SCNEX. (Relocation error) Enters an R into the I/O buffer using the FERR routine. (Undefined Symbol Error) Enters a U into the I/O buffer if a symbol in the operand is not in the Symbol Table. (Collect) Entered when an operator or terminator is found in the operand. This routine performs the arithmetic specified by the operators in the operand expression. The result is stored in the VALUE buffer. It also resets the Scan routine after each operand element has been processed. This subroutine checks labels for validity and converts them into name code. LABCK is called by the LDLBL (Load Label) routine when building the Symbol Table and from SCAN when determining the value of an operand field containing labels. The input is a label (five words; one EBCDIC character per word) from the label field of the I/O buffer or from the operand field. LABCK first checks the validity of the label. A label is valid if: 1. 2. The first character is not numeric. There are no blanks between characters. Section 4: Assembler Program 67 3. All characters are in the range of A-I, J -R, S-Z, 0-9, or #, @, or $. If the label is not valid, an L (Label error) is inserted in position 18 or 19 of the I/O buffer and the label is ignored (zeros are returned to the calling routine) . If the label is valid, it is converted to name code. The label AJS 19 is compressed as follows: STSIA STSI STXRl Label (positions 21-26 of the I/O buffer) A S J 1000000001100000110000000011010001100000000111000101 Word 1 Word 2 1 STSXT Word 3 9 10000000011110001100000000111110011 Word 4 Word 5 Symbol Table entry (name code) J A 10010000011010001 Word 1 S 1 9 GTOF2 ;101~010~110oo1 111100Jj Word 2 Hex: 01462C79 A valid label is placed in A and Q; zeros are returned if label is invalid. STSCII - Symbol Table Search: This subroutine is entered from SCAN to look up the value of the symbolic operand just collected. It searches the Symbol Table (includi.ng any disk overflow) and returns the symbol value if the symbol is found. When a symbol is found, STSCH exits to the return address plus one. If the symbol is not found, STSCH exits to the normal return address. This exit to SCAN causes a U (Undefined error) to be inserted in the I/O buffer. The following is a description of STSCH by label: STSCH 68 Entry point. A check is made to determine if there is any table overflow. If no overflow, go to STSIA, otherwise save the partial sector (any symbols in the one sector I/O area of the table). Save index register 1. Use SRCH subroutine to search in-core table. If symbol is found at this point, go to STSl, otherwise go to STSXT plus 2 for possible overflow search. Symbol is found, therefore increment link word for return plus 1 to SCAN. Save the symbol value returned from SRCH, restore the partial sector previously saved if there is any table overflow. Restore XRl as per saved upon entry. This instruction is transferred to for an undefined symbol. The link word is not incremented. Symbol T able search exit. If a symbol is not found in the in-core table, transfer is made to STSXT plus 2. At this point, a check is made to determine if there is any table overflow. If there is none, the symbol is undefined, and transfer is made to STXRl. Otherwise, go to OFSCH to set up search of overflow sector(s). Use RDSYT subroutine to read overflow sector, and then use SRCH to search the one sector table. If found, go to STSl; otherwise, increment sector address of overflow and, if there are more overflow sectors to search, go to GTOF2. If there are no more overflow sectors, the symbol is undefined and transfer is made to STS2 to restore the partial sector. SRCH - Search: This subroutine is used to do the actual search of the Symbol Table. The search technique used is a binary search. SRCH is entered from STSCH and STADD (Symbol Table Add). If SRCH finds a symbol, the return link word is incremented by one. The relocation and multiple definition bits (if any) are stored in a location named BITS. The limits of the table to be searched may be controlled externally, thus facilitating the use of SRCH for the in-core table and the one-sector table. The following is a description of SRCH by label: SRCH GO Entry point. Begin computing limits of search. Begin finding midpoint of table. Check if HI - LOW is greater than three. If not, search is done. MID NOTEQ SECHF MULT SAREA ERTBL BTHEX B4HEX ERFLG GTHDG LDLBL STLBL Load XRl with address of table midpoint. Compare input symbol (SYMBL) with this table entry. If not equal, go to NOTEQ. If symbol was found and SRCH was entered from ST ADD, this is a multiply-defined symbol. If entry was from STSCH, save relocation and multiple definition bits, increment link word, and exit. Input symbol was not equal. If input symbol wa...~ greater, (higher in alphanumeric sequence) go to SECHF. If not, the last midpoint address is the new LOW address. Input symbol was greater. The last midpoint address is the new HI address. Multiply-defined symbol. OR the multiple definition bit into the table entry just found. Transfer to NOTEQ-6 to increment link word, clear ADDSW (indicates entry from ST ADD), and exit. Source Area. 80-word buffer for card or paper tape. Table of internal statement numbers of EQUs, ORGs, and BSSs whose operands where undefined in Pass 1. Binary to hexadecimal (General). Input is binary word in accumulator. Output is 1-4 hexadecimal EBCDIC characters starting in address specified in XR3. Binary to 4 hexadecimal characters. Uses BTHEX to output exactly 4 hexadecimal characters. Error Flag. Inserts error codes into positions 18 and 19 of I/O buffer (SAREA). Each entry also increments error count (ERCNT) by 1. NOTE: ERCNT is the count of the total number of errors, not just those reflected in pos itions 18 and 19. If listing is specified, and 1132 is principal printer, read Phase 5 into core and transfer control to new page routine (HD 5) . After new page routine is performed, control is returned here, and the overlay that was in core before Phase 5 is restored. Load Label. Uses LABCK (Label Check) to collect label. If label OK, goes to ST ADD in Pass 1. Label value to positions 1-4 of SAREA in hexadecimal. PALBL Al Pass label. Secondary load label entrance. Statements whose label fields are ignored enter here. If output (object or intermediate) fills Working Storage, print error message (A03). If Pass 1, set PSMDE = 0 for two pass assembly. The Assembler will stop at a WAIT instruction after printing the error message. This will enable the operator to take the necessary action with regard to his card or :paper tape input. The assembly will cdntinue in the two pass mode after pressing Start. When it is undesirable to alter the JOB source, the Assembler will eventually trap out the next Moni~or control record and pass it to the Supervisor. If Pass 2, exit to Supervisor (MONC L). If Working Storage not yet full, sFlve RDSRC AITWO PUNCH PCHDK PCHNB ERS GETER source statement in intermediate; output if one pass assembly (INT 1). Read Source record and exit LDLBL. If no LIST, go to PUNCH. If Console Printer is print device, go to PRILNE and print record. If 1132 is print device, go to GTHDG if this is the first source record, or if printer is om channel 12. No LIST DECK unless two pass assembly. If not, get. next record from intermediate input (INT 2) and exit. Go to RDSRC if LIST DECK or L]ST DEC K E options not selected. Go to ERS if LIST DEC K E. For full list deck, find end of object output (1-19) and set punch count for this number. Punch errors only. Go to RDSRC and read next record if no errors. Otherwise, blank positions 1-17 and set punch count to 20 before punching. Note that when punching paper tape the punch count is not needed, since the object and source is punched into the tape. Reads error printing routine into BUFI from disk. RDSYT - Read Symbol Table: This subroutine: is used by STSCH and ST ADD to read one sector of Symbol Table overflow. Section 4: Assembler Program 69 RSTRE - Restore: This subroutine is used by STSCH and SRCH to restore full table status after an overflow search. It uses RDSYT to read in the partial sector initially saved, and resets the H1END and LOEND addresses. OFSCH - Overflow Search: This subroutine is used by STSCH and ST ADD whenever it is necessary to initialize for an overflow search. The LOEND address is saved in SVLOW, the overflow sector address is set for the first overflow sector, and the HIEND and LOEND addresses are set up for a one-sector table. Upon exit, XR3 contains the number of overflow sectors. WRSYT - Write Symbol Table: This subroutine is used by STSCH to save a partial sector and by STADD to either save a partial sector or to write a complete sector of table overflow. DFOUT - Disk Format Output: This subroutine is used in Pass 2 to build the object output sectors in Disk System format (DSF). Data is input to DFOUT, one word at a time, along with the two relocation indicator bits which pertain to this word. The data word and its indicator bits are stored in a two-word buffer named TRWRD. D FOUT also checks for data breaks by comparing the primary Location Assignment Counter (ADCOW) with the secondary Location Assignment Counter (ADCW2). If they are not the same, DFOUT transfers to the data header subroutine (DTHDR) to insert a data header in the DSF. After each data word has been output, DFOUT transfers to the write disk format output subroutine (WRDFO) to determine if the one-sector buffer is full. The following is a description of D FOUT by label: DFOUT CMPCT FXDTH 70 Entry point. If first entry, store load address in first data header (follows immediately after Program Header Hecord). Set ADCW2 equal to ADCOW. Compare the Location Assignment Counter (ADCOW) with the secondary Location Assignment Counter (ADCW2). If equal, go to DFXRl. Otherwise, go to DTHR unless a data header was just generated because of a new sector (see WRDFO). Fix data header. If a break in sequence occurs, and a new sector data header was just generated, the Location Assignment Counter (current) is stored in the first word of this new data header. DFXR2 DFXR3 DFOXT LDXRS Disk format index register 2. Index register 2 points to the buffer word containing the relocation indicator bits for the current block of eight data words. If first entry, or if starting a new block of eight words, XR2, XR1 (points to buffer word where this data word will be stored), and XR3 (shift count for indicator bits) are initialized. Disk format index register 3. Load shift count to XR3. Store data word and increment program word count (WRDCT) by one. Shift data word's indicator bits and OR to indicator bits word (XR2). If this data word is the first word of an LIBF name, ADCW2 is not incremented, since the two words of the name will be replaced by a short BSI at load time. Disk format exit. Clear two-word input buffer and redundant data header switch (RDTHD) to zero. Load index registers. Go to WRDFO to check if output sector is done. Reload index registers as per saved upon entering. Exit. STADD - Symbol Table Add: This section of Phase 9 is used only in Pass 1 to build the Symbol Table; consequently it is overlaid during Pass 1 processing of the END statement by Phase 10 (consisting of the DTHR and WRDFO subroutines). If label field of a statement is blank, STADD transfers to ADDXT which exits to load label subroutine. SRCH is used to determine if the label has already been defined in the in-core table. If it has not, and there is no table overflow, go to ST AD2 to add label to table. If defined in in-core table, go to ADDXT. If not defined in in -core table and there are overflow sectors, this overflow must be searched. WRSYT is used to save the partial sector, and then OFSCH is used to initialize the overflow search. In ST ADD, all sectors of overflow must be searched to detect a possible multiple definition. ]f a multiplydefined symbol is found on an overflow sector, this sector is rewritten so as to contain the multiple definition flag bit. If the symbol is not multiplydefined on any overflow sector, the full table is first restored before making the new entry. The following is a description of ST ADD by important labels: STAD2 Label not multiply-defined and can be added to table. If this label is the next higher alphameric entry (no table move SYMIN ST002 required), go to SYMIN for direct add to table. Otherwise move all higher entries three words toward lower core (one entry leftwards). OR label relocation value (LABRL) into label before adding to table. Increment the count of number of symbols (CTSYM) by one. Reduce LOEND address by three, and determine if in -core table full. If not, go to ADDXT. Write overflow sector, increment count of overflow sectors (OFCNT) by one, and check whether or not the four cylinder overflow area has been exhausted. If not go to ST002. If it has, print error message (A02) and return to Supervisor. Increment sector address of table overflow, and reset table limits to allow another sector of overflow (106 more symbols) . INT 1 - Intermediate I/O Pass 1: This subroutine is used in Pass 1 of a one pass assembly to save the source input on the disk. It is overlaid by INT 2 during Pass 1 processing of the END statement of a one pass assembly. Each source statement is packed, two characters per word, and preceded by one word referred to as a prefix word. The prefix word contains the word count of the statement (including the prefix word) in. bits 8 - 15. Bit 0 is used to indicate that the statement begins in position 21. Bit 1 is used to indicate that the statement includes an ill field. The following is a description of INT 1 by principal label: INTI IN105 BLSCN LVSCN Entry point XR 1 points to the prefix word for this statement, XR2 points to position 21 of I/O buffer (SAREA), and XR3 is set to five to check the label field. If there is any non-blank in the label field, go to INI05. When there is no label field, packing starts at position 27 (LFT27). OR bit 0 (CON plus 2) to prefix word and start packing at position 21. Scan from position 71 toward left pointer (position 21 or 27) for a nonblank. If a non -blank found, go to LVSCN. Compute number of positions from left pointer to end of statement. If minus (blank record), go to LDCTL. Add two (CON plus 5) to this number and divide LFPTR NOPBR ID LDCTL NOWRT WRTIO CTLX2 by two. This result is the number of words to be packed (also enters prefix word). Pack statement, two characters per word, and store in output buffer (BIUFI). NOP or branch. When INT 1 is entered, this word is set to an NOP to allow checking for the ID field. If the ID field is found, this word is set to a branch to LDCTL. This allows the same packing routine to be used for the ID field (LFPTR). If there is no 10 field, go to LDCTL. ill field found. OR bit 1 (CON plus 4) to prefix word. Add four to word count in prefix word. Use packing routine at LFPTR to pack ill field. Reset NOPBR to a NOP. Check if !room in buffer for one more statement (use maximum statement length). If not enough room, go to WRTIO. CTLWD contains address in buffer of next prefix word. Set this next pr~fix word equal to 0001 (minimum word' count) . Exit. Compute total word count for this sector (including prefix words). This count becomes the first data word in this secto-r. Write sector of intermediate I/O. Decrement count of sectors of Working Storage left (SCRA) by one, and inorement sector address of intermediate I/O by one. Go back to NOWRT to initialize before exit. Phase 10 Chart: CP • Enters a data header in DSF when required (DTHDR). • Writes one sector on the disk when the output buffer is full (WRD FO) . DTHDR (Data Header): This subroutine enters a data header in DSF as required. The program word count (WRDCT) is incremented by two for each entry to this subroutine, since each data header is two: words long. The number of words to and includilng this new data header is stored in word 2 of the last data header. The Location ASSignment Counters (ADCOW and ADCW2) are set equal, and the load Section 4: Assembler Program 71 address (ADCOW) is stored in word 1 of the new data header. The address constant which is used for determining the number of words between data headers (DHPTR) is set to the address of the first word of this new data header. The buffer address where the next data word is to be stored (DFXRl plus 1) is incremented by two. XR2 and XR3 initialization is also performed. The number of words to be moved, in the event that this data header is a normal new sector data header, is incremented by one so that all data words will be moved (see WRD FO) . Exit. NOTE: In both DTHDR and WRDFO, reference is made to a buffer. This buffer will be DFBUF if assembly is in one pass mode, or will be BUFI if assembly is in two pass mode (see Figure 11). Both buffers are long enough to contain one sector of output plus a maximum of ten words past the three hundred and twentieth word. Note that various addresses in DFOUT, DTHDR, and WRDFO are set initially for DFBUF (one pass mode). Should the assembly be in two pass mode, these addresses will be set to their equivalent positions for BUFI during the processing of the END statement (Phase 12). WRDFO (Write Disk Format Output): This subroutine writes one sector of Disk System format output when the output buffer is full. After the sector is written, it moves any words past the three hundred and twentieth word of the buffer back to the beginning of the buffer. The following is a description of WRDFO by principal label. Phase 11 WRD FO: Entry point. If the entry is from END statement processing, go directly to WR TSR to write the sector. Otherwise, check if output is past sector point of buffer. If output is past the three hundred and twentieth word of the buffer and a block of eight data words has been completed, go to DTHDH. to insert a data header for the next sector and turn the redundant data header switch (RDTHD) before writing the sector. If the above condition does not exist, exit. WRTSR: Write DSF sector. Increment sector address of DSF output by one, and decrement number of sectors of Working Storage available (SCRA) by one .. MVLFT: If entry is from END statement proceSSing, no moveis required. Exit. MVCNT: The number of data words to be moved is contained in the second word of this LDX instruction. This number is a result of the difference computed when checking for output past the three hundred and twentieth word of the buffer, and is incremented in DTHDR by one to give the correct move number. If the count is zero, go to NOMVE. W2: Loop to move words past the three hundred and twentieth word of the buffer back to beginning of buffer. NOMVE: Initializes XRl and XR2 control in DFOUT, and resets the data header address constant (DHPTR). Exit. 72 Chart: • CQ Reads the source statements from the disk during Pass 2. (One pass mode assembly.) INT2 (Intermediate I/O Pass 2): This subroutine is used in Pass 2 of a one pass assembly to bring the source statements saved by INT 1 back into core in such a way that they are indistinguishable from statements read from the principal I/O device (card or paper tape). The following is a description of INT2 by principal label. INT 2: Entry point: Store blanks in I/O buffer (SAREA). INT2A: Load XRl with the next prefix word, and XR2 with the address of position 21. If prefix word indicates no label field, change XR2 for position 27. LDR3: The second word of this LDX instruction contains the number of words to be unpacked (obtained from prefix word). If statement has an ID field, reduce word count by four. If the word count of this statement is 1 (only a prefix word, i. e., a blank record), go to NOID2, UNPCK: Unpack statement into I/O buffer. Reduce the total data word count of this sector (contained in BUFI plus 2) by one for each time through this loop, TSTID: Check prefix word to determine if this statement has an ID field. If no ID field, go to NOID2. Otherwise, go back to UNPCK and unpack four-word ID field. NOID2: Check total data word count to see if this sector is exhausted. If it is, go to RDIO to read in next sector. Pack and save op code (save in OPBUF) , and set XR2 for two positions preceding I/O buffer. Then exit. RDIO: Read next sector of intermediate input. In~nt sector address by one, reset address where next prefix word is obtained, and exit. 82420: If no EPR statement, go to 82421; otherwise, store extended precision indication in word 3 of Program Header Record, and go to 82430. NOTE: It is possible for the 8ymbol Table to extend into the area where INT 1 and INT 2 reside if the assembly is in two pass mode with no listing. 82421: If no 8PR statement, go to 82430, otherwise store standard precision indication in word 3 of the Program Header Record. Phase 12 82430: If program is type one, go to 82431. If program type is greater than two, go to 8243A. If a file was not defined (no *FI LE record), go to 82431. 8tore number of files defined (one) in word 9 of the Program Header Record. A seven word table (see 82485 in listing) is outputted to D8F by the DFOUT routine. As each word is outputted,the Location Assignment Counter is incremented by one. Thus the first data word will be assigned to relocatable seven in Pass 2. This table includes the size of the file (FIT8Z) as obtained from the *FI LE record. Charts: CR, C8 • Processes END statements. • Reads in Phase 10 to build a Program Header Record (Pass 1). • Reads in Phase 11 (one pass mode) (Pass 1). • Reads in and transfers control to Phase 3 (Pass 2). ENDA: The branch table starts END processing here. If Pass 2, go to END2. Initialize switches for Pass 2, and load XR2 with BUFI plus 2, or DFBUF plus 2 if two or one pass mode, respectively. CLR51: Clear first 51 words in D8F buffer to zero ( maximum Program Header Record length). If relocation mode of assembly is relocatable (RLMDE), go to 82402. Otherwise, the program is type 1, and the length of the header (word 6 of header) is equal to three. 82402: If 188 assembly, move the I88NO (saved from Phase 2) to word 14 of the header, and the number of interrupt levels required to word 15. Move the number(s) of the interrupt levels specified with control records into the header beginning with word 16. Increment the length of the header by one for each level specified (I8HDR). 8243A: If LIBR assembly (188 or ENT called wi'fu one word call), reduce program type by one (type equals 5 or 3, respectively). 82431: OR program type to precision already in word three of the Program Header Record. 82440: Read Phase 10 from disk replacing the 8T ADD section of Phase 9. 8tore the length of the header minus nine (HDLTH) in word 6 of the Header. Initialize the total word count of the program (WRDCT) to the length of the Header. 8tore the length of COMMON (completed in Phase 1) in word 5 of the Header. 8et the data header address (DHPTR) equal to the address of the first word past the Program Header Record, and setup the XR load addresses in DFOUT to correspond. Note that these addresses will at this time be for the correct output buffer since XR2 was initialized for the correct buffer earlier in this phase. 82403: If no ENTs used, go to 82404; otherwise, the program type is set to 4. 82151: If two pass assembly, go to ENDA2; otherwise, set word count equal to 320 at DFBUF, and sector address 32 relative to Working 8torage at DFBUF plus one. 8ave the END statement in intermediate I/O (INT 1), and force one more sector of intermediate output to be written, thus insuring that the END statement will be found in Pass 2. 82404: If IL8 assembly, the interrupt level (saved in 188NO) is inserted in word 13 of the Program Header, the Header length is 4, and the program type is 7. ENDAO: The force-sector-write returns from INTI to this address. Read Phase 11 (INT2) from disk, replacing the INTI section of Phase ,9. Force the reading of the first intermediate input sector. I 88XX: Reset XR2 to its value before moving the 188 information into the header. 8et HDLTH equal to 18HDR and go to 82420. Section 4: Assembler Program 73 ENDA1: The forced-read returns from INT2 to this --- address. Use INT2 to get the first source statement into the I/O buffer (SAREA). Clear the ENT and ISS switches tor Pass 2 processing, and set-up FLIPR to read Phase 1 from the disk. Write the sector buffer area of the Symbol Table (possible partial sector) to the next available table overflow sector. ENDXX: Address filled in here points to the sector overflow section of the Symbol Table. ENDA2: Two pass assembly. Therefore it is necessary-to reverse these addresses in the WRDFO subroutine to point to BUFI. Decrement the paper tape first position address (PTADR) by twenty so that the next record, if from paper tape, will read into position 1 of the I/O buffer. Use RDCRD to read the next record from the I/O device, and go to ENDA1 plus 2 to complete Pass 1 processing of END. ENDA5: The special entry to LDLBL returns to this address. If the DSF output is not past the three hundred and twentieth word of the buffer, go to ENDA3. Otherwise, use WRDFO to write output sector. ENDA3: output. ENDA4: Set up FLIPR to read Phase 3 from disk. Compute the block count of the program by dividing the total word count (WRDCT) by 20. Store the disk block count in COM54 of the Skeleton Supervisor and overlay with Phase 3. ASSEMBLER INPUT -OUTPUT ROUTINES Input/output routines for the Assembler include: 1. 2. END2: Read in Phase 12A. Phase 12A performs END statement processing in Pass 2 beginning at P12AX. 3. Phase 12A Chart: CT P 12AX...: Adjust the Location Assignment Counter to the next even address if it is odd. Store the Location Assignment Counter in COM60 of the Skeleton Supervisor. Use DTHDR to complete the word count for the last data header, and then force the word count of this new data header to be zero. If program has an entry point, go to SBRTN; otherwise, program must have an execution address specified, or an S (syntax error) is inserted in the I/O buffer. The SCAN routine is used to compute the execution address which must be relocatable in a relocatable assembly. If it is not, ENDER is used to insert an R (relocation error) in the I/O buffer. XEQOK: Store the execution address in COM56, and output in hexadecimal to positions 9-12 of the I/O buffer. SBRTN: END statements with no execution address required or with an error pertaining to the execution address transfer to this address. The LDLBL routine is set up to bypass the read of the next record and to do only output options (print and/or punch). 74 Use WRDFO to write last sector of DSF DI SKO - This routine is part of the Skeleton Supervisor. CARDO/PAPT1 - This routine services either card or paper tape depending on which is defined as the principal I/O device for the particular system. WRTYO/VIPST - This routine services either the Console Printer or the 1132 Printer, depending on which is defined as the principal printer for the particular system. Input-Output Device Routine The Assembler is device-independent; i.e. , it is indifferent to the I/O device which it uses. The assembler uses whichever ItO device routine, card or paper tape, which was loaded by the System Loader/Editor. The I/O device routine reads the input record and converts it into unpacked EBCDIC code in the input-output buffer SAREA. No return is made to the Assembler until the reading and conversion of the entire record is complete. Mter completion of the Assembler control record input, the Assembler, by examining word 9710 in COMMA, determines if the input is from paper tape. If so, the Assembler shifts the pointer to the input buffer 20 character pOSitions to the right. As the assembly of each statement is completed, the Assembler builds the output record in the buffer SAREA. Card punching occurs from positions one through twenty of this buffer. The card output routine performs the character conversion. No return is made to the Assembler until the entire card has been punched. If the output is to paper tape, the output record is built in the buffer SAREA and then moved to the buffer PBUF. Paper tape punching occurs from this buffer beginning at position one, ending at the endof-record. The paper tape output routine performs the character conversion. As soon as punching has been initiated, the paper tape output routine returns to the Assembler, thus allowing for overlap of the paper tape output operation. Print Device Routine As with the principal I/O device, the Assembler is indifferent to the device assigned as the principal print device; i. e., the Console Printer or the 1132 Printer. The Assembler uses whichever routine was loaded by the System Loader Editor. Upon entry, the move routine (P9MVE) determines if any I/O operation is in progress. If so, the move routine waits for the completion of that operation. Then the contents of the output buffer SAREA are moved to the print buffer P AREA. (This is the same buffer used for paper tape output, PBUF, renamed.) When the move is completed,the print line is initiated and the print routine returns to the Assembler. The Assembler will not call for the new page routine (Phase 5) if the principal print device is the Console Printer. The Console Printer output has as its first character a new line character to res tore the type ball before starting each line. The 1132 Printer routine is set up to space after printing each line and to double space after printing at channel 1. The Printer routine has an entry labeled RP AGE to eject to a new page. A corresponding address in the Console Printer routine is a dummy entry to make the Assembler more independent with regard to the print device. Overlays To conserve core, the Assembler Program is divided into 15 phases (numbered 0-12A). Only Phase 9 and a portion of Phase 0 remain in core. during the entire assembly process. Statement processing phases (5, 6, 7, 8, and 12) are read in whenever they are needed. A branch table (Figure 3) is included at the beginning of each statement Statement Type DC INST EQU ORG BSS,BES EBC CALL,L1BF EXIT LINK DSA DEC,XFLC END HDNG* Phase Needed 6 6 5 5 5 8 8 8 8 8 7 12 5 Phase Needed is in Core Phase Needled is not in Core BSC L to BSC L to DCA INSTA EQUA ORGA BSSA EBCA CALLA EXITA L1NKA DSAA DECA ENDA HDNG5+2 GETS6 GETS6 GETS5 GETS5 GETS5 GETS8 GETS8 GETS8 GETS8 GETS8 GETS7 GTS12 GETS5 *When HDNG occurs whi Ie in Phase 2, reads in Phase 5 and branches to HDNG5. When HDNG processing is completed, Phase 2 is restored and control is returned to Phase 2 at HDRT2. In all phases after Phase 2, one of the two options indicated in the table is executed. processing phase. When the statement type is determined (Phase 9), a branch is executed to the instruction in the branch table corresponding to tlhe statement type. If the phase needed to process the statement type is in core, processing begins. If the phase is not in core, the branch table returns control to Phase 9. Phase 9 initializes the routine used to read disk data (FLIPR) and the requested phase is read into core and the program returns to the branch table to process the statement. Section 4: Assembler Program 75 SECTION 5: FORTRAN This section describes the internal structure of the 1130 Disk Monitor System FORTRAN Compiler programs which are designed to compile FORTRAN source statem ents into object programs. The source statements must conform to the statement specifications given in the 1130 FORTRAN Language publication (Form C26-5933). PROGRAM PURPOSE The FORTRAN Compiler accepts statements of a source program written in the 1130 FORTRAN language as input (see Figure 12) and translates them into machine language instructions, which form the object program. The object program can then be loaded, along with the required subroutines, for execution. The compiler-generated machine language coding includes a large percentage of branch instructions which transfer control to subroutines during execution of the program. Thus, it is the subroutines that perform the majority of the operations in any given problem; however, it is the compiler-generated coding that selects and directs the subroutines. FORTRAN source statements II FOR Figure 12. } FORTRAN con"ol ,.oo,d. FORTRAN Input (card form) GENERAL COMPILER DESCRIPTION The FORTRAN Compiler consists of a series of 28 phases. Generally grouping the phases, Phases 1 and 2 are initialization phases which set up the 76 compiler-reserved areas, int,errupt levels, etc. Phases 3, 4, and 5 are the control phases which read control records, set Communications Area indicators, read the source statements, and ready them for the compilation phases. Phases 6 through 11 are speCification phases which process the specification statements and other definitive information. Phases 12 through 20 are the analysis phases which perform the actual compilation. Phases 21 through 27 are the output phases, and Phase 28 is a recovery phase which restores the Skeleton Supervisor. PHASE OBJECTIVES The following is a list of the compiler phases and their major objectives. 1. First Sector - initializes the loader routines. 2. Second Sector - stores the Skeleton Supervisor on the disk and loads the Input Phase. 3. Input - reads the control records and source statements. 4. Classifier - determines the statement type and places the type code in the ID word. 5. Check Order/Statement Number - checks for the presence and sequence of SUBROUTINE, FUNCTION, Type, DIMENSION, COMMON, and EQUIVALENCE statements and places statement numbers in the Symbol Table. 6. COMMON/SUBROUTINE or FUNCTION places variable names and dimension information in the Symbol Table; checks for a SUBROUTINE or FUNCTION statement and, if found, places the name and dum my argument names in the Symbol Table. 7. DIMENSION/REAL and INTEGER - places DIMENSION statement information in the Symbol Table and indicates the proper mode for REAL and INTEGER statement variables. 8. Real Constant - places the names of real constants in the Symbol Table. 9. DEFINE FILE - checks the syntax of DEFINE FILE, CALL LINK, and CALL EXIT statements and determines the defined file specifications. 10. Variable and Statement Function - places the names of variables, integer constants, and statement function parameters in the Symbol Table. 11. FORMAT - converts FORMAT statements into a special form for use by the object time input/ output routines. 12. Subscript Decomposition - calculates the constants to be used in subscript calculation at object time. 13. Ascan I - checks the syntax of all arithmetic, IF, CALL, and statement function statements. 14. Ascan II - checks the syntax of all READ, WRITE, FIND and GO TO statements. 15. DO, CONTINUE, etc. - replaces DO statements with a loop initialization statement and inserts a DO test statement following the DO loop termination statement. This phase also handles STOP, PAUSE, and END statements. 16. Subscript Optimize - replaces subscript expre ssions with an index re gister tag. 17. Scan - changes all READ, WRITE, GO TO, CALL, IF, arithmetic, and statement function statements into modified Polish notation. 18. Expander I - replaces READ, WRITE, GO TO, and RETURN statements with object coding. 19. Expander II - replaces all CALL, IF, arithmetic, and statement function statements with object coding. 20. Data Allocation - allocates an object time storage area for all variables. 21. Compilation Errors - prints out unreferenced statement numbers, undefined variables, and error codes for erroneous statements. 22. Statement Allocation - determines the storage allocation for object program coding. 23. List Statement Allocation - lists the relative statement number addresses, if requested. 24. List Symbol Table - lists the subprogram names from the Symbol Table and System Subroutine names found in the statement string, if requested. 25. List Constants - computes the addresses of the constants and lists them, if requested. 26. Output I - builds the program and data header records and places them into Working Storage. This phase also outputs the real and integer constants into Working Storage. 27. Output II - completes the conversion of the statement string to object coding and places the object program into Working Storage. 28. Recovery - restores the Skeleton Supervisor and returns control to it. 29. Dump - dumps the contents of the Symbol Table, Communications Are a, and String Area, upon request. CONTROL RECORDS The FORTRAN control records are discussed in detail in the publication IBM 1130 Card/Paper Tape Programming System Operator's Guide (Form C26-3629). CORE STORAGE LAYOUT Figure 13 illustrates the layout of core storage during compilation. The hexadecimal addresses listed are approximate and should not be construEed as the final address assignments. For the actual addresses, refer to the program listings using tHe symbolic labels. Hardware Area / 0042 String Area ~._._._._._._._._._._ /7590 Phases 3 and 28 origin here t Symbol Table / 7~50 / 7984 FORTRAN Communications Area Othe, phases od9;n he'e 1 -.-.-.-.-._._.-.-.Phase 1 origin COMMON Save Area / lEBC / 7F09 / 7F2B / 7FFF ROL Routine DISKF Routine Figure 13. Layout of Storage during Compilation Section 5: FORTMN 77 Compiler-reserved Areas Two areas of storage are reserved by the compiler. The first area, in the low-addressed words of storage, is comprised of approximately 66 words of storage. In this area are the index registers, the Interrupt Transfer Vector (lTV), interrupt traps, information pertaining to the restoration of the Skeleton Supervisor, and a CALL EXIT routine. The second area, in the high -addressed words of storage, is comprised of approximately 247 words of storage. In this area are stored the ROL, DISKF, and DUMP routines. The DUMP routine calls the Dump Phase upon request; the ROL and DISKF routines control and execute the phase-tophase transfer. Phase 1, of which these routines are a part, is loaded into these locations by the Supervisor when the FORTRAN Compiler is initialized. These three routines are resident in storage all during the com pi lation. FOR TRAN Communications Area The FORTRAN Communications Area consists of 52 words of storage where information obtained from the control records and compiler-generated addresses and indicators are kept. This information is available to any phase needing it. The contents of the FORTRAN Communications Area words are described in Table 5. Phase Area The Phase Area is the area into which the various phases of the compiler are read by the ROL routine. The size of the Phase Area is determined by the size of the largest phase of the compiler. Each phase, when loaded into the Phase Area, overlays the preceding phase. There are three phases, however, which are exceptional in that they are loaded at some location other than the Phase Area origin. Phase 1 is loaded into high-addressed storage so that the ROL and DISKF routines occupy initially the positions they will occupy throughout the compilation. The control card analysis portion of Phase 3 is loaded into the String Area. This portion of the phase is in use only until the control 78 cards have been processed and is overlaid by the source statements. Phase 28, the Recovery phase which follows the compilation, is also loaded into the string Area. The compilation, however, is com pleted by the time this phase is loaded. If the Recovery Phase should be loaded during compilation, due to an overlap or disk error, the Statement String is overlaid by the Recovery Phase. COMMON Save Area The COMMON Save Area is composed of nine words of storage used to save core location ten and vari0us addresses which are used by the Recovery Phase, if and when it should be called. Symbol Table The Symbol Table contains entries for variables, constants, statement numbers, various compilergenerated labels and compiler-generated temporary storage locations. The first entry of the Symbol Table occupies the three highest-addressed words of the String Area; i. e., the 3 words just below the first word of the Communications Area. The second entry is positioned in the lower-numbered core storage words adjacent to the first entry, etc. During the initialization of the Symbol Table in Phase 3, three words of storage are reserved for the first Symbol Table entry. This entry is not made, however, until Phase 5. From this point the size of the Symbol Table varies from phase to phase until it achieves its largest size in Phase 19. Its size always includes the three words reserved for the next Symbol Table entry. During Phases 5 through 19, the Symbol Table contains variables, constants, and statement numbers. Information for these entries has been removed from the statement string and has been replaced by pOinters to corresponding Symbol Table locations. Also, the Symbol Table contains the various compiler-generated labels and temporary storage locations used in compilation. During the output phases, 20 through 27, these entries in the Symbol Table are replaced by object time addresses which are inserted into the object coding by Phase 27. Table 5. Word FORTRAN Communications Area Description of Contents Symbolic Name 1 SOFS The address of the start of the string. 2 EOFS The address of the end of the string. 3 SOFST The address of the start of the Symbol Table. 4 SOFNS The address of the start of the non-statement-number entries in the Symbol Table. 5 SOFXT Phases 1-20. The address of the start of the Symbol Table entries for SGTs (subscript-generated temporary variables). Phases 21-25. The work area word count. 6 SOFGT Phases 1-20. The address of the start of the Symbol Table entries for GTs (generated temporary storage locations). Phases 21-25. The constant area word count. 7 EOFST The address of the end of the Symbol Table. 8 COMaN Phases 1-19. The address of the next available word for COMMON storage. Phase 20. The address of the highest addressed word reserved for COMMON storage. Phase 21 - Not used. Phases 22-25 - Relative.entry point. 9 CSIZE All phases except Phase 20. The COMMON area word count. Phase 20. The address of the lowest-addressed word reserved for COMMON storage. 10 ERROR Bit 15 set to 1 indicates overlap error. Bit 14 set to 1 indicates other error. 11-12 FNAME The program name (obtained from the *NAME control record, or SUBROUTINE, or FUNCTION statement). Stored in name code. 13 SORF Set positive to indicate FUNCTION. Set negative to indicate SUBROU!'NE. 14 CCWD Control card word. set to 1 Bit 15 Bit 14 set to 1 set to 1 Bit 13 Bit 12 set to 1 set to 1 Bit 11 Bit 10 set to 1 Bit 9 set to 1 set to 1 Bit 8 Bit 6 set to 1 Bit 5 set to 1 15 16 lacs DFCNT indicates indicates indicates indicates indicates indicates indicates i nd i cates indicates indicates lacs Control Card Word. Bit 15 set to 1 indicates Bit 14 set to 1 indicates Bit 13 set to 1 indicates Bit 10 set to 1 indicates set to 1 indicates Bit 9 Bit8 set to 1 indicates Transfer Trace. Arithmetic Trace. Extended Precision. List Symbol Table. List Subprogram Name. List Source Program. One Word integers. Save Loader. Console Printer as the principal print device. 1132 Printer as the principal print device. 1442 Card Read Punch. Paper Tape. Console Printer. Keyboard. 1132 Printer. Disk. Define File Count. Following the above 16 words are 36 words containing the IOCC words. The contents of these words is described in the compiler listings. Section 5: FORTRAN 79 An entry for a subprogram name of COUNT would appear as: 10 Word (see Table 6) Name Word 1 C 10000000010000000 11 0 Name Word 2 U N T 0000il 0l0ll0 ~OlOlOllOOo"1ll Highest-Addressed Word Lowest-Addressed Word Entry in hexadecima I form - 0080 86B4 C563 ID Word. The layout of the Symbol Table ID word is given in Table 6. The ID word is formed when the entry is placed in the Symbol Table. Name-Data Words. Names in the Symbol Table are in a format similar to name code. However, the 30 bits comprising the name are equally divided between the two words. Bit zero of each word is set to zero for constants; it is set to one for all other Symbol Table entrie s. Format. All entries in the Symbol Table are comprised of three words; an ID word and two Name-Data words. The entries for dimensioned variables are exceptional, however, in that they are six word entries; the additional three words contain the dimension information. The ID word occupies the lowest-addressed word of the three word entry. The Name-Data words occupy the two higher-addressed words. In the six word, dimensioned variable entries in the Symbol Table, the ID word and Name-Data words occupy the same positions relative to each other. The dimension information is added in the three lower-addressed words below the ID word. A typical entry is illustrated in the following example of an integer constant entry of 290. 10 Word (see Table 6) Data Word 2 Data Word 1 2 9 0 ,.....------...!..- blank blank ~ ---------- 11100000000000000101100101110011101°0000000000000001 Lowest-Addressed Word Highest-Addressed Word Entry in hexadecimal form -EOOO 65CE 0000 Table 6. Symbol Table ID Word Bit Position Status and Meaning 0 1 0 - Constant Variable 1 1 0 - Integer Real 2 1 - COMMON 3-4 01 - One dimension 10- Two dimensions 11 - Three dimensions 80 5 1 - Dummy argument 6 1 - Statement number 7 1 - 8 1 - Subprogram name 9 1 - FORMAT statement number 10 1 - Referenced statement number or defined variable 11 1 - External 12 1 - Generated temporary storage location (Gn 13 1 - Subscript-generated temporary variable (SGT) 14 1 - Allocated variabl e 15 Not Used Statement function name Dimensioned Entries. The Symbol Table entry for dimensioned variables requires six: words: two for the array name, one for the ID word, and three for the dimension information. Three words are always used for the dimension information regardless of the number of dimensions. For one-dimension arrays, the dimension words all contain the same information - the integer constant that specifies the dimension of the array. For example, the entry for array ARRY (10) would appear as: . Dimension Information po ! 10 LowestAddressed Word 10 Array Name 10 Word I HighestAddressed Word For two-dimensional arrays, one dimension word contains the integer constant of the first dimension and the remaining two words contain the product of the first and second dimension inte ger constants. For three -dimensional arrays, the first two words are as they are for a two-dimensional array and the third word contains the product of the first, second, and third integer constants of the array dimensions. Thus, the dimension information for array B(5, 15) appears as: 75,75,5,10 and the dimension information for array C(9, 9, 9) appears as: Statement Body. Each statement, after being COIllverted to EBCDIC, is packed two EBCDIC characters per word. This is the form in which the statements are initially added to the statement string. Statement Terminator. Statements are separatelil by means of the statement terminator character, a semicolon. The statement terminator character indicates the end of the statement body. This character remains in the string entry throughout the compilation process. All statements in the Table 7. Statement ID Word Type Codes Statement String The source statements are read by the Input Phase, converted to EBCDIC, and stored in core storage. The first statement is stored just above Compilerreserved area in lower storage and each succeeding statement is placed adjacent to the previous statement thus forming the source statements into a string. The area within which the source statements are stored is referred to as the string area. J 00000 Arithmetic 00010 END 00100 00110 CALL 00111 COMMON 01000 DIMENSION 01001 REAL 01010 INTEGER 01011 DO 01100 FORMAT 01101 FUNCTION 01110 GO TO 01111 IF t 10000 RETURN 1 = Numbered statement; set during Phase 3 if statement contains a statement number. 10001 WRITE 10010 READ 10011 PAUSE 10100 Error 10101 EQUIVALENCE 10110 CONTINUE 10111 STOP 0,1,2,3,415,6,7,8,9,10,11,12, 13h 4,151 T i l . . . Statement Types SUBROUTINE ID Word. For identification purposes, as each statement is placed in the string area, an ID word is added at the low-address end of each statement: Statement type code (see Table 7). FORMA T type code set in Phase 3; all others set in Phase 4. Code Inter-phase communication; various uses. Norm - Binary count of the number of words used for storing this statement (count includes 10 word; set during Phase 3). The Norm is the only portion of the ID word completed by the Input Phase. The Norm is a count of the number of words used to store that statement, including the ID word and statement terminator. The statement type codes, shown in Table 7 are added in the Classifier Phase. 11000 DO-test 11001 EXTERNAL 11010 Statement Function 11011 Internal Output Format 11100 CALL LINK, CALL EXIT 11101 FIND 11110 DEFINE FILE Section 5: FORTRAN 81 statement string carry the statement terminator except for FORMAT and CONTINUE statements and compiler-generated Error entries. Error entries inserted into the string by the compiler are inserted without the terminator character. String Area The string area during compilation contains both the statement string and the Symbol Table. The statement string is built by the Input Phase beginning in the low-addressed words of the string area. The Symbol Table is built during the compilation process, beginning in the high-addressed words of the string area. The sizes of the string and Symbol Table vary during the compilation. As some items are removed from the string, they are added to the Symbol Table. In addition, some phases move the entire statement string as far as possible toward the Symbol Table. The last statement of the string then resides next to the last Symbol Table entry. As the phase operates on thH statement string, now referred to as the input string, it is rebuilt in the low-addressed end of the string area. The rebuilt string is referred to as the output string. This procedure allows for expansion of the statement string. If at any time during the compilation an entry cannot be made to the statement string or to the Symbol Table due to the lack of sufficient storage, an overlap error condition exists. In the event of such an overlap condition,the remaining compilation is bypassed and an error me ssage is printed. (See the section, Compilation Errors.) Either the size of the source program or the number of symbols used must be decreased or the program must be compiled on a machine of larger storage capacity. 3. the Symbol Table and the Symbol Table pointer is retained in the error entry on the string. The statement string is closed up, effectively deleting the erroneous statement from the statement string. Error entrie s in the Statement String are exceptional in that they do not carry the statement terminator character (semi-colon). CONTINUE and FORMAT statements also do not carry the special terminator character. All other statements in the string are ended by means of the semi-colon. Error indications are printed at the conclusion of compilation. If a compilation error has occurred, the message OUTPUT HAS BEEN SUR PRE SSED is printed and no object program is punched. Error messages appear in the following format: CbAAbATbSTATEMENTbNUMBERbXXXXX YYY where C indicates the FORTRAN Compiler, AA is the error number, XXXXX is the last encountered statement number, and YYY is the count of statements from the last statement number. See the publication IBM 1130 Monitor System Reference Manual (Form C26-3752) for a list of the FORTRAN error numbers, their explanations, and the phases during which they are detected. In addition to the errors, undefined variables are listed by name at the end of compilation. Undefined variables inhibit output of the object program. The initialization of each phase includes an overlap error check. If, at any time during the compilation, the statement string overlaps the Symbol Table, or vice-versa, the remainder of the compilation is bypassed and the message Compilation Errors PROGRAM LENGTH EXCEEDS CAPACITY When an error is detected during the compilation process, the statement in error is replaced by an appropriate error entry in the statement string. Each entry is made during the phase in which it is detected and the procedure is the same in all phases. 1. 2. 82 The type code in the erroneous statement's ID word is changed to the Error type (see Table 3). The statement body is replaced by the appropriate error number (see Table 7). The statement number, if present, is retained in is printed. PHASE DESCRIPTIONS The description of the compiler operation is divided into separate descriptions for each phase. Each phase description is accompanied by a flow chart illustrating the logic flow of that phase. The symbols used on the charts are the same as those contained in the program listings. Phase 1: First Sector Phase 2: Second Sector Chart: DA Chart: DB • • Places the Supervisor into the Core Image Buffer on the Disk. • Loads Phase 3. Loads Phase 2. Upon detecting the / / FOR Monitor control record, the Skeleton Supervisor loads the first sector of the FOR TRAN Compiler. Phase 1 comprises this first sector. The purpose of the phase is simply to load Phase 2 which performs the initialization needed to begin the compilation of the FORTRAN source program. The phase is loaded into high-addressed storage rather than at the normal Phase Area origin. This is done in order to locate initially the ROL, DISKF, and DUMP routines into the compiler-reserved area in high-addressed storage. These routines reside in this area throughout the compilation and are used to control and execute the phase-to-phase transfer (ROL and DISKF) and to print the contents of the Symbol Table and statement string between phases (DUMP). Routine Summary. The following descriptions summarize the purpose or function of the major! routines and subroutines contained in Phase 2. Errors Detected. this phase. Routine/ Subroutine There are no errors detected in Routine Summary. The following descriptions summarize the purpose or functions of the major routines and subroutines contained in Phase 1. Phase 2 stores the Skeleton Supervisor in the Core Image Buffer on the disk. The CALL EXIT routline, which is loaded with Phase 2 but not executed, i$ placed into the compiler-reserved area in lowaddressed storage. The defective cylinder table is saved for use by the FORTRAN disk routines. Phase 2 loads Phase 3 through the ROL routine. Errors Detected. in this phase. PHOA CALL1 Routine/ Subroutine Function CALL2 PHO ROL DUMP DISKF PLACE SK01 Initializes the disk interrupt; sets up the parameters for the disk read. Loads the next phase from the disk into the phase area in memory. Tests the Console Entry Switches (1130) or Data Entry Switches (1800); if dump requested, sets up for the next phase; calls pump Phase. Sets up the disk function parameters; tests disk for not-busy state and defective cylinders; accomplishes the READ, WRITE, and READ CHECK. Controls the READ, WRITE, SEEK, and READ CHECK disk functions. Performs the SEEK operation to a specified cylinder on the disk. There are no errors detected Function Sets up the parameters for placing the Skeleton Supervisor onto the disk. Writes the first of two portions of the Skeleton Supervisor onto th~ first sector of the CIB. Writes the second of two portions of the Skeleton Supervisor onto the second sector of the CIB; save~ the defective cylinder table; pl~ces the CALL EXIT routine into the reserved area in lower storagel; loads Phase 3. Phase 3: Input Chart: DC • Computes the core storage size. • Reads the control records; sets indicators iin the FORTRAN Communications Area. Section 5: FORTRAN 83 • Reads the source statements; stores them in the string area; precedes each statement with a partially completed ill word. • Checks for a maximum of five continuation records per statement. • Lists the source program, if requested. Phase 3 is composed of two major segments; the first analyzes the control records and the second 4nputs the source statements. The control record analysis portion of Phase 3 is loaded into the string area, while the statement input portion is loaded at the normal Phase Area origin. The control record analysis routines, therefore, remain in storage until the processing of the control records is completed. They are then overlaid by the source statements as the statement string is built by the statement input portion. Phase 3 bebrins the compilation process by determining the storage capacity of the compiling machine. The FORTRAN Communications Area is set up with pertinent addresses, indicators, and the computed storage size. The I/O interrupt levels and indicators are initialized and the control records are read. I/O controls and compiler indicators drawn from the control records are placed in the FORTRAN Communications Area. The control records are converted to modified EBCDIC and listed. The source statements are now read. If the control records include an *LIST SOURC E PROGRAM or * LIST ALL record, the source statements are listed as they are read. At this time comment statements are bypassed from further processing. During input, a check is made for continuation statements. A maximum of five continuation statements per statement is permissible. The body of the statement is packed, two modified EBCDIC characters per word. Blanks between characters or words are removed from all statements except FORMAT statements. Phase 3 calculates the number' of words required to store each statement on the string, including an ID word and two words for the statement number, if one is present. This number is called the statement Norm. The statement is now stored on the statement string. The Norm is placed in the ID word and bit position 15 of the ill word is set to 1 for all statements having statement numbers. 84 Statement numbers are compressed into two words. Bits 15 and 16 of the second word are not used; statement numbers of less than five digits are left-justified, leading zeros being removed. The 2-word statement number is inserted between the ID word for the statement and the statement body. Phase 3 handles FORMAT and END statements in an exceptional manner. The statement type code is inserted into the ID word of all FORMAT statements. For all other statements this flUlction is provided in Phase 4. When the source statement input routines detect the END statement in the source program, a special I-word END indicator is placed onto the statement string rather than the END statement. If, during Phase 3, an input record having a / (slash) in column one is detected, control is transferred to the Recovery Phase and the compilation is discontinued. Errors Detected. are: 1 and 2. The errors detected by Phase 3 Routine Summary. The following descriptions summarize the purpose or function of the major routines and subroutines contained in Phase 3. Routine/ Subroutine AXXO AXX2 AXX3 AXX4 AXX4A AXX5 AXX6 AXX7 AXXll Function Reads the control records and source statements. Calls CONVI' to convert the input buffer to EBCDIC; checks if the source statements are to be listed. Lists the source statements, if requested. Performs a check for comments statements. Perform s a check for continuation statements. Checks if more than five continuation statements are encountered. Checks for blank records. Calls PUT to place the ID word on the string; if present, puts the statement number on the string. Packs the statement body into two EDCDIC characters per word; puts the packed word into the string area. Routine/ Subroutine AXX15 CCDO CARDS CONVT CSL CNM DEE ERST GETCH GTWD HOBO INTER NEXT PHO PRINT PUT PUTS RTNMN W8 Phase 4: Classifier Function Inserts the statement type code into the ID word for FORMAT statements. Checks control record; stores control information in Communications Area. Controls column reading into the input buffer. Converts input characters to EBCDIC; converts characters to be printed into print code. Checks for valid statement numbers, if pre sent; packs the number into two words. Removes trailing blanks from statements; computes the statement length (Norm); inserts the Norm into the ID word. Resets interrupts; transfers to the ROL routine to load the next phase. Places an error message on the string in place of an erroneous statement. Checks for an END record. Obtains characters from the input record; converts them to modified EBCDIC form. Picks up non-blank columns from the input records. Transfers control to the specific device routine s on an interrupt. Place s the END indicator into the string. Computes core size; initializes the FORTRAN Communications Area; sets up the I/O interrupts. Performs the printing onto the system printer. Places a word into the string. Generates the special END indicator. Transfers to the Recovery Phase if a / (slash) is detected in column 1 of an input record. Obtains the source program name from the *NAME control record; stores the name in the FNAME word in the FORTRAN C omm unications Area. Chart: DD • Determines the statement type for each state'"" ment; inserts the type code into the statement ID word. • Places the terminal character at the end of each statement. • Converts subprogram names longer than five characters to five-character names. • Converts FORTRAN supplied subprogram names according to the specified precision. • Generates the calls and parameters which will initialize I/O routines at object time, if the IOCS control indicators are present. Initially, Phase 4 moves the entire statement stting next to the Symbol Table. As each statement is processed, it is moved back to the lower end of the string area. According to the indicators set in the IOCS w<))rd of the FORTRAN Communications Area by the previous phase, Phase 4 generates the required calls to FORTRAN I/O. If the Disk indicator is ion, a 'LIBF SDFIO' followed by its parameter is inserted in front of the statement string. Then, Phase 4 inserts the 'LIBF SFIO' followed by its parameters. Next, the table of device servicing routines is built and inserted. See FORTRAN I/O in the Subroutine Library section of this manual for a description of these calls and parameters, an explanation of their function at execution time, and examples of the oalls and calling sequences. Phase 4, beginning with the first statement of the string, the n proceeds to check each statement in order to classify it into one of the 31 statement types. FORMAT statements, already having the type code, and compiler-generated error messages are not processed by this phase. Each statement name is compared to a table of valid FORTRAN statement names. Each recognized statement name is removed from the string and the corresponding ID type code is inserted into the statement ID word. (See Table 7 for the statement Section 5: FORTRAN! 85 ID type codes. ) Arithmetic statements are detected by location of the equal sign followed by an operator other than a comma. Because of this method of detection, arithmetic and statement function statements both carry the arithmetic statement ID type until Phase 10 whieh distinguishes them. Names within the statement body are converted into name code and stored. Names with only one or two characters are stored in one word. Phase 4 converts all parentheses, commas, etc. into special operator codes. These operators are each stored in separate words. Also, arithmetic operators (+, -, /, *, **) are each stored in separate words,and a statement terminator character (a semicolon) is placed after each statement, except CONTINUE and FORMAT statements and compiler-generated error messages. Routine Subroutine NOTE: The string words containing name or constant characters have a one bit in bit position O. Bit position 0 of string words containing arithmetic operator characters has a zero bit. GETID The standard FORTRAN supplied subprogram names specified in the source program are changed, if necessary, to reflect the standard or extended precision option specified in the control records. Also, the six-character subprogram names of SLITET, OVERFL, and SSWTCH, which are allowed so as to be compatible with System/360 FORTRAN, are changed to SLITT, OVERF, and SSWTC, respectively. The word FUNCTION appearing in a Type statement and the statement num hers of DO statements are isolated by the Classifier Phase. Isolation is accomplished by placing a one-word special operator (colon) just after the word or name to be isolated. This process aids later phases in detecting these words and numbers. CLFIO CQCT ENDD FCNT FlO FUNEX GET1 GET2 IDAHO MAKE MOVE MOVIE PSDIO PTFIO PUT QZA1 START Errors Detected. is: 4. The error detected by Phase 4 TWONT Routine Summary. The following descriptions summarize the purpose or function of the major routines or subroutines contained in Phase 4. WAIT Routine/ Subroutine BACK 86 Function Moves the entire statement string next to the Symbol Table. XXYZ XYZ XYZ1 Function Determines I/O specifications; generates the *FIO call. Checks for the presence of IOCS indicators in the FORTRAN Communications Area; sets up the parameters of the *FIO LIBF to reflect the specified precision. Checks for the presence of an END statement. Isolates the word FUNCTION in the string entry. T at Ie of I/O routine call s. Functional name exchange table. Gets a character from the string. Gets two characters from the input string. Initializes for a statement type code table search; ,gets the statement type code; stores it in the ID word. Checks for the name SSWTCH. Stores names in compressed EBCDIC, five characters per two words; stores operators in one word on the string. Moves statements from the input string to the output string. Updates the string pointer (XR1) to move to the next statement. Places a call to Single-disk I/O routine s onto the string, if applicable. Places the *FIO call into the string. Places the word in the accumulator into the string. Inserts the new Norm in the statement ID word. Checks the FORTRAN Communications Area ERROR word for overlap condition. Table containing the first two characters of FORTRAN statement names and the address of the remaining name characters. Transfers to the ROL routine to load the next phase. Closes the string by one word and adjusts the statement Norm. Checks for the name OVERF L. Checks for the name SLITET. Routine/ Subroutine ZAO ZA1 ZA1A ZA1B ZA2 ZA6 ZA7 ZA11 ZA13 Function Initializes for a scan of the statement string. Checks for the special END indicator. Places the END statement ill word on the string. Checks for arithmetic statements. Checks the arithmetic statement for the various types of operators. Places the ID word into the string. Checks for a DO statement. Isolates statement numbers in DO statements. Places the statement terminator (;) at the end of the statement. Phase 5:c Check Order/Statement Number Chart: DE, DF • Checks subprogram and specification statements for the proper order; removes any statement numbers from these statements. • Checks to ensure that statements following IF, GO TO, RETURN, and STOP statements have statement numbers. • Removes CONTINUE statements that do not have statement numbers. • Checks the statements for statement num bers; checks the Symbol Table for a previous entry of the same statement number. • Places the statement number into the Symbol Table; places the Symbol Table address into the string entry. Statement numbers assigned to the statements listed above are removed. A second check is made to ascertain that these statements precede the first executable statement of the source program. Any CONTINUE statements that do not have statement numbers are removed from the statement string. A check is made to ensure that statements following GO TO, IF, RETURN, and STOP statements have statement numbers. The SORF word in the Communications Area is appropriately modified if a SUBROUTINE or FUNCTION statement is present. The second pass of Phase 5 scans the statement string for statements with statement numbers. Each unique statement number is placed into the Symbol Table and the address of the Symbol Table entry is placed into the string entry where the statement number previously resided. All statements having statement numbers previously added to the Symbol Table (duplicates of other statement numbers) are in error. Mter each statement number has been placed into the Symbol Table and the Symbol Table address placed into the string, a check is made to determine if the Symbol Table has overlapped the statement string area. If an overlap has occurred, an error is indicated in the FORTRAN Communications Area by setting bit 15 of the ERROR word to 1; any further processing is bypassed by an immediate transfer to the ROL routine to load the next phase. All remaining phases are bypassed except Phase 21, which prints the overlap error message. Errors Detected. The errors detected by Phase 5 are: 5, 6, and 9. Routine Summary. The following descriptions summarize the purpose or function of the major routines or subroutines contained in Phase 5. Routine/ Subroutine ABEL Phase 5 makes two passes through the statement string. The first pass checks to ascertain that the subprogram and specification statements are in the following sequence: SUBROUTINE or FUNC TION statement Type statements (READ, INTEGER) EXTERNAL statements DIMENSION statements COMMON statements EQUIVALENC E statements CKRL CLOSE CLOZE EFF ENDST Function Checks the statement for a statement number. Checks for REAL statements. Replaces the erroneous statement with an error me ssage; closes up the string. Checks for the presence of transfer statements. Checks for the END statement; checks for a statement number in statements other than END. Section 5: FORTRAN 87 Routine/ Subroutine EOP INIT LOOK MOVE NEXT PUTIN RMOVE RMOVl START STl SUBRT TAG3 TAG4 TAG5 TENT TENTl Branches to the ROL routine to load the next phase. Initialize s the phase; checks for a previous overlap condition. Scans the Symbol Table for a duplicate statement number. Updates the string pointer (XRl) to move to the next statement. Checks for statement numbers in statements following transfer statements. Places the statement number into the Symbol Table; updates the FORTRAN Communications Area to reflect changes in the table's length; replaces the string area statement number with the Symbol Table address where it is now located. Removes the statement number. Removes the statement from the string. Checks for a previous overlap error. Checks for a FUNC TION statement. Checks for a SUBROUTINE statement. Checks for COMMON statements. Checks for EQUIVALENCE statements. Checks for CONTINUE statements. Checks for DEFINE FILE statements. Checks for INTEGER, EXTERNAL, and DIMENSION statements. Phase 6: COMMON/SUBROUTINE or FUNCTION Chart: DG, DH • Places COMMON statement variables into the Symbol Table; includes dimension information, if present. • Removes COMMON statements from the string. • Checks for a SUBROUTINE or FUNC TION statement. 88 • Place s the names and dummy arguments of the SUBROUTINE or FUNCTION statement into the Symbol Table; deletes the statement from the statement string. • Checks REAL and INTEGER statements for the word FUNCTION. Function Phase 6 is a two pass phase. The first pass processes COMMON statements; the second pass processes SUBROUTINE and FUNCTION statements, including FUNC TION found in REAL and INTEGER statements. Pass 1 of Phase 6 examines all COMMON statements, checking all variable names for validity. Variable name s are considered valid if the name: 1. 2. 3. begins with an alphabetic character, contains no special characters, and contains no more than five characters. Unique variable names found in COMMON statements are placed into the Symbol Table. Duplicate variable names are in error. When dimension information is present in a COMMON statement, the Symbol Table entry is expanded to six words, the dimension constants are changed to binary format, and this binary information is inserted into the Symbol Table entry. The Symbol Table ID word is updated to indicate the presence of the dimension information and the level of dimensioning. See the section SYMBOL TABLE for the format of dimension and non-dimension entries in,the Symbol Table. Upon com pletion of storing the statement information, the COMMON statement is removed from the string. The second pass of Phase 6 checks for a SUBROUTINE or FUNCTION statement among the specification statements'. If either is found, the SORF word in the FORTRAN Communications Area is modified to indicate whichever is applicable. The subprogram name is checked for validity. If valid, the name is added to the Symbol Table and the address of the Symbol Table entry is placed into the FNAME word in the FORTRAN Communications Area. Following this, the subprogram parameters are checked and, if valid, they are added to the Symbol Table and the statement is removed from the string. REAL and INTEGER statements are examined for the presence of the word FUNCTION. If the FUNCTION specification is found, the REAL or INTEGER statement is processed in the same manner as a FUNCTION statement, except that the subprogram mode is specified explicitly by the statement type. Routine/ Subroutine PLACE Errors Detected. The errors detected by Phase 6 are: 7, 8, 10, 11, 12, 13, 14, and 15. Routine Summary. The following descriptions sUI\lmarize the purpose or function of the major routines and subroutines contained in Phase 6. Routine/ Subroutine CHK CLOSE DDI DD2 DD3 D02 D03 DTB FLOP LLPQ MOVE MV NEX NEXP PH PIECE Function Checks for a COMMON entry of a parameter name. Closes the string after replacing the erroneous statement with an error message. Updates the string pointer (XRl) to move to the next string word. Checks the name for validity. Checks for a comma operator. Checks for a valid subprogram name. Checks for a SUBROUTINE or FUNC TION statement. Checks for a left parenthesis or a statement terminator following the subprogram name. Checks for a valid parameter name. Removes an erroneous statement from the string. Replaces an erroneous statement with an error message; closes up the string. Updates the string pointer (XR1) to move to the next statement. Places a dimension constant into the Symbol Table. Checks for acomm a, a right parenthesis, and an overlap error; indicates the dimensioning level in the Symbol Table ill word. Initialize s the phase; checks for a previous overlap error. Places the parameter name into the Symbol Table; sets the parameter and type indicators in the Symbol Table; checks for a PLACQ PLAC1 PRTE PTB RMOVE, RMV SOS START STAR 1 TCNT TRY TST ZARRO ZOR ZORRO Function Symbol Table overlap; checks for a comma or right parenthesis. Places a variable name in the Symbol Table; sets the COMMON and type indicators in the Symbol Table ID word; checks for a Symbol Table overlap. Place s the subprogram name into the Symbol Table; places the address of the Symbol Table entry into the FORTRAN Communications Area (FNAME). Sets the subprogram and type indicators in the Symbol Table ID word of a subprogram name found in a SUBROUTINE, FUNCTION, REAL FUNCTION, or INTEGER FUNC TION statement; checks for a Symbol Table overlap. Converts the dimension constant to binary. Checks for the statement terminator. Removes a statement from the string; closes up the string. Branches to the ROL routine to load the next phase. Initializes the phase; checks the first statement to see if it is a *FIO LIBF. Checks the FORTRAN Communication Area (SORF) for a subprogram indication; if none, checks the first statement to see if it is REAL or INTEGER. Checks that the dimensioning does not exceed three levels. Checks for the word FUNCTION in a REAL or INTEGER statement; if found, indicates the function in the FORTRAN Communications Area. Checks for END and COMMON statement. Scans the Symbol Table for the parameter name. Scans the Symbol Table for a duplicate of the subprogram name. Scans the Symbol Table for duplication of the variable name. Section 5 : FORTRAN 89 Phase 7: DIMENSION, REAL, INTEGER, and EXTERNAL EXTERNAL statements are scanned for the names IFIX and FLOAT. These subprogram names are erroneous. Chart: DJ, DK Errors Detected. The errors detected by this phase are: 7, 8, 16, 17, 18, 19, 20, 21, and 22. ------ • Analyzes DIMENSION statements; places dimension information into the Symbol Table. • Removes DIMENSION statements from the statement string. • Places variables and dimension information from REAL, INTEGER, and EXTERNAL statements into the Symbol Table. • Indicates in the Symbol Table ID word the mode (Real or Integer). • Check EXTERNAL statements for the names IFIX and FLOAT, which are not allowed. Routine Summary. The following descriptions summarize the purpose or function of the major routine and subroutines contained in Phase 7. Routine/ Subroutine BEGIN BOB CHK CLOSE The processing of Phase 7 is done in two passes. The first pas s analyze s DIME NSION statements. Each variable name found in a DIMENSION statement is first checked for validity. If the name is valid,the Symbol Table is searched for a duplicate. If no duplicate is found, the variable name, along with its dimensioning inform ation, is added to the Symbol Table. If a duplicate is found which has not yet been dimensioned, the dimensioning information from the variable name is added to the existing Symbol Table entry. If a duplicate is found which has already been dimenSioned, the variable name is in error. In a subprogram compilation, a comparison is made to ensure that no variable name duplicates the subprogram name. As dimensioned variables are added to the Symbol Table, the DIMENSION statements are removed from the statement string. See the section SYMBO L TABLE for the format of dimension and non-dimension entries in the Symbol Table. The second pass of Phase 7 examines the REAL, INTEGER, and EXTERNAL statements found in the statement string. Each variable found in these types of statements is checked for validity. Valid variables are compared to the Symbol Table entries. Those variables duplicated in the Symbol Table as the result of prior COl\tIMON or DIMENSION statements are in error. Those not equated to Symbol Table entries are added to the Symbol Table in the same manner as in the first pass of this phase. 90 CLQSE COZ DAP FUN JAP LAP3 LAP5 LORD MA MIX MLTN Function Checks for a Symbol Table overlap. Removes the statement from the string after a statement terminator is located; closes the string up. Determines if the dimensioned variable duplicates the subprogram name. Closes up the string after replacing an erroneous statement with an error message. Replaces the erroneous statement with an error message. Checks for a right parenthesis; indicate s the dimensioning level in the Symbol Table ID word. Checks for END, REAL, INTEGER, and EXTERNAL statements. Checks a variable name for a FUNCTION or SUBPROGRAM name equivalent or previous dimensioning; initializes error routine s, if required. Checks for the statement terminator. Initializes to scan the body of REAL, INTEGER, and EXTERNAL statements. Sets the REAL indicator of the Symbol Table lD word. Checks for a Symbol Table overlap. Sets the INTEGER indicator of the Symbol Table lD word. Indicates a DIMENSION statement; initializes to scan the booy of the statement. Checks the subprogram name for prior COMMON or DIMENSION reference; sets the EXTERNAL indicator in the Symbol Table ID word; checks for the name IFIX. Routine/ Subroutine MOTQS MV NEX Function Mo~es the pointer; checks the next wor~ for comma or left parenthesis; Che~kS for a subprogram. Mo es the pointer to the next stat ment. Chepks that the dimension constant is npt zero; puts it into the Symbol Routine/ Subroutine TICKK TICKQ YELP, YELPl ZAR Tab~e. NEXP NEXT NEXTS PADS PHASE PHIL PLACE PLACQ PREY RMOVE SIP SOS SUBN, SUBQ TARZ TCNT TEST Chepks for a comma or a right paren~hesis; checks to see that there are no more than 3 dimensional par eters present per variable name. Put the dimension constant into the ymbol Table. Che ks the next word for a comma; che ks to see that there are no more tha 3 dimensional parameters pre ent. ChlkS the variable name for validity. Init alize s the phase; checks for a pre ·ous overlap error. Mo es to the word following a con ma or left parenthesis; tests for la dimension constant; converts the ponstant to binary. PIa es the variable name into the S bol Table. PIa e s the variable or subprogram na e into the Symbol Table. Che ks for previous dimensioning of variable; checks SORF word for he subprogram indication; deltmines if name is in COMMON. Re. oves the statement from the stri g; closes up the string. Checks for the statement terminator. Cor verts the dimension constant to bin ry. Trc sfers to the ROL routine to loa the next phase. Spr ads the Symbol Table so that dime sional parameters can be added. Mo es the pointer; checks for a left parenthesis. Checks to see that there are no mo: ethan 3 dimensional parameters pre ent. Checks for END and DIMENSION ZOR, ZORRO Function Checks for the name FLOAT. Indicates Real or Integer in the Symbol Table ill word of a variable. Checks for a Symbol Table overlap; checks the next word for a comma. Checks for valid names in REAL, INTEGER, and EXTERNAL statements. Searches the Symbol Table for a duplicate entry. Phase 8: Real Constants Chart: DL • Scans all IF, C ALL, and arithmetic statements for valid real constants. • Converts real constants to standard or extended precision format, as specified. Phase 8 examines the arithmetic, IF, and CALL statements found in the statement string, checking for valid real constants. Each valid real constant is converted to binary in the precision indicated by the FORTRAN Communications Area indicators derived from the control records in Phase 3. The Symbol Table is checked for a previous entry of the constant. If a previous entry is found no new entry is made and the Symbol Table address of the constant is inserted into the statement string along with the constant operator in place of the constant. If no previous entry in the Symbol Table is found, the converted constant is added to the Symbol Table and the constant operator with the Symbol Table address of the constant replaces the constant in the statement string. The statement string is closed up following the alteration of the string. Errors Detected. The following error is detected in this phase: 23. Routine Summary. The following descriptions summarize the purpose or function of the major routines and subroutines contained in Phase 8. Section 5: FORTRAN 91 Routine/ Subroutine CAP CLSUP GET MOVE OUT RC RCC RC1 RC2 RC3 RC10 RC19 RC20 RC21 RC22 START SWIT Z ZZ Zl 92 Function Checks for END, arithmetic, IF, and CALL statements. Closes up the string; adjusts the Norm of the closed statement. Collects the elements of the real constant to be converted to binary. Moves to the next statement on the string. Transfers to the ROL routine to load the next phase. Checks for the statement terminator; tests switch 6, indicating the string needs to be closed up. Initializes to scan the body of IF, CALL, and arithmetic statements. Gets a character from the constant; checks it for zero or a digit. Checks whether the present character is E, if E is allowable. Checks whether an exponent sign is present and valid, if signed numbers are allowable. Checks the constant for validity. Checks the specified precision of the program; combines the extended constant, if Extended Precision. Combines the Standard Precision constant. Checks the Symbol T able for a previous entry of a constant; enters constants into the Symbol Table if not previously entered; checks for an overlap error. Inserts the constant operator and the Symbol Table addre ss into the statement string; moves the statement pointer; checks whether statement closure is required; calculates the number of words for closure. Checks for a Symbol Table overlap. Checks whether the present character is a decimal point, if a decimal point is allowable. Moves the pOinter to the next word of the statement body. Checks the real constant for validity. Checks for a decimal point. Routine/ Subroutine Z3 Z33 Function Checks for an operator. Moves the pointer to the last operator preceding the constant; initializes to collect the real constant. Phase 9: DEFINE FILE, CALL LINK, CALL EXIT Chart: DM • Checks the syntax of DEFINE FILE, CALL EXIT, and CALL LINK statements. • Determines the defined file specifications. Phase 9 checks the syntax of all DEFINE FILE, CALL LINK, and CALL EXIT statements. All variable names are checked for validity and are added to the Symbol Table. All valid constants are converted to binary and are added to the Symbol Table. The SORF word in the FORTRAN Communications Area is examined to ensure that a DEFINE FILE statement does not appear in a subprogram. This phase then computes the file definition specifications; that is, a DEFINE FILE table com prised of one entry for each unique file. Each entry consists of, in order, the file number, the number of records per file, the record length, the associated variable, a blank word for insertion of the sector address at load time, the number of records per sector, and the number of disk blocks per file. A count is kept in the DFCNT word in the FORTRAN Communications Area of the number of file s defined. Errors Detected. The errors detected by this phase are: 3, 70, 71, 72, and 73. Routine Summary. The following descriptions summarize the purpose or function of the major routines and subroutines contained in Phase 9. Routine/ Subroutine CE1 Function Modifies the CALL EXIT ID word Routine/ Subroutine Phase 10: Variable and Statement Functions added to the Symbol Table. A second check is made to ensure that all variable names conform to the implicit or explicit mode specifications (Real and Integer). Integer constants and internal statement numbers are also added to the Symbol Table, provided they are unique. However, names, integer constants, and internal statement numbers that are found in subscript expressions are not added to the Symbol Table until a later phase. When adding names, constants, and statement numbers to the Symbol Table, Phase 10 replaces them in the string by pointers to their respective Symbol Table entries. The pointer replacing a constant, name, etc. is the address of the ID word of the Symbol Table entry for that constant, name, etc. This phase also examines statement function statements. The ID word of the statement function statement, until now identical to that of an arithmetic statement, is changed to the statement function type. Also, the parameters of statement functions are added to the statement function name, located in the Symbol Table. These entries in the Symbol Table are distinguished by their lack of a sign bit in the second word of the name. During Phase 10,the left parenthesis on subscripts is changed to a special left parenthesis operator which indicates the order of the dimension that follows. This phase also converts all operators except those in subscripted expressions from the 6-bit EBCDIC representation to a pointer value. This pointer value is derived from the scan-forcing table. The conversion is done in preparation for the Scan Phase, Phase 17, when an operation priority will be determined through these pointer values. Chart: DN Errors Detected. The following errors are detected in this phase: 7, 24, 25, 26, and 43. CK1 CL1 COLL DF1 DF3 DF5 ED1 FILES IDSV1 OUT SKIP XR2R Function [I to atch the CALL LINK ID word. Init alize s to scan the statement bod. Ch cks the syntax of the CALL LnJK statement. co~verts a constant to binary. Ch~cks for file definition in a subprogram. PlaF,es a variable name into the SYll}bol Table, if not previously entered. co~'ects valid constants to binary; get the file count, file number, nu ber of records, and record len h; checks variable name s for val'dity. Tr sfers to the ROL routine to the next phase. Ch cks that there are no duplicate file and no more than 75 files def'ned. Che~,cks for DEFINE FILE, CALL EX T, CALL LINK, and END sta ements. PI~es the contents of the accumulat r into the output string. By as se s the rem ainder of the sta ement. Co pute s the number of records perl sector and disk blocks per file; upd~tes the file count. I • Places variablesJ internal statement numbers, and integer consiants into the Symbol Table. • Places parameters from statement function statements into tre Symbol Table. I • • Converts operat rd COWlt is decremented by one and the I/O area address is incremented by one. When the word count goes to zero, the routine busy indicator is reset, the ISS cOWlter is decremented by one, and the Read fWlction is terminated. If a check fWlction has been specified, each character read is checked to see if it is a DEL or NL character. When the DEL character is encountered it is not placed in the I/O area and reading continues. When the NL character is encoWltered, the operation is terminated. Errors: A read error or a reader not ready condition after the operation is initiated causes an exit to the user's error routine. Read errors are checked as each character is read prior to processing the information. Call Processing Interrupt Processing (Punch) • Determines type of fWlction • Checks status of routine and device • Initiates requested operation The punching of the first character is controlled by the call processing routine. The interrupt processing routine controls the punching of all remaining characters. The second character of a record comes from bit pOSitions 8-15 of the first word. Whenever a complete word has been punched, the word count is decremented by one and the I/O area address is incremented by one. When the word count goes to zero or when an NL character is encountered, if check is specified, the routine busy indicator is reset, the ISS counter is decremented by one, and the Punch function is terminated. Operation: When entered from a mainline program via an LIBF statement, the contents of XR1, the Accumulator and Extension, and the status indicators are saved. XR1 is set to point to the calling sequence control parameter. If a Test function is specified, the routine Busy indicator is checked and the saved registers are restored. If the routine is busy, the subroutine exits to LIBF+2, if it is not busy, to LIBF+3. If a Read or Write (punch) fWlction is specified, the IOCC is built and the CHECK indicator is set if the control parameter specifies that a check of DEL or NL characters is required. The routine Busy indicator is then set and the ISS counter is incremented by one. The Read or Write fWlction is initiated and the routine exits to LIBF+4. Error~ An exit to location 41 occurs if the device, function, or check digits are not valid, if the character cOWlt is zero or minus, or if the requested device (reader or pWlch) is not ready. 122 Errors: A punch not ready condition after the operation is initiated causes an exit to the user's error routine. PAPER TAPE SUBROUTINE (PAPTN) • Call processing: similar to PAPT1 except reader and punch can operate simultaneously. • Interrupt processing routines similar to PAPTl. Call Processing Routine • Determines type of device and function • Checks status of routine and device • Initiates requested operation Operation: When entered from a mainline program via an LIBF statement, the contents of XRl, XR2, the Accumulator and Extension, and the status indicators are saved. XRl is set to point to the calling sequence control parameter and XR2 is set to point to the constants table for the device called (reader or punch). If a Test function is specified, the routine device busy indicator is checked. If the requested routine is busy, the routine exits to LIBF+2, if it is not busy, to LIBF+3. For Read and Write functions, separate constant tables are built - one for the reader and one for the punch. Each table contains a device Busy indicator, Check indicator, word count, character count, I/O area address, and error subroutine address. All other operations are the same as the PAPTI operation. condition is indicated. Then, indicators and constants are initialized, and the ISS counter is incremented by one. The Write function to perform the operation indicated by the first hexadecimal digit in the control area character is now executed, the saved registers are restored, and control is returned to the calling program. Buffers and Indicators BUF BUSY DEVIC DIGIT DUPCT - ERR+l FIRST IOAR Interrupt Processing Routine Same as PAPTI operation, except after processing any read interrupt, the subroutine checks and processes any punch interrupt before returning control to ILS04. WDCNT WORK Contains the data word (or partial word) being processed. Set to indicate the routine is busy. Contains the number of the plotter being used (zero). Contains the count of the number of characters remaining in the data word being processed. Duplication counter. Contains the count of the number of times a plotter action is to be repeated. Set to the address of the user's error routine. Set to indicate that the PLOT subrootine was entered by an LIBF call rather than by an interrupt. I/O area address. Initially contains the address of the first data word in the I/O area. Word Count. Contains the count of the number of words in the I/O area. Contains the hexadecimal character being processed. Interrupt Processing PLOT SUBROUTINE (PLOTl) • Check for parity error • Execute next plotter function Call Processing • Determines type of function • Checks status of routine and device • Initiates requested operation Operation: When entered via an LIBF statement, the contents of XRl, the Accumulator and Extension, and the status indicators are saved. XRl is set to point to the calling sequence control parameter. If a Test function is specified, the routine busy indicator is checked and the saved registers are restored. The subroutine exits to LIBF+2 if the Busy indicator is set, and to LIBF+3 if it is not set. If the Write function is specified and the Busy indicator is set, the subroutine loops until a not busy Operation: Upon entering the routine from an interrupt, the duplication counter (DUPCT) is checked to determine if the previous plotter action is to be duplicated. This check is accomplished by decrementing DUPCT by one. If it does not change sign or go to zero, the previous operation is repeated and the routine exits to ILS03 routine. If DUPCT changes signs or goes to zero, it is set to zero and the next plot character is obtained by the GET routine. GET Routine: DIGIT contains the count of the number of plot characters remaining in the data word being processed. It is set to four each time a new word is entered into BUF. As each hexadecimal Section 6: Subroutine Library 123 digit is moved to WORK, DIGIT is decremented by one. When DIGIT goes to zero, WDCNT and IOAR are decremented and a new word is placed into BUF for processing. When WDCNT goes to zero, the ISS counter is decremented by one, the Busy indicator is reset, and an exit to ILS03 occurs. THE IBM 1132 PRINTER SUBROUTINE (PRNT1) Call Processing • Determines type of function • Checks status of routine and device • Initiates requested operation Operation: When entered via an LIBF statement, the contents of XR1, XR2, the Accumulator and Extension, ~thE1. status indicators are saved. The control par~eter is then checked to determine the type of ..fJ,SfCtion requested. If a Test function is specified (control parameter zero, i. e., the first hexadecimal digit), the routine Busy indicator is checked and the saved registers are restored. If the device is busYJ the subroutine exits to LIBF+2, if not busy, to LIBF+3. If the first hexadecimal digit of the control parameter is not zero (non-Test function), hexadecimal digits 2, 3, and 4 (bits 4-15) are saved in the Extension and the hexadecimal digit for control (bits 0-3) is checked to determine if the requested operation is Carri.age Control (3), Print Alphameric (2), or Print Numeric (4). If a Carriage Control' operation is specified, hexadecimal digits 2 and 3 of the control parameter are used to determine the carriage action. Digit 2 controls immediate actions and digit 3 controls actions after print. The Iafter print switch (AFTIN) is set to the value of hexadecimal digit 2. If its value is zero, it is considered set "on" and the action of the carriage will be determined by the value of hexadeCimal digit 3 and will be executed after printing. The value of hexadecimal digit 2 or 3 is further used to determine whether the carriage should space or skip. If the value is greater than 12, a space is indicated, if one through six, nine, or twelve, a skip. If the operation is a space, the contents of hexadecimal digit 2 or 3 is placed directly in the space or skip counter (SPSK). If the operation is a skip, the contents of hexadecimal digit 2 or 3 is converted, a negative sign is added, and the resultant hexadecimal number is placed is SPSK. The converted number 124 identifies the channel to which the skip will occur. (See chart below. ) If the carriage action is to be executed immediately, (AFTIN not zero) a carriage space or skip is initiated, the ISS counter is incremented by one, the saved registers are restored, and the subroutine exits to the calling program. If the carriage action is to be taken after printing, (AFTIN zero) the saved registers are restored and the subroutine exits to the calling program. Value of hexadecimal digits 2 (immediate) and 3 (after print) 1 2 3 4 5 6 9 C D E F Hex value of SPSK 8008 8007 8006 8005 8004 8003 8002 8001 0001 0002 0003 Carriage Action Skip to channel Skip to channel Skip to channel Skip to channel Skip to channel Skip to channel Skip to channel Skip to channel Space 1 Space 2 Space 3 1 2 3 4 5 6 9 12 If a Print function is speCified, the numeric indicator (NUM) will be positive if the output is print numeric, negative for alphameric. Counters will be set for print cycles, words 32-39 will be cleared, bit 15 of word 39 will be set on, and the ISS counter will be incremented by 1. A start print operation (alphameric or numeric) will be initiated and the routine will exit to the calling program. Errors; An exit to location 41 occurs if any of the follOwing conditions are sensed: 1. 2. 3. An end of forms (or not ready) condition exists An illegal function is being attempted The word count is negative, zero, or over sixty Interrupt Processing • Resets the interrupt. • Tests DSW to determine the function. • Executes the function. Operation: A sense and reset command is given to obtain and store the DSW and to reset the interrupt. The stored DSW is then checked to determine if the interrupt is a skip or space response: If a skip - Compare the channel indicator in the stored DSW with the channel indicator in the SPSK. If they are equal, execute a carriage stop command, decrement the ISS counter by 1, and continue the interrupt processing routine. If they are not equal, the carriage is not at the requested channel and no carriage stop command will be executed. If a space - If the DSW indicates a space response OR the DSW into PASS. (PASS contains a bit for each channel passed while spacing. It will be checked later to determine if the carriage is at channel 9 or 12.) Decrement the space counter (SPSK) by 1. If the counter goes to zero, decrement the ISS counter by 1 and exit to ILSOI. If the counter does not go to zero, execute a space command and continue the interrupt processing. If the DSW does not indicate a space response, check for a character emitter interrupt. If a Print operation is in progress, the DSW is checked to determine if the print scan has been completed. If it is not completed the routine will exit to ILS01. The following counters are checked during a print operation: 1. 2. Check CTR46. During processing of each character emitter interrupt, CTR46 is tested. If zero, the stored DSW is checked to determine if the last print scan had a print scan check. If it did, 46 more cycles must be allowed so that the character associated with the print scan check can be re-processed. In this event, CTR46 is set to 46 and the routine exits to ILS01. With each character emittej interrupt, CTR46, if non-zero, is decreme!ted by one and routine exits to ILS01. When CTR46 is zero and no print scan error is detected, routine will branch to FC70 to check CTR48. Check CTR48. CTR48 is set to 48 during call processing for alphameric printing. It is decremented by 1 for each successful print scan. If CTR48 is not zero, the routine exits to the EMIT routine to scan the I/O area for the next character to be printed. If the printing is numeric, CTR48 will be set to 22 by the EMIT routine (22 3. 4. numeric and special characters). If CTR48 is zero, indicating that all printing is completed, the scan field is cleared and a 1 bit is placed in bit position 15 of word 8 (Core location 39) of the scan field. Check CTRI6. CTR16 is set to 48 during call processing time. It is used to count 16 of the 18 idle cycles required to complete a print operation. The counter is decremented by 3 for each of the 16 idle cycles. When CTR16 goes to zero, the SPSK counter is checked. If a space or skip operation is to be executed, the SPSK will contain the skip to channel number or a digit representing the number of spaces remaining to be taken. A space or skip command will be executed, the ISS counter will be incremented by 1, and the routine will exit to ILS01. If the value of the SPSK counter is zero, the control parameter of the print function is checked to determine if a space after print should be executed. CTR2. CTR2 is set to twelve during cal~oc essing. It is decremented by 6 each tim an. idle cycle interrupt occurs. When CTR2 . to zero, a stop printer operation is executed. The ISS counter is decremented by 1 and the routine exits to ILSOI. A skip or space operation can be in progress at this time. Errors: The PASS indicator is checked after prir.Lting (when CTR16 reaches zero). If it indicates that channel 9 has been passed, the routine exits to the user's error routine with a 3 in the Accumulator. If channel 12 has been passed, the user's error routine is entered and a 4 is placed in the Accumulator. Upon returning from the user's routine, the operation will continue as follows: If the value of the Accumulator has been set to zero, no skip to channel 1 will be initiated. User requested carriage operations will be serviced as usual. If the value of the Accumulator is not zero, a skip to 1 will occur. Emit: A Read command will be executed to determine which typewheel character i~ to be printed next. Each character in the I/O area is checked and a bit is set in the corresponding position of the scan field for each matching character. If the print function is Print Numeric, CTR48 is set to 22 and printing is suspended until the first numeric character is in position to print. When the I/O area has been scanned and the scan field set up, the routine exits to OUT. Section 6: Subroutine Library 125 DISK SUBROUTINES (DISK1) Call Processing • • Determines type of function • Initiates requested operation Checks status of routine and device Operation: When entered via an LIBF statement, the contents of XR1, XR2, the Accumulator and Extension, and the status indicators are saved. XR1 is set to point to LIBF+2. If a Test function is specified, the routine busy indicator is checked and the saved registers are restored. If the routine is busy, the subroutine exits to LIBF+3, if not busy, to LIBF+4. If the function is not Test, store the address of the I/O area into IREAD and IWRITE. This data is sa ved and also becomes the first word of the read and write IOCC. Store the original sector address at SAVE 2. ' The effective sector address is computed by" adding the file protect address to the original sector address if the displacement option is specified in the control parameter. If this address is over +1599, an error exit is made to location 41. Add eight to the sector address for each defective cylinder prior to and including the present cylinder (maximum three cylinders per disk). Word two of the IOCCs for Read, Write, Control, and Sense is now built. The ISS counter is incremented by one, the Retry Count is set to ten, and the Busy and First Count indicators are set. The usable word count (word count +1 to indicate the sector ill word) and the usable sector address are stored in the I/O area. The function is now initiated. Seek: If a seek option is specified, set the control IOCC to indicate a cylinder count of one, modify CYLIN (internal cylinder count) by eight, and set the interrupt return to terminate the function. Execute a seek to the next cylinder. If a seek option is not specified, modify the read IOCC to allow the sector address from the desired sector to be read. Call SBRTA (subroutine A) to initiate a seek to the cylinder specified by the sector address in the I/O area. Terminate the operation when the correct sector address is read. Head (GET): Call SBRTA to determine if the read heads are at the correct cylinder. If they are not, SBRTA seeks the correct cylinder and reads the desired sector. 126 Write (PUT): The following paragraphs describe the write operations with or without a read back check. Determine if the cylinder is file protected. If it is, terminate the function and exit to location 41. If the cylinder is not file protected, call SBRTA to determine if the R/W heads are at the correct location. SBR T A seeks if required. When the correct sector has been located, write the data, terminate the function and exit to ILSO 2. If a Read Back Check (RBC) is specified, modify the read IOCC to indicate an RBC with an I/O area address the same as the write IOCC. The program branches to SBRTA to execute the Read Back Check operation. Write Immediate: Write disk data and terminate the function. No data error checks are made. When the operation is terminated, the ISS counter is decremented by one and the Routine Busy indicator is cleared. Errors: The subroutine will exit to the user's error routine if after ten tries the desired sector address is not located, an irrecoverable read error is found, or the read back check indicates an inability to write correctly. Subroutine A (SBRTA) • Check sector address read to determine physical location of heads • Seek the requested cylinder • Read the specified sector • Process errors Operation: Initially the internal cylinder location (CYLIN) is compared to the cylinder address specified in the sector address (TRAC) to determine if the R/W heads are at the correct location. If CYLIN and TRACK agree.a read is initiated at SBA10 to confirm the R/W head loc ation and the return is modified to SBA13. If the location is incorrect, a seek is initiated towards TRACK. The sign of the difference between CYLIN and TRACK determines the di,rection (if CYLIN is less, the sign is negative and the seek will be towards the center of the disk). If a seek is necessary, the return is modified to SBA10. At SBA10 a read is initiated and the return is modified to SBA13. The routine will continue to loop between SBA10 and SBA13 (reinitializing a seek on each pass) in an attempt to locate the correct cylinder address. If the correct cylinder is not found after ten tries, the routine exits to the user's error routine. If the read at SBAIO indicates that the actual location agrees with TRACK, the cylinder number is stored in CYLIN and the routine exits to the return address stored at SBRTA (BSI return). MUL T (Read or Write Multiple Sectors) • Read or write data on consecutive sectors contained on more than one cylinder • Call RBCRT routine The interrupt return is modified to return to the RBCRT routine. When all written data has been checked, the routine exits back to MULT. FLIPPER ROUTINES (FLIPO, FLIPI) • Read LOCALs into storage and transfer control to the LOCAL. • FLIPO is used with DISKO and DISKZ. • FLIPI is used with DISK! and DISKN. Description Operation: The original word cOlUlt and sector address is stored in the I/O area. The remaining word cOlUlt (stored in WKWC table) is tested. If its value is zero or negative, indicating that all words have been read or written, RBCRT is called. If RBC is not requested, the routine exits back to MULT; otherwise, the routine exits to the return address stored at RBCRT (BSI return). If the word cOlUlt test indicates that more data is to be processed,the retry cOlUlter is set to ten and one is added to the sector address. If the three low-order bits of the sector address go to zero (overflow), a seek to the next cylinder is required. 320 is then added to IWRITE (the address of the I/O area), the last two data words in the I/O area (IWRITE-I and IWRITE-2) are saved and the new sector ill is inserted in the I/O area in place of the last data word (IWRITE-I). The new word COlUlt is now determined and its value is inserted into the I/O area in place of the next to the last data word (IWRITE-2). IWRITE is set to point to the new word COlUlt. One is added to the sector number in the write IOCC, the read IOCC (IREAD) is modified to indicate the same I/O area and sector address as the write IOCC, and the routine exits to the return address. The FLIP routine contains two entry points. One is used with two-word calls (CALL), and the other with one-word calls (LIBF). After entry, the FLIP routine fetches the XEQ address and the LOCALs sector address in Working Storage from the Flipper Table (see Section 2, Supervisor, for a description of the Flipper Table). A test is then made to determine whether the LOCAL is currently in storage by comparing the sector address from the Flipper Table with the sector address of the last LOCAL read. If the LOCAL is not in storage, the word count is fetched from the Flipper Table. The manner in which a LOCAL is read differentiates FLIPO from FLIP!. FLIPO reads a LOCAL into storage one sector at a time, whereas FLIPI passes the total word count to DISKI or DISKN and that routine reads in the entire LOCAL. After the LOCAL is read, or if it was already in storage, a check is made to determine if the LOCAL is a CALL or a LIBF. If the routine is a CALL, the return address is stored in the XEQ address of the routine and control is transferred to XEQ+1. If the routine is a LIBF, control is transferred to the XEQ address as specified in the Flipper Table. RBCRT (Read Back Check) FORTRAN I/O • Check all written data • Return to MULT if RBC is not requested Operation: The RBCRT routine is entered from MULT when a cylinder has been filled and a seek is necessary or when all of the data in the I/O area has been written. If an RBC is not requested (RBC not zero) the routine exits back to MULT. If a check is required, the constant table is searched to determine the I/O area to be checked. A read IOCC is built using data saved from the call processing routine. The FORTRAN I/O routines are a part of Subroutine Library. These routines provide a link between the FORTRAN object program and the I/O devices. There are two versions of FORTRAN I/O - SFIO and SDFIO. • SFIO services non-disk I/O device; it supports standard and extended precision. • SDFIO services the disk I/O statements; it supports standard and extended precision. Section 6: Subroutine Library 127 Each of these versions has ten separate entry points. The entry mnemonics and major functions are: SFIO SDFIO SFIO SRED SWRT SCOMP - SIOI - SIOIX - SIOF - SIOFX - SIOAI - SIOAF - performs I/O initialization accomplishes a READ operation accomplishes a WRITE operation completes WRITE operation (if necessary) handles an integer, nonsubscripted element handles an integer, subscripted element handles a real, non-subscripted element handles a real, subscripted ele:ment handles an integer, nonsubscripted array handles a real, non -subscripted array SDFIO SDRED SDWRT SDCOM SDI SDrx SDF SDFX SDAI SDAF Device Routines There are 4 versions of the various device routines which perform the I/O functions. The version is denoted by the suffix added to the routine name. The suffixes are 0, 1, N, and Z. The suffix 0, 1, and N routines are general utility I/O routines. The suffix Z indicates a routine specifically designed to support FORTRAN programs. See the publication IBM 1130 Subroutine Library (Form C26-5929) for a detailed discussion of these various routines. Input Specifications The object time I/O requirements of a FORTRAN program are indicated in the FORTRAN control records which precede the source program at compile time. These control records are interpreted by the FORTRAN Compiler (see Phase 1 in Section 5: FORTRAN) and during compilation the calls and parameters needed to accomplish the I/O functions are inserted into the object program under a 'LIBF *FIO' (see Phase 2 in Section 5: FORTRAN) . FlO Call The calls and parameters inserted by the FORTRAN Compiler consist of a FORTRAN I/o initialization sequence and a table of calls (LIBF SFIO only) to the routines servicing the devices specified in the *IOCS control record. 128 Non-Disk LIBF DC DC SFIO TS LIBF DC SDFIO S B The first parameter follOwing the 'LIBF SFIO' denotes the trace device (T) if tracing is specified by an *TRANSFER TRACE or by an *ARITHMETIC TRACE control record and integer size and precision (S). S equals 4 or 6 if one-word integers are speCified by the *ONE WORD INTEGERS control records. S equals 7 or 5 if either extended or standard precision is specified by the *EXTENDED PRECISION control record or by the default condition' respectively. The second parameter contains the displacement (D), in words, to the next executable statement (the following I/O calls comprise a table rather than inline executed instructions). The SFIO entry to the non-disk I/O routine sets up the addresses and parameters which are needed by all the other entry pOints. At object-time the call to SFIO must be executed prior to any other I/O call (in fact the 'LIBF SFIO', or SDFIO if present, is made the first executable statement in the object program by the FORTRAN Compiler). If a call to SFIO or SDFIO is not executed or is preceded by a call to some other I/O entry point, the program will WAIT with /FOOI (non-disk) or /FI03 (disk) displayed in the accumulator. Pressing PROGRAM START will cause control to return to the Monitor. At the execution of a call to the SRED or SWRT entry point following execution of the call to SFIO, the call corresponding to the device specified in the SRED or SWR T call is located in the table of device routines. The SRED or SWRT routine then executes the call selected from the table. The called device performs its I/O function and returns to the SRED or SWRT routine. 1130 FORTRAN Non-disk I/O The 1130 FORTRAN non-disk I/O services a nondisk device. The Z suffix device routines are used to perform the I/O functions. Assuming that all devices were specified in the *IOCS control record, no tracing was specified, and extended precision was not specified, the I/O initialization sequence and calling table for an 1130 program appear as follows: LIBF DC DC SFIO 0005 12 LIBF DC LIBF DC LIBF DC LIBF DC DC DC LIBF DC WRTYZ 0 CARDZ 0 PRNTZ 0 PAPTZ 0 0 0 TYPEZ 0 (Typewriter) SIOFX/SIOIX (Card Read/Punch) • Sets real/integer type indicator. (1132 Printer) • Sets array element counter to 1. (Paper Tape Read/Punch) • Calculates address of this element. • Goes to the FORMAT scan. (Keyboard) SIOAF /SIOAI • Sets real/integer type indicator. • Places the number of elements into array element counter. • Sets address of the first element of the array. Summary of the 1130 FORTRAN Non-disk I/O • Goes to the FORMAT scan. The following descriptions summarize the entry pOints and FORMAT scan routines which comprise the 1130 FORTRAN non-disk I/O (see Chart FA). The ten entry points to the I/O routine are: SCOMP The position and order of the device routine calls are fixed; the calls are always separated by the 'DC 0'. If a device is not specified in the *IOCS control record, its corresponding call in the table is replaced by a 'DC 0'. • Checks REDO indicator. • Outputs the I/O buffer, if ON. • Checks the last format type for slash (/), if OFF. • Returns to the calling program, if slash found. • Outputs the I/O buffer, if slash not found. SFIO • Saves the address of the I/O call table. • Sets the integer length and trace device parameters. The FORMAT scan: SRED/SWRT • Sets the Read/Write indicator. FRMTS (F ORMA T Scan) • Sets the address of the FO RMA T statement. • Checks the REDO indicator; executes I/O, if on; gets next word from FORMAT, if off. • Sets the I/O unit number. • • Sets the I/O call from the call table. Checks for types E, F, I, and A; if one of these, checks that all items in the last list entry were processed; if so, returns to the calling program. • Reads a record and goes to the FORMAT scan or clears the I/O buffer and goes to the FORMA T scan. • Checks for types E and F, if all previous list items not processed; if one of these, saves decimal specifications. • Saves field width specifications. • Checks for E, F, I, A, X, and H types; checks for full I/O buffer; displays error code and WAITs, if full. SIOF/SIOI • Sets real/integer type L'ldicator. • Sets array element counter to 1. • Sets the address of the variable. SLASH • Goes to the FORMAT scan. • Sets REDO indicator on. Section 6: Subroutine Library 129 • • Moves the FORMAT pointer one position. • Sets the buffer pOinter to the beginning of the buffer. • Checks for the H-type; moves the FORMAT pointer one position and goes to the FORMAT scan if yes; decrements the array count and address of array storage and goes to the FORMAT scan if no. Goes to the FOR MAT scan. TYPIF (E, F, and I-type Formats) RDO • • Sets REDO indicator on. • Determines if the array is exhausted; returns to the calling program, if yes; goes to the FORMAT scan if no. Sets the FORMAT pointer to the beginning of the FORMAT statement. • Initializes the parameters following a 'LIBF FSTO' (floating store) or 'LIBF FLD' (floating load). • Goes to Decimal-to-Binary conversion routine (DEC2) if a Read operation. • Determines if storage mode is Real; loads Floating Accumulator if yes; loads accumulator and converts the fixed point value to a floating point val ue if no. Goes to the Decimal-to-Binary conversion routine (DEC2). GRPR1? (Group Repeat) • Moves the FORMAT pOinter to the backspace number. • • Increments the repeat counter. TYPA (A-type Format) • Checks for completed repeat; goes to the FORMAT scan, if yes; backspaces the FORMAT pointer and goes to the FORMAT scan, if no. • Calculates maximum number of characters per variable. • Gets storage address of A-type I/O area. • Truncate left-hand characters if A-type data exceeds the maximum specification; insert blanks if data fails to fill the input area. • Transfers EBCDIC characters - from storage to I/O buffer if a Write, from I/O buffer to storage, if a Read - until all characters are processed. F LDR~ (Field Repeat) • Increments the repeat counter. • Checks for completed repeat; moves to the next position of the FORMAT statement and goes to the FORMAT scan, if yes; backspaces the FORMAT pointer and goes to the FORMAT scan if no. TYPX (X-type Format) DEC2 (Decimal-to-Binary Conversion) • Increments the buffer pointer by positions specified in X-type. • Gets a character from the I/O buffer and increments the buffer pOinter. • Moves the FORMAT pOinter one position. • • Goes to the FORMAT scan. Determines if the character is one of the valid subset; displays an error code and WAITs if not. • Checks for a numeric digit; checks for an E (exponent) indicator; builds the binary exponent if E found; builds a binary mantissa if E not found. • Checks for a decimal pOint; increments count of a decimal digits if decimal found; checks for remaining characters. TYPH (H-type Format) • Sets the address of H data. • Transfers EBCDIC characters - from storage to I/O buffer if a Write, from I/O buffer to storage if a Read - until all characters are processed. 130 • Checks for duplication of the E (exponent) indicator, the sign, and the decimal point; checks for imbedded blanks; displays an error code and WAITs on any of these conditions. loads the number with leading blanks, if necessary, if data does not overflow. • Outputs mantissa sign and rounded number if I -type format. • Outputs integer portion of the number. DEC 50 +5 (Process Binary Built Mantissa) • Checks if the mantissa equals 0; stores zeros to the the Floating Accumulator if yes. • Adjusts for the exponent; normalizes the number. • Checks if the mantissa sign is negative; stores the number in negative form in the Floating Accumul ator if yes. • • Checks if the exponent is greater than 250 or less than 0, stores the number in the Floating Accumulator if not; displays an error code and WAITs if yes. Checks if the mode of data is Real; stores the Floating Accumulator at the storage address if yes, truncates the number in the Floating Accumulator at the decimal point and stores the resultant integer at the storage address if not. • Decrements the storage address and array counter. • Increments the FORMAT pointer and goes to the FORMAT scan. BINRY (Binary-to-Decimal Conversion) • Outputs decimal point and fractional portion also if not I -type format. • Outputs' E', sign, and exponent if E-type format. • Decrements the array count, increments the FORMAT. pointer, and goes to the FORMAT scan. 1130 FORTRAN Disk I/O With the exception of SDFIO, SDRED and SDvVRT, all calls to the FORTRAN disk I/O entries are identical to their counterparts in the FORTRAN non-disk I/O routines. The exceptions are: SDFIO The calling sequence is: LIBF DC SDFIO S where S is a parameter specifying integer size and precision. Through SDFIO initialization, this parameter governs the number of words per element to be moved via the real and integer entries. • Calculates the working buffer size. • Stores the Floating Accumulator in the work area. • Checks for sign; initializes to process positive or ne gati ve number. LIBF SDRED • Checks for zero number; zeros out the exponent if yes. DC DC FILE REC SDRED and SDWRT The calling sequence is: • Checks if the exponent is greater than or less than 128; normalizes the binary mantissa, forcing the exponent to the base 128. • Checks for an E-type format; sets the exponent sign and converts the exponent to 2 decimal digits if yes. • Compares the data length with the field width; loads the buffer with asterisks if data overflows; (or SDWRT for WRITE operation) where FILE is the ID of the disk file to be read or written (the file must have been defined by a DEFINE FILE statement) and REC is the record number within the specified file to be read or written. FILE and REC actually contain the addresses of the locations containing the required information. All disk data is stored in binary; therefore, knowledge of the type of variable (integer or real) is necessary only to determine the number of words to be moved. Section 6: Subroutine Library 131 SDrx -'-- The following descriptions summarize the entry pOints and other major areas within the FORTRAN disk I/O routines. • • Sets integer flag. SDFIO • Fetches word count for integer variable. • Checks and initializes integer precision. SDAF • Checks and initializes standard or extended precision for real variables. • Sets real variable flag. • Sets indicator showing SDFIO has been called. • Obtains number of elements to be moved from calling sequence. SDRED • Picks up word count for each element. • • Sets read indicator. SDAI Enters SRED1. • • Sets integer variable flag. • Gets integer size. SDWRT • Sets write indicator. • Goes to SREDl. Gets subscript from calling sequence. Gets number of elements to be moved from calling sequence. SREDl SDCOM • Sets exit to the calling program. • Goes to DUFIP to perform final disk write. • Verifies that SDFIO has been called. • Initializes total number of files for this job. • Searches file table for specified file. • Issues error condition if file not found. SDF • Sets real variable flag. • Picks up word count for real variable. DFND • Gets starting sector address of specified file. • Checks for valid record number. • Calculates sector containing specified record. SDFX • Sets real variable flag. • Picks up subscript from calling sequence. RECOK • Obtains word count for real variable. • Sets up associated variable. • Calculates position in sector of the record. SDI • Sets integer flag. DIO • Obtains integer size. • 132 Clears REDO switch. • Sets forced read for initial call to disk (if call is a WRITE, a read must first be given to preserve data that should not be altered. MOVE • Checks for full buffer, if yes set REDO and go to DUFIP. • Checks for full record, if yes, move position pointer to next record, increment associated variable by one, and return to beginning of MOVE. • Sets up move of variable, one word at a time, until variable is moved. If READ, move from buffer to LIST area. If WRITE, move from LIST area to buffer. • Reduces variable count, when zero, exit. DUFIP • • • • • Performs call to disk I/O routine. Sets proper function parameter for next call. Checks REDO. If ON, returns to do a read. If OFF, checks count, if zero - exit, if not zero - go to MOVE. Section 6: Subroutine Library 133 SECTION 7: SYSTEM LOADER/EDITOR FOR THE 1130 MONITOR SYSTEM ----------- The primary function of the System Loader/Editor is to load a disk pack with the programs and subroutines necessary to build a working Monitor System which is based upon the user's hardware configuration and individual requirements. During an initial load operation, the System Loader/ Editor controls placement upon the disk of the Supervisor, DUP, the FORTRAN Compiler, the Assembler program, and the Subroutine Library. During system load, a set of user-supplied control records causes deletion (bypassing) of progr~ms and/or subroutines not desired or not usable by the system. By means of the Load Mode control record the user can request that the Assembler and/or FORTRAN not be loaded. Accordingly the location of buffer areas, tables, and subroutine storage on the disk is shifted so as to provide as much Working Storage as possible. The System Configuration Records specify to the System Loader/ Editor (1) the devices present in the System and (2) the Interrupt Level Subroutines (ILS) and Interrupt Service Subroutines (ISS) to be included in the system pertaining to the specified devices. As the storage locations of the FORTRAN Compiler and the Assembler program (if loaded) are established, the System Loader/Editor initializes the Commlmications Area (COMMA) with their starting addresses. The location of the Core Image Buffer (CIB), Location Equivalence Table (LET), User Area (U A), and other information contained in COMMA is also initialized by the System Loader/Editor. After the system programs are on disk, control is transferred to DUP to load the subroutines and update COMMA and LET. System Reload In the event that the user wishes to reload the Monitor System programs (not including the Subroutine Library), the System Loader/Editor can perform a reload operation. This is controlled by a control record (Load Mode control record) inserted by the user in the System Loader/Editor following the last record of Phase E1 and preceding the first record of Phase E2. Bits 14 and 15 of the first 16-bit binary word of the Load Mode control record must call for exactly the same Monitor System programs to be 134 stored as were present just prior to the initiation of the reload operation. During a reload operation, only the Supervisor (excepting COMMA), DUP, the Assembler program, and the FORTRAN Compiler are replaced upon the disk. If the Assembler program and/or the FORTRAN Compiler were not loaded during initial loading, they cannot be loaded during a reload of the Monitor system. Also, if the Assembler program and/or the FORTRAN Compiler were deleted by DUP after the initial loading, they cannot be loaded during a reload of the Monitor System. SYSTEM LOADER/EDITOR INPUT The 1130 Monitor System is available in either card or paper tape versions, ready for loading by the System Loader/Editor. The card version is supplied in a continuous card deck (see Figure 17), whereas the paper tape version is supplied in nine separate paper tapes which comprise the system (see below, Paper Tape Input). User-Supplied Input The user supplies to the System Loader/Editor the Load Mode control record and the System Configuration records. These records are generated by the user when the input is in card form. When the input is in paper tape form, the user simply selects the proper Load Mode and System Configuration tapes from the IBM-supplied set (see below, Paper Tape Input). The Load Mode control record indicates to the System Loader/Editor whether an initial system load or a system reload is to be performed. This record also carries the indicators to the System Loader/ Editor which cause bypassing of the Assembler program and/or the FORTRAN Compiler during system loading. This record is inserted between Phases El and E2 of the System Loader/Editor (see Figure 17). The System Configurat.ion records (SCON, REQ, and TERM) indicate to the System Loader/Editor the devices that are present in the system and their associated interrupt Branch addresses. Using these indicators, the System Loader/Editor loads only those Interrupt Level Subroutines (ILS) and Interrupt Service Subroutines (ISS), that are required in the system. These records are inserted immediately following Phase E2 of the System Loader/Editor (see Figure 17). See the publication IBM 1130 Monitor System Reference Manual (Form C26-3750) for a detailed description of the format and use of these usersupplied records. IBM-Supplied Input The following is a list of the IBM-supplied programs and control records which comprise the System Loader/Editor, excepting the User-supplied input (see Figures 17, 18, and 19). 1. The bootstrap loader and Phase E1. The bootstrap loader is comprised of the first six cards of Phase E1 in card form. The initial records of Phase E1 in paper tape form are the same bootstrap loader. ILS04 ILS04 ILS03 Figure 17. Organization of System Loader /Editor Input *EDlr I LSOO Figure 18. Loader /Editor Control Records Section 7: System Loader/Editor, 1130 Monitor System 135 Loader/Editor to load the following phase or routine at a sector boundary. Format (in 16-bit binary code) Word 1 - non-zero indicates that the phase to follow involves either a print device or an I/O device bit 0 off = I/O device involved (paper t ape or card) bit 0 on ~ print device involved (Console Printer or 1132 Printer) valid codes for word ~ include: 0001 =1442 card read/punch involved in phase 000 2 = paper tape I/O involved in phase 8001 = Console Printer involved in phase 8002 = 1132 Printer involved in phase Word 2 unused Word 3 type code; hexadecimal 0100, 0200, or 0900 Words 4-60- unused 1 ISS Deck Leod Record L - -_ _ _ _ _ _ Figure 19. 2. 3. 4. 5. 6. 7. ISS Subroutilles Phase E2. The Monitor System programs: the Supervisor (including COMMA), DUP, the Assembler program, and the FORTRAN Compiler. The Loader/Editor control records. The ISS subroutines. The Subroutine Library. The Load Mode control records and System Configuration records for paper tape systems (see below, Paper Tape Input). 02 04 08 08 09 OA OF 10 12 Within the System Loader/Editor input, the following control records are found. They are listed by type code. The leftmost eight bits of binary word three of each control record contain the type code. Type Code 01 136 Sector Break Record (absolute sector address) This record is found within the Monitor System programs. It instructs the System Sector Break record (sector address relative to the last sector with data) *STORE DUP control record *EDIT special DUP control record / / DUP Monitor control record Sector Break record (sector address relative to the last sector address established by a type 01 control record. Data (relocatable binary) record End-of-program (type F) record Load Mode control record (see Usersupplied Input. ) FORTRAN Comoiler lead record This record precedes the FORTRAN Compiler and indicates to the System Loader / Editor that the FORTRAN Compiler has been reached. Format (in IBM card code) Cols. 1-4 FORT Cols. 5-72 unused 13 ISS program lead record This record carries the ISS number of the following ISS subroutine used by the System Loader /Editor in determining whether to load the following ISS subroutine. Format (in 16-bit binary code) Words 1-2 - unused Word 3 type code; hex 1300 Word 4 ISS number (1,2,3,4,6, or 7) of following ISS Words 5-60- unused 14 - 20 40 TERM record (a System Configuration record; see User-supplied Input.) REQ record (a System Configuration record; see User-supplied Input. ) Assembler program lead record This record precedes the Assembler program and indicates to the System Loader/ Editor that the Assembler program has been reached. Format (in IBM card code) Cols.I-3 SAP Cols.4-72 unused 42 Supervisor program lead record This record precedes the Supervisor program (follows COMMA) and indicates to the System Loader/Editor that the Supervisor program has been reached. Format (in IBM Card Code) Cols. 1-4 SUPV Cols. 5-72 unused 81 Format (in 16-bit binary code) Words 1-2 - unused Word 3 - type code; hex 8600 Words 4-60 - unused Paper Tape Input Paper tapes are provided by IBM which correspond to all the standard paper tape-disk system configurations and loading combinations. The appropriate System Configuration tape is to be selected by the user from the set furnished. The tape should be chosen which contains in its header a list of those devices which the user has in his system. A Load Mode tape is to be selected to meet the user's requirements. During an initial System load, 7 to 9 tapes will be loaded depending upon whether the FORTRAN Compiler and/or the Assembler program tapes are included in the load. Tapes 1 through 8 contain binary data and all records, except the bootstrap loader section of tape 1, are preceded by a word count. Tape 9 contains a combination of binary records with word COWlt and control records. Each control record beginning with / / b or * is preceded by a new line (NL) character and is ended by an NL character. The data between NL characters is in PTTC/8 code. No word count is present. In binary control records (those not beginning with / /b or *) there are no NL characters. End of last system program record Tape #= This record follows the last Monitor System program and precedes the Loader/Editor control records. Format (in 16-bit binary code) Words 1-2 - unused Word 3 - type code; hex 8100 Words 4-60 unused 84 86 - SCON record (a System Configuration record; see User-supplied Input). End of last ISS program record This record follows the *EDIT control record following the last ISS subroutine. It precedes the Subroutine Library programs. The System Loader/Editor does not analyze any ISS records other than the ISS program lead record (type 13) of each ISS subroutine and the End record (type 86) following the last ISS subroutine. I 1 2 3 4 5 6 7 8 9 Contents The bootstrap loader and Phase E1. Load Mode control record (IBM supplies a separate tape for each possible Load Mode combination; the user must select for loading the number 2 tape that matches his desired load mode). Phase E2. System Configuration records (IBM supplies a separate tape for each possible configuration; the user must select for loading the number 4 tape that matches his desired configuration) • The Supervisor. DUP. The FORTRAN Compiler. The Assembler program. System Loader/Editor control records, the ISS subroutines, and the Subroutine Library. Section 7: System Loader/Editor, 1130 Moniter System 13 7 GENERAL DESCRIPTION Two phases comprise the System Loader/Editor, Phase E1 and Phase E2. On cards, Phase E1 can be identified by "E1" in columns 73-74 of the deck and Phase E2 by "E2" in columns 73-74. The program is organized to operate within 4095 words of core storage and will not use any location above OFFF. To successfully load the Monitor System, the user must supply a Load Mode control record and the System Configuration records (see above, User-supplied Input). -----NOTE: The following descriptions of Phases E1 and E2 assume the input to be in card form. However, the processing for card input is identical to that for paper tape input, except as noted under Paper Tape System Loader~ Phase E1 Phase E1 of the System Loader/Editor is read into core by a 6-card bootstrap loader (RLB). The bootstrap loader occupies locations /0000 through /005D and /OE50 through /OF24. Phase E1 is loaded into locations /0028 to approximately lOA 70. When execution of E1 begins, the first card to be read should be the type 10 (hexadecimal) Load Mode Control Card which the user has placed between decks E1 and E2. If the Load Mode card is missing, an error message will be displayed on the Console Printer and the program will stop~ If reload is specified, Phase E1 compares control record data with certain information in COMMA to determine if a reload is possible. In processing with either an initial load or a reload, Phase E2 is read and stored in sectors /0630 through /063A of disk Working Storage. The System Configuration records which follow E2 are read by E1 and stored in the E1/E2 Communications Area that will be used by both phases and updated as loading operations are executed. When the SCON card is read, E1 clears the area into which REQ card data will be stored, and sets a switch (P AK) so that the REQ cards will be read into an 80 word card buffer without packing to 60 word format. As each REQ card is read, the program will branch to a routine (CONVT) which will convert the IBM card code to binary and store the result in table CFTA. Each card is stored next to and following the previous one in the table. More than six cards will result in an error message. When the TERM card is read, E1 will search through table CFT A checking each number from each card for validity and at the same time will build 138 another table (AUXT2) whose words correspond to Interrupt Branch addresses. The words which correspond to IBAs that will be used are set positive, while those that will not be used remain zero. When the tables are finished, they are written to disk sector /0632 and control branches to routine LDPT2 to load E2 to core. Nine sectors will be loaded to core and will occupy locations /03C2 to /OF02. Control will exit from E1 and enter E2 at location /0504 (INIT2). Phase E2 At SET10 Interrupt Branch Addresses will be reset to link with the ILS routines in E2. At SETDT, defective disk track data (originally from DPIR) will be set in the DISKO routine of E2. Two additional sectors (/0630 and /0631) will then be read from disk into core to complete the overlay. From the REQ card data assembled by E1, two words will be set up at locations /047C and /047D which will reflect the principle I/o and principle print devices, respectively. During the system program load, if data is present in word 1 of a sector break card, that data will be compared with word /047C or /047D and that phase will be bypassed if no match occurs. If an initial load is to be performed (determined in LDMDD subroutine), reading of the system program decks will commence. If a reload is to be performed, sector 8 (COMMA) will be read into the disk buffer labeled BUFFI. If the FLET entry in COMMA is not zero, it will be stored in the word called CIBA in E2. If FLET is zero, the CIB address from COMMA will be placed in CIBA. During loading of the system programs, an error will be displayed if any sector requested to be loaded is numbered as high or higher than the contents of CIBA. The words in COMMA which indicate whether or not the FORTRAN Compiler is on the disk and whether or not the Assembler Program is on the disk will be checked and compared with the type of load requested by the Load Mode card. If the reload is to be different from the present status of the disk pack, an error message will be displayed. If no error in the Load Mode card is detected, a switch (SPVSW) is set on (non-zero) which results in the System Loader/Editor passing all system program cards until the SUPV card is encountered. This will be located in the system deck beyond those data cards which comprise sector 8 (COMMA). Beyond the SUPV card, loading will progress until the· FORT card is encountered. During either an initial load or reload, the Load Mode card (which has been saved at MODCD) is tested to see if the FORTRAN Compiler should be loaded. If not, switch A (SWA) is set positive and all subsequent cards will be bypassed until the SAP header card is read which turns SWA off (to zero). In like manner, MODCD is tested to see if the Assembler program should be loaded. If not, all cards will be bypassed until the type 81 End of System programs card is reached. At the time the SAP card is read, an indicator (SAPX) is set on. When the first data card of the Assembler program is processed, the SAPX indicator will cause a branch to subroutine ASMCK. If the FORTRAN Compiler was not loaded and the Assembler program is to be loaded, the beginning sector address will be forced to /0080 with the constant ADRF. Normally the FORTRAN Compiler starts at sector /0080 and the Assembler program at /00E8. During card to disk loading of any system program, if a sector break card is read which contains data in binary word 1, that phase involves some kind of I/O device and is to be loaded only if the device represented in the break card is equivalent to the principle I/O device of the system in the case where the code in word 1 refers to I/O devices. If the code refers to a print device, the phase will be loaded if the print device indicated is the prinCiple one of the system. otherwise switch B (SWB) will be set on (non-zero) and cards will be passed until a sector break card is reached. SWB is then set off (to zero) and sector break processing starts again. In cases where the system includes both card I/O and paper tape I/O, the prinCiple I/O device is interpreted to be the card read/punch. If an 1132 Printer is present with the Console Printer, the 1132 Printer is interpreted to be the prinCiple print device. This is reflected in COMMA (sector 8). Each time that a sector break card is read, the data-card check-sum routine (CKSR) is reset so that the data cards following the sector break card may begin with any sequence number. All subsequent data cards must then be in sequence until the next sector break card or an error message will be displayed. As the system programs are loaded to disk, the highest sector number used is saved so that the Core Image Buffer (CIB) can be positioned at the first available cylinder beyond the last sector used. When the End of System programs card (type 81) is read, the System Loader/Editor will branch to ENDSY and test the load mode. If a reload is being performed, E2 will be cleared from disk Working Storage (WS) and operations will halt at OFFF. No more records will be read. COMMA will remain as it was when the reload began. If an initial load is being performed, control will branch to LDSKL to load the Skeleton Supervisor from disk to lower core. At MILS in the System Loader / Editor the data in table AUXT2 will be used to generate for COMMA a code representation of the devices (see discussion above of principle devices) present in the system. The two words required are placed in core locations /0060 (principle print) and /0061 (principle I/O). If the FORTRAN Compiler was loaded, the beginning sector address will be placed in location /004A and if the Assembler program was loaded, its beginning sector address will go to /004B. If no program was loaded, the corresponding locations will contain zero. Core size of the CPU will be stored in /007E. The CIB address (described above) will be placed in /004D and 3 cylinders will be reserved following that address. The address of FLET is set to zero and placed in /004F. The sector address of LET in /0050 will be 3 cylinders greater than the sector address of CIB. The User Area (UA) , Working Storage Base and Working Storage Adjusted sector addresses will be equal and one cylinder greater than the address of LET. This value will go to locations /0051, /0052, and /0053. The UA sector address is converted to a disk block address and stored in locations /0058 and /0059. /0005 is stored in locations /0056 and /0057. Before this data is established on the disk, the 320 word buffer (BUFFI) is cleared to zero and the fourth word following the sector address is initialized to /013B. This buffer is then written to disk at the LET address established. The region in lower core starting at location /0028 and extending 320 words is written to sector 8 (COMMA) of disk at REST8. Control goes next to MFILS where the highest level ILS that the system will require is generated. To determine what ILS is to be built first, and how many will be required in all, the AUXT2 table is entered and the first word containing a positive number will correspond to some IBA which in turn corresponds to some interrupt level. When such a word is found, it will be set negative to indicate that it should be ignored next time. In core is a basic framework for single device ILS routines and a multiple ILS routine. If the configuration deck contained a device which is on level 0 or level 4, an indicator (SETMI) is set which will cause ILS04 to be the last ILS routine generated. If the positive word found in table AUXT2 corresponds to an IBA less than 12, the disk format header of the single device ILS frame will be set up to match the ILS under construction. SL W13 will be loaded with the level number. The ILS name, in truncated EBCDIC, will be loaded at SLW11. Data required by the DSF and Core Image Loader will be entered at CILO (the first word of the ILS). The area code will be loaded to CILA. Disk System Section 7: System Loader/Editor, 1130 Monitor System 139 format indicator words are included as constants at the appropriate places in the framework. When the ILS is finished, sector S (COMrvrA) is read from disk so that the current Working Storage address may be determined. The ILS is then written to disk at that address. If this is the first ILS that has been built, the next card in the hopper will be *EDIT •••••••••• ILSOO. When this card is read, control will branch to EDITC where an indicator (FILS) will be tested to see if the Supervisor has been called. If it has not, control will go to the Supervisor provided that the cards in the hopper match the ILS that has been built. This is determined by testing columns 24 and 25 of the *EDIT card. If they do not match the name of the manufactured ILS, cards will be passed until the System Loader/Editor stops at an *EDIT card whose name field does match. At this point the next card in the hopper will cause the Supervisor to call in DUP, which will in turn read the next card. The record which DUP reads will be of the type *STORE ••••• WS •• UA •• ILSXX where XX represents the correct name of the ILS in Working Storage. After the Supervisor has been called once, indicator FILS will be set to zero and thereafter the System Loader/Editor will transfer control directly to DUP Control (DCT!..) at /027C after positioning the correct *STORE card in the hopper for DUP to read. When each DUP Store operation is completed, DUP will read a special control card (*EDIT) which will cause it to reload the System Loader/Editor to core from location /03C4 upward. DUP will then send control to /03C4 where a long BSC will send control to the System Loader/Editor at NEWIL. The System Loader/Editor will continue to search table AUXT2 until no more positive words can be found. The re-entry point from DUP will then be set to point to ISSDK since the next processing operations will involve ISS decks. When the last required ILS has been stored, the System Loader/Editor will encounter a lead record (type 13) ahead of each ISS routine. The System Loader /Editor will compare the ISS number of the following ISS subroutine with the System Configuration data and will either bypass the ISS subroutine or call DUP to load it to the User Area. When the last ISS subroutine has been processed, a control record (type 86) will signal the System Loader/Editor to clear itself from disk Working Storage and transfer complete control to DUP to load all remaining subroutines. 1130 Paper Tape System Loader/Editor A special paper tape reading routine is employed in place of CARDO and some differences, to be explained, exist in the way the input buffer (B) is filled. Other- 140 wise, all input record processing and program logic is no different from the card system. In the paper tape system all binary input data goes directly into buffer B rather than first being read into buffer A and then compressed into buffer B. Upon entering the paper tape reading routine at PAPOO, buffer B is cleared and bit 5 of the tape reader DSW is tested. If not ready, routine will wait at /OC35. If ready, the first frame will be read. At PAP60, an indicator (PAK) will be tested to determine if the record should be in binary or in PTTC/S format. If binary, control will go to P AP62 where the first frame will be treated as a word count provided that it is not a blank or a delete code. If the first frame contained a word count that was not zero, negative, or over /003C, the quantity of words indicated will be read into buffer B (two frames per word) and control will branch to CARD1 for record processing. PAK will be set to zero (binary) throughout loading of the system programs. When the type 81 record which precedes the Subroutine Library is read, PAK will be set to 1 to cause the next input record to be read in PTTC/S mode. In such a case, control will branch to that section of the paper tape routine labelled PAP61. Since each record in PTTC/S code begins and ends with a new line (NL) character, the first NL character will be ignored and the last NL character will be interpreted as the end of the record. As each PTTC/8 character is read in, a table, whose ending address is TABLE, is searched to find the binary equivalent of the frame, had the control record been in binary instead of PTTC/S. Not all characters are included in the table because the System Loader/Editor requires only those parts of control records which would be found in columns 3, 4, 24, and 25 of the same records on cards instead of tape. The data gathered is placed in buffer A (as if it had come from a binary card) and when the ending NL character is reached, control branches to a routine called STUFF which packs the data from buffer A to buffer B. The binary data in buffer B is then processed at CARDl. When the System Loader/ Editor finishes the last ILS control record which it will read, PAK is set back to zero. The next record is an ISS control record (type 13) in binary format. If it is determined from this record that the following ISS should be loaded, PAK will be left at zero and control will branch to DUP at /027C. If the ISS is to be bypassed, PAK will be set to 1 since the next control record will be in PTTC/S code (*STORE ••••• PT. e UA •• XXXXX). After this record is read, PAK will be reset to zero and binary records will be read until the End of program (type F) record is reached. At that time, PAK is reset to 1 so that the next control record (*EDIT ••••• ) is read in PTTC/8 mode. PAK is then set to zero again in anticipation of a type 13 binary record. After all of the ISS programs are processed, the, System Loader/Editor will clear itself from the disk and turn over complete control to DUP to load the remainder of the Subroutine Library. During a reload operation, the System Loader / Editor will expect to find the SUP V binary control record within the first twenty records following the TERM record. If it is not found, a tape has been placed on the reader out of sequence. Error message 3 will be displayed. Bootstrap Loader / 005D / OE50 / OF23 / 0028 / OA65 / OE50 / OF23 Core Allocation Summary Figure 20 reflects core after the bootstrap loader (the first six records of Phase E1) is in core. Figure 21 reflects core between the reading of type F record of Phase E1 and the reading of the last REQ record of the System Configuration records following Phase E2. When the TERM record is read, Phase E2 is loaded from disk to core as in Figure 22. After sector /063A has been read from disk, control is transferred to Phase E2 at location /0504 and sectors /0630 and /0631 are read to core as shown in Figure 23. During reload operations, the core map remains as in Figure 23. End of reloading occurs when the type 81, end of last system program, record is read. During an initial load, the Skeleton Supervisor is read from disk to core after the type 81 record is read. Figure 24 reflects core until the System Loader/Editor branches to location /0038 to call the Supervisor. At this time one of the ILS control records beginning with / /b will be the next record to be read. The data from the System Configuration records is used to determine which of these records the Supervisor should read so that DUP in turn reads an *STORE record which contains the ILS name which matches the ILS routine that the System Loader/Editor has placed in Working Storage. (See Figure 1 in Section 2.) Mter the Monitor control record (with / /b DUP) is read, DUPCO is loaded, and control is transferred to it. DUP reads a STORE record and reads from disk to core whatever DUP phases are necessary to perform the STORE function. Figure 8 (Section 3) reflects core until DUP completes the STORE operation and reads the *EDIT record which follows each *STORE record in the ILS group. The *EDIT card causes DUP to load the System Loader/Editor from disk to core as in Figure 25 and to branch to location /03C4. Bootstrap Loader (cont'd) Figure 20. The Bootstrap Loader Phase El Bootstrap Loader Figure 21. Phase El Section 7: System Loader/Editor, 1130 Monitor System 141 / 0028 / 0028 / 0272 / / 037F 03C2 / OEEF / 0028 Skeleton Supervisor Phase E1 Phase E2 / 03C2 Phase E2 Phase E2 / OEEF Figure 22. Phase E2 - Part I ~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _---1 Figure 24. Phase E2 with the Skeleton Supervisor /0028 Phase E1 /0100 Skeleton Supervisor E2 / 0272 / 037F / 03C2 / 03C2 Phase E2 Phase E2 1--, DUPCO /OEEF / Figure 23. Phase E2 - Part II 142 Figure 25. Phase E2 with DUPCO 1000 When the System Loader/Editor again needs DUP to perform a STORE operation, records are passed as necessary by the System Loader/Editor until an *STORE record is the next record to be read. At this time, a long BSC is performed to location /027C and DCTL overlays core, as in Figure 8, with those phases necessary to store the ILS routine. When the ILS routines have been stored, the System Loader/Editor (read into core by DUP at the end of each STORE function) te sts for the type 13, ISS deck lead record. The System Loader/Editor remains in core (Figure 25), reading cards until an ISS subroutine is reached that should be put on the disk. At this time, a branch to DUP is executed and DUP is again brought into core (Figure 8). At the end of the last ISS deck, a type 86, end of last ISS program record causes the System Loader /Editor to clear itself from the disk and branch to DUP. For the remainder of the subroutine storing operations, DUP is in complete control (Figure 8). This area contains tables AB, AC, and CFTA, an image of the Load Mode control record, prinCipal print and input/output device information, and various other indicators. Primary Program Entry POints/Labels Phase Name/Label El & E2 SETI0 El & E2 START El MODE El SETDT E2 ABSOR ROUTINE DESCRIPTIONS This section describes the principal subroutines, entry points, and tables within the System Loader / Editor program. In addition, other subroutines and areas referenced by the program are described. All references are in terms of labels/symbols used on both the flowcharts (Charts FB, FC, FD, and FE) and the program listings. To examine a specific portion of the program, the user can: 1. 2. Find the area of interest on the logical level flowchart. Use an identifying label/symbol from the flowchart as a cross -reference to both the entry point descriptions (contained in this section of the manual) and the program listing. The program listing, with its descriptive notations or comments, provides a step-by-step analysis of all areas of the program. El/E2 Communication Area During analysis of the System Configuration Records furnished by the user, Phase El sets up information in a region located at approximately /03C2 - /0502 in core. To preserve this information when core is overlaid by DUP, the area is written to disk storage before each DUP operation during ILS and ISS loading. Updating of the El/E2 Communications Area on disk is done when necessary by the System Loader/Editor. Function and/or Description Initializes Interrupt Branch Addresses for the ILS routines which are part of the System Loader/Editor. Entrance to record read routine. On the card system, CARDO is used. Performs checks on the Load Mode control record and sets up indicators in the El/E2 Communications Area. Picks up defective track information whi.ch Disk Pack Initialization Routine (DPIR) has written in sector zero, and stores it in both the El disk routine and in the E 1/ E2 Communications Area. An attempt is made to confirm that DPIR has been executed. If it definitely has-not been executed, an error message is displayed and program will halt. One of several entry points in routine which loads system programs to disk. Sector addresses are established in one of three ways, depending upon the type of Sector Break control record processed. Ordinary data will start at the beginning of a sector and will progress until that sector is filled. The completed sector will then be written to disk and the next successive sector read down. Record information may overlay all or part of the sector being IJrocessed. This will continue until the program is loaded or until a Section 7: System Loader/ Editor, 1130 Monitor System 143 Phase E1 E1 & E2 E2 E2 144 Name/Label Function and/or Description Phase Name/Label Function and/or Description E2 IOCSD SCON Sector Break record is read and a new sector address is established. Clears area in which "AB" E2 CLEDT Mter completion of the last ILS storing operation, the ISS Subroutines will be encountered. Each of these is preceded by a control record (type 13) which contains the ISS number common to the routine. If the number is not among the REQ card data, the routine will be bypassed since no device is present in the user's system which can handle it. If it is a usable routine, control will be transferred to the segment of DUP which remains in lower core. DUP will then store the ISS subroutine and reload the System Loader / Editor to core. A control record following the last ISS routine will signal the System Loader/ Editor to clear itself from disk and transfer complete control to DUP. All remaining subroutines will then be loaded and final updating of COMMA will be under DUP control. LDPT2 INIT2 LDMDD and "AC" auxiliary tables will be built and feeds control to routine labelled "CONVT" which will accept IBM card code and convert it to binary. The DCBIN conversion routine is used in this operation. Converted information from the REQ System Configuration records is then stored in CFT A tables of the E1/E2 Communications Area. Reads down sectors from disk as directed by three initialized control words: SCNUM is the address of the first disk sector to read from. PGL TH is the number of sectors to be read. HXCFG is 2 less than the core location to read into. When E2 is loaded to core from disk, either by E1 or DUP, INIT2 will be branched to via the E1/E2 Communications Area. Interrupt branch locations in core will be set with the ILS routine addresses in E2 and control will go to LDMDD. Loading of system programs will begin in the case of an initial load. For reload, those records which could change COMMA are bypassed and the system load is started when a SUPV control record is reached. This control record immediately follows that part of the Supervisor which constitutes COMMA. Additional Referenced Entry Points /Labels Phase Name/Label Function and/or Description E1 & E2 A E2 ABC E1 & E2 AC E1 & E2 B 80-word buffer into which records are read by card or paper tape input routine. Switch testing routine entered at the time a Sector Break card is read. Its purpose is to determine if a phase should be bypassed or loaded. Start of a table setup by E1 which contains IBA information. 6o-word buffer area that, if used, contains information Phase El & E2 Name/Label BASE El & E2 BUFFI El & E2 B4HEX El & E2 CARD El & E2 CFACT El & E2 CFTA El & E2 CFTAL El & E2 CILA El & E2 CILO El & E2 CKSR E2 CLDUP E2 CZ El & E2 DSKAD Function and/or Description from Buffer A in compressed format. Contains sector address established when last absolute Sector Break card was read. Address of the start of main buffer used in disk operations. Subroutine which will convert limited set of binary characters to EBCDIC , code. Determines type of record read by testing word 3. Correction factor used during system load which results in the first loadable data word following a Sector Break record being placed at the start of a sector. Table where System Configuration records are stored after converting their contained data from IBM card code to binary. Number of complete records stored in CFT A table. Word in the single device ILS framework where the area code is placed. ILS information for the DSF and Core Image Loader. Checksum routine. ControIs are reset after each Sector Break card so that record sequence breaks can be tolerated between loaded phases. Sequence which will transfer control to DUP Control (DCTL). Routine to determine core size for COMMA using "wrap around" method. Word in which number of current sector to be written to is maintained as loading progresses. Phase Name/Label Function and/or Description El & E2 EDIT El & E2 EOP El & E2 ERROR E2 FORTT El & E2 FORTX E2 HIGH E2 IBANO El & E2 ICNTR E2 INLET El & E2 ISW E2 will be loaded from disk to the location equated to EDIT when required. DUP also contains this address. Branch point when a type F record is read. A file operation is initiated at this point so that the probably unfilled in-core buffer is written to disk. When a disk error occurs, an indicator is set and control is returned to the disk routine to turn off the interrupt level. Upon exit from disk routine, the indicator is interrogated and if on, an error message is typed and program stops at a WAIT instruction. If PROGRAM START is pushed on the console, a retry of the same operation will be initiated. Compares new and old (in COMMA) FORTRAN Compiler address during a reload operation. Indicator which communicates from the Load Mode record to E2, indicating whether the FORTRAN Compiler is to be loaded. Routine which saves the highest disk sector number loaded during system load. Later used to establish the CIB address and others in COMMA. Word which indicates what interrupt branch address is being processed during ILS generation. Contains contents of word 1 from data records. Routine to set up the sector which will contain LET following proper initialization. Used as a "busy" indicator for the Console Printer routine. Section 7: System Loader/Editor, 1130 Monitor System 145 Phase Name/Label Function and/or Description Phase Name/Label Function and/or Description E2 JADK Used in preparation for calling DUP to establish the core location that sector 9 of the Skeleton Supervisor will be loaded to. Routine to load the Skeleton Supervisor to lower core. This includes sectors 8, 9 and A. Image of the Load Mode control record. Routine to restore updated table and the E1/E2 Communications Area to disk. Routine to write initialized COMMA (sector 8) to disk. Compares new and old (in COMMA) Assembler program addresses during a reload operation. Indicates to E2 whether the Load Mode control card requests that the Assembler program be loaded. Indicator set on at each Sector Break record; it causes following data record to recei ve special processing. Indicator that will cause generation of ILS04 routine if set on. E2 SLW13 E2 SPPAS E2 SPVSW E1 & E2 DISKO E1 & E2 WBSKT E2 WD25A E2 WS Word in single device ILS routines corresponding to the level number. Routine to pass all records except type 13. Switch to bypass COMMA region of Supervisor. Routine to wait for completion of disk operation. Double word in loading routine which in leftmost 16 bits will contain indication of whether record information is to go to current sector. Rightmost 16 bits will contain relative word location within the sector. Used to advance records, if necessary, to the point where DUP will receive a STORE record containing a name which matches the name of the ILS routine to be stored. Routine to pick up current Working Storage address from COMMA before an ILS routine is written to disk for transfer by DUP to the User Area. E2 LDSKL E1 & E2 MODCD E2 REST E2 REST8 E2 SAPP E2 SAPX E1 & E2 SCTRI E2 146 SETMI The 1130 Disk Monitor System Maintenance Program (IBMOO) is the program by which the user updates the 1130 Disk Monitor System. The program IBMOO is a part of the IBM-supplied 1130 Disk Monitor System. With it~the user can update the Supervisor, Assembler, DUP, and FORTRAN Programs and the Subroutine Library as new releases are provided. The input to the program can be in either card or paper tape form. However, the input must come from the principal I/O device. Figure 26 shows the relative organization of core storage during execution of the maintenance program. See Appendix F of the publication IBM 1130 Disk Monitor System Reference Manual (Form C26-3750) for an explanation of control record setup, header and data record formats, and operating procedures. Also see the same source for the description of the paper tape input, system messages, and error diagnostics. The following descriptions summarize the routines which comprise the basic logic of the program IBM 00. The labels at the left correspond to the labels to be found in the program listings (see Charts FF, FG, and FH). SECTION 8: THE SYSTEM MAINTENANCE PROGRAM START - Initializes the pseudo-TV and the IL subroutines; obtains from the Disk Communications Area (DCOM) the modification level and the version number and types them out; determines the principal I/O device for the system from COMMA; reads a record from that device. If the input is from paper tape, converts the input record from PT TC / 8 to IBM card code. Determines if the input record is a valid System Program header record. Extracts from the first header of a modification the total record count for that modific ation. Converts to binary the word count, the relative word number, and the sector address obtained from the input header. Converts to binary the version number and modification level obtained from the input header. Turns off the disk non-write switch, enabling the program to make modifications to the Monitor Programs. Checks for the names FOR, ASM, SUP, and/or DUP in columns 1 through 3 of the System Program header record; continues accordingly. Determines if FORTRAN is present as a Monitor Program; if not, turns on the disk non -write switch. Determines if the Assembler is present as a Monitor Program; if not, turns on the disk non -write switch. Checks the version number and modification level from the input header against those found in DCOM. If the new numbers are valid, the program proceeds; if not, an error message is printed. Computes an absolute sector address for an Assembler modification from the relative sector address obtained from the input header. Checks for a Subroutine header (the name SUB in columns 1 through 3 of the input header). If the name is found, the program continues; if not, the program initializes for a return to the Supervisor. PTSW1 - CDRT1 - HRCVT - HDRWD - MLEV SlSUB Hardware Area HDCHK Communications Area (COMMA) Resident Supervisor SWFOR - DISKO SWASM - VERSN IBMOO - - - - - - - - -- -- -- -- -- -- --I/O and I/O Conversion Routines -- -- -- --- -- ---- --~---- ASMSW - Specia I Disk Routine and Disk Sector Buffer ~---- -- --------- ------Psuedo-TV ~ Figure 26. Storage Layout During Execution of the System Maintenance Program SUBHR - Section 8. The System Maintenance Program 147 MODl RDISK+2 - ENDOJ ENJ02 CKSMG - CSMOK - 148 \Varns the user that an attempt is being made to update the Monitor to modification levelland then WAITS. If PROGRAM START is pressed, the program continues. Updates the modification level in DCOM alter a modification has been successfully completed. Types the update complete message. Types the version number and new modification level; returns to the Supervisor. Determines that the checksum contained in the input data record is correct. If incorrect, an error message is typed and the modification is terminated. Moves the modification data from the input data record to the disk sector buffer. The word count from the data record and the relative word number and total word count from the header record are used to make the modification. NWSW MCRCK - A2P03 RDATA PCKNG - Writes the modified sector onto the disk from the disk sector buffer when the modification is complete. This routine then reads the next input record. If the input is from paper tape, the PTTC/8 is converted to IBM card code. If the disk non-write switch is on, this routine does not write the disk sector buffer onto the disk. Determines if the input record is a Monitor control record. If it is, the program returns to the Supervisor; if it is not, the program terminates with an error. Reads the sector to be modified from the disk into the disk sector buffer. Reads an input data record, either card or paper tape. Packs 80 card columns into 60 binary words. FLOWCHARTS User Programs Assembler Program Supervisor Subroutine Library FORTRAN Disk Uti lity Program Compiler Chart AA. The 1130 Monitor System Flowcharts 149 ••••• AZ·········. • • • SKELETON SUPERVISOR •• • • •••••••••••••••••• •• X ••• •••• 8Z •• •••••• •••• • PRESUPERVISOR • •• •• ••••••••••••••••• :X .............................................................. . X •·.· ..CZ········ ..• X • PHASE A • • CONTROL RECORO • • ANALYSIS • • • ••••••••••••••••• 01 •••• •• •• x··························.•. .*. •• .. .. XEQ • ••• NO •••••••••• •• X.. *..* X X • ••••• FZ········.·· • ••• F4 ••••••••• • CORE-LOAD • CALL LOADER • AND LOAD • ••••••••••••••••••••••••••••••••• X. EXECUTION • X • • CORE-LOAD •• .. .. • YES ...•.Gl.......... ••••••••••••• i • • • • ••••••••••••••• ••••••••••••• .• *. •• .LOCAL •• NO • ••• ~N~~~t~s6R •••••••••••• X • *. .* • • ••• ••• EZ.···.··· ••• • •• ·E3 ••••••••• • MONITOR • LOAD NEEOEO • •••••••• X. PROGRAM • MONITOR • • • EXECUTI ON PROGRAM ••••••••••••••••• .•.x GZ .. • .*. • .* *. ••••••••••••••• .....G3.......... • PHASE C - . •• •• NO • INITIALIZE ••••••••• X.. .FILES •••••••••• X. TYPE RECORD • •• •• X. PROCESSING • •••• • • YES ••••••••••••••••• • ••••••••••••••••• •• •• :X ........................ .• • .....HZ.......... •• • • • • -. *. . H3 ••• •••• NO •• .* •• *. PHASE E COUNT •• YES • FILES ••••••••• X•• EQUAL ZERO •••••••••••••••••••••••••••••••• PROCESSING. •• •• •••••••••••••••••• 150 G4 .. .* . .* PHASE 0 - . •• COUNT •• YES. LOCAL/NOCAL ••••••••• X•• EQUAL ZERO •••••• PROCESSING. •• •• X • •••• • NO X Chart AB. The Supervisor ............. *..* • YES ••··.·.El··········•• • •• PHASE B ••• YES .. .. .. .. •..• • YES Fl . . •. OZ •• 03 •• • ••••• 04 ••••••••••• •• ·:OR, DUP:· •• NO .PA~S~~BtYP:· •• NO • PRINT OR ASM •••••••••• X•• COMMENTS, OR •••••••••• x ERROR •• •• •• TEND •• • ME SSAGE *..* •••• • .-.-.-.-.-.-.-.-. ••••• A2 •••• • ••••• • ••• X. • MaN CALL EXIT ENTRY POINT • • • • • ••••••••••••••••• .•-.-.-.-.-.-.-.-.• ••• •• A3.· •••••• •• • • • LINKM CALL LINK ENTRY POINT • • • ••••••••••••••••• ...... Bl······.·.·· • READ IN COLD START ••••••••••••• • X ....··C1··········· READ IN • OISKO AND SKELETON SUPERVISOR • STORE NAME • OF CALL LINK • IN COMMA •• • • • • ••••••••••••••••• ••••••••••••• R3 X ••• •• C3 •••••••••• •• X ...... 01··········· .SAVE CORE ABOVE. PRESUPERVISOR • ON DISK • .............. X ...... El······ ... ·. GETA • LOAD • PRESUPERVISOR • • ••••••••••••• X ISETS ••• Fl·• *. •• NO •• •* •• CALL LINK •••••• *. *. .... .* .* • YES X PREB .• ·.··Gl.···•• ·.· •• • SAVE CORE BELOW. PRESUPERVISOR • ON DISK • ••••••••••••• :X .......... : X •• ••• ·H1 ••••••••••• LOAD • 1/0 ROUTINES • ••••••••••••• • X ······Jl······.···. READ IN • PHASE A • ••••••••••••• • X ••••• • 1\;\ • • til. ••• Chart AC. The Skelton Supervisor, Presupervisor, and Cold Start Routine Flowcharts 151 f·* f,lit* *"" ~ .. Ill'" 7 .. 1< ~ INIT *•••• Al*.** •••••• • • ••• ••••••••••••••••• •• • •• INITIALIZE PHASE A ·...••••'"... .....Al.......... • 81 •• X. * * . X. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SUPI X •• • • • NAME2 INITlAlIlF.• TO READ • CONTROL. RECORD. B2 ••• JOBI • ••••• B3 ••••••••••• •• *. •• YES •• .* .SKIP CARRIAGE • • • •• X.. JOB •••••••••• X PRINT THE •••• I'IECORO • •••• ••••••••••••••••• ••••••••••••• •• '" ••NO ·•......• . ••• $ • (1 •• X. REAOP X ••••• ·Cl·· •• ••••••• READ II RECORD ••••••••••••• ... X •••••• C2 ••••••••••• PRINT • THE RECORD • • ••••••••••••• x 01 x •• .lI/ x 4 1 • 02 •• .* *. •• •• NO.. /I IN •• ••••• fIRST T~O •• •• COLUMNS •• •• •••• • (1 • ••••• • .* *•• • * YES *. .. .. •• ASMl *. •• •. .• •• *..* .* .* •• .* •• •• ••• •• FOR FORI *. •• •• TO LOAD FORTRAN • • • •• .* ••••••••••••• •• .. x XEQI *. •• F3 ••• ••••••••••••• ...... ••••. ................. x .• •• •• •• G2 ••• •• .. .. OUP OUPI ••• ••••• • G3 •• • •••• G4 •••••••••• •• INITIALIZE •• YES .* .* NON-OUP *. •• NO •••••••••• X.. ShlTCH ON •••••••••• X. TO LOAO • •• •• •• • DUP • *. •• ...... ••••. .•................• ...* *..* • YES • • X. KI • ••••• • x ••• PAUSI HZ •• • •••• H3 •••••••••• *. •• Y E S .* $: •• •• •• PAUS •••••••••• X. WAIT ••••• *. ••••• • Kl • •• •••• • .... •• •• x : X ••••••••••• X •• •• •• • •• J2 ••• •• . . • * • ••••••••••••••• * TYPE TYPl *. •• *... •• •• ••••••• **••••••••• •• * X x •• •••• • Bl • • ••••••••••••• ....J4.··*·.··· EXIT TO • DUP •••••••••••••••• •• • • ••••• • . .... . TEND LOAD DUP x ••••• • $: X ....•.H4*.* ...•.• *. •• •••• • Rl • ••••• • *•••• • • .... x K2 .*. •• Chart AD. The Supervisor - Phase A • •*••••• *••••*••••• •• .• * NO • NO.. •••••••• • •••• J3 ••••• YES • CHANGE INPUT •••••••••• X. DEVICE TO •• • KEYBOARD *..$: x 152 .* • NO •••••• Kl·.········· PRINT ERROR MESSAGE •• •••• • III • ••••• • • ...··. •• •• .* NON-XEQ *. •• • NO ••••••••••••• FORTRAN ••••••••••••••••• •• X. Kl • •• •••• • Cl • ••••• • • • .·.·E5·· •.... ··• EXIT TO Io4ULTIl XECL • •••• F4 •••••••••• ······F5·.··~ • • LOAD YES NO • INITIALIZE • PHASE B •• XEQ •••••••••• X.. SWITCH ON •••••••••• X. TO LOAO ••••••••• X •• •• •• •• • PHASE' 8 • * . .~.* *..* • • ' • NO • YES F2 ••• • ....05······.·· EXIT TO • ASSEMALER • •••••••••••••••• • • •••••••• X. GETA • ••••• E4 ••••••••••• • LOAI) • • ••••••••• X FORTRAN •••••••• X. • ••••••••••••••••• x pRNTl X ··.·.·Fl·· •• •••• •• • • PRINT OR TYPE. COMMFNTS RECORD • * •••• E3 •••••••••• *• INITIALIZE.• YES •••••••••• X. • •• • ••NO • ASSEMBLER ••••••••••••• $: *..* • YES INITIALIZE •* TO LOAO ••••••••• X • THE ASSEMBLER • •• .** .•.••..•••.•••. x E2 · ..·.·04.····· ..··· LOAU • •••• 03 •••••••••• YES •••••••••• X. • NO El •• * *. •• NO • •• •COMMENTS •• RECORD •••••••• *. ••• ASM .•.x OKSUP • • •••• K3 •••••••••• •• YES • CHANGE INPUT. • • •••••••••• X. DEVIC~ TO ••••• X. 81 • .* • PRINCIPAL 1/0 • • • OEVICE • • ••• ••••••••••••• x •.AF ••••• • AI· ••• ••••• • AE • • AI· ••• ·.···.1 ..........• • X • • INITIALIZE PHASE B • •• •• • ••••••••••••••••• •· •••• • B3 ••... ••••• X ..... • B3··········• X RITE B1·.········• ••..... CONVERT AND • • COMPRESS • • MAINLINE NAME. ••••••••••••••••••• • • • SAVE LET/FLET ENTRY ••••••••••••••••••• GOXEQ X ••••• Cl·.········ • STORE NAME • IN COMMA. • • • STORE LOCAL AND. • NOCAL COUNT • .. .•. .. X HIT C3 .•.X *. .* •• •• •• El •• NAME BLANK .... •• •• .* .* X •• •••• • H3 • ••••• • •. •• •••• • •••• • GIt.. • E2 •••• ••••• •••••• • X . . .•••••••••••••••••. LOKUP X ••••• Fl····.· ...• • LOOK UP • NAME IN • • LET/FLET • • *. *•• * • • READ IN THE LOADER ••••••••••••• ... .* .* X TST2 • •••• E3 •••••••••• •• • • • INITIALIZE fOR CORE IMAGE LOAD • • •• • • •••••••••••••••••• X •••••• F2 ••••••••••• • • ••••••••••••••••••• •• • NO • •••• E2 •••••••••• •• YES • INITIALIZE • •••••••••• X. FOR DSF • •• • LOAD • • NO .•.x .* -. INDICATOR BITS. YES •• EQUAL 11 •••••• x • YES *. .* 03 •• . * COUNT *. •• NO •• EQUAL ZERO •••••• ........ J. .... *. • YES •• *. •• INDICATOR BITS. NO .EQUAL 10 OR II •••••• ••••••••••••••••••• 01 • • • X •••••• F3 ••• •• •• •• •• • READ IN THE LOADER • • • ••••••••••••• •••• •• •G4 ••••• •• X NAME Gl •• •• • * NAME IN *. •• YES •• LET/FLET •••••• •. .. .. .* i ·••••.. • * •. * • NO • HI •• X. ER6 •••• X •••••• Hl··········· • PRINT • ERROR MESSAGE • • ••••••••••••• i ••••• • AD • • AI. ••• • •••••• B3 •.• ••••• X • • ••••G2 ••••••••• EXIT TO • THE LOADER • ••••••••••••••••• • • PHAZE X ····G3 ........ .• EXIT TO THE LOADER • •••••••••••••••• • •• •••• • H3 •••• • ••••• i .•. .. .. .. .. .* H3 •• *. ic ••••• GIt •••••••••• •• INITIALIZE •• • TO LOAD • PHASE C ••••••••••••••••••• •• CAROC • X • ••••• HIt •••••• ••••• LOAD • • PHASE C • • X ••••••••••••• • YES •••• •• •••• •• HI •• X. E2 • • ic ••••• • •••• • •.AF ••••• • A\ • ••• INDICATOR BITS. NO X •• EQUAL 00 •••••• *. .* .. . Chart AE. The Supervisor - Phase B Flowcharts 153 ••••• • Af • • AI. ••• X INPUT •••••• Al· •••••• •• •• • • READ A RECORD ••••••••••••• • • X •••••• 81 ••••••••••• • • PRINT THE RECORD • • ••••••••••••• X ••••• Cl •••••••• •• •• •• INITIALIZE fOR *-TYPE RECORDS • • • • ••••••••••••••••••• •••••• ••••• • • X NTST... fTST ••• ERIO X • •••••010 . . . . . . . . . .. 02 •• 03, •• *. •• NO .* *. •• tiD .* *. •• NO •• •• • PRINT .LOCAL •••••••••• X.. .NOCAL •••••••••• X.. .fILES •••••••••• X ERROR MESSAGE • *. *. .* *. .* X • . . . * .* *..* *..* LIST 01 •• •• .* ••• •• .. .. .. .. ... • YES • YES .. .. .. .. .* .• i *. ••••• • • Dio • •••••• X ••••• Fl . . . . . . . . .. •• ••• • AI· *. •• NOCAL •• YES •• INDICATOR ON •••••• x • NO E2 *. .* * •• * • NO .• x •• •••• • DIt • ••••• • i •••••f2 . . . . . . . . . . X •••• *F3 •••••••••• •• •• SET NOCAL •• • INDICATOR • ••• •••••••••••••••••• • SET fILES •• • ••• INDICATOR ••• ••••••••••••••••• X ·····Gl .......•.• • • X ····.G2 .........• •• INITIALIZE •• • DISK 1/0 AREA. •• • •••••••••••••••••• •• INITIALIZE •• • DISK 1/0 AREA. •• • •••••••••••••••••• •• • •• SET LOCAL INDICATOR •• • ••••••••••••••••• • INITIALIZE • • DISK 1/0 AREA. •• • •••••••••••••••••• X Hl· ••••••• •• •••••• •• • INITIALIZE • TO LOAD • PHASE 0 • •••••••••••••••••••• X ······Jl·.· .....··· LOAD • PHASE 0 ••••••••••••• i ••••• • AG • • A2. ••• Chart AF. The Supervisor - Phase C • X H2 •••••• •••• •••••• •• • INITIALIZE ................. • • TO LOAD PHASE 0 • • • • X ••• • •• J2 •••••• ••• •• • • LOAD PHASE 0 ••••••••••••• x ••••• • AG • • AI. ••• ••••••••••••• ••••• .AO • i El •• .• LOCAL *. •• YES •• •• INDICATOR ON •••••• *. .... • YES .•.x 154 DLt • • • X • ••••&3 •••••••••• X •••• *H3 •••••••••• •• INITIALIZE •• TO LOAD • • PHASE E • • ••••••••••••••••••• X •••••• J3 ••••• •••••• • • • • ••••••••••••• LOAD PHASE E x ••••• ••• .AH • • AI • • •.AG ••••• • A2. ••• ••••• • AG • • AI· ••• NOCAL X ••••• Al· ••• • INITIALIZE • • • TO PROCESS • NOCAL • RECORDS • •••• *••••••••••••• CAL LOCAL X ••••• A2•••• • ..... • INITIALIZE • • • TC PROCESS • LOCAL • RECORDS • *• •••••••••••••••• *·····• • • • •.X ••••••••••••••••••••••••••••••••••••• X X ••••• 81···.*····· •• • INITIALIZE INPUT AREA • •* • • • . x •• •• •• • •••• C2 •••••••••• .. .. • YES X •• STORE • ••••••••••••••••• X .... • *•••••••••••••••••• •• WRITE DISK 1/0 AREA • ON DISK *. ••• •• *. * •• * • • .* .* • YES •• INITIALIZE TO LOAD PHASE C • • • • • • ••••••••••••••••• . . ENDUP •• • •••• 04 •••••••••• •••• • YES •• AREA ON DISK • • • 1/0 • •• •• X •* ••• .c~uNfE~g~~TIV::.~~ •••••• X: TAN~~I~~I~~SK : •• ••••• E2 ••••••• ••• *. AREA. NO OVERFLO~ •••••• 1/0 x 03 ••••••••••••• X El • STORE ENTRY • • COUNT IN DISK. • 1/0 AREA • •••• *.02 ••• • ••••••• MAINLINE. • NAME IN DISK • • 1/0 AREA • .• • DISK ····*··· X ••• C3 •• ••• • .ADJUST POINTERS. . ............*.*. MULTA ••••• 01 ••••• ••••• DOFLO . NNDUP •• CONTROL •• NO • INITIALIZE • EQUAL •••••••••• X. TO WRITE DISK. •• • 1/0 AREA • •••• • ON DISK • NAMEA •••• • YES .... ••• .•.x B3 . • • •• NEXT •• • ••• ..SUBROVTINE •• NO • • •• NAME AREA •••••• X. HI • •• • CLEAR.. •• •••• *. .* •••••••••••••••••* C1 •••• B3 * • •••• • ••• ••••••••••••••••• X ••• ••• E3·.········· READ A RECORD • • ••••••••••*••• • X -•••••• E4 ••••••••••• • * WRITE DISK 1/0 AREA ON DISK • • • •••••••• * ••• ........... x: X :ERI2 X •••••• F2 ••••• ****.· *••••• Fl ••***·••*** • • • PRINT • ERROR MESSAGE • ••••••••••••• • ••••• *•••••• * • AI· ••• • • PRINT THE RECORD ••••••••••••• • • ••••• F4**X••••••• * CAllB •• INITIALIZE •• • TO LOAD • PHASE 8 • ••••••••••••••••••• • X •••••• G4 ••••••••••• • • LOAD PHASE B ••••••••••••• . X • AI· ••• ••••• HI ••••• ••• •• • EDIT AND STORE. • SUBROUTINE • • NAME IN DISK • • 1/0 AREA ••••••••• *•••••••• • • * •.AE ••••• • X••••••••••• X • .....*.. .. .*•• •*J I •• •• • DISK 1/0 AREA. •• • • X ••••••f3 •••• •• ••••• x*• ••• .AF • X ••••• • AD • * AI· ••• ••••• • HI * •• •••• • · .•.x LOAD PHASE C OVERFLOW • ••• NO • • •••••• X. B3 • •. •* • YES Chart AG. The Supervisor - Phase D Flowcharts 1SS ••••• • AH • • AI. ••• FILES X ••••• Al.··· ••• ••• • INITIALIZE • ,. FIlES • • PROCESSING AND ••••• • DISK 1/0 AREA. •• •••• • B3 • ••••• • ••••••••••••••••••• •••••• .... •• . .......... X: Bl •••• . • x : NAIIIE • •••• B3 •••• •• •••• • CCNVERT AND • .STORE STATEMENT. • NAME • AGAIN X •••••• 81· •••••• •••• READ A RECORD ••••••••••••• • ••••••••••••••••••• .. ... .. .... C3 •• • DISK 110 AREA. YES. • •• OVERFLOW •••••• X. HZ • • •••••••••••••• :X .......... : 01 •• •• .•.X *. •• .* • NO .* 03 . • .* .• •• •• • NUMER X ••••• FZ •••••• •••• • CCNVERT AND • • STORE FILE • • NUMBER • • • *. E3 .•.x •• COMMA *. *. .* F3 *. .* .• • PRINT •••••••••• X ERR'lR MESSt.GE • ••••••••••••• .* . ... .x .... .* • .* •• .. .X •• *. •• NO •• LAST RECORD •••••• *. •. *•• * .* .* • • ••••••••••••• x ••••• • AD • • AI· ••• X •••••• H3 ••••••••••• • PRINT • ERROR MESSAGE • ••••••••••••• x •• •••• AD • ••• • AI· • ••• * '" • • • • ••••••••••••••••• • ••• • •• •G4 ••••••• •• WRITE DISK 110 AREA • ON DISK •• INITIALIZE • TO WRITE OISK • • 1/0 AREA • ON DISK • • MUL TA X •••••• H4 ••• •• •••••• • WRITE DISK • 1/0 AREA • ON DISK • ••••••••••••• X •• • ••• • •• • ••• •• ·.G5 •• INITIALIZE • TO LOAD • • PHASE 0 •••••••••••••••••••• X • ••• ·.H5 ••••••••••• • • LOAD PHASF B ••••••••••••• x ••••• .AE • X ••••• J4 •••••••••• •• • • • •••••••••••••••••••• •• INITIALIZE TO LOAD PHASE C ••••••••••••• x ••••• • AF • • AI. ••• • ••••••••••••• WNDUP X ••••• G4 •••• • ••••• • 156 • INITIALIZE • TO WRITf nlSK • 110 IIRFA • ON DISK ••• ••• F5 •• ••••••••• MUL TI X •••••• K4 •••• ••••••• • LOAD C PHASE Chart AH. The Supenisor - Phase E · X • •••• F5 •••••••••• X • AI· x ••••••••••••••••• •• •••• • Bl • ••••• • • YES • HZ •• X. ER5 •••• X ······HZ·· •••• ••••• • PRINT • ERROR MESSAGE .... • • ENnllP x • YES G3 • •••• * ••••• .AO • .... •• *.. * *•• * • YES ·• .. • •••• * ••• *. •••••• £4 •••• • •••••• •• NEXT •• NO • • ..COLUMN BLANK •••••• X. B3 • X ••• GZ •• • * *. .DISK 110 AREA. NO • •• OVERFLOW,.· •••••• *. •• ER4 *. •• NO .. .. .. ••••••••••••••••••• *. .•. *.. * • YES • YES DFLO 04 *. * . . * .* • NO x '" *. *•• * [RIZ X •• ···.El· •••••• •••• PR INT • ERROR MESSAGE ••••• •• *. * . . * .* .* • NO • AD • • AI. J. •• NEXT •• Y E S . . •• N(1 • • •• COLUMN BLANK •••••••••• X•• LAST RECORD •••••• X. G4 • •• YES •••••••••••••••••••• ••••••••••••• •• *••• :NTBLN •• .. .. .FILES RECORD *. •.. • * • .... .... x X •••••• Cl· ••• • •• •••• • THE PRINT PFCORD •* • • • • AI. ••• • ..... A2··.·······• FRC" DUP OR • THE SUPER VI SOR • •••••••••••••••••••••••••••••• X. PHASE 0 • • • •••••••••••••••••• •• ENTRY PCINT - APIOO. READS PHASE INTO CORf. X ••••• e2.· •••••••• •• ••• • ••••••••••••••••••• PHASE 1 GETS THE MAI~LINF HFADER, 1~ITIALllES, lOADS LOCALS, ETC. X • •• x*• PHA S E 2 • •• • • ••••••••••••••••• ••••• 03.· •• •••••• • ••••••••••••••• e _ •••••••••••••••••••••••••••••••••••• •• . .•• ••••• El •••• • •• • •• ·•••• X.• PHASE 3 • •• •••••••••••••••••• PROCESSES PEAOER RECORDS AND Il SUBRQUTINES, lOADS SUBROUTINES BY CLASS CODE. • ·STORECI . .• CUNTROLS LeADING AT CU~PL[TION OF lOAD~~~~E~Vov~~tl~ES IF RFQUIRED. .•• PROCESSES SOCAl AND lOCAL SUBRCUTINES FeR WADING. ••••• Fl •••• • ••••• • ·•••• X. •• • PHASE 4 • •••••••••••••••••• .. X ·····F4···.······ •• •• • DUP •• ••• ••••••••••••••••• STORFS RfLOCATED ANO CONVERTED PROGRAM IN PFRM~NfNT DISK STORAGE. ••••• GI··.······· • •• •••• X. PHASE 5 • •••••••••••••••••• • TO ~EXT JOB •••••••••••••••••••••••••••••••••••••• x /I XEQ . . X ..... •• H4··········•• ••••• Hl·········· ·•••• X.• PHASE 6 •• ••••••••••••••••••••• ..··..·Jl··..······.• • •••• X. PHASE 1 • ••••••••••••••••••••• ••• PH~SE R • • •••••••••••••••••• RFAOS ALI BUT FI RST SFCTOP CF PROGRA~ FADM CIB INTO CrRf. X ••••• J4 •••• • ••••• SELECTS DISK 1/0 ROUTINE, LOADS IT I~TO CORf. ••• SUPFRVISOR ••• • • ••••••••••••••••••• • READS FIRST S~CT~R flF PflOGRA~ FROM Clfl INTO COkE. TO EXECUTION •••••••••••••••••••••••••••••••••••••• x Chart AJ. The Loader - Disk System Format Load Flowcharts 157 FROM THE SUPERVISOR X •••••• B2 •••• ••• ••••• • •••••••••••••••••••••••••••••• X. PHASE 0 • • •• •••••••••••••••••• ENTRY POINT - BP200. PROCESSES CORE IMAGE HEADER, READS PHASE 8 INTO CORE. /I ..·....01····••••••. • •••• X. • PHASE 7 • • •• • ••••••••••••••••• XEO x ••••• 04 •• • ••••••• SELECTS DISK 1/0 ~2¥~I~~RE~OAOS IT •• •• • PHASE 8 • •• • •••••••••••••••••• .·.·.E4.•X···•.... ••• SUPERVISOR ••• •• • •••••••••••••••••• • READS All BUT FIRST SECTOR Of PROGRAM e~~~ :~~~~ ~~E~IB INTO COPE. READS FIRST SECTOR OF PROGRAM FROM :~~1? ~~E~IBU~~~O CORE. TO EXECUTION •••••••••••••••••••••••••••••••• ~ ••••• x Chart AK. The Loader - Core Image Format Load 158 •• •••• • At • ••••• • X ..... Al·······*·.• •• • • OUPCO • ••••••••••••••••••••• X ..... •• B2··.·•.· .•.•• nCTl •• ••• •••••••••••••••••• ... .. .. ... x •* •• *. te. C2 •• DEFINE *. *. •• .* •• • •••• C5 •••••••••• YES •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• . •• * • NO •• I)Z •* *. x •• DELFTF *. • •• •••• • til • ••••• • x •• • * • ...•..•.......... OEFINF * . l(. *. •• .• .* • •••• 04* ••••• *••• • • yr S • • •••••••••••••••••••••••••••••••••••• X* DELETE • * . *. ••••••••••••••••• •• *••NO x •** ••• Al •. x EZ •• •• • *. .* *. •• *. DUMP *..* •• •• * • *****F3* •• ** ••••• • • • •• Y f S . .* •••••••••• X. • • • DU~P • • •••••••• *••••• *.• *. •• • NO * x ••• * • At • •• •••• • .. .. x GZ •• *. *. . .*. •• OUMPlET *. •• •• .* . • •••• G5 ••• *•••••• •• yrS .* • •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• X. OUMPL~T • • • • •• •••• ** •••••• *•• ** • NO x .•. •• x H2 •• •• •* *. *. DWAOR *. •• •• .* • ... ..**.H4 •••••••• *. • • * . **•••••••• . •• YES .* • • •••••••••••••••••••••••••••••••••••• X. JZ •* *. .** ••••• x •• *. STORE *. • Nll x •• •• OWAnR •• •••• • At * • •••• * .• • •••• J3 •••••••••• • •• Y F S · •••••••••• X. .* •• • ••NO • • • STORF • • ••••• • At • •• •••• • • * ••••••••••••••••• x X •.···. • •• .... KZ··· ERFOR •••••••••••• *••• •• •• •••• • At • ••••• • Chart BA. DUP Functions Flowcharts 159 NYETC ······81.·••• · •.•.. • SFLECT HANK RfCORD • ••••••••••••• • • SUPPC GET 82 ••• •••• ••• •••••• •• • INITIALIZf • lTV • •••• 83 •••••• • ••• ••••• B~ ••• • ••• ••• • • ••••••••••••••••• ••••••••••••••••••• .X ••• ••• X. • •• • •••••••••••••••••• PUT •• •• MOVE EXIT ADDR. TO PUT ADDR. • • • ADJUST FILE • • PROTECT AODR • • • LOAD DISK 1/0 • • PUT PARAMETER • :X ........................ : X ·····CI·········· • CALCULATE • • PUFFER LfNGTH • • • SET UP • • 10AR HEADER • i GOMUL X ••••• C3.......... • •••• C4 •••••••••• • • • FILL IN CTL • LOAD DISK. .PARAMETER. SET • • • 1/0 GET ••••••••• X.UP IOAR ORIGIN. : PARAMETER: : COU~~6R~~!GIN : IHlcn •.88 ••••• ••••••••••••••••••• X ......01··.·····.·· • LOAD Den ••••••••••••• • ••••••••••••••••• • OZ· ••• • CLEAR DUPCO SWITCHES ·· .. .. .. .•..... .... ... .... •••• • 04 •• X. •••• REST X ••••• 02 •••••••••• • • • ••••••••••••••••• • •• • •••••• • •• WORKING •• YES. • •• STORAGE •••••• X. Gl • •• EXCEEDED •• •• •.B8 ••••• • • ••••••••••••••••• • •• * • NO • E3. ••• x ••••• .BC • • B2. ••• :LDRDC X .-.-.-.-.-.-.-.-. ••••• E3 •••••••••• • • • • RELEPT SET UP CALL FOR STORECI • • • • X ••••• F3.·.·· ••• •• • .INITIALIZE lTV •• ••••• INSERT • • INTERRUPT • ADDRESS • • • ••••• ••• ••• SFXIT X •••• •• Gl.· ••• • ••••• LOAD •• x ERROR MESSAGE • R()UTINF • • •• •••• • G1 • ••••• • ••••••••••••• X • • •••• Hl ••••••••• EXIT TO • PERRe/TERRe • ••••••••••••••••• • ••••••••••••••••• • B8 • • G2 • • Gl· • . . .••••••••••••••••. i •• E~ • •••• E5 •••••••••• .... •• •• •• MORE THAN •• NO • SET UP TO • •• 1 SECTOR •••••••••• X. OUTPUT FINAL • •• LEFT.. .PARTIAL SI:CTOR • ••••••••••••••••• ••••• ·BB • .... .... X ~ • • YES OUT2 X ..... F5 .•........ • • •• S£:T UP TO. • STORE ••••••••• X. PARAMETERS • • GET OR PUT • INTO LINKAGE • • FULL SEt TOR • ••••••••••••••••••• ••••••••••••••••••• ..... MMORE •• X F~.......... i SYSCK X •••••• GZ ••••• • ••••• DU'"P FIRST 320 WORDS • TC PRINCIPAL. PRINTER •• •••• G5 •• ••••••••• • • • ••••••••••••• i • HALT ... X ••••• HZ •••••••••• •• • • ......... "' GET OR PUT SECTOR. WAIT • FOR OP COMPLETE •••••H5 •••••••••• •• •• ••• • • •• ••••••••••••••••• DECREMENT WORD COUNT BY 320 • • • • ••••••••••••••••••• .....J4.......... J5.•. .. i .* COUNT*. •• RESTORE.• NO •• WORD • FILE PROTECT .X •••••••••• GREATER THAN •• • • •• ZERO •• •• ·.................... • • • X ........ ..• EXIT TO ··.·K~ CALLING • PROGRAM • ••••••••••••••• ... .... . • YES X ••••• K5 •••••••••• •• •• INCREMENT .SECTOR ADDRESS • • 8Y 1 •••••••••••••••••••• x •••••• ••••• • • Chart BB. DUP - DUPCO 160 [)It • ••••• • BC • • 82. ••• DECODE • GET PRINCIPAL. PRII'H 10CS * **.*.*.* ••• ** • ••• 83 •• ****.A5.***.*.** • •* *. •• YES ** DECODE I1FFINE •• •* ••• X*. .DEFINE •••••••••••••••••••••••••••••••••••• X*CONTROL RECORD.* •• •• * SET DUPCO * •• •• • SWITCHES • *. •• *** •• ***** •• ***** • NO x . *. .* •• *. *. C2 *. *. BYESW *. NO ON ••••••• *. .• *.• * * YES .* C3 .. ·x •• X ····**C5 •• *·****** • LOAn • DEFINF • •• *.C4** •• *** ••• *• SEARCH LET. •• YES *. .OELETE •••••••••• X. SFT OUPCO • •• •• * SWITCHES • *••• . .** **.*** ••• **.*••• *** * NO •• .* *" •• * ****.******** ••• * • ·BIC· •• X. A} • X :X .......... : : .•.x •• .* *..* *. • * •• ********** E3 · *. *. -OUMP *. *•• * * **** * * E5 •••• *.**. * X • • .**. x X ******E2*****.**.** * GET PRINCIPAL * INPUT IOCS ••• ** • X *••••• 04 ••••••••••• .• *. •• YES •• LOAD • DELETE * •• .OUMPDATA •••••• *. .* • * *. .* x .*••••••• *.*. *•• * • NO *****. • • .*** E5 * •• x**BE:. 81 • **••• • 03 ******02****·****** PHINT EXIT MESSAGE * ** •••• ******. *. *. .* .* *****~5* •• **.*·** ••* * OATSW *** EQUAL DISK BLOCK * • COUNT * * •• ************** YES •••••••••••••••••••••••••••••••• ~. NO : •.•..••... x: .•. *. x X F3 ******F2*****.·***. * RFAD * CONTROL RECORD * X *****F5********** **CPNTROL DECODE nu~p * HEC~R~.* LET. ** SEARCH SfT DUPCO *'" * SkITCHF.S * ***************** .* *., •• YES •• *. *nUMPlET •••••••••••••••••••• *. .* *. .* *••• * ************* • NO x .• G2 .*. *. G3 *. •* DUP *. YES • *CONTROL KfCORD.* •••••• *. *. *. ,,* .* * •* NO .*. *. H3 *. *. *. *. *. ,,* ". * X ". YES .*****K2··**·***·** *··:~~}·f~*~~~*** * LOAn SYSTEM SYSTE~ *X •••••••• * * LOACER/EDITOR * *LCACE~/f')I TOR* *****.********* *.**.**.*.*** .. .x • *. .. .. .- .61. * * : •••••••••• X: LOAD DWA!,)P * * •• x* At * **** • * .* ************* .************ *****J~********** **CONTROL nECnOE STOR~ * • RFCOP!).* ••• X* SEARCH LFT. * * SfT nupeD * * SWITCHES * ***************** x ** ••• X **·***K3** •• ******* PRINT ERROR MF.SSAG( x . A1 **** • * ************* **** • *HJ * NO * •• x* ******~5**********'" ******J4*.*******.* •• J3 *. •* *. YES * LO"D STnKEMnO *. .STOREMOD •••••••••• X *. *.•• ,,* * ************* **** • *RO * .• •••••••••••••••••••••••••••• x .•.x *. *. X .*****r.5*********** * LOAD nu,..p .* •• * • *.*. ***** *BS * * 02* Chart BC. DUP - DCTL * • NO .* EOIT •• NO *CONTROL pECORQ.* •••••• *. ••• *•• *•• *••• *. ". x J7. • •• x* Al .• .* .STORE *. *.•••••• YES •• ****HI*******·* .* •• EXIT TO THf * YES.* MONITOR *. SUPERVISOR *X ••••••••• CONTROL RECORD.* • *******.******* * *. * . . * ". *.• * * NO .* .* •••• G4 ••• *.* •• *** LOAD • DUMPLET • NO • * • *. X .* *• •• YES •• *. *OWAOR •••••••• *. ". *. *•• *". x HZ .. ·x •• * *BH • • 82* ••• X ******K5*********** LOAD S mR E * *********.*** **** • x**BGB2 ** •• * '" **** • •* Flowcharts 161 ••••• • .***. • (>0 • A3 • •• •••• • • AI· * • • c .. s X CHK(.l .• CALCUlATE *·*.~1·*·.*· .. ·.• *PLT • • • C~F(K ~ISK .RUICKS, A']JlIST * .*..... S17~ "LrCK ... .•.x •• TAPE PAPF~ *. ·..... • * •• "' ••• *"'. *. ., .* •.. * .* •••••• • 1]7 ••• X. ~I >t. 'II • • • .1". *. *. .. .. .* •••••• ••••• ·HI-I • • '12· ••• x ."'. ••••••••••••• x • Y~S (I •• •• 1:. P~I~CIPAL •• YES DtVTCE •••••• •• tl[I)Ulflro •• *..* .* .•.x •• C? •• x ••••• • • H2 • '" Nli .... • ••••• • X ····*·01·········.· GET FIRST *. .• •. D2 •• HLIINK *. CAH0 ·..... ••••••••••••• x *. ., * •• * .* •• .* YES •••••• • NU F2 •• •• •••• • X • ····E2······.·· RfTUflN TO • )C. .• E1 .•.j( •• *. • *LI OR DATA •• YfS •• PRCGPAM TC BE •••••• •• .... llu"pE:n *. • .* x r-.;l ;( ••••• r\"' ••••••••• .PKC(fS~ HFAIl~R ~tTH CC~~A • • • • INFn. r.rPNT INITI~lllf • • • • • •• •••• • • ••• • C4 • • * .•• •••• *••F2 ••• • · . ................. ... ~ .. •• •• .• G1 wl);~D f(JUAt *. •• ,<' * •• * .. *. IFIl, .* •••••• X • • w0 r 12 • IN • •• • •••••••••••••••••• 9 cr;~5" : X •••••••••• : x ·.···JI·········· '" [~C[1rE TYPE • • fl(lO, PROCESS. • AlCC~rl~G TO • TYPf••••••••• "' ••• *••••• • • ••••... ·•.... • • Kl •• Spr,,,x 1(. '. l( ••••• KI·········· • CRfAT~ CARD • • SYSTfM FUP~AT • • ~[1qCS A~n • • ~UN~AT HEAr[R • ••••••••••••• hS ~~Q'r. * ••••• ··...... i( .*.* • ~1 • Chart B D. DUP - DUMP ~ONITOR .... PRPf)F · .. x •• X ••••• ••• .BIl • • 02· •.......• •.····84·· • TURN OFF CARO • .0 ... .. • NC. INDICATOR • CLEAR SW306, • SVIND • • x ••••••••••••••••• •••• •• E3 •• ••••• • •••• ••••• • x •• •••• • ••••• • 1'3 • • C4 •••• - · . COOl' •• ••• C3 •••••••••• CLEAR BUFFER • • • CONVERT DISK • .SYSTEM TO CARD. • SYSTEM FORMAT. • ••••••••••••••••• ·••••.. •••• 04 •• X. • .x ••••••• ~ •••••••••••••••••• •• X X • •••• 01 •••••••••• • MOVE 40 WORDS • • FROM OSF TO • : S~~FU~Ut:~~s : • FOR OUTPUT • • •••• 04 •••••••••• • MOVE • • MOVE WORDS • • AND PUNCH • CARD • • .-.-.-.-.-.-.-.-. x ••••••••••••••••• •• •••• • •••• 87 • ••••• • •• E3 •• • X.• • • • •• X. .. ... .. .. .x x BUMP? X •• ••• E3 •••••••••• • PCHOT • • PUNCH DESIRED ••••• • NUMBER OF • • CARCS • E4 .-.-.-.-.-.-.-.-. *. .* *. x * ..• .* ••••••••••••••••• •••• • YES •••• •• Kl •• • .8B. •• •••• • • .X. 02 • F3 •••• • • •••••• •••• ••••• • x .•. •• S"'ALl F3 • •••• F4 •••••••••• .*.. •• AnJUST COUNT •• ..REQ'D WORDS •• yrs . .... •• •• OF SAVED WORDS TO 2 . • • ••••••••••••••••• NO X • ••••G3 •••••••••• • CALCULATE NO • • • OF IND. ANO • • DATA WORDS • • LEFT FOR NEXT • • CARC IMAGI:: • E5 •• .* *• •• MORE THAN •• NO • •• 54 NORDS TO •••••• •• OUTPUT •• •• .....-.. ... ..- •• EOJ •• NO • •• SWITCH SET •••••••• ..lESS THAN NO •••••••••• X. •• SAVI::O •• • PCHOT ·····G4 ......... .• • CHKCO .-.-.-.-.-.-.-.-. • READ A CARD • ••••••••••••••••• :X .......... : • GET SF-CTOP, COMPU1E WOIIO CCUNT TO liE CUM PI-£) • YES x F'ii ••••••••••••• • ••••• H4 ••••••••••• • PUNCH CARD OR • PAPER TAPE RECORD • • ••••••••••••• ••••••••••••••••• .. .x X ...lGAD ····J2·········· . PRINCIPAL. PRIIIIT DfVICE: • ROUTINC *•••••••••••• J3 •• .* *. ..UTHER T~AN •• NO •• SAVED WORDS •••••• •• REQ'O •• •. *••• .* x • YES ••••• • A4 • ••••• • X •••••• J4 ••••••••••• .GF.T NEXT SECTOR. DECREMENT OFPNT BY 320 ••••••••••••• •• ~... NO.. SECTOR ••••• FINISHED *. x •• •••• • 04 • ••••• • *. .... •• •• •• .* • YES X ·····.G5••••••••••• • GET NEXT • • SECTOR • ••••••••••••• •••• •• X. 04 • ••••• • AND CHECK IT • ••• •••••••••••••••• • X X ••••• H3···· •••••• • SET OFPNT TO • .ENO ~EXT HEAOER. .SAVE NEW HEAnER. :PlAC~NTl~to WC : ••• DECREMENT NORD COUNT ••••••••••••••••••••• ••••••••••••••••• ·...... • • •••• 05 •••••••••• .. . ..··.·H2 ••••••••••• MOVE • •••• H5 ••• • •••••• •• MOVE 'MCNT' •• :l~~~O~H~~K~~b~ : ••••••••••••••••••• X ····.J5 •••••••••• • PCHOT • • PUNCH DESIREO • • NO. OF • • CARDS • .-.-.-.-.-.-.-.-. ••••••••••••••••• • X •••••• K2 ••••••••••• DUIo4P TO Pqf\lTt-1< ••••••••••••• x ••••• • 112· '" • . • I:1R • 162 ••••••••••••••••••• H!PMAT AND • PUNCH fll.')-(lF- • PROGPAM • • CAPD ••••••••••••• X ., ... G2········· EXIT TO THE • •••••••••••••••• •• ••••• • •• H2 •••••. • • ••••• Hl ••••• *•••• STO~F X ..· ... f7···· ....... ·• leAO • fRROR PRIM RUUTIIIIE • ••••••••••••• •• YeS '" NL • • • CALLING • ROUTINE • • .................. •• • ••••• 65 ••••••••••• ••••• • •• "14 ••• X. •••• X x •• •• •••• • 1'2 • ••••• • x •• HlUCK FQ[11'4 DI'>K .:11 X ••• •• A4 •••••••••• • LNTE~ IND. • • BITS ANO DATA. • WOROS INTO • • CA~D IMAGE • x X ill. ••• •• *A5 ••••• • • (OP •••• X 114 •••• ••••• • •••• '" A5 • • YES NO ... .•. .* 1110 * .• * •• MC~ITUR •• YES •• CCNTROl •••••• •• RECORD •• •• pgl~T *. • .* *. .:;gN~YEr 2al~·:.~~ .THAN 1 CARD. *. .* Nt-III II CAI'D filL * .• * •* •• *.. * 63 .• nUT PUT *. •• Rf~iUJI" ~ .. ••••••••••••••••• ..... *. . .X ••••••••••• NO •• •••••• .• •• *. * •• * .* •• •• *. .* · .. ..-.-.-.-.-.-.-.. llH RFCOR!) IF • Pfl;'D. REAC A. RECORD ••••••••••••• ····.[l·...····.·• X E~CCIC ~p • crDE. Sf ARCH • SPECIAL OP • ccrE TABLE x •• •••• • G2 • ••••• • X *. *•• * .t .• £2 ... x ••••••••••••••••• •• •••• • G2 • ••••• • 03 ... •• *. PASS 2 NUMERIC *. *.. * .* .* • NO •• NO •••••• X .• ...• E3·.···· ..•. ERFLG .-.-.-.-.-.-.-.- • • SYNTAX ERROR • • • . SET ISS NO. EQUAL ZERO • YES X • •••• F2 ••••• • •••• • S710e • • GET rNT~Y PPINT ••••• • NA~E AND • • ADDRESS • .-.-.-.-.-.-.-.-. . S7r;~., •••••••••••••••••• • • GO. Tr. •• •• ••••••••••••••••••• •• •• A2.• ••...............• • • •• ISS •• A3.• ••............••.• • • •• llBR •• K3.• • • *••.•••••••••••••• •• •• A4.• ••...........•...• • • •• rPM •• G5.• ••.........•.....• • • •• SPR •• J5.• • • • *• •••.•••••••••••• •• 04.• • ••...••••••••••• • •• * • IlS •• F4.• • f~T ~es ~DNG • .-.-.-.-*-.-.-.-. ••••••••••••••••*.• • SAVE ISS NO. • ANC NUMBER • OF LfVELS fOR • HEADER X ·•... ·HZ.···· •....• S20tH • • • INITIAlllE TO lOAD PHAS~ • • 6 •••••••••••••••••• •• •• •• *. x •• •••• • Cl • ••••• • .* G3 •• PASS 2 *. *•• * .* F4 •. *. •••••••••••••••••• • • ••••• *••••••• x •• * •• • cr • • AI· ••• Chart BQ. The Assembler - Phase 2 *-.-.-.-.-.-.-.-.• •• • •••••••••••••••••• •••• ..X. 01 • ••••• • .. . .-.-.-.-.-.-.-.-.• ••••••••••••••••• ..••••.• x •• •••• • 01 • ••••• • X S2100 • • • COLlfCT ISS NA~E • • .... • F5 •••••. H':lRT Z .* .x •• • • .* x ••••• • G2 • •• •••• • •• *•• * .* • NO x .•-.-.-.-.-.-.-.-.• J4 .. LI 13Rl •• ••• K3·.· ••••••• • • • • TURN GN LIBR SWITCH ILBRSWI •• • • ••••••••••••••••••• x ••••• • 01 • •• •••• • • YES x •• •••• • A5 • ••••• • *. .. .. .*. x *••• ••• • •• •G2 ••••• •'" • NO .. . ... LEVEL NO. • ••••• •• NUMERIC •• * .. * •• ..·=RECEOEO·· •• YES •• RY SP~ •••••• • • ••••••••••••••••• •••• •• X. 01 • •••••• •• .. .. (;5 •••• • PRECISION • .SWITCH IrPRswl • .* *. •• INTFRRUPT •• NO •• Cl • .•. ···HS···· ••• ••• ••• • SfT EXTENDED • • ••••••••••••••••• .x •••• .. ..X. . • • X • •••• H4.· •••••••• • SCAN • • GFT INTERRUPT • • LEVEL NO. • ••••• • •••••••••••••••••••• •• •••• •• ••G2 ••• • X •• RESTORE ADPRESS AT RTRN EPRI •• PRECEDED BY •• YES .E~!'oAl~IB~S~~ ••••• : *. X • •••• rs ••• • •••••• •• .. .. .. G4 • .. . *.BQ •.. • • NO ••••• H3.· ••• • •••• X ..·.·D5 .........•. • ERFlG • SYNTAX ERROR • *.• * •• X. Ul • .. 4**.JZ··.···· .... FlIPR .. -.-.-.-.-.-*-*. LeAD • PHASE 6 • •• •••• • 05 •••• • • • .x ••••••••••• •••• X ..MODE ABSOLUTE •••••• NO •••••• • YES • • • • • • .* *. ..RELOCATION •• YES • • • • *. •• .* ..••••.• ••••• ••••• • ILSI ••••• F3 •••••••••• .. • • X . X ••••••••••••••••••• .. ..X.••••. • • ••••••••••••••••• •••• ••••••••••••••••• • 111 •• ••••• ••••• •• •••• • •• • G2 • •• * • x • S20'16 X ··.·.G2 ••• •••• ••• • ERFlG • • OP COOl: ••••• • EKiUJR • ~O TO INSERT • IN PROGRAM • HEADER • X SET L.A.C. TO LOWEST ADDRESS AVAILABLE x • YES •• .* ..X. 01 • •••••••••••••••••• •••• • 01 •• :x .......... : •• •••• • x 5 * •• * • • • ..····04 ........... LOAD • PHASE 5 • • ••••••••••••• •••• • .BU. ..X. D3 • • • •••• •••••• SYNER *. • •••• B5 •••••••••• •• • •••••••••••••••••• HDNGA •• *. •.SAVE • • 01 • • * ISS NG. *. •• YFS *. SET RLMOE EQUAL ZERO ••••••••••••••••• x *. .* .* ••••• • ••••• • • • • •• •• •• •• • G2 • •• .-.-.-.-.-.-.-.-. •• .. .x • •••• C4 •••••••••• • ••• ·C3 ••••• • •••• • SCAN • • GET ISS NO. • .t .... .... •• •• • • • • •• IN SPFCIAL •••••••• •• TABLE •• • • .* x ••••••••••••••••• •• •••• • Cl • ••••• • x Fl·. CP CODE •••••• .t • ENTCT BY 1 • .INC~tMENT PROG~ • ~CR ry 3 • • .* *. •• OP CODE •• NO • • •• x x • • X .•.x * •• * .• X ..... • 84····· .....• ••• 02 •• • ••••••• ••• •• • OECREMFNT ••••••••••••••••• *. .* *•• * A5 • NO. •• YES •• GREATER THAN •• ~ ••• . • NO •••••• Cl.· •• ••••••• pALeL •• PACK •• C2 •• .• ENTCl *. •• YFSX. •• •• f~lJAL lERO •••••• •••• • YFS • 01 •• X. ••••• • X S2'::('3 *. • NO .*. : RFCORD *. *. X CO~MENTS *. ..RELOCATION •• YES ..MODE ABSOLUT~ •••••• • NU x Cl .•.x A5 .• •• IL G2 • •• •••• • *.. * ..• Cl •• X. S2"C"•••• .. MIS 1 •• A~ YfSX •• BY ISS OR IlS •••••• • ,6SS[MBLY. • • DISALLOW ENT, ,. • ISS, ILS, CR • • .* .• *. •• PRECI:DEO •• A~SnLUTf ..•. .. ... .. IS<;I *. • NU .. · .. 81.·.····· ..,. .FnRCf • .•. •• •• ~ElCCATION •• YFS •• MOIlE AflSOLlJTf: •••••• ~e •• SYMBOL TAAL~ •••••• •• OPT ION •• *. ••••• • ••••• • ,61. x ••••• • 05 • •• •••• • J5 •• .* *• •• PRECEDEO •• YES •• BY EPR •••••• *. *. *.. * .* .* . x •••••• • NO X • •••• K5 •••••••••• •• SET STANDARD •• • PRECISION • ISPRSWI • •.SWITCH •••••••••••••••••• (;2 '" •• •••• • x •• •••• • 01 • ••••• • Flowcharts 175 ....... • ••• ••••• • • x .t. AI S3A3 •• *. x *•• * ••••• • •• Gl •• • NO .... .•.x •• In *. •• *. 0 •.. * . .. I~ 1 .. .x *. •• •. 10C *•• * .* X · ..··•• ..-.-.-.-.-.-.- • • . .•. .. .. .... t. .* • NO X • • Dl POUTINF. .PRl~l •••••• *•••••••••••• ••••••••••••• .•····El····.·...·• SET UP TO SAVE SYSTEM SY~BOL TABLE .. X TABLE .. .* f? .•..x •• X • •••• F3 •••••• • ••• .. RESET • • PARAMETERS TO • CONTINUE • • • IN-CORE FROM • • PHASE 9 • •. •• FPI~LIPAL •• YES •• lIn PUUTI,."f •••••• •• IN CLR[ •• *. ••••••••••••• ...... . • • .x •.....••.•• .... * ••• .* .. ....... .. ... .. • • ~ I .. ••••••••••••• •• •• 0 •• ... x 112 .* .p~INT * ... * .* • Ne • x •• •••• • A? • X GETER . LOAD !:RP(R PR INT. RUUTIN[ ••••••••••••• i ..-.-.-.-.-.-.-.. • ••••• Kl··· •••••••• EHNT3 PRINT • EHIlOR MESSAGE. AOit ••••••••••••• X •• •••• • A2 • ••••• • Chart BR. ·••••..• • [It •• X. • DUSTn*.** x. • ••• ·E4 ••••••• *•• •• • SET UP TO • .CONTINUE OUTPUT • • FROM PHASE q • •• ••••••••••••• ARFA *••• •• •••• • •••• • • 83.. • • F4 •• X. •••• • • • X L8 •••• ..-.-.-.-.-.-.-.. • ••••• FIt ••••••••••• DISKl REAl) OVERFLOW SEC TOR ••••••••••••• ••••••••••••••••• •••• • G3 •• X. ••••• • X • X •••• ..-.-.-.-.-.-.-.. Lq *. ANe/LRt. hO The Assembler - Phase 3 • PUN(~ SELFLT~r •••••• .* *. ; * •• * • X •••• **J? ••• *•••••• TV3 Pfll"'T MESSAGF 'Sy"eCL TABLE'. •• -*-*-*-.-.-.-•• ••••••••••••• •••• ·.... .• x • • A3 • A5 ••••••••••••• ••••••••••••• ..-.-.-.-.-.-.- .. .•. .. "''1 •• Hit •• ANY •• YES .TABLf OVERFLOW •••••• *. •. •.• * .* .* x ••••• • • Ait • ••••• • • NU • * .•.x J3 •• *• •• DUMP •• YES •• COMPLETE •••••• •• •. *. • •• * .• • NO x •• •••• • G3 • ••••• • .* x .. .x •• .* *. •• DUMP OF •• NO • SECTOR ••••• •• COMPLI:Tf •• .nV~RFLOw *. *. .* .* • YES .* J4 .•.x •• *. • ••• •• ANY MURl •• NO • • •• OVERFLOW •••••• X. A5 • •• SECTORS •• •• .... *..* •••• • YES ••••• • • A'i • X ••••• • ••• •• K4 •••••••••• •• SfT UP TO •• • DUMP ANOTHER OVERFLUW • SECTO~ • • •• ••••••••••••••••• x •.. •••• Fit •• • . •••• 176 .. OUMP HCORD OF • 5 SYM8ClS • • YES • 't • • • • • • X ••••• ·GIt ••••••••••• SlJD"P DUMP RECORD or • 5 SYMBOLS • x •• .. .. .*•• · . .... • • ······Jl· ...•.•.... .... ..-.-.-.-.-.-.-.. *.. .. . : X •••••••••• : •• •• YES •• STPSV EQUAL •••••• • Fn~c~ x •• •••• • G3 • ••••• • OUTPUT • .OF SHORT (LESS • .THAN 5 SYMBOLSI. REcnRD • • •••• •• G3· ••• •••••• • SUDMP Ie l<[iUT I NF • x Hl L'> X ······GzDISKI ......... ·. -.-.-.-.-.-.LC!Ar PRINCIPAL RSTIO • SAVE SECTOR • .ADDRESS OF LAST. • • OSF O~TPUT x • ••• *CIt •••••••••• •• · .. • NC • GI •• X. • • . S3A2 X Cl·········· •..... SAVE RLMDE. • .* • NO x • YES T('l DISK. •......... *. •• *. ••• * .- •..... Fl·····.····· OISICl -.-.-.-.-.-.WP ITE SYMBOL .... •• LFFT ~(FORE •••••• ..OvERFLOw •• E3 •• •• RfST Of •• NO •• I"'-CORE MOVED •••••• .TO PHASE 9 •• • • • ••••••••••••••••••• WRTST •• •••• •• ••f4 ••• • ••••••••••••• Bit •• •• C; OR •• x ... .. .. X • • • x .M0RE SYMBOLS •• YES • NO : x•••••••••• : SVI LOAn PHAS[ It .* *. •• Ih-CORE •• YlS .TAeLE COMPLETF •••••••••••••••••••• *. .* *. .* *. .* t.-.-.-.-.-t-.-•• LOAD PPINCIPAL STPSV ••••• (SlOP SAVEl. ... HIP:~ •••••• .. · . x ...... 02····.·.···. DISKl .* * )( *••••• A5 ••••••••••• x ••••••••••••••••• •• •••• • •••• A5 • •• X. G3 • •••• ••••• • *.• * : X •••••••••• : X *.•* .* .x C3 •• •• *. •• DUMP •• YES •• CCMPlETE •••••• (CTSYfol EC;:UAL. t. G I •• •• • NO 01·········· •..... • SET DATA IN • • *. x x *. (OMPL~TF • NU .. .... . ..•-.-.-.-.-.-.-.. • SlOUT •• .* IN-cnRE *. •• YES •. •• •••• B3 ••••••••••• SUOMP DUMP HCCRD OF • 'i SYMBClS • ••••••••••••• • YES •• .TA~lr .. •• I'RINCIPIIL YlS •• P~I~' ~OUTINf •••••• t . IN CCRI' •• •• • • • • x •••••••••••••••••• C2 A4 ••••••••••••••••••• •••• • • •••• • A~·· • B3 •• X. •••• • ••••• • X L't .* • YES .. .•• NO.. CTSYM •• •••••• GREATER T~AN •• •• • • I",ITIALIZE • TO DUMP • SYMBOL TABLE ... ••• • •• •A'> •••• x L5A • •••• A3· ••••••••• •·····~2····.· MGVE AREA .TO BE OVtRLAIC PY PRINT • • RrUTl~[ INTO PHASE q • hLJ • YES .. * *. .• •• •••• • Ait • ••••• • X *'. LlPH3 •• ERCNT EQUAL •••••• •• x •• ANY •• NU •• SY~~0lS IN •••••• •• TA(ILE •• .* •• ". •••• • ",2 •• •• YFS •• SVSW EQUAL 0 •••••• •. .... .•. .. .. fl.? • .. .. .. .. SlA •• •••• • A3 • ••••• • • i>~ • AI· x ••••• ••• .RS • • AI· • ••••• • 85 • • AI· ••• 54,.. X ..... •• SfTAl··········•• eLANK~ • IN SIIRF.A. • • SPACE PRINTFR • ••• • ••B2 •• •••• •• ••• *••••••••••••••• x IH ••• X •• • :t • •••• fj2 •••••••••• $. •• ANY •• fRRCR5 •• *..* .. •• NO • •••••••••• X. •• • • •• • ••YES • ••••••••••••••••• .•. X Cl X * •. * • .* M~SSAGt: ••••••••••••• • NO *· ••••••• X X • •••• 02 •• 01 •••• •••••• ••••••• CONVERT •• • • • .. .•· .•. (2*.········· TV3 ..-.-.-.-.-.-.PRINT ERRrR •• .• *. YES •• •• •••••• 1 F~ROR •• •• C~LY •• *. * • TO • U;TPUl APr A • ~rVf ~R~OR ~ESSAGF •• DSF TO • • START OF • .WORKING 5TQRAGf. CCUNT, ••••• SET IN OUTPUT. MESSAGE • ~PRrR ~UVE ••••••••••••••••••• x ••••••••••••••••• •••• *• * 82 • ••••• • X ..... •• SU El·········· 1 IN FRROR • • • COUNT. REMOV( • • PLURAL FRCM • • fRROPS • ••••••••••••••••• x ••••• • B2 • ••*** • • X ....• E2.·· •• · •••• •.RFSTORE •• AND • • •• • •••••••••••••••••• XEQ5~ OUPS~ X .... FZ.·······. • EXIT TO THF. SLPERVISCR • •••••••••••••••• • • • Chart BS. The Assembler - Phase 4 Flowcharts 177 ••••• .ElT • • AS· ••• ••••• ·IlT • •*• .... -.-.-.-.-.-*-.-. ·.••••••••••••••••• . NALGN SCAN EVALUATE OPERANC • • • • • • .-.-.-.-.-.-.-.-. ••••••••••••••••••• SCAN EVALUATE (PERAND X X ••••• B1· ••• •••••• • ORGBS • • RELOCATION AND. • OPERAND • • ERROR CHECK • ••• •••••••• •••••• e2ORGAS .RELOCATION AND. • OPERAND • • ERRCR CHECK • .-.-.-.-.-.-.-.-. ••••••••••••••••• ••••••••••••••••• .•.x X C1 •* •• *. .. .* *•• * t NC 01 .• .•.x •• •• POSITION •• 18 EQUAL *. ~ * •• * .. .* 02 *. •• OPERAND •• Nt) •• •• RELOeATA8LE •••••••••• X.. *. •• •• -.-.-.-.-.-.LOAD LABfL. REAC NEXT RECORD • ..... ••••••••••••••••• • .. • * • F3 •••• • x NGEIot2•••• .•. •. *. •• HZ .•. •* •• •. x ••••• • ••••• • *••• x •• .. *. •• YES .* .* ••••• •• ••F3 ••• • * •• * .* •• x JZ .•.x •• PASS 1 *. t . ._ •• •••••• *. .•••• • • YES • NO • • AZ • X X ••••• KI •••••••• •• • • .• .... KZ.········· *ACD 1 TO L.A.C •• •••• ERADO • • STORE RESULT • .-.-.-.-.-.-.-.-. .ENTER INTERNAL. • IN LABEL • * VALUE ILABVL) • • NO • • IN ERTBL • '••••••••••••••••• . •• •••••••••••••••• x x •••• • • •• •••• • • • AZ •• •• •103 ••• • . ..... The Assembler - Phase 5 STATE~ENT ""0 .• • • SYM80L • x ••••••••••••••••• •• •••• • • X ••103 K3 •• • •• •• •• • ••• • ••••••• OPERAND VALUE • tCUAL O. • • • • OPERAND RELOCATION EQUAL O. D5 .•.x •• .. *. .. *••• ••••.. ·•.... • . .* • NO • f5 •• X. X .. ···E5 ..·······••• • VPF.RAN~ • RfLOCATI0N • VAL~~ PUT IN • LA8EL RrLoeA• TION WORD ••••• • • . •••••••••••••••• ..••••.• • INTF.~NAL STATE~ENT NO • • IN ERT~L • ..X. E5 • ••••• .. .. ........ .•. • •••• H4 •••••••• • • • ERSCH • SFARCH ERTal • F~R INTERNAL • STMT. NO. .-.-.-.-.-.-.-.-.•• • •••••••••••••••••• • ••• • 103 •• •• •••• • ·····J3.········· • ERFLG • .-.-.-.-.-.-.-.-. • • UNOEFINED x •• •••• • G4 • ••••• • • NO iC • YES • NO •••••• X iC *. •• .* G4 •• •• UNOEFINED •• YES • •• SYMBVL IN •••••••••••••••••••• X••••••••••• •• OPERAND •• •• • •* •• fOU2 •• .* hUMBER * • •• NU •• IN ERTBL •••••• •• .. • • ••••• •• •• •G4 ••• • x ERSCH • .•• -.-*-.-.-.-.-.-. SFARCH ERT8L • • FOR INTERNAL • • STMT. NO. • ••••••••••••••••• *. •.. * .* • ERAOD • .-.-.-.-.-.-.-..[NTER • ••••• • • 103 • ••••• • X .•.x •. *. •• fQUER X ••• •• FS •••••••••• ••••• G3 ••••• • •••• x • YES ERl •• L.A.C. EVEN •••••• * •• * .. .. •• PASS I ••••••••••••••••• *.•••••• Yl:~ • NO * .. • AZ • •• PASS 1 H3 .* •• * ••• •• •• NO •• ANY OPERAND •••••• •• ERROR •• •• •• NO •• IN FORMAT •••••• • YES F3 .. . ORGBS *. * •.• .* * .• •• ••••••••••••••••• •••• ..x. fl • ••••• • X •* ••••••••••••••• •••• • wCROS TO 1/0 • • eUFFER 19-1Z) • .•. HI·. •• X *. .•.x YES •• UHU~FIN[D •• • •••••• Sy,.SflL IN •• •• fPERANO •• .• [(,lUlL •• ··E4···.····· • FXIT TO THE • • CALLING • ROUTINE • • .* (5 • YES • • x •••••••••••• ••••• • ..... FZ.········· • B4HEX • .-.-.-.-.-.-.-.-. • NO. RESERVED • ••• 178 EIHWR •• •• X .* ••••• Chart BT. .* •••• ·04·· ••VALUE ••••••• • OPERAND • EQUAL O. • • OPERAND • • • RELOCATION • EOUAL O. • • BT • • HI· t. *..* • ••••••••••••••••••• .•••••••••••••••••. .. . X • • •••• .. .... •• •• • •••• •• X. E4 • •••••• :X .......... : • "X. Al • •• . * ORG LAefL VALUE • • SET FQUAL TO • • OPEPANO VALUE • X • YES ••••••••••••••••• . ••••••••••••• •••• • .CE· ... X •• •• NO •••••• • ••••C4 •••••••••• •• • • •••• ~S •••••••••• *. •••• • . ERFLG • •• NO .-.-.-.-.-.-.-.-. ORG •••••••••• x. RELOCATION • •• • LABEL VALUE • • SET EQUAL Tn • • LAST LOCATION. • PLUS I • ORGER X •••••• FlLDl8L •••• •• •• ••• JI x .*. •• X .x ••••••••••• •• FI •• • X.. *. .*. •• • YES •• *•• * ti4 *. .* • YES C3 .* *. .* ...* *. .* ..... • EZ··········• ..... BSSA x .••. • E4 •• X. X .. •• •••• • f4 • ••••• • .*. •• SCAN F.VALUATF rPERANO ••••••••••••••••••• x • YES ••.• ·····•• ••.. ··.EI SET L.A.C. • • EQUAL TO • • OPERAND VALUE • ••••••••••••••••••• .... .• • NO 83 . .-.-.-.-.-.-.-.- •• Jt:. :.......... X: • .. .x * •• * .* X ••••• 105 ••• • •••••• • • • •• •• NO •• OP COOE •••••• •• BES •• •• NO •••••• • YES • t. ••••••••••••••••• *. .* *. ••••• e2 •• •• ••• ••• • L.A.r. SET • • fC~Al TO • • LABEL VALUE • • PL~S OPERAND • VALUE • • •• YES •• POSITICN •• •••••• IA nF RECORO •• •• BLANK •• EQUA •• YES •• MCDE ABSOLUTE •••••• loB .-.-.-.-.-.-.-.-. x 103 .* t • •• RELeCATION •• • • • . •••• ERZ x ••••• AZ·········· ••••• 101·· •• •••••• • • • • · .. .•. •• i ORGA •• •••• 103 •••• ••••• • AZ •••• • . • 111. • • • ••••••••••••••••• x ••• • •• •A3 ••••• •• J4 .. .x •• .* *. •• NO •• NUMBER • •• IN TABLE •••••••••••••••••• X. •. .* *. •. .* .* • YFS .. X EOlll(l X ••••• K4.......... • ••••• ~5 ••••••••••• • ERflG. LOLBL • UNDEFINEO ••••••••• X LOAD LABEL. • SYMBOL. • Rf-AO Nfl(l • • • PECORD .-.-.-.-.-.-.-.-. ..-.-.-.-.-.-.- ••••••••••••••••• ••••••••••••• x ••••• .Cf • • AI· ••• *.*. •* A2 * * ***** * X *** •• A2***** ••• *. ERTBl FUll** ••• SET INDICATOR * * (ERSnAJ * • NCN-ZERO • **********.* ••• *. ·*·*. .-.-.-.-.-.-.-.-. ERXRI X *.**A7*.*.*·* •• * EXIT TO T~E • CALLING • • * POUTINF * .*.*******.**** • .SEARCI-I ERTAL TO. • LOCATE SLOT FeR. • CURRENT NC. • ••••••••••••••••• Cl *. .* *•• * • NO • •.*.**••• ** • ••••• 01.·.*·****· INTERNAL • * NO • • * IN FRTBl, • * AOJUST TARLE • * POINTER • •••••••• ** •• *.*.* .* *.. * * YES .** .•.* • BU 03* i ***.* *·CEAI·* •* * X **.**CS********** * ADJUST RETURN * (RTRN) * ***AOORESS IN PHASE 9 TO • GO TO PHASE 2 * AT HORTZ • * ******** •• ******* X S2505 ****.04 •• *· •• ··*· * CENTER • .HEAOING (MOVE * * lEFT 18 POS.) * ••• *.******.*.*** ****··05*.*******.* HIPR **-*-.-*-*-+-.-.* RESTORE * PHASE 2 * ** •• ** •• *** •• * HONGS i ****.03***·***·*· * SET PHASE 2 • S~ITCH * **RESTORE AT END OF • .HONG PROCESSING* ** ••••• *••*.*.*.*.• .* *. •••• fl •••••• ••••• • BU • .* E3 * • • X **·**~2***·**···. • RPAGE • • RESTORE 1132 • • TC Nfn PAGE * *.** ••••••••• ***. .-.-.-.-.-.-*-.-. • • .*. *. *. PASS 1 *. •. * F2* H05 *. .*. S2S00 X .*.*.C4.** •• * ••• * • PUT LF * • CHARACTER IN * • POSe 1 AND AT • • END FOR • * TYPE~RITER * * •• ***.***.*.*** • x X ·** FXIT TO TI-IE • CAlliNG * ROUTINE * ***** •••• ****** • K2 • * * :x ••••.•.... : • * * • B5 •• X. x .*** HOI:'XT B5 •• .• *. .* HONG *. NO *. DETECTED IN .* •••• •• PHASE Z .* ** • • * *.** • • •*.*. * .X HfNO ••••• 02 •••••• ***. ** SET I~DICATOR.• • • FOR fiNDING ••••• .ENTRY IN ERTBl * ** •••• *.*.* ••• *.* *ENTE~ STATE~ENT ** ••• 84*.**.*.*** ** MOVE 'PAGE' • • TO POSe 73-76 • * OF PRINT • BUFFER • • ** •••• ***** ••• *.* •• *. .CJ * •• x* 02 X X .**.*A5.*···*· •• * RESTORE liST •* * AND liST DECK * • CPT IONS' * * •• **** •• ****** .*** ** • X X • * •• **E3** •• *** •• ** FLIPR *.-.-.-.-*-*-*-*. RESTORE OVERLAY • PREVIOUSLY • IN CORE ••• * •• **** ••• TBlN':J X ·····C'1**.*··***. • SAVE fRTBl * • PCINTER FOR * •••• * NEXT ENTRY * X •••••• *.* •• *.** •• • A5 * ***.* * ..** * *. C2 *••• ***** • • •• •• YES • ERTBl FUll (25 •••••• •• ENTlHESJ •• *. X *• •• A4 *••• ***. * • • NHOPH X ****.A4**·**.***. BLANKS •* •** TOMOVE POSe 1-34 • Of PRINT * • * BUFFER * •••• **.****.*.** • *• **.**.A3.*** •• *** •• TV3 **-.-.-.-.-.-*-•• PRINT I1EADING • • *.***.* ••• ** l<**. x •* •• .**. : x••••••••••• ERAr.r; •• ••••• • ••• BlE~SCH ... •••• •• *** • • • • A3 * *.** .* • • • • X *·****E4*.****.*.*. OISKI *.-*-*-.-.-.-*-.* WR ITE HEAD I NG TO FIRST SECTOR OF CIB *****.******* *.•••••• NU .* * ..• * YeS ••••••••••• X: x *.*.*.F3.**** •••••• X i .*.** *BQ * • FS· • * * X *·**.*F4***.*****. GTHOG • *-*-.-*-*-.-.-.-. PAL6L *.-.-.-*-*-*-.-** READ NEXT RECORD • * ••• ****.*.** * NfW PAGE • ROUTINE • • ***** •• * •• **.***.*• .. . •• ** X FRSCI-I • *.*.GI.· •• *.**·. *• SET ERS~ TO *• • IERn (NC. NnT • IN TAelEI • • •••••• **.* ••• *••• • ••••••••••• X:x • ••• II .• 1-11 *. *. .* INTERNAL *. yes *ST~T. NO. EQUAL ••••• .TABlE ENTRY* *. *•. * * .• YES.. .* Jl .* x •• •••• • U2 * NO X ***··J2***.****** * SUPPRESS * *ltAOING IEROS, • • ~CVE TU POSe * *18-PC OF PRINT. • EUFFER • •••• *.*** •• *.*.* • •• •••• *. ENTRIES I~ .* *. TA~LE •• ~nRE *. .:t •• *•NC *.* Kl x •*. .* 25 •• fNTRIES *. *. *. *. .... TABLE * IN .* YES ••x*. • * * A? * * .*** * Chart BU. X ··* •• H2**··****** ** CC~VEPT PAGE ** .COUNT - AINARY • * • TO Df.CI~Al * •••• ***** •••• ** *** *. .*.x············ : ... ONG2 *. *. .* * .• * * YES *..* Nil •••• .* CUTUP X ****.K2 •• **··** •• ** I~CRrMENT •* * PAGE COUNT • x .*** •* C2 * * *.** * * flY 1 * •••• * •••• **** •• **.* x ••• * • ** A3 *•* **** .* • :X .......... : *. *. .. .... .. •• liST DECK *. NO *OPTIDN SELECTED ••••• *. .* • YES x .*** * A4 ** *• .*.* • x ••• * S2520 X ·***·J4*·*· •• **** *.FORCE lOLBl TO •• • INHIBIT lIST * .AND liST DECK O. * OPTIONS * •• * •••• *.***.* ••• • •••A4*• ** •* X ···*··K3·*.···*··*· PCHCD *.-*-*-.-.-*-*- •• PUNCH HADING * RECORO **.* ••• **.*.* • *.** •• H4******·.*** TV) **-*-.-*-.-*-.-•• TYPE * HEADING * *** ••• * •• *.*. .* x .• J3 .* *•• * * YES X H3 *. . .* *. •• • NO.. liST • ••• *OPTION SElECTEO* *.*** * ...x *. •. x .*. G4. *. .* *. .* PRINCIPAL *. NO •• PRINTER THE .* •••• .TYPE~R ITER.* ****.*G2.*.****** •• DISKI *.-.-.-*-*-.-.-.* REAC HEADING • FRO· CIB INTO* PRINT flUFFieR •••••• **** ••• • .ERlPl •• X* B5 * ***.* * ~ ·*·**·K4***.·*.**·* PALBl *.-*-*-.-.-.-.-*. READ NEXT RECORD * ..**** ••••• ** • x *** • •* A5 •* * • .*** The Assembler - Phase 5 Flowcharts 179 ••••• • ev • ••• X INSU X ••••• Al·········· • I~SERT OP CODE. • I~TO INSBF • • (PITS 0-41 • ••••• A2··.·.··· •• • ~RFLG • • FrR~AT tRROR ••••• • • • • ••••••••••••••••• .... .•. x * ..• ... x Cl •• .• *. •• TAG GREATER •• Nu • THAN 3 GR LESS •••••• •• THAN (j • • .• *. .* C2 •• *. PASS 1 *. *••• .* *. ERFLG TAG ERROR *. ... .. •••••• • • .. '. ..•••••.• •••••••• ••• X. .. .. G2 .. . •• .* *. •• CONDITIONS •• YFS BLANK •••••• X -128 .* •• •• • •• * .* .' ERFLG ADDRESS ... Jl .•. *. E'~ROR ~ES OPERAND •••••• •• ALLOWED •• • ••••• • .... X •• ••••••••• ••• •••G3 INSERT • DISPLACEMENT • • INTO INSBF • • (BITS 8-151 • *. J2 180 .. . X • •••• J3· ••••••••• •• •* *. •• •• FORMAT FORMAT F I FL r· L •• YES •••••• •• .• .. .. ....... •• FIELD I'lLANK •• ~u •••••• .. • DFOUT • PUT INSBF INTO • DSF BUFFER • (BINARYI • • • • • 1'3 • nIsPLAC~~ENT FOR~AT Chart ..... .-.-.-.-.-.-.-.-. *. .* *. .* x x * ••• * .• * • YES •••• • ••••••••••••••••• • NC • •• •••• • JIt • ••••• • • .x •• X .•.x •• ••••• K2 Kl ••••• K3· ••• • ••• •• • * * . • •• •• •• YES • •• NO • INCREMENT • TO BE MODIFIED •••••• •• FIFLD I •••••• • L.A.C. BY 1 • •• .* *. .* • •• *. •• *. .* • .... x x *•• * ••••••••••••••••• • YES • NC •••• •••••• •••• • •••• ••••• • B3 • ..X. Ait • •• X. • •• X. A2 • • • ••••• • ••••• • ••••• • • • •••• BV. The Assembler - Phase 6 •• •• X • •• ·.C5 ••• ••••••• .I~SFRT ABSOLUTE' '(01 UR RELOCAT-• ••••••••••••••••• 04 •••• • .X • HI, • ••• •••• •• CHECK AND COLLECT CUNOITION CODES .. . A~ .. .x • • • .. . • •• •• ••••••••••••••••• x •• F.5 .* *. .:·C~8~D~~l?~ .:.!~~. *. .* *. .* *•• * • x D~ •• ••• ••••• SAVE • • QPERAND VALUE • [PERANO •••••• •• PCSSIBLr: •• • *. NO .• x *.. * • NO •••••• • 04 • ••••• • x •• •••• • H7 .• ·••••.. . X .' .' . ..·~ON01TIO:· •• vrs •• G3 • •• •••• • ~OVE •• .... Fit x ••••• • ••••••••••••••••• •• •••• • • G3 •••• • . INSTS · .. • NO .• • • -. *. •• • • .................. x x *•• •••• •••• • NO •• Dit •• • • .x •.••••.•..•. •• C2 •• •••• ••••• • •• H3 •'.X. ••••• • •• H2 ••• X. x •••• X •••• X HI •• • •••• HZ··.·.····· •••••••• .• *. •• .. • •• H3 ••INSBF • • SCAN • .INTO 1/0 BUFFER • •• LrNG •• NO .-.-.-.-.-.-.-.-. •• FORM VALID •••••• • (9-121. PUT O. • EVALUATE • •. .* • INTO POS 6 OF • • OPERAND • •• .* • 110 RUFFER • • • x *•• * ••••••••••••••••• ••••••••••••••••• •••• • YES •• B2 •• ••••• • x x *. ••••• • SPOND f3···.······ .•..... -.-.-.-.-.-.-.-. • x············ DISP •* *. •• •• FOR~AT OR •• X • • ••••••••••••••••• FI~Lr *. • • • . . • ABLf III FLAG • "NTC 1/0 KUFFER. • • IPOS 71 .•.x············ • NO •••• .•.x •• E3 •• X. B4 • · •• .-.-.-.-.-.-.-.- ••••• • At· ••• .DISPLACEMENT •• YES ..BEYOND 121 TO •••••• • • •• • •••••••••••••••••• X ••••• Fl· •• •• ••• •• .-• • INSERT TAG • INTO INSflF • • lelTS 6-11 • X ••••••••••••••••••• ••••••••••••••••• INCRtMENT L.A.C. BY 1 ••••••••••••••••• 'l;E • • • • X • S~T TAG • • • EQUAL TO 0 •• •• ••••••••••••••••• :X •••••••••• : • • •••• R5 •••••••••• • SCAN • • EVALUATE • • OPfRANO • ••••••••••••• •• •..... E2··········• •• •• 0 ..-.-.-.-.-.-.-.. . ••••.. ·••••• • X Gl x •• •••• •• ••G5 ••• • NO * •••••• I~SERT LCNG INST~UC1'ON • • • .FLAG INTn INSBF. • IBIT ~I • • ••• ·Olt •••••••••• ••••• El.··.······ INST2 .• .-.-.-.-.-.-.-.-. ••••••••••••••••••• . '•••• •.• X. H3 • •••••• · E2 .. X. . .* •• INSXT X • ••••• BIt •••• • •••••• lllL BL LOAD LABEL. • RfAD NfXT RECOItC NOM(,Z X • •••• Cl •••••••••• • ERFlG • • RfLOCATION • • ERROR • • • .-.-.-.-.-.-.-.-. •• • •••••••••••••••••• •••• •. .* .* )( • •••• A~ ••• •• *.... • A5 •••• Ll2NO x X ••••• 01·········· • • •• · '. • NO • YF.S • YES ... *. •••• • Rio •• X.. • • .DISPLACEMENT •• YES •• A8snLUTE •••••• •• NO .• *. · .. B3 .•. • • •• • *T~o-~nRO * . •• YfS •• INSTRUCTION •••••• ••••••••••••••••••• •••• H3 •• X. •• •••• • x .* •• •• ••••••••••••••••• •••• • CZ •• X. ••••• • x .•. SINST •• •• AI, • SUBTRACT • • L.A.C. FROM • • OPERANC VALUE • · .. • NO •• • * •• Nr:loIOD FCER X ••••• B2 •••••••••• • ERFLG • .-.-.-.-.-.~.-.-. • FOR~AT ERROR • AI·. • * TAG *. •• YES.. •••••• FIELD BLANK •• *. .* .• *. •. • •••• A3 •••••••••• .-*-.-.-.-.-.-.-. •• • x •••••••••••••••••• •••• •••• • • J4 • • • •• •••• • •• 82 •••••. ·•....•••.• . •• •••• • A4 •••• •••••• x •• •••• • • A3 •••••X "400 •••• ••• • •• •A2 •••• ••••• • • AI. ••••• F4 •••••••••• • ERFLG • .CONOITION COOE • • F.RROR • .-.-.-.-.-.-.-.- ••••••••••••••••••• :X .......... : ••••• • • • • GS •••• •••• X Ll3F10 •.····G4·· .. ·····.• 0 X • • •••• GS ••• ••••••• • INSERT SF(OND • • WORD INTO 1/0 • • RUFFER • • IPOS 13-161 • • • '~SERT • .CONDITION CODE ••••• • INTO IHS8F • • (RITS 10-151 • x ••••••••••••••••• ••••••••••••••••• •••• • ••• • • • • • •• •Gl ••• • • • . IINST X •..· .. H4·····.· ...• • .... Hit •••• • INSFRT INDIRECT' • ADDRESS FLAG • • INTO INSBF • • 181T 81 • ••••••••••••••••• •••• • J4 •• X • ••••• • x · .. ..o. ... .. •. L rr.. s T •• J4 X • •••• J5 •••• • ••••• •• PASS 1 •• NO •••••• • INCRE~ENT ~y 1 L.A.C. •• • •• •• *.. * ••••••••••••••••• • YES •• •••• • •••• A5 • ..X' B4 • X •••• • •••• • .•...• K4··········• • INCREMENT • • L.A.C. 8Y 1 • •• • •••••••••••••••••• •••• ..X. E2 • ••••• • *. •. .* .* x ·. . .. . .. . ••••• ·sw • • AI. ••• X nCA .• •• •• •. AI ••• •• PASS 1 •. *•• * ••••.. ·••••• • *. •• .* .* NU •••••• • YES • Bl •• X. X ••••• Pl •••••••• •• •• INCREMEPIT •• • L.A.C. BY 1 • •• • •••••••••••••••••• .. X .. ...... C1·.···· LDLEIL .. ··· -.-.-.-.-.-.LeAC LAIHL. REAC NEXT J;'ECORD • ••••••••••••• x ••••• • CE • • AI. ••• . OC?ND X ... ·.El·······.·· SCAN • -.-.-.-.-.-.-.-. EVALUATE • OPfRANC • •• ••••••••••••••••• • • • X *tNSfRT ABSOLUTF • • I~I OR RELOCAT-. • liSLE III FLAG. • IN 1/0 BUFFFR • • IPOS 61 • ..... Fl··.··.···· ••••••••••••••••• X .....Gl····.··.·· •• • INSERT CPEPANC VALUE • IN 1/0 BUFFER • IPOS q-121 •* • • • ••••• *••••• *••••• ••• *·~1**X••• *•• •• .-*-*-*-.-.-.-.-.** • OFOUT OPFRANO *• ~CVE VALUE TO 110 • BUFFER • •••••••••••••••••• •••• .. . •• X. B 1 • ••••• • Chart BW, The Assembler - Phase 6 Flowcharts 181 •• •••• • A7. • ****. *rJl * * ••Al· • D~Ol AI •• o· *. *. .•.x *. •. •• .. .. XLFC .* A2 YFS •••••• *•••• • NO •• .. ... .. .... •• H2 .* •• S~IFT •• •• YF S •• L.A.C. FVEN •••••• •. *. .* • •• •. •• INCRf~F~T .. ... .. .. .. *. *. 1\3 •• X. • x ••••• • fl· ••• ·CA • *. .* .* •••• .* • •.SHIFT •• • • CONSTANT. RIGHT HY ••••• SHIFT CCUNT • .. .. .... .. .* •• •• ••••••••• *••••••••• * .• * 03 .x •• .• : ~~~V~:~Tl~~~ : • TO CO'PLIMENT • FORM • • ••••••••••••••••• •*••• .. •. . * ... ••••••••••••••••••• • X • • x ••••••••••••••••• *••.* Jl ... •• *. *. •• • • COOt TO lie RuFFEP • • ••• L.A.C. BY 1 ••• ••••••••••••••••• X • BitHEX • .-.-.-.-.-.-.-.-. • 1 OF • .CONSTANT TO 1/0. • eUFFER •••••••••••••••••• ~OPO • ••• ** •••••••••••••• •••• ·••••• .• X • 182 • • ••H2 ••• • Kl *.X. X ••••• KI.· •• • ••• •• C(~PU1E SHIFT. • FOR FIXFD • • PCINT • 0 X ...··..· •.• ••.····H3 INC~EMENT • ••••• J3 ••• • •••••• X ••• * • YFS Chart BX X ···.·Hl ••• ••••••• •.MCVE PELOCATICN.• DEOUT .* ·•••••.. • •• . .x ..••.•••••• ·........•..•.••...••••••• x.. B-VALUE •• NO SPECIFIED •••••• •• . * * • (pes 6-7) • •• KI •• •• •••••••••••••••• ••••• • *. ...... .. •• ..... ••••• • • INTtGER • AS FIXFD ••••• POINT • ••• ••• ••••• • X .-.-.-.-.-.-.-.-. ••••••••••••••••••• • Hl •• X. • •••• Hl •••••••••• .• X ·.·.·C3 •• • ••••••• • fOUT • • HOVE EXPO~ENT • • TO CSF BUFFER • T~OS CC~PLIMfNT .* • YES • • ••••••••••••••••• X Gl ••• ••••••• •••• •••TAKE •• • • •• • •••••••••••••••••• •• •• •• TREAT .-.-.-.-.-.-.-.-. ••• ••••••• •••••• F3BTHEX • • MrVE EXPONENT • • TC 1/0 BUFFER • • (POS 6-7) • ••••• Fl ••• ••••••• • RE~OVF SIGN • • BIT, SHIfT • • RIGHT flY • • SHIFT COUNT • • • • .-.-.-.-.-.-.-.-. ••••••••••••••••••• .•.x .. .. X X .*.*.F1 ••••• ••••• Gl •• NO.. INTEGER •••••• CONSTANT The Assembler - Phase 7 A2 • INCRFMENT ·•••••.. • X • •••• k3 •••••••••• • OFOUT • • ~OPC 1 OF • • CO~STANT TO OSF • BUFFER • • .-.-.-.-.-.-.-.-. ••••••••••••••••• x •••• ·•• A4 .•• •••• • • E4 •• X• .. X • ••• ·.E4.·••••••••• LOL8L LOAD LABEL • ..-.-.-.-.-.-.••••••••••••• •• X. 113 • • FLOTO ••• X. EVALUATE OEC UPERANO • X ....•04··· ••••.·•• • • • L.A.C. BY 1 • ••••••••••••••••••••• x ••••• • CA • •••• • 02. ..••••.• *. ••••••••••••••••• X •• •••••• E3 •• ••••••••• • I~CREMENT . .-.-.-.-.-.-.-.- *. • NO X . ••••• C4.· •••••••• • OFOUT • • WORO 2 OF • .CO~STANT TO OSF. BUFFEP • • B •• YES SPECIFIEO •••••• *. • YES ••••••• E1.· •• •••••••• ••• L.A.C. BY 1 ••• ••••••••••••••••• . X X ••••••••••••••••••• • YES X • •••• B4 ••• • •••••• . -.-.-.-.-*-.-.-. •• •• .· A4.···.····.• • ...INCREMENT • • • L.A.C. BY 1 • •• •• ••••••••••••••••• • 114HEX • •• I~C~EHE~T .-.-.-.-.-.-.-.• L.A.C. BY 3 ••••• • ~ORO 1 OF • .CONSTANT TO lin. •• •• • eUFFER • x ••••••••••••••••• ••••••••••••••••• •••• • • •• •••• • • E4 • ••••• • • C3 ••••• •• ••••••••• •••••• C3fLOTO • E~ALUAT~ XLFC • • OPERAND • ••••• 02 ••• • •• •••• •• x ••• • ••C3 •• •••• •• •• X •• PASS 1 •• *.• * x *. ... NO •• • •••••• POSITIVE ••••••••••••••••• :X •••••••••• : : •••••• •• x C2 • L.A.C. KY 1 • .SET LAVAL EQUAL. • Tr. L.A.C. • Nf' •• .* • 0: CCNSTA~T •••••• .* *•• • * YES ·•••••.. •••• • •• NO PASS 1 •• X THAN •••••• • .. * •• •• X •• • •••• E3 •••••••••• •• • NU ••••• (1 ••••• ••••• 01 ••••• • CA • • 02* ••• *. COu~T •• YES 31 N(, X •• .. ..G~EATF-R .* x • NG .x A3 •••• A3 •• YES •••••• •• ~INUS A"3 • .... ... .... • •••••• x •• SHIFT C/JUNT *.*. • x III •• •• •• x *.. * • .. .. .. ........ .x •••• ·•• A4 .•• •••• ••••• • •.* •• • x ••••• ·CE • • AI • ••• ••••• • * A3 • •• •••• *,,*"'* • • 11.2 *••• • Fll ***t Flll1 r t X ••• **A1······· ••• *****AZ*··.·· •••• RFSfT • SWITC~ES ANO • • ~LFFfRS TC • • lrRQ • •• *.*.*** ••••• * •• •• • • • •• •• At ... *. •• * .• * ... .* •• *. .* •• •. • •••••• ••• ••••SETe3 ••• •• FLNIS • • • * • • *•••••••••••••• ••• .* * •. * • NO .* 01 •• SIGN MINUS .* C3 •• .• *. •• CPERAND •• NO •• CHARACTER •••••••••• •• EllANK •• x t. •• *CA * • YES • DZ* • • CCLLECT • • I'ANTISSA • • DIGITS • ••••••••••• **.*** x ***. • •• A7. •• .. ... .. x 02 *. *. () x *** • •* B7. .* .• • • .."'. •• •• X. A2 *• **•• *• • x * •• * • NO •• •• •••• • •••04**•• FLlP2 X *****EZ**.***** •• • • NGP * OR MOX 3 * • x* •••• .* • F3 .* .. .x •• *. *. +. .* +• • * •• *. *. .* *... ** ••• G3 *. lARGF fOR •••••• eUFFER .* •• .. . x *••• * • *** *CA * * 1)2. •• x* C7 * • • • •••• * * • NO X ••• *. .* .* .* x ••••• .* F4 x .*. •• • FlI • * .. .. .. x •••••• • A3 • • • *• * •. * *. • YES •• WORD OF •• YES *. MANTISSA •••••• *eUfFER A'O'. *. .... *.* A 'B' *.• * *•• •• •• • LEFT •. .. ·CA • • EZ. G3 •• x. fLFNL •* *. .MANTISSA Toe*. YES •• ••07.· • 01. ••• •• OPF.RAND •• NO •• CHARACTER •••••• x • NO •• * • • NO •• •• YES *.ZERO I'ANTISSA •••••• *. E4 .•.x .81 • •• OPERAND •• YES •• CHARACTER •••••• INITIAL • • BINARY • * EQUAL EXPONENT * • 192 • ••••• *** •••• ** ••• • X *. *. • •• * .* ••••• E3*.* ••••• *. •• •• x •• CHARACTER •••••• •• AN 'E' •• X *·.*·r?· •• ******* * MPY * *-.-*-*-*-.-*-*-* • COMPUTE * * BINARY • * I'ANTISSA * ••••• *****.****.* •• •• • ••••• • • *. •• .•.x 04 .* *. •• OPERAND •• YES • NO **•• * ••• **.*.***.** G2 FLSSC • • •*•• *• • 04 • *•• *. • X •• ***F1···*·**·.* * SFT FLrATI~G * • SIGN IFLSGN) • • "(NUS • •** •• ****."'* •• * •••• FLF IN X *.**.03 •• *.· ••••• * COMPUTE POWER • OF 10 • • * I'ODIFICATION * ••••••• ** ••••• * •• •• .OPERAND CHAR •• YES •• lESS THAN •••••• .* * •• * • YES ..**. ••• •••• *• •• Nil •••••• ••••• • .•. •..• X • • ~CN-INTEGFR ..*. ..* •• C2** •••••••• •• YES •••••• TO INDICATE • *.......... .• x ..... •• •••• • * • • • C3 •••• ••CZ ••• • • ••••• x ·...... HLP *. A~PERSANC *. SET DECIMAL POINT COUNT TO ZERO • A2 •• •••• •• •••• • •• Cl ••• X. . .. ... .. •* • • • ••x*. x *. • X X .* SIGN *. • ••·.··1-'2.· ••••••••• *. x C1 •• ** ••••••••••••• • SET FLLPZ • E~UAL TO • MCX 3 -1 • .* •••• ** •••• ** ••• • • • '" NO ... • * (PERA~O P(INTER ONE C~A~ACTEP RIGHT • AZ •• X. • '" •• YES •• SIGN PLUS •••••• *. * * *•• ~(V[ ·••••••••..• ~ .• X * •••• A3 ••• ** •••• * ..*. x .* x •• •••• • C3 • •.*.* • •• •••• • K3 • • NO * X ••••• H3 •••••••••• • SRT • • SHIFT BUFFER • RIGHT 1 * • •***.* ••••••••••••• ••••• . -.-.-*-.-.-*-.-. X ..... •• J3.····.···· • BINARY. UPD~TE • EXPONENT ••••• 1 • •••• *••• BY*••••••• *••• x •••• *~** *FlY • ·.*•. ... * K" HHj)\ t ••• '" x •• •* ••G3 ••• • K3 •• • :t *• •• MANTISSA •• YfS NCRMAL 11 ED •••••••••• *. • • • • .* x • •••• • '><.. : * *** * : K'I :: ***",* Chart BY. The Assembler - Phase 7 •• •• • NO x ••• *• • Ill • .Bl • •• C!. • • AI. • * • Flowcharts 183 ••••• ·ElZ • • At· ••• ••••• • ••••• • ,( ••••• Al •••••••••• A2 • • SHIFT • • BUFrER L[fT 1 • •-.-.-.-.-.-.-*-. ••••••••••••••••••• •. •• .* • VF~ .... SUBTRACT CALlIN~ ••••••••••••••• • ••••••••••••••••••••• i •••• • •• •••• • ."l A3 • • D~ •••• ••••• • • • . BUILD • • SPECIFICATION ••••• • • 1 • • POWE~ .... x FL~C • • OF Ie • ••••••••••••••••••• • SFT INPICo610R •• HP • ~rN-INT~GFP X ··.·.03· ....·.··.• • ••••• 07· ••• • ••••• •• ••• • •••• C3 •••••••••• •• r2 •••••. •·.···01.·· ...···.• x ·BY • • 04 • ·x ROUTINE **** Fuse ..... •• •• •••• • ·'H X •• •• •• • NO ·· .. • • ····(2··· fXIT TO •. THF • • .x •• CHARACTfR.. YFS •• LESS THAN r •••••••••• X •• • • .. .. .. 1\3 • • ••••••••••••••••• •••••• ~nDIFIER LFSS •• •• THAN I; •• r~n~ ••••• ·CA • • oz. ••• • POINTfR TO • • RFTURN OUTPUT • •* *. NQ •• P8WE~ OF 1~ •• •• •••••••••••••••••• ••• x • • • • x ,( CHARACTER AND MOYE POINTER RIGHT 1 • BY • '" K3· • Cl •••• • .* •·····P,7··.···.··. •• • SFT XR7 • • x ••••••••••••••••• ••••• *. •.LOAO •••••• • NO • C1 *••• FlXXX • • .... ... .... ~PRE •• T ... .AN Z'ir; •• X •••• .K7 • X • •••• A3 •••••••••• •• ..EXPONfNT • •••• Bl··· •••• ••• • UPOATF .. • RINAPY ••••• • ~XPCNENT flV -1 • • .•.x A3 •••• •• •••• • .* *. •• VFS •• MIN~RY SL T • •••••• • "2 • • TURN ON FLBSW • • AND INDICATE • • NCN-INTEGER • • ••••••••••••••••••• ••••••••••••••••••• : X •••••••••••••••••••••••• : x OIV ..... E2.......... . •••. F3 •.•••.•.••• • SfT M [ , n ( F Y . . X •·····~1··.···.··· MPV • .-.-.-.-.-.-.-.-. ·••••••••••••••••• ... ··.. • • • INSTRUCT1(~ • • SUBTRACT 5 • FeR • • FROM PREVIOUS • PCSTTIVF. • RF~AINDER • SPI:CIFICATION • • ••••• • ~UlTIPlV RV lr '" • r:~ •• .* *. VF~ •• PO~FR OF •• •••••• In FQUAL n •• • Fl *. *. * ••• • .* .* .* *. • or 1'" . • .-.-.-.-.-.-.-.-.• X FLF(\( X ••••• Jl •••••••••• • • • Chart BZ. 184 The Assembler - Phase 7 ... *. .* .. .i •• *. * .. * .* MO~IFY I~STRUCTION SP~CIFICATIO~ x · .. •• •••• • 06'1 • •••• • • • ·· .. . •.... KZ·········· ·CII • .. ['Z· • K2 fL2 •••• •• -. *•• * • MCVE OPI:RANC • • PPIN'[R 1 • • C~A~A(T~R • •• • • 6 • • RIGHT • ••••••••••• .... i •'" A3 •• ••••• • . .* .* ·.....H3.·.·........ • ADe 5 BASK • AND TURN OFF • CARRY • .. • ·•••••••••••••••• .. :X .......... : • X ••••• J3 •••••••••• • DIVIDE •• • • BY )0 • ••••••••••••••••••••• x. i •• •• X *. • YES FOP NEGATIVE .. - .x • YES * ••• •••xc.. *. • NO H2 G3 ..SUBTRACTION •• NO ..RESUlT MINUS •••••• * ••• .* ••••••••••••••••• Kl •• .* *. •• Y~S •• BINARV •• fXPUN~NT LE<;S •••••• •• THaN r •• A7 • •• •• OPEPo6ND •• NO •• CHARACTlR A •••••• •• ~INUS •• • • • x • .•.x ·····J2·······.·· • SET • • • •• ... .... .. .. .... •·• • • ••••• • x .* X ••••••••••••••••• ~w (;Z *. •• •••• • K7 • ••••• • •••••••••••••••••• i ••••• • •·BV •G". • • IN<;FRT • fXPCNENT ~Nn • SIGN I~ • r.()~4STANT .• x ••••• Hl·.····.··· • DIY • • O'YIDE ••••• • RV 10 • • * •. * • • • YES.. CPEPAND •• X••••• CHAPACTfR AN •• ..""P[RSAND •• ••••••••••••••••••• •• X • •••• F3· ••••••••• • TURN ON •'" •• CARRY ••• ••••••••••••••••• *. • NO X • .. .x •• YES.. ePE~A~r •• • ••••• CI CREMENT •• • L.A.C. • • BY 1 •••••••••••••••••• •• INSERT 'I' • IN • 1/0 BUFFER • • (POS 7) • • • • ••••••••••••••••••• • YES X X ••••• F4 •••••••••• • •••• F5 •••••••••• • INSERT NAME • WORD Z IN • 1/0 BUFFER • CPOS 13-161 • J~ERl •• • 1/0 BUFFER IN •• (POS 7) • • • • • X . :OS2ND X .····G4OFOUT ......... .• .-.-.-.-.-.-.-.-. NAME WORD 2 • ··· ..G3·.··.····· CLLCT • -.-.-.-.-.-.-.-. • GET • • NAME • • • ••••••••••••••••• • .. ... •• •• H3 .•.x •• hAME OK .. • 3 • 1(3 •• X • • X ••••••K3 ••••••• •• •• ••••••••••••• X ••••• • AI. ••• • CE • ••••••••••••••••• X • •••• ~5 •••••••••• •• INCREMENT •• •• • L.A.C. • •••• • L.A.C. • • BY Z • 1 • ••••••••••••••••••• x •••••••••••••••••• • x •••• •••• • ••• • A4 •• .CB • • K3 •• •• •••• • •• •••• • •• J4 ••••• x •••• .•. LINKA X •• INCREMENT • J4 •• •• •* •• • ·••••.. ..-.-.-.-.-.-.-.. . .-.-.-.-.-.-.-.- • • X ... LDLBL LOAO LABEL. READ NEXT RECORD X • •••• H4 •••••••••• L.A.C. BY TO DSF BUFFER • • •••• G5· ••• •• •••• • DFOUT • .WORO 2 OF LONG • • eSI TO • • • OSf BUFFER ••••••••••••••••• •• YES •••••• • • ••••••••••••••••• •••• • • • • • ZERO • • ••••••••••••••••• ••••••••••••••••••• •• ••••• K2 •••••••••• Chart CB. X ·····C5 ......... . • INSERT ZERO • • • INCREMENT L.A.C. ·.. BY •• X. C3 • •••• • •• .. .. PASS 1 *. ·•••••.. • NO •••••• .• .:41 • INSERT NAME IN ."ORD 1 • 1/0 BUFFER • (PCS 9-IZ) • • 11.4 •• X· X A5 • X K4 ••• •• ••••• •••• •••INCREMENT • • • L.A.C. • • BY 4 • • • ••••••••••••••••• •••• .......• •• X. KJ • •. • • • • ••••••••••••••••••• x ••••• • ••••• • • YES •••• BY • •••• J5 •••••••••• *. •• . ••••• IC5 •••••••••• • • •• OFOUT NAME WORD 1 OSf TO BUFFER .-.-.-.-.-.-.-.-•• •• ••••••••••••••••• x ••••• .CC • • AI· ••• • •••••• lINKZ ••••• 04 •••••••••• • t • .. ... * •.•••x *•• • * YES 1 • • • ••••••••••••••••• •••• OSAA •• YES ••••••• ••·····HZ····.·.··. •• II\CPfMENT • INC~fMENT TO DSF BUFFER • • 1 *. •••••••••••••••••• •• x * .. .* . •••• • NO • NC • C~ •• :X .......... : : .......... X: •• •••• • X X X J3 ••••• ••••• •·····J2··.·.····. INSERT ZERO • ••·····JI··········•• ••••• ••IhCPEMENT •• • • • •••• X *. *. X ••• ·.Fl •••••••••• • DFOUT • .NAMf WCRO 1 AND. • INDICATORS TO • • DSF BUFfER • x ••••••••••••••••• •• •••• • 02 • ••••• • x • NO •• •••• • ••• NO •• NAME OK •••••• • •••• C4 •••••••••• X Fl· • •• . * DFOUT • .•• -.-.-.-.-.-.-$-. NAME WORO 1 • • ••••••••••••••••••• • .•.x .CB • ••••••••••••••••• "A~E • 85 • • • • • • X ••••• EZ·· •••••••• • INSEPT NAME • • WORO 1 IN • • 110 BUFFER • • (POS 9-121 • X *•• ••••••••••••••• *••• • x •.CE •••• • • AI· ••• ••••••••••••••••••• • IN • • ..-.-.-.-.-.-.-.. •• •••• • 02 •••• • • X COP •••• .x •••••.•••••• • 1 ····.·C3 ••••••••••• LDLBL ••••••••••••••••• X LOAD LABEL. • READ NEXT • RECORD ••••• OZ· ••••••••• • INSERT 3 'CALL). • OR 2 (L IBf) IN • • Ill. BUFFER • • (PUS 6) • •• •••• • "1 •••• • X · .. . • • INCRE~[NT BY '3' • INSERT NAME .WORD 1 IN • 1/0 BUFFER • (POS 9-121 INCREMENT L.A.C. • INSERT 1/0 BUFFER (POS 6) ••••• B4 ••••••• •• • • ••••••••••••••••••• •••• C3 •• X. •• •••• • • CllXT •• A5 •••• •••••••••••••••••••• X ·····(1····· .. ··.• • • • • • X II\CREMENT L.A.C. RY 1 • .X • •••• A4 •••••••••• • • • • • • • ••• 83 •••••••••• •• • • • • •• ••••••••••••••••• •• Of OUT NAME WORD 2 10 [SF BUFFER x •••••••••••••••••• •••• • • • E1 • ••••• • YES X • •••• P2 •••••••••• .. .* • • • • •• I\C •••••• ....* ... • DSAZ ••••• A3 •••••••••• t. Nl. .-.-.-.-.-.-.-.-. •• PASS 1 .... •••••• •••••• A4 •••• X ••• * * •• * • A2 ••• •* ••••• • • K4 • ••••• • CC • • AU ••• X ••••• Al·········. •• INCRFMFNT •• • L.A.C. • • BY 1 • •••••••••••••••••• • X ••••• el •••••••••• • INSERT NAME • • WORD 2 IN • • • lID P.UFFER • CPOS 13-1f) •• •••••••••••••••••• . X ..•.. C1·········· r.fOUT • -.-.-.-.-.-.-.-. NAME WORD 2 • • • • • TO e~FFER • CSF • ••••••••••••••••• X 01·· ••• • •• •• •••••••INCREMENT •• • L.A.C. • • BY 1 •••••••••••••••••• •• x ••••• • CB • • 1<3. ••• CllCT ••••• Gl·········· • SET UP SCAN • • FOR SYMBOLIC • • OPERANDS • • CNLY • • • ••••••••••••••••• ...... .......·. X ~l.· • SCAN • COLLECT 2-~ORO • NAME, STORE IN CLBUF • -.-.-.-.-.-.-.- •• • •••••••••••••••••• ···.·Jl·....····.• X •• • • ~ESTORE SCAN TO NORMAL STATUS • • • ••••••••••••••••••• X •••• 1<1 ••••••••• • • • EXIT TO THE CALLING ROUTINE ••••••••••••••• • • • Chart CC. The Assembler - Phase 8 Flowcharts 187 ••••• ••• X ••• ••• • •• •A3 ••••• •• ••••• .co • • CD • • AI· • A7· ••• X ••• A2 •• .• *. .* *. •• •• ytS YFS •• CELIMETER •• •• PASS 1 •••••• ••••• IN PCSITICN 35 •• EXITA AI •. •. EBCA •• *•• * .* FBPO: X ••••• A3 ••••• ••••• • P~CK 2 EBCCIC • • CHARACTE~S • • FEP WO~O • .. .......... .* • • NU • B2 •• X. X fX2ND ·.···B1·· ••·•·.·. .. •• EBCR .•.x .X ••••• ~2· ••••••••• • ERFLG • • SYNTAX ER~PR • • INSE~T • .RElCCATION INO-. • ICATOIl ((1) IN • • 110 BUFFER • .-.-.-.-.-.-.-.-. •• •• ••••••••••••••••• ••••••••••••••••••• .-.-.-.-.-.-.-.-. X •• •• . EBLP X • •• C2·· •••••• •••SCAN FOil ••• RIGHT • DEllMETER • • AND DETERMINE • • C~APACTER • • crUNT • X •.... 01········ ..• OFOOT -.-.-.-.-.-.-.-. lOX TO • ~CVE MONCL TO [SF BUFFER • • ••••••••••••••••• · . B3. R[('o~O ••••••••••••• x •.CE•••• • •• .,.,. • AI • *. ........ PASS 1 •• YES .* •••••• X ..···C3 •••••••••• • OFOUT • • ~CVF 1 WORO • TO • • • [SF BUFFER • .-.-.-.-.-.-.-.-. ••••• • ••••• • • • • • • ..-.-.-.-.-.-.- • NO •• INCREMENT •• • L.A.C. BY 18 ••••• ••••••••••••••••••••• x ••••••••••••••••• .• •. X ••••• C2· ••••••••• ••••• C1 •••••••••• • BlttlfX • • INSERT SHOIlT • • L[X TO MONel IN. • 1/0 flUFF FR • X lDlRL LOAD LABEL. IlEAD N~)(T AI, • ••••••••••••••••• :X .......... : X • •••• 03 •••••••••• • • ••••••••••••••••••• • • • ••••••••••••••••• INCREMENT L.A.C. 8Y 1 • • • • X ............ . X ••••• E1 •••••••••• •• • • INC~EME~T L.A.C. BY 1 •• • • ••••••••••••••••••• E2 .•.x •• *.. * • NO x ••••• ·CB • • K3. ••• i ••.•• F2.·· •••••.•• • BlottEX -.-.-.-.-.-.-.-. • COUNT. . CHARACT~R • TC PGS q-12 IN • IIG BUFFER • • ••••••••••••••••• x •• •••• • A3 • ••••• • Chart CD. 188 The Assembler - Phase 8 .. ... .. .... .... .... x .* *. •• C~APACTER •• YES •• COUNT ZERO •••••• •. .* *. .* x E3 •• •• ALL •• NO • • •• CHARACTERS •••••• X. A3 • ..PROCESSEO.. •• *. • .*YES •• •••• • B2 • ••••• • i ••••• F3 •••••••••• •• • • RFTURN RIGHT DELIMETEIl TC 1/0 AREA •• • •••••••••••••••••••• .. •••. • •• X. AI, • ••••• • .. •• •••• A4 ••••••••••• ••••••••••••••••••• ••••.. ·•.... • • NC • •• •••• • AI, •••• ••••• • • ••••• • A.3 • ••••• • ••••• •c[ • • Al. • *• • .•.x AI.. • •••• A2 •••••••• •••• *. • PALI1L • •• •• YES .-.-.-.-.-.-.-.-. •• X.r[~~E~TS SlMT ••••••••••• X.RFAO - PASS 1 • • •• •• .O.,TIGNAL LIST -. •• •• • PASS 2 • • NO •• ** • Al •• •• •••• • X ~N[MGNIC • • X ••• ·.Cl··.······· • • • SET LABfL VALU~ •• ILABVLI • FCUAL Te • L.A.C. • •• • B3 .. .x •• ER.ROR 84 X •••••• C3 ••••••••••• • • ••••••••••••• :X .......... : X • • • EXIT TO REQUIRED PHASE ••••••••••••••• •• *. A8S, •• YES •• np SPR •• .155, ENT, ERR, •••••• *. .* *. • .*NO X • •••• C4 •••••••••• •• • •• INCP.fMFNT L.A.C. • BY 2 • •••••••••••••••••• • • : X •••••••••• : X X • ••• 03 •••••••• • .. .x .* •• LIBR, t. • NO LOAD REQUIRED PHASE • •• ••••••••••••••••• •• PHASE •• YfS •• SEPVIC(NG OP •••••• COOE I~ CORE. .·· .. 01······· .. · ••••••••••••••••• • •••• A4 •••••••••• ........ •• ••••••••••••••••• • StT LABEL • .PELeCATION PIT. • EUUAL TO • • ~OCF OF • • ASSE~PLY • •• •• • ••YES •• •••• • Al • ••••• • .. .x *..* x UP COOt •••••••••••••••••• • •• •• ••••••••••••••••• •• •• B1· •••• • •••• ••• • ••• PACK .NC SAVE • • • • A3 •••• • ERrlG • •• UP coo~ •• NO .-.-.-.-.-.-.-.- • •• IN TA8L~ •••••••••• X. UP CODE • .. •••••• 04 •••••••• • •• • • • LOLBl LOAD LABEL • READ NEXT ..-.-.-.-.-.-.- • ..• .• Rf'CORD ••••••••••••• •••• •• X. Al • X ••... ··..•• ••.*··.FJ S[ARt~ • • OP COOt •••• • TAPLF • ••••••••••••••••••• • x •• •••• • A3 • ••••• • Chart CE. The Assembler - Phase 9 Flowcharts 189 ••••• ·CF • • A3· ••• •• •••• • A2 •••• •••••• X SCAN ••••• Al •• •••••••• • • : 1~6A~WV¥~~~~S : •• •• ••••••••••••••••• •• • • • SET TYPE TO NOPl, ALLO. FULL SCAN *. SKPCB. *... * .• B2 •• .•.x x ••••• ·CH • • 01· ••• ..... x CZ •• •• CPERAND •• YES •• CHARACTER A •••••••••• •• MI NUS •• x •• •• ·CH • • Fl. • NO .... • SET TERM •• AND RTERM • EQUAL TO 1 • •••••••••••••••••• • .* •• *. .... ..... •• •• .CG • • NO .. .. .•.x • NO .•.x ..C~ARACTER EI •• •• OPFRAND •• YES •• C~ARACTER A •••••• •• ElLANK •• *. .* 02 •• OPERAND •• YES AN •••••••••• ..ASTERISK •• X • • • .* ..... ••• X • K3. ••• X TYPE .•.... EZ··· ...····• • • • NOP OR BRANCIi • • • • • x ••••• ••••••••••••••••• ••• • CIi • • ~l* .•.x Fl •• .. * •. •• UPERAND •• YES •• CHARACTER A •••••• •• (CMMA •• •• F2 .•.x •• *• .. .. ••••• .... ..•••••. ••• ~ ..... •• CPERAND •• YES •• CHARACTER A •••••••••• •• SLASH •• x x • •* •• •• ·CG • • NO • NO • CH • •• X. A2 • • HI. • F3 • ••• •••• • ••••• • CF • • HI. ••• LABBL HI ...x HZ •• •* *. •• ~~Y ElLANKS •• YES •• EMBEDDED IN •••••• •• LAefL •• *. * •• * .* • NO x ••••• .CK • • EI· ••• x •••••• ·CK .•.x •• .• *. •• (PERAND •• •• .... C~ARACTER •• PERIOD • NO • Gl. JZ .•.x •• 0 •• •• x ••••• • CG • • C2· ••• 190 ••• .CHARACTER EQUAL ••••••••• OR lESS THAN. X •• • NO Phase 9 .CG • • G3. •* *. •• (PERAND •• YES •• Chart CF. The Assembler - ..... YES A •••••••••• •• X •• •• ••• ••• •••••• ·CG • AI· ... .•. .. ••••• 01 •• •••••••• x • NO ••• X ..... •• •• •• .... • • ••••••••••••••••••• .... YES •• CHARACTER A •••••••••• •• BLANK •• X YES ..CHARACTER AN •••••••••• ..AMPfRSANO.. X •• •• .CH • • NO • 01. • • X A3 ••••• ..• *. •• OPERAND •• *. .• *. •• CPERAND •• ···.·Cl ••••• ••••• • SET COL3 • • TO • • NCPl • *. •• • NO •••••••••••••••••• SCNLP .•. •• OPERAND •• YES •• CHARACTER A •••••• ~. PLUS •• X ••••• Bl •••••• • ••• •• AZ • •••• .CG • • J4. ••• ••• .CG • • Fl • ••••• • Ill. ••• •• •••• • A3 • ••••• • • CG • A2 • •• •••• • ••••• • • .-.-.-.-.-,.-.-.-. ••••••••••••••••• ••••••••••••••••• X ••••• Al· •• •••• •• • • ~OVE SCAN • • POINTER ONE • CHARACTER • • • RIGHT • • Rl .•.x •• .* *. YES.. OPERIINO •• •••••• C~ARACTER •• *. COMMA *•• * .* • NO A •• •• X ••••• A2•••••••••• • • • • SKPCB SKIP PAST COMMA OR BLANK .* • • • • A3 .•.x •• •••• • CG • • A4 •••• • • • FERR•••• X .•.... A4.··.·.····• • SYNTAX ERROR • •• X. TO • • • • ERFLG • • ••••••••••••••••• •• •••• • A4 • ••••• • •• YES.. OPERAND •• ••••• CHARACTER EQUAL. OR '"'ORE THAN. •• 0 * •• * •• • NO X B3 .•.x •• .* *• •• OPERAND •• YES •• ·.e2··.······ • EXIT TO THE • CALLING • • ROUTINE • • •• ••••••••••••••• CHARACTER •••••• .LESS THAN A. *. •••• .CG • • Cl •••• ••••• • • SMeOL X ••••• C2 •••••••••• •• SET TYPE •• • FOR BRANCH TO • • SXMTP •••••••••••••••••• •• *•• * .• x ••••• • .ce. •••• · ... A4 .. X.• •••• ••••• • • NO : .......... X: C3 .•.x • A4. X • •••• C4 •••••••••• •• .* t. •• OPERAND •• NO .CHARACTER VALID ••••• ..fOR RAOIX •• • ERFLG • SYNTAX EHROR .-.-.-.-.-.-.-.-.•• •• • x •••••••••••••••••• •••• •• A4 •• ••••• • x .•. X X X ••••• 03 •••••••••• 01 •• ..... .•.. ··04.·····.···• •* *. • 01······.··· •• •• ,",ULTIPLY •• •• OPERAND •• NO • SET SCAN • • STORE •• CHARACTER A •••••• • OUTPUTS EQUAL • • ACCUMULATED • • BLANKS IN • •• PERIOD •• • SYMBOL BUFFER • • • INTEGER BY • TO ZERO • *. .* RADIX • • • x ••••••••••••••••••• •• • * ••••••••••••••••• •• •••••••••••••••• ••••• • YES • CF'. • ••• • A3. ·•·CG. E4 •.. X.• ••• .X X SCNEX X X ••••• E2 •••••••••• ••••• E3 •••••••••• ••••• El·········· ... ··E4.·.··.·.· •• •• • SET XR2 .•• •• •• •• SET XR2 •• • SCAN ADD • NEWEST DIGIT ••••• • • POINTER ONE ••••• FOR ••••• • • POINTER TO • RfTURN OUTPUT • • TO PRODUCT • • CHARACTER • • SYMIlOL • • • CeLLECTION • • R IGI- • ••• • • . SPLlJS X ..... 01······ .... • COl l 'to '.. .• .• YE S •• "" x .•. ·•- .. .. el •• *. *. *••• • ....• . ••• .•-.-.-.-.-.-.-.-.• *. S"'Nl'i 'I( ••••• FI· ••••••••• • ceLL '" • r.~lLECT TFRM • .• •• •• x • •••• u~ •••••••••• COL'I •. Fl .•.x •• • • •••••••••••••••••• *. *•• *.* .* •••••• STSCH SEARtH SYf'!flOL TAHlF • • • • •• x ••••••••••••••••• ••••• .CG • x • GI· ••• .* .i. •• *. *. •. *. fJ~LflCJ\T'1··d .12 .. •• .* .:. ••• * ST AI> ••••• KI •••••••••• • ~cT r~TFRNAl '" • ~~LL(ATION • •• ·"."\OIICI-I TI' MOol'. •• f'1F ... .. * .... A5sr,.PLY ... I; ...........:•••.••.• ••••. ·•.... • x • A2 • • P'OFRT ~O ..... .•.x •• X •• .CI • • ••Al•• .. ...*. • ••• AOSUA •••• YfS •• SET TO ADO •••••• •. x ••••• • K~ • X •••••••••• •••• · -. • •• .~ *. *•• * .* . . • NO • .CG" • P7 • •• X. KI .... • • • NO ••••• J~ .... . . ·••••.. ••••• ·•. • • •••• •.... • . •••• ••.•. .•··.· *•• : * ~ •. *. .* • " ~~LTIPIE ". YfS •• ~EFfNIT'O~ •••••• Nfl .:c •••• ••••VALII) ••• H3 *•. * • Yf-S J2 •• -... • ... x. :......•* • .•. .~:lncI~:~,L,T:: •• ~~~ •••• .. ...... • CH" G3 •• EOUAL I) •• •• H7 ... •••• SY"'HOL . ' ... NU *. Pt~I~[O •••••• • '" • • ADO OR • • SUBTRACT TERM. • TO/FROM • • VALUE • . 'I( • crLt • COLLECT TFRM X • •••• F3 •••••••••• Nil .-.-.-.-.-.-.-.-. .... .-.-.-.-.-.-.-.-. ·...............•'•'"" 192 •• Nrp OR IlRANCH Tn CLRES ROUTINF AU"ilitl *. •• OK SY"~OL • • • • •• • •• yl ••••••• ••• The Assembler - Phase 9 X • • • x ••••••••••••••••• ••••••••••••••••• ••••• ·CG • •••• ·CH • • H7. • H I · ••• ••• • • . x Chart CH. • • • • • • •••• [3 •••••••••• •• ••••• Gz·· •••••••• SUBTR~CT ~ I.~ ••••• • B? • •• •••• • ••••••••••••••••• • YFS Gl···· ..····• •..... • SFT ADsue • • TO ••••• •• •• *,.* x ••••.. ·•.... • . YI'!; X X • : .* • NO • E3 •• X• • • ••••••••••••••••• JI .... • HZ. •• SALNK *. INOICATE • RfLOCATABLE .FlFMfNT CTRLSW • NOT FQUAL"I .• .* X . S~T .. •• NU.. TYPE •• • •••• FCUAL SYMTP •• x ·CH • Fl· ••• x ••••• • C3 • •• •••• • .2 PFLOCATABLE. YES •• ELF,.FNTS IN •••••• •• PR,)OUCT •• ·Gl* ••••• E2 •••••••••• ..... El···· ..... . • LABCK • •• •• AOSUP -.-.-.-.-.-.-.-. • TO ADO ••••• • CCMPR[SS • • ANC CHECK • • SYMBOL • •••••••••••••••••••'" i ••••••••••••••••• • •••• • ce • •••• · Nn •••••• •••• ••••• ·CG • x •• •••• • K2 • ••••• • X .. .. ~) f,3 .• *. •• • NO • r.c • • •• ..NOT'I'P CSLT • r I •••• • ((1ll1:'CT TFP", (7 • *l'l'PF H;UAI • x •••••••••••••••••'. ••••• • (H TO ~ULTIPlY ••••• Cl· ••••••••• .... . -.-.-.-.-.-.-.-* ·•••••••••••••••••''"" *. .* •• • YES • • 0 RH[R •••••••••••••••••• SET C~L3 TC NUP SW ITCH SET .... .•-.-.-.-.-.-.-.-.•• • • •• ~FlOCATION • • . • X X • •••• P3 •••••••••• •••.. P2··· ••••••. •• REL[CATlnN •• •• •• .TFPM PFlOCATION ••••• • FRROP TO ••••• • FACTOR BY • • ERFLG • Fl,..NT • • • x •• •••••••••••••••• x ••••••••••••••••• ••••• •••• • CG • •••• • I'll. • • E1 .• •••• ••• • • x •••• COLI COL? .. *. ." .•• Cl X ••• •• HI •••••••••• • COLL • • COLLECT TERM • · ·•••• .•.x •• .*INTERNAL * ••• K2 •• X• X •• ~7.·.· •• • py TF.P" • •• • ..................• ~llTIPly FL~~T x •• •••• • • Al •• ..... x ·CI • • nl· .hrn • C(,UIIIT TO • • .~INU5 I • TER~ ••••••••• .. ~FIOCATIO~. X FACT~R • • •••• • .................. .CI • • AI. PFLr.CATIC~ . ••• . •••• • K ~ •••• • ••••• X ••••• ~3 ••• • •••••• .1000 RELOCATIUN • crUNT TO • PLUS 1 • TFH~ • RFLOCATION • FACTOR • • • • • ••••••••••••••••• x ••••• ••• .CI .• • Al. ••••• • CI • • Ill. ••• ~ CLPFS . ••••• 11\ •••••••••• •• RESET StAN •• • FOR NEXT • • TERM • •••••••••••••••••• • .....el···..·····• ~ •• ~ESTOPE SCIIN • FOP NFXT • ELE~FNT • ,. OPf~IITOPI • • • • ••••••••••••••••• • • • ~ •••• Cl.· ••• •••• EXIT Tn THE • (IILLING • ROuTINE • ••••••••••••••• •••• • CI • • [1 •••• ••••• • • !o!DFFP X ..... • 01··········• • ~UlTIPLV• • LFflNED ER~OR ••••••••• • TO ERFLG. X ••••••••••••••••• .CH • • ••••• • J2· •••• ••• • CI • • Fl •••• • • . lJDl'f'l )( ··.··El ••••• •••·•• •• UNOEFINFC • • EPRCR ••••••••• • Til ERHG. X ••••••••••••••••••• .CG ••••• • • .... SV~BrL • t4. •..• Chart CI. The Assembler - Phase 9 Flowcharts 1.93 ••••• • ••••• • •••• • ·•• A4 .... • • A2 • •••• X •• ••• B3· ••••••••• ••••••••••••••••• •• •••• • 64 •••• ••••• • i LBXXX .•. .-.-.-.-.-.-.-.-. NO •• ••••• •••• • B2 •• X. • elt ... EX ERF X ••••• e1 •••••••••• •• OUTPUT • • •• It ... EX • • • • TO • • 1/0 I'LFfEII •••••••• ! ••••••••• C~ARACTfRS ····1'2.·•...••• EXIT TO THE CALLING ROUTINE • •••••••••••••• •• •••• • C2 •••• ••••• • X LDLBl X • • • .. . ••••••••••••••••• •••• •• X. B7. • ••••• • X •••• C1····.···. • EXIT TO TI'E • • CALLING • ROUTINE • • ••••••••••••••• GTHDG .. *. ••••••••••••••• +. *.• * .* .• .. •• F2 .•.x •• *.. *• *••• •• •• • SAVE • • PARA~lTfRS TO • • REST(R£ OVERLAY. • NO .. IN CORF • ••••••••••••••••• ..-.-.-.-.-.-.-.. i X •••••• H2·· FlI •• PR ••••••• READ IN P,",ASE 5 • • • • ••••••••••••••••• •* *. x ••••• • .* .*. •• •• •• POS 18 *. •• *. •• BLA~K •• • * .+ .. YES if ••••• • A2 • •• •••• • Chart 194 CJ. .* NO •••••• i •• •••• • C2 • ••••• • The Assembler - Phase 9 • • • .•.i .. * •. *•• - i •• •••• • B4 • ••••• • i • PRINT/TYPE ERROR MESSAGE A03 •• J3 .. .i *• PASS 1 *. EXIT TO THE CALLING ROUTINE .••••••••••••••• ...• .. *••• .* • RCUTINE • ••••••••••••••• • • ... •• YES •••••• x •• •••• • Ait • EXIT TC THE • F5 *. .•.x··········· . •• *• * .. * .* x ••F4••••'" •'"•••• • • YES .. .. .... .... G5 *. .•.x •• •• LIST •• YES ..DECK E IEDIT) •••••• *. *. $. .* .* .* ·•••••••••..• ..-.-.-.-.-.-.-.. • YES • NO • H5 •• X• J4 .* .* •• LIST PECK •• NC .OR LIST OECK E•• •••• ..SPECIFIED.· • .. X •••••• 115 ••••••••••• PCHCD PUNCH FROM .POS 1 TO END • CF OUTPUT ••••••••••••• SUPERVISOR • •••••••••••••••• • *.... .* ••••••••••••••••• • • • .. .x ..•••••.• ••••••••••••• •• X. E4 • •••• •• .* *. •• PRINTER •• NC ..ON CHANNEL 12 •••••• *. .* *. .* x *•• * • YES **•••• • A5 • . '.•••• ••••• • • ···.1<2·.·.····· EXIT TO THE • •• NO ASSEMBLy.· •••• *. .-.-.-.-.-.-.-.-. •• FIRST •• NC •• SOURCE •••••• ..STATEMENT •• ..-.-.-.-.-.-.- X •••• K3 ••••••••• *. X • •••• ES •••••••••• • INT2 • ••••••• UNPACK NEXT • • SO~RCE RECORD • .FRO~ INTER 110 • G4 •••• .* •• 1 PASS • YES • ••••• H4 ••••••••••• • • NO i •• ~X •••••••••• : ••• .. .. 05 •• : X •••••••••• : •• LINE DF 1I STI NG PUNCH X GTHOG RESTORE PAGE. • PRINT • HAO I NG •••••• H3 ••••••••••• • • PCHDR .x •• .* ••••••••••••• .. G4 .* ..-.-.-*-.-.-.-.• PRINT X * .. • NO *•• * TV3 •••• F4 ••••••••• AlTloO .* *. :X .......... : •• *. ······CS ••••••••••• .* ••••••••••••• • • • •• X . RDSIIC X • ••••• E4 ••••••••••• ROCRO ..-.-.-.-.~.-.HAD SOURCE RECOI(Q I CARD OR PAPER TAPE I ••••• • •• *. •• NC X •••••• .... •• •• X· CALLING *. .* ... .. .x • YES •• ASSEMBl Y *. •• *.. * -: YES .x B5 •• LIST •• NO .OPTION SELECTED ••••• INTERM~OIATE. •• ANY •• YES • wORKING STCRAGE ••••• ..AVAILABLE •• .·.... . • • .t' .* ... • INT1 • .-.-.-.-.-.-.-.-. .SAVE STATEMENT. .IN 110 • •• •••••••••••••••• ...... • ·.x .......... ... • E4 •• X. • • . INCREMENT • I~TEPNAL STMT • NC. BY 1 • G3 *. •• 1 PASS *. ••••••••••••••••• X • ••••••••••••••••••• • • • • .>0 .• GTHXT *. .~OVf .TO PRINTIPUNCH • E'UFEFR • • • •• ·.04 •••••••••• • • RETURN ADDRESS TO LDLBl ROUTINE • • • ·CJ • • K7 • •••• AS •••••••••• • YES ••••• ••••• E3 •••••••••• *. •• •••• • B2 • i Kl •••••• .CL • A3. ••• PALBl •• •• •• *•• * • NC: •• • •• STCRE PASS 1 Cit •• i LABEL VALUE TC POS 1-4 CF 110 BUFFER • • • • •• · .. .. .. ••••••••••••• ••• •• .$ •••••• ·• .... 03········.· INSERT • • F2. 18 .* X x ••••• • eu • •• THIS ERROR •• YES • ALREADY IN PDS •••••• •• PASS 1 •• YES • NO •••••••••••••• x • *. •• J1 *. .. .. SHBL ••••••••••••••••• ••••••• H1··.· ••• ••••• INCIIE~ENT •. *•• * X ••••• G2··.··· •••• • EIIRCR COUNT BY 1 *. o 84 x XYES •• PIII~(IPAl •• •••••• PRINTER THE •• • "'PE .. RITER •• • • • ERFLG • •• ·.G1·.·.··.··. • SET NCN-OUP • • ANC NON-XEC • • FOR THS • ASSE~BLY • • • • .• ••••• F3 •••••• •••• • NO • ... i •• •••• • G4 '" •••• " ••••••••••••••••• :X .......... : • YES X CALLING II0UlINE .. ••• E2 •• NO.. LIST •• ••••• OPTIC~ SELECTEO. ••••••••••••••••• • • •• •• .* *. ••••••••••••••••• BTHFX ···.·E1· ••• • ••• •• • CCNVfRT ACC. TC. • ~C. OF CHAIIS • • • SPECIfIfO BY • • XR2. STORE IN • • 1/0 !'UfffR • HIT TO THE • • • • i X .-.-.-4-.-.-.-.-. ••••••••••••••••••• •••• Fl ••••• •••• LABCK COLLECT AND CHECI( LABEl ••••••••••••••••• ··.·.C2 •••••••••• • INSERT • • • E~ROII FLAG • TO POS 19 • • OF • • 110 E'UFFER • ····.Cl·.· •• • •••• • 8T~EX • • BINARY • • TO ~E~ • • • • • • ...• • pqMVE • .-.-.-.-.-.-.-.-. 1/0 PUFFER. • .ANr CONTINUE IN.* ..... • 2 PASS ~co~ • ••••••••••••••••• ... A5 •••• ••••• • X X ....... .• ••····.A4·· .. AfT • ••••• A2 •• • ••••••• • . INSFIIT • • • ERIIOII FLAG • TO pas 18 • OF • • • IIC BUFFER • ·••••..• •• X GTHOG RESTORE PAGE • • PRINT • I1EAOIt.G .... ·.K4········... ..-.-*-.-.-.-.-.. .. . ••••••••••••• •••• •• X. A5 • ••••• • fRS X ••••• K5· ••••••••• • INSERT • • 8LANKS • • TO POS 1-17 • • Of • .. . • 1/0 BLFFER • ••••••••••••••••• •••• ..X. H5 • ••••• • LABCK ••• AI •• +. YES.. FIRST •• •••••• CHARACTER •• •• NUfo'ERIC •• •• •. .* ·.•••••........ .... *•• * • .• LA BCl·• El •• •• .. X. • i 61 •• •* •• N( *. •• ..... YES ChARACTER •••••••••• HANK •• X •• •• .CF • • HI. • NC ••• x :LABKl . .* X NC •• •••••• C1 ••• •• *. •• CHARACTER •• •• IIALID •• *. ••• * .* • YES ... 01 ...x •• t. •• FIIiE •• NO •• C~ARACTERS •••••• •• ChECKED •• *. *•• * .* x •• •••• • Bl • ••••• • • YES X :LABCK ..... El·.········• • CCLLECT FIIiE • CHARACTER • LABEL INTO • TWO kCReS • • • ••••••••••••••••••• ·•••••••••.. • • • • Fl •• X. • X •••• Fl ••••• •••• EXIT TO THE • CALLING • ROUTINE • ••••••••••••••• lAB ER X ••••• Gl •• •••••••• • INCREMENT • • LINK-wORD fOR. • PSEUCC-SKIP • • • ••••••••••••••••••• X Hl •••••• •••• •••• ••• •• RETURN ALL • ZEROS IN • • A, AND C. •••••••••••••••••••• •••• •• X. Fl • ••••• • .. . Chart CK. The Assembler - Phase 9 Flowcharts 195 ••••• •.CL ,.3.• •• •• •••• • A2 • ••••• • OFOUT AI .• ••• •• P97 *. •• ANY •• YES •• DATA OUTPUT •••••• •• YET •• :t. •• • * .* X ••••• Bl •••••••••• • INSERT LOAO • • ACtRESS INTO • • FIRST DATA HOR • • AFTER PROGRAM • • HEAtER • ••••••••••••••••• :X .......... : .... .... .• Cl X ••• •• •• •• NU •• DATA BREAK •••••• •. *•• * •..... 01·········· CThOR • -.-.-.-.-.-.-.-. • GENERATE • • DATA HEACER • •••••••••••••••••• :X .......... : .. E1 X ••• •• • .. .. .. * ••• • YES X ••. .... E2····.····· •• DATA S~IFT .INOICATOR BITS. .[~TC INDICATOR. ellS ~ORC • • • ~ORO CCLNT OF • DISK CLTPUT • BY I • ••••••••••••••••• X Hl·········· ••••••• •• RESET • • COUNT FOR BLOCk Qf NF~ • • • • 8 ~ORDS ••••••••••••••••• X •• UPDATE •• .····Jl......···· • OUTPUT • POINTERS ••••••••••••••••••• •• :X .......... : X KI •• •••••••• •••••• •• • PUT • • DATA ~ORO • INTO BUFFER • •••••••••••••••••• • X Chart CL. 196 The Assembler - Phase 9 •• •••• • ,.2 • ••••• • *. •• ..... .... x •• •• .CJ • • YES OK • 03. ••• X, ••••• B3 •••••••••• •• SET S~ITCH • FOR STADD • ENTRY TO SRCH • ROUTINE • • • • • X ···.·C3 ....•••... • SRCH • DATA OUTPUT POINTER • • .-.-.-.-.-.~.-.-. • SEARCH SYMBOL • • TAiLE • • IN CORE • ••••••••••••••••• x .. .•. .. X ...·····•• ••·····02.· CECREMENT • • SHIFT COUNT • • • • ••••••••••••••••• •••• •• E2··········• OUf~~TO~~~TCH : : • • (OATSWI • NeN-ZERO • ••••••••••••••••• F2 .•.i •• .* CAT A *. •• YES •• ..FIRST WORD OF •••••• •• *. lIf1F • •• * .• •• 03 • NO .• •• • :• l~v~~=i~T ACCRESS • CGUNTER • ••••••••••••••••• .. X .. •••••• H2··········· I/ROFO • -.-.-.-.-.-.WR~TE OSF SE TOR IF • BUF ER FULL ••••••••••••• X • • • E3 .. .x •• • 03. ••• *. ANY •• NO •• SYMBOl TABLE •••••••••• ..OVERFLOW •• X •• •• .CN • • YES • Fl. ••••• ••• •••• .. X .. • ••••• F3 ••• •••••••• WRSVT -.-.-.-.-.-.- s~N~~ ~tR~~~~ • ••••••••••••• ·····G2·········· :• •.CJ••••• •••• •• •• • NO • •• •• LABEL •• YES •• ALREADY IN •••••••••• •• TABLE •• X O'FlO SECTOR :)1. •••••••••• : 5~IFT •• X ··· •• ···•• • .. (2····· UPDATE • • • X X •• ••••••••••••••••• ••••••••••••••••• •••••• •••• •••• •• ·Gl •• INCREMENT ••• ••••••••••••••••• X ••••• Fl·········· • SET NEXT • • INDltATOR BITS. • WORD TO • • ALL ZEROS • • • • .* A3 •• ANY LA~El •• NO ..O~ THIS STMT ••••••••••• X •• START rF •• NO •• NE~ BLOCK CF •••••• •• 8 WOROS •• • X STAOr. • • • ••••••••••••••••• .* • YES X IlFXR2 X ••••• A2···.· •• ••• • INC~EMfNT • • WORe COUNT OF • • DISK PUT PUT • BY 1 • • ••••••••••••••••• • NC CMPCT • ····J2········· EXIT TO THE • CALLING • ROUTINE • ••••••••••••••• X ·····G3 .. ········• OFSCH .-.-.-.-.-.-.-.-. SET UP TO • • • • • SE"RC~ O'FlO • SECTOR • ••••••••••••••••• •••• • .el· • H3 •• X. • • •••• X •••••• H3 •••••••••• • RCSYT ..-*-.-*-.-.-.-.. REAC cnHb~W ••••••••••••• X ·· ... • J3··.·······• : S~~RS~~I~~ : • EN1RY TO SRCH • • RCUTINE • ••••••••••••••••• x ••••• ·CN • • A1· ••• ••••• ·C,. • • Ill. • •• X P911 ••• AI·. •. •• NO ANY CVEPFLO~ •••••• .* •• .... .... •••• ·...... • . .. .. •• •. .. .* -.-.-.-.-.-.READ PIIRTIAL SECTOR ••••••••••••• • YES •• 81 .. RSTRE • ••••• 112.· •• ••••••• ROSYT ..-.-.-.-.-.-.-.. ROSYT •••••• 113· ••• ••••••• • OISKI REIIO CVERFLew SECTOP • ••••••••••••• SRCH ••••• A4 •••••••••• • ••••••••••••••••••• •• CO,.PUTE hIGH • .AND LOW ADDRESS. • DIFFERENCE • •• X. STS2 X • •••• B2.· •• • •• • •• RESET ~IGH • • A~O LOW END • • IICORFSSES • X RS1RE RESTORE PARTIAL SECTOR •••••• 81 ••••• • •• ••• • -.-.-.-.-.-.- •• ••••••••••••• • • ••••••••••••••••• • ... x X •••• B3.··· •• ••• • EXIT TO THE • • CIILLING • • RCUTINE • ••••••••••••••• •• •• YES' •• •• • ••••• DIFFERENCE •• •• EQUAL 0 •• .* B4 *. *. .* • .* NO : X•••••••••• : X ··.·.CI •••••••••• X •••• C2.·· •••• •• • EXIT TO THE • CALLING • • • ROUTINE • •• •• LCIIO • Sy,.BOL • VALUE • •••••••••••••••••••• :X .......... . STXRI • • • ••••••••••••••• CALLING RO~TINE ••••••••••••••• •• •• •* •. • SA~E LOW END • IIODRESS. SET • UP TO READ .fIRST O~ERFLOW SECTOR • • • * •. * • • • • • ••••••••••••••••• t. .• • •••• E2.···· •• ••• • SET UP HIGH • • ANC LOW • • ADDRESSES TO • • SfARC~ ONE • • SECTOR TABLE • •• NO • •••••• .* 04 . X X ••••• FI ••••• • •••• • Of'SCH • • SET UP TO • • SEARC~ eVER FLO ... • SECTOR • ••••• F2 •••••••••• • • -.-.-.-.-.-.-.-. • • • •• SET XR3 TC COUNT OF OVERFLew SECTORS • • • ••••••••••••••••• ••••••••••••••••• ·...... ..-.-.-.-.-.-.-.. •••• • GI •• X. • • . X • • • ••••••••••••• ..... .... ••• ... E4 •• .* •. • SRCH ROUTINE •• YES ..ENTFREO FRO,. •••••• •• STAOO •• *. •••• C2.··.··.·. EXIT TO THE • CALLING • RCUTINE • ••••••••••••••• * •• * .• x •• •••• • Kit • ••••• • • NO X • •••• F4 •• • •••••• • SAVE ANC •• •.RELOCIITICN MULTIPLY• • • DEFINED BITS • ••••••••••••••••••• ••••.. · • . *... • . • GTOF2 X • • •••• Gl· •••••••••• ROSH REAC OVERFlOI. SECTOR •• •• •• NO •• COMPARE •••••••••• •• EQUAL •• X •• •• ·CO • • AI. • YES ••••••••••••••••• • YES .•.x x II •• II~Y CVERFLO~ *. .. .. ••••• 02 •••••••• •• ····01 ......... EXIT TO ThF • EI ••••••••••••••••• OFSCH X •••• ·C,. • • EI •••• ••••• • x .•. P912 X ••••• C4 •••••••••• • SUBTRACT • .DIFFERENCE FRO". • HIGH ADDRESS • • .CO~PARE SYMBOL • •. THERE • Gif •• X. .P914 X •• • •• G4 •••••••••• • • ••••••••••••••••••• • INCREMENT • • LINK-WORD FOR. • PSEUDO-SKIP • : •••••••••• X: .-.-.-.-.-.-.-.-. ~RSH eIll:RFLC .. SECTOR ••••••••••••• ... x •• •• •. JI •• •.• * .* •• YES •••••• .* x ••••• • Nt • c~ • • KI •* .•.x •• ••• E'.i· •• •• II~Y ~rRE •• YES •• OVERFlOI. •••••• •• SECTORS •• *. .• .. . $ •• * x •••• •••••• • Gl • • .X. B 1 • • ••••• • •••• • • NO Chart CM. P913 X •• • •• H4 •••••••••• •• • • • .·.. J2········· ExIT TO THE • CALLING • ROUTINE ••••••••••••••• • • CLI'AR • • STADO ENTRY • .SkITCH (AOOSk) • • • ••••••••••••••••• X X t. F(U~O •. ~2.· DISKl ..-.-.-.-.-.-...RITE ••••••••••••••••• •• .. ·.. ·.. ..··.•..· X ••••• HI·.· •• • •••• • SRCH • • SEARCH • • OVERFLOk • • SECTCR • • • • • ••• J4 ••••• • •• • ~XIT TO THE CALLING • • ROUTINE • ••••••••••••••• ••••• • •• K4 •••••. .... MUL T )( ·.··.K4·.··.··.·· .INSERT MULTIPLY • • -CEFJ~EO SIT • • IN BIT 0 OF • • WORD 1 OF • • SYMBOL • .. . ••••••••••••••••• •••• ..X. G4 • ••••• • The Assembler - Phase 9 Flowcharts 197 ••••• ••••• • ••••• • • C~ • • AI. • A3 • ••• PCJ8 X ••••• Al···.··.··. • SRCH • • SFARCH • CVERFlO~ • • ~ SECTOK • X pqlO A3 .-.-.-.-.-.-.-.-. •• ... .. •• ..-.-.-.-.-.-.-.. •••••• CZ.· ••••• • •• • hRSYT .. RITE (JVERFlO~ wIll- "UlTlPlY-. DEFINED TAG'D ••••••••••••••••• •* *. •. ••• * •• ••••••••••••• •• YES •••••• .* .* x X •••••• El ••••••••••• RSTRE RESTORE • Hll T_BlE ST ATI;S ••••• ·Cl • • H3. ••• ..-.-.-+-.-.-.-.. ••••••••••••• ... X ••• .. •• •• PUSH-DO~~ •• NO •• RECUIREC •••••• *. Fl *. ... -.* • YES .* PSt-CN X ••• •• G1 •••••••••• • PUSH SYMeOl • • TABLE DCWN 1 • • E~TRY FRCM SPOT. ~~ERE NE~ • • • • ENTRY GOES ••••••••••••••••• :X .......... : SY~IN X •••• ·Hl· ••••••••• •• • ADC • ••• ••• ••••••••••••••••• SY~BOl X ••••• Jl •••••••••• •• •• • • • CCUNT •••••••••••••••••••• INCPEMf~T Sy~eOl X • CECRF~ENT • SYMBOL TABLE • lOW END • ADDRESS BY 3 ..... Kl··········• • • •••••••••••••••••••• x •• •••• • A3 • ••••• • Chart CN. The Assembler - Phase 9 198 • NO .. ..-.-.-.-.-.-.-.. RSTRE RESTORE • FUll TABLE HATUS ••••••••••••• x ••••• • CJ • • 03. ••• C3 .•.x . STSlA X ••• •• C5 •••••• • ••• • SRCH • • SEARCH • IN-CORE • • • TARLE • •• .* •. .:. GVE~~lOW .:.~~~ •• ~ •••••••••••• •• SECTORS •• *. .* .-.-.-.-.-.-.-.- ••••••••••••••••• * .• - • NO X • • •••• ez ••••••••••• • NO S T At2 X t •• _ ••••••••••••• X X •• _NY ~ORf •• OVERFlO~ X •.CJ ••••• • D3. ••• :x .......... : ••••• C1· ••••••••• • INCREMENT • • SECTOR _CDRESS • FOR NEXT • • OVERFlO~ • • SECTOR • • •• •• -.-.-.-.-.-.- • Ne .•.x ••• AS •• .• ANY *. •• YES •• ..SY~BOl TABLE •••••• ·.OVERflOIil t. ._ •• • •••• ·B3··.··.····• WRSYT IIIRITE CVERFlOW SECTOR -. •• YES *. FCUND •••••••••••••••••••• *. .* •. .* *•• * [l1 •••• •• •• • YES x Bl STSCH •• •• IN-CORE TABLE •••••••••• ••••••••••••••••• •• • * ••• .* •. •• NO .•• END OF • STOOZ X • •••• D3 ••• • •• • •• • • RESET TABLE • • • liMITS TO • • AllCIil MORE • SY~BOlS • • • .·.. ..... ERNTl ..-.-.-t-.-t-.-.. PRINT .ERROR MESSAGE. A02 ••••••••••••• ••••••••••••••••• X ••••• • D3. ••• X ·.D~.··.·· 05 .•.x •• •• .* •• FOUND .. •. * •• * *•.•• .* .. NO •••••• • YES x ••••• .CM • • £1. .CJ • X ••••• ES •••••••••• X • • •••• EIt •• • •••••• EXIT TO THE SUPERVISOR • • ••••••••••••••••• •• INCREMENT •• FOR. • PSEUDO-SKIP • ••• •••••••••••••••• • ll~K-WORD x ••••• ••• .eM • • AI· ••• •• •••• • A3 • ••••• • ••••• ·LU • • Ai· ••• ;. NLlllo Ai •* • iNPUT ••• *•••• A3•••••••••• .INCkEHENT INPUT • :POI~~i~fER~TPUT: .UECRtMENT lOOP • • COUNT • *. ~YMuOl •• YtS •• ~KtATtk ThAN •••••••••••••••••••• • IAdlt tNTKY. ,'*. *•• * .* ••••••••••••••••• • MJ X •·····~1.·········• • AULkt~~ Ju~T ~ ~LMPAKt~ • "'hi • • i~ luw-tNO • • ALLKt~S '" ••••••••••••••••• ••·LM. *. ...• • • • .X. A.. ~ !NT 1 (,1 ••• X 1'915 •• '" .... .•. .... .. .... .... .... ... x x ••••• u~ ••• ••• ••• • • AUJkt:~~ JU~1 • • (.UMPAK~O IS • • • • Ncw hIGH-cNO • AOUKtSS • • 63 ••••••••••••••••• •••• • ·LM. •• X. A't • • • •••• * •• * • YES i C3 •• •* *. ."'ANY LULUM", •• NU • ~i-2~ NU~-HLAN~ ••••••••••••••••••• *. .• *. .* *..* .* ..ANY *. • • X ••••• ul •••• •••••• 'II' • •......... "' ... .. AI •• • "' '•" x ·.U~ ...·····•· •... • • SJAKT • • (.OMP~tSSION AT • CUL ~7 ••• •••••••••••••••• •• X .··*.tl··"'······· • IN~t~T LAULL • • tltL~ biT iN • ~JATtMtNT • • • ~KtfiX wukD • • - olr 0 • ~. •.............• .$ i ••••••••••••••••• X ·····~3·········· • ~AGK ANO MOVE • • .. WORDS OF 10 • • fiELD TO • • INTt~HEDIATE • • OIP aUffER • ••••••••••••••••• :X .......... : • • fLKNuN-~lANK • • ••••••••••••••••••• .•. i X SLAN fkUM l.Ll 71 LtfT .* ••••• 03 •• •••••••• .INSERT 10 FIELO. • ~IT IN PREFIX • .~ORD. ADD ~ TO • • ~ORD COUNT IN • • PRtFIX WORD • ••••• Fl ••••••••• • • • •• *.• • YES :X ........................ : •• •• COLUMN •• NO NON-~LANK ••••• .73-60 • Yl:~ • STAkr • ('uMPKtS~IUN • l.~L 2i •• •• PACK AND •• NO • • •• MOVE DONE •••••• X. Hl • F~ .* .*~UOH •• ..1 *. FOR •• NO MORE OUTPUT •••••••••••••••••••• •• RECORD •• •. * •• * .* • YtS :X .......... . X ·.·.·ul········.· • (.All.uLAlt wOkD • LL.tmT FuM • • .Pkl:tl~ wUko-i/2. • I~U. fkLM /'4UN- • • bLANK PLUS 1 • •••••••••••••••••• •••• • f ! •• X. • • . ·...... ~~1.6 P'J17 ••••• G3 •• •••••••• .INITIALIZE FOR. ~fi~~ ~5fi~?OOF : • NEXT PREFIX • • WURD SET TU 1 • : ••••••••••••••••• X •• 2 • LhAKALTtRS .... •• •• 1NTO. 1 IooUkO • ............• ~ X ·.···Jl.··.······ • STGMt iN •• ~ ...• ............. • l",TtkMtOIArt • • ourp~T BuFFtR • • ~ • • • • ••• H3 •• • •••••• EXIT TU THE CALLING MOUTINE ••••••••••••••• • •••• G4.· •••••••• • TOTAL OATA • :W?e~~HI~K~~~~OR: • WORDS) PUT IN • • WOKD 1 • ••••••••••••••••• X X ••••.• hl •••• ••• ••• ~ALK X X • • • . .....-H4.····.····. lllSKl ..-.-.-.-.-*-.-.. WRITE SECTOR OF ·INTERMEDIATE OUTPUT * ••••••••••••• K ••••• J~.*.* •••••* •• INITIALIZE •• FOR NEXT • • SECTOR • ••• •••••••••••••••• • x •• •••• • A3 • ••••• • Chart CO. The Assembler - Phase 9 Flowcharts 199 •• •••• • A3 • ••••• • DTtiDR ••••• AI· •• • •• •••• • INCREME~T • • • ~RDCT BY 2 • •• • • •••••••••••••••••• X • ···.BI.········. • DETERMINE • • NC OF ~ORCS • • IN BLOCK • • CINCLUCING DATA. • HEACERI • ••• WRTSII X .2 •• • ••••• A3 ••••••••••• •••• 01 SKI •• •• YES •• -.-.-.-.-.-.- •• ..fNTEIIEO FIIOM •••••••••• X WIIITE 'ENO" PROCESS • SECTOR • kllOFO ..•• •• .. ••••••••••••• • NO .•.x ••••••••••••••••• .. .. .... X x .*. • • HEADER INTO • DISK OUTPUT • •••••••••••••••••• • X .· • ...01··.······.• • • • SET UP TO START NE~ DATA BLeCK • • • ••••••••••••••••••• X : • ···.E1.········ EXlILl~NlHE : ROUTINE • ••••••••••••••• ··· • .. 83·········· BY 1 • • .INCIIEM~NT .SECT8R AOORESS • x •••••• •••••• • YES • ••·.··.Cl·········. •• ENTER DATA x e2 •• •• t. •• PAST •• NO .~ECTCII POINT OF ••••• BUFFER •• .. .. ...... .-.... H3 • C2 •• •• BLOCK •• NO •• COMPLETED •••••• .-.-.-.-.-.-.-.-. :• ~~~~(= •.we K E TCR F • NG iT8RAGE. •• •••• • H3 • x ·.· • .. 02·········· DTtiOR • :• X •• ••• C3 •••••••••• •.DEiR~MENT • NO OF. x • YES • F DSF •••••••••••••••••• •• BY 1 • ••••••••••••••••• • ••••• • MVLFT •• •• E2········ •• •••• • • SET RDTHD • : • Dl~i~U~~~tIR : .•.x •• *. .. .... .. FROM •• YES .."END" PROCESS •••••• .E~TERED •• ••••••••••••••••• X C3 .* x •• •••• • t13 • • NO .. .;NVi MVCNT E3 .•.x •• •••••• .. g~ ~8e~~·:.!~~. •• EQUAL 0 •• •. . .* SklTCH • ••••••••••••••••• .. . • NO x •• •••• • A3 • •••••• :x .......... : NOMVE X *:~~~:Y~~~i:·:=i·: AND XR2 • • CONTROL. RESET • • CATA HEADER • CONSTANT • • ••••••••••••••••• ·••••• .. •••• • • H3 •• X. kDFXl • * • Chart CP. The Assembler - Phase 10 200 X • ••• H3 ••• • •• • •• EXIT TO THE CALLING ROUTINE ••••••••••••••• • * • ••••• • CQ • • *AI. • • •••••• INT2 X ••••• Al*· •••••••• •• CLEAR 1/0 •• • BUFFER • • (SARfA) • •••••••••••••••••• • INT2A X ••••• Bl.· •••• •••• • SET XR I • • TO • • SUFI PLUS 3 • • • ••••••••••••••••••• X ••••••• • •• ••• •••• CI •• SET XR2 • TO SAREA PLUS • • • 20 (LABEL FIELD) • • ••••••••••••••••• •* 01 .•.x •• •• .* .* *. • .*NO ; ••••••• EI· ••••••••••• INCRE~ENT • XR2 BY 6 • (PCINT TO OP • CODE FIELD) • • •••••••••••••••••• :X .......... : X ••••• Fl···· •• •••• • SET XR3 TO • • WORO caUNT OF • • RECORD • lOR3 • • ••••••••••••••••••• ; .. •* •• A2 .•.x •• X .. •• •• NO •• 10 IN RECORD •••••• •. *••• .* • YES X • ••••• 82· •••• ••••• • DECREMENT • • XR3 BY It • • •• ••••••••••••••••••• :X .......... : X ••••• • • A2 • ••••• • •••• •• ••• ••••SETA3·••• UP TO •• • • • UNPACK 10. INDICATE IF NO 10 • •••• • •••••••••••••••••• •••••• • 83 •••• ••••• • X .•. NO 102 •. *. •• *. • .*YES .* X •• •••• C3 •••• • •••••• OISKl READ IN • NEXT SECTOR • ..-.-.-+-.-.-.-.. ••••••••••••• X 02 ••••• •• ••• •••••••DECRE~ENT •• • ••••••••••••••••• • 8Y 1 •••••••••••••••••• •• • XRI 8Y I. • .OECRE~ENT 8UFI • • PLUS 2 BY 1 • •• •••• •• • E2 ••• X.• UNPK •••• X ••• •• 03 •••••••••• • :SEC~~~R~~8~lsS : :X .......... : ••••• E2 ••••• •••• • • UNPACK FROM • • eUFI AND • • STORE IN SAREA • • • • • ••••••••••••••••• TSlIO X ••••• • ••••• • • E2 • B3 •• .* *. •• NO •• SECTOR •• UNPACKED •••••• ROIO •• ·C2 ••••• ••• •• ••• •• • DECREMENT • XR3 BY 1 • ••••••••••••••••••••• X *. •• •• YES •• ANY LABEL •••••• •. •• •••• • A3 • ••••• • •••••• • A2 • X • • • ····E3 ••••• •• •• EXIT TO THE • CALLING • ROUTINE • ••••••••••••••• X .. •• F2 ••• •• •••• .. .. •••• •• •• •• •••• *•• * YES. • ..10 IN RECORD •••••• X. A3 • • NO x ••••• • 83 • •• •••• • Chart CQ. The Assembler - Phase 11 Flowcharts 201 ••••• • CIl • • ~l· ••• ... •• •••• • A2 • ••••• • x ENO~ •• • * •• *. AI • •••• A2 •••••••••• •• -. •• NO •••••• .* .. .. PASS 1 • YES X X • •••• P2 •••••••••• • MAKE ~EAD[R • .LENGTH (WOIlO 61. • EQUAL NO. OF • .LEVELS SPECI~·D. • FLUS 6 • • ••• Pl ••• • •• •••• ••• RESET CCUNTEIlS • • • • AND • FOR PASS 2 • • • ••••••••••••••••• S~ITChES CI • • • • • • x ••••••••••••••••• ••••• ·CS • • Fl· ••• ... • * ...x X • INSERT LEVELS • SPECIFIEO TO .~OROS 16-11 OF HEADER • •• •••• • A3 •••• ••••• • X A3 ••• • •• •••• ••• ••••INDICATE •• • PROGRAM TYPE ••••• • I •••••••••••••••••• •• •• •••• • B3 •••• ••••• • • S2ltOA X B3 ••• ••••••• ••• ••••INDICATE •• • PROGRAM TYPE •• X. 03 • ••••• .* *. •• Ne.. I PASS •••••• ~SSe~BLY •• *. .* *. .• ; 02 ••••• 01· •• • ••• ••• 03 • .. • • ••• Fl •••••••••• CLEAR TO ZERO. • FIIlST 'il ~OIlOS • • OF P~OGRA~ • • ~E~CER • F2 •• •• ILS •• ASSEf"BLY • *. • • ••••••••••••••••• .. Gl .•.x •• .. .. .. .0 .* .* .• .•.x HI·. •. * •• * x • PROGRAM TYPE *. .0 .* .• • YES x ·• • INCICATE TYPE PROG~A~ . ii :~~ t~e~L~4~E~g·: • IN WORe 15 OF • HEAOER • • ••••••••••••••••• X 202 •• •••• • F3 • ••••• • •• •• ••••••••••••••••• •••• . .. . The Assembler - Phase 12 • INSERT RESULt. • IN WORD 3 OF • HEADER • • ••••••••••••••••• ••••••••••••••••• ENOAC F3 .. •• DISKl ..-.-.-.-.-.-.READ IN PHASE *. ••••••••••••• * •. * X • •••• F4 •••••••••• • INSERT • • HEADER LENGTH. • IN ~ORO 6 OF • • PROGRAM • • HEADER • . .* .* • •••• F5 •••••• •••• • FORCE FIRST SECTOR OF • • INTERMEDIATE • 1/0 TO BE • READ ••••••••••••••••• ENDAI X ••••• G5 •••••••••• • INT2 • • UNPACK FIRST • .STMT INTO SAREA. • ClIO BUFFERI • ••••• G4 •••••• • ••• • INSERT SIZE • • OF COMMON • • IN WORD 5 OF • PROGRAM • • HEADER • • ••••••••••••••••••• .-.-.-.-.-.-.-.-. ••••••••••••••••• •.CR. ••• • • H5 •• X. ••••• • X •••••• H5 ••••••••••• OISKI ..-.-.-.-.-.-.WRITE SYMBOL ••••••••••••••••• :X .......... : .. H::! .•.x •• .. ........ .. .•. .. *. .* • NO J3 •• *. • •• * .* .* • YES •• X. 03 • ••••• • .. .. .. 1<3 •• •• .x *. *. * •• * x HEADER •• •• FILE DEFINED x •• •••• • Bit·· .. • TABLE O' FLO • SECTOR BUFFER ••••••••••••• *. *. •• NO •••••• .* .* *. • .*YES x S21t3B X ••••• K4 •••••••••• • INSERT DATA • • PERTAINING TO • • SIZE OF FILE • • • IN FIRST 7 • ~ORDS • ••••• • 04 • •• •••• • X ..•••••.• ••••••••••••••••• ..X. A5 • •••• .. • ••••• J5 ••••••••••• •• NO •••••• ••••• • .• .* •• •••• • Ait • ••••• • • x ••••••••••••••••• •• •••• • 04 • .x •• ••••• • JIt .* *. •• FILE DEFINED 2:• :TOoal~IT~ ~:H •• •• NO ..TYPE EQUAL 2 •••••• *. .. X • •••• HIt •• • •• ••••• • SET UP DSF • .BUFFER POINTERS. •• •• YES •• TYPE EQUAL 1 •••••• • • • • • ••••••••••••••••• X X • I~ ~ORD 3 • •• ceOI INSERT • • CF PIIOGRAM ~EAOER • • .. .11 OVER INTl • OF PHASE 9 X *. X •••••• E5 ••••••••••• ••••••••••••• • YES Chart CR. x •••• ·G3 ••••••••• • X .LENGTH (~ORO 61. • EQUAL 4 • • ••••OS •••••••••• • FORCE LAST • SECTOR OF • • • I~TERMEDIATE • • 110 TO BE • ~RITTEN • • S2ltitO X •••••• E4 ••••••• •••• DISKI READ IN PHASE • IC OVER STADD. OF PHASE 9 X •• J2 •••• •••••• • ••• MAKE HEADER • X X • •••• 04 •••••••••• • YES S2430 ••••• H2 •• •••••••• • INSERT • INTEIIRUPT • • • LEVEl NO. rN • • • ~CIIO 13 OF HEADER • • •.• •••• • 112 • •••• *. • • • ••• Kl ••• .INSFRT ISS• ••NU•••• •• ii • ••••• • 02 • • •• •••• • ••••••••••••••••• •••••••••••••••••• (, •• x X • :·VS·T~~~C{~J2N : •• STANDAIID •• NO X •• PRECISION •••••• •• •••• • B3 • ••••• • •••• if •• ~ •• Jl.· •••••••• • •• .* ••• G2 •••••••• •• ••• •• • INOICATE •• ISS NO •• ASSEMBLy.· •••• *. • $: .... 1/0 • •• •••••••••••••••• . .x ••••••••••• ..-.-.-.-.-t-.-.. •• NO •••••• 7 •• •••• • •• •• • A3 •• ••••••••••••••••• .. NC S2402 *••• .. • YES •• ABSOLUTE YE~ •• ASSEMBLy.· •••• *. •. .* .* X ••••• ..... 52431 •• •• ·E2.····.···· ••• •• • INCICATE 4 .-.-.-.-t-.-.-.-. • • ••••••••••••••••• • • YES • • INTI • • SA~E END STMT • .IN INTERMEDIATE. •• Dit ••• X.. * •• * ••••••••••••••••••• x ••••••••••••••••••• ••••• • ••••• • :X .......... : : • 03 • • •••• • •• F3 *•••. ············x x 524(4 ••• eLlI'il X S2421•••• . •• •• •• .*EXTENDEO -. •• NO •• PRECISION •••••• *. •. X • •••• C5 •• • ••••• • • ••••• C4 •••••• •••• 03 •• X. S2420 • PROGRAM TYPE ••••••••••••••••• X ••••••••••••••••• Si'4CC ; •• El·········· ••••M~KE BUFI THE. • OSF ALFFEP • • (NC INTEIlf"ED- • • lATE 110) • .* • DECREMENT • .TEMP TYPE BY 1 • • (6 TO 5 OR • • 4 TO 31 • • •• .* X ·•••••••••.. • x ... • MAKE CFBUF • .* ENT *. •• • (PASS 1 AREA OF. NO.. •• • PRINCIPAL 1/0 ••••• •••••• ASSEMBLY • ROUTINEI ThE • *. *. .• .* • • rSF P~fFfll *•• * • YES • •• * ••••• .CS • • AI· ••• X • YES ••••••••••••••••• •. . * *. •• • •••• e5 •••••••••• • MAKE DSF • • BUFFER OF8UF • • • SET FIRST • .SECTOR ADDRESS • • TO 32 (RELAT) • Bit •• *. . •• LIBR •• NO X •• ASSEMBLy •••••• •. . .. .. .* • MAKE HEADER • .LENGTH I~ORD 61. • EQUAL 3 • •• A5 .* *. •• NO •• 1 PASS •• ASSEMBLy •••••• *. .* x *" • .*YES ••••••••••••••••••• •• •••• • Bit •••• ••••• • x .•. S21t3A • .. •••••• x X • INSERT NO. OF • • FILES DEFINED. • IN ~ORD 9 OF ••••• .PROGRAM HEADER • • •••• C3 •••••••••• •• •• •••• • A5 •••• A4 • ••••• A4 ••••• ••••• 2 • ••••••••••••••••••• :x .......... : ..••••.• •• •••• • 02 •••• ••••• • x .•. 524'1'3 • • ••••••••••••••••• • YES ••••• • ••••• • x •• •••• • ••A5••• •• FLIPR ..-.-.-.-.-.-.REAO IN PHASE 1 • • ••••••••••••• x ••••• .BO • • Al • ••• ••••• ••• • (S • • AI. ENOA2 X ••••• A1 •••••••••• • RE~ERSE PhASE • • 10 ADDRESSES • • FRCM eLF! TO • • OFeUF • • • ••••••••••••••••• .. .•. .. .. .. *•• *.... ; 81 •• •• PRINCIPAL •• NO .1/0 PAPER TAPE •••••• • YES X • RESET PAPER • TAPE FIRST • fRAME AOO~ESS • FOR POS 1 OF • 1/0 eUFFER .....Cl·.·· ..... .• • • • • ••••••••••••••••• ·• x•••••••••••. ..-.-.-.-.-.-.-.. X •• • ••• 01· •• • ••••••• RDCRO ROC NEXT REtCRO (tARt OR PAPER TAPE) ••••••••••••• x ••••• • CR • • H5. ••• ••••• • CS • • Fl* ••• ..-.-.-.-.-.-.-.. X END;? • ••••• Fl· •••••••••• fLlPR • READ IN PHASE 12A • ••••••••••••• x ••••• • CT • • AI· ••• Chart CS. The Assembler - Phase 12 Flowcharts 203 ••••• ·CT • • AU ••• P1ZAX .. •• •••• • ",2 •••• ••••• • i .. .. .. .. .. AI ••• •• •• L.A.C. •• E~EN •. •• YES •••••• • ACCRESS IN • .CCH56 IN COHMA,. • pes Q-1Z OF • • lie SUFFER • .* • NC •••••••••••••••• ••••.. ·•.... . . .••. ez··· •• •••·· •• i SB~ •• ·.·B1 •••••••••• TN 82 •• X. • x • • •• AOJLST •• • L.A.C. TO • •• • •••••••••••••••••• :x .......... : •• fC~CE LDlPl • RCVTINE TO 00 .OUTPUT (PTIONS CNL Y • E~EN • • • ••••••••••••••••• j( X ·.·.·Cl • INSE~T•• •••••••• L.A.C • • • I~ LAP.£L VALUE. • ANO I~ CeLtC • • IN COlollolA • .....CZ· ......· .• •• FeRCE ~AST •• • SECTOR F OSF • • cuT PuT 0 BE • • hRITTEN • ••••••••••••••••••• ••••••••••••••••• j( i . .•..CZ··.·······• •• • •• 01 •• ••••• ••• * i .····",2··.···.··· • INSERT XEQ • OTHOR • • CO~PLETE LAST • .. DATA HEADER • IN nSF • • • INSERT DISK .BLeCK CG~NT Of • PRCG~AH IN • CC~54. COH5~ • PLUS 13 . -*-.-.-.-.-.-.-. ••••••••••••••••• • • • • ••••••••••••••••• .. i X ·E1 •••• • •• •••• ..• •••FORCE kORr • COuNT Of LAST • • DATA H~ACER • • TO ZERC • •••••• EZ •••••••• · · · ' FL IPR ..-.-.-.-.-.-.RUD IN PHASE 3 ••••••••••••••••••• ...x i •.SR •••• • • At· ••• Fl •• .• *. •• ANY E~T~Y •• YES •• PCINT IN THiS •••••• •• ASSEMBL Y •• *. ••• * .* x •• •••• • 82 • ••••• • • NC .•.i CZ ......•... GI •• • •••• .* *. • •• XEQ ACDRESS •• NO • SET UP CODE •• SPECIFI~O •••••••••• x. fOR SYNTAX ERROR • 0 .... •• •• • ••••••••••••• • .••••••••••••••••. ·••••• .. •••• • .-.-.-.-.-.-.-.-. ••••••••••••••••• ..• •••. •• • • • • • • YES • HZ •• X. • ENDI:R X ••••• HZ·· ••• ••••• • E~FLG • • INSERT ERROR • • CCOE IN 110 • • eLffER • .. ·Hl.····.···· ..·-.-.-.-.-.-.-.-. • X • • • SCAN EVALUATE OPERAND • • • •••••••••••••••••• .. ... .. • x •• X. BZ • •••• • Jl •• • ASSF"'BlY ~CDf. YES •• EQUAL OPERAND •••••• •• "CCE •• :t:. ••• * .* i • NO · •• •••• • AZ • ••••• • . ..... X ••••• Kl·· •• •••••• • seT LP CCCE. • • • fUR RELOCATION ••••• X. H2 • • ERROR • • • • • ••••••••••••••••• Chart CT. 204 •••• The Assembler - Phase 12A PHD Al··········• ••.....INITIALIZE • • PHASE • •• •• ••••••••••••••••• POL .. .. .. .. X ••• Bl •• •• DUMP •• YES •• REQUESTED •••••••••••••••••••• *. .• •. • .*NO X . · ...Cl·········· SET UP • • • • • NEXT PHASE PARAMETERS • • • • • ••••••••••••••••• X ·····ez ......... . INITIALIZE • DUMP • • • • CU~P AND NEXT PHASE PARAMETERS ••••••••••••••••••• :X .......... . OISKF X •••••• 01·· ••• • ••••• LOAD NEXT PHASE .•.x DZ •• .• DUMP *. •• NO.. THIS •• •• PHASE •• • • • .x...... • • ••••••••••••• X .... El····· ..·.• • EXIT TO NEXT • • PHASE • ••••••••••••••• • Chart DA. • • • •. .* ••• * • YES X E2······.···• •..... • CALL AND • : DU~~E~~I~E : ••••••••••••••••••• FORTRAN - Phase 1 Flowcharts 205 PHOA A1······· ..•· ••..... INITIALllE • OISKF • ••• • •••••••••••••••••• ••.•.• Bl···X •• ·••••• CALll • • CAll 2 LeAO SUPERVISOR INTO ell! ••••••••••••• • • X C1··········• •..... • SET UP • • • • MONITOR CAll ROUTINE • • • ••••••••••••••••• 01.··•• ·· •• ·• •••••. • INITIALIZE • :+ NEXT • X • • PHASE • PARA~ETFRS • ••••••••••••••••• X • • • Chart DB. 206 .... El········· EXIT TO THE • ROL • ROUTINE • ••••••••••••••• FORTRAN - Phase 2 .· ... A2·.···.·.·.• •• SIZE OF • ..... DECID~ MACHINE & • • • INITIAlIZE PHSE. ••••••••••••••••••• •••• • 82 •• X. • • • AXXO •••• X •• 84 •• •••••• · .. AXX4 ••• ••• 82· •• • ••••••• • • READ SOURCE. STATEMENT ·.....C1........... •. • C2 .. .... .... • X ........ .* x •• •••• • 82 • C4 ••• ••••• • •• AXX5C *. C5 ••• •• .$ *. •• •• YES •• EXCESS •• YES •• CONTINUATION •••••••••• X•• CONTINUATION •••••• ..STATEMENT.. .STATEMENTS •• *..* ••• • NO *..* * ..• • NI) *•• * • NO X ••• SEC 02 •• •••• •• SPECIAL •• YES • •• ENO STATEMENT •••••••••• X. •• •• • •••• *•• * • NO CSl • ••• 03 ••••••••• EXIT TO THE ROl ROUTINE ••••••••••••••• • • • X • •••• 04····.·· •• • • COllECT •• • STATEMENT • • • NUM8ER • •••••••••••••••••• • : X •••••••••••••••••••••••• : : ........................ X: X CONVT .* x AXXItA • ANALYZE & . YES •• •• • STORE CONTROL .X.......... CONTROL .~ • RECORD DATA • •• RECORO •• SWlT •• • NO ••• ·•••••••••••••••••. .•.x .. •• COMMfNT •• YES •• STATEMENT •••••• ••••••••••••• DEf .. 84 E2 •• • ••••• •• •••••• •• • CONVERT • STATEMENT TO • • EBCDIC COOE • • • ••••••••••••••••• AXX8 X • •••• E4 •••••••••• ERST X ··.··E5.··.··•• •• STATEMENT .800Y ANO PLACE • • ON STRING • • REPLACE • .STATEMENT WITH • • ERROR MESSAGE • •.PACK •• ••••••••••••••••••• X •• •••• • 82 • ••••• • AXX3 X •••••• FZ··········· PRINT SOURCE • • STATEMENTS IF • INDICATEO • • • ••••••••••••••••••• ...••••.... •• X. 82 • • • ••••••••••••• •• •• •• G2 .•.x •• *. .. .. •• YES CONTROL •••••• •• RECORD •• *•• * • NO x •• •••• • 84 • x •• •••• • 82 • ••••• • •••••• Chart DC • FORTRAN - Phase 3 Flowcharts 207 GETIO STA=!'~:~I •••••••• ~l •• INITIALIZE • PHASE & MOVE • • STRING NEXT TO • • SYM80l TABLE • ••• X.FOR NAME SEARCH. •• X .* C1 ••• •• •• .. lA2 02 C2 ••• •• .. 11 .• *. .* *. • .-YES *••• : :ZA4 ... it :X •••..•••••• : : *• 20 X 12 • •••• 02 •••••••••• ••••• 03 •••••••••• •• •• PUT • 10 IN STRING • • AREA •••••••••••••••••••• • .INITIAlIZE GET.• • ROUTINE • ••••••••••••••••••• ••••••••••••••••• •• * •. • -YES •• • CAllS AND • • • PARAMETERS • INTO • • OUTPUT STRING. .•.x •• VALID •• NO •• STATEMENT •••••• •• NAME •• • YES X 03 ..... 01.··.··.· .. • INSERT .FIO • C3 .. .. •• •• NO • •• 10CS •• NO •• INDICATORS •••••• ••• X•• ARITHMETIC •••••••• •• PRESENT •• ·.STATEMENT •• •. • •••••••••••••••••• ••••••••••••••••• COCT 19 B3··········• ••..... INITIALIZE • •• ·• x•••••••••••••••••••••••••. x :MAkE 13 ••••• E2.·· •• ••••• • COMPRESS • AND MOVE • • STATEMENT • • • • ••••••••••••••••••• X 14 ••••• F2 •••••••••• • ADD • • PRECISION TO • • ANY FORTRAN • • SUPPLIED SUB • PROGRAMS • • ER it 22 ••••• F3 ••••••• • •• •• • • SET UP ERROR -4 STATEMENT • • x ••••••••••••••••• •••• ••••••••••••••••• •• Jl •• ••••• • .•.x :ENOO • • • ••••• G2 •• 15 •••• • •• ·G3 •••• • •••• •• •• YES • EXIT TO THE • •• ENO STATEMENT •••••••••• X. ROl • •• •• • ROUTINE • ••••••••••••••• •••• *•• * • NO .•.x HZ •• 16 •• *. •• CAll •• NO •• STATEMENT •••••• *. *. *. .- ... .* • YES .... .•. .... .. .. •••• lAIB x Jl •• 09 JZ •• Jl ••••• • *. * •• * • YES X 10 MOVE >I' >I' ••'" TO NEW STRING.•• ••••••••••••••••• .. . •••• ••••• • •• X. Jl • Chart DD. 208 FORTRAN - Phase 4 17 *•• * .* '" YES • •••• Kl ••••••• • •• •• •• •• SSWTCH •• •• SllTE OR •• NO •• OVERFLOW IN •••••• •• STMT •• •• FORMAT •• NO • •• X•• OR ERROR STMT •••••••• •• .. .x x •• •••• • Jl • ••••• • XY2 X 18 K2 •• •••••••• •••••• CONVERT TO • • 5 CHARACTER • .NAMF. CLOSE UP • • STRING I WORD. ••••••••••••••••••• •••• ....X.• .• Jl • •••• x •• •••• • ••Jl••••• •• •••• • 83 • ••••• • START ISTMT ••• INITIALIZE ••• • PASS ONE •••••••••••••••••• •• .... .... .~. •••• • • • 02 • •• •• •• •• • NO · .... ...t • •••••• . . .. . RMOVI X 20 ••••• C3 •••••••••• • • REMOVE STATEMENT • • : •••••••••• X:X •••••••••• : . X 12 ••••• 02 •••••••••• STl •••• MOVES 01 •• 03 •• SUBROUTINE •• NO •• OR FUNCTION •••••• •• STMT.. • • • ...* MOVE TO NEXT STATEMENT • • • ••••••••••••••••••• •• • ••YES X .* * ••• • NO ••••••••••••••••••• • 01 •• X. 04 ····.El.··.·····. • SET SORF • • POSITIVE • • FOR FUNCTION, • • NEGATIVE • • FOR SUBROUTINE. X •. Cl •• 02 •• .FIO •• YES •• STATEMENT •••••••••••••••••••••••••••••••••• •••••• .. .. ••• 83 •• 19 •• STMT •• YES •• HAVE STMT •••••• •• NUM8ER •• 01 ••• ·.81 •••• •••••• .* E2 .•.x •• •. 13 ........ YES.. STMT •• • •••••• HAVE STMT •• •• NUMBER •• ••••••••••••••••• • NO x ••••• • ••••• • • H3 • X 14 PUT ERROR ON THE STRING • • • .· • ...F2··*···· ..·• • • • • • ••••••••••••••••• ·· ............ . .... • X.· •• X. 1<2 • x············ TENT .* Gl ••• •• *. A8El 05 .* G2 ••• •••••• •• *. 16 •• REAL •• YES •• STMT •• NO • •• INTEGER •••••••••• X.. HAVE STMT •••••••••••••••••• X• •• EXTERNAl •• X •• NUMBER •• •• STMT •• •••• *.. * • NO *•• * • YES .•.X H I . . 06 •• • * DIM. *. •• YES • •• COMMON EQUIV ••••••••• •• STMT •• *. X :RMOVE * •• * .* • NO 11 ••••• H2.· •• •••••• • : • • • ••••••••••••••••• •••• • : • S~i~~~~NT NUMBER .. .• ••••.. ·••••• • • H3 •• X. • MOVE X 18 • •••• H3 •••••••••• • • • • TAG5 •• Jl ••• •• .... 01 • • ..•••••.• ..X. 01 • ••••• •• •• • • ••••••••••••••••• •• X. 01 • X MOVE TO NEXT STATEMENT •••• •••• .... •• CONTINUE •• YES. • •• STATEMENT •••••• X. B3 • *'. •• •• . * •• x Kl ••• •• •••••• ••••• • • 1<2 • • NO OB lENa X K2 ••• •• 09 *. •• YES •• .*TRANSFER *. •• NO •• .* •• STATEMENT •••••••••• X•• ENO STATEMENT •••••••••• *. * . . * .* *. * . . * .* x ••••• •• •• • YES X •• •••• • 02 • ••••• • Chart DE. •• •• • NO X •• •••• • 01 • ••••• • .OF • • Bl. ••• FORTRAN - Phase 5 Flowcharts 209 ••••• ••• • OF • • 81· INIT X 01 ••••• B1· •• •• ••••• •• : •• : ••••••••••••••••••• l~l!~A~~~E ENOS T X ••• ..•. C1 •• 02 EOP ..··C2····...•• 09 •• •• YES • ••• X•• ~~O STATEME~! •••••••••• X: •••• •. •* EXIT TO THE RO~V\NE ••••••••••••••• • : • NO .... *... •• •• •••• ·...... • x 01 ••• •• 03 .... X.. LOOK... •• STMT •• YES •• HAVE STMT •••••••••• •• NUMBER •• 02 • NO • . • .MOVE .X Olt • • • ••••••••••••••••• 08 ••••• 03 •••••••••• ...* •• • ••NO • • ••••••••••••••••• X x •• •••• • E1 • ••••• • ••••• E2 •••••••••• •• : PUT •• SY~~arE~A'~E : ••••••••••••••••••• X ..... f2···· .....01.• • PUT SYMBOL • TA!LE AOORESS • • ON • • STRING • •.................• x •• •••• • El • ••••• • Chart DF. 210 FOR TRAN - Phase 5 . . CLOSE 05 E1 •• X. ••••• El····· •••• • •• MOVE • ••••• TO NEXT • • STATEMENT • • •• •• NUMBER •• YES • PUT • IN SYMBOL ••••••••.•• X.ERROR ON STRING • •• TABLE •• • • •• •••• • 82 • ••••• • 01 ••••• 81········*· PH • •• •• INITIALIZE • 002 • •. ... ••• X.. *. END *. *.• * .* •• •• *. 01 •• YES •••••• .. .. t. COM~ON .* x ••••• • 02 • •• •••• • x •. ii ••••• .OH • • Bl· ••• .•.x •• 09 C2 •• 10 •• NAME •• NO •• IN SYM80L •••••• •• TABLE •• .* • NO .* .* *. ZORRO •• t. •• • YES ii C1 x 82 •• •• NO •• LEGAL NAME •••••• PHASE •••••••••••••••••• •• .* •• .. ... .. .. .. .. ... .. ·••••••••.. • 03 •• YES •••••• •.. * .* • YES • • 02 •• X• •X 11 • •••• 02.· ••••• ••• MOVE • •• • • PUT STRING. • .ERROR ON • x •••••••••••••••••• •••• •••• • HI •• ..X: 1'1 : •• •••• • •••• NXTPH .* *. .* • NO .•. ii E1 •• 04 •• COMMON •• YES • •• PROCESSED •••••••••• X. •• ALREAOY •• • .. . .... . ... E2········· EXIT TO THE • •••• •. •* •••• • NO F1 •• X. •• •••• • ••••••••••••••• · .. .....fl···..··.··• X • •• MOVE TO NEXT STATEMENT ••••• • ROL ROUTINE • • X 12 PLACE 05 ••••• F2 •••••••••• •• • .NAME INPUTSYMBOL •• • TABLE • ••••••••••••••••••• • • • ••••••••••••••••••• G2 .•.x •• 13 •• .* NAME *. •• NO •• OIMENSIONEO •••••• •. •••••• • • FIX •••• .. .. .* *•• * • YES • HI •••• X 06 • • • INITIALIZE TO SCAN .• • • • CONSTANTS TO 81NARY • • Jl •• X. .... X ••• Jl •• 07 •• STATEMENT •• NO •• TERMINATOR •••••• •• •• •.•. .•.• NEX . • PLACE • CONSTANTS IN • SYMBOL TABLE • • • 08 :X •••••••••• : ••••• • ..... • Kl··········• • REMCVE • • STATEMENT FROM • STRING • • ••••••••••••••••••• X •• •••• • Fl • ••••• • Chart DG • . 15 •••• : 82 : X X ••••• J2 •••••••••• X:•••••••••••••••: • YES REMOVE • • ................• · .. • ••••• 14 ..... •• H2··.··.···· •• COLLECT STATEMENT •••••••••••••••••• •• •••• PTB X PRTE ..... • Hl··········• NEXP X 16 ••••• K2.· •••••••• • GOTO NEXT • • ITEM IN • STATEMENT • • • • ••••••••••••••••••• X ••••• • Jl • •• •••• • FORTRAN - Phase 6 Flowcharts 211 ••••• ·OH • · •Bl. •• START X 01 ••.... ·Bl.··.·.···.•• • INITIALIZE • PHASE • ••••••••••••••••••• • •• •• •• *. C1 .. .X •• *. .FIO *. *•• * .• ••• • •· •C3 . ••••• • x·············· OTB OZ .* •• NO •••••• CZ *. .* 03 X TO NEXT STATEMENT • • .* · .. .. .. .... • Fl •• X. ••• Fl *. ••••• • ••••• • • 04 • x 11 PIECE X 70 .....03.......... . .... 04 •••••••••• • • •• •• MOVE • PUT : :SlOP ••• • ••••• • TO NEXT .X ••••••••• NAME IN SYMBOL. VARIABLE. • TABLE • ••••••••••••••••••• ••••••••••••••••••• x •· •••• 11:2 •. ••••• • x •• •••• • G3 • ••••• • • YES •••••• X 003 ••••••••••••••••••• • • ••••••••••••••••• El •• 04 •* *• •• FUNCTION •• NO •• OR sueR. • ••••• •• 'SORf t •• * •. * 10 • INDICATE REAL • .OR INTEGER MODE • .IN SYMBOL TABLE. .• . '" .•.x •. X .·· • .• C3···.····.·• 12 REMOVG X 13 • • ••• OZ···· •• ••• • '" RE~OVE • "'STATEMENT FROM • '" STRING • ••••••••••••••••••• :X .......... : •••• *. • YES ·01·········.• •.... • P'CVE • STARI •• *. •• • * .* • YES • • ••• •• STATEMENT •• NO •• TERMINATOR ••••••• .... .... 0'5 •• FUNC. •• NO • • •• DR SUB •••••• X. K2 • •• STATEMENT.. •• * ••• •• •••• • G3 •••• • YES OOZ ••• TRY 06 •* •• •• •• NO •• LEGAL NAME •••••••• *. *. •• *••• .* .. .•.x··········· .. . .... •••• •••.... · .. •••• •....• . .* *. SUBPROGRAM NAP'E IN SY~BOl TABLE .- • •• : .......... X: 08 X Ell ••••••••••••••••••• 17 ·····JZ·········. •• ERROR • • • PUT •* ON STRING* ••*•••••••••••••••••• •••• · .. · 11:2 .. X. x 09 .. · ..Kl.··.·.····• • PUT SY~ • TBL AOOR OF • SUBPROG IN • COMMUNICATIONS AREA • • • • • ••••••••••••••••• x •· •••• C3 ••. ••••• Chart DH. 212 FORTRAN - Phase 6 SOS ••••• • X H3 18 • ····11:2········· EXIT TO THE • • ROl • ROUTINE • • ••••••••••••••• •• •• INTEGER •• FUNCTION *. x • YES .··.·Jl.·· .•.··.•• PLACE • • • • .* • NO x X ZI ••• * • NO PLACE •• .... .. ...x .. :ZARRO H I . . 07 HZ •• 16 •• NAME •• YES • •• NAME •• NO •• IN SYMBOL TBl •••••• X. •• IN SYMBOL •••••• •• OR COM •• •• TABLE •• *•• * ••• *. .* .. .•. .. *. G3 .... .... .... .... •• •• YES· • •• REAL FUNCTION •••••• x. J3 • • YES lOililO .. .. •••••• i X Gl ZZ •• NO • • •••••• X. KZ • .* $ ••• • • • • J3 04 • • YES •• X. tINO X Z3 •••• ·J3· •••• ••• •• • INOICATE • • fUNCTION IN • • COMMUNICATION • • AREA (SORF) • ••••••••••••••••••• x •• •••• • Fl • ••••• • •• •• •• •••• • 1.2 • ••••• • .... .... X SIO A2 ••• •• 09 •• STATEMENT •• NO •• TERMINATOR •••••• *. *•• *.* • YES i 10 ..... ..·.·. •• 82.·.· •• REMOVE .STATEMENT FROM • • STRING • • • ••••••••••••••••• PHASE 01 ••• •• Bl •••••••••• •• • • RMOVE •• INITIALIZE • • PHASE •• ••••••••••••••••• x ••••• • • Fl • ••••• • X TEST Cl ••• •* •• •• 02 •• •• YES ••• X•• ENO STATEMENT •••••••••• •• •••• •• •• •• x ••••• .OK • • NO 01 .•.i •* •• •• -. •• • Bl. ••• .. .. DIMENSION .* YES •••••• .•. i •• *. .:.•• ~~S~~~!~~ .:.!~~. ALREADY •• *. ••• * .* · .. x 11 •••• •••• *•• * • YES ZORRO Olt •• •• •• NO • • •• LEGAL NAME •••••• X. K2 • ••••• • Gl • •• •••• • • NO El x············ 02 x *. .* •* .... .•. .... .. .... DAP 03 *. •• E2 .. .x •• 12 NAME *• •• YES •• IN SYMBOL •••••• •• TABLE •• •• .* *. * •• * .* ••••• • NO • OK • •••• • NO • Bl· • fl •• X. • • ••••• • • X 05 PLACE X 13 •••••fl . . . . . .•• •• ..... ...... •• MOYE TO •• •• F2··.· • • PUT ••••• NEXT STATEMENT. • NAME IN SYMBOL •• TABLE • • 10 •••••••••••••••••• •• •••••••••••••••••• •• •••• •• •••• • Gl •••• • G2 •• X. • • • • • X 08 MIX •••• JCOLL•••• X lit ····.Gl •••••••••• .•· .•G2.·.· .••.•• •• INITIALIZE •• : CON~~k~~~TTO : .BINARY AND PUT. TO SCAN • • .IN SYMBOL TABLE. STATEMENT • •••••••••••••••••• •• ••••••••••••••••••• · .. x ••••• • ••••• • • 1.2 • TARZ X 15 • •••• H2·· •••••••• ••••• • • • • GOTO • • 1.2 .X ••••• NEXT ITEM ON • STRING • • • • ••••••••••••••••••••••• .... x············ PREY... J2 •• 16 . SUBN . .. . 18 ••••• J3 •••••••••• •• SU8PROG •• NO • SPREAO SYMBOL •• NAME OR PREV •••••••••• X. TABLE FOR •• OIM.. • DIMENSION •••• • INfORMATION Chart DJ • FORTRAN - Phase 7 •• • ••YES •••• • K2 •• •• X. •• •••• • X 17 ER ••••• K2··.· •••• •• •• •• PUT STRING. • ERROR ON ••••••••••••••••••••• •••• •• X. Fl • •••••• • • • • ••••••••••••••••• •••• •• X. G2 • •••••• .. . Flowcharts 213 •• •••• • A2 • ••••• • ZAR ... •• A2 .•.x •• .. 10 •• • .SET INCICATORS • • •• •• ••••••••••••••••• • NO • ER •• • INITIALIZE • • PHASE • ••••••••••••••••••• •• ·••••.. OAP • • •• YES PLACE • •••••• ••• X.NAME IN SYMBOL • TABLE • • .• *•• - BEGIN X 01 ••••• Bl.· •••••••• B2 •• X. X ••••• B2 •• • ••••••• ·...... • •••• B3 •••••••••• Cl •• X. •• •••• • X.x ••••••••.•••. .•. X 11 •.••. C2·.·.· .•... .* END *. •• YES • •• •• •• MOVE •• STATEMENT •••••• ••••• TO NEXT • • STATEMENT • *. .* *. *. .• .* ••••••••••••••••••• X • NO •• •••• • F3 • ••••• • x Cl 01 •• •• .•. •* *. •• ... 02 •• •• .. .. REAL *. .•.x •• *. . ZORRO . EXTERNAL *. . .... .•••••••••••••••••. .... :NEXP F2 •• X •••••• ••••• • •• 12 .... •• •• •• •• •* •••••• Gl •• X. • X 06 *. x ••••• • • f3 • ••••• • ·.···Gl··· .......• •• INIT IALIZE • • TO SCAN • STATEMENT • • ••••••••••••••••••• •••• .* G2 .* *. BOB X 08 • RfMeVE • • STATEMENT FROM • STRING • • ••••••••••••••••••• X •• •••• • Cl • ••••• • Chart DK. 214 FORTRAN - Phase 7 •• *. .. .. ... .... 14 *. •• NO • .• .• •••• X. X .• H2 •• *. 15 . •• NAME •• YES • •• E~UAL IFIX •••• X. *. x ..... • Jl·.·.··.•..• . .. • YES ••••• • • YES .•.x •• •• EXTERNAL ••• H I . . 07 .* •• STATEMENT-. •• NO •• TERMINATOR •••••• *.. * SOS 13 • NO •••••• X *. •• .. .. • HI •• X• .* •• *••• · .. *. .•.x •• COMMON •• YES ..OR PREVo DIM ••••••• •• NO * ..• .* F2 *. .* .* • NO A2 • •• •••• • TlCKK •• J2 .•.X .0 *. 16 . .. .. ••• ..•••••.•••••••• •• NA~E •• YES X •• ECUAL FLOAT •••••• *. .- *••• • • NO x •• X. 83 • • B2 • •••• • x 21 ••••• E3 •••••••••• • YES MLTN 05 • YES LAP •••• • .!: ........... .... . •• IN •• NO • •• SYMBOL TABLE •••••••• •• YESX •••••• .... .... ·••••.. •• 20 COLLECT CONST • • TO BINARY AND • • PUT IN SYMBOL. • TABLE • • Gl • •• .* ••••• 03 •••••••••• 04 • NO .•.x .* ••••••••••••••••• :X .......... : .* Fl.. 19 •• .• *. INTEGER *. x : :PHIL 03 •• YES •••••• .. .. - .. •• •• El .x •• • YES • NO .• .. .. .... C3 •• NAME •• NO •• OIME~SIONEO •••••• *•• * JAP 11 ••••• A3 ••••••••• • •• •• PUT STRING. .ERROR ON •• •• ••••••••••••••••• .. .. ••••.. ·••••• • *. ••••• • 81· ••• PLACE • ••••••••••••••••••• •••• • B3 •• X. • • . .. •• LAP5 X 18 •• LEGAL NAME • OK • 09 • • MOVE POINTER • III • ••••• X. HI • • • •••• •• •F3 •••• ••••• • X 22 • ••• F3 ••••••••• • • • EXIT TO THE ROL ROUTINE ••••••••••••••• • • • >I) • •• ***. A3 •* **•• ** X .*. *• A3 .* *. *. NO .* •••••••• OPERATOR .* *. •. .* .* START •• ***Al •• * •• ***.* l3 *• •• INITIALIZE *• PHASE •* .*****.**.*** •••• • • *••• · .. * CAP *.• * * YES *. • Bl •• X. **** X .*. OUT BI *. *. •* *.*.B2** •• **.*. •• •• YES * EXIT TO THE • *. END STMT .* •••••••• X* ROl * •• .* * ROUT INE * *. * .•• . * *.***.*****.**. • NO ........... X:X CI •* .*. *. Z *. •• *. YES •• ARITH STMT •••••• *. •. .* .* .*x•• •• • .*NO : A3 : • X * * ... • ...* :X ........... . X •• *. : :ll : :133 * ••• *. YES • • CAll STMT .* ••••••••••••••••••••••••••••••• *. .* .* *. *.*NO • .*. x •*. *. JBR 03 • •• **04* ••• *****. .* *. * * .* lEGAL *. NO • REPLACE • • *. CONSTANT •••••••••• X*STMT WITH ERROR* •••• *. .* * MESSAGE • *••. ..** •.*.** ••••• * ••• **** * YES x *** •• E3*.***.*.** * : c~~~~~Clo • : * BINARY * * *.*.*.*.*.****** •• :MOVf X *** •• FI·· •••·*· •• *• • •* ,",OVE ••••• TO NEXT STMT. * :RC21 x ••*.*F3* •••••• ·*· ••• **.*.* ••••• ***.* •••••••• *••••••••* • * * • X Zl *****C2********** C3 *. * • *. * MOVE * X NO.* *TO NEXT ITEM IN*X •••••••• *. DECIMAL .* * STMT * X *. .* • • *..* ********* •••••• *. *. .* * YES NO X •*EI •• X ••• ClSUP B3 *. .*.*.B4.* ••• ***.* .*.. * * **** •• STMT •• YES * REPACK • * • •• TERMINATOR .* •••••••• X. STRING IF ••••• X. HI * *. .* • NECESSARY • X * • * ••• •• •• .** •• ******** •••• * NO ...* *•••• * ••• •• * A3 •* 01 * .*.. *.*. •• •• YES •• *. IF STMT •••••••••••••••••••••••••••••• X•• ............ **.* RC •• • PUT • • CONT. IN SYM • • * TBl • x :RC22 • •••• G3 •••••• **** PUT •• CONSTANT *• * OPERATOR AND * ** S.T. ADO ON * STRING * .**.* •• * ••• *.**** :NUMM x ••• *.H3 •••••• ***. * •* •• PACK ••••• STMT IF * • NECESSARY • • ** •••••••••• •••••• Chart DL. FORTRAN - Phase 8 Flowcharts 215 CKI Al······.··.• •..... • INITIALIZE • • •• PHASE ••• ••••••••••••••••• •••• • Bl •• X. • • x 10SYl•••• ••• · .. Ill.. Ofl B2 . • • . •• YES •• DEFINE •.•. ••• .* SORF •• •• OF5 *. •• NO Cl .•.x •• ER12 X • •••• C2···· ••••• • • • : lZP~~ ~~:Y~G : •• EXIT •••••• •• STMT •• •• *. .* •• x * •• * ••••••••••••••••• •••• • NO •• 03 •• •••• • .X. Fit • •••••• •••••• x ••• Cll 01 •• • •••• 02 •••••••••• •• • * CALL *. •• YES XR2R •* •• •• *. CALL •• YES • CHECK SYNTAX LINK •••••••••• X. AND MODIFY STMT.. • .. .. *..* ... • • • • •••• •• X. Fit • X El • ................ .. .. • • NO .* • •••••• •• *. •• END •• YES •• STATEMENT •••••••••••••••••••• *. *. ...... . .* • NO .* ••••• • X • • • 216 FORTRAN - Phase 9 •• COMPUTE •• :SPECI~I~iTIONS : ••••••••••••••••••• ••••• • 03 • •• •••• • eel • ···.03 •••••••••• X •• •• MODIFY TO MATCH • • • CALL EXIT •••••••••••••••••••• •••• •• X. Fit • •••••• .. . OF3 X • •••• Olt· ••••••••• •• ADD INFO •• • SYMBOLTO TABLE •• ••• •••••••••••••••• • X • •••• EIt •••••••••• •• UPDATE •• OFCNT ••• •• •••••••••••••••••• •••• • Fit •• X. ••••• • X •••••FIt·. . . . . . . .. •• •• MOVE TO • NEXT • • STATEMENT •••••••••••••••••••• •••• •• X. 81 • ••••• • · .. •••• •• X. F4 • Chart DM. X •• • •• CIt •••••••••• .. . •• • •••• B4 •••••••••• * CHECK FOR • •• .•••••••••.. X•••• POSITIYE •••••••••••••••••••••••••••••••••••••• X: A~~Ll8N~~~~is : *... ...* • • •• • ••NO •• • ••YES ••••••••••••••••• ~l~f ••• ·FZ···· ••• •• EXIT TO THE • ROL • ROUTINE • ••••••••••••••• .. . ••••• • A3 • •• •••• • A2 • ••••• • ORGIN 01 ••••• A1 •• •• •• • ••• CV7 •• •• • INITIALIZE • • PHASE •••••••••••••••••••• •••• · .. • ••••••••••••••••••• • •• * •. * .* •• *. .. .. •• .* CV5A 04 • • • *.. * 02 •• 13 •• YES· • •••••• X. K2 • *.. * X CVll •• ··E1········· EXIT TO THE • ROL • ROUTINE • E2 •• 14 •• •• NO •• VARIABLE NAME •••••• *. ••••••••••••••• *. *•• * .* .* x •• •••• • K3 • • YES .. ... .. .•. x .. .. .. .. F l . . "O!! •* *. • •• CONTINUE •• YES ••• X.. STATEMENT •••••• .* • X 15 •• •• NO •• LEGAL NAME •••••• *. *. 06 *••• .• ·....••••... •• •••• • A4 • ••••• • • .. . • • • • ••••••••••••••••••• FORTRAN - Phase 10 x •• •••• • A2 • •••••• • X ••• • •• •A2 ••••• •• •• •••• • K2 • ••••• • x )PUT X 09 ••••• K1 •••••• •••• • PUT SYMBOL • • TABLE ADDRESS • • ON STRING • X 23 ••••• F3.· •• • •• ••• • REMOVE • CONSTANT • • • OPERATOR • •• CONVERT •• ••• OPERATOR ••• ••••••••••••••••• • • Jl •• X. •••• X CV25A ••• Jl •• 08 . * *. •• NO •• LEGAL •• STMT NUMBER •••••• •• IN SYM •• •• TBL •• • Kl •• X. • •• NO ••••••• .* CVI0 X 24 • •••• H3 ••••••• • •• CVl7 X 17 ••• ··H2·.· •• ••••• • FI~o OR PUT • • NAME IN SYMBOL • TABLE • • • • x ••••••••••••••••• • ••• •••• •• B2 •• ..X. Kl • ••••• • •••••• • YES *•• * .* • YES .. .. .. .. ··••••.. .. *.. * ••••• • 22 • NAME IF • • REQUI~EO IN • • STMT FUNCTION. 07 .* *. •• NO •• •• 00 STATEMENT •••••• .* •• X. Kl • ••••••••••••••••• .•.x • YES •• • • ..••••. E3 • • .* • CONSTANT IN • SYMBOL TABLE A3 • HI.. *. Chart DN. •• 28 ••••••••••••••••••• X •••••• • "4 •• X ••••• •••• •• •A2 CVl3 X 16 ••• ··G2 •••••••••• ••••• •• •.AoJUST SHAPE OF.• •• ••••••• ••··.··Gl· • SET SkITCHES • : ~~~olbA ~~I~~ : • • ••••••••••••••••• CV3 F2 X ••••• • ••••• • • NO CV2 ••••• • X • •• CONSTANT •• OPERATOR *. ••••••••••••••••••• ••••••••••••••••••• E3 *. • 04· •• • •• •• •• •••••• • • FIND OR PUT • X CV6 • •• •Bl •• • • NO X *. • • • x ••••••••••••••••• •• •••• • Jl • x ••••• • ••••• • •• . . • •• •• OPERATOR .* • YES :WAIT .... ••••• • ••••• • • • •••• · .. .... ... .... .. .... ••• .... .... ••••• ••••• • .. .•. .. .. ... .. X NO •• •• •••••• ENo STATEMENT •• *. ••••••••••••••••• 26 X ••••••• ••• •••• A4 ••• • PUT STRING •• .ERROR ON •• • •••••••••••••••••• • ••••••••••••••••••• •• •••• • •••• • NO C3 • ••••• • •• 02 ••• X. •••• x X *. • • • • • A4 •••• • .. • NO ... • REMOVE • POSSIBLE STHT • NUMBER. CHANGE • 10 IF STMT IS • STHT FUNCTION .... ••• CV50 X 20 B2 •• 11 •• ••• B3.· •• • •• •• • • * R/W *. •• NO •• • CLOSE UP • •• GO TO OR IF •••••• STRING IF • • •• STMT •• • NECESSARY • X *•• * • YES • .X ••••••••••••••••••••••••• • 02 • • • C3 •• X. X • :COOT x 27 MOVE X 21 •••• ·C4 •••••• •• •• C2 •• 12 ••• •• C3.· •• •••••• .* *. •• •• YES • COLLECT • • MOVE • ..INTERNAL STMT •••••• • INTfGER • • TO NEXT • •• NU"'BER •• CONSTANT • • STATEMENT • • . 03 *. •• YES •• FORMAT OR ERR •••••• •• STMT •• 01 • X 19 ••••• A3 •••••••••• •••••• X .. .. X •* ••••• • • • . CV12 • B2 •• X. CV5 • INITIALIZE • • TO SCAN BOOY OF. • STATEMENT • *. •• ••• • MOVE POINTER • Bl •• X. ... CVO 10 • •••• A2 •••••••••• •• ••••••••••••••••• •••• ·• .. • Cl X •• CVI •••• X 02 ••••• B1··.··.··.· • * .FIO •• ••••• • • CV5B K2 .•.x •• •• •••• • K3 •••• ••••• • x .•. CV22 18 .* *. •• STATEMENT •• NO •• TERMINATOR •••••• *. .* *. * .• * .* • YES x •• •••• • A3 • •••••• x •• •••• • E3 • ••••• • K3 •• 25 .* LEGAL *. •• YES • •• •• INTEGER •••••••• ·.CONSTANT •• *. *•• * .* • x •• •••• • A4 • ••••• • Flowcharts 217. START 01 ••••• Bl •••••••••• •• • • ••• INITIALIZE PHASE • ••••••••••••••••••• ·•••••••••.. • • Cl •• X. ABEL .. C1 .•.x •• •. 07. OUT 12 •• •• YES • ••• X•• END STATEMENT •••••••••• X. •• •• • •••• *•• * ••••C2.··.· •• •• EXIT TO THE RCL ROUT INE ••••••••••••••• • • • • NO iC :CBEL 01 ••• •• 03 .:t 111. •• FO~~AT •• YES •• STATEMENT •••••• *. •. *••• .* .* '" NO X :NOVEM 04 ..... El····.··.··• NCN • .• X...••• STATEMENT • • ••••••••••••••••••• ~OVE FOR~AT :OECE~ .~:........... BAKER 11 ••••• F2 •••••••••• .* *. •• NO • •• •• • PUT •• STATEMENT •••••••••• X.ERRO~ ON STRING • •• NUfo'BER •• X. • Fl •• O~ *..* •• ••••••••••••••••• •••• •• X. Cl • •••••• .. . •• • ••YES X ('6 ..... Gl.····.·.·.• •• • • INITIALIZE TO • SCAN BODY ••••••••••••••••••• •• •••• • HI •• X. • • X ·...... .. ... .. ·.IEND ·• YES.. H I . . 07 END •• •••••• OF STATEMENT •• ·.0 *. * •. * .* .• • NO Jl ••• •• 08 .. * *. •• •• SYNTAX NO • • •• AND TYPE OK ••••••• ... *. *•• * .lII .* • YES 218 FORTRAN - Phase 11 Oq •.SPECIFICATIONS OUT •• • •••••••••••••••••• •• X TST Chart DP. x ..... H2······ ..··• • PUT X 10 ·····J2·········· •• MOVE TO NEXT •• • • ELEMENT OF STATE~ENT • • •• ••••••••••••••••• •••• •• X. HI • ••••• • .. . START 01 ••••• Al •••••••••• ••• INITIALIZE ••• • PHASE • •• ••••••••••••••••• •••• .. ·· .. • III •• X. •••• X ••• TEST 81 .* •• *. 02 NO •• •• •••••• ENO STATEMENT •• *. .. .. .* •. .* •• •••• • C2 •••• ••••• • ii .•. ABel • YES :OUT 11 ii • • • ···.Cl···.····. EXIT TO THE • ROL • ROUTINE • ••••••••••••••• 01 ••• •• .* C2 •• *. 11 •• •• NO •• STATEMENT •••••• ..FUNCTION •• *. N 03 .• ERROR *. •• YES • •• ••• X.. STATEMENT •••••••• *. *. •• .* *•• * • NO .* *•• * • YES X 12 •••••••••• •••• •••02 • REPLACE • .STATEMENT WITH • .ERROR STATEMENT. ••••••••••••••••••• X .•.x E1 •• 04 .* *. •• YES •• FORMAT • •• STATEMENT •••••••• X••••••••••• •. *. •. .* .* .* • NO .•.x Pl.. .. .. .. .. :A8Ell 05 *. . ~~~ll=~~T ·:.:~~.X: *. .* *. .* .:. •* • NO Gl .:. •• :CK 06 •• .FIO •• YES • •• STATEMENT •••••• X. *. *. *. .* .* .* • NO X 07 ••••• H1· ••••••••• •• •• • INITIAL1ZE TO • • SCAN PHASE •••••••••••••••••••• •••• •• Jl •• • ••• X. TEST t··· J1 j.•• 08 •* *. •• STATEMENT •• X :ZZZZ X • • :ST:~N~p~~\krWED: • OPERATOR • • STORE 0 VALUES IN ••••••••••••••••• X 16 ••••• J2 •••••••••• :MOVE MOVE TO NEXT STATEMENT .... •. ..... 3.· •• •• ii 09 .• .. . •• X. 81 • • YES X ••••• • • C2 • •••••• .• •••••• 10 ••••• K2 •••••••••• .••••••••••••••••. •• DIM •• N O . •• LEVEL 1.2 OR •••••••••• X. MOVE POINTER Chart DQ. • • • • ••••••••••••••••••• •••• • NO •• 14 IS • •••• H2 •••••••••• • .• YES X . •••• •• •• K1 13 •••G2 •••••••••• ••• •• CALCULATE 0 ••• • VALUES • •••••••••••••••••• • •• TERMINATOR •••••••••• X. •• •• • ••• X • •••• FZ......... . •• •• GET • DIMENSION • • PARAMETERS • •• ••••••••••••••••• • • • •••• •• •• X. Jl • ••••••• FORTRAN - Phase 12 Flowcharts 219 •• •••• • A3 • •••••• ARITH X 18 • •••• A3 •••••••••• • ~OOIFY • :EXPRE~~I~~ FOR : • SCAN PROCESS • START 01 ••••• A1 •• • ••••••• •• ••• • INITIALIZE • PHASE •••••••••••••••••••• •••• ·· .. .. • Bl •• X. •••• X ••• B1 •• NO •• •••••• END .. XYl +. *. .. .. .. .* XYl5 Ol Bl •• •• •• • • • .. .x •• *• .* *. *. .* *. .- .* II .... Cl·.····.·· EXIT TO THE • ROL • ROUTINE ••••••••••••••• • .* •• Cl .•.x •• *. *. *•• * .* •••••• .•. X * •. - .* XYl3 .• .• El .•.x x *. 04 .0 NO •• IF STATEMENT •••••• -. *. *•• - .* .* • YES X 05 •••••F1······.. •• • PUT IF • • OPERATOR ON • • STRING • .•.x •• 06 x •• •••• • Bl • ••••• • ... • NO .* .* x ••••• • • J3 • ••••• • 12 X 13 ••••• El.· ••••• ••• • PUT CALL • • OPERATOR ON • • STRING • E3 •• II . .• *. • ••• .YES •• STATEMENT •• NO • • X••••• TERMINATOR •••••• X. A3 • •• 14 .... .* •• •••• •• •• .... .... NO • • STATEMENT •••••• X. K3 • •• ..FUNCTION •• •• •• •• .... • *•• - •••••• • K3 • ••••• • x . .•.x *. x •• •••• •• ••H3 ••• • •••••• • Gl • ••••• • GZ .•.x············ :XYl3 • • ••••••••••••••••••• XYl8 •• • * LEFT *. •• YES •• PARENT~ESIS •••••• -. *. • NO • •• • •••••••••••••••••• • • ••••••••••••••••••• Gl .• ·····: INDICATE • .SUBPROGRAM NAME • ••••• • •• .* •• •• •••• • A3 • • NO *.• - • •••• Ol·· •••••••• 01 •• 03 •* *. •• YES ••• ••• X•• ARIT~METIC •••••• •• STATEMENT •• *. 19 ••••••••••••••••••• x •• •••• • J3 • ••••• • • YES :XY5 •• LIST X lO •• •• ·C3 •••••••••• • CHECK • STATEMENT • • .NUM8ER LIST FOR. • VALIDITY • 11 .* •• •• •••• • Gl • ••••• • *. •• NO •• LEGAL NAME .. .x .* *. •• YES •• ··.!~JI~~~I~~ x • YES X B3 10 • :. ST~~~~ENT .:.~~ •• • YES :OVERF ••••••••••••••••••• •• •••• • 8l • ••••• • x •• •••• • A3 • ••••• • A *•• • YES .. .. .. .x HZ •• 15 VALID *. •• NO •• STMT FUNCT •••••••• •• NAME •• •• • * •. ••••• • H3 •••• •• •••• • x . XYl9 .. H3 •• 07 •• .*STATEMENT* ••• YES •• TERMINATOR •••••• .. .* *. ·•••••.. • YES *•• * .* .. • NO • J3 •• X. X :XY7 •••• 16 ·.· .. Jl·········· • •• ••• X.ERROR •• •• STHT PUT FUNCTION.• • OPERATOR ON • • STRING. COUNT. • • ARGUMENTS. • .•.x 17 *. •• NO •• • * •• lESS THAN 15 •••••• *. *. •• .. .. .- • YES Chart DR. 220 FORTRAN - Phase 13 x •• •••• • A3 • ••••• • .* 08 • •• PUT • ON STRING. ..... ••••••••••••••••• ••••••••••••••••• I(l • x ••••• J3 •••••••••• • x •• •••• • J3 • •••••• ••••• • • • • • . .X ••••••••••• • K3 •• X. • XYll X 09 • •••• K3 ••••• • •••• MOVE TO NEXT STATEMENT • • • • ••••••••••••••••••• x •• •••• • 81 • •••••• •• •••• • A2 • ••••• • XYl4A X 10 ••••• A2.· •••••••• START 01 ••••• Al····.··· •• • INITIALIZE • TO SCAN • • STATEMENT • • • •• CHECK liST •• FOR VALID • • .VARIABlE NAMES. ••••••••••••••••••• •••• • • • ••••••••••••••••• ·· .... ·••••.. NO •• •••••• .• *. Bl ••• •• END *. * •• * 02 .* .. *. .* *.• * • NO .. XY15 *. •• .* ••• A3 •• 18 •• *. •• STATEMENT •• YES • •• X•• TERMINATOR •••••• • 82 •• X. •••• X ••• 82 •• 11 .* RANGE *. •• NO •• • •• OPERATOR •••••••• • Bl •• X. •••••• ii XY2 XY13 -. •• *. .* .. .••••. . X·· .... . .. . ...... .. . . •• •• ••••••••••••••••• • YES * •• * • YES • C3 •• X. XY7 •••• X 19 XYl6 C2 •• 12 ••••• C3 •••••••••• •• NON •• NO • PUT • X ..DIMEO INT VAR •••••••••• X.ERROR ON STRING ••••• ••• :OVERF 20 ii •••• Cl·.···· •• • • EXIT TO THE • ROl • • • ROUTINE • ••••••••••••••• • YES :XY3 .. .•. 01 •• 03 READ *. •• YES STATEMENT •••••• •• . * • ••• X.. *. •• •* .* .. .•. •• .. .. ·••••.. *. STATEMENT 04 .* • Fl •• X. ii ••• Fl.. XY21 X 14 ••••• E2.· •••••• •• • REARRANGE • ••••• • IMPll~O CO .STATEMENTS FOR. • SCAN • • ii ••••••••••••••••• •• •••• • G2 • ••••• • • YES •••••• • • ••••••••••••••••• • •••••• *.• * XY6 • • • • ••••• • • * WRITE *. •• NO •• •• 13 PUT OUT OOA OPERATOR • • X ii El X • •••• 02 ••••••• • •• •• •••••• • Fl • • NO XY4 PUT 05 .* 10CS •. •• NO •• •• RECORD •••••• •. .* *. .* X *.. * ••••• • C3 • •• •••• • • YES XY6A .. .•. .. .... ii Gl •• 06 •• lEFT •• NO •• PARENTHESIS •••••• -. .* .* *. • YES PUT ii 07 ••••• Hl·········. •• • • .• •• Jl • • *. .* .* • YES ••••••••••••••••••• •• X••••••••••••••••••••••••••••••••••••• X • •• .. .. XY22 OB .* • YES .•.X X • • •• •• .* •••• *.. * 17 TO NEXT • •• •••• • C3 • ••••• • • STATEMENT •• ••••••••••••••••• Kl •• 09 •• VAR •• NO • • •• lIST FOllOWS •••••• X. 82 • *. X ·····J2·········· • MOVE •• • *. •• NO •• R/W STMT NUM ••••••• •• OK •• *. -. XY27 X 16 ••••• H2CHECK •• ••••••• •• • • STATEMENT • .NUM8ER liST FOR. VALIDITY • • ••••••••••••••••••• .•.x .. .. .. G2 •• 15 .* GOTO *. •• NO X . •• •• STATEMENT •••••• x •• •••• • C3 • ••••• • •• PUT OUT 110 OPERATOR ••••• • • • X XY24 •••• . ,.; G2 •••• •••• * ••••. X •• •••• • 81 • ••••• • • YES Chart DS. FORTRAN - Phase 14 X •• •••• • A2 • ••••• • Flowcharts 221 ••••• • •••••• •• •••• • A2 • • A3 • •••••• STAI!T lINUE 01 ••••• Al····· •• ••• ••• INITIALIZE ••• PHASE ••••••••••••••••••• •• •• • * A2 *. *. * •. * Bl *. .•. •• END *. •• .* .* • • *. .* LIZ 02 .* •• •• *. • YES *. *•• * .* ••• GENERATE A LABEL • · .. E2 • ••••• • •• B3 ••• X. •X ISTNO•••• 11 20 • •••• B3········.· • PUT STMT • NUMBER OR • • .GENERATED LABEL. • IN WD 2 OF DO • • TBL • * *. •• YES •• • CONTINUE •• STATEMENT •••••• *. •• .* 82 .•.x 19 • • ••••••••••••••••• ••••• • •••• x • x •* X • •••• A3· ••••••••• 10 *. •• NO • YES • Bl •• X. NU •• •••••• •• •• IN DO TA8LE •••••• ·••••• .. ••••• A~EL .•.x .* ..• . ••••••••••••••••• •••• • NO •• X. E2 • :OUT • • • X 21 X ··.·C1········· EXIT TO THE • ROL • ROUTINE • ••••••••••••••• ············x .•. 01 •• • OPEN STRING • .TO INSERT A DO • • TEST • ••••••••••••••••••• X ....• .....13.• •• 02···· PUT •• •:• OUT A ~00 TEST :•.X ••• •••• • E2 •• X. .• fIIOVF• • .X lit IPUT 03 *. •• YES •• • * •• CO STATEMENT •••••••• *. •• •. .* .* ••••• 12 •..... C2········..• .* • NO •• •••• • 03 •••• ••••• • x .•. INUMB 03 •• 21 .* NUMBER *. •• YES FOLLOWS •••••• *. .* *. .• *•• • *NO •• •• ....... ....... ·...... ••••• E2.· •••••••• •• •• MOVE TO NEXT • • • • SlATEfII~NT • • ••••••••••••••••• ·••••••••..• x •• •••• • Bl • ••••• • ············x FULL ••• • F3 •• X. • • IFIO X 23 • •••• F3 ••• • •••••• • •• PUT TO FlO. •• OUT CALL •• • •••••••••••••••••• ..••••. •• X. E2 • ••••• • .... .... G2 •• •• 10; .* LEGAL *. •• NO •• 00 STATEMENT •••••• x *•• * ••••• • • Hit • ••••• • • YES .•.x HI.. •• •• •* *. STOP *. * .• * *. •• YES •••••• .* .* x •• •••• • 03 • ••••• • • NO J1 •• • * •• *. .•.x •• PAUSE OB *. •• YES *. •• • * .* .* •••••• • NO BAKUI .•.x X 07 Kl •• *. *•• * x x • E2 • • YES FORTRAN - Phase 15 •• •••• • A2 • ••••• • 222 X ..... 17 ..... J2·.··· • PUT • • OUT 00 INIT. • MOVE TO NEXT STATEMENT • .•.x 09 .... .... •• •• H3 ••• •• ••••••. . . .•••••••••••••••••. ..•••••.• CLOSE X 26 • ••••HIt •••••••••• .:·INT~~G~bNST·:.~? ••••• X:ERROR b~TSTRING: ·.VARIABLE •• • YES • • • X 25 • •••• J3 •••••••••• • PUT IN SYM • TBLE. PUT • • • SYMBOL TABLE • .AOOR ON STRING. • • ••••••••••••••••• .... 1<2 •• IB •• •• YES· • •• STATEMENT •••••• X. 83 • •• NUMBER •• • • *•• * • NO ••••• SHOE •• •••• Hit • •••• • • ..X. E2 • • • x ••••••••••••••••• •• •••• • 03 • ••••• • •• •• NO •• STATEMENT •••••• •• j;AVE NUM ••• Chart DT. •• 8UILD DO •• .TABLE. (EXCEPT. • WORD 21 • •••••••••••••••••• • .. .. .. .. ..••••. .... • .• 16 ••••• H2 •••••••••• x············ x ••••• • • A3 • •••••• .... ....X.•••••.• F3 • •••• •••• •• •••• • AZ • ••••• • START .•.X 01 •..... Al····.·····• AZ •• 10 *. •• YES S8SC ..EXPRESSION IN •••••••••••••••••••• •• TABLE •• .• •• •• INITIALIZE •• PHASE ••••••••••••••••••• •• ·•••••••••..• • *. Bl •• X. TEST NO •• •••••• .. *. 81 .•.x •• .. END *. *.• * .* G OZ •• •• .* :OUT X IZ ••••• CZ ••••••• ••• X 01 ••• X.. •. .•.•• .. .. FORMAT *. 03 *. •• .* .* YES •••••• x OPFN X 13 • •••• CZ··.· •• •••• • PUT SU8SC • • GENERATED • • TE~PORARY ON • • STRING • ...x EI •• 04 .• STMT *. •• YES •• •• HAVE NUMBER •••••• •• *. .. .. · .. •••• .• .* x ••••• • • F3 • •••••• • NO • Fl •• X. •••••• X I IF ••• *. FI 05 •* *. •• STMT IF, •• NO ~!LkRI~~~ O~ •••••• : .. .. •. x *•• * ••••• • • YES • • •• •••• • JZ • ••••• • • NO X 20 ••••• C3 •••••••••• TST5 •• TAG NAME • • • ••••••••••••••••• •• • •• .... Cl········· fXIT TO THE • ROL • ROUTINE ••••••••••••••• • •* ••• ~ 11 •• ••• 8Z·· ••••• ••• • PUT IN • • SUBSCRIPT • • EXPRESSION • • TA8LE • ••••••••••••••••••• • YES • • • .* *•• * • NO ••• TAG NAME ••• •• • •••••••••••••••••• i 21 • •••• 03 •••••••••• TST5A • ••••••••••••••••••• •• •••• • E3 •••• ••••• • • PURG X 19 •• RE~OVE • ••••••• EXPRESSION FROM. • STATEMENT • ••••••••••••••••• X 14 • •••• E3 •• • ••• • ••• E2·· •••• •••• • PURGE • •••••• •• • INDEX FROM • • MOVE .PAST SUBSCRIPT. .X.....•• EXPRESSION SU8SCRIPT • • •• •• • TABLE • ••••••••••••••••• ••••••••••••••••• . . •••••• * • .X ••••••••••• • F2 •• X. ••••• • • • X X 15 TESTl•••• . F3 •• 22 ••••• FZ··.······· •• •• NO • • ••• MOVE POINTER ••• •• REFERENCED •••••• X. F1 • ..STATEMENT.. •• •• •• *..• ••••••••••••••••• .... • .. .. .. .... F3 •••• .... .... • YES • J2 • ••••• • X C 06 •.....Gl····....·.• • • • INITIALIZE TO SCAN STATEMENT G2 .•.x •• TLR 16 •• • *STATEMENT*. •• .. • • • •• TERMINATOR ••••••••••••••••••• •••• · .. *. .• *.. • * YES .. NO •••••• x •• •••• • HI • ••••• • • 1-<1 •• X. •••••• X 100 o HI ••• .•• JAY 07 *. •• YES •• . * •• DO OPERATOR •••••• •. .* X 17 HZ·· •• • •• ••• •••••• •• • CLOSE UP • STATEMENT IF • NEC~SSARY X Z3 ••••• G3 •••••••••• • • • • CLEAR SUBSCRIPT EXPRESSION TA8LE • • • • ••••••••••••••••••• X •• •••• • Fl • ••••• • • • • • x *. .* ••••••••••••••••• •••• • NO • • •••• ••••• • •• J2 ••• X.. x o MOVE X 18 J1 •• 08 ••• •• J2.· •• •••••• • •• •• •• NO • MOVE •• SUBSCRIPTS (0 •••••• • TO NEXT • •• (1 (2 (3 •• STATEMENT • • *. .* • • x *. .* ••••••••••••••••• • YES •• •••• • F2 • x ••••• • •• •••• • TSl't X 09 81 • ••••• Kl ••••••• • •• ••••• • •• • GET • • SU8SCRIPT • • EXPRESSION •••••••••••••••••••• .* *. .. ... .. Chart DU. FORTRAN - Phase 16 • E3 • ·...... X •• •••• • A2 • ••••• • Flowcharts 223 X Oq .•..• A2··· ...•.•• START 01 ••••• Al· ••••••••• : SCANI •• • • • INITIALIZE •• • PHASE • ••••••••••••••••••• • • • • INITIALIZE FOR SCAN STATEMENT • • • •• •••• • 83 • • • ••••••••••••••••• ••••• • X 10 .•..• B2··· .•..... •• • • · .. 02 • • .* *. .. .. .. .. :PTPOL 03 •• ARITH ASF •• YES • ••• X•• CALL GOTD IF •••••••• •• R/W snITS •• •. .* • NO ... x •• Olt *. •• NO •• • * •• ENO STATEMENT •••••• *. *. •• •• .* .* .* • YES •• 11 *. •• NO .. .. ~ .* •••••••••••••••••••• x :X ........................ . 12 •·.·.·02······.··. •• • CALCULATE .STATEMENT NORM • •• • •••••••••••••••••• X .•••• E2··· ......13. •• IF NECESSARY, •• • OPEN OR CLeSE • • STRING •••••••••••••••••• •• CRTNM X lit ••••• FZ· ........ . 05 i • • •• • •••••••••••••••••• • • •• Fl····· •••• EXIT TO THE • ROL • ROUTINE • • CORRECT • .STATEMENT NORM. ••••••••••••••• .......G2···....·... MOVE x X 15 • PLACE • ••••••••••••••••••• POLISH TABLE ON. • STRING • • • ••••••••••••••••• x :NEXTS 07 ••••• Hl •••••••••• • MOYE •• • TO NEXT • • STATEMENT • •••••••••••••••••••• .•.x Jl •• DB • NO •• LAST STMT •• YES. • •••••• A STATEMENT •••••• X. Cl • •• FUNCTION •• •• •• •• .... • *•• * Chart DV. 224 FORTRAN - Phase 17 • • • ••••••••••••••••• NAME .... x 03 ••• •••• .... •• .... •• •• . AOY. 16 x•• • YES X FORCE ••• E3 •• 17 •• DO •• •• THE •• NO • •• OPERATORS •••••••• •• FORCE •• •. .* * •• * • YES •• •••• • 83 • ••••• • . 19 ••••• Olt •••••••••• .•••••••••••••••••. •• BOTH •• N O . • ••• o~I=~~bRs ••••••••• X: MOVE POINTER x • • • •• PERFORM ALL • •••••• FUNCTIONS OF • INTERPRETER PACKAGE • *•• • *YES X •• ••• C2. •• NORM •• LESS THAN ••••••••••••••••••• El 18 ••••• B3 •••••••••• x :CKNM •• POINT ENTRY IN START.• • ROUTINE • .•. X PLACE : X •••••••••• : ••••• Cl •••••••••• 01 • • TE~PORARIES ••••••••••••••••••• •••• • Cl •• X. • • X RST •••• SETUP •• RESET GENERATED • : ENTER 01 81 ••• ••••••• •••••••INITIALIZE • • • PHASE •• •• • ••••••••••••••••• STAPT X 02 ••••• Cl ••••• ••• •• •• STRINGMOVE NEXT TO •• • SYM80L TABLE • • • INITIALIZE. • ••••••••••••••••••• •••• ·....... • 01 •• X. • * .X ••••••••••••••••••••••••••••••••••••• 01021 X 03 ••••• 01··· •• ••••• •• • •••••••••••••••••••• •• INITIALIZE • TO SCAN NEXT STATEMENT • 01051 13 ••••• 02 •••••••••• • • ••••••••••••••••••• • MOVE oUMHY • •••• ~X. VARIABLE TO • • OUTPUT STRING. .•. X 01061 X 03 .* Fl .•.X *. *. 05 •• 10 * •• * • YES lit ••••••••••••••••• • NO .•.x • olt • • NO.. .* LAST *. •• .x •••••• STMT ENO STMT •• *. .* *. .* El •• Olt ••• ··E2 •••••• • ••• • MOVE TO OUTPUT • •* *. •• YES •• •• STRING •• • •• STHT FUNCTION •••••• ••• X. PReCESSING ••••• •• STHT •• • SU8SCRIPT • X •• .* • OPERATORS • .... •••••• ••••• • •• •••• •• ••03 ••• • EXIT • • • X 11 ····E3········· EXIT TO THE • AOL • ROUTINE • ••••••••••••••• P20~1 X 11 ••••• Olt •••••••••• •• PROCESS •• RETURN • • STATEMENT ••••••••••••••••••• •• x •• •••• • 01 • ••••• • . •• ARITH.~ •• YES • •• •• ~~~~~M~Nt •• •••••••• *. *. .• .* • NO .... .... •• •• ••• •• . . . .• x GI P2011 15 ••••• G2 •••••••••• 06 •• GOTO •• YES • PROCESS • • •• STATEMENT •••••••••• X.GOTO STATEMENT ••••• •• •• • • NO .•.X HI.. • x •••••••••••••••• 01 *• •:.••.*STATEMENT e~~¥~ .:.~~~ .............. . •• *. *. .* .* • NO •• Jl .•.x •• t. PI053 08 •• RETURN •• YES •• STATEMENT •••••• •. *. *.. * .* .* X 16 • • READ WRITE STATEMENT • ••••• • x ••••••••••••••••••• •••• •• Olt •• ••••• • • NO 010101 X •••• •••••• ••• •• ··J2PROCESS •• 09 .....Kl····.····· MOVE • • • : STATEMENT • ~~~~~~R~~RI2G : ••••••••••••••••••• x •• •••• • 03 • •••••• Chart DW • FORTRAN - Phase 18 Flowcharts 225 :PI051 X 10 •• ••• A2 ••••••• • •• • MOVE DUMMY • • VARIABLE TO • • OUTPUT STRING. • • • • ••••••••••••••••• •••• ENTER 01 ... • ·.Bl··.·······• • INITIALIZE • • PHASE • ••••••••••••••••••••• X START . 02 .STRING NEXT TO • • SYMBOL TABLE • • • INITIALIZE • ••••••••••••••••••• ·••••• .. •••• • • 01 •• X. • PI011 X 03 ••••• 01···.······ • INITIALIZE • ••• X. TO SCAN NEXT • STATEMENT • • • • • • ••••••••••••••••• •• El .•.x .. .. Olt *. •• yeS •• ...x Cl .•.x •• 11 •• END •• • ••• •• OF •• YES. • •• STATEMENT •••••• X. Dl • ..OPERATOR •• •• .... *••• .. .. •• x ••• P5011 17 D2 •• 13 ••••• 03 •••••••••• •••• • MOVE • •• •• YES .1WO CALLS W/ARG. ..CALL OPERATOR •••••••••• X. TO OUTPUT ••••• •• •• • STRING • X .... •• •• • NO ...... .. •• •• • MOVE • • OPERATOR AND • • NAMES TO OUTPUT. • STRING • x ••••••••••••••••••• •• •••• • B2 • x ••••• • •· •••• :PI01t1 X 06 Bl ••. ...·.Gl·.· .......• ••••• • MOVE • STATEMENT • * •. * .* • NO • UNALTERED TO • OUTPUT STRING. ••••••••••••••••••• • .•.x H I . . 07 •• WAS * ••• • NO.. •••••• LAST STMT END •• •• STMT •• *. * •• * .* • YES x 08 ROL • .··::tl·~~·;~:··. • • Chart DX • 226 FORTRAN - Phase 19 .•••••••••••••••••. ••• P3011 16 El •• lit ••••• £3 •••••••••• •••• • MOVE •• .:·IF OPERATOR·:.!~~ ••••• X:OP~~T~U~A~fiGTO: ••• : P:!013 X 15 ••••• Fl ••• • . . .••• 05 •• ARITH.~ •• yes •• •• ~~~~~M~Nt •• •••••• *. .... • NO • NO • NO 1"1 ••••••••••••••••• x •• • STATEMENT •••••••• •• FUNCTION •• *. ·• Bl .. X. • .X ••••••••••••••••••••••••••••••••••••• .P2011 X 11 ••••• B2 •••••••••• • MOVE TO • • OUTPUT STRING. • TILL NEXT NON. • PROCESSEO • OPERTR • • ..... Cl·········· • MOVE • •• •• ·....... ROUTINE • ••••••••••••••• .•••••••••••••••••.. ENTER • •••• AI •••••••••• •• •• • INITIALIZE • PHASE • •••••••••••••••••••• X 01 10 ••••• BI· •••• ••••• • ALLOCATE • • COMMON VAR. IN • • SYMBOL TABLE • • ••• 82 ••••••••• • ENTER • PRINT • • • • SUBROUTINE • • ••••••••••••••••••• .. .X X PB21C ••• CI •• 02 .* *. •• EQUIVALENCE •• NO •• STMT PRESENT •••••• •. *. .* * .. • *YES .* C2 •• 11 •• .*LIST SYH * • •• NO • ••• 1=kbG~~~ ••••••• : *. *. •• .* • YES X 12 •••• ·02·••••••••• P8212 X 03 •• •••••••• •·····01· IDENTIFY • AND ALLOCATE • • VAR IN COMMON • • THRU • • EQUIVALENCE • •• MAKE • .ENTRY IN PRINT •• BUFFER • •••••••••••••••••••• ••••••••••••••••• X P8311 .* •• ... X.. ••••••••••••••• El ••• •• 04 *. •• . YESX ALL EQUIV VAR •••••• •• ALLOCATEO •• •. .* E2 *. ••••••••••••••••• 13 .* *•. • * YES X lit PRINT • •••••• f2 ••••••••••• • • ••••••••••••••••••• :P8511 X 06 • •••• Gl.· ••• •• ••• • ALLOCATE • • • VAR NITHIN • ••••• COMBINED NEST. • AS PER • PRECISION • • •• •• BUF FULL OR •••••• •• END OPe •• *. • .*NO :PB321 X 05 ••••• Fl· . . . . . . . .. • IDENTIFY A • • COMBINED NEST • • OF VARIABLES IN. • EQUIVALENCE • .. .X .* PRINT *. •• NO X . •• • ••••••••••••• :X .......... : JRET X 15 •• ••••• • ··.·G2·· RETURN TO • • CALLING • ROUTINE • • ••••••••••••••• PB711 X 07 ••••• Jl.· ••• •• ••• • ALLOCATE • • UNALLOCATED • • VARIABLES IN • • SYMBOL TABLE • ••••••••••••••••••• EXIT X 08 KI ••••• •••• • • • ••• EXIT TO THE • ROL • • ......................... ROUTINE • Chart DY. FORTRAN - Phase 20 Flowcharts 227 01 .···.Bl .....•...• •• IN I TlAlIlE •• ENTER PHASE AND • :;;~;~·····:t B2 • PRINTER ••••••••••••••••••• •• X MOUST 02 •• :E2020 10. • 03 ......01··.···· •• ·· • UNREFERENCEO LIST • STATEMENTS • ••••••••••••• X Al021 Olt •••••• El •••••• • •••• • • LIST UNDEFINED VARIABLES • • ••••••••••••• EIOn .... .... .. .. .. . X ••• 05 Fl.. •• •• YES • ••• X•• END OF STRING •••••••• . • NO :EI021t .• Gl j. *. •• •• ERROR 10 *. *. *. 06 •• YES •• .* •••••• *•• * • NO x 01' ····.Hl ••.....••• • :El031 MOVE STATEMENT •• • x••• UNALTERED TO • OUTPUT STRING • • • • • • ••••••••••••••••• :El051 08 ······JI··········· LIST ERROR • AND STHT • • ~~r~~~N~~OM • STRING ••••••••••••• Chart DZ. 228 FORTRAN - Phase 21 •• x •• : RIOll 11 ••••• B3 •••••••••• • ................$ • YES 10 •• • ••• C2 ••••••• •••• ••••••••••••••••••• X 09 x ...·.Cl···..··..· • DELETE .EQUIV STMTS. IF.• • ERROR NOTED • • INSERT ERROR AlOll •• •••• • REARRANGE • •• COMM •• NO • STRING. PUT $ •• AREA ERROR WD •••••••••• X.FORMATt DEfiNE • :~J~l6~ ~IRF~~~T: • •• !ND ON.... EXIT X . ...C3········· • PRINT MESSAGE. • EXIT TO THE • 'O~TPUT HAS •••••••• X. ROL • BEEN. • ROUT INE I~ SUPPRESSED' ••••••••••••••• ••••••••••••• ENT 01 ••••• B1·········· • MOVE • • STRING NEXT TO • • SYM TBl. • • INITIATE fOR • STMT SCAN • • •••• •• •C2 ••••••• ••••••••••••••••• .•.x 141021 C1 •• 02 NEXT *. •• YES ••• X•• STMT FORMAT •••••• •. *. *. .* .* R~L X ••••••••••••••••• •• •••• • Gl • •••••• X .•.x .... ... .... 02 •• 10 •• IS THIS •• NO ..A SUBPKOGRAM •••••• *. •.• •* .• .* • YES • YES X • ADDR • • OF 1ST EXEC • • STMT IN COMMUN •• • AREA • 01 •• 03 .* NEXT *. •• NO •• •• STMT INITIAL •••••• •• 110 CALL •• * •• * 09 ••••• C2 •••••••••• •.INSERT .* • NO *. X 1011011 •• • * M1081 Cit E1··.·.·· •• • •••••• • .MOVE STATEMENT • • TO OUTPUT • • X... STRING • • • • ••••••••••••••••• X 11 ••••• E2 •••• • ••••• •• •• OUTPUT CALL • SUBIN W. ARG • TRACKSW -I IN • SUBR. • • • ••••••••••••••••• :X .......... : IH092 X 12 ••••• F2 •••••••••• • • • OUTPUT STRING •• • INSERT ALLOC • • • TRACKSW -2 IN • • SUBR. • •• •••• • G1 • ••••••••••••••••• ••••• • EXIT X 13 •• •• ··G2STORE •• ••• ••• •• .PROGRAM LENGTH •• •• COMMUNICATION IN •• AREA • • :141031 X 05 ····.G1·········. • MOVE STMT • • • TO OUTPUT • ••••• STRING • • INSERTING • • • ALLOCATION ••••••••••••••••• ••••••••••••••••• X •••• H2 ••••••••• • • • M1051 ••••••••••••••• • • • x··························• ••• •• 06 •••• •• NEXT STMT •• NO •• STATEMENT •••••• •• FUNCTION •• J1 EXIT TO THE ROL ROUTINE •••• •••• X • YES •• •••• • C2 • .....• 08 • OUTPUT • • CALL SUBIN W• • • ARG AND STMT • • BOOY TRKSW-O • ••••• J2 •••••••••• : ••••• 1~~~~ ••••• : X • X 01 ••••• Kl·· •••• • ••• • INSERT • • ALLOCATION INTO. • OUTPUT STRING • • • ••••••••••••••••••• Chart EA. FORTRAN - Phase 22 Flowcharts 229 ENT 01 ·.···B3 •••••••••• •• • INITIALIZE • • POINTERS FOR • • SCAN OF STRING. ••••••••••••••••••• •••• C3 •• X. •• •••• • j( .•. M1000 · .. .... .. .. .* C3 •• *. 02 .*** .... •• NEXT STMT •• YES. • •• HAVE STMT •••••• X. E3 • NUMBER.. •• *. • NO .. .•. .. .... ·•••• .. •••• .... .... j( 03 •• 03 •• IS NEXT •• NO • • •• STATEMENT •••••• X. H3 • •• FUNCTION •• •• *•• * • YES • E3 •• X. • • x .•. ALOC .* E3 •• *. .... .... 04 •• LISTING •• NO •• REQUESTED •••••• *. .* • YES .PRINT STATEMENT. NAME AND • ALLOCATION • ••••••••••••• · . • X••••••••••• TKOFF j( 06 ••• •• G3 •••••••••• • INSERT • • AlLOC IN SYM • • TBL. DELETE • :LABEL~T:~LOC OF: ••••••••••••••••• ·••••• .. ••••• • H3 •• X. • MOVE X 01 ••••• H3 •••••••••• • • • ••••••••••••••••• •• MOVE STMT • • UNALTERED TO • • OUTPUT STRING • .. .•. .. .... .. .. x J3 •• .... .... 08 •• •• NU • • •• LAST STMT WAS •••••• X. C3 • •• END.. •• • YES X 09 •••• 1<3 ••••••••• • • • Chart EB. 230 EXIT TO THE ROL ROUTINE ••••••••••••••• • • • FORTRAN - Phase 23 •• •••• • 112 • ••••• • ........... x:X • ·•.....Bl··········.• ENTER .l2012 01 ••••••••••••••••••• X .. •• X 12 ••••• C2 •••••••••• 03 .. •.• • • •• EXTENDED •• NO •• PRECISION ••••••• *. .* *.. • * YES X 11 ••• ·.C2 •••••••••• X •* 10 •• SCAN STATEMENT.• • FOR ONE WORD • • CALLS • •••••••••••••••••• • ••••••••••••• ••• *. • NO LIST fEAHRES SUPPCPTED 01 •• .* *. 02 · •••• ·Cl.·X•••• •• ••• 1<10~1 B2 •• •• YES •• END OF STRING •••••• • INITIALIZE THE. • PHASE • • ••• .. .... .. •* ' TAG • CALLED SUBR .• ·:SUB~~C~~N~NOUT : • TABLE • ••••••••••••••••• X 04 ..... El····.····· • AL TER • • SUBR ~AME TABLE. • TO REFLECT • • EXTENDED • • PRECISION • 13 ••••• E2 •••••••••• •• • •• • MOVE POINTER • ••••• TO NEXT • STATEMENT • • ••••••••••••••••••• ••••••••••••••••• :X .......... : x············ L2041 .* .. F2 ••• •• *. 14 .. •• LISTING •• NO •• REQUESTED •••••• *. .• *•• • * YES X 15 •••••• G2 ••••••••••• • • LIST SUBROUTINE • NAMES WHICH HAVE IlEEN • TAGGED ••••••••••••• :X .......... : X LI035 ••• H I . . 07 . * *. •• LISTING •• NO •• REQUESTED •••••• •. •. .. .. .* EXIT .* • YES X X 16 •••• H2 ••••••••• • • • EXIT TO THE ROL • • ROUTINE • ••••••••••••••• OB •••••• Jl •••• • •••••• • LIST SUBPROGR • NAMES THAT .ARE IN SYMBOL. TABLE ••••••••••••• :X .......... : l2011 X 09 Kl ••• • •••• •• •••••••INITIALIZE •• • STRING POINTER. •• • •••••••••••••••••• x •• •••• • B2 • ••••• • Chart EC • FORTRAN - Phase 24 Flowcharts 231 ENTER 01 ••••• P3 •••••••••• •• •• • • ••••••••••••••••••• INITIALIZE PHASE ANO PRINTER • • LItOll .. .. .... .. .. .... .... X C3 ••• •• 02 •• SYM TRL •• NO • • •• LISTING •••••• X. K3 • •• REQUESTED.· •• • YES .... ... .... x D~ •• 03 •• EXTENDED •• NO •• PRECISION •••••• •• .$ *. • .*YES X 04 ••••• E3 •••••••••• • MeDIFY FOR • EXT PREC. • INSERT • PARAMETERS FOR CONY. • • • • • • ••••••••••••••••• :X .......... : L402l X 05 ··.···P3·.··...•.•• • • LIST REAL CONSTANTS • • ••••••••••••• X 06 • •• ·.G3 ••• • ••• • •• • COMPUTE • • LOCATIONS AS • • ENCOUNTER EO. • • SYM TBL PASS • • SWzO • ••••••••••••••••• X 07 •• •••• H3· ••••• ••••• LIST • INTEGER • CONSTANTS • ••••••••••••• X 08 · .. ·.J3.·.·..··.·• • COMPUTE • LOCATIONS AS • ENCOUNTERED. • SYM TBL PASS SW=l • • • • • ••••••••••••••••• •••• ·•••••..• • K3 •• X. • COREQ X Oq EXIT 10 •••••• K3 ••••••••••• LIST •••• KIt ••••••••• • CORE • • EXIT TO THE • RO~~\NE : • REQUIREMENTS ••••••••• X: ••••••••••••• Chart ED. 232 FORTRAN - Phase 25 ••••••••••••••• START ••••• Al.·.· •• • ••• •• INITIALIZE •• . PHASE • • ••••••••••••••••••••• •••• ·· .... • Bl •• X. •••• X Bl ••• 01011 •• • •••• B2.......... • •••• •••• •• •• • NO 01022 .... x Cl ••• •• . 01031 .•.x FlOl5 • •••• B4 •••••••••• •• OUTPUT. • DEFINE FILE ••••••••• X. TABLE. • . • •••• C3.......... •• YES • •••••••• .* ..•••••.• * .• * MOVE TO NEXT STATEMENT • • • .. . .... C4 •• PLACE. •• END OF •• NO ALLOCATION ••••••••• X.. CONSTANTS •••••• INTO SYMBOL • •• •• TABLE· •••• x •• •••• • Bl • •••• '" •• • ••YES ••••••••••••••••• · X • ••• 04 ••••••••• •• •• REAL •• CONSTANT •. .. OUTPUT I N . • ABSOLUTE ••••••••• X. MODE • • • • ••••••••••••••••• .... .... 01 • •••• B3.......... •• SET U P . • DEFINE FILE ••••••••• X. PARAMETERS. • • •••• C2.......... •• INTEGER •• YES • •• CONSTANT •••••••••• X. •• •• X '" •••• • •• • ••NO FlOll • • • ••••••••••••••••••• ••••••••••••••••••• ••••••••••••••••• •••• •• X. 81 • ••••• • 01032 01033 ••• •• DEF INE •• YES • •• FILE •••••••••• X. •• STMT.. • • • • EXIT TO THE ROL ROUTINE ••••••••••••••• • • • • NO •• X. Bl • •••• Chart EE. FORTRAN - Phase 26 Flowcharts 233 ...·.• •·····.2.··.· • INITIALIZE • • PHASE • •• •• ••••••••••••••••• .. 82 .•.x •• .. .. .. •• EXTENDED •• NO •• PRECISION •••••• •. .* •. • .*YES X • •••• CZ·····.···. •• SUeR ALTER NAME TA8LE.• • TO REFLECT • • EXTENDED • PRECISION • • ••••••••••••••••• ..X •••••••••••. X •••• •• OZ •• • •••••••• OUTPUT STRING • DATA FOR • RElOCATA8LE • 08JECT • PROGRAM ••••••••••••• X • • • Chart EF. 234 •• •• fZ ••••••••• EXIT TO THE ROL ROUTINE ••••••••••••••• FORTRAN - Phase 27 • • • .. ENTl .RCMON .. ENT2 .....81.········· EG H4. -.-.-.-.-.-.• RESTORE • • • Tt'E SUPERVISOR .* •• • • ••••••••••••••••• ••• ENT"'! COMPILATION MESSAGE .•.... 85··· ...... .• •• *. 658 •• *•• • * YES • • • ••••••••••••••••••• PRINT WORKING STORAGf EXCEEDED MESSAGE • • ••••••••••••• :X .......... . ..... 03·····EG.•··· .RCMON H4. ..-.-.-.-.-.-.• RESTORE • • THE • • SUPERVISOR •••••••••••••••••• X X • PACK INPUT • :RE~2R~ONI~6RUP : • INPUT AREA • .....01.········· ••••••••••••••••••• • • • • • ••••••••••••••••• •••••• C3 •••• • •• • ••• • • SET UP • MONITOR CALL • ~ESSAGE •• X X • ••• Cl •••• •• •• •• ••• 0ISABLE ENC OF • • • • B3 • SECTOR AOOR*.••• NU ..GREATER Tt'AN •••••••• .. X ••• ·.C4 •••••••••• • • CONVERT • • •• X. SECTOR ADOR. • TO HEX • • • • •••• C5· ••••••• • • • •• ••••••••••••••••••• • • SET INDICATOR.• NON-lfRO • .~PROR ••••••••••••••••••• X •••••• 04 ••••••••••• • PKINT OISK ERRORS • • MESSAGE • ••••••••••••• SNRS" X ••••• El········ •• •• • SET • • NO-READ SWITCH • • • ••••••••••••••••••• SNXS :X .................................................. : X .•. X Fl·. •• SNXS EQUAL •• NO .• *. *. *. ZERO •••••• .• *. *•• .* • YES ••-$-.-*-$-.-.-•• RfSTORf '" • • • •• •••• • G2 • ••••• • $ X • ••••••••••••••••• :X .......... : • Y~S .. G5 •• .. .* .~ •• COMPILATION •• • ••••••••••••••••••••••••••••••••••••••••••••••••••••••• e.*. ••••••••••••• fRROPS *. .~ .* .* .* '" NO ........... X: X • •••• H2 •••• • ••••• •••••• Hl •••• ••• •••• • NON-OUP • • SWITCH • •••••••••••••••••• • •••• • Jl •• X. • • . •• • • • •••••••••••••••••••• • •• PCSITJON DISK ARM • • • AT MONITOR •••••••••••••••••••• • ·...... GMON X •• ••• JI··.·.· •• •• • RESTORE • • DISK • INTERRUPT • • • WORD • • ••••••••••••••••• .•.x ... x OR .MON nOR CALL • X SET • SUPERVlsn~ X • 1<1 THE •••••••••••••••••• ···· ..G2······.·· .. PRINT • END CF COMPo • •• ••• Gl.······ •• • • SET • NON-XEQ • • • SWITCH • TO '2 • • • ENT4 X ••••• F5.· •••• ~ ••• "'RC~ON EG H4 • •• X • •••• J2 •••••••••• • • *. •• .* .* • NO RCMON ••••• H4 •• • ••••••• •• COMPUTE •• • CI8 ADDRESS • • OF SUPERVISOR .. ••••••••••••••••••• X •••••• J4 ••••••••••• REAO IN .THE SUPERVISOR • USING • ROl ROUT INE • • • • ..··1(2·.···· .•• • EXIT TO THE • MONITOR • ••••••••••••••• X ••••• H5·· •••••••• .SET PARAMfTfRS-. ... nISI< BlnCK • :CP~~~~T~~ni=8~ : XEO ADDRFSS • •• •••••••••••••••• •••• •• x* Jl • ••••• • .. . ••••••••••••• X X •• •• ENe •• •• Of COMPo •• YES • •• MESSAGE •••••••• •• crSABLEO 0* RESTORE STATUS TO lEROS • ••• 1<4 ••••••••• • • • EXIT TO THE CALLING ROUTINE • • ••••••••••••••• '" X •••• •••••• •* G2 •• Chart EG. FORTRAN - Phase 28 Flowcharts 235 XQXl Al··.····.··• ••..•.. INITIALIZE • • • • AND COMPUTE OUMP • • ADDRESSES • ••••••••••••••••• ..... al··.·· ..·..• • X • • • SfT UP OUMP COUNTS A~D FORMATS • • • ••••••••••••••••••• X ... ··.Cl··.··.··.·. OUMP • STRING, CC~M • • ARFA, AND .SYMBOl TABLE • ••••••••••••• • • • Chart EH. 236 X ....01··.··· ... EXIT TO THF NEXT PHASf ••••••••••••••• FORTRAN - Dump Phase • • • •• •••• • A3 • ••••• • • FIO ·••••• A2.......... X •••• Al......... .SVE ADDR OF TBL. • ••• A3 ••••••••• • • • OF 110 CALLS • • RETURN • TO CALLER • • INITIALIZATION ••••••••• X.AND GET SIZE OF ••••••••• X. • • • INT VARS. S E T . . • ••••••••••••••• • UP RESTART. • •••••••••••••• ••••••••••••••••• • RED • • • ••• ••••• B2.......... • •••• B3.......... • •••• B4.......... 85 •• •••• Bl......... • • • GET UNIT NO I: • • TURN. •• IS •• • • SET • .FRMT ADDR WITH. .READ INDICATOR. •• RfAD •• NO EDITED READ ••••••••• X.READ INDICATOR ••••••••• X.UNIT NO. SET UP ••••••••• X. OFF. SET ••••••••• X.. SPFCIFIED •••••• • • • X . 1/0 CMND USNG • .VARIABLE COUNT. •• •• ••••••••••••••• • • .TBL - 110 CALLS. • TO ZERO. •••• ••• • YFS ••••••••••••••••• .WRT •• ·.Cl ••• •••••• •••••• C2 •• •••••••• • • • • SET • • • EDITED WRITE ••••••••• X.WRITE INDiCATOR ••••••• ••••••••••••••••• •• • •••••••••••••••••• *lOAF ....01......... .••••• 02 •• • ••••• ,•.• STORE • REAL • • COUNT OF THE • NON-SUBSC ARRAY ••••••••• X. NUMBER Of • • • VARIABLES IN ••••••••••••••• • THE ARRAY • • • ••••••••••••••••• ••••••••••••••••• ••••••••••••••••• ··.··C4· ••• • ••••• • ••• C3.··.····. • • • INTEGER. .STORE COUNT OF • .NON-SUBSC ARRAY ••••••••• X. NUMBER OF • • • • VARIABLES IN • ••••••••••••••• • THf ARRAY • ••••••••••••••••• • X ······C5 ••••••••••• • READ A RECORD • FROM THE • SPECIFIEO • DEVICE ••••••••••••• :X .......... : X .101 ! • ••••• 04.· •• • ••• • • • ••• 03 ••••• •••• N~~~8~~c • • S~~RI72f~~~~R : ! ........ X! ELEMENT. • VARIABLE • ••••••••••••••••••• ••••••••••••••• ·•••••.. • • E5 •• X. X *lOF X •••• X ••••• E2.......... • •••• E3.......... • •••• E4.......... • •••• E5 •••••••••• •••• El......... • • • • • • • • • RFAL • • SET INDICATOR • • SET • • STORE.. • NON-SUBSC ••••••••• X. FOR REAL ••••••••• X.VARIABLE COUNT ••••••••• X. ADDRESS OF ••••••••• X. TRANSMIT THE • • ELEMENT. • VARIABLE. • TO 1 • • VARIABLE. • RECORD • • ••••••••••••••• • • ••••••••••••••••••• ••••••••••••••••••• ••••••••••••••••••• ••••••••••••••••• X • IOFX ••••• F2.......... • •••• F3 •••••••••• •••• F 1 ••••••••• • • • COMPUT E • • REAL • • SET INDICATOR • .THE ADDRESS OF • ••••••••• X. THE VARIABLE • • suesc ELEMENT ••••••••• X. FOR A REAL • • VARIABLE • X . USING I.R.I • • • ••••••••••••••• • • ••••••••••••••••••• ••••••••••••••••• F4 .*. •• .• *. •• IS COUNT.. x .• YES.. F5 . * • •• *• IS •• • •••• OF VARIABLES •• X•••••••••• FORMAT I, E, •• • •• TO MOVE"O.. •• f, OR A •• . *••. .••* X *• . .* ••• ••••• • • ••••• • • NO • A3 • .10 IX ••••••••••••••• • • ••••••••••••••••• ••••••••••••••••• .•. ••••• • • Jl •••• •••••• X J1 .•. •• .. . J2 •• ••••••••••••• • ••••• J3 ••••• • ••••• •• IS •• •••• •• REDO •• YES •• IS COUNT •• NO .TRANSMIT RECORD. •• SPECIFIED •••••••••• X•• OF VARIABLES •••••••••• X TOIFROM •• •• ..TO MOVE SPECIFIED • •••• •• 0 •• DEVICE • NO • YES .. .. X ••••• • • E5 • ••••• • Chart FA. .. .. a.. X •• •••• • A3 • ••••• • ............. • X •• •••• • E5 • ••••• • ••••••••••••••••• X • •••• *•. * • •••• •• X. A3 • • • .*. •••• X :F 00 .COMP • ••••• H3 ••••••••••• H2 •• ••••Hl......... •• WAS •• WRITE THE • • •• LAST FUll •• NO • • COMPLETE OF ••••••••• X.eUFFER ALREADY •••••••••• X RECCRD ON THE • SPECIFIED • • WRITE. •• WRITTEN •• DEVICE ••••••••••••••• X ••••• G4.......... • ••••G5 •••••••••• : OECREMENT: ~~ !~~~I~~ED : • COUNT OF ••••••••• X. THE NEC • .CONV • BTWN DEC. • VARIABLES TO • • MOV E • • I: BIN • • •• •• G2 •••••••••• •• •••••• INTEGER. •• SET INDICATOR.• • • •••• Gl· • suesc ELEMENT ••••••••• X.FOR AN INTEGER ••••••• • • • VARIAHLE • X •• •••• • A3 • ••••• • • •••• H5 •••••••••• • HANDLE EACH • .FRMT TYPE USING. • AN UNPACKED • .BUFFER OF e BIT. • EBCDIC CHARS • ••••••••••••••••• X •• ••• J5· •••••• • •• •• • TURN REDO • .INDICATOR ON IF. • SLASH OR PEDO • ••••••••••••••••••• x •• •••• • Jl • ••••• • FORTRAN I/O Flowcharts 237 ••••• • AI, • ••••• • • x .•. .* . . AI, •••••••••• ..• •••• A5WAIT • • •• •• SUFFICIENT •• NO • •• WORKING •••••••••• X. •• STORAGE •• • • FOR E2.. • •• • ••YES ERReR q • • • ••••••••••••••••• ........... X: X :ABSOfl .·····B4·.•..•.··.. ••••• •••••• .. ·61· ANUH•• LO .... O •• • CF P-OCITSlIUP • LCADER • • :SCON X • ••• ·C4 •••••••••• X · ..··.C1· ..... ·.· .. eOCTSTR.aP •• LCAUII LCACS PHASE El :X .................................... . X ......01·.··.·· .... SHIIT ••••••••••••• .. ODE o. El X ••• •• • ••• ·04 •••••••••• • • • • • • • •••• E2 •••••••••• • 0 • •••• . ERRnR 3 . • ••••••••••••••••• E4·.· •••.. · •• ••.·..• FORM AUXT2 • • • • x . ,.,. •••• AI, • ••••• • .* *. • • . • .* ••• * • NO X ·.··.G2· ••••••••• •• •• •• kAIT • EIIROR 1 •••••••••••••••••••• TABLE FROM CFTA .. •.....o. •• •• .X o..*.. ERRORS .0 Fit .0 •• DETECTED X .··.··G4·......... . • READ E2 PHASE PART I INTC CORE ••••••••••••• X ••• • AZ. 238 System Loader/Editor - Phase El •• • •••• F5 •••••••••• .• WAIT ERROR 8 . • • ••••••••••••••••• LDPT2 • • YES • ..... 0 • • • • • • X. • NO ••••• • Fe • Chart FB. • • DATA • ••••••••••••••••• x *...* •. • . *NO • • • • • X :T8L2 • • ••• SETOl ••• FJ •• F2 •• •••• •• HAS •• •• INITIAL *. YES •• DPIR •• YES • •• LOAD ~EQUEST •••••••••• X•• BEfN E~ECUTED •••••••••••••••••••••••••••••••••• *. CONVERT REQ DATA TO BINARY. STORE AT CFTA ••••••••••••••••• NO. •• COt-TROl •••••••••• X. •• RECCRD •• • • YES X : CONVT • . *LClle-MODE*. .0 ..... •• •• • • ••••••••••••••••••• ••••••••••••• • •• CLEAR REQ RECORD INPUT AREA • • R!:AD FIIIST RECORO • • ••••••••••••• ••••••••••••• • LOAD PHASE E2 PAIIT I TO DISK • .•. ••••• • FC • • AZ· ••• t •• ", • • Fe • • A~. .•. .. SElia X LOPT2 LDMOD Ait •• ••••• AZ·········· •••••• A3 ••••• •••• •• .INITIALIZE IN. • TERR~PT BRANCH • • LOAD • •• INITIAL PHASE E2 •••••••• X.. LOAD • ADDRESSES AND ••••••••• X .OEFECTIVE TRACK. PART II •• • WORCS IN OISKO • .... • •• * ••••••••••••• ••••••••••••••••• .. START X • ••••• AS·.·····.··· •• YES • REAC A •••••••••• X RECORD INTO •• x Bt-HER A • NO SEH~R a (COMMA' FROM DISK ••••••••••••• • • ·.....Bl........... ......83........... • •••••••• x. • • Bit .. .... ••• ••••••••••••••••• •• • ••NO ••••••••••••••••• X •• X. Dl • REElO • •••• OZ.......... .• 03 ... • es •••••••••• SET SPvsw SWITCH ON. • • • • ••••••••••••••••• ........... x:x •••••• • WAIT • • ••• ERROR • 5 •••••••••••••••••••• ••••• • 01 • •• •••• • .•.x •• .. .• ...... ..**. ••••••••••••• •••• SAVE • • CCMPARE. •• SAME KIND •• YES • FLET OR CI8 ••••••••• X. SAP A~O FORT ••••••••• x.. OF RELOAD •••••••••• x. ADDRESSES. • RECORDS TO • ..REQUESTED.. • IN CIBA. • ~COE RECORD • •••• • ••••• CIt •••••••••• 01 •••• .•....•• .. AI) • ••••••.•.•••.•••..••••...•.•......•.••.•...••.••....••..•....•..•.....•..•••... ; ......81........... • . A5 • •• •••• • .. . •• •••• PAK •••• YES :-.-.-I!~~~-.-.-: ·~SS CECK·· •• NO •• INDICATOR •••••••••• X. PACK 80 WORDS ••••••••• X•• BVPS SWITCH •••••••••• •• eN.. • INTC BUFFER B. X •• ON.. •••• • (60 WORDS t • •••• •• •• ••••••••••••••••• • •• t • NO • YES ••••••••••••••••••••••••••••••••••••••• • -FE. H2 • Dit •• •••• SPVSW •••• VES : SWITCH ON •••••••• •• •• X.. •••• •••• • NO •• •• X.•••• • • • ..X.••••• El • • •••• • •• • • .••. .••. .• E5 •• *• •• X:BI+~AgFLS~:083 : •••••••• x.::RE1~C~~~oRO·:.~~ •••••• X.:· ~~~~R8 ·:.~~ •••••• X.:· ~~~~R~ ·:.~~ •••••• x.:· ~1~~R~ .:.~~ •• • IN BUFFER 8 • •• •• •• •• •• •• •• • • *... t . . . •• ...* ..._ • ••••••••••••••••• •• • ••YES •• • ••YES •• • ••YES •••• •••• • YES • El •• ; x x x •• •••• • •••• •••• •••• •••••• ••FD • ••FE • .FD • • t A5 • • F2. • A2. • Dl· • • •"• ••• CARC ••••• El.......... EZ ••• •••• .*.. •• E3 ••• •• Eit ••• •• - ... t .. • x····················································· ............•.................................................. .... •• .-. .'. .-. .-. ., . . .GZ- .••. .G3* .••. .Git* .••. .*(;5 •• •. •:.•. ~l~~R~ .*·:.~~ ••..•. X.:·*. ~l~5RA2 .'·:.~~ .••••• X.:·•. 1~~~RA3 .*·:.~~ •••••• x.:·*. ~l~~R~O .•·:.~~ •••••• x.:·*. ~l~~M~2 ..:.~~ .. •. GI '. e' *. • ••YES x ••••• tFD • • K2. ••• •..• • •. * • YES •..• •..• * •• * • YES e•• ' • YES x ••••• • FD • x •.FO•••• • x ••••• • FE • ••• • JZ. ••• • HZ. ••• • Jl· ••••• • Jl • •• •••• • x • t. Jl ..••. ...* •• • ••YES Chart FC. • yeS x ••••• • Jl • •• •••• • X ••••• H5 •••••••••• •• •• CLEAR • SPVSW SwITCH • • • ••••••••••••••••••• x .'. .J2* .••. •• ••••J3 •••••••••••• •• TVPE 86 •• NO •• TYPE 81 •• N O . •• RECORD •••••••••• X.. RECORD •••••••••• X. •• •• •• •• • x ••••• • FE • • KZ· ••• t' . .. •• ' ...t •• • ••YES ii ••••• • FE • ••• • AZ· • ERROR 2 • ••••• • A5 • •• •••• • •• ••••••••••••••••• x •• •••• • A5 t ••••• • System Loader/Editor - Phase E2 Flowcharts 239 ••••• • FD • ••• • A2. ABSSC • • • •••• A2.......... • •••• A3.......... A4 •• • • FILEX.. • •••• • .-.-.-.-.-.-.-.-. • SET S~B OFF. • •• wORD I •• YES ••••••• X. FILE PREVICUS ••••••••• X. FETCH wORD 1 ••••••••• x•• EQUAL ZERO •••••• • SEC T O R . • OF SECTOR. •• •• • TO OISK. • BREAK RECORD • •••• x •..•••••.•••••••••••••.••••••••••••••.••.•••.•••.•• .•. •• Bl • • ",ORD I ",ATCI- •• • •• •• • VI'S B3 :···x···· X•••• x: •.•• . * . . *. •• •• B4 . .X .. * . .•• NO . • •••• e2.......... • •• NO • SET SwB ON. ··=~l=C'C~~TI~~ •••••••••• •• •• • ••NO ••••••••••••••••• ••••••••••••••••• • ••••••••••••••••• SwA ON :t..* •• . . . .•• .* ••••••••• ~x •••. •• •• • YES YES ••••••••••• SWB ON ••.• .FC • • A5. ••• x ••••• • FC • • A5. ••• X • •••• C4 •••••••••• • •• SET seTRI • • ON FOR ••••••••• • SECTOR BREAK. X RECORD • • •••• • ••••••••••••••••• .FC • • A5. ••••• ••• ·Fe • •• •••• • 04 •••• • Cl· X ••• •••••• X ••• SET"' ••• • ••••• 05 ••••••••••• •• 04 •• •• •• • eKSR. •••• •••• WR ITE SECTOR Hi DISK. •• S"'A OR SloB •• NC .-.-.-.-.-.-.-.-. •• seTRI •• NO •• BUFFI •• NO • "EAn NEXT •• ON •••••••••• X. (~ECK-SU~ ••••••••• X•• I~DICATOR ON •••••••••• X.. OVERFLOW •••••••••• X .SECTOR. BEGIN. •• •• • T~f pt:eORO. •• •• •• •• LCADI~G DATA *. .• • • *..* • YES • YES • YES • .Fe. •• • •• X. A5 • ..X. El • X .FC • • A5 • X F2 •• • •••• ····.E4· ••••••• • CLfAR. •••• • ASMCK • • S(lRl.. •• SAPX •• YES .-.-.-.-.-.-.-.-. • PLACE • •• X. SET UP 5ECTOR ••••••••• X•• INDIeATcR ~N •••••••••• X.SHIFT AS~ LOAD. • RECORU DATA • •• •• • ACOR. IF NO • • AOCRESS~S IN • • IN BUFFI • eUFF 1 . •••• • FCRTRAN • • • •••• • NO 01 ••• x • •••• •• •• • NO •• • •••• 02.......... .. ..•••• •••• .....El.......... ................. ... ••••••••••••••••• •• •• • • . ..•• fl •• •••• 03 .. .. ••• E3....•..•.• •• FORTX •• YFS • CLEAR FORTX. •• INDICATOR ON •••••••••• X. SAVE rORT •• •• • LC~O ADOR. •• •• • I f\ eOH'A · • ••• •••••• F4 • ••••••• • • • • • • . (LEA" SAPX. • SAVE ASM ••••••••• LeAl: ADOR. • X IN eC~"A. .... X..•••• ••••••••••••••••• .....C3.......... • • • • • .... •••• • NO G4 ..... X • .* *. . WAIT • NO.. SECTOR •• YES. .X ••••••••• ADCRESSES ~ATCH ••••• ERROR 1 0 . •• COMMA •• ................. • * INITIAL •• VES. • LOAD •••••• X. D4 • •• X. • •••• • ••• j( [,4 ••• •• X. A5 • ••••• • ••••• • • ••••• ••••••••••••••••••• •••• • ·Fe * x . .... F3.......... ••••••••••••••••• •• • ••Ne ••••••••••••• 0.• • ••••••••••••••••• • •••• Fl •••••••••• Fl.. .... • ••••• • x········· ................ . ... .... . . • *... • ....• *..* ••••• ·FO • • H2. • • FORT * ••• .* H2.. • •••• H~ •••••••••• *. .... • . • •• FCltTRAN •• YES • ••••••• X•• TO ~E LOADED •••••••••• X. •• •• • ..• .• •• •• • NO . . •••• · • . ..... •.• . . ..... . • ••••••••• • ••••••••••••••••• •••• •• X. H5 • ••••• • FO • SET FORTX I~CILATOR ON .... .... ..•••••.• x .FC • • AS. • J2. SAP ••• • • J2.. • •••• J3 •••••••••• • •• ASSF~BLER •• YES • SfT S~PX • ••••••• X•• TO EE LOADED •••••••••• X. I~CICATCR ON ••••••••• •• •• • • x •• •• ••••••••••••••••• .FC • • Ne • AS. ••••• *FO • • Kl· ••• • •••• EOP •••••• Kl.· •••• ••••• ••••••• x • ~RIT[ C~TO BUFfl DISK ••••••••••••• Chart FD. 240 •• •• X. H5 • System Loader/Editor - Phase E2 ••••••• x ••••• .FC • • A5· ••• •••• • •••• ~5 ••••• • •••• * • • • • H5 ••••• X. •••••• •• SET SWA ON • • • • •••••••••••••••••• X •.Fe ••••• • A'5· ••• ••••• ••• • FE • • A2. x ENDSY ••• CL EDT A2 •• • •••• A3 •••••••• ~. • •• • •• A~ •• • ••• • •• •• • ••• A5· •••••••• .• *. • • •• It-HIAL •• NO • CLEAR. • PRINT •• LOAD •••••••••• X. LeADER/EDITOR ••••••••• X END OF RelOAD •••••••• X. HALT • •• •• • FROM DISK • ...* • ••••••••••••••••• •• • ••YES LDSKL X •••••• e7. ••••••••••• LOAD SKelETON • SUPERVISOR I,..TC CORE •• • ••••••••••••••••• • • ••••••••••••• • • ••••••••••••• MILS INLET . .... 83.......... . .... • •• • •••••••• X: • • • •••• 85 •••••••••• 8~.......... •• i~~WORDS :~~N~~~~% : •••••••• X: l~{T~:~I~~ : •••••••• X: lN8·~I~SAKI~~ARlfEAA IN. • AND F I L E . . COMMA. • ••••••••••••••••• ON DISK. • ADDRESSES • : • • ••••••••••••••••• ••••••••••••••••• X "'FILS ••• 8LDS PRH •••••• Cl........... • •••• C2.......... C3 •• • •••• C~.......... • •••• C5 •••••••••• ~RITE COliMA • • SEARCH AUXT2. • .SINGLE DEVICE. NO • ESTA8LISH. • SET UP LEVEL • TO SECTOR 8 •••••••• X. 8UILD AN ILS ••••••••• X•• ILS'S DONE •••••••••• X. AREA CODE ••••••••• X. AND E8CDIC • • • • •• •• X . ANa LOADER. • NAME • • • •••• • DATA • • • • YES • ••••••••••••• .. .. .. .. ; PAU3 01 •• *. •. ••••• 8 ••• • • •••• •• •• ••••••••••••••••• ~EQUIRF.C ••••••••••••••••• ••••••••••••••••• •••••••••••••••••••••••••••••••••••••••••••••• X •• ILSC4 •• YES .* • ••••• 05 •••• •••• ••• • LOAD ILS TO • WORKING STORAGE UPDATE SKELETON SUPERVISOR • •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• ••••••••••••• ••• * • NO x x •.FC ••••• • AS. ••• ••••• • FC • • A5· ••• • •• ••••• • FE • • F2. TYPE8 ••• EDITC ••• • •• • • F2 •• F3 •• Fit •• • •••• Pi •••••••••• •• .• • . •• YES .* *. .• *. •• SET RE-ENTRY •• •• .EOIT •• SKELETON •• NO •• SAME ILS IN •• YES ••••••• X•••• ~ECORO •••••••••••• X••• ~U~1~~~~OR •••••••••••• X.W~~Kl~g il~R!~E······i··X: AOV~ ~re~LOUP : ••• : •• •• •••• .RECORO.·. • • • • NO • YES • NO • .FC. • .FC • AS • A5 • •• •• .....•••...•..••..•.•.•.... x .....Gl.......... G2 •. ••••••••••••••••• •• •• •.... ••• •• •• •••• .. X. •• •• •••• ..X. .••••. ••••••••••••••••• .. ••• •••• SEFIL • G3.......... Git •• • ••••GS •••••••••• • •••• • REST. •• *. • CLEAR FILS • C(MPARE ILS • •• SAME •• YES .-.-.-.-.-.-.-.-. •• SKELETON •• NO • INDICATOR • :Nt~EO~I}~ ~~~D : •••••••• X•••• NAME •••••••••••• X: UP~~~~ ~~~12 : •••••••• X••• ~Ut~~~l~OR •••••••••••• X:I.E·ci~r~~VISOR: • RECORe· •••• • • •••• • • • YES • NO • .FC. • •• •• X. A5 • • Hit •• X. • FE • MCAll CLDUP • H2. SPPAS ••• X • • •• • •• ·HS ••••••••• •••• HIt ••••••••• * •• H2 •• • •• TYPE 13 •• NO • EXIT TO • • • EXIT TO • • SKELETON .X ••• ••••••• X.. RECORD •••••••••• DUP • • •• •• x • SUPERVISOR • •• •• .FC • • A5. • YES • • ••••• •••• • • •••• .... ••••• ·. :F~2: • • ..... X .....J2.......... 10CSD ••••••••••••••••• ••••••••••••••••• .....J3.......... J~ • SEARCH CFTA • TA8LE FOR ••••••••• MATCHING. ISS N O . . ••••••••••••••••• ••• .. •••• •• MATCHING •• NO ISS NO. • ••••••••• •• •• •••• • YES X.. •• •• ........... X:x ••••• • FE • • K2. IOCSL • • CLEDT ••••••• X. CLEAR • L(ACfR/EOITOR • FROM DISK · ••••••••••••••••• ••••••••••••••• ••• • CLEAR A Y P S . . • S~ITCH.. • ••••••• x. FETC~ ISS NO •••••••••• X. • FROII TYPE 13 • • RECORD. • • ·. •• •• •••• •••••• ••••••••••••••••• . .... ·K2.· ..·...·.• .-.-.-.-.-.-.-.- • •• •••• • H~ • •••••• .....JS .........• • X.•• SET BYPS SWITCH ON • • • • • •• •••••••••••••••• x ••••• .FC • • AS. ••• • •••••••••••••••••• Chart FE. System Loader/Editor - Phase E2 Flowcharts 241 ••••• • FF • • A4 • ••• •• •••• • AZ •••• ••••• • X .... .... ••••• A2 •••• •••••• • TURN • • • PAPER TAPE • SWITCHES ON • • • .•. .... .... •• •• • NO ........... X: •••• ·81 •••••• • ••• •• •• INSE~T ILS ADD~ESSES • • • • IN lTV • • ••••••••••••••••• X ••• ••• CI··· •• •••••• • P~ INT • fADING • 10 .. .............. X • ••••• 82 ••••• • ••••• fl4 •••• .... •• ••••••••••••• *. -.• * .• ii • X •• •• *. ••••••••••••• •• •* *. •• CARD THE e. YES •• "'. PRINCIPAL *. 110 .• •• • •••••••• •• •• HEAOtR *..* •• • . *NO •* *. * •• • * NO • • •• •• . ii ...••••• HI.·· •• • •••• ... MODIFY • INPUT AREA • • ... FOR HEADER • ... NO •••••••••• X • • • ... ii •••••KI •••••••••• CtlANGE INPUT COUNT FIELD FOR DATA •• • • .. . •••••••••••••••••• •••• •• X. AZ • ••••• • *. X *. •• YES • •••••• X. .* ••. ....F3··.··.···. •• SET • • • FORTRAN VOIDED SWITCH • • • ••••••••••••••••• .* .•.ii .It x . ·0 .*.. •• •••• ..... • •••••• X .•. : .CONTROl RECORD • •• • •••••• : • • • ••••••••••••••••• x •• •••• • G5 • ••••• • Maintenance Program EXIT • ••••••••••••••••• x ••••• • • A4 • • RELATIVE WORD. .NO. TO BINhPYo • STORE AT • • • RWONO • X • •••• F" •••••••••• • • • • • • • • . .x ••••••••••• CONVERT SECTOR NO. TO BINARY. STORI: AT SfCTR • • • • • ••••••••••••••••• •••• • • 0 • G4 •• X. • G5 •• X. G4 •• •• . * FIRST * ••• NO •• HEADER SwITCH •••••• •• ON •• • •••• G5.· ••••••• • • CONVERT • ~OO LEVEL • • • TO BINARY. • • STORE AT • • C~OOl • *. .* ••••• • .* •• • • X • •••• J4 •••••••••• • CONVERT • RFCORD COUNT • TO RINARY. • STORE AT • RECNT X ••••••••••••••••• ••••••••••••••••••• • ···.·E5·.· ......·• • CONVfRT ••••••••••••••••• ••••••••••••••••• TURN • FIRST HEADER • SWITCH OFF • ii ~PDATE S~ITCHfS NO •••••• • •••• H4 ••• • •• • ••• ·:.~~ •••••• X: FO~ElR~~~R •••••• KZ·· •• •••• ••• SU'~~~TY~E ASSEMBLER VOlDED SWITCH •• • •••• J3 •••••••••• •• • ••YES : • X X •• HEI~~R ••••• • • [5 •••• •••••• • YES • NO • :. •• .* • ••• 05·· •• • •••• ~XIT TO THE • SUPERVISOR • • ••••••••••••••• • X *. .. •.• *.. J2 VOIDED *..* *•• * * • • • X • • •••• •••• ••• •••• F4 •• •• SET • • • SUPERVISOR Nr.N-RFAQ SWITCH ••••••••••••••••• • YES .•. *•. * X.. *. • YES • * SUP *. +. YES • HEADER •••••••• *. .* •• •• ••••••••••••••••• 242 VOIDED •• ...* *•• * •• *. t . YfS • OUP HEADER •••••• X. H2 X • SET NO-CHECK • PARAMETER ... FOR DATA G2 • • • 'If* • •• Eit .* *. •• ASSFM~LER •• • NO • • ••••••••••••••••• •.•.··JI···.•··..•• •* *. • • ••••••••••••••••• System •• AS'"' HEADER X.. *. *••• .* X Chart FF. .. .ii YES •••••••••• X.. • NO •· ....G1····.·····•• • • • FZ .* .E3• •••. •• FORTRAN •• ii • INSERT PAPTI • AODRESS IN • PSEUDO-TV •• .*. .*. •• .*FOR . . •• •• 1'2 X •••••••••••••••• • X ii •••••• El ••••• • ••••• PRINT • VERS ION AND • MOO LEVEL • .•.x • • • • • • • ••····.(5······.·.· •• SET 04 •• ••••• •• • •••• ~XIT TO THE • • • SUPERVISOR ••••••••••••••••• :X .......... : ••••••••••••• Fl •• CONVfRT PTlC/8 TO • • CARC CUDE IN • INPUT AREA READ AND VERSION • '"'DO I.EVEL • FROM DCCM . .... P5········.·• • CONVf~T • INPUT RECORD • INTO EBcorc • IN SUPFPVISOR • INPUT ARFA X ••••• OZ •••••••••• • • • x ••••••••••••••••• ••••• • FH • • 01 • ••• •• ••••••• • ••• •••• C4WAIT • •• ERROR 1 ••• ••••••••••••••••••• • YES ......01····.···•.· .* *.. * .•.x .* .... WAIT ERROR 3 X •• • 1 •••• • FF. • • C4 •• X. •••••• X C2 •• .. * *. ..PAPER TAPf •• NO •• SWITCH 1 •••••• *. .•.x •• EXIT •• • • 0 •• AODR. TABLE.. 2 • G4 .X •••••• XR2 EQUALS •••••• • READ RECORD. WAIT FOR • OP COMPLETE • *. • •••• A" •••••••••• •• •• •• MONITOR •• YES • • A4 ••••• X.. CO~TROL •••••••••• X. •• •• RECORD •• • ••••••••••••••••••• 1810100 . . .•••••••••••••••••. X lilt • • '" • • X •.•.•CONVERT H"···· •••.. •· • • • • • .. .0 .. . ••••••••••••••••• •••• •• X. E5 • ••••• • x J" 0*' •• .. ..SUBROUTINE •• YFS SWITCH 1 •••••• •• ON *.. *••• .* •• x ••••• .FC • • A4* ••• • NO :X .......... : X • • • • ••••••••••••••••• ••••••••••••••••• ••• ••K4 •••••••••• • CUNVERT • • • WDRO COUNT • • TO 8INARY. • STORE AT • • WCNT • VF.RSION TO 8IN~RY. SToRE AT CVERe; X ..•••• ••••..• KS.··.· TURN ON • • • WRITE DISK SWITCH • • • • ••••••••••••••••• •.FG. ••• • ..X. Al • ••••• • ...... ••••• ••• • FG • .FG • • A4. • A1· ••• x ••••••••••••• X:X .*. . *. AI.. AZ •• • •••• A3 •••••••••• • * FOR *. •• YES .* *. • •• •• •• FORTRAN •• YES • TURN OFF • •• HEAOER •••••••••• X•• VOID~O SWITCH •••••••••• X. WRITE DISK ••••• ON •• X. SW ITCH • •. * . . * .* •• * . . * ..•••••.• •••• .•••••••••••••••••. •• • ••NO 81 .•.x •• X. A4 • •• ASM HEADER *. *• •• YES •••••••••• X. TURN AS~ SWITCH ON • • NO •• •• *. DUP HEADER *. CZ •• *•• * .* •• YES •••••• .• • NO .. •• . * •• 01 .•.x •• SUP HEADER *. * .. * .. *. •• •••• • A4 • ••••• • •••• • FG. • FXIT TO THE SUPEPVISOR • •••••••••••••••••• •• .x •• NEW MOO • •••• C5 •••••••••• *. • WAIT ERROR 5 •• ................. 1.. • *..* ••••••••••••• • • • • • *.·...· X ES ••TO THE • • ••• EXIT • ~UPERVIsnR • • •••••••••••••••• • X .•· .• · •• ••.···.F4··· WA IT • .• ..•.•.••.....•• X................. .... .... • ••••••••••••••••••••• *•• * • YES X X ••••• HZ ••••••• • •• Hl •••• • •• • •• •••••• • INSFRT NEW MOO • • •• ••••••••••••••••• •••••••••••••••••••• LEVEL AND VERSION IN DC OM • • • • • X TURN ASSEMBLER SwiTCH OFF •• • X ·.·.·.Jl·.···.···.. • • • • GZ •• .* *• •• ASSEMBLER •• NO •• SWITCH ON •••••• ••••••••••••• • • • .. .. .. 04 • • • .. READ It; OCOM. WA IT FOR • OP COI'IPLETE • .* • ••••• E4·· ••••••••• PRINT MOO LEVEL EQUAL 1 • • .x •••••• Gl ••••••••••• • DECREMENT RECNT BY 1 •••••••••••••••••* • Gl •• X. ••••• • X NEW *.. * X * •• • ••YES .* • YES • *..* X • ••• 1\5 ••••••••• -. •• •• NO • •• LEVEL EQUAL •••••••••• X. •• • •••• FZ •••••••••• *. .* •• •• SUBROUTINE •• NO • •• SWITCH 3 •••••••••• X. •• ON.. • • ••••••••••••••••• • NO .•.x······································ *. *. x ••• Fl •• .- • C4. .* .... • • * x x x •• • C4 •• .* *• • YES .OLO MOO LEVEL • .X •••••••••••••••••• PLUS 1 EQUAL •• •• •••• • A4 • ••••• • ••••• • FF • • WA IT ERROR 4 ... •••••• • NO • • NO .•.x •• .... *.. • NO *. •• YES .* •• • •• VOIOEO SWiTCH •••••••• •• ON •• x • •••• A5 •••••••••• *. LEVEL EQUAL. NEW •• • •••••••••••••••••• 1'100 •* *. •• ASSEMBLER •• YFS •• •••• • A4 • ••••• • .. .x YES.. • * OLD • •• •• • ••YES 84 • • .•. *..* ••••• • A4 • •• •••• • • x C1 A4 •• OLI) •• NO • •• X•• VERSION EQUAL •••••••••• X. •• NFW.. • • •••• BZ •••••••••• *..* .. .•. .. • ••••••••••••••••• •• • ••NO .. •• •• .... •• •• .• • .* ••••• JZ •••••••••• •• WRITE OCCM • TO DISK. WAIT • FOR OP • COMPLETE • • • ADO SECTOR AODRESS OF ASSEMBLER TO SECTR •• • • • ••••••••••••••••• ••••••••••••• :x .......... : Kl .t •• X •* - ••• •• SUBROUTINE •• •• SWITCH 2 ON.. •••• •• '. YES •••••• X ••••••••••••• .8:. • u.u • NO ••••• • FH • X • uu. .FH • • ••••• KZ ••••••••••• • READ DISK. • WAIT FOR • OP COMPLETE • • A4. Chart FG. ••• System Maintenance Program X .FH • • AI. ••• Flowcharts 243 ••••• ••• ••••• ••• • FH • • A~. .FH • • AI. X •••••• A4 ••••••••••• • PRINT UPDATE COMPl EYED • • • ••••••••••••• X • •• X ••••• • B~ •••••• B~ •••• • ••• •• • • PRINT • VERSION AND • NEW MOO lEVEL. EXIT TO THE SUPERVISOR • .. ... -. .. .. x X ••••••••••••••••• 82 ••••• Cl.·····.··· •:SE~O~R~R~~~~l • 2: •••• • CONTROL RECORD • • RETURN • x ••••••••••••••••• ••••• • FF • •••• •• •••• • E~ • ••••• • :.. .... • • • • ••••••••••••••••••• X , ••••• C2· ••••• ••••• WnlTE DISK. • WAIT FOR • OP COMPLETE • ••••••••••••• •••• FIt· •••••• •• EXIT TO THE SUPERVISOR .• 02 ·• x•••••••••••. .•.x •• *. •• RECORD •• YES •• COUNT lERO •••••••••• •• •••• •• •• •• • NO .. .. •••• x El •• •• CHECK-SUM •• NO •• CORRECT •••••• •• .. *•• .. .* x * •• •••• • E~ • • YES •••••• X X • • ··••••.. .. .•. .* • YES • El •• X. ..... ..······• • WAIT ERROR 2 • • • ••••••••••••••••• X E~·· • • INPUT - eo COLUMNS TO 60 WORDS • • • •• •• DISK SWITCH •••••• •• ON •• • FIi • • A4. • 01 •••• ••• ••••• • X 01.·····.···• ••.....PACK CARD • .•.x •• WRITE *. •• NO •• ••••• • El • •• •••• • • NO • • ••••••••••••••••• x *. .• x ••••CI•• • •• • •• •• .ZERO CHECK SUM. • COUNT. • .INCREMENT 8Y 1 • FOR NEXT • • • HEADER • • READ INPUT DATA. WAIT FOR OP COMPLETE Bl •• ..PAPER TAPE •• YES •• SWITCH] •••••• •• ON •• ••••••••••••• • • . .... A2··.··.···· ... · .."1.··.······· ••••••••••••• •• •••• • Al • •••• • FH. • • •••••••• X. X •· •••• A2 ••.... ••••• X • • ••••••••••••••••• ••••• Fl·········· • DECREMENT • • • RECNT BY 1 • • X ..·..·E2··.··.····· RUO HEADER • RECORD. WAIT • FOR OP • COMPLETE ••••••••••••• .- f2 .•.x •• -. •.. *•. *.. ..PAPER TAPE •• NO •• SWITCH 2 •••••• •• ON •• •• • •••••••••••••••••• • YES X ••••• Cl.··.··.·.· INPUT DATA. • TO OISK 110 • • AREA • ••MOVE • ••••••••••••••••••• ·• x•••••••••••. X X ..... • H2··········• Hl •••• • •• • •• ••••••• ADO CATA WORD • • • COUNT TO • • RELATIVE WORD. • NO. • :SElc~R.~R~~~:l 0: .CONTROL RECORD • RETURN • • X x ••••• • FF • • A4. ••• ••••••••••••••••• ••••••••••••••••• JI.· •• • •• ••• •••••• • SUETRACT tATA • • • • WORD COUNT FROM WCNT • • ••••••••••••••••••• .. .. .•.x Kl •• •• WCNT •• YES •• EQUAL ZERO •••••• *. Chart FH. System Maintenance Program -. *. .* .* • NO x •• •••• • Al • ••••• • 244 .• x •••• ·•• A2 •.• •••• X •.Fe ••••• • Gl. ••• APPENDIX A. EXAMPLES OF FORTRAN OBJECT CODING This appendix shows by example the Assembler Language equivalent for the object coding generated Source Coding by the FORTRAN Compiler. A typical crosssection of FORTRAN statements is shown. Object Coding With Trace* Arithmetic Statements - real, integer, and mixed modes I=J A=B A=I I=A I=K-M A=I-B A=B-I LD STO L L LIBF DC LIBF DC LD LIBF LIBF DC J I FLD B FSTO A L I FLOAT FSTO A LIBF DC LIBF STO L FLD A IFIX I LD S STO L L L K M I LD LIBF LIBF DC LIBF DC L I FLOAT FSUB B FSTO A LD LIBF LIBF DC LIBF DC L I FLOAT FSBR B FSTO A LIBF DC FIAR I LIBF FARI LIBF FARI LIBF DC FIAR I LIBF DC FIAR I LIBF FARI LIBF FARI *Period indicates that the generated coding is the same as in the Object Coding column. Appendix A. Examples of FORTRAN Object Cocling 245 Source Coding Object Coding A=B+I-J (or A=I+B-J) LD LIBF LIBF DC LIBF DC LD LIBF LIBF DC LIBF DC L LD M SLT STO L L I=J*K A=B*C A=B*I I=J I K A=B / C I=J 246 I (K+M) L L LIBF DC LIBF DC LIBF DC I FLOAT FADD B FSTO GT1 J FLOAT FSBR GT1 FSTO A J K 16 I FLD B FMPY C FSTO A LD LIBF LIBF DC LIBF DC L LD SRT D S1'O L L L LIBF DC LIBF DC LIBF DC LD A STO LD SRT D 8TO With Trace I FLOAT FMPY B FSTO A J 16 K I FLD B FDIV C FSTO A L L 3 L 3 L K M +126 J 16 +126 I LIBF FARI LIBF DC FIAR I LIBF FARI LIBF FARI LIBF DC FIAR I LIBF FARI LIBF DC FIAR I Source Coding Object Coding I=A / J LD LIBF LIBF DC LIBF STO L LD LIBF DC STO L I=J**K A=B**I A=B**C A=I**B A=B**(I+J) A=B**(C+D) L L With Trace J FLOAT FDVR A IFIX I J FIXI K I LIBF DC LIBF DC LIBF DC FLD B FAXI I FSTO A LIBF DC CALL DC LIBF DC FLD B FAXB C FSTO A LD LIBF CALL DC LIBF DC L LD A STO LIBF DC LIBF DC LIBF DC L L L LIBF DC LIBF DC LIBF DC LIBF DC I FLOAT FAXB B FSTO A I J GTl FLD B FAX! GTl FSTO A LIBF DC FIAR I LIBF DC FIAR I LIBF FARI LIBF FARI LIBF FARI LIBF FAR! FLD C FADD D FSTO GTl FLD B Appendix A. Examples of FORTRAN Object Coding 247 Source Coding Object Coding With Trace CALL DC LIBF DC FAXB GT1 FSTO A LIBF DC DC DC DC LIBF DC DC DC DC DC DC LIBF DC LIBF DC LDX LIBF DC SUBSC SGT1 value D4 I value D1 SUBSC SGT2 value D4 J value D2 I value D1 FLDX B FADDX C SGT1 FSTOX A LIBF FARI LIBF FARIX LIBF FARI Subscripted Expressions A(I)=B(I, J)+C(I, J) (see Note 1) (see Note 1) M=L(I~J, K) (see Note 1) M(I)=M(I+1)+M(J) (see Note 1) (see Note 1) 248 11 LIBF DC DC DC DC DC DC DC DC LIBF DC LIBF DC SUBSC SGT1 value D4 K value D3 J value D2 I value D1 FLDX L 'FSTO M LIBF DC DC DC DC LIBF DC DC DC DC LIBF DC SUBSC SGT1 value D4 I value D1 SUBSC SGT2 value D4 I value Dl SUBSC SGT3 Source Coding (see Note 1) M(1)=M(2)+M(3) M(l)=N(l)+M(l) Object Coding With Trace DC DC DC LDX LD LDX A LDX STO 11 Ll 11 Ll 11 Ll LDX LD LDX A LDX STO L1 L1 L1 L1 L1 L1 value D4 M value D4 M value D4 M LDX LD A STO L1 L1 L1 L1 value D4 N M M value D4 J value D1 SGT3 M SGT2 M SGTI M LIBF DC FIARX M LIBF DC FIARX M LIBF DC FIARX M LIBF FARI LIBF FARI Statement Function Statements A=JOE(B+C, D) + E A=C(B,.5)+E CALLXY LIBF DC LIBF DC LIBF DC CALL DC DC LIBF LIBF DC LIBF DC FLD B FADD C FSTO GT1 JOE GT1 D FLOAT FADD E FSTO A CALL DC DC LIBF DC LIBF DC C B address of constant.5 FADD E FSTO A CALL XY Appendix A. Examples of FORTRAN Object Coding 249 Object Coding Source Coding With Trace --- ------ -----CALL YZ (A(2) , A(I) , B, C*D) LIBF DC DC DC DC LIBF DC LIBF DC LIBF DC LDX (see Note 1) (see Note 2) (see Note 2) ADR1 ADR2 CALL YZ (A(I),B,C*D) MDX NOP STX LDX MDX NOP STX CALL DC DC DC DC L1 SUBSC SGT1 value D4 I value D1 FLD C FMPY D FSTO GT1 value D4 (for A(2» A L1 11 L1 ADR1 SGT1 A L1 ADR2 YZ 0 0 B GT1 L1 LIBF DC DC DC DC LIBF DC LIBF DC LIBF DC (see Note 1) (see Note 2) ADR1 SUBSC SGTl value D4 I value D1 FLD C FMPY D FSTO GT1 SGT! A LDX n MDX NOP STX CALL DC DC DC Ll L1 ADR1 YZ 0 B GT1 LD STO L J I DO and CONTINUE Statements DO 10 I=J,K 01_ 10 CONTINUE 250 L With Trace Object Coding Source Coding DO 10 I =J,K,M MDX LD S BSC L L L L 1,1 I K Adr.a, LD STO L L J I LD A STO S BSC L L L L L I BSC L 111 LDX BSC DC DC DC 11 11 I ADR1+1 111 112 113 LD BSC BSC BSC L L L L I 111, +Z 112, +113, -Z 3 L L FLD A +126 111,+Z 113, -Z ~ f310 CONTINUE M I K Adr. f3 , ' " GO TO Statement GO TO 111 Computed GO TO Statement GO TO (111,112,113), I ADR1 LIBF FGOTO (see Note 3) LIBF BSC BSC BSC FIIF L 111,+Z L 112,+L 113, -Z (see Note 3) LIBF FIF (see Note 3) LIBF FIF (see Note 3) IF Statements IF (I) 111,112,113 IF(A) 111,100,113 100 CONTINUE IF(A+I) 100,111,100 100 CONTINUE LIBF DC LD BSC BSC LD LIBF LIBF DC LD BSC L 3 L I FLOAT FADD A +126 111,+- Appendix A. Examples of FORTRAN Object Coding 251 Source Coding Object Coding IF(I) 111,111,112 100 CONTINUE LD BSC BSC L L L With Trace I 111,+ 112,-Z LIBF BSC L BSC L FIIF 111,+ 112,-Z (see Note 3) P AUSE Statement PAUSE 11 LIBF DC PAUSE Adr. of constant 11 LIBF DC STOP Adr. of constant 21 LIBF DC BSC I FLD NAME subprogram linkword LD BSC L I NAME subprogram linkword BSC I subprogram linkword STOP Statement STOP 21 RETURN Statements for FUNCTION-type return or for SUBROUTINE -type return END Statement The END statement produces no object code. I/O Statements ------The first I/O call is always 'LIBF *FIO' followed by the parameters and other I/O calls as indicated by the *IOCS control record. LIBF DC DC LIBF DC LIBF DC LIBF DC LIBF DC DC DC LIBF DC *FIO /OOXY 12 WRTYZ 0 CARDZ 0 PRNTZ 0 PAPTZ 0 0 0 TYPEZ 0 See the Subroutine Library section for a detailed discussion of FORTRAN I/O routines. 252 Source Coding Object Coding READ Statement READ (N, 101) A,I LIBF DC DC LIBF DC LIBF DC READ (N, 101) X (X dimensioned) *RED N 101 *IOF A *101 I LIBF DC DC LIBF DC DC *RED N 101 *IOAF X (number of items in array) Read Statement with Implied DO READ (N,101)(X(I), 1=1,5) a)- (see Note 1) LIBF DC DC LD STO LIBF DC DC DC DC LDX LIBF DC MDX LD S BSC *RED N L 101 Adr. of constant ! L I SUBSG SGT1 value D4 I L value D1 SGT! *IOFX X 1,1 L I L L Adr. of constant 5 Adr. a , +Z 11 Write Statements Write statements closely parallel read statements, except for the 'LIBF *COMP' which terminates all WRITE calls. WRITE (N, 101) A, I NOTES 1: 2: 3: LIBF DC DC LIBF DC LIBF DC LIBF *WRITE N 101 *IOF A *101 I *COMP Tagged to indicate the end of the subscript argument list. Included to balance skip at execution of previous instruction. Transfer Trace. Appendix A. Examples of FORTRAN Object Coding 253 The following procedures, in conjunction with Appendix C, are intended to assist the user in defining and analyzing System problems. These procedures are a guide to determining which System element is in control at any given time. To determine which Monitor Pogram is in control, examine the control records printed. The last Monitor control record printed indicates the controlling Monitor Program. To determine which phase of the Monitor Program is in control, perform the following: 4. If the words are not identical, the DUP function whose IOAR header precedes the unmatched words is the function presently in core. In other words, each fWlCtion is loaded starting at the first word following its IOAR header, except DCTL which starts at the first word following the IOAR header table. IOAR Header Table Core Locations Word Count Sector Address 03B6-7 03BS-9 03BA-B 03BC-D 03BE-F 03CO-l 03C2-3 03C4-5 03C6-7 03CS-9 047A 0476 0460 02SO 0500 03CO OBCC 0140 02SO 0140 003C 0040 004S 004C 0050 0054 0632 0057 0044 0046 DUP Function ~ ,i 1. Display the location DSA+2 (OODO). This ~J.- (J}/'i location contains the ~'address of the ""ftr.st...sect.Ql! of the Supervisor phase in control. if( lJ~ lJ Loader 1. 2. -: SF!A) 1\ t Compare the first few words following the phase origin with the phase listing to determine if the phase has been loaded. (See Figure 4, Section 2.) Once it is determined the phase is loaded, locate the phase entry point. If the entry point is zero, the phase has not been entered. If the entry point is non-zero, the phase has been entered. However, because of the overlay s used in the Loader, the phase, even though it has been entered, is not necessarily in control. < Assembler 1. 2. 3. 4. DUP 1. 2. 3. 254 Display the contents of locations 03.6 and 03B7. Compare these two words to the table below. Each pair of words form s the IOAR header for a DUP function. The header consists of the word count (word 1) and the sector address (word 2) of the DU P function. If the words are identical, display the next pair (03BS and 03B9) and compare them to the table. DCTL STORE DUMP DUMPLET DELETE DEFINE EDIT DWADR FILEQ STOREMOD 5. 6. Display the contents of the location OVRLY +1 (05Bl). Subtract the sector address of Phase 0 (OOES with FORTRAN, OOSO without FORTRAN). The remainder is the displacement, in sectors, from Phase O. The phase within which this displacement falls is presently in core. Phase 10 resides in core in place of the Symbol Table add routine, STADD, during Phase 2. If the assembly is in one pass mode, Phase 11 replaces the subroutine INTI in Phase 9. The input phase (CARDO or PAPTl) resides in core in Pass 1, but is overlaid by output in Disk System format in Pass 2 of a one pass mode assembly. The listing routine (1132 Print or WRTYO) resides in core if an *LIST control record is part of the source input; otherwise, it is overlaid by the Symbol Table. FORTRAN SYSTEM LOADER 1. 2. 1. 3. Display the contents of location ROC 3 (7FID). Add the value /0140 (32010) to the value found in ROL3. Display the contents of the address computed above and the next higher addressed word. These two words comprise a disk IOCC. The second word of the disk IOCC (the computed address + 1) is the address, in hexadecimal, of the first sector of the last phase read; hence the phase presently in core. 2. 3. The card deck or paper tape strip read or to be read indicates which phase is in control. During Phase E1, location A (0658) is the start of the input buffer; location 021B contains the sector address of the last sector written; location 0215 contains the sector address of the last sector read. During Phase E2, location 053F contains the sector address of the last sector read. Appendix B. Diagnostic Aids 255 APPENDIX C. DISK MAP The following table is a breakdown of the 1130 Monitor System. For purposes of completeness,it is assumed that both the FORTRAN Compiler and SYSTEM ELEMENT Disk Pack 10 Cold Start routine Supervisor Phase E Pliase B Phase 0 Skeleton Sup. and DCOM Console Printer and DISKO routines PAPTl or CARDO Phase C Presupervisor and MultiSector routines Conversion routines, Phase A, and 1132 Printer routine Reserved Loader Phase 0 Phase 7 Phase 8 DISK1 DISKN DISKZ Save Monitor routine Phase 1 Phase 4 Phase 5 Phase 2 Phase 3 Phase 6 Map1 Map2 Message 1 Message 2 Message 3 1132 Printer/Console Printer Reserved DUP DUPCO DCn STORE FILEQ STOREMOD SRLET DUMP DUMPLET Reserved ERM DELETE DEFINE DWADR Principal I/O Device routine Principal Print Device routine Principal Error Message Device routine PTX Reserved DUPCO Temp. Storage Reserved SECTOR. ADDRESS DEC HEX CORE ORIGIN (HEX) ---- 0 1 0 1 0802 2 4 6 8 2 4 6 8 055C 055C 055C 0090 9 11 12 9 B C 00[4 00F4 055C 13 D 04CO 14 20 E 14 055C 24 25 26 18 19 1A 27 29 32 10 33 34 38 39 40 44 47 48 49 50 51 52 1B 20 21 22 26 27 28 2C 2F 30 31 32 33 34 ---0578 OBBC 01C2 with DISKZ, 0260 with DISKO, 0370 with DISK1, and 0438 with DISKN. 00F4 00F4 00F4 0090 0630 OBBC OBBC 0944 OBBC OBBC 026A 026A 026A 026A 026A 026A 53 54 35 36 ---- 56 60 64 69 71 72 73 0272 03CA 03BA 03C8 03CA 06AO 03BC 03BE 88 38 3C 40 45 47 48 49 40 4F 50 51 55 58 89 59 082E 92 5C OC4E 94 97 100 109 110 5E 61 64 6D 6E OCFE 0828 77 79 80 81 85 ---- 045C 03CO 03C2 03C6 ---- ---- ---- the Assembler program are present, a Fixed Area of five cylinders is assigned with the resultant FLET, and a User Area of 30 cylinders is assigned. SYSTEM ELEMENT FORTRAN Phase 1 Dump Reserved Phase 28 Phase 27 Phase 26 Phase 25 Phase 24 Phase 23 Phase 22 Phase 21 Phase 20 Phase 19 Phase 18 Phase 17 Phase 16 Phase 15 Phase 14 Phase 13 Phase 12 Phase 11 Phase 10 Phase 9 Phase 8 Phase 7 Phase 6 Phase 5 Phase 4 Phase 3 Phase 2 Assembler Phase 0 Phase 9 1132 PrintjWRTYO CARDO/PAPTl Phase 1 Phase 12 Phase 10 Phase 11 Phase 5 Phase 6 Phase 7 Phase 8 Phase 2 Phase 3 Phase 4 VIP/TYPE ER Phase lA Phase 12A System Symbol Table Reserved FLET Fixed Area CIB LET User Area Working Storage System LoaderjEditor Bootstrap Loader Phase El Phase E2 (Part I) * Phase E2 (Part 11)* * Phase SECTOR ADDRESS DEC HEX 128 129 131 142 144 147 150 154 158 161 164 168 172 176 179 183 187 191 194 197 200 203 206 207 211 215 218 220 224 231 80 81 83 8E 90 93 96 9A 9E Al A4 A8 AC BO B3 B7 BB BF C2 C5 C8 CB CE DO D3 D7 DA DC EO E7 232 233 239 240 242 244 246 247 248 250 252 254 256 258 260 262 263 264 265 E8 E9 EF FO F2 F4 F6 F7 F8 FA FC FE 100 102 104 106 107 108 109 266 272 280 320 336 334 584 lOA 110 118 140 150 158 248 -_.- --- --- --632 1586 1584 630 CORE ORIGIN (HEX) 7EBC 7984 ---7590 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7984 7590 7984 0542 0774 ODDB 025E 05B2 05B2 OC81 ODOB 05B2 05B2 05B2 05B2 05B2 05B2 05B2 03F6 05B2 05B2 OED3 in a 4096-word machine; 1ED3 in an 8192-word machine ---- ---- ---- ---- ------- ---0000 0028 03C2 0100 E2 is loaded onto the dIsk by Phase E1 for the duratIon of the System Load only. 256 GLOSSARY Absolute program: A program which, although in Disk System format, has been written in such a way that it can be executed from only one core location. Assembler core load: A core load which was built from a mainline written in Assembly Language. CALL routine: A routine which must be referenced with a CALL statement. The type codes for routines in this category are 4 and 6. CALL TV: The transfer vector through which CALL routines are entered at execution time. See the section on the Loader for a description of this TV. CIB: (the Core Image Buffer) The buffer on which most of the first 4000 words of core are saved. Although the CIB occupies two cylinders, the last two sectors are not used. See the section on the Loader for a description of the CIB and its use. Cold Start Routine: The routine which initializes the 1130 Disk System Monitor by reading down from the disk the Skeleton Supervisor. COMMA (the Core Communication Area): The part of core which is reserved for the work areas and parameters which are required by the Monitor programs. In general, a parameter is found in COMMA if it is required by two or more Monitor Programs or if it is passed from one Monitor Program to another. COMMA is initialized from DCOM by the Cold Start Routine and at the beginning of each JOB. Control Record: One of the records (card or paper tape) which directs the activities of the 1130 Monitor System. For example, / / DUP is a Monitor control record that directs the Monitor to initialize DUP; *DUMPLET is a DUP control record directing DUP to initialize the DUMPLET program; *EXTENDED PRECISION is a FORTRAN control record directing the compiler to allot three words instead of two for the storage of data variables. Core Image format: Sometimes abbreviated CI format. It is the format in which whole core loads are stored on the disk prior to execution. Core Image Header Record: A part of a core load stored in Core Image format. It is actually the last 15 words of the format. Among these 15 words are the lTV and the setting for index register 3. Core Image program: A mainline program which has been converted, along with all of its required subroutines, to CI format. In other words, it is a core load. Core load: Synonymous with the term object program, which is comprised of the lTV, the objecttime TV, the information contained in the Core Image Header Record, the in-core code, and all LOCALs and SOCALs. Cylinderize: The process of rounding a disk block/ sector address up to the disk block/sector address of the next cylinder boundary. Data block: A group of words consisting of a data header, data words, and Indicator Words for a routine in Disk System format. A new data block is created for every data break. (A data break occurs whenever there is an ORG, BSS, or BES statement, at the end of each record, and whenever a new sector is required to store the words comprising a routine.) Data break: Sometimes referred to as a break in sequence. See "Data block" for a definition of this term. Data file: An area in either the User Area or the Fixed Area in which data is stored. Data format: The format in which a Data file is stored in either the User Area or the Fixed Area. Data group: A group of not more than nine data words of a routine in Disk System format. In this format every such group has as its first word an associated Indicator Word. Normally a data Glossary 257 g-roup consists of eight data words plus its Indicator Word; but, if the data block of which the data group is a part contains a number of data words which is not a multiple of eight, then the last data group will contain less than nine data words. Data header: The first pair of words in a data block for a routine in Disk System format. The first word contains the loading address of the data block, the second the total number of words contained in the data block. DC OM (the Disk Communications Area): The disk sector which contains the work areas and parameters for the Monitor Progranls. It is used to initialize COMMA by the Cold Start Routine and at the beginning of each JOB (see "COMMA"). Exit control cell: The second word follOwing an LIBF entry point, counting the entry point as one word. It is through the contents of the Exit Control Cell that the exit from the LIBF routine is made. See the section on the Loader for explanation of this cell and its contents. Fixed area: The area on disk in which core loads and data files are stored if it is desired that they always occupy the same sectors. No routines in Disk System format may be stored in this area. FORTRAN core load: A core load which was built from a mainline written in FORTRAN. Hardware area: Occupies core locations 010-3910' Words 1, 2, and 3 are index registers 1, 2, and 3, respectively. Words 8-13 are the Interrupt Transfer Vector (lTV). Words 32-39 are the buffer required by the 1132 Printer (words 38 and 39 are also used by the Skeleton Supervisor). Those core locations in this area which were not specifically mentioned are reserved. IBM area: That part of disk storage which is occupied by the Monitor Programs; i. e., cylinders 0-33 (sectors 0-271). ILS (an Interrupt Level Subroutine): A routine which services all interrupts on a given level; i. e. , it determines which device on a given level caused the interrupt and branches to a servicing routine (ISS) for processing of that interrupt. 258 After this processing is complete, control is returned to the ILS, which turns off the interrupt. DEFINE FILE table: The table which appears on the very first sector of any mainline which refers to defined files. There is one 7-word entry for each file which has been defined. Disk block: A 20-word segment of a disk sector. Thus, sixteen disk blocks comprise each sector. The disk block is the smallest distinguishable increment for DSF programs. Thus the Monitor System permits packing of DSF programs at smaller intervals than the hardware would otherwise allow. The disk block is also referred to elsewhere as the "disk byte". Disk System format: Sometimes abbreviated DSF. It is the format in which mainlines and suoroutines are stored on the disk as separate entities. It is not possible to execute a program in DSF; it must first be converted to Core Image format. Disk System format program: A program which is in Disk System format. It is sometimes called a DSF program. Effective program length: The terminal address appearing in a program. For example, in Assembler Language programs it is the last value taken on by the Location Address Counter and appears as the address assigned to the END statement. Entry point: A term which may give rise to confusion unless the reader is careful to note the context in which this term appears. Under various conditions it is used to denote 1) the symbolic address (name) of a place at which a subroutine or a Monitor Prograln is entered, 2) the absolute core address at which a subroutine or mainline is to be entered, and 3) the address, relative to the address of the first word of the subroutine, at which it is to be entered. Indicator Word: Tells which of the following data words should be incremented (relocated) when relocating a routine in Disk System format. It also tells which are the names in LIBF, CALL, and DSA statements. Routines which are in Disk System format all contain Indicator Words, preceding every eight data words. Each pair of bits in the Indicator Word is associated with one of the follOwing data words, the first pair with the first data word, etc. Instruction address register: Also called the 1counter. It is the register in the 1130 which contains the address of the next sequential instruction. LIBF TV: The transfer vector through which LIBF routines are entered at execution time. See the section on the Loader for a description of this TV. In-core routine: A part of a given core load which remains in core storage during the entire execution of the core load. IIBs are always in-core routines, whereas LOCALs and SOCALs never are. Loading address: The address at which a routine or data block is to begin. In the latter case the address is that of an absolute core location, while in the former it is either absolute or relative, depending upon whether the routine is absolute or relocatable, respectively. ISS (an Interrupt Service Subroutine): A routine which is associated with one or more of the six levels of interrupt; i. e., CARDO, which causes interrupts on two levels, is such a routine. ISS counter: A counter in COMMA (word 50) which is incremented by 1 upon the initiation of every I/O operation and decremented by 1 upon receipt of an I/O operation complete interrupt. lTV (Interrupt Transfer Vector): The part of the Hardware Area which supplies the second words of the automatic BSI instructions which occur with each interrupt. In other words, if an interrupt occurs on level zero and if core location eight contains 500, an automatic BSI to core location 500 occurs. Similarly, interrupts on levels 1-5 cause BSls to the contents of core locations 9-13, respectively. The lTV is defined as core locations 8-13. Job: A group of tasks (subjobs) which are to be performed by the 1130 Disk Monitor System and which are interdependent; i. e., the successful execution of any given subjob (following the first one) depends upon the successful execution of at least one of those which precedes it. See the section on the Supervisor for examples. LET /FLET (the Location Equivalence Table for the User Area/the Location Equivalence Table for the Fixed Area): The table through which the disk addresses of Programs and Data files stored in the User Area/Fixed Area may be found. LET occupies the cylinder following the Supervisor Control Record Area. If a Fixed Area has been defined, FLET occupies cylinder 34 (sectors 272-279); otherwise, there is no FLET. LIBF routine: A routine which must be referenced with an LIBF statement. The type codes for routines in this category are 3 and 5. Load-time TV: The transfer vector which the Loader uses during the building of a core load. See the section on the Loader for a discussion of this TV. LOCAL (load-on-call routine): That part of an object program which is not always in core. It is read from Working Storage into a special overlay area in core only when it is referenced in the object program. LOCALs, which are specified for any given execution by the User, are a means of gaining core storage at the expense of execution time. The Loader constructs the LOCALs and all linkages to and from them. Location assignment counter: A counter maintained in the Assembler program for assigning addresses to the instructions it assembles. Modified EBCDIC code: A six-bit code used internally by the Monitor programs. In converting from EBCDIC to Modified EBCDIC, the leftmost two bits are dropped. Modified Polish Notation: The rearrangement of operators and operands (i. e. , an operator and two operands) into the triple form required by the FORTRAN Compiler to generate the code necessary to perform arithmetic operations. Monitor Program: One of the following parts of the 1130 Disk System Monitor: Supervisor (SUP), Disk Utility Program (DUP), Assembly Program (ASM), and FORTRAN Compiler (FOR). Name code: The format in which the names of subroutines, entry pOints, labels, etc. are stored for use in the Monitor Programs. The name consists of five characters, terminal zeros being added if necessary to make five characters. Each character is in modified EBCDIC code, and the entire 30-bit representation is right-justified in two I6-bit words. The leftmost two bits are Glossary 259 used for various purposes by the Monitor Programs. In FORTRAN, symbols of one or two characters only are packed in modified EBCDIC code into a single word. NOCAL (a load-although-not-called routine): A routine which is to be included in an object program although it is never referenced in that program by an LIBF or CALL statement. Debugging aids such as a trace routine or a dump routine fall into this category. NOP: Used to denote the instruction, No Operation. Object program: Synonymous with the term core load. Object-time TV: A collection of both the LIBF TV and the CALL TV. Principal I/O device: The 1442 Card Read/Punch if one is present; the 1134 Paper Tape Reader/ 1055 Paper Tape Punch otherwise. Principal print device: Sometimes referred to as the Principal Printer. It is the 1132 Printer if one is present; the Console Printer otherwise. Program header record: A part of a routine stored in Disk System format. Its contents vary with the type of the routine with which it is associated. It contains the information necessary, along with information from LET, to identify the routine, to describe its properties, and to convert it from Disk System format to a part of a core load. Relocatable program: A program which can be executed from any core location. Such a program is stored on the disk in Disk System format. Relocation: The process of adding a relocation factor to address constants and to those twoword instructions whose second words are not (1) invariant quantities, (2) absolute core addresses, or (3) symbols defined as absolute core addresses. The relocation factor for any program is the absolute core address at which the first word of that program is found. Relocation indicator: The second bit in a pair of bits in an Indicator Word. If the data word with which this bit is associated is not an LIBF, CALL, or DSA name, then it indicates whether or not to increment (relocate) the data word. 260 If the relocation indicator is set to 1, the word is to be relocated. Resident Monitor: Occupies core locations 0 10 -607 10 , This area is required by the 1130 Disk Monitor System for its operation and is generally unavailable to the user for his own use. The Resident Monitor consists of the Hardware Area, COMMA, the Skeleton Supervisor, and DISKO. Sectorize: The process of rounding a disk block address up to the disk block address of the next sector boundary. Skeleton supervisor: That part of the Supervisor which is always in eore (except during the execution of FORTRAN core loads) and which is, essentially, the logic necessary to process CALL EXIT and CALL LINK statements. Together with COMMA it occupies core locations 38 -144 , 10 10 SOCAL (a System Overlay to be loaded-on-call): One of three overlays automatically prepared by the Loader under certain conditions when a core load is too large to fit into core storage. See the section on the Loader for an explanation. Subroutine: Used in the 1130 Disk Monitor System interchangeably with the term subprograms, routine, and program. Any distinctions between these terms will have to be inferred from the context. Supervisor control record area: The area in which the Supervisor Control Records are written. This area is the cylinder following the CIB. The first two sectors are reserved for *LOCAL records, the next two for *NOCAL records and the next two for *FILES records. The last two sectors in this cylinder are not utilized. See the Supervisor section for the formats of these records. The Monitor: Refers to the 1130 Disk System Monitor. User area: The area on the disk in which all routines in Disk System format are found. Core loads (i. e., programs in Core Image format) and Data files may also be stored in this area. All IBMsupplied routines are found here, since they are stored in Disk System format. This area begins at the cylinder following LET and occupies as many sectors as are required to store the routines and files residing there. User programs: Are mainlines and subroutines which have been written by the user. User storage: That part of disk storage which is neither Working Storage nor the IBM Area. It begins at cylinder 34 (sector 272), which would be the beginning of the eIB unless a Fixed Area is defined. In this case FLET would occupy cylinder 34 (sectors 272-279), the Fixed Area would begin at cylinder 35 (sector 280), and the eIB would occupy the first two cylinders following the Fixed Area, the length of which is defined by the user. Working storage: The area on disk immediately following the last sector occupied by the User Area. This is the only one of the three major divisions of disk storage (IBM Area, User Storage, Working Storage) which does not begin at a cylinder boundary. XRI, XR2, XR3: The acronyms for index registers 1, 2, and 3, respectively. Glossary 261 INDEX Absolute Mode (Assembler) 46 Assembler Error Codes 49 Assembler I/O Routines 74 I/O Device Routine 74 Print Device Routine 75 Assembler Notes 47 Assembler Output Format 49 Assembler Overlays 75 Assembler Phase Descriptions 53 Phase 0 53 Phase 1 54 Phase 1A 56 Phase 2 56 Phase 3 57 Phase 4 58 Phase 5 58 Phase 6 60 Phase 7 61 Phase 8 64 Phase 9 66 Phase 10 71 Phase 11 72 Phase 12 73 Phase 12A 74 Assembler Program 45 Assembler Program Operation 45 Pass 1 45 Pass 2 45 I/O Data Flow 45 One Pass Mode 46 Two Pass Mode 46 Assembler Storage Layout 4 47 Assembler Symbol Table 51 Assembler Tables and Buffers 51 BEGOP (Operation Code Table) 51 INSBF (Instruction Buffer) 51 Location Assignment Counter 51 Secondary Location Assignment Counter Card Code Input Conversion Table 52 Paper Tape Input Conversion Table 52 BEGOP Table (Assembler) 51 51 Card Code Input Conversion Table (Assembler) 52 Card Subroutine (CARD1) 119 Call Processing 119 Column Interrupt Processing 119 Operation Complete Interrupt 119 CIB (Core Image Buffer) 8 Console Printer or Operator Request Subroutine (WRTYD) Call Processing 121 Interrupt Processing 121 Core Image Format Loading 12 Phase 0 12 Phase 7 12 Phase 8 12 262 121 DCTL (DUP Control) 19 Entry Point 20 I/O Operations 20 Decode Control Record Function Field 21 Decode STORE function 21 Decode DUMP function 22 Decode DELETE and DEFINE functions 22 Call required function 22 Decode control record COUNT field 24 Convert NAME field to name code 24 DEFINE Function (DUP) 40 Entry point 40 . Routines 40 DELETE Function (DUP) 27 Delete from User Area 27 Entry points 28 Phase I - User Area 28 Phase II - User Area 29 Delete from Fixed Area 29 Phase I - Fixed Area 30 Phase II - Fixed Area 30 Exit 30 Diagnostic Aids (Appendix B) 254 Disk Map (Appendix C) 256 Disk Subroutine (DISK1) 126 Call processing 126 Subroutine A (SBR T A) 126 MULT (Read or Write Multiple Sectors) 127 RBCRT (Read Back Check) 127 Disk System Format Loading 8 Phase 0 9 Phase 1 9 Phase 2 9 Phase 3 10 Phase 4 11 Phase 5 11 Phase 6 11 Phase 7 11 Phase 8 12 Disk Utility Program (DUP) 17 DUP Functions and Routines 18 DUP I/O 41 DUP I/O Routines 41 DISKO 41 CARDX 41 TYPX 42 VIPX 43 PTX 43 PERRC/TERRC 43 DUMP Function (DUP) 24 Entry points 24 Dump User or Fixed Area to Working Storage 24 Dump Working Storage to Principal I/O device 25 Blank card/control record test 26 Building one complete card 01' less 26 Format data input for punching 27 DUMPLET Function (DUP) 37 Entry point 38 Routines 38 DUPCO (DUP Common) 18 Entry points 18 Multi -sector Routine 19 Initializing Routine 19 IntelTUpt Level Subroutines (ILS) DW ADR Function (DUP) 39 Entry point 40 Routines 40 FORTRAN FORTRAN FORTRAN FORTRAN FORTRAN 19 Flipper Routines (FLIPO, FLIP1) 127 Flipper Table (Loader) 14 FORTRAN 76 Program purpose 76 General Compiler Description 76 FORTRAN Communications Area 78 FORTRAN Compilation Errors 82 FORTRAN Control Records 77 FORTRAN I/O 127 Device routines 128 Input Specifications 128 flO Call 128 FORTRAN Non-Disk I/O 128 Summary of Non-Disk I/O 129 FORTRAN Disk I/O 131 Summary of Disk I/O 132 FORTRAN Object Code (Appendix A) 245 FOR TRAN Phase Area 78 FORTRAN Phase Descriptions 82 Phase 1: First Sector 83 Phase 2: Second Sector 83 Phase 3: Input 83 Phase 4: Classifier 85 Phase 5: Check Order/Statement Number 87 Phase 6: COMMON/SUBROUTINE or FUNCTION Phase 7: DIMENSION/REAL, INTEGER, and EXTERNAL 90 Phase 8: Real Constant 91 Phase 9: DEFINE FILE 92 Phase 10: Variable and Statement Function 93 Phase 11: FORMAT 95 Phase 12: Subscript Decomposition 97 Phase 13: Ascan I 98 Phase 14: Ascan II 100 Phase 15: DO, CONTINUE, STOP, PAUSE, and END 101 Phase 16: Subscript Optimize 103 Phase 17: Scan 104 Phase 18: Expander I 107 Phase 19: Expander II 108 Phase 20: Data Allocation 109 Phase 21: Compilation Errors 111 Phase 22: Statement Allocation 112 Phase 23: List Statement Allocation 113 Phase 24: List Symbol Table 113 Phase 25: List Constants 114 Phase 26: Output I 115 Phase 27: Output II 116 Phase 28: Recovery 116 Dump phase 117 Phase Objectives 76 Statement String 81 Storage Layout 77 String Area 82 Symbol Table 78 IBMOO (System Maintenance Program) 147 Initial System Load (System Loader/Editor) 134 INSBF Buffer (Assembler) 51 Keyboard, Console Printer, or Operator Request Subroutine (TYPEO) 120 Call processing 120 Interrupt processing 120 Loader 7 Load-time TV (Loader) 13 Location Assignment Counter (Assembler) 51 Object-time TV (Loader) 14 One Pass Mode (Assembler) 46 88 Paper Tape Input Conversion Table (Assembler) Paper Tape Subroutine (PAPT1) 122 Call processing 122 IntelTUpt processing (read) 122 IntelTUpt processing (punch) 122 Paper Tape Subroutine (PAPTN) 122 Call processing 123 IntelTUpt processing 123 Plot Subroutine (PLOT1) 123 Call processing 123 Buffers and indicators 123 Interrupt processing 123 Presupervisor 3 Printer (1132) Subroutine (PRNT1) 124 Call processing 124 Interrupt processing 124 Relocatability (Assembler) Absolute Mode 46 Relocatable Mode 46 52 46 Secondary Location Assignment Counter (Assembler) Skeleton Supervisor 2 STORE Function (DUP) 30 Entry points 30 Card System format 31 Card Data format 31 Termination 31 Card to Working Storage routines 31 Working Storage to user/fixed area 31 STOREMOD Function (DUP) 37 Entry point 37 Routines 37 Subroutine Library 119 Card Subroutine (CARD1) 119 1132 Printer Subroutine (PRNT1) 124 Paper Tape Subroutine (PAPT1) 122 Paper Tape Subroutine (PAPTN) 122 Plot Subroutine (PLOT1) 123 51 263 Flipper Routines (FLIpO, FLIP1) 127 FORTRAN I/O 127 Disk Subroutine (DISK1) 126 Keyboard, Console Printer, or Operator Request Subroutine (TYPEO) 120 Console Printer or Operator Request Subroutine (WRTYO) 121 Subroutines used by the Loader 13 Supervisor 2 Supervisor Area Descriptions 2 Supervisor Control Functions 2 Supervisor I/O Conversion Routines 3 Supervisor I/O Subroutines 3 Supervisor Phases 3 Phase A 3 Phase B 4 Phase C 5 Phase D 5 Phase E 6 Supervisor Resident Routines 2 264 System Loader/Editor 134 Initial System Load 134 System Reload 134 General Description 138 Phase E1 138 Phase E2 138 Core Allocation Summary 141 System Loader/Editor Communication Area 143 System Loader/Editor Input 134 User-supplied input 134 IBM -supplied input 135 Paper T ape input 137 System Loader/Editor, Paper Tape Systems 140 System Loader/Editor Routine Descriptions 143 Program Entry Points/Labels 143 System Maintenance Program (IBMOO) 147 System Overlay Scheme (Loader) 15 Two Pass Mode (Assembler) 46 Z26-3752-0 N N 0'\ I OJ ~ N I o International Business Machines Corporation Data Processing Division 112 East Post Road, White Plains, New York READER'S COMMENT FORM IBM 1130 Monitor Programming System Program Logic Manual Form Z26-3752-0 • Your comments, accompanied by answers to the following questions, help us produce better publications for your use. If your answer to a question is "'No" or requires qualification, please explain in the space provided below. Comments and suggestions become the property of IBM. Yes No • Does this publication meet your needs? • Did you find the material: Easy to read and understand? Organized for convenient use? Complete? Well illustrated? Written for your technical level? D D D D D D D D D D D D • \Vhat is your occupation? • How do you use this publication? As an introduction to the subject? For advanced knowledge of the subject? For informati0n about operating procedures? D D D As an instructor in a class? D As a student in a class? D As a reference manual? 0 Other _________ ._______________________________ .______ • Please give specific page and line references with your comments when appropriate. If you wish a reply, be sure to include your name and address. COMMENTS • Thank you for your cooperation. No postage necessary if mailed in the U.S.A. 226-3752-0 fold fold FIRST CLASS PERMIT NO. 2078 SAN JOSE, CALIF. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN U. S. A. POSTAGE WILL BE PAID BY . . . I BM Corporation Monterey & Cottle Rds. San Jose, California 95114 Attention: Programming Publications, Dept. 452 fold fold N I:-.J I::TI I W ''I V1 tv I o J]rnru:b ~ International Business Machines Corporation Data Processing Division 112 East Post Road, White Plains, N. Y. 10601
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37 Create Date : 2012:08:22 19:12:44-08:00 Modify Date : 2012:08:22 19:21:48-07:00 Metadata Date : 2012:08:22 19:21:48-07:00 Producer : Adobe Acrobat 9.51 Paper Capture Plug-in Format : application/pdf Document ID : uuid:3be15207-f0b5-4269-9119-d83b220956de Instance ID : uuid:295246b8-77cd-4d0c-bcfa-df8cfb27ac40 Page Layout : SinglePage Page Mode : UseOutlines Page Count : 272EXIF Metadata provided by EXIF.tools