Y26 3714 0_1130_Disk_Monitor_Version_2_PLM_Nov67 0 1130 Disk Monitor Version 2 PLM Nov67
Y26-3714-0_1130_Disk_Monitor_Version_2_PLM_Nov67 Y26-3714-0_1130_Disk_Monitor_Version_2_PLM_Nov67
User Manual: Y26-3714-0_1130_Disk_Monitor_Version_2_PLM_Nov67
Open the PDF directly: View PDF .
Page Count: 363
Download | |
Open PDF In Browser | View PDF |
File Number 1130-36 Form Y26-3714-0 Program Logic IBM 1130 Disk Monitor Programming System; Version 2 Program Logic Manual Program Numbers 1130-05-005 1130-05-006 This publication describes the internal logic of the IBM 1130 Disk Monitor Programming System, Version 2. The contents are intended for use by persons involved in program maintenance, and for system programmers who are altering the program design. 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 PREFACE This publication is composed of four parts. Part 1 is a description of each of the components of the monitor system. Sections of Part 1 are devoted to: System Communication areas System Loader Cold Start Programs Resident Monitor Supervisor Core Image Loader Core Load Buil der Disk Utility Program (DUP) Assembler Program FORTRAN Compiler System Library Stand-alone Utilities Each description includes a discussion of the logical structure and functional operation of the component, table formats, and core storage layouts. Part 2 is a description of the techniques and procedures for use by personnel involved in system maintenance and;'or modification during error diagnosis and program analysis. Part 3 is the flowcharts for the monitor system components described in Part 1. Part 4 is the appendices provided to support Parts 1 through 3. RESTRICTED DISTRIBUTIONI This publication is intended for use by IBM personnel only and may not be made available to others without the approval of local IBM management. First Edition (November 1967) Specifications contained herein are subject to change from time to time.. Any such change will be reported in subsequent revisions or Technical Newsletters. Requests for copies of IBM publications should be made to your IBM representative or the IBM branch office serving your locality. A form is provided at the back of this publication for reader's comments. If the form has been removed, comments may be addressed to IBM Corporation, Programming Publications, Department 232, San Jose, California 95114. © International Business Machines Corporation, 1967 CONVENTIONS OBSERVED The followi~ conventions have been observed in this publication: 1. Numberswritten in the form /XXXX are hexadecimal mmbers; numbers written without a preceding slash (/) are decimal numbers. 2. The diagra.ms showing the layouts of core storage are intended to illustrate the contents of core storage and their relative locations; no exact representation of size or proportion is intended. PREREQUISITE PUBLICATIONS Effective use of this publication requires that the reader be fam:iliar with the following publications: IBM 1130 Functional Characteristics (Form A26-5881) IBM 1130 Input/Output Units (Form A26-5890) IBM 1130 Assembler Language (Form C26-5927) IBM 1130 Subroutine Library (Form C26-59~~9) IBM 1130 Disk Monitor System, Version 2, Programming and Operator's Guide (Form C26-3717) CONTENTS SECTION 1. INTRODUCTION .••••••••••• SECTION 2. COMMUNICATIONS AREAS ••••••••••• In-core Communications Area (COMMA) •••••••••••• Disk-resident Communications Area (DCOM) Drive- and Cartridge-dependent Parameters SECTION 3. SYSTEM LOADER •••••••••••••••••• Flowcharts •••••••••••••••••.••••••••••••• Phase 1 •••••••••••••••••••••••••••••••••• Functions ••••••••••••••••••••••••••.••••• Buffers and I/O Areas •••••••.••.•••••••••••• Communication From Phase 1 to Phase 2 •••••••••• Phase 2 •••••••••••••••••••••••••••••••••• Functions, Initial Load and Reload •••••••••••••• Functions, Initial Load Only ••••••••••••••••••• Functions, Reload Only ••••••••••••••••••••• Buffers and I/O Areas •••••••••.••••••••••••• SUbphases •.••••.••••••••••••••••••••••• SUbphase 1 ••••••••••••••••••••••••••• Subphase 2 •••••••••••••••••••••••••••• Subphase 3 •••••••••••••••••••••••••••• Core Layout • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Cartridge Identification Sector •••••••••••••.••••• System Location Equivalence Table (SLET) •••••••••• Reload Table •••••••••••••••••••••••••••••• 3 3 3 3 9 9 9 9 9 9 10 10 10 10 10 11 11 11 12 12 15 15 15 15 15 SECTION 5. Flowcharts Error Traps ••••••••••••••••••••••••••••• ILSs •••••••••••••••••••••••••••••••••• Disk I/O Subroutine •••••••••••••••••••••••••• 17 17 17 17 17 17 17 17 SECTION 6. SUPERVISOR ••••••••••••••••••••• Flowcharts • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Monitor Control Record Analyzer - Phase 1 ••••••••••• JOB Control Record Processing ••••••••••••••••• System Update Program ••••••••••••••••••••• Other Control Record Processing •••••••••••••••• XEQ Control Record Processor - Phase 2 • • • • • • • • • • • • • XEQ Control Record Processing ••••••••••••••••• Supervisor Control Record Processing •••••••••••• LOCAL/NOCAL Control Record Processing ••••••• FILES Control Record Processing •••••••••••••• 19 19 19 19 20 20 21 21 21 22 22 RESIDENT MONITOR COMMA •••••••••.••••••••••••••••••••••• Skeleton Supervisor •••••••••••••••••••••••••• CALL LINK, CALL DUMP, CALL EXIT Processor ••••• 22 23 23 24 SECTION 7. CORE IMAGE LOADER •••••••••••••• Flowcharts •••••••••••••••••••••••••••••• Phase 1 •••••••••••••••••••••••••••••••• Phase 2 27 27 27 27 Core Layout ••••••••••••••••••••••••••••• Debugging/Analysis Aids •••••••••••••••••••••• 28 SECTION 8. CORE LOAD BUILDER ••••••••••••••• Flowcharts •••••••••••••••.••••••••••••••• General Comments •••••••••••••••••••••••••• Overlay Scheme and Core Layout •••••••••••••••• Disk Buffers •••••••••••••••••••••••••••••• Core Image Buffer (CIB) •••••••••••••••••••••• Load Table ••••••••••••••••.••••••••••••• LOCAL, NO CAL , and FILES Information •••••••••••• ISS Table ••••••••••••••••••••••••••••••• Interrupt Branch Table (IBT) ••••••••••••••••••• Incorporating Programs Into the Core Load ••••.••••• Pass 1 •••••••••••••••••••••••••••••••• Pass 2 •••••••••••••••••••••••••••.•••• LOCALs and SOCALs •••••••••••••••••••••• Interrupt Level Subroutines (ILSs) •••••••••••••• Transfer Vector (TV) ••••••••••••••••••••. Linkage to LOCALs ••••••••••••••••••••• Linkage to the System Overlays (SOCALs) ••••••• DEFINE FILE Table ••••••••••••••••••••••• Phase Descriptions •••••••••••••••••••••••••• Phase 0 •••••••••••••••••••••••••••••• Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 8 Phase 9 Phase 10 Phase 11 Phase 12 Debugging/ Analysis Aids 33 33 ................ ............... . ' 13 13 14 SECTION 4. COLD START PROGRAMS •••••••••••• Flowcharts ••••••••••••••••••••••••••••••• Cold Start Loader ••••••••••••••••••••••••••• Cold Start Program •••••••••••••••••••••••••• Core Layout ••••••••••••••••.•••••••••••••• Supervisor Control Record Area (SCRA) •••••••••• System Core Dump Program ••••••••••••••••••• Auxiliary Supervisor •••••••••••••••••••••••• Core Layout. • • • • • • • • • • • • • • • • • • • • • • • • • • • •• SECTION 9. DISK UTILITY PROGRAM (DUP) Flowcharts . • • • • • • • • • • • • • • • • • . • • • • • • • • • • • • DUP Operation •••••••••••••••••••••••••••• Core Storage Layout •••••••.•••••••••••••••• DUP Control Records •••••••••••••••••••••••• iii 30 33 33 34 34 35 35 35 35 36 36 36 37 37 37 37 38 39 40 40 40 40 41 41 41 42 42 42 42 42 42 42 42 43 43 43 43 44 Location Equivalence Table (LET)/Fixed Location Equivalence Table (FLET) •••.•••••••••.•••.••.• DUP Conc.atenated Communications Area (CA TCO) . • • • •• DUP Phase Descriptions •••.•••••••••••.•••.•••• DUP COMMON (DUPCO) .•••••••••••••••••••• DUP CONTROL (DCTL) •••••••••••••••••••••• STORE ••.••••.•••.•••••••.••••••••••.•• FILEQ •••••••••••••.•••••..•••••••••••• DDU1I1P. • • • . • • • • • • • • • • • • • . • • • • • • • • • • • . •• DUMPLET/DUMPFLET • . • . • • • • . • • • • • • • • . • • • •• DELETE ••.•.•••.•.••••••••••••••••••••• DEFINE .•••••••••••.•••••••••••••••••••• DEXIT ••••••••••••••.•••••••••••••••••• 2501/1442 Card Interface (CFACE) • • • • • • • • • • • • • •• Keyboard Interface (KFACE) • • • • • • • • • • • • • • • • • •• 1134/1055 Paper Tape Interface (PFACE) • • • • • • • • • •• PRECI ••••••••••••••••••••••••.•••••••• DUP Diagnostic Aids • • • • • • • • • • • • • • • • • • • • • • • • •• General PRECI • ••••••••••••••••••••••• , • • • • • •• STORE • ••••••••••••••.•••••••••••••••• 44 45 49 49 51 52 54 55 56 57 57 58 59 60 60 62 63 63 63 63 SECTION 10. ASSEMBLER PROGRAM •••.••.••••••• Flowcharts •••••••••••••••••••••••••••••••• Introduction •••••••••••••••••••••.••••••••• Program Operation •••• • • • • • • • • • • • • • • • • • • • • • •• Assembler Communications Area • • • • • . • • • • • • • • • • •• Overlay Area ••••.••••••••••.••.••••••••••• Symbol Table •••••••••••••••••••••••••••••• Intermediate I/O ••••••••••••••••••••••••••• Double-Buffp.r!.ng ••••••••••••••••••••••••••• Phase Descriptions •••••••••••••••.••••••••••• Phase 0 •••••••••••••••••••••••••••••••• Phase 1 •••••••••••••••••••••••••••••.•• Phase lA •••.••••••••••••••••••••••••••• Phase 2 •••••••••••••••••••••••••••••••• Phase 2.1\. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Phase 3 Phase 4 Phase 5 · ••••••••.•.•••••••••••.••.••••• Phase 6 • ••••••••••••.•••••••••••••••••• Phase 7 Phase 7A ••••••••••••••••••••••••••••••• Phase 8 Phase 8A •..••••••••••••••.••••••••.•••• Phase 9 •••.•••••••••••••••••••••••••••• Phase 10 ••••••••••••••••••••••••••••••• Phase 10A • • • • • • • • • • • • • • . • • • • • • • • . • • • • • •• Phase 11 Phase 12 ERMSG (CDARCV (CDAPCV Core Layout. • • . . • • • • • • • • • • • • • • . • • • • • • • • • • •• 65 65 65 65 66 66 66 67 67 67 67 67 68 68 68 68 68 68 69 69 69 69 69 69 70 71 71 71 71 71 71 71 SECTION 11. FORTRAN COMPILER ••••••••••• Flowcharts . . . . . . . . . . . . . . . . . . . . . . , . . . . . General Compiler Description •••••••••••••••• Phase Objectives •••••••••••••••••• , ••••• Core Layout ••••••••••••••••••••••••••• FORTRAN Communications Area Phase Area •••••••••••••••••••••••••••• String Area •••••••••••••••••••••••••••• Symbol Table •••••••••••••••••••••••• " •• Statement String •••••••••••••••••••••• " •• Compilation Errors •••••••••••••••••••••••• " •• Compiler I/O ••••••••••••••••••••••••••• " •• Fetching Compiler Phases ••••••••••••••••• " •• Phase Descriptions •••••••••••••••••••••••• " •• Phase 1 •••••••••••••••••••••••••••• " •• Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 8 Phase 9 Phase 10 Phase 11 Phase 12 Phase 13 Phase 14 Phase 15 Phase 16 Phase 17 •••••••••••• '••••••••••••••••••• Phase 18 Phase 19 Phase 20 Phase 21 • • • • • • • • • • • • .. • • • • • • • • • • • • • • • • •• Phase 22 •••••••••••• " • • • • • • • • • • • • • • • • •• Phase 23 • • • • • • • • • • • • .. • • • • • • • • • • • • • • • • •• Phase 24 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Phase 25 ••••••••••••••••••••••••••••••• Phase 26 ••••••••••••••••••••••••••••••• Phase 27 SECTION 12. SYSTEM LIBRARY •••••••••••••••• Flowcharts • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Contents List •• • • • • • • • • • • • • • • • • • • • • • • • • • • •• Interrupt Level Subroutines • • • • • • • • • • • • • • • • • • • •• ILS02 • • • • • • • • . • • • • • • • • • • • • • • • • • • • • • • •• ILS04 • • • • • • • • • • • • • . • • • • • • • • • • • • • • • • • •• Mainline Programs. • • • • • • • • • • • • • • • • • • • • • • • • •• Disk Initialization Program (DISC) •••••••••••••• Print Cartridge ID (IDENT) ••••••••••••• • • • • •• Change Cartridge ID (ID) •••••••••••• • • • • • • •• Disk Copy (COPY) • • • • • • • • • • • • • • • • • • • • • • • •• Delete CIB (DLCIB) • • • • • • • • • • • • • • • • • • • • • • •• Dump SLET Table (DSLET) ••• : • • • • • • • • • • • • • •• iv 73 73 73 73 75 76 77 77 78 80 81 81 81 82 82 82 83 83 84 84 85 85 86 86 87 88 89 89 90 91 92 93 94 94 95 95 95 96 96 96 96 99 99 99 105 105 105 105 105 106 106 106 107 107 SEC TION 13. SYSTEM DEVICE SUBROUTINES • • • • • • • •• 109 WRTYZ ••••••••••••••••••••••••••••••• 146 PRNZ •••••••••••••••••••••••••••••••• 147 PRNTZ •••••••••••••••••••••••••••••••• 148 PAPTZ •••••••••••••••••••••••••••••••• 150 CARDO •••••••••••••••••••••••••••••••• 152 SECTION 14. STAND-ALONE UTILITIES. • • • • • • • • • • •• 111 Disk Cartridge Initialization Program (DCIP) • • • • • • • • • •• 111 Disk Initialization ••••••••••••••••••••••••• 111 Disk Dump •••••••••••••••••••••••••••••• 111 Disk Copy. • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 112 UCAR.T •••••••••••••••••••••••••••••••••• 112 PROGRAM ANALYSIS PROCEDURES •••••••••••••••• Introduction • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Program Analysis Procedures Summary ••••••••• '. • • • •• Identification of the Failing Component or Function • • • • •• Subroutine Error Number/Error Stop Lists ••••••••••••• Core Dump Procedure. • • • • • • • • • • • • • • • • • • • • • • • •• Core Block Diagrams. • • • • • • • • • • • • • • • • • • • • • • • •• Core Location Procedures ••••••••••••••••••••••• FAC • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Arithmetic and Function Subprogram Error Indicators. • •• LIBF TV • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• LIBF TV SOCAL Linkage ••••••••••••••••••••• CALL TV ••••••••••••••••••••••••••••••• Disk I/O Subroutine. • • • • • • • • • • • • • • • • • • • • • • •• DFT (DEFINE FILE Table) • • • • • • • • • • • • • • • • • • • •• Arrays ••••••••••••••••••••••••••••••••• Constants and Integers ••••••••••••••••••••••• COMMON ••••••••••••••••••••••••••••••• In-core Subroutines LOCAL/SOCAL Flipper (FLIPR) ••••••••••••••••• LOCAL Area ••••••••••••••••••••••••••••• SOCAL Area ••••••••••••••••••••••••••••• Generalized Subroutine Maintenance/Analysis Procedure ••• Trace Back Procedures •••••••••••••••••••••••• Subroutine Looping Capabilities. • • • • • • • • • • • • • • • • •• System Device Subroutines ••••• • • • • • • • • • • • • • •• Library Subroutines ••••••••••••••••••••••••• Subroutine Data Charts. • • • • • • • • • • • • • • • • • • • • • • •• System Device Subroutine for Keyboard/Console Printer •• • • • • • • • • • • • • • • • • • • • • • • • • • . • • • •• System Device Subroutine for 1442/1442 ••••••••••• System Device Subroutine for 2501/1442 ••••.•••••• System Device Subroutine for Console Printer •••••••• System Device Subroutine for 1132 • • • • • • • • • • • • • •• System Device Subroutine for 1403 • • • • • • • • • • • • • •• System Device Subroutine for 1134/1055 ••••••••••• System Device Subroutine for Disk - DISKZ ••••••••• CARDZ •••••••••••••••••••••••••••••••• PNCHZ •••••••••••••••••••••••••••••••• READZ TYPEZ CARDl READO READ 1 PNCHO PNCHl TYPEO PRNTl PRNT3 PAPTl PAP TN PLOTl OMPR1 WRTYO DISKl DISKN 113 113 113 113 115 115 115 115 115 118 118 119 119 119 119 119 119 119 119 120 120 120 120 120 120 120 120 125 •••••••••••••••••••••••••••••••• •••••••••••••••••••••••••••••••• •••••••••••••••••••••••••••••••• 154 156 157 158 160 162 164 166 168 170 172 174 176 177 180 FLOWCHARTS ••••••••••••••••••••••••••••• System Overview ••••••••••••••••••••••••••• System Loader ••••••••••••••••••••••••••••• Cold Start Programs ••••••••••••••••••••••••• Supervisor ••••••••••••••••••••••••••••••• Core Image Loader •••••••••••••••••••••••••• Core Load Builder • • • • • • • • • • • • • • • • • • • • • • • • • •• Disk Utility Program ••••••••••••••••••••••••• Assembler Program •••••••••••••••••••••••••• FORTRAN Compiler ••••••••••••••••••••••••. System Library • • • • • • • • • • • • • • • • • • • • • • • • • • • •. 185 185 186 191 193 203 205 207 220 244 274 APPENDIX A. EXAMPLES OF FORTRAN OBJECT CODING. 307 •••••••••••••••••••••••••••••••• APPENDIX B. LISTINGS....................... 323 DCOM •••••••••••••••••••••••••••••••••• 323 Resident Image •••••••••••••••••••••••••••• 324 Resident Monitor ••••••••••••••••••••••••••• 324 DISKZ •••••••••••••••••••••••••••••••••• 329 Equivalences •••••••••••••••••••••••••••••• 333 Cold Start Program .•••••••••••••••••••••••••• 334 Cross-Reference • • • • • • • • • • • • • • • • • • • • • • • • • • •• 335 125 126 128 130 132 134 136 138 140 142 144 145 v APPENDIX C. ABBREVIATIONS.................. 339 APPENDIX D. MICROFICHE REFERENCE TABLE. • • • • •• 345 INDEX •••••••••••••••••••••••••••••••••• 349 ILLUSTRA TIONS Figures 1. 2. 3. 4. Core Layout During System Loader Operation •••••• Core Layout During Cold Start •••••••••••••••• Core Layout During Supervisor Operation ••••••••• Core Layout on Supervisor Entry at $EXIT (DISKZ in Core)- •••••••••••••••••••••••••••••• 5. Core Layout on Supervisor Entry at $EXIT (DISKZ Not in Core) ••••••••••••••••••••••••••• Core Layout on Supervisor Entry at $DUMP ••••• Core Layout on Supervisor Entry at $LINK (Link in Disk System Format) •••.•••••••••••••••••• Core Layout on Supervisor Entry at $LINK (Link in Core Image Format) •••••••••••••••••••••• 6. 7. 8. 13 16 25 28 29 29 9. 10. 11. 12. 13. 14. Core Layout During Core Load Builder Operation ••• Layout of the Transfer Vector ••••••••••••••• SOCAL Linkage in the LIBF Transfer Vector •••••• CALL Transfer Vector for SOCALs •.••.••••••• Core Layout during Disk Utility Program Operation •• Core Layout During Assembler Program Operation' •••••••••••••••••••• 15. Core Layout During FORTRAN Compiler Operation ••••••••••••••••••••.••••••• FORTRAN Scan Example •••••••••••••••••• Core Layout During User Core Load Execution • • • • • • • • • • • • • • • . • • • • • • • • • • •• 16. 17. 30 31 34 38 39 39 43 72 76 93 119 Tables 1. 2. 3. The Contents of COMMA ••••••••••••••••••• The Contents of DCOM •••••••••••••••••••• The Contents of the FORTRAN Communications 77 4. Area •••••••••••••••••••••••••••••• The Contents of the FORTRAN Symbol Table ID Word •••••••••••••••••••••••••••••• 79 9. 113 4. 114 5. 4 6 5. 7. 6. 8. FOR TRAN Statement ID Word Type Codes • • • • • • • Conversion of FORTRAN FORMA T Specifications •••••..••••••••.•••••••••• FORTRAN Forcing Table •••.•••••••••••••• Error Number List. • • • • • • • • . • • • • • • • • • • • • •• Error Stop List .•••••••••••••••••••••••• 80 87 91 116 118 Generalized Subroutine Maintenance/Analysis Procedure •••••••••••••••••••••••••••• Trace Back Procedures •••.•••••••••••••••• 121 122 Flowdiagrams 1. 2. 3. General Procedure for Program Analysis • • • • • • • • •• Procedure for Identification of the Failing Component or Function ••••.••• Core Dump Procedure • • • • • • • . • • • • • • • 115 Flowcharts DMS01. SYL01. SYL02. SYL03. SYL04. SYL05. ...... . ................ . ................. ......... . ...... . ......... . ...... . Disk Monitor System, System Overview System Loader, General Flow •••••••••••••• System Loader, Phase 1 System Loader, Phase 2 System Loader, Phase 2 System Loader, Phase 2 185 186 187 188 189 190 CST01. CST02. SUP01. SUP02. SUP03. SUP04. vii .................... . .................. Cold Start Loader Cold Start Program Supervisor, Skeleton Supervisor Supervisor, Monitor Control Record Analyzer Supervisor, JOB Control Record Processor Supervisor, System Update Program ........... ... ...... 191 192 193 194 195 196 SUPOS. SUP06. SUP07. SUP08. SUP09. SUPlO. CIL01. CIL02. CLB01. CLB02. DUP01. DUP02. DUP03. DUP04. DUPOS. DUP06. DUP07. DUP08. DUP09. DUP10. DUP11. DUP12. DUP13. ASM01. ASM02. ASM03. ASM04. ASMOS. ASM06. ASM07. ASM08. ASM09. ASMlO. ASM11. ASM12. ASM13. ASM14. ASMlS. ASM16. ASM17. ASMI8. ASM19. ASM20. ASM21. ASM22. ASM23. ASM24. FOROI. FOR02. FOR03. FOR04. FOROS. FOR06. FOR07. FOR08. Supervisor, XEQ Control Record Analyzer •••••••• 197 Supervisor, Supervisor Control Record Analyzer •••• 198 Supervisor, Supervisor Control Record Analyzer •••• 199 Supervisor, Supervisor Control Record Analyzer •••• 200 Supervisor, System Core Dump Program ••••••.• 201 Supervisor, Auxiliary Supervisor ••••••••••••• 202 Core Image Loader, Phase 1 •.•••••••••••••• 203 Core Image Loader, Phase 2 ••••••••••.••••• 204 Core Load Builder, Initialization •••••••••••.• 20S Core Load Builder, Master Control •••••••••••• 206 Disk Utility Program, CCAT •••••••••••••••• 207 Disk Utility Program, DCTL •••••••••••••••• 208 Disk Utility Program, STORE •••••••••••••••• 209 Disk Utility Program, FlLEQ •••••••••••••••• 210 Disk Utility Program, FlLEQ •••••••••••••••• 211 Disk Utility Program, FILEQ •••••••••••••••• 212 Disk Utility Program, DDUMP •.••••••••••••• 213 Disk Utility Program, DDUMP •••••••••.••••• 214 Disk Utility Program, DUMPLET/DUMPFLET .•••• 215 Disk Utility Program, DELETE ••••••.•••.•••• 216 Disk Utility Program, DEFINE ••••••••••••••• 217 Disk Utility Program, DEXIT· •••••••.••••••• 218 Disk Utility Program, PRECI •••••••.•••••••• 219 Assembler Program, General Flow •••••••••••• 220 Assembler Program, Phase 0 •••••••••••••••• 221 Assembler Program, Phase 1 •••••••••••••••• 222 Assembler Program, Phase lA ••••••••••••••• 223 Assembler Program, Phase 2 •••••••••••••••• 224 Assembler Program, Phase 2A •••••.•••••.••• 225 Assembler Program, Phase 3 •••••••••••••.•• 226 Assembler Program, Phase 4 •••••••.•••••••• 227 Assembler Program, Phase 5 •••••••••••••••• 228 Assembler Program, Phase 6 •••••••••••••••• 229 Assembler Program, Phase 7 ••••••••••••••.• 230 Assembler Program, Phase 7A ••••.•••••••••• 231 Assembler Program, Phase 8 •••••••••••••••• 232 Assembler Program, Phase 8A ••••.••.••••••• 233 Assembler Program, Phase 9 •••••••••.•.•.•• 234 Assembler Program, Phase 9 ••.••••••••••••• 235 Assembler Program, Phase 9 •••••••••••••.•• 236 Assembler Program, Phase 10 ••••••.•.•••••• 237 Assembler Program, Phase lOA •••••••••••••• 238 Assembler Program, Phase 11 ••••••••••••••• 239 Assembler Program, Phase 12 ••••••••.•••••• 240 Assembler Program, Error Message Phase •.•••••• 241 Assembler Program, Read Conversion Phase •••••• 242 Assembler Program, Punch Conversion Phase •••••• 243 FORTRAN Compiler, General Flow ••••••••••• 244 FOR TRAN Compiler, Phase 1 •.••••••••••••• 245 FOR TRAN Compiler, Phase 2 ••••.•••.••••.• 246 FORTRAN Compiler, Phase 3 •••••••••••.••• 247 FOR TRAN Compiler, Phase 4 •.••.••••.••••• 248 FOR TRAN Compiler, Phase 4 ••••••••••••••• 249 FORTRAN Compiler, Phase 5 •••....•••.•••• 2S0 FOR TRAN Compiler, Phase 5 ••• '.' •..•..•••• 251 FOR09. FORlO. FORll. FOR12. FOR13. FOR14. FORI5. FOR16. FOR17. FOR18. FOR19. FOR20. FOR21. FOR22. FOR23. FOR24. FOR25. FOR26. FOR27. FOR28. FOR29. FOR30. UTL01. UTL02. UTL03. UTL04. UTL05. UTL06. UTL07. UTL08. UTL09. UTLlO. UTL11. UTL12. UTL13. SCA01. SCA02. SCA03. SCA04. SCA05. SCA06. SCA07. Fl001. FI002. FI003. Fl004. Fl005. Fl006. FI007. FI008. FI009. FIOI0. FIOll. FI012. Fl013. viii FOR TRAN Compiler, Phase 6 ••.••••.•.•••• 252 FORTRAN Compiler, Phase 7 •••••••••••••• 253 FOR TRAN Compiler, Phase 8 •••••••••••••• 254 FOR TRAN Compiler, Phase 9 ••••••.••••••• 255 FORTRAN Compiler, Phase 10 ••••••••••••• 256 FORTRAN Compiler, Phase 11 ••••••••••••• 257 FORTRAN Compiler, Phase 12 ••••••••••••• 2S8 FORTRAN Compiler, Phase 13 ••••••••••••• 259 FORTRAN Compiler, Phase 14 ••••••••••••• 260 FORTRAN Compiler, Phase 15 •••.••••••••• 261 FORTRAN Compiler, Phase 16 ••••••••••••• 262 FORTRAN Compiler, Phase 17 ••••••••••••• 263 FORTRAN Compiler, Phase 18 ••••••••••••• 264 FORTRAN Compiler, Phase 19 ••••••••••••• 265 FORTRAN Compiler, Phase 20 ••••••••••••• 266 FORTRAN Compiler, Phase 21 •.•••••••••••• 267 FORTRAN Compiler, Phase 22 •••••••••••••• 268 FORTRAN Compiler, Phase 23 •••••••••••••• 269 FORTRAN Compiler, Phase 24 •.•••••••••••• 270 FORTRAN Compiler, Phase 25 •••.•••••••••• 271 FORTRAN Compiler, Phase 26 •••••••.•••••• 272 FORTRAN Compiler, Phase 27 •••••••••••••• 273 System Library, ID ..••••••••••••••••••• 274 System Library, FSLEN/FSYSU ••.••••••••••• 275 System Library, ADRWS •...••••••••••••• 276 System Library, DISC •..•••••••••••••••• 277 System Library, RDREC •••••••••••••••••• 278 System Library, IDENT •••••••••••.•••••• 279 System Library, CALPR ••••.••••••••••••• 280 System Library, COpy ••••••.•••••••••••• 281 System Library, DLCIB .••••••••••••••.••• 282 System Library, DSLET •.••••••.••••••••• 283 System Library, MODIF •••.•••••••••••••• 284 System Library, MODIF ••••.••.•••••••••• 285 System Library, MODIF .••.•••..••••••••• 286 System Library, SCAT2 Call Processing •••••••• 287 Sys tem Library, SCA T2 Interrupt Processing ••••• 288 System Library, SCA T2 Interrupt Processing ••••• 289 System Library, SCA T3 Call Processing •••••••• 290 System Library, SCAT3 Interrupt Processing ••••• 291 System Library, SCAT3 Interrupt Processing ••••• 292 System Library, SCAT3 Interrupt Processing ••••• 293 System Library, FORTRAN Non-disk I/O ••••••• 294 System Library, FORTRAN Non-disk I/O ••••••• 295 System Library, FORTRAN Non-disk I/O ••••••• 296 System Library, CARDZ ••.•••••••••••••• 297 System Library, CARDZ ••••••••••••••••• 298 System Library, PRNTZ •••••••••••••••••• 299 System Library, PAPTZ ••.•••••••••• " •••• 300 System Library, READZ ••••••••••••••••• 301 System Library, WR TYZ ••••••••••••••••• 302 System Library, PRNZ •••••••• " •••••••••• 303 System Library, PNCHZ •••••••••••••••••• 304 System Library, TYPEZ ...••••••••••.•••• 305 Svstpm Ubrarv. HOLEZ .•••• 306 SECTION 1. The 1130 Disk Monitor System, Version 2, consists of the following components: Communication Areas This component consists of the in-core communication area (COMMA) and the disk-resident communication area (DCOM). Generally speaking, COMMA contains only those parameters required by the monitor system to fetch a program stored on disk in disk core image format (DCI). DCOM contains all the parameters required by the monitor system that are not found in COMMA. INTRODUCTION CALL LINK, and CALL EXIT statements, and various I/O traps. One of the three disk I/O subroutines is present in the Resident Monitor at all times. The disk I/O subroutine in the Resident Monitor is the only such subroutine in core storage at anyone time. Any of the three disk I/O subroutines can be used by the user. The DISKZ subroutine is used by the monitor system programs; DISKZ is initially loaded w hen a cold start is performed. Supervisor This component consists of the Cold Start Loader and the Cold Start Program. The Cold Start Loader is the bootstrap loader used in the IPL procedure to initiate the operation of the Cold Start Program. The Cold Start Program reads the monitor system, i. e., the Resident Monitor, into core- storage and transfers control to it. This component consists of the Monitor Control Record Analyzer (MCRA), the Supervisor Control Record Analyzer, the Auxiliary Supervisor, and the System Core Dump program. The MCRA is the program that reads and analyzes the monitor control records, initiating the actions indicated on those control records. The Supervisor Control Record Analyzer is the program that reads and analyzes the Supervisor control records, passing the information on these control records to the Core Load Builder. The AUXiliary Supervisor is the program called to perform specialized supervisory functions for the monitor system. The System Core Dump program is the program used to print all or selected portions of the contents of core storage on the principal print device. The dump can be dynamic (execution of the calling core load is resumed after the completion of the dump) or terminal (a CALL EXIT is executed after the completion of the dump). Resident Monitor Core Image Loader This component consists of three intermixed parts: (1) COMMA, (2) the Skeleton Supervisor, and (3) one of the three disk I/O subroutines -- DISKZ, DISK1, or DISKN. COMMA is defined above, under Communication Areas. The Skeleton Supervisor consists of the coreresident coding necessary to process CALL DUMP, This component consists of two parts, the first being an intermediate supervisor for the monitor system, the second being a loader for user and system programs in core image format. Phase 1 of the Core Image Loader is fetched into core storage as the result of an entry to the Skeleton Supervisor. Phase 1 is the program that determines the type of entry made and the program( s) System Loader This component provides the means for loading all, or reloading a part of, the monitor system onto disk. In other words, the System Loader generates the monitor system on disk. Cold Start Programs Section 1. Introduction 1 to be fetched as a result. Phase 2 of the Core Image Loader is the program that fetches into core storage and, if indicated, transfers control to the program( s) indicated by phase 1. Core - -Load - - -Builder This component is the program that converts a mainline program from disk system format (DSF) to a core load, a program in disk core image format (DCI); that is, the Core Load Builder relocates the mainline program and all the subroutines required and constructs the other necessary parts of the core load, e. g., the transfer vector, LOCALs, and SOCALs. Assembler Program This component is the program that translates the statements of a source program wri.tten in the IBM 1130 Assembler Language into a program i.n disk system format (DSF). FORTRAN Compiler This component is the program that translates the statements of a source program written in the IBM 1130 Basic FORTRAN IV Language into a program in disk system format (DSF). System Library Disk utility Program (DUP) This component provides the means for performing the following functions, largely through the use of control records only: 1. 2. 3. 4. 5. 6. 7. 2 Make available the contents of disk storage in punched or printed format -- DUMP, DUMPDATA. Print a map of the contents of the variable portions of disk storage _.. DUMPLET, DUMPFLET. Store information on the disk in disk system format (DSF) , disk data format (DDF), or disk core image format (DCI) -- STORE, STOREDATA, STOREDATACI, STORECI, STOREMOD. Remove information from the User/Fixed Area -DELETE. Alter the allocation of the Fixed Area on the disk or delete the Assembler Program and/or the FOR TRAN Compiler from the monitor system -DEFINE. Initialize the Working Storage area on disk -DWADR. Provide file protection for the contents of disk storage. This component consists of (1) a complete library of input/output (except disk I/O), data conversion, arithmetic, and function subroutines, (2) selective dump subroutines, and (3) special programs for disk maintenance. System Device Subroutines This component consists of a library of special subroutines, one for each device (except the disk) used by the monitor system programs. These subroutines and DISKZ are the only device subroutines used by the monitor system programs. Utilities This component consists of the following stand-alone, self-loading utility programs: 1. 2. 3. The 2501/1442 Card Loader The Disk Cartridge Initialization Program (DCIP) The Core-Dump-to- Printer Program In general the organization of and flow of control through the 1130 Disk Monitor System, Version 2, is shown in Flowchart DMSOl. SE CTION 2. THE IN-CORE COMMUNICATIONS AREA (COMMA) COMMA includes, for the most part, only those system parameters that are required to link from one core load to another that is stored on disk in disk core image format (DCI). The exceptions are those parameters that would create awkward communication between monitor system programs if they resided in DCOM. COMMA is not a single block of locations in the Resident Monitor; the system parameters that constitute COMMA are intermixed with the various parts of the Skeleton Supervisor. Table 1 is a description of COMMA by parameter. The entries are arranged in alphabetic sequence for easy reference. See the listing of the Resident Monitor in Appendix B. Listings for the absolute addresses associated with the parameters in this table. THE DISK-RESIDENT COMMUNICATIONS AREA (DCOM) DCOM contains those parameters that must be passed from one monitor system program to another but are not found in COMMA. Table 2 is a description of DCOM by parameter. The entries are arranged in alphabetic sequence for easy reference. See the listing of DCOM in Appendix B. Listings for the relative addresses associated with the parameters in this table. COMMUNICATIONS AREAS DRIVE- AND CARTRIDGE-DEPENDENT PARAMETERS Whenever a parameter that is associated with a disk cartridge is required for system use during a job, a table of five such parameters (a quintuple), one for each of the five possible drives, is reserved in COMMA or DCOM. The first of the five parameters is assigned a label. Such a parameter is said to be a drive- or cartridge-dependent parameter, whichever term is applicable. The position in the quintuple indicates the logical drive number of the drive on which the associated cartridge is mounted. Thus, the first parameter in a quintuple is associated with logical drive zero, the second with logical drive one, etc. The assignment of logical drive numbers is done during JOB processing; t hat is, t he logical drive numbers are assigned in the sequence specified on the JOB monitor control record. Thus, the first cartridge specified is assigned to logical drive zero, the second to logical drive one, etc. If no cartridges at all are specifip.d, then the current logical drive zero is defined as logical drive zero for the job being defined. The drive- and cartridge-dependent parameters for all unspecified cartridges are cleared to zero, except for logical drive zero as noted above. JOB processing includes the reading of DCOM and the ID sector from each specified cartridge and the setting up of the drive- and cartridge-dependent qUintuples in DCOM on the master cartridge. Initialization of the qUintuples is done during cold start processing, which defines logical drive zero (and all associated drive- and cartridge-dependent parameters for logical drive zero) as the physical drive selected in the Console Entry switches (see Section 4. Cold Start Programs). All other values in the drive- and cartridge-dependent quintuples are cleared to zero. Section 2. Communications Areas 3 Table 1. The Contents of COMMA DESCRIPTION LABEL ~.----.--~~--------------------------------------~ $ACDE contains the device code for the physical disk $ACDE drive assigned as logical disk drive O. $ACDE+ 1 through through $ACDE+4 contain the device codes for logical disk drives $ACDE+4 1,2, 3, and 4, respectively. The device code is contained in bits 11-15. $ACEX and $ACEX+I $ACEX and $ACEX+I are the locations in which the contents of the accumulator and extension, respectively, are saved by the Supervisor when entered at the $DUMP entry point. $CCAD $CCAD contains the address of the lowest-addressed word of COMMO N to be saved on the Core Image Buffer (CIB) by the Core Image loader. $CHI2 $CH 12 contains the address of $CPTR, $1132, or $1403 depending upon the device defined as the principal print device--the Console Printer, 1132 Printer, or 1403 Printer, respectively. $CIBA $CIBA contains the sector address of the first sector of the Core Image Buffer (CIB) In use by the monitor system programs during the current job. The logical disk drive number is contained in bits 0-3. $CIBA-I $CIBA-I contains 4095 minus the location of $CIBA. This value is used as the word count (tn conjunction with $CrBA, which contains the sector address of the CIB) in saving the first 4K of core storage following an entry at $DUMP. $CILA $C I LA contains the address of the end of the disk I/O subroutine currently In core storage, minus 4. $CILA always points to the word count (followed by the sector address) of phase I of the Core Image loader. $ClSW Meaning Positive load the indicated disk I/O subroutine load the indicated core load and Its required disk I/O subroutine. Zero indicates that the core load has just been built by the Core load Builder; negative Indicates that the core load is stored in the User or Fixed Area in core Image format. Zero or Negative $COMN $COMN contains the number of words of COMMON defined for the core load currently in execution. SCORE SCORE contains a code indicating the number of words of core storage within which the monitor system programs are to operate. The codes are as follows: Code Size of Core Storage /1000 /2000 /4000 4096 words 8192 words 16384 words 32768 words /8000 $CPTR $CPTR is a dummy channel 12 indicator for the Console Printer. $CTSW $CTSW is a switch indicating that a monitor control record has been detected by a monitor system program other than the Supervisor. The switch settings are as follows: Meaning Positive Zero 4 $CWCT $CWCT contains the number of words of COMMON to be saved on the Core Image Buffer (CIB) by the Core Image loader. $CWCT+I $CWCT+I contains the sector address of the first sector of the Core Image Buffer (CIB) to be used for the saving of COMMON by the Core Image loader. The logical disk drive number Is contained in bits 0-3. $CXRI $CXR I is the location In which the content:; of index register I are saved by the Skeleton Supervisor. $CYlN through $CYlN+4 $CYlN contains the sector address of secto!' 0 on the cylinder over which the access arm on logi(:al disk drive 0 is currently positioned. $CYlNt 1 j'hrough $CYlN+4 contain analogous sector addressE's for logical disk drives I, 2, 3, and 4, respective I)'. $DABl $DABl contains the second word of the 10CC used to reset the Synchronous Communications Adapter. $DABl is, therefore, aligned on an odd wo"d boundary. $DABl contains /5540, the bit configuratie'n of an Initiate Write with modifier bit 9 on. $DADR $DADR contains the disk block address of the first sector of the program or core load to be fet,:hed into core storage and executed. $DBSY $DBSY is a switch indicating whether or no" a disk I/O operation is in progress. The switch settings are as follows: Meaning zero non-zero SClSW is a switch Indicating to phase 2 of the Core Image loader the function It is to perform. The switch settings are as follows: Setting Monitor control record detected Monitor control record not detected DESCRIPTION LABEL Disk I/o not in progress Disk I/o in progress $DBSY is simu Itaneously used as a retry counter by DISKZ and DISK 1. $DCDE $DCDE contains the number of the logical cllsk drive on which the program to be fetched by the Core Image loader is to be found. The drive number is contained in bits 0-3. $DCYl through $DCYl+14 $DCYl through $DCYl+2 contain the defective cylinder addresses (the contents of words I, 2, and 3 of sector 0, cylinder 0) for the cartridge mounted on logical disk drive O. $DCYl+3 through $DCYl+14 contain ana logol's addresses for the cartridgl~s on logical di·sk drives I, 2, 3, and 4, respectively. SDDSW $DDSW contains the device status word (DSW) sensed during the last disk I/O operation performed. $DMPF $DMPF contains the contents of the word following the branch to the $DUMP entry point, i.e., the dump format code. $DREQ $DREQ is a switch indicating the disk I/O subroutine that has been requested. The switch settings are as follows: $DZIN Setting Meaning positive zero negative DISKN DISKI DISKZ $DZIN is a switch indicating the disk I/O l,ubroutine presently in core storage. The swi tch settings are as follows: Meaning negative zero positive DISKZ is in core DI SK I Is In core DISKN is in core Table 1. The Contents of COMMA (Continued) LABEL $FPAD through $FPAD+4 DESCRIPTION $FPAD contains the sector address of the first sector of Working Storage on the cartridge mounted on logical disk drive O. The logical disk drive number is contained in bits 0-3. $FPAD+l through $FPAD+4 contain ana logous sector addresses for the cartridges on logi ca I disk drives I, 2, 3, and 4, respectively. $FPAD through $FPAD+4 are effectively the fileprotection addresses for the cartridges in use. These addresses are adjusted in non-temporary mode only. LABEL $LSAD $LSAD contains the absolute sector address of the first sector of the first LOCAL (or SOCAL if there are no LOCAls) for the core load currently in core. The logica I disk drive number is contained in bits 0-3. $NDUP $NDUP is a switch indicating whether or not DUP operations may be performed. The switch settings are as follows: Meaning $HASH through $HASH + 11 $HASH through $HASH + 11 are a work area used variously by the monitor system programs. $IBSY $IBSY is a switch indicating whether or not an I/O operation involving the principoll/O device is in progress. The switch settings are as follows: zero non-zero zero non-zero $NEND is equivalent to the address of tha end of DISKN plus 1. $NXEQ $NXEQ is a switch indicating ,."hether or not execution of a user core load may be performed. The switch settings are as follows: $IBT4 $IOCT $IREQ $KCSW Principal I/O device not busy Principal I/O device busy $IBT2 contains the address of the interrupt branch table (lBT) for interrupt level 2. Since the disk is the only device on interrupt level 2, $IBT2 contains the address of the interrupt entry point in the disk I/o subroutine currently in core storage. Meaning zero non-zero $PAUS $IREQ contains the address of the subroutine servicing the INTERRUPT REQUEST key on the Keyboard (interrupt level 4). This address is supplied by the user core load using the INTERRUPT REQUEST key. Unless an address is supplied $IREQ contains the address of the $DUMP entry point. $ KCSW is a switch indicating whether or not (I) the Keyboard has been defined as the principal input device and/or (2) the Console Printer has been defined as the principal print device. The switch settings are as follows: Settings Meaning negative zero positive Either the Console Printer is the princi-pal print device or the Keyboard is the principal input device, but not both Neither is the Console Printer the principal print device nor is the Keyboard the principal input device The Console Printer is the principal print device and the Keyboard is the principal input device Meaning zero non-zero $PGCT Meaning $PGCT contains the number, in binary, of the page of the job listing currently being printed. $PHSE $PHSE contains the SLET ID number (in bits 8-15) of the phase of the monitor system program currently in control, excepting the Cold Start Program and the Skeleton Supervisor. $PHSE always contains zero when a user core load is in mntrol. Bits 0-7 of $PHSE sometimes contain a subphase I D number. $RMSW $RMSW is a switch indicating the entry point at which the Skeleton Supervisor was entered and, hence, the type of CALL causing the Skeleton Supervisor to be entered. The switch settings are as follows: Meaning positive zero negative $RWCZ $LKNM and $LKNM+ 1 $LKNM and $LKNM+l contaIn the name, in name code, of the program or core load to be executed next. $LKNM is aligned on an even word boundary. Entry at $DUMP Entry at $LI NK Entry at $EXIT $RWCZ is a switch indicating the type of operation last performed by the CARDZ subroutine. The switch settings are as follows: Meaning Meaning Last card has not been read Last card has been read Principal print device not busy Principal print device busy $PGCT $LAST is a switch indicating whether or not the last card has been read by the system devi ce subroutine servicing the card input device. The switch settings are as follows: zero non-zero Exit from the PAUS subroutine Branch back to the WAIT in the PAUS subroutine $PBSY is a switch indicating whether or not an I/o operation involving the principal print device is in progress. The switch settings are as follows: zero non-zero Depending on the setting on $KCSW, the system device subroutine for the Keyboard/Console Printer either permits or inhibits the overlapping of input and output. $LAST Permit core load execution Inhibit core load execution $PAUS is a switch set by every ISS that does not set $IOCT when initiating an I/o operation, e.g., SCAT!. The switch settings are as follows: $IBT4 contains the address of the interrupt branch table (lBT) for interrupt level 4 used by the program currently in control. $IOCT is the 10CS counter for I/o operations. $IOCT is incremented by 1 for each I/O operation initiated. $IOCT is decremented by 1 for each I/O operation comp leted or terminated. $IOCT equa Is zero when a II I/O operations have been completed. Permit DUP operations Inhibit DUP operations $NEND Meaning $IBT2 DESCRIPTION zero non-zero $SCAN through $SCAN+7 Lost operation a Read Last operation a Punch $SCAN through $SCAN+7 are an area used by the 1132 Printer when printing a line. This area is also used as a work area by the monitor system programs. Section 2. Communications Areas 5 Table 1. The Contents of COMMA (Concluded) r----.-------r-----------------------------------------__ Table 2. The Contents of DCOM ~ LABEL DESCRIPTION ~----.--;-----------------------------------------~ $SNLT $SNLT is the location used for sense light simulation by FORTRAN programs. The bits are used as follows: Bit Sense Light 14 13 12 11 1 2 3 4 $SYSC $SYSC contains the version and modification level numbers identifying the 1130 Disk Monitor System. Bits 0-7 contain the version number; bits 8-15 contain the modification level number. $UFDR $UFDR contains the number of the logical disk drive on which the unformatted I/o area in use by the monitor system programs during the current job is to be found. The drive number is contained in bits 0-3. $UFIO $UFIO contains the displacement, in sectors, from the start of the unformatted I/o area to the sector at which the writing or reading of the next logical record to or from the unformatted I/O area is to begin. $ULET through $ULET+4 $ULET contains the sector address of the first sector of LET on the cartridge mounted on logical disk drive O. The logical disk drive number is contained in bits 0-3. $ULET+l through $ULET+4 contain analogous sector addresses for the cartridges on logical disk drives 1, 2, 3, and 4, respectively. $WRDI $WRD I contains the address at which the first word of the core image header of the core load to be;being executed will/does reside. $WSDR $WSDR contains the number of the logical disk drive on which the Working Storage in use by the monitor system programs during the current job is to be found. The drive number is contained in bits 0-3. #ANDU through #ANDU+4 #ANDU contains the displacement, in disk blocks, from word 0, sector 0, cylinder 0 on the cartridge mounted on logical disk drive 0 to the last disk block of the User Area on that cartridge, plus I disk block. # ANDU+I through # ANDU+4 contain analonous displacements for the cartridges on logical disk. drives I, 2,3, and 4, resRectively. # ANDU through # ANDU+4 are effectively the adjusted addresses of the ends of the User Arecls on the cartridges in use. These ~ddresses are adiusted instead of #BNDU through ~BNDU+4 during temporary mode, in parallel with #BNDU through #BNDU+4 during non-temporary mode. #BNDU through #BNDU+4 #BNDU contains the displacement, in disk blocks, from word 0, sector 0, cylinder 0 on the cartridge mounted on logical disk drive 0 to the last disk block of the User Area on that cartridge, plus I disk block. #BNDU+I through #BNDU+4 contain analogous displacements for the cartridges on Ic'gical disk drives I, 2, 3, and 4, respectively. #BNDU through #BNDU+4 are effectively the base addresses of the ends of the User Areas on the cartridges in use. These addresses are adjusted only during non-temporary mode, in parallel with #ANDU through # ANDU+4. #CBSW #CBSW is a switch indicating to the Core LClad Builder the type of exit to be made. The switch settings are as follows: Setting Meaning zero Return to Core Image Loader Return to DUP non~zero #CIAD #CIAD contains the relative location in sector @IDAD (within DISKZ) where the address of the Core Image Loader is to be found. #CIBA through #CIBA+4 #CIBA contains the sector address of the Core Image Buffer (CIB) on the cartridge mounted on lonical disk drive O. The logical disk drive number is c::mtained in bits 0-3. #CIBA+I through #CIBA+4 contain analogous sector addresses for the cartridges on logical disk drives 1, 2, 3, and 4, respectively. #CIDN through #CIDN+4 #CIDN contains the 10 (the contents of wod 4, sector 0, cylinder 0) of the cartridge mount,ed on logical disk drive O. #CIDN+I through #CIDN+4 contain the IDs of the cartridges on logical disk drives I, 2, 3, and 4, respectively. #CSHN through #CSHN+4 #CSHN contains the number of sectors available for expansion of the monitor system programs Of, the system cartridge mounted on logical disk drive O. IfCSHN+l through #CSHN+4 contain analos'ous numbers for any system cartridges mounted on Icgical disk drives I, 2, 3, and 4, respectively. Meaning #DBCT Channel 12 not detected or a skip to channe I I execu ted Channel 12 detected #DBCT contains the number of disk blocks occupied by the program, core load, or data file named on a DUP control record. #DCSW #DCSW is a switch indicatihg to the ADRW~; program the type of exit to be made. The switch seltings are as follows: $ZEND $ZEND is equivalent to the address of the end of DISKZ plus I. $IEND $ lEND is equivalent to the address of the end of DISK I plus 1. $1132 $ 1132 is a switch indicating whether or not channel 12 hos been detected on the 1132 Printer. The switch settings are as follows: Meaning zero non-zero $1403 DESCRIPTION LABEL Channel 12 not detected or a skip to channell executed Channe I 12 detected $ 1403 is a switch indicating whether or not channel 12 has been detected on the 1403 Printer. The switch settings are as follows: zero non-zero Setting Meaning zero Branch to $EXIT in Skeleton Supervisor Return to DUP non-zero #ENTY 6 #ENTY contains the address of entry point 1 in the program placed into system Working Storage· by the Assembler or FORTRAN Compiler. This adclress is the address to be placed into word 12 of the· DSF program header by DUP or the address from whi ch word I of the core image header is generated by the Core Load Bui Ider. Table 2. The Contents of DCOM (Continued) DESCRIPTION LABEL #FCNT #FCNT contains the number of files defined for the core load being built or the execution to be initated. #FHOL #FHOL contains the displacement, in disk blocks, from word 0, sector 0, cylinder 0 to the first disk block of the largest unused (1 DUMY) area in the Fixed Area on the cartridge to which a STORE operation is to be made. #FLET through #FLET+4 #F LET contains the sector address of the fi rst sector of FLET on the cartridge mounted on logical disk drive O. The logical disk drive number Is contained in bits 0-3. #FLET+1 through #FLET+4 contain analogous sector addresses for the cartridges on logical disk drives 1, 2, 3, and 4, respectively. #FMAT through #FMAT+4 #FMAT is a switch Indicating the format of the contents, if any, of Working Storage on the cartridge mounted on logical disk drive O. #FMAT+1 through #FMA T+4 are analogous switches for Working Storage on logica I disk drives 1, 2, 3 and 4, respective Iy • The switch settings are as follows: #MPSW #FPAD through #FPAD+4 #FRDR disk core image format (DCI) disk system format (DSF) disk data format (DDF) #FPAD contains the sector address of the first sector of Working Storage on the cartridge mounted on logical disk drive O. The logical disk drive number is contained in bits 0-3. #FPAD+1 through #FPAD+4 contain analogous sector addresses for the cartridges on logical disk drives 1, 2, 3, and 4, respectively. #FPAD through #FPAD+4 are effectively the fileprotection addresses for the cartridges in use. These addresses are adjusted in non-temporary mode only. zero non-zero #NAME and #NAME+1 #FSZE contains the number of disk blocks contained in the largest unused (lDUMY) area In the Fixed Area on the cartridge to which a STORE operation is to be made. #JBSW # JBSW is a swi tch indicating the mode of operation established by the.last JOB monitor control record. The swi tch settings are as follows: Do not print a core map Print a core map #NAME and #NAME+1 contain the name, in name code, of the program, core load, or data file currently being processed by the Supervisor, DUP, Core Load Builder, or Core Image Loader. The name is obtained from a control record or from a LET/F LET search. #NAME is aligned on an even word boundary. #NCNT contains the number of NOCALs specified for the execution to be initiated or the core load being built. #PCID through #PCID+4 # PC I D conta i ns the I D (the contents of word 4, sec tor 0, cylinder 0) of the cartridge mounted on physical disk drive 0, if that drive is "ready". #PCID+1 through #PCID+4 contain the IDs of the cartridges on physical disk drives 1, 2, 3, and 4, respectively, if the corresponding drives are "ready". The entries for "not ready" drives contain zeroes. #PIOD #PIOD is a switch indicating the device defined as the principoll/O device for the system. The switch settings are as follows: Principal I/O Device positive zero negatiye #pPTR #FRDR contains the number of the logical disk drive on which the cartridge specified by the "FROM" cartridge ID (in columns 31-34 of the DUP confrol record) is mounted. The drive number is contai"ned in bits 12-15. A negative number indicates that no ID was specified. #FSZE #MPSW Is a switch indicating to the Core Load Builder whether or not a core map is to be printed for each core load bui It during the current execution. The switch settings are as follows: Meaning Meaning negative zero positive DESCRIPTION LABEL 2501 with 1442, any model 1442, Model 6 or 7 1134 with 1055 #pPTR is a switch indicating the device defined as the principal print device for the system. The switch settings are as follows: Setting Principal Print Device positive zero negative 1403 Printer 1132 Printer Console Printer #RP67 is a switch indicating the type of card I/o device present on the system. The switch settings are as follows: Card I/O Device Meaning zero non-zero temporary mode non-temporary mode. zero positive #SCRA through #SCRA+4 #SCRA contains the sector address of the first sector of the Supervisor Control Record Area (SCRA) on the cartridge mounted on logical disk drive O. The logical disk drive number is contained in bits 0-3. #SCRA+ 1 through #-SCRA+4 contain analogous sector addresses for any system cartridges on logi cal disk drives 1, 2, 3, and 4, respectively. #SYSC #SYSC, on a system cartridge, contains the version and modification level numbers for the currently resident 1130 Disk Monitor System. Bits 0-7 contain the version number; bits 8-15 contain the modification level number. #SYSC on a non-system cartridge contains zeroes. #TODR #TODR contains the number of the logical disk drive on which the cartridge specified by the "TO" cartridge ID (in columns 36-40 of the DUP control record) is mounted. The drive number is contained in bits 12-15. A negative number indicates that no I D was specified. #LCNT contains the number of LOCAls specified for the execution to be initiated or the core load being built. #MDF1 contains, in bits 8-15, the number of DUP control records to be processed by DUP when called by the MODIF program. #MDF 1 also contains, in bits 0-7, the number of errors detected by DUP during the processing of the DUP control records for the MODIF program. #MDF2 is a switch indicating to DUP that control must be returned to the MODIF program. The switch setting are as follows: 2501 with 1442, Model 5 1442, Model 6 or 7 Meaning zero non-zero Do not return to MODIF Return to MODIF Section 2. Communications Areas 7 Table 2. The Contents of DCOM (Concluded) r - -..--------,--------------------------------------~ LABEL DESCRIPTION ~.--------+---------------------------------------__4 #UHOL #UHOL contains the displacement, in disk blocks, from word 0, sector 0, cylinder 0 to the first disk block of the largest unused (IDUMY) area in the User Area on the cartridge to which a STORE operation is to be made. HULET through #ULET+4 #ULET contains the sector address of the first sector of LET on the cartridge mounted on logical disk drive O. The logicaLdisk drive number is contained in bits 0-3. HULET+I through #ULET+4 contain analagous sector addresses for the cartridges on logical disk drives I, 2, 3, and 4, respectively. #USZE contains the number of disk blocks contained in the largest unused (IDUMY) area in the User Area on the cartridge to which a STORE operation is to be made. #wscr through #WSCT+4 8 #WSCT contains the number of disk blocks occupied by a program, core load, or dota fi Ie placed into Working Stora~e on the cartridge mounted on logical disk drive O. WSCT+I through #WSCT+4 contain analogous disk block counts for the contents of Working Storage on logical disk drives I, 2, 3, and 4, respectively. SECTION 3. FLOWCHARTS General: SYLOI Phase 1: SYL02 piS 0 p12'1- Phase 2: SYL03 - SYL05 Pr l8'g -l "L 0 PHASE 1 SYSTEM LOADER Phase 1 processes the PHID control record, checks it for errors, and saves the data obtained from it for use by phase 2. The version and modification level number is taken from the PHID control record and saved. Phase 1 fetches phase 2 from disk into core storage and transfers control to it at MAING. BUFFERS AND I/o AREAS FUNCTIONS Card Input Phase 1 determines which card I/O subroutine is to be used, i. e., 2501 or 1442. If 2501, a naturally relocatable 2501 subroutine overlays the 1442 subroutine that is part of this phase. Phase 1 also reads the Console Entry switches to get the physical drive number (0-4) for the cartridge to be loaded. It sets up the PROGRAM STOP key interrupt trapo The Keyboard I NTERRUPT REQUEST key is made non-eff ective until the monitor system programs have been loaded o Phase 1 reads the Resident Monitor and DISKZ object decks into core storage and initializes them preparatory to loading phase 2 of the System Loader to disk. Phase 1 picks up defective track data from sector @IDAD on the cartridge to be used to initialize the disk I/O subroutine. Phase 1 loads phase 2 to cylinders 198 and 199 (sectors /0630 through /063 F) on disk. (These sector addresses are absolute; they are assembled as part of the phase 2 deck.) If an initial load is being performed, subphase 1 is loaded to sector /0634, overlaying a part of the reload processing subroutine. SUbphases 2 and 3 are loaded to sectors /063B and /063C. If an initial load is being performed, phase 1 stores the Resident Image on sector @RIAD. (DISKZ is stored on disk by phase 2.) Phase 1 processes the System Configuration records, saving the data obtained in the phase 1 communications area for use by phase 2. At the end of the Configuration records processing, the accumulated data is checked for errors and consolidated for phase 2. If a CORE control record is present, its contents are processed and replace the calculated core size. A: an 80-word buffer that contains card images in left-justified 12 bit/word format, as read by the 1442 or 2501 card I/O subroutine. B: a 60-word buffer that contains the 12-bit/word data from buffer A after it has been compressed to 16 bits/word. er for PTTC/8 records. used for the Delete character test 1" BI~B: a 108-word bu er for binary paper tape ~lcords, 108 frames, Ie -justified. Disk Input and Output BUFF1: a 320-word buffer used in all disk I/O operations. COMMUNICA TION FROM PHASE 1 TO PHASE 2 The card I/O subroutine (2501 or 1442) that was selected by phase 1 for use during System Loader operation is written onto sector /0638 to be used by phase 2 also. Section 3. System Loader 9 Information acquired by phase 1 is accumulated in the area in core storage bounded by EDIT and EDIT+/0140. This 320-word area, which also contains a number of error messages, is written to sector /0632 before phase 2 is entered. PHASE 2 FUNCTIONS, INITIAL LOAD AND RELOAD Phase 2 checks the phase ill number sequence for ascending order during initial loads only. Phase 2 performs a checksum test on all type A (data) records. Phase 2 builds the Reload Table in core storage as the monitor system program phases are loaded. Each 3-word entry in the table consists of the ID number of a phase requesting SLET data, the relative location within the requesting phase where the SLET data is to be stored, and the number of SLET items to be supplied by the System Loader. On an initial load, this Reload Table is written to disk in sector @RTBL. If so indicated by the Load Mode control record, phase :~ bypasses the FORTRAN Compiler and/or the Assembler Program. Phase 2 updates the version and modification level numbers in the parameter :ffSYSC in sector @DCOM of the eartridge. These numbers are taken directly from the PHID control record. No comparison with previous version and modification level numbers is made. Phase 2 determines from the data obtained from the System Configuration records which devices are the principal I/O and principal print devices. Phase 2 builds five special sets of SLET entries for the specified devices as well as for the principal I/O and print device convers ion subroutines. Phase 2 steps through the Reload Table and searches out every phase requesting SLE T data. It then searches out the SLE T data that is requested, places it in the requesting phase, and writes that phase back to disk. This continues until the end of the Reload Table (/FFFF) is reached. Phase 2 substitutes zeros for the SLET data requested by a phase if that phase requested a FORTHAN Compiler and/or Assembler Program SLET entry and the FORTRAN Compiler and/or the Assembler Program were bypassed or never loaded. Phase 2 displays appropriate error messages, as necessary, using the WRTYO subroutine in core storag~~. 10 FUNCTIONS, INITIAL LOAD ONLY Phase 2 clears to zero the sectors that will become the SLET table. The SLET entries are filled in as each monitor system program is stored. Phase 2 checks for missing phases. All phases specified in the PHID control record must be present, except when the FORTRAN Compiler and/or the Assembler Program are bypassed. Phase 2 keeps a record of the highest s,ector loaded so that the sector addresses for the Supervisor Control Record Area (SCRA), Core Image Buffer (CIB), Location Equivalence Table (LET), and User Area (UA) on disk may be correctly established. Phase 2 checks the data obtained from the Load Mode control record and, if the FORTRAN Compiler and/or the Assembler Program are to be bypassed, a gap is forced in SLET and filled with zeros. These zero entries in SLET occupy as much space as the bypassed program(s) would ordinarily require. FUNCTIONS, RELOAD ONLY Phase 2 verifies that the file-protection address is not greater than /062F. (Otherwise, phas,e 2 cannot be temporarily stored on disk. ) Phase 2 updates the SLET entries for each phase as that phase is reloaded. Phase 2 provides for expansion of the system into the Cushion Area when required. If a phase grows by more than one sector, it is expanded accordingly. All subsequent SLET entries are updated each time an expansion occurs. A check is made to see that the Supervisor Control Record Area (SCRA) is not overlaid. Phase 2 constructs an in-core Reload Table. At the end of the monitor system program reload, the data that was accumulated as one or more phases were reloaded is first compared with the existing Reload Table on disk. Entries are replacEld or added to the Reload Table as necessary. Then the updated Reload Table is processed as described above. BUFFERS AND I/O AREAS Card Input A: an 80-word buffer that contains card images in left-justified 12 bit/word format, as read by the 1442 or 2501 card I/O subroutine. A2: an 80-word buffer used in conjunction with buffer A for double buffering capability. This buffer is used only by the 2501 card I/O subroutine. B: a 60-word buffer into which 12 bits/word data is compressed from buffer A ,when a 1442 is used as the input device, or from buffers A and A2 when a 2501 is used. Most of the functions of this subphase involve the checking of the ID number of each phase as it is encountered. An error message (error 12, 14, or 15) is displayed whenever a phase ID is encountered that is out of sequence or was not specified on the PHID control record. Subphase 2 Paper Tape Input B: a 60-word buffer into which binary data from buffer BIGCB is compressed. C: a 1-word buffer used for the Delete character test when reading binary paper tape records. BIGCB: a 108-word buffer for binary paper tape records, 108 frames, left-justified. Disk Input and Output BUFF1: a 320-word buffer used in disk I/O operations. FSLET: a 320-word buffer used for reading or writing a SLET sector. During a reload operation that requires expansion into the Cushion Area of the cartridge, a sector of SLET from FSLET is saved by writing it on the first sector of the CIB. The CIB is not cleared afterward. RTBFR: a buffer that is used to gather the data that will become the Reload Table. Its length is variable, up to 320 words. The word count (never over /0140) may be found in location RTBFR. SUbphase 2 contains the procedures for system initialization prior to the loading of the System Library. After the type 81 (end-of-system) record has been read, phase 2 fetches this subphase and overlays the area in core storage bounded by /0682 through /07Cl. Subphase 2 modifies the coding for the processing of those types of records that are no longer expected, so that if one of these records is encountered, an error message is printed. Subphase 2 looks up DISKZ in SLET and saves the word count and sector address so that DISKZ may be fetched during processing in subphase 3. Subphase 2 reads DCOM into the buffer FSLET. During an initial load DCOM is cleared to zeros, after which the following entries are initialized: Location #SYSC version and modification level from PHID control record #RP67 a positive value if a 1442, Model 6 or 7 is present #PIOD the value indicating the principal I/O device, as determined from REQ control records #PPTR the value indicating the principal print device, as determined from REQ control records #CIAD relative location in sector @IDAD where CIL word count and sector address is maintained #ANDU file-protection disk block address #BNDU file-protection disk block address #FPAD file-protection or Working Storage address SUBPHASES Subphase 1 Subphase 1 contains the subroutines that are used only during an initial load. If an initial load is being performed, subphase 1 overlays a portion of phase 2 that contains only reload subroutines. Phase 1 determines from the Load Mode control record the type of load being performed, and either overlays the described area or bypasses the subphase 1 portion of the phase 2 deck. Value Inserted Section 3. System Loader 11 #CIDN cartridge ID from word 4 of sector @IDAD #CIBA sector address of CIB #SCRA sector address of Supervisor Control Record Area #ULET sector address of LE T #CSHN number of unused sectors between last system program and Supervisor Control Record Area. During a reload operation, only the following are updated: #SYSC, #RP67, #PIOD, #PPTR, #CIAD, and #CSHN, as described above. Subphase 2 reads the Resident Image from disk into the buffer FSLET During an initial load the Resident Image is initialized as follows: 0 Location Value Inserted During a reload operation, only the following are updated: $CH12, $CORE, $IREQ, $ClLA, and $IBT2, as described above. The first sector of LET is established and initialized with a 1DUMY entry, Working Storage disk block address, User Area sector address, and the number of unused words in the first sector of LET. All other words in LET are set to zero until the System Library is loaded. Subphase 2, on an initial load, goes to the Reload Table processing subroutine, and upon return, fetches and transfers control to subphase 3. Subphase 3 Subphase 3 clears the sign bits from all se ctor addresses in SLET and resets them according to the data obtained from the System Configuration records. (The sign bits are used to indicate which, if any, I/O devices are not present on the system.) Subphase 3, on a reload operation, compares all entries in the Reload Table built in core storage with the Reload Table on disk. Phase ID numbers in the Reload Table on disk that match phase ill numbers in the Reload Table in core storage are replaeed by those from the table in core storage. Any additional phase ID numbers from the table in core storage that are not present in the table on disk are added to the table on disk. At the conclusion of this update of the Reload Table on disk, it is completely reprocessed by the W200 subroutine in phase 2. Subphase 3 places the word count and sector address of the Core Image Loader, obtained from SLET, into DISKZ in core storage and into DISKZ on cylinder o. If a reload operation is being performed, subphase 3 displays "END RELOAD" and halts. On an initial load, subphase 3 branches to the Auxiliary Supervisor with a parameter of minus 5, caus.ing a dummy DUP monitor control record to be placed in the Supervisor buffer and the Monitor Control Record Analyzer to be called via the $EXIT entry point in the Skeleton Supervisor. The Monitor Control Record Analyzer then calls DUP to load the System Library. $CH12 address of channel 12 indicator for the principal print device, as determined from REQ control records $CORE core size (may be actual, or set by CORE control record) $DREQ a negative value indicating DISKZ $HASH and $HASH+1 word count and sector address of CIB $IREQ address of $DUMP entry point $ULET sector address of LET for logical drive 0 $CILA address of the end of DISKZ minus 1 (location in DISKZ where the word count and sector address of the Core Image Loader is to be placed) $DZIN a negative value indicating DISKZ $FPAD file-protection sector address for logical drive 0 $DCYL table of defective cylinders (from sector @IDAD) CORE LAYOUT address of level 2 interrupt branch table Figure 1 shows the layout of the contents ojf core storage during System Loader operation. $IBT2 12 CD 1442/2501 Bootstrap Loader CD @ COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ prior to performing any disk operations, and into locations $DCYL through $DCYL+2 in the Resident Image. The fourth word of the sector (the cartridge identification word, initialized by the DCIP or DISC program) is placed into location #CIDN in DCOM. SYSTEM LOCATION EQUIVALENCE TABLE (SLET) SLET occupies two adjacent sectors on the system cartridge. Its functions are: Communications Area Communications Area Communications Area • To provide a convenient means for locating each monitor system program that has been stored on the system cartridge. 2 • To indicate which are the principal I/O devices for the system. Subphase 1, 2, or 3 • To indicate which devices, if any, are not present on the system. Phase Phase 2 When the System Loader initially stores a phase of a monitor system program on the disk, it makes a 4-word entry in SLET for that program consisting of: Card or Paper Tape Subroutine Card or Paper Tape Subroutine Card or Paper Tape Subroutine 1. 2. 3. 4. Figure 1. Core Layout During System Loader OFeration CARTRIDGE IDENTIFICATION SECTOR On an initial load, the System Loader uses the contents of the cartridge ID sector (sector @IDAD) as follows: The first three words of the sector (the defective cylinder table for the cartridge, initialized by the DCIP program) are placed into its disk I/O subroutine The phase identification (phase ID) number. The core loading address of the phase. This is the address in which the word count is to be stored prior to fetching the phase from the disk. The word count of the phase, not including the two words occupied by the word count and sector address used in fetching the phase from disk. The sector address of the phase. During an initial load, the SLET sectors are cleared to zero. The 4-word entries describing each phase are built into the table, phase by phase, as the monitor system programs are loaded. When a program, such as the Assembler Program, is to be bypassed, the words in SLET that it would normally need (the number of phases in the program times 4) are left at zero and are bypassed. The SLET entry for the next program phase that is loaded follows this gap. (A program or phase not included during an initial load cannot later be included in a reload operation; a new initial load must be performed. ) All phase ID numbers in SLET are in ascending order. No duplications exist. The only jumps in sequence are between programs, not between phases within a program. Section 3. System Loader 13 The five 4-word entries describing the principal I/O devices and the corresponding conversion subroutines are built by the System Loader and do not come directly from program decks. These special entries" as well as all I/O phases, are located on the second of the two SLET sectors. The contents of SLET can be obtained at any time by an execution of the DSLET program (see the description of DSLET under Mainline Programs in Section 12. System Library). RELOAD TABLE The Reload Table occupies one sector on the system cartridge. It contains a 3-word entry for each phase that requests SLET information. Word 1 of each entry contains the phase ID number of the requesting phase. Word 2 of each entry contains the number of the location, relative to the beginning of the phase, where the SLET entries are to be inserted into the 14 requesting phase. Word 3 of each entry contains the number of 4-word SLET entries to be inserted into the requesting phase. The phase ID number of the requesting phase itself is in 2' s complement form to indicate to the System Loader that SLET data is requested by that phase. When completed at the end of an initial load or reload operation, the Reload Table consists of a string of 3-word entries, as described above, except that the phase ID numbers have been recomplemented by the System Loader. At the end of the string is /FFFF. It may be at an odd or an even address, depending upon the length of the string. At the end of an initial load, the phase ID numbers are in ascending order. After one or more reload operations the phase ID numbers mayor may not be in ascending order. When a DE FINE VOID ASSEMBLER or DE FINE VOID FORTRAN operation is performed by DUP, all phase ID numbers belonging to the voided program(s) are removed from the Reload Table. The remaining 3-word entries in the Reload Table are packed together and terminated with /FFFF" SECTION 4. FLOWCHARTS Cold Start Loader: CSTOI Cold Start Program: CST02 COLD START LOADER The Cold Start Loader is the one-card bootstrap used to initiate the operation of the Cold Start Program, which in turn initiates the operation of the monitor system. Since it is loaded by the IPL procedure, all instructions in the Cold Start Loader are in Load Mode format. Hence, the program must construct all IOCCs as well as any long instructions required by it. The first word set up after entering the program is the second word of the IOCC for reading the Console Entry switches. After this is done, the number of the physical drive to be assigned as logical drive o is obtained from the Console Entry switches. The program then checks to see if the number obtained is valid (0-4, inclusive). If it is not, the program comes to a WAIT from which the user may restart by entering a valid number and pressing the START key. Once a valid number has been obtained, the device code for the drive specified is constructed and saved (for use by the Cold Start Program as well as the Cold Start Loader). After setting up the second word of the IOCC for sensing the disk (with reset), the program senses the disk. All bits except the not-ready bit (bit 2) are masked out. If the drive is not ready, the program comes to the same WAIT mentioned above. Four long instructions are built, and the final steps in the setting up of the IOCC for seeking are performed. The word count of the Cold Start Program plus the word count of DISKZ plus 27 is stored in DZOOO-29, the 27 being the number of words reserved in sector @IDAD for parameters. After setting up the second word of the IOCC for reading the disk, the program initiates a seek toward the home position, one cylinder at a time. When the seek is complete, sector zero on the cylinder currently under the read/write heads is read from the disk~ If no disk error occurs COLD START PROGRAMS during this read and if the sector address is that of sector @IDAD, then a branch is made to $ZEND, which is the address of the first word of the Cold Start Program. If the sector address is not that of the Cold Start Program, another seek toward the home position is initiated. This seek-and-read process is repeated until the proper sector address is found. (Therefore,a cartridge with invalid sector addresses causes the program to function improperly.) Any disk error results in the program coming to a WAIT with a /3028 in the storage address register. COLD START PROGRAM The Cold Start Program is fetched from the disk by and receives control from the Cold Start Loader. U sing the same device code that was set up by the Cold Start Loader for the physical drive assigned as logical drive 0, the Cold Start Program reads the Resident Image into its normal location in core storage. Once this operation is performed, location zero is initialized with an MDX to $DUMP+l and the Auxiliary Supervisor is entered with a parameter of minus 1, causing it to place a dummy JOB monitor control record into the Supervisor buffer and execute a CALL EXIT. CORE LAYOUT Figure 2, panel 1, shows the layout of the contents of core storage after the Cold Start Loader has been loaded and, in turn, has fetched sector @IDAD from logical drive 0 into core storage. This sector is read into core such that the DISKZ subroutine resides at DZ 000, followed by the Cold Start Program. Figure 2, panel 2, shows the layout of the contents of core storage after the Cold Start Program has fetched the Resident Image from sector @RIAD from logical drive 0 into core storage. The Resident Image, like DISK~, is fetched so that all locations occupy their permanent positions in core storage. Sect;on 4. Cold Start Programs 15 CD,----~------------~ @ Cold Start Loader Resident Image DISKZ Figure 2. Core Layout During Cold Start 16 SECTION 5. RESIDENT MONITOR FLOWCHARTS ERROR TRAPS CALL LINK, CALL EXIT, CALL DUMP Processor: SUP01 There are six error traps in the Skeleton Supervisor: the preoperative error trap, the PROGRAM STOP key trap, and one postoperative error trap each for interrupt levels 1, 2, 3, and 4. Each error trap except for the PROGRAM STOP key trap consists of a link word, a WAIT instruction, and a BSC indirect to the link word. The PROGRAM STOP key trap employs a BOSC indirect instead of a BSC indirect. The Resident Monitor consists of COMMA, the Skeleton Supervisor, and a disk I/O subroutine. COMMA For a description of COMMA and its contents, see Section 2. Communications Areas. SKELETON SUPERVISOR ILSs The Skeleton Supervisor is composed of: the CALL LINK, CALL DUMP, CALL EXIT processor; error traps for interrupt levels 1, 2, 3, and 4, the PROGRAM STOP key, and preoperative errors; and the ILSs for interrupt levels 2 and 4. The Skeleton Supervisor contains the ILSs for interrupt level 2 (ILS02) and interrupt level 4 (ILS04). These are used in all cases by all monitor system programs and by user programs in lieu of userwritten ILS02 and/or ILS04 subroutines. CALL LINK, CALL DUMP, CALL EXIT PROCESSOR This portion of the Skeleton Supervisor indicates the type of entry made to it -- LINK, DUMP, or EXIT -then fetches and transfers control to phase 1 of the Core Image Loader. On any entry at $DUMP locations $CIBA+ 1 through 4095 are saved on the Core Image Buffer before they are overlaid by the monitor system programs required for the core dumpo On all entries to the Skeleton Supervisor, the two words following the branch instruction are saved to prevent their being overlaid and lost. They are needed only if the entry was at $LINK, at which time these two words contain the name of the link to be executed next. DISK I/O SUBROUTINE The Resident Monitor contains one of the three disk I/O subroutines at all times. The disk I/O subroutine in the Resident Monitor is the disk I/O subroutine currently in use. For a description of the DISKZ subroutine, see Section 13. System Device Subroutines. A listing of the DISKZ subroutine is contained in Appendix Bo Listings. For descriptions of the DISK1 and DISKN subroutines, see Section 12. System Library. Section 5. Resident Monitor 17 SECTION 6. SUPERVISOR FLOWCHARTS JOB CONTROL RECORD PROCESSING Monitor Control Record Analyzer: SUP02 - SUP05 Supervisor Control Record Analyzer: SUP06-SUP08 Auxiliary Supervisor: SUP10 System Core Dump Program: SUP09 Upon detecting a JOB control record, the Monitor Control Record Analyzer initializes the SLET information for the principal input device, COMMA, DCOM, and LET. The entire heading sector (sector @HDNG) is cleared, "PAGEbbb1" is stored in words 0-3, and the contents of columns 51-58 of the JOB control record are stored in words 6-9. The SLET information for the device other than the Keyboard normally assigned as the principal input device replaces the SLE T information for the current principal input device and its conversion subroutine. The following parameters in COMMA are initialized to zero: MONITOR CONTROL RECORD ANALYZER PHASE 1 The Monitor Control Record Analyzer is the program that decodes monitor control records and takes the specified action. The Monitor Control Record Analyzer is entered via the $EXIT entry point in the Skeleton Supervisor. This entry causes the Core Image Loader to fetch the Monitor Control Record Analyzer and transfer control to it. The Monitor Control Record Analyzer utilizes the system I/O device subroutines. Three of these subroutines (an input, an output, and the appropriate conversion subroutine) are fetched into core storage by the Monitor Control Record Analyzer itself, using SLET information provided by the System Loader. The Monitor Control Record Analyzer reads monitor control records from the principal input device into the Supervisor buffer, which occupies locations @SBFR through @SBFR+79 and contains a monitor control record in unpacked, right-justified EBCDIC format. The principal conversion subroutine checks for monitor control records. If the principal conversion subroutine detects a monitor control record during the execution of a monitor system program other than the Monitor Control Record Analyzer, $CTSW in COMMA is set to a positive non-zero value, the monitor control record is converted to unpacked, right-justified EBCDIC format, and the record is passed to the Monitor Control Record Analyzer in the locations assigned as the Supervisor buffer. $COMN, $CTSW, $DADR, $DUMP,/OO'31== $IBSY, $IOCT, $LAST, $LINK, $NDUP, $NXEQ, $PBSY, $PRET, $PST1, $PST2, $PST3, $PST4, $SNLT, $STOP, $WRD1 In addition, $PGCT and $UFIO are set to one, and the address of $DUMP is stored in $IREQ. The cartridge IDs specified on the JOB control record are unpacked to one EBCDIC character per word, converted to binary, and stored in a fiveword ID table to be used by the System Update program to update the cartridge-dependent tables in COMMA and DCOM (see System Update, below). $CIBA in COMMA is set by comparing the ID of the cartridge on which the CIB for the current job is to be found, as specified on the JO B control record, to the list of specified IDs and selecting the entry in #CIBA that corresponds to the matching ID. Similarly, $WSDR is set eqUivalent to the logical drive number of the ID that matches the Working Storage cartridge ID, and $UFDR is set equivalent Section 6. Supervisor 19 to the drive number that matches the unformatted I/O cartridge ID. 'rhe address of the adjusted end of the User Area (#ANDU) is compared to the address of the base end of the User Area (#BNDU) for each cartridge. If the two items are unequal for any cartridge, the temporary items in LET on that cartridge are deleted. A sector of LE T is read and the disk block counts are accumulated until the sum is equivalent to # BNDU . The sector address of that sector and any following LE T sector s are stored in a table (JB936) until a continuation of the disk block accumulation equals # ANDU . The next entry consists of a dummy name (illUMY) and the size of Working Storage. The size of Working Storage is saved (JB934) and the entry is cleared. The preceding disk block counts are added one at a time to JB934, subtracted from # ANDU, and deleted until # ANDU equals #BNDU. If an entire sector is deleted before #ANDU equals #BNDU, it is necessary to fetch the sector address of the preceding LE T sector from the table JB936 and read in that sector so the deletion process may be continued. When all the temporary entries have been deleted (# ANDU equals #BNDU) IDUMY is stored as the name, and the disk block count of the last entry is stored as the size of Working Storage. The following parameters in DCOM are set to zero: #CBSW" #DBCT, #DCSW, #ENTY, #FCNT, #FHOL, #FRDR, #FRMT, #FSZE, #LCNT, #MDF1, #MDF2, #MPSW, #NAME, #NCNT, #TODR, #UHOL, #USZE, #WSCT #JBSW i.s set to zero unless a 'T' appears in column 8 of the JOB control record, in which case #JBSW i.s set to a positive, non-zero value. SYSTEM UPDATE PROGRAM The purpose of the System Update program is to update the drive- ann cartridge-dependent tables of the system cartridge DCOM to reflect the logical definition and contents of the cartridge in use during the current job, as specified by the JOB control record. 20 The specified cartridge IDs are communicated to the System Update program in logical order and in tabular form from core storage or from disk. This table is referred to as ID LIST. A table of available cartridge IDs in physical order is formed by the System Update program by executing a command to read one word from each drive successively. If the drive is available and ready, the DSW, when immediately tested, shows a busy condition. DISKZ is then called to fetch the cartridge ID and defective cylinder addresses from sector @IDAD and the ID is stored in CAR T LIST. If a drive is not available or not ready, the appropriate position of CART LIST is set to zero. CAR T LIST is searched for each ID in ID LIST. When matching IDs are found, DCOM is fetched from the physical drive represented by the matching ill from CART LIST. The ID being processed its located in the #CIDN parameter in the DCOl\! just fetched. The entries from the drive·- and cartridgedependent parameters in DCOM in the position where the ID is found are moved to the correspondLng driveand cartridge-dependent parameters in the master DCOM in the position specified by the logical drive assignment for that ID. The entrjes for unspecified cartridges are set to zero. At the same time, the device code ($ACDE) and defective cylinder addresses ($DCYL) in COMMA are set. $ACDE is the only link between the logical and physical definition of a drive. The position of an entry in the $ACDE parameter defines the logical drive, and the device code defines the physieal drive. The defective cylinder addresses are those :fetched from words 0-2 of sector @IDAD of the cartridge. These addresses and cartridge IDs were set by the DCIP program. $FPAD and $ULET in COMMA are updated from the newly updated DCOM on the master cartridge. OTHER CONTROL RECORD PROCESSING Upon detecting an XEQ monitor control record, the Monitor Control Record Analyzer tests $NXEQ, the non-execute switch, in COMMA. If $NXEQ is zero, the Monitor Control Record Analyzer fetches and transfers control to the XEQ Control Record Processor (see below). Otherwise, the Monitor Control Record Analyzer prints an error message and reads the next control record for processing. Upon detecting an ASM or FOR monitor control record the Monitor Control Record Analyzer fetches the first phase of the specified program using SLET information provided by the System Loader. and transfers control to it. Upon detecting a DUP monitor control record. the Monitor Control Record Analyzer tests $NDUP. the non-DUP switch, in COMMA. If $NDUP is zero. the Monitor Control Record Analyzer fetches and transfers control to the first phase of DUP. Otherwise, an error message is printed and the next control record is read for processing. Upon detecting a PAUS monitor control record, the Monitor Control Record Analyzer comes to a WAIT at the PROGRAM STOP key trap in the Resident Monitor. When the PROGRAM START key is pressed, the Monitor Control Record Analyzer reads and processes the next control record. Upon detecting a TYP monitor control record, the Monitor Control Record Analyzer replaces the SLET information used to fetch the principal input device subroutine and its associated conversion subroutine with the SLET information for the Keyboard input subroutine and its associated conversion subroutine. These subroutines are then fetched and used for the reading and converting of subsequent input records from the Keyboard. Upon detecting a TEND monitor control record, the Monitor Control Record Analyzer replaces the SLET information used to fetch the principal input device (the Keyboard) subroutine and its associated conversion subroutine with the SLE T information for the device subroutine and conversion subroutine used with the device normally assigned as the principal input device, i. e., not the Keyboard. These subroutines are then fetched and used for the reading and converting of subsequent input records. Upon detecting a CPRNT monitor control record, the Monitor Control Record Analyzer replaces the SLE T information used to fetch the principal print device subroutine with the SLET information for the Console Printer output subroutine. (This replacement is permanent and can be changed only by a new initial load of the system.) This subroutine is then fetched and used for the printing of subsequent output records on the Console Printer. Upon detecting an EJE CT monitor control record, the Monitor Control Record Analyzer ejects the page on the principal print device, prints the current page heading, and reads and processes the next monitor control record. XEQ CONTROL RECORD PROCESSOR - PHASE 2 The XEQ Control Record Processor PFocesses the XEQ monitor control record and the Supervisor control records - LOCAL) NOCAL, and FILES. XEQ CONTROL RECORD PROCESSING The presence of Supervisor control records following the XEQ control record is indicated by the contents of columns 16 and 17. If the number in these columns is not zero or blank, the Supervisor Control Record Analyzer, the subroutine that processes LOCAL, NOCAL, and FILES control records, is called. #MPSW in DCOM is set non-zero if an ILl appears in column 14; otherwise, #MPSW is set to zero. $DREQ in COMMA is set according to the disk I/O subroutine indicated in column 19. If column 19 is blank, $DREQ is set to indicate DISKZ. If a name appears in columns 8 through 12 of the XEQ control record, the name is converted to name code and the Core Image Loader is called via the $LINK entry point in the Skeleton Supervisor. (The 2-word name of the program to be linked to follows the branch to $LINK.) If no name appears in the XEQ control record, phase 0/1 of the Core Load Builder is fetched into core storage and control is transferred to phase O. The cartridge ID in columns 21-24 is located in #CIDN to determine the drive on which the program is to be found. This drive number is stored in $DCDE in COMMA. Section 6. Supervisor 21 Word Count, one word specifying the number of wods in the two LOCAL/NOCAL sectors occupied by LOCAl/NOCAL information, including the wbrd count . Mainline name, two words in name code format (blanks if no mainline name is specified) Subroutine Name, two words in name ce,de format specifying a LOCAL/ NOCAL subroutine associated with the preceding mainline Subroutine Name siubroutine Name Ma~~i~: SUPERVISOR CONTROL RECORD PROCESSING LOCAL/NOCAL Control Record Processing The mainline program name(s) and subroutine name(s) found on the LOCAL/NOCAL control records are converted to name code and stored on the Supervisor Control Record Area (SCRA). If a mainline program name is not specified, two words of blanks replace it in the SCRA. LOCAL control record information is stored in sectors 0 and 1 of the SCRA. NOCAL control record information is stored in sectors 2 and 3. 1t Mainline and Subroutine Names ,.,.....~~, Sector 1 .1 I , I ,I ~ ~~ I, I I -\ \--. I I I r~r':t7:e Na~ Subroutine Name Mainline Name FILES Control Record Processing Each file number is converted to binary and stored in the SCRA. Following each file number in the SCRA is the file name in name code. If no name was specified, two words of zeros replace the name. Following each file name in the SCRA is the cartridge ID converted to binary. If no cartridge ill was specified for a file, one word of zeros replaces the cartridge ID. Both the file name and cartridge ill may not be unspecified. FILES control record information is stored in sectors 4 and 5 of the SCRA. SUPERVISOR CONTROL RECORD AREA (SCRA) Sectors 0 and 1 of the SCRA are occupied by the LOCAL information for the core load or execution currently in progress (see diagram, below). The first word of sector 0 contains the word count of the information stored in the two LOCAL sectors. Seetors 2 and 3 of the SCRA are occupied by the NOCAL information for the core load or execution currently in progress (see diagram, below). The first word of sector 2 contains the word count of the information stored in the two NOCAL sectors. Sectors 4 and 5 of the SCRA are occupied by the FILES information for the core load or execution currently in progress (see diagram, below). The first word of sector 4 contains the word count of the information stored in the two FILE S sectors. Sectors 6 and 7 of the SCRA are not used. The format of information in the WCAL/NOCAL sectors is as follows: 22 j Not Used ~~~~~.------------~'-----------~ Sector 2 ill, I ~\------------~ The format of information in the FILES sectors is as follows: Word Count, one word specifying the number of words in the two FI LES sectors occupied by FI LES information, inc luding the word count. Fi Ie Number, one word specifying in binary the number assigned to the file in a FORTRAN DEFINE: FILE statement and by which the file is referenced File Name, two words in name code format sp,~cifying the name of the file as it appears in LET/FLET (zeros if no file name is specified). Cartridge 10, one word specifying in bin'Jry the 10 of the cartridge containing the preceding named fi Ie (zero if no cartridge 10 is specified) . Fi lel~~:l~:~~idge 10 File Number [ _ ~,_A_.r__"__.,.J>-.~~ Se~tor I r II: III!II Fi Ie Numbers ~md NClmes ~ ------o-nd--C-ar~!r-id-g-e-I-O.-s------~.~ \T--._--IL..-II ~:::'dge ID Not Used ~~~--------------------~--------------~ Se~tor 1 ill ~'rj--------------~ 1~1 SYSTEM CORE DUMP PROGRAM f If an entry was-made to the Skeleton Supervisor at the $DUMP'-entry point, the Skeleton Supervisor saves the contents of location $CIBA+l through 4095 on the CIB, then fetches and transfers control to the Core Image Loader. If $DMPF (the dump format indicator) is zero or positive, the Core Image Loader fetches into core storage and transfers control to the System Core Dump program. The Dump program requires the principal print device subroutine. This subroutine is fetched into core storage by the Dump program itself utilizing SLE T information provided by the System Loader. If dump limits are specified, three checks are made: 1. If both limits are zero, the lower limit is left 2. If a limit is larger than core size, the limit is zero and the upper limit is set to core size. 3. subtracted from the core size and the difference is used as the limit. If the lower limit is greater than the upper limit, a wrap-around dump is given. That is, core storage between the lower limit and the end of core storage is dumped, then core storage between location 0 and the upper limit is dumped. The lower dump limit is checked to determine which, if any, sections of the CIB must be read into the dump buffer. If any or all of the contents of the CIB are to be dumped, the CIB is read into core storage in sections; sectors 0-3 constituting section 1, sectors 4-7 constituting section 2, and sectors 8-12 constituting section 3. Since the first six words of core storage were not stored to the CIB, the contents of the dump buffer are off-set by six words. These six words are filled in from words 0-5 in the case of section 1 and are saved from the end of the previous section in the cases of sections 2 and 3. Locations greater than 4095 were not stored to the CIB and are dumped from their original locations. If the $DUMP entry point contains no return address (i. e., is zero), the Dump program calls the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. If the $DUMP entry point contains a return address (i. e., is non-zero), the Dump program restores the contents of core storage in three stages. First, the locations between $CIBA+l and the beginning of the disk I/O subroutine are restored from the CIB. Second, the locations between the beginning of the disk I/O subroutine and the beginning of the principal print device subroutine are restored. Third, the locations between the beginning of the principal print device subroutine and location 4095 are restored from the CIB using the disk read subroutine in COMMA. Control is then returned to the restored core load at the location following the dump parameters. AUXILIARY SUPERVISOR If an entry was made to the Skeleton Supervisor at the $DUMP entry point and $DMPF (the dump format indicator) is negative, the Core Image Loader fetches into core storage and transfers control to the Auxiliary Supervisor. The Auxiliary Supervisor has three functions: 1. It stores dummy monitor control records to the 2. Supervisor buffer for processing by the Monitor Control Record Analyzer. It prints error messages for errors detected by the Core Image Loader It aborts a JOB. 0 3. The Cold Start Program calls the Auxiliary Supervisor with a parameter of m'inus one (-1). This parameter causes the Auxiliary Supervisor to place a dummy JOB monitor control record in the Supervisor buffer, convert from binary to EBCDIC the cartridge ID of the cartridge from which the cold start was made and store it in the Supervisor Buffer, set $CTSW non-zero, and call the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. The ILS04 subroutine calls the Auxiliary Supervisor with a parameter of minus two (-2) if an interrupt occurs from the Keyboard INTERRUPT REQUEST key and the user has not provided a servicing subroutine for that interrupt. This parameter causes the Auxiliary Supervisor to set $IOCT, $IBSY and $PBSY in COMMA to zero, set $FLSH in COMMA non-zero, and call the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. The Core Image Loader calls the Auxiliary Supervisor with a parameter of minus three (-3) or minus four (-4). If a program name cannot be found in LET/FLET, the parameter used is minus Section 6. Supervisor 23 three. If a name specified as the program or core load for execution is found to be a data file in LET/ FLET, the parameter used is minus four. In either case, t.he Auxiliary Supervisor prints an error message, sets $NXEQ in COMMA non-zero, and calls the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. The System Loader calls the Auxiliary Supervisor with a parameter of minus five (-5). This parameter causes the Auxiliary Supervisor to place a dummy DUP monitor control record in the Supervisor buffer and call the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. A negative parameter other than minus 1 through minus 5 causes the Auxiliary Supervisor to print an appropriate error message and call the Monitor Control Record Analyzer via the $EXIT entry point in the Skeleton Supervisor. Figure 3, panel 4 shows the layout of the contents of core storage after the Core Image Loader, as the result of an entry to the Skeleton Supervisor at the $EXIT entry point, has fetched the DISKZ disk I/O subroutine into the Resident Monitor for use by the Monitor Control Record Analyzer and has fetched into core storage and transferred control to the Monitor Control Record Analyzer. The principal print device and principal input devi.ce sub:r.outines have been fetched into core storage by the Monitor Control Record Analyzer. The areas for disk I/O and control record buffers have been allocated by the Monitor Control Record Analyzer. If a monitor control record had been detected by a monitor system program other than the Monitor Control Record Analyzer, the record would have h~en passed to the Monitor Control Record Analyzer in that area to be allocated by the Monitor Control RecDrd Analyzer as the Supervisor buffer Figure 3 t panel 5 shows the layout of tbe contents of core storage after the Monitor Control Record Analyzer has fetched the XEQ Control Record Processor into core storageo Figure 3, panel 6 shows the layout of tbe contents of core storage after the Core Image Loader, as the result of an entry to the Skeleton Supervisor at the $DUMP entry point with a non-negative parameter, has fetched into core storage and tra.nsferred control to the System Core Dump program. The Dump program, using whichever disk I/O subroutine is in the Resident Monitor, has fetched the principal print device subroutine into core storage. The areas for disk I/O and print buffers have been allocated by the Dump programo Figure 3, panel 7 shows the layout of the contents of core storage after the Core Image Loader, as the result of an entry to the Skeleton Supervisor at the $DUMP entry point with a negative parameter, has fetched the DISKZ disk I/O subroutine into core storage and has fetched and transferred control to the Auxiliary Supervisor. The Auxiliary Supervisor has fetched the principal print device subroutine into core storage. 0 CORE LAYOUT Figure 3, panel 1 shows the layout of the contents of core storage at the time the Skeleton Supervisor is entered at the $LINK, $EXIT, or $DUMP entry point. Figure 3, panel 2 shows the layout of the contents of core storage after phase 1 of the Core Image Loader has been fetched into core storage by the Skeleton Supervisor. If the Skeleton Supervisor was entered at the $DUMP entry point, the contents of locations $CIBA+l through 4095 are saved on the CIB prior to the fetching of the Core Image Loader Figure 3 t panel 3 shows the layout of the contents of core storage after phase 1 of the Core Image Loader, using whichever disk I/O subroutine is in the Resident Monitor, has fetched phase 2 of the Core Image Loader into core storage. 0 24 CD 0 Q) COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor Disk I/o Subroutine Disk I/o Subroutine Disk I/o Subroutine Core Image Loader, Phase 1 Core Image Loader, Phase 1 Core Image Loader, Phase 2 @ 0 0 COMMA, Skeleton Supel'Visor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ Disk I/o Subroutine DISKZ Principal Print Device Subroutine Principal Print Device Subroutine Principal Print Device Subroutine Auxiliary Supervisor Principal Input Device Subroutine Principal Input Device Subroutine MCRA MCRA JOB Proc essor , System Update XEQ Processor, SCRA DCOM Buffer Disk I/o Buffer 0 C. R. Buffer Dump Program Principal Print Device Subroutine Disk I/o Buffer C. R. Buffer User Core Load or Monitor System Program Portion of User Core Load Above 4095 Figure 3. Core Layout During Supervisor Operation Section 6. Supervisor 25 SECTION 7. FLOWCHARTS CORE IMAGE LOADER Low COMMON Disk I/O Subroutine Phase 1: CIL01 DISKZ DISK1 DISKN Phase 2: CIL02 PHASE 1 Phase 1 of the Core Image Loader handles the three entries to the Skeleton Supervisor - LINK, DUMP, and EXIT The Core Image Loader is ass igned this task in order to minimize transfer time (via CALL LINK) from one link to another Phase 1 of the Core Image Loader is naturally relocatable. It is read into core storage by the Skeleton Supervisor immediately following whichever disk I/O subroutine is currently in the Resident Monitor. (This can be done by the Skeleton Supervisor with minimal core requirement because the word count and sector address of this phase permanently reside at the end of each disk I/o subroutine. ) If the Skeleton Supervisor was entered at the $DUMP entry point ($RMSW is positiv-e), phase 1 tests $DMPF, the dump format code indicator. If $DMPF is negative, phase 1 fetches and transfers control to the Auxiliary Supervisor. If $DMPF is not negative, phase 1 fetches and transfers control to the System Core Dump program. If the Skeleton Supervisor was entered at the $EXIT entry point ($RMSW is negative), phase 1 tests $DZIN to determine whether DISKZ is in the Resident Monitor. If DISKZ is in the Resident Monitor, phase 1 fetches and transfers control to the Monitor Control Record Analyzer. If DISKZ is not in the Resident Monitor, phase 1 fetches phase 2 of the Core Image Loader. Using phase 2 as a subroutine, phase 1 overlays DISK1 or DISKN with DISKZ. Phase 1 then fetches and transfers control to the Monitor Control Record Analyzer If the Skeleton Supervisor was entered at the $LINK entry point ($RMSW is zero), phase 1 tests $COMN in COMMA to determine if COMMON was defined by the core load just terminated. If $COMN is non-zero, phase 1 saves Low COMMON on the CIBo (Low COMMON is the lowest 320 words that could have been defined as COMMON by the core load just terminated.) Depending on the disk I/O subroutine currently in the Resident Monitor, Low COMMON is defined as follows: 0 0 Decimal Hexadecimal 896 - 1215 1216 - 1535 1536 - 1855 /0380 - j04BF /04CO - /05FF /0600 - /073 F The area occupied by Low COMMON is used by phase 1 as a disk I/O buffer during the LET/FLET search and/or as the area into which phase 2 is fetched when phase 2 is to be used to fetch DISKZ Once Low COMMON has been saved, or if no COMMON was defined by the core load just terminated, phase 1 searches LET/FLET for the name of the program or core load to be executed next. The name of the link has been saved in $LKNM by the Skeleton Supervisor. If the link is in disk system format (DSF), phase 1 saves any COMMON defined below 4096 on the CIB. It then fetches phase 2, uses phase 2 as a subroutine to overlay DISK1 or DISKN with DISKZ, fetches phase 0/1 of the Core Load Builder, and transfers control to phase 1 of the Core Load Builder. If the link is in disk core image format (DCI) , phase 1 fetches and transfers control to phase 2 to fetch the link and the required disk I/O subroutine, if necessary, and to transfer control to that link. 0 Special Techniques. Phase 1 of the Core Image Loader places a disk call subroutine in COMMA at $HASH+8 through $HASH+19. Using this disk call subroutine, phase 1 is able to overlay itself when fetching phase 2, the Monitor Control Record Analyzer, etc. PHASE 2 0 Phase 2 of the Core Image Loader is naturally relocatable. It is read into core storage (by phase 1) immediately following the end of phase 1 if it is to be used by phase 1 to fetch DISKZ, or (by either phase 1 or the Core Load Builder) following the end of the disk I/O subroutine currently in the Resident Monitor if it is to fetch and transfer control to a core load. Phase 2 provides two functions: (1) to overlay the disk I/O subroutine currently in the Resident Monitor with the requested disk I/O sub- Section 7. Core Image Loader 27 routine and (2) to fetch a core load. It may be used for either or both of these functions on any single entry. [f called to fetch and transfer control to a core load, phase 2 first fetches and processes the core image header and then the disk I/O subroutine required by the core load to be fetched if it is not currently present in the Resident Monitor. The last thing it does is to fetch and transfer control to the core load itself. COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ Core Image Loader, Phase 1 Special Techniques. Upon entry, phase 2 requires the disk call subroutine placed at $HASH +8 through $HASH+19 by phase 1. Using this disk call subroutine, phase 2 is able to overlay itself when fetching a core load. Included in this subroutine, at $HASH+13 through $HASH+19, is the coding that moves the transfer vector from its position at the end of the core load (as it exists on disk) to the end of COMMON in core storage. Once the transfer vector has been moved, control passes to the core load being fetched. CORE LAYOUT Figure 4 shows the layout of the contents of core storage following an entry to the Skeleton Supervisor at $EXIT when DISKZ is present in the Resident Monitor In panel 1, phase 1 of the Core Image Loader has been fetched by the Skeleton Supervisor. In panel 2, the Monitor Control Record Analyzer has been fetched by phase 1. r'igure 5 shows the layout of the contents of core storage following an entry to the Skeleton Supervisor at $EXIT when DISKZ is not present in the Resident MonitoL In panel 1, phase 1 of the Core linage Loader has been fetched by the Skeleton Supervisor. In panel 2, phase 2 of the Core Image Loader has been fetched by phase 10 In panel 3, DISKZ has been fetched by phase 2. In panel 4, the Monitor Control Record Analyzer has been fetched by phase 1. Figure 6 shows the layout of the contents of core storage following an entry to the Skeleton Supervisor 0 28 Figure 4. Core Layout on Supervisor Entry at $EXIT (DISKZ in Core) at $DUMP o In panel 1, locations $CIBA+l through 4095 have been saved on the CIB and phas '8 1 of the Core Image Loader has been fetched by the Skeleton Supervisor. In panel 2, the System Core Dump program has been fetched by phase 1 as the result of a non-negative parameter following the branch to $DUMP. In panel 3, the Auxiliary Supervisor has been fetched by phase 1 as the result of a negative parameter following the branch to $DUMP. CD CD CD 0 CD CD COMMA, Skeleton Supervisor COMMA, SkeletQn Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISK1 or DISKN DISK1 or DISKN DISKZ DISKZ Any Disk I/o Subroutine Any Disk I/o Subroutine Any Disk I/o Subroutine Core Image Loader, Phase 1 0) Core Image Loader, Phase 1 That Portion of Core Load Above That Portion of Core Load Above 4096, 4096, Not Saved On CIB Not Saved On CIB Figure 6. Core Layout on Supervisor Entry at $DUMP Figure 5. Core Layout on Supervisor Entry at $EXIT (DISKZ Not in Core) Figure 7 shows the layout of the contents of core storage following an entry to the Skeleton Supervisor at $LINK when the program being linked to is in disk system format (DSF). In this case DISK1 or DISKN is currently present in the Resident Monitor. In panel 1, phase 1 of the Core Image Loader has been fetched by the Skeleton Supervisor, Low COMMON has been saved by phase 1, and the LET/FLET search buffer has been allocated. In panel 2, COMMON defined by the previous core load below location 4096 (if any) has been saved on the CIB by phase 1. In panel 3, phase 2 of the Core Image Loader has been fetched by phase 1; DISKZ has been fetched by phase 2. If DISKZ is currently present in the Resident Monitor, phase 2 is not called as shown in panel 3. In panel 4, phase 0/1 of the Core Load Builder has been fetched by phase 1 of the Core 1m age Loader. Figure 8 shows the layout of the contents of core storage following an entry to the Skeleton Supervisor at $LINK when the program being linked to is in disk core image format (DCI). In this case DISKZ is currently present in the Resident Monitor. In panel 1, phase 1 of the Core Image Loader has been fetched by the Skeleton Supervisor, Low COMMON Section 7. Core Image Loader 29 ~) G) @ 8) COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISK 1 or DISKN DISK 1 or DISKN DISKZ DISKZ Core Image Loader, Phase 1 Core Image Loader, Phase 1 LET/FLET Buffer LET/FLET Buffer Low COMMON Core Load Builder, Phase 0/1 Core Image Loader, Phase 2 has been saved by phase 1, and the LET/FLET search buffer has been allocatedo In panel 2, phase 2 of the Core Tmage Loader has been fetched by phase 1; the core image he ader buffer has been allocated by phase 20 In panel 3, the disk I/O subroutine required by the program being linked to has been fetched into the Resident Monitor. In panel 4, the program being linked to has been fetched by phase 2. In panel 5, COMMON defined by the previous core load below location 4096, previously saved on the CIB by phase 1 of the Core Image Loader, as well as the program being linked to, has been fetched by phase 20 In panel 6, the portion of the program being linked to that is contained in the CIB (the portion below location 4096, placed in the CIB by the Core Load Builder) has been fetehed by phase 2. DEBUGGING/ANALYSIS AIDS COMMON Above 4096, Not Saved Figure 7. Core Layout on Supervisor at $LINK (Link in Disk System Format) 30 To facilitate the finding of errors in and associated with the Core Image Loader, NOP instructions have been placed at critical locations in the Core Image Loader; they are: CMOOO+l, CMI18-5, CM180, LDOOO+l, GETCL, and LDI00+8. These NOPs can be replaced by WAIT instructions so that core dumps can be taken at various stages during Core Image Loader execution. An analysis of the core dump(s) may provide enough information to locate the problem. Bear in mind that the Core Image Loader is naturally relocatable o Thus, all modifications made to it must be executable irrespective of core location. CD CD CD COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISK1 or DISKN Reikired Dis I/o Subroutine Core Image Loader, Phase 2 Core Image Loader, Phase 2 Core Image Loader, Phase 1 LET/FLET Buffer Low COMMON 0 CD CD COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor Required Disk I/o SubrQlJtine Required Disk I/o Subroutine Reikired Dis I/o Subroutine Link Core Load CI Header Buffer Link Core Load That Portion of Core Load Loaded From CIB COMMON Below 4096, Restored COMMON Above 4095, Not Saved But Not Overlaid That Portion of Core Load Above 4095, Placed In Core By Core Load Builder Figure 8. Core Layout on Supervisor Entry at $LINK (Link in Core Image Format) Section 7. Core Image Loader 31 SECTION 8. CORE LOAD BUILDER FLOWCHARTS OVERLA Y SCHEME AND CORE LAYOUT Phase 1 (IN): CLB01 The overlays (phases) of the Core Load Builder have been organized to allow maximum core storage for the Load Table while minimizing the flip-flopping of phases. "Minimizing" here means that, during a one-pass building process (no LOCALs or SOCALs), the phases are executed serially from 1 through 6 (excluding 5). During a two-pass building process (LOCALs and/or SOCALs required), there is some flip-flopping of phases 3 and 5. Phase 0 is never overlaid. It contains the subroutines that must never be overlaid, as well as work areas and constants required by more than one subroutine. Phase 1 is fetched along with phase O. The only difference is that phase 2 overlays phase 1 but not, of course, phase O. Phases 3, 4, 5, 6, and 12 overlay the last part of phase 2. Phases 7-10 contain messages. They all require that the principal print subroutine be in the data buffer; these phases themselves are executed from the LET/FLET search buffer. Phase 11 prints the file map and phase 12 the core map. Both of these phases require that the principal print device subroutine be in the LE T /FLE T search buffer. Phase 11 is executed from the data buffer. Figure 9, panel 1 shows the layout of the contents of core storage after phases 0 and 1 of the Core Load Builder have been fetched into core storage by phase 1 of the Core Image Loader or the STORE function of DUP. Figure 9, panel 2 shows the layout of the contents of core storage after phase 1 has fetched phase 2, overlaying itself. Phase 2 has allocated the areas for the Load Table and the disk I/O buffers. Figure 9, panel 3 shows the layout of the contents of core storage after anyone of the overlay phases has been fetched by phase 2. Phase 1 includes the subroutines called by the initialization subroutine. In this way, phase 2 'can overlay phase 1 completely. Phase 2 includes the subroutines called by the relocation subroutine, RL. The order of the subroutines in this phase is important. Those that are required only during the relocation of the mainline (MV, ML, CK, DC, D F, and FM) come Phase 2 (MC): CLB02 The Core Load Builder builds a specified mainline program into an executable core load. The mainline program, with its required subroutines (LOCALs and SOCALs included), is converted from disk system format (DSF) to a format suitable for execution. During the conversion, the Core Load Builder also builds the core image header record and the transfer vector. The resulting core load is suitable for immediate execution or for storing on the disk in disk core image format (DCI) for future execution. GENERAL COMMENTS Each phase of the Core Load Builder has been broken up into a series of relatively small, selfcontained subroutines. After initialization (phase 1) control remains in the Master Control subroutine, which is a part of phase 2. (The labels in this subroutine all start with "MC".) In other words, the basic control logic is found in the Master Control subroutine. The labels assigned to constants and work areas within subroutines are in the range 900-999. Whenever noted, even-numbered labels are on even boundaries, and odd -numbered labels are on odd boundaries. Constants and work areas in RCOM (phase 0) are mnemonic and are arranged in four groups, each ordered alphabetically. Double-word cells are in one group, indexed cells are in a second; constants are in a third; and switches and work areas are in a fourth. The labels of switches are of the form "LSWx", where "x" is a number. The labels of constants are of the form "Kx", where "x" is either the number, in decimal, defined in the constant or the four hexadecimal digits defined in the constant. Patch areas are usually found at the end of a phase. Each one is defined by a BSS followed by a DC. Section 8. Core Load Builder 33 CD 0 (1) COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ DISKZ Phase Phase Phase 0 0 0 DISK BU FFERS Phase 1 Phase 2 Phase 2 Phases 3,4,5,6,12 Disk Phases I/o 7,8,9,10,11 Load Table Load Table That Portion of Core Load Above That Portion of Core Load Above 4096 4096 Buffers FigUl'e 9. Core Layout During Core Load Builder Operation last so that they may be over laid by phase 3 Phase 3 includes the subroutines required to choose a subroutine (as opposed to a malnline) from the Load Table and relocate it. Phases 4 and 6 round out the one-pass core load building process. Phase 4 determines whether or not SOCALs are required, and, if so, whether or not they can be employed to make the core load fit into core storage. It also processes ILSs. Phase 6 performs the miscellaneous jobs, such as creating the transfer vector, that can be done only at the end of the process of building a core load. Phase 5 is executed only during pass 2 in a two-pass building process. It organizes the LOCALs and SOCALs for relocation, including their special linkages. 0 34 There are three buffers used by the Core Load Builder. Each is 320 words long, not counting the word count and sector address, and each has a primary use, although it may be used temporarily for something else. For example, the LE T se arch buffer is used primarily to hold a sector of LE T / FLET when searching that table. However, it contains one of the message phases (phases 7-10) whenever a message is printed. The data buffer is a buffer for the User Area. The program currently being incorporated into the core load is read into this buffer, one sector at a time. For example, after a sector of the mainline is read into this buffer from the User Area. or Working Storage, the relocation of the mainline can begin. When this sector of the mainline ha.s been relocated, another sector (if any) is fetched, and so on until the entire mainline is relocated. The main use of the CIB buffer is to contain the CIB, one sector at a time. For example, if a core load is to occupy locations 1000 - 1639, then the first sector of the CIB contai.ns the part of the core load that is to occupy 1000 - 1319 and the second sector 1320 - 1639. As the core load is built, the' Location Assignment Counter (LAC) reflects the ultimate core address of the data word currently being relocated. In this example, the LAC would start at 1000, thus causing sector 1 of the CIB to be read into the CIB buffer. This first word of the core load would be placed in the first word of the CIB buffer and the LAC advanced by 1. Assuming no data br,eaks, the LAC will eventually be incremented to 1320. Then the contents of the CIB buffer will be written out on sector 1 of the CIB, and sector 2 will replace sector 1 in the CIB buffer. In short, each word of a core load is always transferred to the CIS via the CIB buffer. The data and CIB buffers are combined jlnto a single 640-word buffer for the purpose of fetching the LOCAL, NOCAL, and FILES information from the SCRAG CORE IMAGE BUFFER (CIB) The Core Image Buffer is used by the Core Load Builder, the Core Image Loader, and the Skeleton Supervisor. The Core Load Builder uses it to store any part of the core load that is to reside (when the core load is executed) below location 4096. The first word of the mainline is stored in the first word of the CIB, and subsequent words follow similarly. Thus, the mainline must be relocated first, and a subsequent ORG that would set the Location Assignment Counter below its first value is not allowed. LOAD TABLE The Load Table is used by the Core Load Builder primarily to tell what subprograms to include in the core load as well as at what time during the process of core load building to include a given subprogram. Other uses of the table are discussed below. It exists only during the building of a core load. There is an entry in the Load Table for (1) every LOCAL/NOCAL entry point specified for a given mainline and (2) for each subprogram entry point referenced in a core load, via CALL or LIBF. For example, even though subprogram A is called five times, there is only one entry in the Load Table for A. On the other hand, if A and B are different entry points to the same subprogram and both are referenced, then there will be an entry for A and another for B. Each of the Load Table entries is four words in length. The first entry occupies locations 4086 4089, the second 4082 - 4085, etc. The first two words of each entry contain the name (in name code) of the subprogram that caused the entry to be made. Bit zero of the first word is set if the entry is that of a LOCAL, bit one is set if the entry is that of a CALL. Mainlines and interrupt level subroutines never appear in the Load Table. Words three and four of each entry are zero when the entry is first made. As the relocation of a given subprogram begins, word three is set with the entry point, i. e., the absolute, address. In this way, the Core Load Builder can tell by looking at its Load Table entry whether or not a subprogram has been relocated and where it has been relocated to. Word four is put to several uses, most of which involve LOCAL processing. The use of this word at a given time is dependent upon the pass (lor 2) and/ or whether the subprogram associated with the Load Table entry is a LOCAL that was specified in the LOCAL information in the SCRA. For example, A and B are entry points to the same subprogram, and A (but not B) appears in the LOCAL information in the SCRAG Both A and B can be called in the core load; in such a case A is said to be specified and B unspecified. The values stored in word four at various times are: (1) the class code (for a non-LOCAL), (2) the address of the Flipper Table entry, (2) /0008 for every subroutine called by a LOCAL, (4) the word count of a LOCAL, (5) the address of the Load Table entry for the specified entry point for the LOCA L currently being relocated, and (6) the address of the LIBF TV that corresponds to the entry in the Load Table. LOCAL, NOCAL, AND FILES INFORMATION LOCAL, NOCAL, and FILES information is obtained from the Supervisor Control Record Area (SCRA). This information is supplied by the Supervisor Control Record Analyzer (see Section 6: Supervisor) or the STORECI function of DUP (see Section 9: Disk utility Program). For the format of LOCAL, NOCAL, and FILES information in the SCRA, see Section 6: Supervisor or Section 9. Disk Utility Program. ISS TABLE The ISS Table is used by the Core Load Builder as it constructs Interrupt Branch Tables for ILSs. When the address to which an ISS is to be relocated becomes available, that address is stored in the appropriate entry in the ISS Table. For example, if an ISS for the 1132 Printer (ISS number 6) is being relocated to location /1000, then /1000 is stored in the fourth word of the ISS. This address will later be used during the construction of the Interrupt Branch Table (IBT) for ILSOL INTERRUPT BRANCH TABLE (IBT) E ac hILS in the System Library that is filled in by the Core Load Builder (ILSOO, ILS01, and ILS03) begins with an Interrupt Branch Table (IBT). ILS02 and ILS04, which are a part of the Resident Monitor, require special treatment to construct their IBTs. A given IBT consists of the addresses of the interrupt service entry points for the devices on the corresponding interrupt level. Thus, if there are two devices on a level, there are two entries in the IBT; and each entry consists of one word, that word being the address of the interrupt service entry point to the ISS for the device represented by the IBT entry. For user-written core loads (as opposed to monitor system programs), the IBT for ILS04 is Section 8. Core Load Builder 35 constructed by the Core Load Builder and stored in the core image header record. When the Core Image Loader fetches a core load (including the core image header), the address of the IBT for level 4 is stored in location $IBT4, from which it is accessed by ILS04:. The IBT for ILS02 is a single word, $IBT2, which contains the address of DZOOO+4, regardless of the disk I/O subroutine present in the Resident Monitor. This address is stored in $IBT2 by the Core Image Loader as it fetches the requested disk I/O subroutine. The IBTs for the remaining ILSs are constructed and stored in the ILSs themselves by the Core Load Builder. After all subprograms have been relocated, the Core Load Builder constructs the IBTs. The IBTs for all ILSs except ILS02 are constructed as described below. Bear in mind that these ILSs are written with special constants stored in each IBT entry. These constants, which will be overlaid by the Core Load Builder, are as follows: The first eight bits of each constant represent the increment to be added to the loading address of the corresponding ISS to get the address of the interrupt service entry point; for IBM-supplied ISSs, this value is four, except for the "operation complete" entry point for the 1442 subroutines, for which the value is seven. The second eight bits are @ISTV plus the ISS number; thus, each IBM entry has an identifier to relate it to a specific ISS. The Core Load Builder fetches one word at a time from the IBT, i. e., one of the special constants occupying the IBT locations in the ILS. The second eight bits of the word fetched are used to compute the address of the ISS Table entry for the ISS number i.ndicated. If the ISS Table entry is non-zero, it contains the loading address of the ISS itself, which is then incremented by the value stored in the first eight bits of the word fetched. The resulting address, which is the address of the interrupt service entry point, replaces the special constant that supplied the two eight-bit values. If the ISS Table entry is zero, the special constant is replaced with the address of $STOP, the PROGRAM STOP key trap in the Skeleton Supervisor. This process of replacing special constants continues until a zero is fetched from the IBT, indicating that the entire IBT has been processed. Except for ILS04, this zero is the entry point to the ILS itselfo 36 INCORPORATING PROGRAMS INTO THE CORE LOAD PASS 1 The mainline is relocated first. Any calls found during this relocation are put in the Load Table. After the mainline has been converted, each subprogram represented in the Load Table is relocated, generally in the order found in the table itself. An entry is flagged as having been relocated by storing the address of the entry point in the third word of the entry. Before an entry is reloeated, the names of all the entry points to the entry being considered for relocation are compared with the name of each entry preceding it in the Load Table. A match indicates that the current entry is simply another entry point to a previously relocated subprogram. Thus, the current entry is not r,elocated; instead, the absolute address of the entry point is determined and stored in the third word of the entry to signify that it has already been relocated.o Furthermore, the names of all the entry points to the entry being considered for relocation are compared with the name in each entry in the Load Table following it. If a match occurs, the third words of both entries are filled in with the absolute address of the entry pointo Thus, the Load Table is scanned forward and backward for other entry points to the subprogram currently being considered for relocation. PASS 2 The Load Table is scanned during pass 2 in the same way as during pass 1. The only difference :LS that subprograms are relocated in a certain order during pass 2, thus necessitating multiple passes through the Load Table; in fact, one pass is required for each class of subprograms. 'Thus, all the in-cores (class 0) are relocated first, followed by LOCALs:1 subprograms in SOCAL 1 (class 1), subroutines in SOCAL 2 (class 2), and subroutines in SOCAL 3 (class 3), in that order 0 LOCALs AND SOCALs If during the first pass the Core Load Builder (phase 4) determines that an Assembler core load will not fit into core storage even with any LOCALs that have been specified, the core load building process is terminated. However, for a FORTRAN core load special overlays (SOCALs) of parts of the core load will be created during a second pass if this will make the core load fit. The decision of whether to proceed with a second pass is made after phase 4 accounts for the sizes of the LOCAL area, if any, the flipper and its table, and each of the SOCALs. If the check shows that SOCAL option 1 (SOCAL 1 and SOCAL 2) will be insufficient, then a further check is made for option 2 (all three SOCALs). If option 2 is still insufficient, processing is terminated; otherwise, a second pass is made. During pass 2, the entire core load is built again, but, unlike during pass 1, subprograms are relocated in a special order. First, the mainline and the in-core (class 0) subprograms are relocated, followed by: the flipper; the LOCALs, if any; the arithmetic and function (class 1) subprograms; the non-disk FlO (class 2) subroutines; and, if necessary, the disk FlO (class 3) subroutines. The same procedure described above is necessary if LOCALs are employed without SOCALs. In other words, LOCALs, as well as SOCALs, require two passes. INTERRUPT LEVEL SUBROUTINES (ILSs) After all other subprograms have been relocated, the Interrupt Transfer Vector (lTV) is scanned. Except for the entries for interrupt levels 2 and 4, a non-zero entry causes the corresponding ILS to be incorporated into the core load. (ILS02 and ILS04, unless supplied by the user, are a part of the Resident Monitor.) See Interrupt Branch Table, above, for a description of the processing of that part of an ILS. TRANSFER VE CTOR (TV) enable the LIB F statement to require only one storage location during execution. This is desirable because 1130 FORTRAN object code contains a very high percentage of calls to subprograms. Long branches to those subprograms would greatly incre ase core requirements for core loads over a method that employs short br.anches. By replacing the LIBF statement with a short BSI, tag 3, to a transfer vector entry, which could then supply the long branch to the desired subprogram, this problem is solved. The cost, of course, is that XR3 is taken away from the user and the transfer vector is limited to 255 words. This means the LIBF TV has a maximum of 85 3 -word entries, two of which become the floating accumulator (FAC) and an indicator for certain arithmetic subroutines. Thus, the user is limited to LIBFs to not more than 83 separate subprogram entry points per core load. There is no theoretical limit on the number of CALL entry points per core load, for the CALL statement is replaced by an indirect BSI to the desired subprograms. However, the number of CALL and LIBF references combined must not exceed the capacity of the Load Table, which is approximately 150 entries. The CA LL TV entry is one word only, the address of the subprogram entry point. This makes it possible to replace a CALL statement with an indirect BSI to the corresponding CALL TV entry, even though the address of the subpJ'ogram itself may not be known at the time the CALL is processed. When stored on disk in disk core image format (DCI), the LIBF TV follows the last word of the last subprogram in the core load. It may leave one word vacant in order to make the floating accumulator (FAC) begin on an odd boundary. The CALL TV immediately follows the indicator entry in the LIBF TV. During execution the TV extends downward in core storage from the lowest-addressed word in COMMON. Whereas the CALL TV entry consists of only one word (the address of the subprogram), the LIBF TV entry consists of three words. The first is a link word (initially zero), and the second and third are a long BSC to the subprogram entry point. Figure 10 shows the layout of the transfer vector in core storage. Linkage to WCALs The transfer vector consists of two parts: the LIBF TV and the CALL TV. The former provides the linkage to LIBF subprograms, the latter to CALL subprograms. The LIBF TV was created to The LOCAL/SOCAL flipper (FLIPR) is included in a core load if that core load requires LOCALs and/or SOCALs. The flipper transfers control to a LOCAL, Section 8. Core Load Builder 37 I Dummy one - word entry in CALL TV (if necessary) to ensure odd address for FAC Last LI BF First LlBF Disk I/O (( ~ Indicators FAC Last CALL Second First CALL CALL ~--~--~~~--~~I~I~rf .) ) I I I j ./~r_ _ _ _......jl t High ~Low Core ______.________ "--- ~ ~----------------~------~------~Jl~ CALL TV LlBF TV ______ ~~ _y------~1 COMMON Transfer Vector Figure 10. Layout of the Transfer Vector fetchin~~ it first, if necessary. It does likewise for a SOCAL, except that it is never entered if a subprogr31n is called that is a part of the SOCAL currently in the SOCAL area (see Linkage to the System Overlay~. The Flipper 'I able immediately precedes the flipper. It consists of a 6-word entry for each entry point specified in the LOCAL information in the SCRA (for a given mainline) that is referenced by a CALL and a 5·-word entry for each entry point referenced by a LIBF.. If a subprogram has more than one entry point but only one is specified in the LOCAL information (a specified LOCAL), there is a Flipper Table entry for each entry point referenced in the core load. The format of a 5-word (LIBF) entry in the Flipper Table is as follows~ Word 1-2 3 4 5 Description BSI L FLOOO Word count of the subprogram Sector address of the subprogram Entry point address in the subprogram The format of a 6-word (CALL) entry in the Flipper Table is as follows: Word 1 2-3 4 5 6 38 Description Link word BSI L FLOI0 Word count of the subprogram Sector address of the subprogram Entry point address in the subprogram Linkage to the System Overlays (SOCALs) In order to assure very fast transfer to a subprogram that is a part of a SOCAL that is in core storage at a given time, special transfer vector entries are made for SOCAL subprograms. They are different from the standard LIBF and CALL linkage:3, and they are different from the linkage to a LOCAL.. The SOCAL transfer time is approximately 20 microseconds, compared to 150-180 microseconds to a LOCAL. (Both timings assume a 3.6 microsecond storage cycle.) Figure 11 shows an entry in the LIBF TV for an in-core subprogram (entry 2) and the speci.allinkage in the LIBF TV for SOCAL subprograms (entries 3-8). Entry 1 is the LIBF TV entry for a SOCAL subprogram. The "disp" is a displacement to the second word of the linkage for the SOCAL in which the subprogr am is found. The example represented in Figure 11 is one that requires SOCAL option 2; TV entries 5 and 8 would not appear if option 1 were used. Entry 1 is the last entry in the LIBF TV, i. e., the highe8taddressed word of the transfer vector. Suppose that (1) a LIBF to FADD were made and (2) SOCAL 1 were not in core. The LIBF would be a BSI to the first word of entry 1, which would then BSI to the second word of entry 3. Entry 3 would MDX to the first word of entry 6, which would transfer control to the LOCAL/SOCAL flipper subroutine (FLIPR) at FL230:1 the entry point in FLIPR for fetching the arithmetic subprograms. The flipper would fetch SOCAL 1, change the third word of entry 3 to MDX to *-3, and BSC to the first word of entry 3, which then transfers control to FADD. The flipper would also ensure that the third words of entries .:1: and 5 were both MDX to *-12. LOW CORE 0\ I BSC FL210 I I BSC FL220 I BSS 1 I I 1 I BSS 1 1 I BSC L I I I I I MDX *- 12 1 I I I MDX *- 12 BSC FL230 BSS ENTRY 8 - a branch to the entry point in the flipper for fetching SOCAL 3; an unused word ENTRY 7 - a branch to the entry point in the flipper for fetch ing SOCAL 2; an unused word ENTRY 6 - a branch to the entry point in the flipper for fetchingSOCAL 1; an unused word ENTRY 5 - a branch to a subroutine in SOCAL 3 via word 3 of LlBF TV entry; a branch to fetch SOCAL 3 the first word of entry 3, followed by a transfer of control to FADD. The transfer has required only 2 short BSIs, a short MDX, and an indirect BSC. The linkage for a CALL to a function is somewhat different from that just described. Suppose that (1) SOCAL option 2 was used and (2) each SOCAL consists of two subprograms, FABS and FSQR being the functions in SOCAL 10 Figure 12 shows SOCAL 1, SOCAL 2, and SOCAL 3 as they are stored on the disk. The first 2 words of each of these SOCALs are the CALL TV for the subprograms in that SOCAL. A CALL to FSQR, for example, would be an indirect BSI to the second word of whichever SOCAL happened to be in the SOCAL area. IT this were SOCAL 1, control would be immediately transferred to FSQR. Otherwise, control would first be given to the LOCAL/SOCAL flipper at FL200, the entry point in FLIPR for fetching the function subprograms. The flipper would fetch SOCAL 1 and re-execute the original CALL to FSQR. DE FINE FILE TABLE I BSC I BSC I *-* I DC *-* I *-* I BSC I BSI 1 3 disp ENTRY 4 - a branch to a subroutine in SOCAL 2 via word 3 of LlBF TV entry; a branch to fetch SOCAL 2 ENTRY 3 - a branch to a subroutine in SOCAL 1 via word 3 of LlBF TV entry; a branch to fetch SOCAL 1 L I IDC FLOAT FADD ENTRY 2 - a Iink word; a branch to an in -core subroutine, i. e. , FLOAT I \. ENTRY 1 - a link word; a branch to the SOCAL linkage for a subroutine in SOCAL 1; the address of a subroutine in SOCAL 1, i.e., FADD HIGH CORE The processing of the DEFINE FILE Table normally consists of filling in word 5 (the sector address) for each entry in the DE FINE FILE Table preceding the mainline program. However, additional processing is required when a file must be truncated, i. eo, the space available on the disk is insufficient to store the number of records defined in the file. IT the file is in the User / Fixed Area, or if it is the only file in a particular Working Storage, then the Core Load Builder attempts to truncate it enough to fit. CALL TV for FABS, consisting of the entry point address of FABS CALL TV for FSQR, consisting of the entry point address of FSQR FABS FL200, the address of FL200 the flipper entry point the for in fetching SOCAL 1 Figure 11. SOCAL Linkage in the LIBF Transfer Vector Suppose now that F ADD were called again before some subprogram in either SOCAL 2 or SOCAL 3 were called. This time the LIBF would cause a BSI to the first word of entry 1 and then to the second word of entry 3. The MDX would then be to 1 1 FSQR Subroutines S b t" t--'-~1-,-I_Fun_ct_i~-,-1F_un_cti_on1+-~'~~::::y__--i,li-'-I~~u I~ SOCAL 1 SOCAL2 SOCAL 3 Figure 12. CALL Transfer Vector for SOCALs Section 8. Core Load Builder 39 First, the entire DE FINE FILE Table is fetched and stored in the unoccupied area allocated to the Load Table. If the Core Load Builder determines that a file can be truncated, the number of records and the disk block count in the appropriate DE FINE FILE Table entry are modified accordingly. As each entry is completed, all seven words are relocated in the same manner as the other words of the core load. The processing consists of comparing the file number of a DE FINE FILE T able entry with each of the file numbers in the FILES information in the SCRA, if any. If a match occurs, the name of the disk area associated with the file number obtained from the FILES information is found in LET/FLET, and the sector address of that disk area is placed in word 5 of the DE FINE FILE Table entry. If none of the file numbers from the FILE S information match the file number in the DEFINE FILE Table, the file is set up in Working Storage. In either case, the system cartridge is assumed unless a cartridge ill has been specified in the FILES information. The format of a DEFINE FILE Table entry is as follows: Word 1 2 3 4 5 6 7 Description File number Number of records in the file Number of words per record Address of the associated variable Sector address of the file; initially zero, filled in by the Core Load Builder Number of records per sector Disk block count of the file Symbolic Reference @FLNR @RCCT @WDRC @ASOC Subroutine LSOOO RHOOO NWOOO CNOOO BTOOO LKOOO EXOOO TLOOO PMOOO GPOOO Search LET/FLET Fetch the mainline program header record Fetch the next word in sequence from the data buffer, reading a new sector when necE:ssary Test a subroutine name for disk I/O Add an entry to the Load Table Fetch a phase Exit to DUP, Supervisor, or Core 1m age Loader Print a message and transfer to EXOOO Fetch one of the messag 8 phases and transfer control to it Read from or write to the disk l PHASE 1 Phase 1 performs the initialization functions that must be done prior to the relocation of the mainline. Initialization consists of, principally, fetching DCOM and extracting the paran1:eters that are needed by the Core Load Builder, and fetching the: mainline header record and saving the information therein. In addition, phase 1 makes an entry in the Load Table for each LOCAL and NOCAL specified in the LOCAL and NOCAL information in the SCHA, if any. The following is a list of the subroutines that comprise phase 1 and the functions they perform. Subroutine @SCAD @RCSC @BCNT Function INOOO LNOOO Function Initialize the Core Load Builder, process the mainline header Enter LOCAL and/or NOCAL names in the Load Ta"ble PHASE DESCRIPTIONS PHASE 2 PHASE 0 Phase 0 always remains in core. It consists of two main sections, (1) the basic subroutines required by all other phases and (2) the constants and work areas shared by two or more subroutines. The latter section is known as RCOM. The following is a list of the subroutines that comprise phase 0 and the functions they perform. 40 After the execution of phase 1, part of phase 2 remains in core until the core load is completed. Phase 2 contains the Master Control subroutine, the relocation subroutine, and the transfer subroutine, among others (see below). Master Control supplies the basic logic for the Core Lbad Builder. The relocation subroutine supplies the logic for relocating a program, i. e., incorporating it into the core load. The transfer subroutine provides the logic for transferring a relocated word of the core load to the CIB, the CIB buffer, or Working Storage, whichever is appropriate. These three subroutines are basic to the process of building a core load. The following is a list of the subroutines that comprise phase 2 and the functions they perform. Subroutine MCOOO RLOOO TSOOO TROOO XCOOO DCOOO MVOOO MLOOO CKOOO DFOOO FMOOO Subroutine HROOO CCOOO TYOOO SVOOO Function Master control for the Core Load Builder Relocate a program; convert it from disk system format to disk core im age format Process the IBT Output one data word to core or disk Fill in exit control cells during pass 2 Process DSA statements Output the DEFINE FILE Table Check mainline loading address for validity Check for overlay of core load and COMMON Process the DE FINE FILE Table entries Print a map of the DE FINE FILE Table Function Process the program header record for subroutines Control the loading of subroutines by type Verify subroutine references Scan Load Table for multiple references PHASE 4 Phase 4 performs two functions. It incorporates ILSs into the core load and it determines whether or not a core load fits in core storage or can be made to fit with SOCALs by computing the core that can be saved by employing SOCALs. The following is a list of the subroutines that comprise phase 4 and the functions they perform. Subroutine ILOOO ETOOO Function Fetch and relocate an ILS Calculate core load size PHASE 5 PHASE 3 Phase 3 performs four functions. It checks the information in subroutine header records (except ILSs) and stores it in RCOM. It also ensures that during pass 2 the subprograms are relocated by class, i. e., class 0 first, LOCALs second, class 1 third, class 2 fourth, and class 3 fifth. It compares the reference to each subprogram, i. e., CALL or LIBF, with the type (from the program header record). Lastly, as a subprogram is chosen for relocation, phase 3 checks whether or not it has already been relocated under a different name, i. e. , another entry point. The following is a list of the subroutines that comprise phase 3 and the functions they perform. Phase 5 creates the Flipper Table if LOCALs have been specified, sees to it that the flipper is relocated, and provides the logic for building each SOCAL. This phase is flip-flopped with phase 3. It is brought into core storage once if there are LOCALs and once for each SOCAL, which implies a maximum of four times. The following is a list of the subroutines that comprise phase 5 and the functions they perform. Subroutine PLOOO PSOOO FFOOO Function Process LOCAL subprograms Process SOCAL subprograms Relocate the LOCAL/SOCAL flipper, FLIPR Section 8. Core Load Builder 41 PHASE 6 PHASE 11 Phase 6 performs several miscellaneous functions that must follow the actual building of most of the core load. The most important of these is the construction of the transfer vector from the Load Table. Other functions performed in phase 6 are filling in exit control cells and completing the core image header. The following is a list of the subroutines that comprise phase 6 and the functions they perform. Phase 11 formats and prints (via the principal print device subroutine) the files portion of the map. It is entered only if (1) a map is requested and (2) there are files defined. Subroutine --TVOOO TPOOO Function. PHASE 12 Phase 12 formats and prints (via the principal print device subroutine) the allocations of core storage. It is entered only if a map is requested. Build the transfer vector Complete core image header, fill in exit control cells, etc. DEBUGGING/ANAL YSIS AIDS PHASE 7 Phase 7 formats and prints (via the principal print device subroutine) all messages from ROO-RIO. These messages contain no variables. PHASE 8 Phase 8 formats and prints (via the principal print device subroutine) all messages from RI6-R23. These messages contain a 5-character name following "R XX". PHASE 9 Phase 9 formats and prints (via the principal print device subroutine) all messages from R39-R47. These messages contain a hexadecimal address following "R XX". PHASE 10 Phase 10 formats and prints (via the principal print device subroutine) all messages from R64-R68. These messages contain a 5-character name following "R XX". 42 Stopping the Core Load Builder at the proper time is often the key to pinpointing problems in monitor system and, in some cases, user programs. There are NOP instructions in several critical locations in the Core Load Builder; they are: LKOOO+l, PMOOO+l, INOOO+l, MCOOO, EI000+l, E2000+1, E3000+1, and E4000+1. These NOPs can be replaced by WAIT instructions so that core dumps can be taken at various stages of the core load building process. A WAIT replacing the NOP at PMOOO+1 is. often the most useful, for it can be used to stop the Core Load Builder just before an error message is printed. Bear in mind that, even though an error is detected by the Core Load Builder, it may well be due to a failure somewhere else in the monitor system. The message printed may not be a very good indication of the error; many checks are present in the Core Load Builder simply to keep it from destroying itself. For example, a common message is R16, and the name given in the message may well be something that makes no sense or was not referenced in the core load. The problem may well be erroneous output from the FOR TRAN Compiler or Assembler Program or a destroyed User Area. In such a case an analysis of the contents of the data buffer BUFLO usually provides the clue to the error. To facilitate path tracing through the Core Load Builder, all subroutines in the Core Load Builder are entered with BSI instructions. SE CTION 9. FLOWCHARTS CCAT: DCTL: STORE: FILEQ: DDUMP: DUMPLET: DELETE: DEFINE: DEXIT: PRECI: DUP01 DUP02 DUP03 DUP04-06 DUP07-08 DUP09 DUP10 DUP11 DUP12 DUP13 The Disk Utility Program (DUP) is actually a group of programs provided by IBM to perform certain frequently required operations involving the disk such as storing, moving, deleting, and dumping data and/or programs. These operations are called, for the most part, by user-supplied DUP control records. DISK UTILITY PROGRAM (DUP) CORE STORAGE LAYOUT Figure 13 shows the layout of core storage during DUP operation. Panel 1 shows the overlay scheme used for 4K systems, panel 2 for 8K systems, panel 3 for 16K systems, and panel 4 for 32K systems. CD CD CD COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ DISKZ DISKZ Overlay Area Overlay Area Overlay Area Overlay Area STORE/DUMP Buffer STORE/DUMP Buffer STORE/DUMP Buffer STORE/DUMP Buffer UPCOR Phase DCTl DCTl DCTl 0 DUP OPERATION When DUP is called, the phases CCAT and DUPCO are brought into core storage. CCAT forms the required DUP I/O subroutine sets (phases 14, 15, 16) and records them. CCAT also forms the balance of UPCOR, including CATCO and the principal print device subroutine, and is completely over laid by part of UPCOR, leaving only the DUPCO part of phase 1 in core storage as part of UPCOR. Control is passed to REST (of DUPCO) and REST in turn calls DCTL into core storage. In general, DCTL reads, prints, decodes and checks the control records, and then calls in the required phase to continue processing as the function requires. The called phase completes the function, including the printing of the terminal message. Control is then passed to REST (of DUPCO), which restores CATCO areas to zero as required for initialization, fetches DCTL if it is not already in core (4K system), and branches to DCTL to read the next record. When a monitor control record is read, a CALL EXIT is executed by DEXIT. tJPCOR Phase UPCOR Phase UPCOR Phase Figure 13. Core Layout During Disk Utility Program Operation Section 9. Disk Utility Program (DUP) 43 DUP CONTROL RECORDS In the table below, DUP control records are classified by type according to the phases required to complete their processing. _. Type STORE STOREMOD STOREDATA STOREDATACI STORECI Phases Required DCTL, STORE ,DUPCO DCTL, FILEQ,STORE, DEXIT, Core Load Builder, PRECI, DCTL, STORE, DUPCO DUMP DUMPDATA DELETE DCTL,DDUMP,DUPCO DCTL,DLETE,DUPCO DEFINE FIXED AREA DEFINE VOID ASSEMBLER DCTL,DFlNE,DUPCO DEFINE VOID FORTRAN DUMPLET DUMPFLET DWADR DCTL,DMPLT ,DUPCO DCTL,DEXIT ,ADRWS Program, DUPCO LOCATION EQUIVALENCE TABLE (LET)/FIXED LOCATION EQUIVALENCE TABLE (FLETt LET is the table through which the sector addresses of programs and data files stored in the User Area may be found. Each entry in this table consists of three words, the first two of which are the program or file name in name code. The third word is the disk block count of the program or file. Bits 0 and 1 of the first word denote the format of the entry, i. e. , DSF, DCI, or DDF. The corresponding bit patterns are 00, 10, and 11. The 01 pattern is reserved for 44 future use. For a DSF subroutine having multiple entry points, the disk block count is zero for all entry points except the first. Padding, wherever required to ensure that DCI programs and data files are sectorized, is reflected in LET as if a program called "lDUMY" were stored. That is, each instance of padding generates a lDUMY entry in LET, and the block count for each of these entries is the number of disk blocks to the nearest sector boundary. The last entry in LET is always a lDUMY entry that reflects the number of disk blocks from the end of the last program stored in the User Area to the end of the disk. Each sector of LET contains a header, which occupies the first five words of the sector. The first word contains the sector number, which is 0, 1, ... , or 7. The second contains the sector address of the User Area for this cartridge. The third iEi reserved for future use. The fourth contains 315 mtnus three times the number of LET entries found in this sector, i. e., the number of words unused (available) in this sector. If this is not the last sector of LET on this cartridge, then the fifth word contains the address of the next sector of LET. If it is the last sector of LET and if there is no FLET on this cartridge, this word contains zero; otherwise, it contains the address of the first sector of FLET. In other words, this fifth word (chain address) is used to chain from LE T through FLET, sector by sector. Bits 0-3 of the fifth word are always zeros. Note that, when referring to a dump of LET, the above header words are expressed in hexadecim:ll. FLET is the table through which the sector addresses of programs and data files stored in the Fixed Area may be found. FLET is analog;ous to LE T in the format of its entries and its use by the monitor system programs. LET /FLET is searched by LETSR of DCTL for the name decoded from DUP control records of the STORE, DUMP, and DELETE types. The information required by other DUP phases is recOl~ded in CATCO. If a DSF program is being stored, then LETSR also searches LET /FLET for the E:econdary entry point names as well. STORE inserts the required entries into LE T / FLET (one entry for each entry point). If a DCI program or data file is being stored and padding is required, then a IDUMY LET/FLET entry is inserted prior to the named LET/FLET entry. All secondary entry points have their entries on the same sector as the LE 'r/FLE T entry for the primary entry point. DUP CONCATENATED COMMUNICATIONS AREA (CATCO) Relative Address Location !decimal~ #MDF1 #MDF2 #MPSW #NAME #NCNT #PCID #PIOD #PPTR #RP67 #SCRA #TODR #UHOL #ULET #USZE #WSCT 13 14 12 4 15 50 25 26 17 65 18 22 80 23 85 CAT CO contains the following elements: • DCOM values that are read from DCOM and placed in CA TCO by CCAT of DUPCO. • IOAR headers (word counts and sector addresses) required by DUP, furnished to C CA T by the System Loader, converted by CCAT to two-word entries each, and placed in DCOM by CCAT of DUPCO. • Words used only by DUP for switches, small work areas, and communications between various DUP phases. • I/O addresses used by DUP, initialized by CCAT of DUPCO. DCOM VALUES DCOM is read from the master cartridge by CCAT of DUPCO whenever DUP is called by the Monitor Control Record Analyzer. The following parameters in DCOM are used by DUP: Location #ANDU #BNDU #CBSW #CIAD #CIBA #CIDN #CSHN #DBCT #DCSW #ENTY #FCNT #FHOL #FLET #FMAT #FPAD #FRDR #FSZE #JBSW #LCNT Relative Address (decimal) 35 40 10 27 60 55 90 6 24 16 7 20 75 70 45 19 21 9 11 These parameters are referred to by an index register that contains the address of the first word of DCOM plus the displacement given above. Whenever a parameter in DCOM has been changed by DUP and control is being relinquished to another monitor system program, DUP writes the DCOM values in CATCO to DCOM on the master cartridge before exiting. If a change has been made that refers to a satellite cartridge, the DCOM values are also written to DCOM on the affected cartridge. See the description of DCOM in Section 2. Communication Areas for details regarding the above parameters. IOAR HEADERS CA TCO contains the IOAR header for each phase of DUP required by other phases during the execution of the various D UP functions; they are: Location DCHDR STHDR FLHDR DMHDR DLHDR DTHDR DFHDR DXHDR UCHDR Phase Name DCTL STORE FILEQ DDUMP DMPLT DLETE DFINE DEXIT UPCOR Phase Number 2 3 4 5 6 7 8 9 10 Section 9. Disk Utility Program (DUP) 45 Location ----- Phase Name PIHDR SllIDR PTHDR CrnDR KFACE CFACE PFACE PRECl Phase Number 11 12 13 17 These headers are initialized by CCA T of DUPCO whenever the Monitor Control Record Analyzer calls DUP. The contents of these headers are not altered by any phase of DUP. Each 10AR header consists of two words, word 1 containing the word count and word 2 containing the sector address of a phase. Each pair is aligned on an even boundary. SWITCHES The following DUP switches are initialized by CCAT of DUPCO and not altered by any function of DUP. ADDR2 -- Keyboard interrupt address, to be put in location /0045 by MASK of DUPCO so that during a masked operation, the Keyboard interrupt is delayed by DUP until a critical operation is completed. KBREQ -- Contents of location /0045, saved by CCA T of DUPCO when DUP is given control, and restored by DEXIT of DUP when leaving DUP. INOUT -- Indicator for the princ~pal I/O device when DUP was called by the Monitor Control Record Analyzer. Negative = Paper Tape. Zero = Cards. Positive = Keyboard. PTPON -- A non-zero value if paper tape devices are are present on the system. IBT -_. Nine locations containing the interrupt branch table for level 4, initialized by CCAT of DUPCO and the card and paper tape interface phases. The following locations are used by DUP for internal communication, and are initialized to zero by REST before each DUP control record is processed. 46 ASMSW -- Set non-zero by DFCTL of DCTL when a DEFINE control record indicates that the Assembler Program is to be deleted from the master cartridge. Used by DFINE for functional flow control. BITSW -- Set non-zero by RE015 of DCTL to allow the MDUMP subroutine in DUPCO to call the System Core Dump program while executing various DUP phases. It is set on the basiE: of the contents of column 35 of the DUP control records. This column is not normally used, but :It may be used to obtain snap-shot core dumps while performing DUP operations. A zero punched in this column causes all possible DUP dumps to occur. Other numbers cause core dumps to be taken when the phase with the same phase ID is in control (See DUP Diagnostic Aids.). BLKSW -- Set by the DUP I/O interface subroutine (in 10BLK) when reading control records if the record is neither a monitor control rec'ord (//) or a DUP control record (*D or *S) '. If turned on, DCTL turns it off and returns to the GETHO entry of the DUP I/O interface subroutine. This permits DUP to pass non-control records, including blanks, at the maximum rate of 1000 per minute with a single buffer. CIERR -- Set to a DUP error code for an error detected by PRECl during a STORECl operation. DCTL checks CIERR when entered from PRECI (CISW is non-zero) and goes to DEXIT thru LEAVE of DUPCO with the specified erJ('or code. PRECl cannot go directly to LEAVE because DUP UPCOR may not be in core storage at this time due to the possibility of being overlaid by the core load being built. CISW -- Set by DCTL when *STORECl is the function specified on the DUP control record. Used by DCTL to detect an entry from PRECI (during a *STORE Cl function). Used by STORE to determine the functional path to be used. CLBSW -- Set non-zero by PRECI. Used by STORE to indicate an entry from PRECl after the Core Load Builder has built the core load for the STORECl function. CL1, CL2 -- The addresses of the lower and upper limits, respectively, of parameters in CATCO to be cleared to zero by REST of DUPCO. FRWS -- Set non-zero by SC130 if the FROM field is Working Storage. Used by DCTL for functional flow control and error checking. CNTNO -- Used by GETBI of the DUP I/O interface subroutine (in 10BLK) to record the count of binary records being read or punched. Permits checksum and sequence check operations. FXSW -- Set non-zero by SC130 or SC170 of DCTL when either the FROM or the TO field, respectively, of the DUP control record specifies the Fixed Area or when the control record specifies DEFINE FIXED AREA. Used by DCTL for error checking and functional flow control. Used by DFINE, STORE and DUMP for functional flow control. DATSW -- The binary equivalent of the decimal value in the count field of the DUP control record. Entered by DACNT of DCTL. A non-zero value represents either STOREDATA, DUMPDATA, DEFINE FIXED AREA count, or STORECI with *FILES, *LOCAL, and *NOCAL control records following. Contents are in disk blocks if the input is from disk, records if from an I/O device. U sed by DUMP, STORE, DE FINE and FILEQ as a count; also used to control functional flow. FILEQ clears DATSW before calling STORE. DBADR -- Set by LETSR of DCTL to the disk block address of the program represented by the last LET /FLET entry searched. Used by DUMP and DELETE to indicate the disk block address of the desired program or data file. DELSW -- Set by LETSR of DCTL to point to the required entry in LET /FLET minus one word. Actually contains a value somewhere in the buffer LETAR. Used by DMPLT when dumping the entry point(s) or name of a single program. Used by DELETE to point to an entry in LET /FLET that is to be deleted. Used by STORE to point to an entry in LET /FLET where the entry point(s) is to be inserted. DFNSW -- Set by DFCTL of DCTL to indicate a DEFINE FIXED AREA operation. Used by FRLAB of DCTL to bypass the decoding of the FROM field. DKSAD -- Set by DUP30 and DUP34 of DUPCO to indicate the sector address (without a logical drive code) of the current GET or PUT operation. DUMPP -- Two words located on even boundary, set by all DUP phases requiring special monitoring dumps. Used by MDUMP of DUPCO to specify lower and upper limits to be dumped to the printer. FORSW -- Set non-zero by DFCTL of DCTL when a DEFINE control record indicates that the FOR TRAN Compiler is to be deleted from the master cartridge. Used by DFINE for functional flow control. HOLSW -- Set non-zero by DCTL when a STOREDAT A or a DUMPDAT A control record contains an H in column 11. Used by STORE and DUMP to allow data movement without any conversion for the I/O devices, i. e., 1 word to 1 column or 1 frame. 10SW -- Set non-zero by either SC130 or SC170 of DCTL when any I/O device is specified in the FROM or TO field of the DUP control record. Used by DCTL for error checking and functional flow control. Used by DUMP and STORE for functional flow control. LETSW -- Set positive by LECTL and negative by FLCTL of DCTL. Used by DUMPLET to indicate, respectively, a full LET/FLET dump or a FLET dump only. LSTLF -- Set by LETSR of DCTL to the sector address (with a logical drive code) of the last LET / FLET sector searched. If only one sector was searched, then the address of that sector is entered in LSTLF. Used by DUMP and DELETE to identify the logical drive required. MODSW -- Set non-zero if STCTL of DCTL detected a STOREMOD function specified by the DUP control record. Used by STORE for functional flow control. NAMSW -- Set non-zero by LETSR of DCTL when a name is found in LET/FLET that matches the name Section 9. Disk Utility Program (DUP) 47 specified on the DUP control record. Used by DCTL for error detection and fWlCtional flow controL Used by DUMPLET to indicate that only the specified LET /FLET entry is to be dumped. NEGS\V -- Set non-zero by DFCTL of DCTL when a minus sign is detected in column 31 of a DEFINE FIXED AREA control record. Used by DEFINE to indicate expansion (zero) or contraction (nonzero) of the Fixed Area. PGMHL --Word count (length) of the program header in DSF programs. Set by RDHDR of DCTL to the actual program header length. Used by STORE to start the placement of the first data header in the DSF output. Set by DUMP from the program header. Used by STORE to update LET with the required number of entries. P1442 _.- Set by CCAT of DUPCO to contain the word count and sector address of the System 1442 subroutiine. Used by DDUMP to read the System 1442 subroutine into core when dumping to cards. PHDUP -- Duplicate of $PHSE to permit printed identification of the DUP phase requesting a core dump. PRPAR -- Two words specifying the default limits to be dumped by MD UMP. Set by any module of DUP desiring to use MDUMP for monitoring DUP's status. Usually set to point at key parameters and work areas. PRSW _.- Set non-zero by SC170 of DCTL when printing is specified as the desired output on the DUP control record. Used by DCTL for error detection and by DUMP for functional flow control. PTSW -.- Set non-zero by SC130 or SC170 when paper tape is specified in the FROM or TO field of the DUP control record. Used by DCTL for erro r detection and functional flow control. Used by DUMP for functional flow control. SDWDS -- The number of words yet to search in the current LET /FLET sector. Set by LETSR of DCTL. Used by LETSR of DCTL to test for the sector search complete condition. STCSW -- Set non-zero by ST400 of DCTL when the CI is detected in columns 11 and 12 of the 48 STOREDA T ACI control record. Used by STORE for functional flow control. STSW -- Set non-zero by STCTL of DCTL when a STORE control record is found. Set by LETSR of DCTL to the sector address (with a logical drive number) of the LET /FLET sector that contains the lDUMY entry that may be replaced by the entry for the program to be stored. Used by DCTL for functional flow control. Used by STORE to hold the LET /FLET sector address and drive code prior to inserting the LET /FLET entry for the program or data file to be stored. TEMP1, TEMP2 -- Two words, on an even boundary, used by various phases of DUP for miscellaneous purposes; i. e., DUP10 of DUPCO returns four EBCDIC characters in TEMP1 and TEMP2 as the result of converting from binary to hexadecimal for purposes of printing. TOWS -- Set non-zero by SC170 if the TO field is Working Storage. Used by DCTL for error checking and functional flow control. T3MSW -- Set non-zero by STCTL of DCTL when a type 3 or 4 subroutine contains a SOCAL level number specified on the DUP control record. Used by STORE to modify the type field in the program header before storing the subroutine to disk. UASW -- Set non-zero by SC130 or SC170 of DCTL when either the FROM or TO field of the DUP control record specifies the User Area. Used by DCTL for error checking and functional flow control. Used by STORE for functional flow control. WSSW -- Set non-zero by SC130 or SC170 of DCTL if the FROM or TO field of the DUP control record speCifies Working Storage. Used by DCTL for error detection. Used by DUMP and STOR:~ for functional flow control. XEQSW -- Set non-zero by PLUS2 of DCTL when calling in the required DUP phase to indieate that execution of that phase is desired rather than returning to PLUS2. Set non-zero by any other DUP phase using GET of DUPCO to fetch other phases from the disk that are to be executed immediately. Used by GET of DUPCO"to determine whether to return to the link address (zero) or to execute the phase just fetched (non-zero). The following switches are initialized to zero by CCAT of DUPCO, set by PLUS2 of DCTL, and not reset by REST of DUPCO. These are cleared by DEXIT before UPCOR is saved in preparation to calling the Core Load Builder. This forces DCTL on return from the Core Load Builder via PRECI to fetch STORE again as it may have been overlaid by the core load being built. PH2 -- Set non-zero by PLUS2 of DCTL when fetching another DUP phase. Used by REST of DUPCO: if zero, DCTL must be fetched from disk; if non-zero, DCTL has already been fetched. PH3 -- Set non-zero by PLUS2 of DCTL when fetching STORE. Used by PLUS2 of DCTL: if zero, STORE must be fetched from disk; if non-zero, STORE has already been fetched. PH4 -- Set non-zero by PLUS2 of DCTL when fetching DDUMP. Used by PLUS2 of DCTL: if zero, DDUMP must be fetched from disk; if non-zero, DDUMP has already been fetched. IOREQ -- Set non-zero by PL US2 of DCTL in case I/O other than from the specified I/O device is required (i. e., Keyboard input when the DUP operation is a STORE from cards). Checked by READ of DCTL, and, if still non-zero, the principal I/O section (DUP phase 14) is brought back into core storage. performed during any DUP operation. The contents of this buffer are in packed EBCDIC. IOBLK -- Set to the starting address for the I/O block portion of UPCOR. The I/O block contains one of phases 14, 15, or 16 of DUP. SDBUF -- Set to the address of the 322-word buffer used by the STORE, DDUMP, and DELETE functions of DUP. This buffer always resides in the first 4K of core storage. LETAR -- Set to the address of the 322-word buffer used for the LET /FLET search of DUP. This buffer is also a one-sector buffer, or the second half of a two-sector buffer used in disk I/O operations. PEBUF -- Set to the address of a buffer used for printing the DUP control records (41 words in packed EBCDIC) or for printing a LET dump, a FLET dump, a program dump, or a data dump (61 words in packed EBCDIC). THIS -- Set to the address of one of two buffers used for double buffering of binary input (see NEXT). The buffer is 81 words long. NEXT -- Set to the address of one of two buffers used for double buffering of binary input (see THIS). The buffer is 81 words long. DUP PHASE DESCRIPTIONS I/O ADDRESSES The following are the I/O addresses required by the various DUP phases. They are initialized by CCAT of DUPCO when DUP is given control. All except THIS and NEXT remain as initially set. All (except SDBUF) contain the address of an I/O buffer in UPCOR. Thus, the locations of the referenced buffers are dependent on core size; in any case, they always reside in the upper 4K of core storage. SDBUF always resides in the first 4K of core storage. CRBUF -- Set to the address of an 81-word buffer used for reading DUP control records in unpacked EBCDIC. HDBUF -- Set to the address of the buffer used for printing the page heading after each page restore DUP COMMON (DUPCO) • Initializes the I/O phases required by DUP and builds the DUP Communications Area (CA TCO). • Performs functions commonly required by other DUP phases. The initialization function of DUPCO is performed by a subroutine known as CCAT. CCA T resides in an area reserved for the System print subroutine, but is not overlaid by it until all other initialization has been completed. This initialization includes: • Construction of the DUP paper tape I/O phase if paper tape is attached. This phase is written to Section 9. Disk Utility Program (DUP) 49 the disk area reserved for DUP phase 16 at System generation time. • Construction of the DUP principal I/O phase (without Keyboard). This phase is written to the disk area reserved for DUP phase 15 at System generation time. • Construction of the DUP principal I/O phase. This phase is written to the disk area reserved for DUP phase 14. This phase is left in core storage at IOADR. • Initialization of all I/O-dependent switches in CATCO. • Incorporation of DCOM from the master cartridge into CATCO. • Incorporation of IOAR headers (word counts and sector addresses) of other DUP phases into CATCO. This information is supplied to CCAT by the System Loader. • Initialization of DUP's page heading buffer with the heading contained in sector @HDNG. • Fetching the System device subroutine for the prineipal print device. This subroutine overlays all but a few words of CCAT. These last words are cleared to zero just before branching to REST. The functions that are common to all DUP phases are included in the non-overlaid section of DUPCO. These functions are provided by the following subroutines: WR TDC -- This subroutine is used by STORE, DELETE, and DEFINE when it is necessary to update DCOM. This includes the updating of DCOM on any affected satellite cartridge as well as on the master cartridge. PHIDM ._- This subroutine is used to modify the next-to-high-order hexadecimal digit of $PHSE in COMMA. It is used primarily by DUP's I/O functions to illustrate in a core dump the I/O operation last performed. The modifications are: 1 2 50 Read from disk Write to disk 4 5 8 9 A Convert binary to EBCDIC Print terminal messag;es Read cards Read paper tape Read Keyboard PHID -- This subroutine is used to record the phase ID of the phase in execution in $PHSE of COMMA. It is also used by some DUP phases to illustrate the progress of execution from one section of the phase to the next. When used for this purpose, the high-order digit of $PHSE is changed to the appropriate phase section modifier. A core dump indicates the last section of the phase that was executed. MASK -- This subroutine is used to prevent: recognition of the INTERRUPT REQUEST key. The function of this key is to terminate the current job, but DUP must not allow this termination to take place while in a critical operation. Therefore, functions that affect LET /FLET, the User or Fixed Area, the CIB, and DCOM delay its recognition (STORE, DELETE, DEFINE). LEAVE -- This subroutine is used to fetch DUP's exit phase (DEXIT) to print an error message or service a special exit, such as an exit to the Core Load Builder (STORE CI function), an exit to the ADRWS program (DWADR function), or an exit to the Supervisor following the trapping of a monitor control record. MDUMP -- This subroutine makes selective calls to the System Core Dump program. See DUP Diagnostic Aids. BINEB -- This subroutine is used to convert binary numbers to EBCDIC hexadecimal charact,ers. It is used primarily to convert a number for insertion into a phase termination message, e. g. , a cartridge ID, a disk block count. PRINT -- This subroutine is used to print a line on the principal print device. It interfaces with the System principal print device subroutine. PAGE -- This subroutine is used to skip to channell and print a page heading if the principal print device is the 1132 or 1403 Printer. If the Console Printer is the principal print device, five carriage returns are executed before the page heading is printed. LINE -- This subroutine is used to single-space the principal print device. REST -- This subroutine is used to chain from one DUP function to the next. When a function is completed without errors, the DUP phase in control prints its termination message and exits to REST. REST determines whether or not it is necessary to bring DCTL into core storage (i. e. , core size is 4K, or DCTL has not yet been loaded), and, if necessary, fetches DCTL. REST then exits to DCTL. ENTER -- This subroutine is used to save the accumulator and extension, the overflow and status indicators, as well as XR1, XR2, and XR3. XRl is then loaded with the address of the CA TCO pointer. RTURN -- This subroutine is used to restore the contents of the accumulator and extension, the overflow and carry indicators, as well as XRl, XR2, and XR3, as saved by the ENTER subroutine. GET -- This subroutine is used to read the disk using DISKZ. XR3 points to the IOAR header for this read when GET is entered, and XRl contains the address of the CATCO pointer. PUT -- This subroutine is used to write to the disk using DISKZ. XRl and XR3 are initialized in the same manner as described for the GET subroutine. Some error checking is done of the word count and sector address in the case of GET and PUT. No check is made in GET or PUT as to the validity of the logical drive code associated with the sector address. GET and PUT assume the proper logical drive code has been included with the sector address. Errors Detected The following DUP errors are detected in DUPCO by the GET and PUT subroutines: D92 and D93. DUP CONTROL (DCTL) • Reads, prints and decodes DUP control records. • Sets switches in CA TCO to reflect the parameters speCified on the DUP control record. • Searches LET for the name specified on STORE, DUMP, DUMPLET and DELETE type control records. • Detects errors in the fields of the DUP control records. • Calls into core storage the required DUP phase and exits to it. DCTL remains in core storage during DUP operations for configurations of 8K or larger, except during STORECI. DCTL is executed after the REST function of DUPCO for each DUP control record as well as after PRECI during the processing of a STORECI control record. DUP Control (DCTL) may be considered in three logical parts: the READ subroutine, the DCTL subroutines, and the PLUS2 subroutine. READ Subroutine This is the entry point into DCTL. It performs the following functions: • Reads and prints DUP control records. • Flushes invalid DUP subjobs. • Checks for a monitor control record and exits when one is detected. • Ensures that the required DUP I/O subroutine set is in core storage. • Decodes the function field of the DUP control record into the variousDUP types. • Goes to one of the subroutines in the second logical part of DCTL to continue the decoding and processing of the specified type of DUP control record as follows: Control Record Subroutine Called * STORE *DUMP *DUMPDATA *DUMPLET *DUMPFLET *DELETE *DEFINE *DWADR STCTL DUCTL DACTL LECTL FLCTL DLCTL DFCTL WACTL Section 9. Disk Utility Program (DUP) 51 DCTL Subroutines Buffers Used By DCTL These subroutines make up the second logical part of DCTL. These subroutines perform the following functions for their particular control record type. Control records are read into the area defined by CRBUF and converted to packed EBCDIC in the area defined by PEBUF. It is from PEBUF that the control record is printed by the principal print devi(~e subroutine and from which the various fields are decoded. Binary records read for STORE are placed into the two buffers specified by THIS and NEXT in order to process secondary entry points that are on the header record. LET/FLET sectors are read one at a time into the area specified by LETAR to be searched for the name specified on the control record. • Decode the balance of the Function field as required. • Decode the FROM and TO device or area fields. • Decode the Name field and perform a LET /FLET search if the name is required. • Decode the Disk I/O subroutine required with STORECI. • Decode and record the Count field as required. If the operation is a STORE CI, FILEQ is brought into core storage using the PLUS2 subroutine. Errors Detected • Decode the FROM and TO Cartridge ID fields. • Check the validity of all fields and go to the DEXIT phase if any errors are detected. • Prevent restricted phases from being called in and executed during Temporary mode of operation. • Record all required data in CATCO for use by the required phase. • Go to the appropriate entry point in the PLUS2 subroutine to fetch and transfer control to the DUP phase required to finish the processing of the specified DUP subjob. PL US2 Subroutine This subroutine is the third logical part of DCTL and is the normal-exit subroutine. The various entry pOints to PLUS2 set up respective IOAR headers that cause the desired DUP phase to be called into core storage and executed. This subroutine performs the following functions: • Sets up the IOAR header if the required DUP phase is not already in core storage. • Fetches and/or executes the required DUP phase o 52 The following DUP errors are detected in DCTL: DOl, D02, D03, D05, D06, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23, D24, D25, D26, and D27. STORE The STORE phase of DUP resides in the DUP phase overlay area if the core size is 4K or 8K, 0:1:' in the overlay area plus 8K if the core size is 16K or 32K. This phase is read into core storage the firEit time DCTL recognizes a STORE control record. It remains in core storage on a 16K or 32K machine as long as DUP has control of the system (i. e.:, must be brought back into core storage when performing a STORE CI operation). STORE may be considered in seven logical parts, each of the following subroutines constitutinl~ one logical part. STOOO Subroutine This is the entry point to STORE. It serves as a master control for STORE, causing various other sections of STORE to be executed as they are required for various STORE operations. lOWS Subroutine DOLET Subroutine This subroutine is executed whenever a STORE operation is from card or paper tape. It provides the following functions: This subroutine is executed whenever a STORE operation is to the User Area or Fixed Area (except STOREMOD). It performs the following functions: • Reads card or paper tape records punched in system, data, or core image format. • Reads the LET or FLET sector to which the entry point name (or names) is to be added. • Moves data from card or paper tape buffer(s) to a disk buffer. • Checks if a lDUMY padding entry is required before the name is entered when storing data or core image programs to the User Area. • Writes the disk buffer to Working Storage (or to the User Area or Fixed Area if the operation is a STOREDATA or STOREDATACI to the User Area or Fixed Area). If the operation is to Working Storage, Working Storage of the cartridge defined as the TO cartridge is used. By default, this is the System Working Storage. • If a LET sector cannot contain the entry, updates • the header words of the LET sector and writes the completed LET sector to disk. • Enters a name (or names) in a LET or FLET sector and updates the "words available" entry in the header. In the case of a LET sector, the terminal lDUMY disk block size is decremented by the number of disk blocks stored. • Decrements the lDUMY size in the FLET sector by the number of disk blocks stored. All entries that follow this FLET entry are pushed to the right by the size of one entry (3 words). Updates the Working Storage disk block count and format when operation is to, or through, Working Storage. WDOOO Subroutine This subroutine is executed whenever a STORE operation (except STORE CI, STORED AT A, or STOREDATACI from cards or paper tape) is to the User Area or the Fixed Area. It performs the following functions: • Adjusts the destination User Area or Fixed Area disk block address to the next sector when not at a sector boundary, if the operation is a STOREDATA or STOREDATACI. • Makes the required disk block adjustment when moving a system format program to the User Area. • Moves data or a program in Working Storage to the User Area or the Fixed Area. If the operation is from Working Storage, Working Storage of the cartridge defined as the FROM cartridge is used. By default, this is the System Working Storage. If the operation is a STORE from cards or paper tape, System Working Storage is used. UPDCM Subroutine This subroutine is executed whenever the STORE operation is to the User Area (except STOREMOD). It updates DCOM as follows: • Clears the Working Storage disk block count (#WSCT) of the TO drive in DCOM to zero. • Puts the disk block address of the end of the User Area (plus one disk block) into #ANDU in DCOM (in the entry in the drive-dependent parameter for the cartridge affected by the STORE operation). • Determines if the STORE operation is in Temporary mode; does not put the disk block address of the end of the User Area into #BNDU of the TO drive during Temporary mode. • Updates the base file-protection address in DCOM (#FPAD) of the TO drive if the STORE operation is not during Temporary mode. Section 9. Disk Utility Program (DUP) 53 SNOFF' Subroutine This subroutine is executed by all STORE operations. It terminates the STORE function as follows. • Moves the cartridge ID of the TO drive into the STORE terminal message. • Moves the disk block address where the data or program was stored into the STORE terminal message. • Moves the disk block count of the program or data into the STORE terminal message. • Uses the PRINT subroutine in DUpeO to print the terminal message. • Exits to the REST subroutine in DUPCO to clear the CA TCO switches and restore DCTL if it is not in core storage. Fixed Area is the buffer specified by SDBUF. It is one sector long if the core size is 4K; otherwise, it is seven sectors long. LET /FLET sectors are read and written one at a time, using the buffer specified by LETAH. When STORE reads binary records, it reads them into the area specified by THIS and NEXT. If storing from cards, double buffering is used; THIS and NEXT are each considered to be 80 words long. If storing from paper tape, double buffering is not used; THIS and NEXT are considered to be an extended buffer, large enough to contain the maximum length record (108 words). Errors Detected The following DUP errors are detected in STORE: D30, D31, D33, D90, and D93. FILEQ ST700 Subroutine This subroutine is executed when performing a STORE MOD operation. It performs the following functions: • Computes the location within the User Area or Fixed Area sector at which the old version of the program begins. • Moves the new version of the program into the buffer to replace the old version, one word at a time. When an output sector is completed, it is written to the User Area or Fixed Area. The next User or Fixed Area sector is then read into the buffer to allow the word by word replacement to continue. The entire STORE MOD process is under control of the disk block count. The number of disk blocks replaced by the new version is determined by the disk block count of the old version, as found in LET / FLET. STOREMOD does not alter this count. Buffers Used By STORE The disk buffer used for moving data or programs between Working Storage and the User Area or the 54 This phase of DUP is read into core storage by DCTL when the Count field (27-30) of the STORECI control record is non-zero. The function of FILEQ is to process the records following the STORECI tControl record and place the processed records into the SCRA for use by the Core Load Builder. Three types of STORECI control records are processed by this phase; *LOCAL, *NOCAL, and *FILES. FIJLEQ consists of the subroutines LCOOO, FROOO, and LF200. This subroutine processes *LOCAL and *NOCAL control records. A mainline name is not specified on these records when they follow the STORECI control record; an error is indicated if one is specified. Thus, the mainline name is set to blanks. All subroutine names specified in *LOCAL or *NOCAL control records are converted to name code. LOCAL information for the core load to be built is stored in sectors 0 and 1 of the SCRA, NOCAL information in sectors 2 and 3. The first wOlrd of the LOCAL information is the number of words in the LOCAL sectors used to store the LOCAL information. A like word count precedes the NOCAL information in the NOCAL sectors. The format of LOCAL/NOCAL information in the SCRA is shown below. Word Count, one word specifyinQ the number of words in the two LOCAL/NOCAL sectors occupied by LOCAL/NOCAL information, including the word count LF200 This subroutine provides the exit for FILEQ. When all *LOCAL, *NOCAL, and *FILES control records have been processed, DCTL is read into core storage using the GET subroutine in DUPCO with the execute switch (XEQSW) set. DCTL begins the proceSSing of the header of the mainline program that is to be stored in core image format. Mainline Name, two words of blanks in name code format Subroutine Name, two words in name code format specifying a LOCAL/NOCAL subroutine to be included in the core load j1 Subroutine Name 1ubroutine Name • Subroutine Names ~------ Sector 1 I I : I : I ~ ! I1I l Jf'-----I ___Subroutine Name 1, ___________________ Not Used _________________ ~A. , -----------------1: -""I'__________ ~, :, ", Sector 2 .L .1.. • .1.. ....J. FROOO Word Count one word specifying the number of words in the two FILES sectors occupied by FILES information, including the word count. Fi Ie Number, one word specifying in binary the number assigned to the file in a FORTRAN DEFINE FILE statement and by which the fi Ie is referenced File Name, two words in name code format specifying the name of the fi Ie as it appears in LET/FLET (zeros if no fi Ie name is specified) . Cartridge ID, one word specifying in binary the ID of the cartridge containing the preceding named fi Ie (zero if no cartridge ID is specified) . I Filel~~:l~~~~idge ID File Numbers and NaTes and Cartridge IDs II! III!II 1~Cartridge DDUMP The DnUMP phase of DUP resides in part of the first or fifth 4K block of core storage, depending on whether the core size is 4K, 8K, 16K, or 32K. Only on a 32K machine does the DDUMP phase reside in the fifth 4K block of core storage. This phase is read into core storage the first time DCTL recognizes a DUMP control record and remains there on a 32K system as long as DUP is in control. This phase uses all the subroutines in DUPCO that are needed, e. g., disk reading and writing. This is the mainline of the DDUMP phase. It initializes the parameters of the subroutines, sets up the IOAR headers for the areas used for input/ output, and directs the execution of the subroutines. .~ \'-\_ _ _ _IL......J' XGOOO File Name ID Not Used ~~~--------------~~-----------~ i I I The following DUP errors are detected in FILEQ: D41, D42, D43, D44, D45, D46, D47, and D48. DDOOO File Number ,.....~~ Se~tor I The buffer used for writing the processed control records to the SCRA is referred to as SCRAB. SCRAB is another name for BUF7, known indirectly through CA TCO as SDBUF. Errors Detected This subroutine processes *FILES control records. File numbers are converted to binary. File names, if specified, are converted to name code; if unspecified, the name is set to blanks. Cartridge IDs, if specified, are converted to binary; if unspecified, the ID is set to zeros. FILES information for the core load to be built is stored in sectors 4 and 5 of the SCRA. The first word of the FILES information is the number of words in the FILES sectors used to store the FILES information. The format of FILES information in the SCRA is shown below. Se~tor I Buffers Used By FILEQ ~~~-------------~ This subroutine gets the words from the disk and, if the program is in DSF, the words are typed as to data, header indicator, or last data word. Section 9. Disk Utility Program (DUP) 55 Errors Detected This subroutine places the data or program in Working Storage. The following DUP error is detected in DDUMP: D50. DUMPLET /DUMPFLET This subroutine formats the data into a system or data record to be punched. This subroutine checksums, unpacks, and punches the record formatted by XFOOO on either cards or paper tape as specified. XLOOO ---. This subroutine prints the data or program on the principal print device. This subroutine clears the print area as directed by XLOOO. This subroutine inserts the data or program words into the print area as directed by XLOOO. Buffers Used By DDUMP PEBUF -- 6I-word buffer to hold printed output. THIS -- 8I-word buffer to read in cards to check to see if they are blank. NEXT ._- Ill-word buffer from which the output is punched. This phase of DUP prints the contents of the Location Equivalence Table (LET) and/or the Fixed Area Location Equivalence Table (FLET) in an easily readable format on the principal print device. The extent of the dump depends on the setting of the following three DUPCO switches: LETSW. When this switch is positive, both LET and FLET are to be dumped; when negative, only FLET is dumped. DRIVE. When this switch is negative, LET and/ or FLET from all cartridges are dumped; when not negative, LET and/or FLET is dumped from the cartridge specified only. NAMSW. If this switch is on, only the ]l,ET or FLET entry corresponding to the name in #NAME is printed. One sector of LET /FLET is printed per page. Each sector of LET /FLET dumped is preceded by two lines of header information. The first header line contains the contents of the following locations from COMMA/DCOM: #CIDN, $FPAD, #FPAD, #CIBA, #ULET, and #FLET. Following this line is a second header line that reflects information concerning the LET /FLET sector being dumped, i. e., the sector number (SCTR NO. ), User Area/Fixed Area (UA/FXA), words available (WORDS A V AIL), and chain address (CHAIN ADR). Following these two header lines are the LET / FLET entries. Twenty-one lines of entrieE: are printed, made up of five entries per line but sequenced by column. Once LET and/or FLET have been dumped according to LETSW, DRIVE, and NAMSW, DUMPLET prints a terminal message and exits to the HEST subroutine in DUPCO. Buffers Used By DUMPLET /DUMPFLET LETAR -- 322-word buffer to be used to get data from disk. PRNTA -- 61-word buffer in UPCOR used for printing a line. SDBUF -- 320-word buffer to be used to place data i.n Working Storage. LETAR -- 322-word buffer in UPCOR used for reading a s ector of LE T /F LE T . 56 DELETE The DELETE phase removes programs and data files from either the User or Fixed Area, along with their corresponding LET /FLET entries. DCTL passes control to DELETE after having read a DELETE control record and having found the specified entry in LET/FLET. This sector of LET /FLET is left in the buffer LETAR with DELSW pointing to the location previous to the specified entry. DBADR is set with the User or Fixed Area disk block address of the program to be deleted. DELETE compresses LET /FLET by the number of words made available by the deleted entry. If the deletion is to be from the Fixed Area, the specified entry is replaced by a lDUMY entry of the same size. If there are adjacent 1DUMY entries, they are combined to form a single 1DUMY entry and FLET is compressed by 0, 3, or 6 words depending upon whether there are 0, 1, or 2 adjacent 1DUMY entries. If the deletion is to be from the User Area, the amount of the compression of LET is dependent upon the number of words made available by the specified LET entry. This number varies since DSF programs with multiple entries may be stored in the User Area. As in the case of FLET, adjacent 1DUMY entries may cause additional compression of 3 or 6 words. The packing of LET /FLET begins in the sector containing the entry to be deleted and continues throughout the remainder of LET /FLET. Since multiple entries must reside in a single LET sector, they are moved across a LET sector boundary only when room exists in the previous sector for all the entry points. LET is packed until a DCI program or data file is encountered. If a lDUMY entry precedes this entry, the 1DUMY entry is updated to reflect the number of disk blocks required to make the DCI program or data file start at a sector boundary after it is moved the appropriate number of sectors. If a lDUMY entry did not precede the DCI program or data file, one of the appropriate size is inserted, if required, to sectorize the DCI program or data file. The shrinkage or packing continues until the last 1DUMY entry of LET is found. Packing of the User Area begins with the sector containing the program to be deleted. Subsequent DSF programs are shifted by disk blocks into the area made available until a DCI program or data file is encountered. If the User Area is being packed by an amount equal to or greater than one sector, the remaining programs are moved by whole sectors. After all required disk movement of the specified DELETE operation is complete, DELETE prints a terminal message to signify completion. Buffers Used By DELETE LETAR -- used for storage of LET/FLET sectors. Up to 2 sectors may reside in core storage with the addresses of the first word of each saved in DE918 and DE919. SDBUF -- used to process the User Area. Two or eight sectors of core storage are used depending upon core size. Errors Detected The following DUP errors are detected in DELETE: D70, D71, and D72. DEFINE To initially provide a Fixed Area on a system cartridge or to increase its size, the Core Image Buffer (CIB) , LET, and the User Area are moved toward and partly into Working Storage. Working Storage is reduced by the increased size of the Fixed Area. The sector address of the CIB is updated in DCOM and the Resident Image on the updated system cartridge. If a Fixed Area is defined on a non-system cartridge, LET is not shifted because it precedes the Fixed Area sector address. To decrease the size of the Fixed Area on a system cartridge, the Core Image Buffer (CIB) , LET, and the User Area are moved away from Working Storage and into a part of the existing Fixed Area. Working Storage is increased by the amount of the decrease in the size of the F'ixed Area. DCOM and the Resident Image un the updated system cartridge are updated with the new sector address of the CIB. If the size of the Fixed Area is decreased on a non-system cartridge, LET is not shifted, as it precedes the Fixed Area sector address. Section 9. Disk Utility Program (DUP) 57 To delete the FORTRAN Compiler and/or the Assembler Program from a system cartridge, all succeeding programs and special purpose areas on the disk are moved away from Working Storage toward the voided area. Working Storage is increased by the size of the voided program( s) . Once the FORTRAN Compiler and/or the Assembler Program have been eliminated, neither can be restored without an initial loa(l of the disk cartridge, including all the programs in the User or Fixed Area. DEFINE determines if a system or non-system cartridge is being processed by testing the cartridge ID sector for the presence of the version and modification level number, which is zero on non-system cartridges. If the FORTRAN Compiler and/or the Assembler Program are deleted, all SLET entries for that program(s) are cleared to zero. SLET is also revised to reflect the new sector addresses of those programs that are shifted. All entries in the Reload Table indicating SLE T lookups requested by the deleted program( s) are removed and the remaining Reload Table entries are packed together. The revised Reload Table is then reprocessed to generate new sector addresses where necessary in the monitor system programs. Errors Detected The following DUP errors are detected in DEFINE: D80, D81, D82, D83, D84, D85, and D86. DEXIT This phase is brought into core storage and executed by the LEAVE subroutine in DUPCO. DEXIT performs the following functions: • Prints DUP error messages • Traps monitor control records and exits to the Supervisor • Links to the System Library program ADRWS for DWADR • Passes control to the Core Load Builder for STORECI • Returns control to MODIF when a modification includes changes to the System Library. • Exits to the Supervisor upon recognition of the INTERR UPT REQUEST key interrupt. Buffers Used By DEFINE LETAR -- a disk I/O buffer. SDBUF -- a disk I/O buffer. Switches and Indicators FORSW -- non-zero when the FORTRAN Compiler is to be deleted. ASMSW -- non-zero when the Assembler Program is to be deleted. FXSW -'- non-zero when the Fixed Area is to be defined or modified. DATSW -- indicates the disk block adjustment of the Fixed Area. NEGSW -- non-zero when the Fixed Area is to be decreased. 58 DEXIT is called with an indirect branch via LEA VE. Following the branch instruction is a parameter that specifies the function to be performed by DEXIT. If the parameter is a positive integer, DEXIT prints a DUP error message. The message printed corresponds to the integer parameter. If the parameter is zero, DEXIT moves a trapped monitor control record from the buffer CRBUF to the Supervisor buffer @SBFR. $CTSW in COMMA is set to minus one (/FFFF) to indicate to the Supervisor that the next monitor control record has already been read. DEXIT checks to see if control should be returned to the System Maintenance program, MOD IF . If #MDF2 in DCOM is non-zero, DEXIT reads DUP phase 18 into core storage and transfers to it. This phase contains part of MODIF, written on this sector when MODIF was last in control. In this m~mner MODIF is able to use DUP to delete an old version of a program or subroutine from the System Library, and then use DUP to store the new version. If control is not given to MODIF, DEXIT transfers to $EXIT in the Skeleton Supervisor. If the parameter is minus two (-2), the interrupt caused by the INTERRUPT REQUEST key is recognized, causing the Supervisor to read records from the principal input device until the next JOB monitor control record is encountered. DEXIT exits via the $DUMP entry point in the Skeleton Supervisor with a dump format code of minus two (-2). If the parameter is minus three (-3), DEXIT transfers control to the Core Load Builder so that the DSF program currently in Working Storage can be converted to core image format for the STORECI operation. Before DEXIT transfers control to phase 0/1 of the Core Load Builder, the area in core storage bounded by IOADR and the end of core storage is written to DUP phase 13 (UPCOR). DUP phase 17 (PRE CI) restores this area to core storage after the DCI program has been moved to the User or Fixed Area. If the parameter is minus four (-4), DEXIT initiates a CALL LINK to the System Library program ADRWS to complete the DUP DWADR operation. DEXIT enters the Skeleton Supervisor at the $LINK entry point with the name ADRWS specified in name code. The ADRWS program initializes the Working Storage sector addresses on the cartridge whose logical drive code is found in #TODR in DCOM. ADRWS causes control to be returned to DUP by placing a dummy DUP monitor control record into the Supervisor buffer (g)SBFR before returning control to the Skeleton Supervisor via the $EXIT entry point. All DEXIT functions write DUP's DCOM buffer to sector @DCOM on the master cartridge before exiting. @SBFR - /0140 -- used to read the MODIF phase (DUP phase 18) into core storage. This read is executed from core locations 32-39. The number of words read is 320. 2501/1442 CARD INTERFACE (CFACE) This phase serves as an interface between DUP programs and the system device subroutine for card I/O. CFACE consists of four subroutines; they are listed below along with their primary functions: GETHO -- Reads a card and converts from IBM Card Code to unpacked EBCDIC. GETBI -- Reads a binary card. PACKB -- Converts from card binary (1 column per word) to packed binary (4 columns per 3 words), with checksumming. PCHBI -- Punches a card from an 80-word buffer. The phase has four entry points, one corresponding to each of the functions listed above. Each subroutine is entered by an indirect BSI instruction to the symbolic name listed above. Upon entry to each subroutine, the registers and status conditions of the calling program are saved using the ENTER subroutine in DUPCO. The PHIDM subroutine in DUPCO records the phase identification of CF ACE. Upon completion of the required function and prior to returning to the calling program, the original conditions of the calling program are restored using the RTURN subroutine in DUPCO. Buffers Used By DEXIT GETHO CA TCO -- used to write DCOM on sector @DCOM of the master cartridge. The buffer size is 112 words. 10ADR -- used to write UPCOR on DUP phase 13. The buffer size is apprOXimately 1528 words. B -- used to read phase 0/1 of the Core Load Builder into core storage. This read is executed from core locations 32-39. Approximately 480 words are read. This subroutine is used by DCTL to read DUP control records. The system device routine for the 2501 or the 1442 is used to read the card. An 81-word buffer specified by CRBUF in CA TCO is used' for card input. GETHO examines each card for either / /, *S, or *D in columns 1 and 2. If this information is not found in the first two columns of the card, the subroutine returns immediately to DCTL. In this way non-DUP control records can be bypassed at maximum card speed without us ing a double buffering technique. Section 9. Disk Utility Program (DUP) 59 If / /, *S, or *D is found in columns 1 and 2, the subroutine loops till the whole card is read, then converts it from IBM Card Code to unpacked EBCDIC using the system conversion subroutine CDCNV. GETHO packs the unpacked EBCDIC data from the 81-word input buffer to a 41-word packed buffer specified by PEBUF. 'I'he subroutine then exits to DCTL. GETBI This subroutine reads a binary card into an 81-word buffer specified by THIS o The system device subroutine for the 2501 or 1442 is used to read the card o PACKB This subroutine converts card binary (one word per column) in an 81-word input buffer (NEXT) to packed binary (four columns per three words) in a 55-word output buffer (NEXT). The packed data overlays the unpacked data. After packing, the checksum of the 54 words is verified. If the checksum is correct, the subroutine :returns to the calling program. A checksum error causes an exit to LEAVE in DUPCO with an error parameter. PEBUF -- 41-word buffer used to hold the packed EBCDIC control record, converted from the unpacked EBCDIC in CRBUF. KEYBOARD INTERFACE (KFACE) KF ACE serves as an interface for DUP programs when the principal input device is the Keyboard. KFACE is used by DCTL to read DUP control records from the Keyboard. The PHIDM subroutine in DUPCO is used to record the KF ACE phase identification. The ENTER subroutine in DUPCO is used to save the conditions of the calling program. A control record of up to 80 characters is read and converted from Keyboard code to unpacked EBCDIC by the system dev:lce subroutine for the Keyboard. An EOF character causes the termination of input and the filling of the remainder of the buffer with blanks or a word count of 80, whichever is first. The record is read into the 81-word buffer specified by CRBUF in CAT CO in unpacked EBCDIC, then converted to packed EBCDIC and stored in the 41-word buffer specified by PEBUF in CATCO. The RTURN subroutine in DUPCO is used to restore the conditions of the calling program. Buffers Used By KFACE PCHBI CRBUF -- 81-word input buffer used to hold a control record in unpacked EBCDIC. This subroutine, using the system device subroutine for the 1442, punches a card from an 81-word buffer specified by NEXT. PEBUF -- 41-word buffer used to hold the packed EBCDIC control record, converted from the unpacked EBCDIC in CRBUF. Buffers Used By CFACE 1134/1055 PAPER TAPE INTERFACE (PFACE) THIS -- 81-word input buffer used by GETBI for reading binary records. This phase serves as an interface between DUP programs and the system device subroutine for paper tape I/O. PFACE consists of four subroutines; they are listed below along with their primary functions: NEXT -_. 81-word buffer used by PACKB for packing binary records (4 columns per 3 words). The packed data overlays the unpacked data. Also used by PCHBI for outputting to the punch. CRBUF ._- 81-word input buffer used by GETHO for reading control records in unpacked EBCDIC. 60 GETHO -- Reads a paper tape record punched in PTTC/8 code and converts it to both unpaeked and packed EBCDIC. GETBI -- Reads a binary paper tape record. PACKB -- Converts from Wlpacked binary (two frames per word) to packed binary, with checksumming. PCHBI -- PWlches a binary paper tape record. The phase has four entry points, one corresponding to each of the functions listed above. Each subroutine is entered by an indirect BSI instruction to the symbolic name listed above. Upon entry to each subroutine, the registers and status conditions are saved using the ENTER subroutine in DUPCO. Another DUPCO subroutine, PHIDM, modifies the phase identification with the PFACE identification. Upon completion of the requested function and prior to exiting to the calling program, the original conditions of the calling program are restored using the RTURN subroutine in DUPCO. GETHO This subroutine is used by DCTL to read DUP control records. The system device subroutine for the 1134/1055 is used to read the record. An 81-word buffer specified by CRBUF in CATCO is used to contain each record read. All conversion from PTTC/8 code to EBCDIC is performed by the system device subroutine. When the control record has been read, it is converted to packed EBCDIC within the 41-word buffer specified by PEBUF in CATCO. The subroutine then exits to DCTL. GETBI This subroutine reads a binary paper tape record into a 109-word buffer specified by THIS in CATCO. The system device subroutine for the 1134/1055 is used to read the record. Note that THIS and NEXT are reversed for each record read when reading binary cards. When reading paper tape DCTL places the address of the buffer having the lowest core address into THIS, since the reading of binary paper tape records requires an extended buffer. The system device subroutine reads each frame (eight bits of data) into one word of the buffer. The word count preceding each binary paper tape record is punched into a single frame, and is read separately from the body of the record. After the word count is read, it is checked for validity. If it is valid, it is used to read the record that follows. If it is not valid, the next frame is read to determine if it is a word count. In this way, delete characters and other special codes may appear between binary records or between a control record and the first binary record. PACKB This subroutine packs the binary record as read by GETBI into normal binary data. The packed data overlays the unpacked data. After packing, the checksum of the words read is verified. If the checksum is correct, the subroutine returns to the calling program. A checksum error causes an exit to LEAVE in DUPCO with an error parameter. PCHBI This subroutine uses the system device subroutine for the 1134/1055 to punch a binary paper tape record from a 109-word buffer specified by NEXT. Buffers Used By PFACE THIS -- 109-word buffer used by GETBI for reading binary paper tape records. The two buffers THIS and NEXT, used for double buffering when reading binary cards, constitute one extended buffer when reading binary paper tape records. Double buffering is not used for binary paper tape records. NEXT -- 109-word buffer used by PCHBI for pWlching binary paper tape records, conSisting of THIS and NEXT taken as consecutive buffers. CRBUF -- 81-word input buffer used to hold a control record in Wlpacked EBCDIC. PEBUF -- 41-word buffer used to hold the packed EBCDIC control record, converted from the Wlpacked EBCDIC in CRBUF. Section 9. Disk Utility Program (DUP) 61 PRECI PClOO This phase is read into core storage by the Core Load Builder after a core load has been built for a STORECI function. This phase resides in the DUP overlay area. It moves the core load to the User Area or Fixed Area before restoring DUP phase 13 (UPCOR). Since UPCOR is not available to PREel, copies of the DUPCO subroutines PHID, PHIDM, GET, and PUT have been incorporated into PRECI. PRECI is composed of five sections or logical parts --- PCOOO, PC040, PClOO, PClSO, and PC240. This section moves that part of the core load (ineluding the core image header) that resides in the CIB to its destination in the User Area or Fixed Area. The length of the program (in words) and the starting address of the core load are used to control the number of sectors moved from the CIB to the User Area or Fixed Area. The core image header also indicates if the core load exceeds the 4K boundary; i. e., the core load's load address plus the number of words in the core load produces a number greater than 4095. The core load residing in the CIB is moved to the User Area or Fixed Area four sectors at a time. This move continues until the CIB sector containing that part of the core load that resides at location 4095 has been moved. This is the entry point to PRECI from the Core Load Builder. DCOM from the master cartridge is read into PRECI's work area, as is the core image header from the CIB. If the inhibit DUP function switch ($NDUP) has not been set by the Core Load Builder, PRECI proceeds. Otherwise, the PC240 section is used to exit to DCTL after indicating an error has occurred. DCOM is used to determine the logical drive code of the destination drive, as well as the starting sector address to which the program is to be moved. From the core image header the total length of the core load in sectors is determined. A check is then made to determine if the program can be contained in the User Area or Fixed Area. If the core load is too large, the PC240 section is used to ,~xit to DCTL after indicating an error has occurred. PC040 This section moves LOCAL/SOCAL sectors (if any) from Working Storage to their position at the end of the core load after it has been moved to the User Area or Fixed Area. The Working Storage sector address from which the LOCALs/SOCALs are moved includes an adjustment for Working Storage files when they are present. LOCALs/ SOCALs are moved to the User or Fixed Area one sector at a time. The number of sectors required for Working Storage files and the number of LOCAL/ SOCAL sectors are obtained from the core image header. 62 This section moves that part of the core load that resides in core storage above location 4095 to the User or Fixed Area. The last sector of the core load written to the User or Fixed Area from the CIB is read into core storage so as to be contiguous with the part of the core load residing in core, i. e. , above location 4095. The remainder of the core load, starting with the first word read into clOre storage from the User or Fixed Area, is then written to the User or Fixed Area, starting at thl3 sector read into core storage. PC240 This section restores DUP phase 13 (UPCOR), DCTL (phase 2), and then exits to DCTL. Before exiting to DCTL, however, termination data is placed in the DCOM buffer in CATCO, and in CATCO itself. The interrupt locations in low core storage are restored for DUP operation, and phase switches are cleared in order to ensure that DDUMP and STORE are reloaded from disk. If any errors have been detected during PRECI operation, the DUP error message number is communicated back to DCTL through CIERR in CATCO. Buffers Used By PRECI The disk I/O buffer used to move all parts of the eore load to the User Area or Fixed Area is located at BUF7. All references are direct, rather than indirect through SDBUF in CAT CO , since UPCOR is not in core storage during the operation of PRE CI. DUP DIAGNOSTIC AIDS GENERAL DUP has provided a selective, dynamic dump of various core storage areas to facilitate problem analysis. The core dumps are under the control of column 35 of individual DUP control records. In general, to obtain a dump of a particular DUP phase, column 35 should contain the phase ID number of that phase. If column 35 contains zero, all DUP phases associated with the function named on the control record yield a core dump, starting with the execution of DCTL. The column 35 codes and the corresponding DUP phase yielding core dumps are shown below. Code in column 35 o 2 3 4 5 6 7 9 Phase(s) dumped All associated phases, starting with DCTL DCTL STORE FILEQ DDUMP DUMPLET DELETE DEXIT The core dumps include the following: Disk I/O Areas -- The buffer area used for the disk I/O operation, including the area into which DUP phases are read, is dumped. The number of words dumped is dependent on the number of words read or written. Buffer Areas -- The buffers between BUF4 and PRPNT are dumped in DCTL execution. This dump occurs when the LET search begins, when the LET search on one cartridge is complete and the next cartridge LET search begins, and before the required DUP phase (STORE, DUMP, or DELETE) is read. CATCO -- This area of core storage is dumped in conjunction with any dump mentioned above. If a dump (or dumps) is desired during CCA T execution, the next to the last card (i. e., the last type A card) of DUPCO should be removed before reloading this phase with a System Loader reload function. This change in DUPCO causes all possible core dumps within DUP to occur regardless of the contents of column 35 in any DUP control record. Core dumps are not allowed when the DEFINE or PRE CI phase is in execution. The System Core Dump program uses the CIB to save the contents of core storage, and, since the CIB moves during a DEFINE operation and the core load to be stored by PRECI is in the CIB, serious errors occur if core dU!llPs are taken when executing either DEFINE or PRECI. PRECI When PRECI is entered from the Core Load Builder, the phase identification word in COMMA ($PHSE) is initially set to /0011 by the PHIDP subroutine in PRECI. As each subroutine of PRECI is executed, $PHSE is modified by PHIDP as follows: Subroutine in execution PC040 PC100 PC180 PC240 Contents of $PHSE /1011 /2011 /3011 /4011 In addition, the second hexadecimal digit of $PHSE is modified by the IDMP subroutine in PRECI each time a disk I/O operation is performed. Digit 2 of $PHSE 1 2 Disk I/O Operation Read from Disk Write to Disk STORE When STORE is entered from DUP control, the phase identification word in COMMA ($PHSE) is initially set to /0003 by the PHID subroutine in DUPCOo As each subroutine of STORE is executed, $PHSE is modified by PHID as follows: Section 9. Disk Utility Program (DUP) 63 Subroutine in execution Contents of $PHSE lOWS WDOOO DOLET UPDCM ST700 SNOFF /1003 /2003 /3003 /4003 /5003 /6003 In addition, the second hexadecimal digit of the phase identification is modified by the PHIDM 64 subroutine in DUPCO each time an I/O operation is performed. Digit 2 of $PHSE 1 2 4 5 8 9 I/O operati?n Read from Disk Write to Disk Convert Binary to EBCDIC Print Terminal Message Read Binary CardE: Read Binary Paper Tape SECTION 10. FLOWCHARTS General: Phase 0: Phase 1: Phase 1A: Phase 2: Phase 2A: Phase 3: Phase 4: Phase 5: Phase 6: Phase 7: Phase 7A: Phase 8: Phase 8A: Phase 9: Phase 10: Phase lOA: Phase 11: Phase 12: ERMSG: @ARCV @APCV: ASM01 ASM02 ASM03 ASM04 ASM05 ASM06 ASM07 ASM08 ASM09 ASM10 ASM11 ASM12 ASM13 ASM14 ASM15-ASM17 ASM18 ASM19 ASM20 ASM21 ASM22 ASM23 ASM24 The Assembler Program is designed to translate the statements of a source program written in 1130 Assembler Language into a format that may be dumped and/or stored by DUP or executed directly from Working Storage. Basically, the functions of the Assembler are: 1. 2. 3. 4. Convert the mnemonic to machine language (except for Assembler control records). Assign addresses to statement labels. Insert the format and index register bits into the instruction, if applicable. Convert the instruction operands to addresses or data. INTRODUCTION The Assembler Program is structurally divided into two parts, the resident portion and the overlay portion. The resident portion consists of the Assembler Communications Area (ASCOM), part of phase 0, ASSEMBLER PROGRAM phase 9, and the phase 9 Communications Area (PHSCO). All of the other phases are called into core storage as overlays. The Assembler Program is functionally divided into two parts, pass 1 and pass 2. The source program is read and processed, one statement at a time, during each of the two passes. During pass 1, the source program is read into core storage from the principal I/O device. Unless the user specifies by control record that two-pass mode is in effect, the source program is stored on the disk, from which it is reentered for pass 2 processing. If twopass mode is specified or required, the source program is reentered via the principal I/O device for pass 2 processing. (If a list deck or paper tape object program is desired, the assembly must be made in two-pass mode. ) PROGRAM OPERATION When the Monitor Control Record Analyzer detects an ASM monitor control record, it reads the first sector of the Assembler Program (phase 0) into core storage and transfers control to it. Phase 0 reads into core storage all the subroutines required during assembly processing for I/O, and phase 9. The word counts and sector addresses of all the buffers and major overlay phases are initialized in ASCOM and in phase 9, and the boundary conditions are set for the Symbol Table. Phase 1 is then fetched and control is passed to it. Phase 1 reads and analyzes control records, setting the appropriate switches in ASCOM for the options specified. Upon detection of the first non-control record, phase 1A is fetched and given control. Phase 1A initializes the core addresses for the buffers, then fetches and transfers control to phase 2 to start statement processing. Statement processing is performed by an op code search in phase 9 and a transfer through a branch table (that precedes every major overlay) to the overlay phase currently in core storage. If the required overlay phase is in core storage, execution of the phase proceeds. If it is not in core storage, the branch table causes a return to phase 9 to fetch the required overlay phase. The op code search is performed again and control is passed to the overlay Section 10. Assembler Program 65 phase.. When the overlay phase completes the necessary processing, another record is read and the entire process is repeated. All overlays exit by branching to either the LDLBL or the PALBL subroutines within phase 9 and then to STRT9 (the op code search). A branch is taken to LDLBL when the statement just processed is permitted to have a label. A branch is taken to PALBL when a label is not permitted or is to be ignored. Both LDLBL and PALBL branch to the RDCRD subroutine (within phase 9) to read the next record just prior to their return to the overlay phase that called them. in the Symbol Table for each valid symbol defined in the source program. Each entry in the Symbol Table consists of three words. The first word contains the value of the symbol. Words 2 and 3 contain the symbol itself in name code. The following example shows the conversion of the symbol 'START' to name code for a Symbol Table entry: ASSEMBLER COMMUNICATIONS AREA The Communications Area (ASCOM) consists of all the indicators and switches referenced by more than one phase of the Assembler Program. All communication between phases is done through ASCOM. ASCOM resides in core storage following DISKZ and preceding the Overlay Area. Refer to the program listings for details 'regarding the contents of ASCOM. OVERLA Y AREA The Overlay Area is the area in core storage into which the statement processing (overlay) phases are loaded as required. Phase 0 is initially loaded into this area by the Monitor Control Record Analyzer (see Section 6. Supervisor). Phases 1, lA, and 2 are sequentially loaded into this area at the start of passes 1 and 2. Phases 2A, 5, 6, 7, 7A, 8, 8A, @ARCV, and @APCV are loaded into this area during passes 1 and 2 as they are required to process specifie mnemonics and constants, to handle output options, etc. Phase 12 is loaded into this area when the END statement is encountered in passes 1 and 2. Phase 4 is loaded into this area at the completion of pass 2. Phases 3, 9, 10, IDA, 11, and ERMSG are not loaded into the Overlay Area. The Overlay Area resides in core storage following ASCOM and preceding phase 9. SYMBOL TABLE As the source program is read and processed in pass 1, the Symbol Table is built. An entry is made 66 *Digit 1 varies depending on the settings of the Relocat on mode and Multiply-defined indicators. The Symbol Table is built starting at the highaddressed end of core storage. Entries are added to the Symbol Table (see below) until its lower limit, the end of the principal print device subroutine, is reached. If symbols are added to the Symbol Table after the in-core Symbol Table has been filled (i. e. , the lower limit has been reached), the overflow Symbol Table is saved, one sector at a time, in Working Storage on the disk. Note that Symbol Table overflow is possible only if the Assembler control record *OVERFLOW SECTORS re,serving the required sectors on disk is present in the source program; otherWise, the assembly is terminated at the point of Symbol Table overHow. Third Entry Second Entry First Entry -----.....~~ --~ Symbol Value Symbol Name ---~~ low Core High Core t As the source program is again read and processed in pass 2, the Symbol Table is searched each time a reference to a symbol is encountered. The in-core Symbol Table is searched first. If the symbol is not found in the in-core Symbol Table and Symbol Table overflow has been written on disk, Phase lOA is fetched into core storage to perform the search of the overflow sectors. A binary search technique is used in the Symbol Table search. tains the address of the buffer in which a record is being processed. The other location (RDBFR+1) always contains the address of the buffer into which a record is being read. The RDCRD subroutine in phase 9, which interfaces with the principal I/O device subroutine, exchanges the buffer addresses in RDBFR and RDBFR+1 after each record is rec.'ld. INTERMEDIATE I/O PHASE DESCRIPTIONS During pass 1 of an assembly made in one-pass mode the source program statements are saved on disk for input to pass 2. Each source statement is saved starting at column 21 and ending with the rightmost non-blank column. As saved on disk each statement consists of a prefix word containing the number of words up to and including the prefix word for the following statement and the source statement packed two EBCDIC characters per word. The intermediate I/O is written on disk in Working Storage, starting at the first sector of Working Storage if no OVERFLOW SECTORS were specified, or starting at the first sector following the last sector of Sym bol Table overflow. If a LIST Assembler control record is not present in the source program, comments statements are not saved in the intermediate I/O. During pass 2 of an assembly in one-pass mode, the intermediate I/O is read into core storage, one sector at a time. The source statements are lll1packed and placed into the two I/O buffers such that they are indistinguishable from statements read from the principal I/O device. DOUBLE-BUFFERING All card, paper tape, or Keyboard input to the Assembler Program is double-buffered, with one exception; if the assembly is being made in two-pass mode and the LIST DECK or LIST DECK E option has been specified, input during pass 2 is single-buffered to facilitate punching. The Assembler Program uses two 80-word buffers for double-buffering. While a record is being read into one buffer, the record in the other buffer is being converted and processed. Two locations in ASCOM are used to point to the two input buffers. One location (RDBFR) always con- PHASE 0 Phase 0 serves as the Assembler Program's loader. First, the Commlll1ications Area (ASCOM) is initialized by phase 0, and the required I/O device subroutines are fetched into core storage. Phase 9, the resident portion of the Assembler Program, is also fetched into core storage. Phase 0 initializes the sector addresses and word COlll1ts of the various buffers utilized by the Assembler Program, and the bOlll1dary conditions for the System Symbol Table are established. Phase 0 then fetches phase 1 into the overlay area and transfers control to it. The switches $NDUP and $NXEQ (in COMMA) are set non-zero to inhibit program execution and/or DUP flll1ctions in the event the assembly is terminated before completion. A Master Overlay Control subroutine (P0130), the subroutine interfacing with DISKZ (DISKl), and the index register restoring subroutines (STXRS and LDXRS) are part of phase 0 and remain in core storage during the entire assembly; the rest of phase o is overlaid by phase 1. The Master Overlay Control subroutine performs the fetching of all the overlay phases and transfers control to the phase just read into core storage. PHASE 1 Phase 1 reads, analyzes, and lists the Assembler control records. As each control record is analyzed, the various options specified by the control record are indicated in the Assembler Program's Communications Area (ASCOM). When the first non-controltype record is encolll1tered, phase 1 transfers to the Master Overlay Control subroutine to fetch phase 1A and transfer control to it. Section 10. Assembler Program 67 PHASE 1A PHASE 3 Phase lA determines the address of the DSF buffer and initializes its IOAR header information in the Assembler Program's Communications Area (ASCOM). If the principal input device is either the 1134 Paper Tape Reader or the Keyboard, the current record is moved over 20 positions to the right and the read-in address is set for position 21 of the I/O area. The number of overflow sectors assigned is checked for a maximum of 32 and the adjusted Working Storage boundary for the disk output of the source and object programs is initialized. Phase 1A then transfers control to the Master Overlay Control subroutine to fetch phase 2, which begins statement processing. Phase 3 is called into core storage as part 1 of the Assembler Program's exit to the Supervisor. Due to the size of phase 3, it overlays part of phase 9 instead of the Over lay Area. The options of printing, punching, or saving the Symbol Table,as requested by the user on Assembler control records, are performed. At the completion of the Symbol Table options processing, phase 4 is fetched into core storage and control is transferred to it. PHASE 2 Phase ~~ handles the processing of all ENT, ISS, LIBR, ABS, EPR, SPR, ILS, and FILE statements. These statements are header mnemonics and must appear as the first non-control-type statements if they are included in the source program. For this reason phase 2 is the first overlay phase loaded into core storage to begin stat em ent processing. As each particular header mnemonic is processed, the necessary indicators are set in the Assembler Program's Communications Area (ASCOM). The ordering and compatibility of the various header mnemonics is checked, and the program header record information is built and saved in ASCOM. When a mnemonic not handled by phase 2 is detected, control is transferred to the op code search (STRT9) in phase 9. PHASE 2A Phase 2A is called into core storage when a FILE statement is detected by phase 2. Phase 2A is loaded by a flipper routine within phase 2 and overlays part of phase 2. Phase 2A obtains the file information from the FILE statement and builds the 7-word DEFINE FILE Table. At the completion of phase 2A processing, control is returned to the flipper routine in phase 2. The flipper routine restores the overlaid portion of phase 2 and branches to the op code search (STRT9) in phase 9. 68 PHASE 4 Phase 4 performs the final processing for the Assembler Program and is called into core stontge by phase 3. If overflow sectors were specified by Assembler control record, and if Symbol Table overflow occurred in assembling the program, the object program, which is residing on the disk, is moved back to the sector boundary at the start of Working Storage. Phase 4 then updates DCOM on aJI ready dri ves. The last record read by the Assembler Program, the record following the END statement, is moved to the Supervisor buffer. In terminating the assem bly, phase 4 prints four sign-off messages: 1. 2. 3. 4. The The The The number number number number of of of of errors flagged in the assembly symbols defined overflow sectors specified overflow sectors required Phase 4 then exits to the Skeleton Supervisor at the $EXIT entry point. PHASE 5 Phase 5 is called into core storage to process HDNG, ORG, BSS, BES, EQU, LIST, EJCT, or SPAC statements. These mnemonics are all non-imperative type statements requiring similar processing and are all grouped, therefore, in tho same overlay phase. PHASE 6 Phase 6 processes all imperative instructions and the DC statement. Since these mnemonics are used most frequently, the processing for them was grouped into one overlay phase. scans and evaluates the operand field, one character at a time. The conversion subroutine contains a table of packed Console Printer codes and a table of packed 1403 Printer codes. The conversion is performed using an algorithm. PHASE 9 PHASE 7 The two mnemonics processed by phase 7 are XFLC and DEC. The conversion of the data in the statement operands to binary is handled in phase 7A. Upon completion of the conversion, the data is formatted into the appropriate floating, fixed, or decimal format. PHASE 7A Phase 7A is fetched into core storage by a flipper routine within phase 7. Phase 7A converts the mantissa of a decimal integer, a fixed- or floating-point num ber to the binary equivalent. Phase 7A contains a scanning process that converts the operand to its binary equivalent and a postscanning process that converts from powers of 10 to powers of 2. The converted decimal data is saved in a buffer that is part of the flipper routine. When the conversion is completed, phase 7A returns to the flipper routine that restores phase 7 and transfers control to it. The phase 9 communications area (PHSCO) consists of the entry addresses of the common subroutines within phase 9. Immediately following PHSCO is the op code search. STRT9 The op code obtained from the input record is saved in ASCOM. All possible op codes are resident in a table, which has for each op code a two-word indicator followed by a corresponding one-word machine language mnemonic. The op code search is performed by means of a table lookup. When a match is found, the corresponding machine language mnemonic is picked up and saved in OPCNT in ASCOM. Bits 13-15 of OPCNT form a branch table displacement. Using this displacement, an indirect branch is taken thru the table to the overlay prepared to process this op code. If the overlay is in core storage, execution proceeds. If it is not, a return is made to the op code search to fetch the required overlay phase into core storage. Control is then passed to the overlay and statement processing continues. PHASE 8 Phase 8 processes the LIBF, CALL, EXIT, LINK, EBC, DSA, and DN statements. The processing of the program linking mnemonics -- LIBF, CALL, EXIT and LINK -- is combined with the processing of the data definition mnemonics -- EBC, DSA, and DN -- since otherwise they would constitute two small phases. This is satisfactory in terms of assembly time since EBC, DSA, and DN are not frequently used mnemonics. PHASE 8A Phase 8A processes the DMES statement. The DMES processing is performed by a scanning subroutine and a conversion subroutine. The scanning subroutine BTHEX BTHEX is a binary-hexadecimal conversion subroutine. The binary data is entered in the accumulator left-justified, and the hexadecimal output is stored by index register 1. The number of characters to be converted is in index register 2. B4HEX The B4HEX subroutine is entered when four hexadecimal output characters are desired. Index register 2 is set to four and a branch is made to BTHEX. Section 10. Assembler Program 69 The SCAN subroutine collects the elements of the operand field, character by character, perform s any arithmetic functions necessary, and evaluates the operand. GTHDG GTHDG is the new page subroutine. Branches are made to the principal print subroutine to skip to charmel 1, and print the heading as specified in the last HDNG statement encountered. LDLBL The LDLBL subroutine scans the label field of the statement. In pass 1, valid labels are added to the Symbol Table if they do not already appear there. The record is saved in the intermediate output buffer by INTI and a branch is made to read the next record (RDCRD). When the next record is in core, a check is made for the last card. If the last card has been detected, a branch :is made to the principal conversion routine (CVADR), and control is returned to the calling program. In pass 2, the record is listed, if a listing has been requested or the record is in error. The next record is fetched and control is returned to the calling program. PALBL The PALBL subroutine is a secondary entry to the LDLBL subroutine. PALBL:is entered when a label is not permitted on a statement being processed. to EBCDIC blanks, the input buffer addresses in ASCOM are exchanged, and a branch is made to the principal input device subroutine to read a record. Index register 1 is set to point at the current input buffer and control is transferred back to the calling program. If the record previously read was a monitor control record, phase 4 is fetched into core storage and control is transferred to it. P9MVE The P9MVE subroutine moves the input record from the input buffer to the print buffer. As it moves the record, each character is checked for validity. At the completion of the move, a branch is made to the principal print device subroutine to list the record and control is returned to the calling program. INTI INTI is the subroutine used in pass 1 to pack the input record into two EBCDIC characters per word and save it in the intermediate output buffer. INTI is overlaid by phase 11 for pass 2 processing. INT2 is the entry address for phase 11 during pass 2. PHASE 10 Phase 10 consists of two subroutines: DTHDR and WRDFO. Phase 10 is fetched by phase 12 in pass 2 processing. Phase 10 overlays that section of phase 9 dealing with the inserting of labels into the Symbol Table. DTHDR GETER A branch is made to GETER when an error occurs during the assembly. GETER fetches the error message phase (ERMSG) into the first disk buffer (BUFI). DTHDR enters a data header into the object program output in disk system format (DSF) when required and completes the previous data header. WRDFO RDCRD. RDCRD is the interface subroutine for the principal input device subroutine. The input buffer is cleared 70 This subroutine writes one sector of disk system format (DSF) output when the DSF buffer is full. After the sector is written, those words past the 320th word of the buffer are moved back to the beginning of the buffer. In the event the buffer is not full and WRDFO is entered from phase 12 END statement processing, the DSF buffer is written to Working Storage. PHASE lOA Phase lOA is fetched into core storage whenever necessary to handle Symbol Table overflow. When a symbol is to be added to an overflow sector in pass 1 or when the overflow sectors are to be searched for a symbol in pass 2, phase lOA is called. Phase lOA overlays the INTI subroutine in phase 9 when called during pass 1; it overlays phase 11 (the INT2 subroutine) when called in pass 2 of an assembly in one-pass mode. PHASE 11 Phase 11 is fetched into core storage in pass 1 during phase 12 END statement processing if the assembly is in one-pass mode. The function of phase 11 is to read the source statements from the disk during pass 2. The source statements saved in pass 1 are read back onto core storage in pass 2 in such a way that they are indistinguishable from statements read from the principal I/O device. the source statement buffer. If the source program is a type 1 or 2 (a mainline), the execution address, i. e., the END statement operand, is saved in ASCOM and in the source statem ent buffer. The last sector of DSF output is written to the disk and the disk block count of the program is saved in ASCOM. Phase 12 then fetches phase 3 and transfers control to it. ERMSG ERMSG is called by the GETER subroutine within phase 9 when an error occurs during the assembly process. It is loaded into the first disk buffer (BUFI). A list of error messages is contained within ERMSG. This list is referenced by index register 2, which contains the appropriate error code at the time of entry to ERMSG. The error message is printed and control is then returned to GETER. @ARCV The Assembler Program's card conversion subroutine converts IBM Card Code to EBCDIC on input from the 2501 Card Reader or from the 1442 Card Read Punch, Models 6 and 7. The conversion is handled by a direct table access method, utilizing a 256 EBCDIC character table. PHASE 12 In pass 1, phase 12 builds the program header record in the DSF buffer. Several counters are reinitialized in ASCOM and the buffer pointers are reset for disk system format (DSF) output. Phase 10 is fetched into core storage. If the assembly is in two-pass mode, phase 1 is fetched and control is passed to it. If the assembly is in one-pass mode, the END statement is saved in the intermediate I/O buffer and the buffer is written to the disk. Phase 11 is fetched into core storage and the first sector of intermediate I/O is read into the first disk buffer (BUFI). A branch is then made to phase 11 to transfer the first statement from the intermediate I/O buffer to the source input buffer. Phase 1 is then fetched onto core storage and control is transferred to it. In pass 2, phase 12 branches to DTHDR to build the end-of-program data header. If the source program is a type 3, 4, 5, 6, or 7 (not a mainline), an execution address of zero is saved in ASCOM and in @APCV The Assembler Program's punch conversion subroutine handles both the conversion and the punching of data on card output options. The punch conversion subroutine is fetched into the overlay area to perform the LIST DECK and LIST DECK E output opti.ons. It overlays the op code search (STRT9) in phase 9 to perform the PUNCH SYMBOL TABLE output option. CORE LAYOUT Figure 14, panel 1 shows the layout of the contents of core storage after phase 0 of the Assembler Program has been fetched and given control by the Monitor Control Record Analyzer. Figure 14, panel 2 shows the layout of the contents of core storage during pass 1. Section 10. Assembler Program 71 Figure 14, panel 4 shows the layout of the contents of core storage during pass 2 of an assembly in one-pass mode. Figure 14, panel 3 shows the layout of the contents of core storage during pass 2 of an assembly in two-pass mode. (0 G) CD COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ . DISKZ ® @ COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ DISKZ DISKZ ASCOM ASCOM ASCOM ASCOM ASCOM Resident PhClse 0 Resident Phose 0 Resident Phose 0 Resident Phose 0 Resident Phose 0 Overlay Area Overlay Area Overlay Area Overlay Area Overlay Area Phose Phose Phose Phose Phose 9 9 9 9 9 Phose 10 Phose 10 Phose 10 INTI Phose 11 Phose lOA HDNG Buffer HDNG Buffer HDNG Buffer Cord I/O Buffers ----- ---INTI ---- Phose lOA ---- Cord I/O Buffers Cord I/o Buffers Cord I/O Buffers Print Buffer Print Buffer Print Buffer Print Buffer Print Buffer Disk I/o Buffer Disk I/o Buffer Disk I/O Buffer Disk I/O Buffer 1 Disk I/o Buffer 1 Principal I/O Device Subroutine I/o Device Principal Subroutine Principal I/o Device Subroutine Disk I/O Buffer 2 Disk I/o Buffer 2 Principal Print Device Subroutine Principal Print Device Subroutine Principal Print Device Subroutine Principal Print Device Subroutine Principal Print Device Subroutine S. T. Overflow Buffer S. T. Overflow Buffer S. T. Overflow Buffer S. T. Overflow Buffer S. T. Overflow Buffer Symbol Table 72 ---- Cord I/O Buffers ---- Figure 14. 0 ---Symbol Table ---Symbol Table Core Layout During Assembler Program Operation ---Symbol Table ---Symbol Table SECTJON 11. FLOWCHARTS General: Phase 1: Phase 2: Phase 3: Phase 4: Phase 5: Phase 6: Phase 7: Phase 8: Phase 9: Phase 10: Phase 11: Phase 12: Phase 13: Phase 14: Phase 15: Phase 16: Phase 17: Phase 18: Phase 19: Phase 20: Phase 21: Phase 22: Phase 23: Phase 24: Phase 25: Phase 26: Phase 27: FOROI FOR02 FOR03 FOR04 FOR05- FOR06 FOR07-FOR08 FOR09 FORI0 FORll FOR12 FOR13 FOR14 FOR15 FOR16 FOR17 FOR18 FOR19 FOR20 FOR21 FOR22 FOR23 FOR24 FOR25 FOR26 FOR27 FOR28 FOR29 FOR30 The FORTRAN Compiler translates source programs written in the 1130 Basic FORTRAN IV Language into machine language object programs. The compiler also provides for the calling of the necessary arithmetic, function, conversion, and input/output subroutines during the execution of the object program. GENERAL COMPILER DESCRIPTION The FORTRAN Compiler consists of 27 sequentially executed phases: Phases 1 and 2 are initialization and control phases, processing the control records and building the initial statement string. FORTRAN COMPILER Phases 3 thru 10 are specification phases, processing the specification statements and other definitive information and building the basic Symbol Table. Phases 11 thru 18 are compilation phases, analyzing and processing the source statements and replacing them with object coding. Phases 19 thru 26 are the output phases. Phase 27 is a recovery phase, terminating the compilation and executing a CALL EXIT. Thus, the FORTRAN Compiler is a "phase" compiler; the compiler is passed-by the source program, which resides in core and is massaged into the object program. PHASE OBJECTIVES The following is a list of the compiler phases by number and name, and their major functions: Phase Number Phase Name Function 1 Inpu.t Process the control records; read the source statements and build the string. 2 Classifier Determine the statement type and place the type code in the ID word. 3 Check Order / Statement Number Check for the presence and sequence of SUBROUTINE, FUNCTION, Type, DIMENSION,COMMON, and EQUIVALENCE statements; place statement numbers in the Symbol Table. Section 11. FORTRAN Compiler 73 Phase Number --- Phase Name 4 COMMON/SUBROUTINE or FUNCTION 5 Place COMMON variable names and dimension information in the Symbol Table; check for a SUBROUTINE or FUNCTION statement and, if found, place the nam e and, dummy argum ent names in the Symbol Table. DIMENSION/ Place DIMENSION varREAL, INTEGER, iable names and dimenand EXTERNAL sion information in the Symbol Table; indicate the appropriate mode for REAL and INTEGER statement variables. 6 Real Constant Place the nam es of real constants in the Sym bol Table. 7 DEFINE FILE, CALL LINK, and CALL EXIT Check the syntax of DEFINE FILE, CALL LINK, CALL EXIT statements; determine the defined file specifications. 8 9 10 74 Function Variable and Statement }""'unction Place the names of variables, integer constants, and stat em ent function parameters in the Symbol Table. DATA Statement Check the syntax of the DATA statement, check its variables for validity, and reformat the statement. FORMAT Convert FORMAT statements into a special form for use by the input/output subroutines during execution of the object program. Phase Number Phase Name Function 11 Subscript Decomposition Calculate the constants to be used in subscript calculation during execution of the object program. 12 Ascan I Check the syntax of all arithmetic, IF, CALL, and statement function statem ents. 13 Asean IT Check the syntax of all READ, WR[TE, FIND, and GO TO statements. 14 DO, CONTINUE, etc. Replace DO statements with a loop initialization statement and insert a DO test statement following the DO loop termination statement; process BACKSPACE, REWIND, END FILE, STOP, PAUSE, and END stat em ents. 15 Subscript Optimize Replace subscript expressions with an index register tag. 16 Scan Change all HEAD, WRITE, GO TO, CALL, IF, arithmetic, and statement function statements into a modified form of Polish notation. 17 Expander I Replace READ, WRITE, GO TO, and RETURN statements with object coding. Expander IT Replace CALL, IF, arithmetic, and statement function statements with object coding. 18 Phase Number Phase Name 19 Data Allocation Allocate a storage area for variables in the object program. 20 Compilation Errors List unreferenced statement numbers, undefined variables, and error codes for erroneous statements. 21 statement Allocation Determine the storage allocation for the object program coding. 22 List Statem ent Allocation List the relative statement number addresses, if requested. 23 List Symbol Table List the subprogram names in the Symbol Table and the System Library subroutine names in the string, if requested. 24 List Constants Compute the addresses of the constants; list the addresses, if requested. 25 Output I Build the program header and data header records and place them in Working Storage; place the real and integer constants into Working Storage. 26 Output II Complete the conversion of the string to object coding and place the object program into Working storage. 27 Recovery Print the compilation termination message; exit by executing a CALL EXIT. CORE LAYOUT Function Figure 15, panel 1 shows the layout of the contents of core storage after the Monitor Control Record Analyzer has fetched phase 1 of the FORTRAN Compiler into core storage and has passed control to the control record analyzer portion. The principal print and principal input device subroutines have been fetched by phase 1. The card input and print buffers have been allocated by phase 1. Figure 15, panel 2 shows the layout of the contents of core storage after the control record analyzer portion of phase 1 has passed control to the statement input portion. The control record analyzer portion of the phase is overlaid by the input statem ent string. Figure 15, panel 3 shows the layout of the contents of core storage during the execution of phases 2 through 18. During these phases the boundary separating the statement string and Symbol Table fluctuates as the string and Symbol Table are massaged. Figure 15, panels 4 and 5 show the layout of the contents of core storage during the execution of phases 19 through 24. Panel 4 reflects the contents of core storage before any printing has been performed in those phases. In panel 5 the lower-addressed portion of these phases has been overlaid by the print buffer when printing has been performed. Figure 15, panels 6 and 7 show the layout of the contents of core storage during the execution of phase 25. Panel 6 reflects the contents of core storage before any object coding has been generated and written to disk. In panel 7 the lower-addressed portion of the phase has been overlaid by the disk output buffer when object coding has been generated and written to disk. Figure 15, panel 8 shows the layout of the contents of core storage after control has been passed to phase 26. The disk buffer has been allocated by phase 26 and is not an overlay. Figure 15, panel 9 shows the layout of the contents of core storage after control has been passed to phase 27. The principal print device subroutine has been fetched by the phase. The DCOM buffer has also been allocated by the phase. Section 11. FORTRAN Compiler 75 CD CD CD (3) CD (0 0) ® 0 COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor COMMA, Skeleton Supervisor DISKZ DISKZ DISKZ DISKZ DISKZ DISKZ DISKZ DISKZ DISKZ DCOM Buffer Statement String Statement String Statement String Statement String Statement String Statement String Statement String Phase 27 Phase 1, Control Record AnalY2.er Portion ---------- ----- Print Buffer Print Buffer Primary Card Buffer Primary Card Buffer FORTRAN Communications Area FORTRAN Communications Area Principal Input Device Subroutine Principal Input Device Subroutine Secondary Cmd Buffer Card Buffer Phase 1, Statemlmt Input· Portion Phase 1, Statement Input Portion Principal Print Device Subroutine Principal Print Device Subroutine ROL Subroutine ROL Subroutine Figure 15. ----- ---- Symbol Table Symbol Table Symbol Table Symbol Table Symbol Table Symbol Table FORTRAN Communications Area FORTRAN CommuniCations Area FORTRAN Communications Area FORTRAN Communications Area FORTRAN Communications Area FORTRAN Commun ications Area Disk Buffer Disk Buffer Phase Phase 25 26 ROL Subroutine ROL Subroutine Print Buffer Phases Phases 19-24 19-24 Phases Phase 2-18 ROL Subroutine 25 Principal Print Device Subroutine Principal Print Device Subroutine ROL Subroutine ROL Subroutine ROL Subroutine Core Layout During FORTRAN Compiler Operation FORTRAN COMMUNICATIONS AREA The FORTRAN Communications Area consists of 16 words of storage where information obtained 76 ---- from the FORTRAN control records and compilergenerated 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 3. Table 3. Word The Contents of the FORTRAN Communications Area Symbolic Name Description of Contents 1 SOFS The address of the start of the str i ng. 2 EOFS The address of the end of the string. 3 SOFST The address of the start of the Symbl Table. 4 SOFNS The address of the start of the nonstatement-number entries in the Symbol Table. 5 SOFXT Phases 1-20. The address of the start of the Symbol Table entries for SGTs (subscriptgenerated temporary variables). 6 SOFGT Phases 21-25. The work area word count. Phases 1-20. The address of the start of the Symbol Table entries for GTs (generated temporary storage locat ions). Phases 21-25. The constant area word count. 7 EOFST The address of the end of the Symbol Table. 8 COMON Phases 1-19. The address of the next available word for COMMON storage. Phase 20. The address of the highestaddressed word reserved for COMMON storage. Phase 21. Not used. Phases 22-25. 9 CSIZE PHASE AREA Relative entry point. The Phase Area is the area into which the various phases of the compiler are read by the ROL subroutine. 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 two phases, however, that are exceptional in that they are loaded at some location other than the Phase Area origin. The ROL subroutine in phase 1 is loaded into highaddressed storage by phas e 1 so that it occupies initially the position it will occupy throughout the compilation. The control record analysis portion of phase 1 is loaded into the String Area. This portion of the phase is in -use only until the FORTRAN control records have been processed and is overlaid by the source statements. Phase 27, the Recovery Phase, which is executed after the object program has been produced, is also read into the String Area. All phases except Phase 20. The COMMON area word count. Phase 20. The address of the lowestaddressed 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 a SUBROUTINE or FUNCTION statement) stored in name code. 13 SORF Set positive to indicate FUNCTION. Set negative to indicate SUBROUTINE. o indicates mainline. 14 CCWD Control card Bit 15 set to Bit 14 set to Bit 13 set to Bit 12 set to Bit 11 set to word. 1 indicates Transfer Trace. 1 indicates Arithmetic Trace. 1 indicates Extended Precision. 1 indicates List Symbol Table. 1 indicates List Subprogram Names Bit 10 set to 1 indicates List Source Program. Bit 9 set to 1 indicates One Word Integers. 15 10CS 10CS Control Card Word. Bit 15 set to 1 indicates 1442 Card Read Punch, Model 6 or 7. Bit 14 set to 1 indicates 1134/1055 Paper Tape Reader Punch. Bit 13 set to 1 indicates Console Printer. Bit 12 set to 1 indicates 1403 Printer. Bit 11 set to 1 indicates 2501 Card Reader. Bit 10 set to 1 indicates Keyboard. Bit 9 set to 1 indicates 1442 Card Punch, Model 5. Bit 8 set to 1 indicates Disk Storage. Bit 7 set to 1 indicates 1132 Printer. Bit 3 set to 1 indicates 1627 Plotter. Bit 1 set to 1 indicates Unformatted Disk I/O Area. 16 DFCNT The number of fi les defined. STRING AREA During compilation the String Area contains both the statement string and the Symbol Table. The statement string is built by the Input Phase in an ascending chain beginning in the low-addressed words of the String Area. The Symbol Table is built during the compilation process in a descending chain beginning in the high-addressed words of the String Area. The statement string expands and contracts as it is massaged during the compilation process. The Symbol Table expands as items are removed from the statement string and 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 the 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. Section 11 • FORTRAN Compiler 77 If at any time during the compilation an entry cannot be made to the statement string or 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 message is printed (see 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. 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 FORTRAN Communications Area. The second entry is positioned in the lower-numbered words adjacent to the first entry, etc. During the initialization of the Symbol Table in phase 1, three words are reserved for the first Symbol Table entry. This entry is not made, however, Wltil phase 3. From this point the size of the Symbol Table varies from phase to phase Wltil it achieves its largest size in phase 18. Its size always includes the three words reserved for the next Symbol Table entry. During phases 3 through 18, the SyInbol Table contains variables, constants, and statement numbers. Information for these entries has been removed from the statement string and has been replaced by the address of the IT> word of the corresponding Symbol Table entry. Also, the Symbol Table contains the various compiler-generated labels and temporary storage locations used in compilation. 78 During the output phases, 19 through 26, these entries in the Symbol Table are replaced by object program addresses that are inserted into the object coding by phase 26. Format All entries in the Symbol Table consist of tJllree words -- an IT> word and two Name-Data words. The entrios for dimensioned variables are exceptional, however, in that they are six-word entries, the additional three words containing the dimension information. The IT> word occupies the lowest-addresi3ed word of the three word entry. The N arne-Data words occupy the two higher-addressed words. A typical three-word entry is illustrated in the following example of the entry for the integer constant 290. ID Word Data Word 1 Data Word 2 2 9 0 blank blank -------~-- --!.. - - - - - - 11100000000000000,0110010111001110,00000000000000001 Lowest-Addressed Word Highest-Addressed Word Entry in hexadecimal form -EOOO 65CE 0000 The entry for the subprogram name COUNT would appear as: ID Word Name Word 1 C 0 Name Word 2 U N T 10000000010000000 ,I 0000il OiOliOlo¥OOoiOiOl iOoOil, Lowest-Addressed Word Highest-Addressed Word Entry in hexadecimal form - C080 8684 C563 ID Word Table 4. The Contents of the FORTRAN Symbol Table ID Word The layout of the Symbol Table ID word is given in Table 4. The ID word is formed when the entry is placed in the Symbol Table. Name-Data Words The Name-Data words of Symbol Table entries have the following format: Word Bit 1 o 1-15 2 o 1-15 Contents 0, if the following 15 bits contain the first half of a constant; 1, if the following 15 bits contain anything other than the first half of a constant. First 15 bits of the 30-bit Symbol Table entry Same as bit 0 of word 1 Second 15 bits of the 30-bit Symbol Table entry 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 5 1 - Statement function parameter/dummy argument 6 1 - Statement number 7 1 - Statement function name 8 1 - Subprogram nome 9 1 - FORMAT statement number 10 1 - Referenced statement number or defined variable 11 1 - External 12 1 - 13 1 -' Subscript-generated temporary variable (S GT) 14 1 - Allocated variable 15 Not Used Generated temporary storage location (GT) Three words are always used for the dimension information regardless of the number of dimensions. For one-dimensional arrays, all three dimension wor:ds contain the integer constant that specifies the dimension of the array. For example, the entry for array ARRAY (10) would appear as: Dimension Information I Dimensioned Entries The Symbol Table entry for a dimensioned variable requires six words: two for the array name, one for the ID word, and three for the dimension information. The dimension information occupies the three lowest-addressed words, the ID word occupies the next higher-addressed word, and the Name-Data words occupy the two highest-addressed words. 10 LowestAddressed Word 10 Array Nome 10 HighestAddressed Word For two-dimensional arrays, the first (highestaddressed) dimension word contains the integer constant of the first dimension; the middle and last (lowest-addressed) dimension words both contain the product of the first and second dimension integer constants. Thus, the dimension information for array B( 5, 15) appears as: Section 11. FORTRAN Compiler 79 , the number of words used to store that statement, including the ID word and statement terminator. The statement type codes, shown in Table 5, are added in the Classifier Phase (except for FORMAT statements) . Dimension Information 75 75 5 For three-dimensional arrays, the first dimension word contains the integer constant of the first array dimension; the middle dimension word contains the product of the first and second dimension integer constants; the third dimension word contains the product of the first, second, and third integer constants of the array dimensions. The dimension information for array C(9, 9,,9) appears as: Array Name Dimension Information 729 81 9 IDWord I The source statements are read by the Input Phase, converted to EBCDIC, and stored in core storage. The first statement is stored starting at $ZEND, 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. 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. The ID word has the following format: 0-4 5-13 14 Contents Statement type code Statement Norm Varied; used for interphase communication 1, if statement is numbered; otherwise, 0 The Norm is the only portion of the ID word completed by the Input Phase. The Norm is a count of 80 Code Statement Types 00000 Arithmetic 00001 BACKSPACE 00010 END 00011 END FILE 00100 SUBROUTINE 00101 REWIND I STATEMENT STRING Bit Table 5. FORTRAN Statement ID Word Type Codes 00110 CALL 00111 COMMON 01000 DIMENSION 01001 REAL 01010 INTEGER 01011 DO 01100 FORMAT 01101 FUNCTION 01110 GO TO 01111 IF 10000 RETURN 10001 WRITE 10010 READ 10011 PAUSE 10100 Error 10101 EQUIVALENCE 10110 CONTINUE 10111 STOP 11000 DO test 11001 EXTERNAL 11010 Statement Function 11011 Internal Output Format 11100 CALL LINK, CALL EXIT 11101 FIND 11110 DEFINE FILE 11111 DATA Statement Body Each statement, after being converted 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 separated 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 for that particular statement type. All statements in the statement string carry the statement terminator except for FORMAT and CONTNuE statements and compiler-generated error statements. Error statements inserted into the string by the compiler are inserted without the terminator character. COMPILATION ERRORS is printed and no object program is placed in Working Storage. Error messages appear in the following format: CAA ERROR AT STATEMENT NUMBER XXXXX+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 Programming and Operator's Guide publication 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 the output of the object progTam. 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, or the remainder of the compilation is bypassed and the message PROGRAM LENGTH EXCEEDS CAPACITY is printed. When an error is detected during the compilation process, the statement in error is replaced by an appropriate error statement in the statement string. Each error statement is added during the phase in which the corresponding error is detected and the procedure is the same in all phases. 1. 2. 3. The type code in the erroneous statement's ID word is changed to the error type. The statement body is replaced by the appropriate error number. The statement number, if present, is retained in the Symbol Table and the Symbol Table address is retained in the error statement on the string. The statement string is closed up, effectively deleting the erroneous statement from the statement string. Error statements in the statement string are exceptional in that they do not carry the statement terminator character (semicolon). Error indications are printed at the conclusion of compilation. If a compilation error has occurred, the message OUTPUT HAS BEEN SUPPRESSED COMPILER I/O The compiler uses the DISKZ subroutine for all disk I/O operations required during compilation. The compiler uses the principal input device subroutine to read the control records and source statements to be compiled, and the principal input conversion subroutine to convert the source input to EBCDIC. The principal print device subroutine is used to perform any printing required during the compilation. FETCHING COMPILER PHASES The ROL subroutine loaded into high-addressed storage as part of phase 1, obtains from each phase the word count and sector address of the next phase to be loaded. This subroutine then reads the next compiler phase into core storage and transfers control to it. This subroutine also examines the Console Entry switches. If a request to dump is indicated in the switches, it calls the System Core Dump program via Section 11. FORTRAN Compiler 81 the $DUMP entry point in the Skeleton Supervisor to dump the statement string, the Symbol Table, and the FORTRAN Communications Area. At the completion of the dump the ROL subroutine regains control. It then fetches and transfers control to the next phase. PHASE DESCRIPTIONS PHASE 1 • Reads the control records; sets the corresponding indicators in the FORTRAN Communications Area. • Reads the source statements; stores them in the .string Area; precedes each statement with a partially completed ID word. • Checks for a maximum of five continuation records per statement. • Lists the source program, if requested. Phase 1 is composed of two major segments; the first analyzes the control records and the second inputs the source statements. The control record analysis portion of phase 1 is loaded i.nto the String Area, while the statement input portion is loaded at the normal Phase Area origin. The control record analysis subroutines, therefore, remain in storage until the processing of the control records is completed. They are then overlaid by the source statements as the string is built by the statement input portion . Errors Detected The errors detected by phase 1 are: 1 and 2. PHASE 2 • Determines the statement type for each statement; inserts the type code into the statement ID word. • Places the statement terminator character (semicolon) at the end of each statement. 82 • 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 that initialize I/O subroutines during execution of the object program, if the IOCS control indicators are present. According to the indicators set in the IOCS word (word 15) of the FORTRAN Communications Area by the previous phase, phase 2 generates the required calls to FORTRAN I/O. If the Unformatted Disk I/O Area indicator is on, a 'LIBF UFIO' followed by its parameter is inserted into the string. If the Disk indicator is on, a 'LIBF SDFIO' followed by its parameter is inserted into the statement string. If any other indicator in the IOCS word is on, phase 2 inserts the 'LIBF SFIO' followed by its parameters into the statement string. The table of devfce servicing subroutines (ISSs) is also built and inserted. Phase 2, beginning with the first statement of the string, checks each statement in order to classify it into one of the 31 statement types. FORMAT statements, already having the type code, and compilergenerated error statements 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. 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 8, which 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 2 converts all parentheses, commas, etc., into special operator codes. Each operator is stored in a separate word. Also, each arithmetic operator (+, -, /, *, **) is stored in a separate word, and a statement terminator character (semicolon) is placed after each statement, except for CONTINUE and FORMA T statements and compiler-generated error statements. NOTE: The string words containing name or constant characters have a one in bit position O. Bit SUBROUTINE or FUNCTION statement Type statements (REAL, INTEGER) EXTERNAL statements DIMENSION statements COMMON statements EQUIVALENCE statements position 0 of string words containing arithmetic operator characters has a zero. 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 numbers 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. The error detected by phase 2 is: 4. A check is also made to ensure that all DATA and DE FINE FILE statements appear within the Specification statement group. Placement of these two statement types is optional; however, they must not be intermixed with EQUIVALENCE statements. The SORF word (word 13) in the FORTRAN Communications Area is appropriately modified if a SUBROUTINE or FUNCTION statement is present. The second pass of phase 3 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 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. PHASE 3 Errors Detected • Checks the subprogram and Specification statements for the proper order; removes any statement numbers from these statements. The errors detected by phase 3 are: 5, 6, and 9. • Checks to ensure that statements following IF, GO TO, CALL LINK, CALL EXIT, RETURN, and STOP statements have statement numbers. Errors Detected PHASE 4 • Removes CONTINUE statements that do not have statement numbers. • Checks the statements for statement numbers; checks the Symbol Table for a previous entry of the same statement number. • Places the statement number into the Symbol Table; places the address of the Symbol Table entry into the string. Phase 3 makes two passes through the statement string. The first pass checks to ascertain the subprogram and Specification statements are in the following sequence: • Places COMMON statement variables into the Symbol Table; includes dimension information in the Symbol Table entries, if present; removes the statement from the string. • Checks for a SUBROUTINE or FUNCTION statement; places 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. Phase 4 is a two-pass phase. The first pass processes COMMON statements; the second pass processes a SUBROUTINE or FUNCTION statement, including a FUNCTION designated in a REAL or INTEGER statement. Section 11. FORTRAN Compiler 83 Pass 1 of phase 4 examines all COMMON statements, checking all variable names for validity. Valid, unique variable names found in COMMON statements are placed into the Symbol Table. Duplicate va.riable names are in error. When dimension information is present in a COMMON statement, the Symbol Table entry for the dimensioned variable 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 ill word is updated to indicate the presence of the dimension information and the level of dimensioning. When all the variables in a COMMON statement have been processed, it is removed from the string. The second pass of phase 4 checks for a SUBROUTINE or FUNCTION statement among the Specification statements. If either is found, the SORF word (word 13) 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 words (words 11-12) in the FORTRAN Communications Area. The subprogram parameters are checked and, if valid, they are added to the Symbol Table and the statement is removed from the string. The first 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. Errors Detected Errors Detected The errors detected by phase 5 are: 7, 8, 15, 17, 18, 19, 20, 21, and 22. The errors detected by phase 4 are: 7, 8, 10, 11, 12, 12, 13, 14, and 15. PHASE 6 • Indicates in the Symbol Table ID word the variable's mode (real or integer). • Checks EXTERNAL statements for the names IFIX and FLOAT, which are not allowed. The processing of phase 5 is done in two passes. The first pass analyzes DIMENSION 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 dimens ion information, is added to the Symbol Table. If a duplicate is found that has not yet been dimensioned' the dimension information from the variable name is added to the existing Symbol Table entry. If a duplicate is found that has already been di.mensioned, the variable name is in error. In a subprogram compilation, a comparison is made to ensure that no variable name duplieates the subprogram name. The second pass of phase 5 examines the REAL, INTEGER, and EXTERNAL statements found in the statement string. Each variable found in tbese 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 COMMON or DIMENSION statement entries are in error. Those not equated to Symbol Table entries are added to the Symbol Table in the same manner as in the first pas s of this phase. • Scans all IF, CALL, and arithmetic statements for valid real constants. • Converts real constants to standard or extended preciSion format, as specified. PHASE 5 • • 84 Places DIMENSION statement variables into the Symbol Table; places dimension information into the Symbol Table entries; removes the statement from the string. Places variables and dimension information from REAL, INTLGER, and EXTERNAL statements into the Symbol Table. Each valid real constant encountered in an arithmetic, IF, or CALL statement is converted to bina.ry in the precision indicated by the FORTRAN Communications Area indicators. The Symbol Table is checked for a previous entry of the constant. If a previous entry is found, no new entry is made. The constant operator, a special code indicating that the following word is the Symbol Table address of a constant, followed by the Symbol Table address of the constant already entered is inserted into the statement string in place of the constant. If no previous entry in the Symbol Table is found, the converted constant is added to the Symbol Table. The constant operator along with the Symbol Table address replaces the constant in the statement string. The statement string is closed up following the alteration of the string. PHASE 8 • Places variables and integer constants into the Symbol Table. • Places parameters from statement function statements into the Symbol Table. • Replaces operators with pointers to the Forcing Table to be used in phase 16. • Converts the left parenthesis of subscripts to a special dimension indicator. Errors Detected The following errors are detected by phase 6: 23 and 50. PHASE 7 • Checks the syntax of DEFINE FILE, CALL EXIT, and CALL LINK statements. • Determines the defined file specifications. All variable names in DEFINE FILE, CALL LINK, and CALL EXIT statements 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. Phase 7 checks to ensure that a DEFINE FILE statement does not appear in a subprogram. This phase computes the file definition specifications, that is, a DEFINE FILE Table consisting of one entry for each unique file. Each entry consists of the file number, the number of records per file, the record length, the associated variable, a blank word for insertion of the file's sector address at the time the program is loaded for execution, the number of records per sector, and the number of disk blocks per file. A count is kept in the D FCNT word (word 16) in the FORTRAN Communications Area of the number of files defined. Errors Detected The errors detected by phase 7 are: 3, 70, 71, 72; and 73. Phase 8 checks the variable names found in the statement string for validity. Valid variables are 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 are also added to the Symbol Table, provided they are unique. However, names and integer constants that are found in subscript expressions are not added to the Symbol Table until a later phase. When adding names and constants to the Symbol Table, phase 8 replaces them in the string by the address of their respective Symbol Table entries. The address replacing a constant or name is the address of the ID word of the Symbol Table entry for that constant or name. Internal statement numbers are located in the Symbol Table and are replaced by the address of their corresponding Symbol Table entries; those statement numbers not found in the Symbol Table (i. e. , not previously entered) are in error. Phase 8 changes the ID word of the statement function statement, until now identical to that of an arithmetic statement, to the statement function type. Also, the statement function name and the parameters of statement functions are added to 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 8, the left parenthesis on subscripts is changed to a special left parenthesis operator that indicates the order of the dimension that follows. This phase also converts all operators, except those in subscript expressions, from the 6-bit EBCDIC representation to a pointer value. This pointer value is derived from the Forcing Table. The conversion is done in preparation for the Scan Phase, Section 11. FORTRAN Compiler 85 phase 16, when an arithmetic operational hierarchy will be determined through these pointer values. Errors Detected The following errors are detected in phase 8: 7, 24, 25, 26, and 43. The constant may be one word in length (an integer), two or three words in length (a real number in standard or extended precision), or n words in :length (a literal) . Each data pointer has the following form: Word Bit 1 0 1 PHASE 9 2 • Checks the DATA statement for correct syntax and valid variable references. • Reformats the DATA statement into a string of data groups. Each variable in the DATA statement is checked to ensure that it has been previously entered into the Symbol Table. A check is also made to ensure that a subscript expression for a DATA statement variable does not exceed the level of dimensioning indicated in the Symbol Table entry for the referenced variable. Phases 9 converts the DATA statement into the following form: I ID Word 2 3-4 5-15 0-15 Contents ----1 0, if no displacement word follows 1, if a displacement word follows 0, non-externally subscripted variable 1, externally subscripted variable Zeros Symbol Table address of the variable Displacement word (present only if variable is subscripted) A displacement word follows data pointers to subscripted variables; its contents are the adjusted subscript offset. The statement terminator is removed from the DATA statement in phase 9. Errors Detected Phase 9 detects the following errors: 75, 76, 77, 78, 79, 80, and 82. I Data . Group 1 2l I Data . Group 2 II I II PHASE 10 • Converts FORMAT statements into a chain of format specifications for interpretation by the FORTRAN I/O subroutines. • Converts the Apostrophe (') type format to H type. Each data group has the following form: Data Data Data Data I Heade~t~;_nt~_p_oi_nt_e_r_ll~P_o_in_te_r2~1~~zc~__~p_o_in_te_r~nl Each data header has the following form: Contents Bits o 1-12 13-15 86 o Duplication factor Length of the following constant In decomposing the FORMAT statement, phase 10 converts each format type into a format specification (see Table 6). Where required, the Field Repeat, Group Repeat, and REDO counts are computed and inserted. At the completion of phase 10, the FORMA T statement is simply a chain of format specifications. The conversion of a FORMAT statement i,3 shown below: ID Word I 999 H,3 A,P I' =,b F,3,6 E,4,l0 " I / 1,8 RR,4 I -3 I T,I H,lO I b,A I N,S I W,E R,b I,S H,3 X,Y I I =,b F,4,9 RR,16 I I I Table 6. Conversion of FORTRAN FORMAT Specifications Format Type (input) Format Specification (output) 4 Bits ( A 5 Bits 7 Bit.s 1.. \~( V 0000 DD F 0001 DD I 001 0 WW A 001 1 WW X 0100 WW H o 1 01 WW T 01 10 E / 01 1 1 WW CC Undefined 1 000 NO Field Repeat 1001 NO REDO 101 1 RRI o { Not Used RR NO (number) Positive count of the number of repetitions to be made of a field or group. Maximum = 127 in E and F type formats, 145 in I, A, X, and H type formats. RRI (group repeat) Negative count of the number of words back to the first specification of a group to be repeated. Positive count of the number of character positions to be skipped. RR (REDO) Positive count of the number of words back to the rightmost left parenthesis in the statement. DD (decimal width) Maximum = 127 (used only in E and F type formats). WW (total field width) CC (carriage control) A- WW Group Repeat 1010 Errors Detected The following errors are detected in phase 10: 27, 28, 29, and 30. PHASE 11 • I I 16 Bits Calculates the constants needed for object program subscript computation. • Sets up dummy arguments for the insertion of variables in the object coding. Phase 11 bypasses all FORMAT, CONTINUE, and compiler-generated error statements. All other statements are scanned but only those statements that contain the special left parenthesis operator inserted by phase 8 are operated upon. The subscripting information for each variable is checked for validity. Section 11. FORTRAN Compiler 87 Phase 11 then calculates the subscript constant D4 and, depending on the dimensioning level, the constants Dl, D2' and D3. (See below for the method of derivation of these constants.) These subscript constants are inserted into the subscript expression with the subscript indices. The right and left parenthesis enclosing the subscript expression are then changed to special operators to be used in a later phase. D =L*M*C *S 3 D 5 = [(C - 1) + L * (C - 1) + L * M * (C 424 6 I)J *S In the above formulas, L first dimension factor M second dimension factor S size in words of the array entries 1 for one-word integers Calculation of the Subscript Constants 2 for standard preciSion Assuming the maximum subscript form 3 for extended preciSion c*v""'c' constants in the first dimension val ue where constants in the second dimension value v represents an unsigned, nonsubsaripted, integer C 5 and C 6 variable and c and c' represent unsigned integer constants, = constants in the third dimension value I, J, and K are the subscript indices. phase 11 computes the subscript constants (D-factors) as follows: Errors Detected For a 1-dimension array -A(C *1 + C ) 2 1 D 1 ]) 4 = C =: 1 (C 2 The following errors are detected in phase 11: 31, 32, 33, 34, and 35. *8 PHASE 12 - 1) *8 • Checks the syntax of arithmetic, IF, CALL, and statement function statements. • Checks statement function calls, including nested calls, for valid names and the correct number of parameters. • Checks for the definition of variables; checks for valid statement number references in IF statements. For a 2-dimension array -A(C *1 + C , C *J + C4) 2 1 3 D D 1 2 D4 = C *S 1 =L*C *S 3 = [(C 2 - 1) + L * (C 4 - 1) J *8 For a 3-dimension array -A(C *1 + C , C * J + C4' C *K + C ) 5 2 3 6 1 D D 88 1 2 = C = 1 *S L * C *S 3 The syntax of all CALL statements is check,ed. A call operator is inserted between the subprogram name and its dummy arguments for use in the Scan Phase, phase 16. During the analysis of statement function statements a table is built containing the statement function name and the number of parameters associated with that function. This table is used in analyzing statement function calls, including nested calls, to check for the proper number of parameters. The syntax of the record number expression in Disk READ /WRITE statements is checked. The right parenthesis is changed to a colon operator which facilitates the scan of the Disk READ /WRITE statement in the following phase. Errors Detected PHASE 14 • Checks for valid syntax in DO statements and in nested DO loops. • Generates and inserts at the appropriate points the coding needed to perform the DO test. • Checks the syntax of DO, CONTINUE, BACKSPACE, REWIND, END FILE, STOP, PAUSE, and END statements. • Checks for a GO TO, IF, STOP, CALL LINK, CALL EXIT, or RETURN statement as the last executable statement of the source program. The following errors are detected in phase 12: 36, 37, 38, 39, 40, 41, 42, and 43. PHASE 13 • Checks FIND, READ, WRITE, and GO TO statements for correct syntax, valid FORMAT statement references, and valid variables. • Detects implied DO loops in READ and WRITE statements; generates the indicators necessary for later processing of the DO loop. When READ and WRITE statements are encountered in a mainline program, a check is made for the presence of 10CS indicators in the FORTRAN Communications Area. All READ and WRITE statements in a SUBROUTINE or FUNCTION subprogram do not require the presence of 10CS indicators. READ, FIND, and WRITE statements are checked for valid variables and for proper syntax. READ and WRITE statements are checked for a valid FORMAT statement reference. Disk READ and WRITE statements are differentiated by means of the apostrophe (') separating the file number and record number parameters. The appropriate disk or nondisk I/O operator is generated for and inserted into each READ or WRITE statement. READ and WRITE statements are also checked for implied DO loops. The necessary DO initialize and DO test operators are generated and inserted into the statement body. Errors Detected The following errors are detected in phase 13: 43, 44, 45, 46, 47, 48, 49, 50, and 68. BACKSPACE, END FILE, and REWIND statements are checked for valid unit addresses. Valid unit addresses are placed into the Symbol T able as integer constants. BACKSPACE, END FILE, and REWIND statements are then replaced on the statement string by a generated LIBF followed by the Symbol Table address of the unit address. This Symbol Table address becomes an argument to the LIBF. Statements which follow STOP statements are checked to ensure that they are numbered statements. All integers found in PAUSE and STOP statements are checked to ensure that they are not greater than 9999. Valid integers are added to the Symbol Table as integer constants. As the DO statements are analyzed for correct syntax, phase 14 constructs a DO Table in the following format: Word Contents 1 2 Index DO test statement number or Generated Label Test value Increment DO range statement number 3 4 5 Section 11. FORTRAN Compiler 89 A DO Table entry is made for each DO statement when it is detected. As the statements following the DO statement are scanned, the statement numbers are compared with the contents of word 5, the range limit, of the DO Table entries. When the range limit is found the DO test coding is inserted into the statement string. The DO Table is built from low-to-high-addressed storage. It is scarmed, however, from high-to-lowaddressed storage. In this manner, nested DO loops that violate range limits are detected. Errors Detected The following errors are detected in phase 14: 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, and 62. PHASE 15 • Scans READ, WRITE, IF, CALL, and arithmetic statements for subscript expressions. • Optimizes subscript calculation by means of the Subscript Expression Table. • Generates SGTs (Subscript-generated temporary storage locations) as necessary. Each unique subscript expression is placed into a table called the Subscript Expression Table. Each entry in this table appears as follows: Word 90 Contents 1 D4 2 I, first dimension subscript index 3 D1 4 J, second dimension subscript index 5 D2 6 K, third dimension subscript index 7 D3 8 /8010, if entry is not used /0010, if entry is used on this statement /0000, if entry was used on a previous statement Also, each unique variable of a subscript expression is placed into a table called the Bound Variable Table. As each subscript expression is entered into the Subscript Expression Table, it is removed from the string. The subscripted variable is then tagged with SGT indicator bits pointing to the Subscript Expression Table entry. An SGT (Subscript-generated temporary storage location) is generated for each entry made to the Subscript Expression Table,. The SGT is placed into an SGT Table. The SGT is also placed into the Symbol Table and the address of the Symbol Table entry is inserted into the statement in the string. For each subscript expression encountered, a scan is made of the Bound Variable Table. If one or more of the variables in the subscript expression are not located in the Bound Variable Table, the subscript must be recalculated. Thus, a unique entry is made to the Subscript Expression Table for the expression and an associated SGT is generated. If, however, all the variables of the subs cript expression are located in the Bound Variable Table, the Subscript Expression Table is then scanned to determine if a duplicate subscript expression is already located in the table. If no equivalent is found, the subscript expression is added to the tablo as a unique entry and an associated SGT is generated. If a duplicate expression is found in the Subscript Expression Table, the subscript expression :is removed from the string and is replaced by a pOinter to its duplicate in the Subscript Expression Table. Thus, identical subscript expressions share the same indices of a common entry in the Subscript Expression Table and the same SGT. Whenever a variable is assigned a new value (i. e. , appears to the left of the equal sign in an arithmetic expression, in the argument list of a subprogram, etc.), that variable, if found in the Bound Va:riable Table, is removed from the table. This removal from the Bound Variable Table causes all entries in the Subscript Expression Table containing tha.t variable to be removed. The associated SGTs are also removed from the SGT Table but remain in the Symbol Table. The addresses in the string of the SGTs in the Symbol Table also remain. If a statement is encountered containing a Bubscript expression and having a statement number that is referenced by some other statement, the entire Subscript Expression Table is cleared and all subscripts, beginning with the subscript expression in the reference statement, must be recalculated. The Subscript Expression Table is also cleared whenever a DO statement is encountered. Following subscripts must be recalculated. Implied DO loops, as in READ and WRITE statements, cause only those entries involving the index of the implied DO to be cleared. Only the subscripts involving that index must be recalculated. Errors Detected The following error is detected in phase 15: 63. Table 7. FORTRAN Forcing Table Operator • • Converts all FIND, READ, WRITE, IF, GO TO, CALL, statement function, and arithmetic statements into a modified form of Polish notation. Establishes the order of arithmetic operational performance. Sets up the arguments for subroutine calls to be generated. Phase 16 converts all READ, WRITE, GO TO, arithmetic' statement function, CALL, and IF statements to a modified form of Polish notation. This conversion is accomplished through the use of a Forcing Table, strings, and an Interpreter. The Forcing Table is a table of 2-word entries. The first word contains the left and right forcing values for each operator. The first 8 bits constitute the left forcing value and the last 8 bits, the right forcing value. The second word of the 2-word entry contains the address of the string to be used by the Interpreter when the corresponding operator is forced. (See Table 7.) The string address (word 2 of each Forcing Table entry) for each operator is a pointer used by the Interpreter. This pointer designates to the Interpreter a string of operations that must be performed by the Interpreter in order to convert the forced operator and its operands to the modified form of Polish notation. NOTE: Strings may also contain pointers. These pointers designate substrings, which are detailed String Pointer N Name Operator 63 00 0 Normal Right Parenthesis 01 32 0 ; Statement Terminator 3C 3C 0 +,- Add, Subtract OA OA 1 /,* Divide, Multiply 05 05 1 1 t Exponentiation 05 04 Assign 3B 3C 1 ( Normal Left Parenthesis 31 01 2 , Comma 31 30 3 Call Operator 01 01 4 Special Parenthesis for Literals, Special Parenthesis for Dimensioned Arrays 31 01 6 Unary Minus OA OA 7 Range Operator 31 01 8 Special Right Parenthesis in Implied DOs 31 01 9 Subscripting Right Parenthesis in Implied DOs 31 01 10 I/O Operator before Scan 30 01 11 I/O Operator during and after Scan 30 01 12 Equal Sign in Implied DOs 31 01 13 +- 8.8. 8.8. G 8 8 0) • Forcing Value Left I Right ) 0 PHASE 16 Definition 8 G 8 extensions of the string and which are used by the Interpreter in the same manner as the strings. A forcing condition exists if the forcing value of the right operator is equal to or greater than the forcing value of the left operator. This condition results in the left operator being forced; that is, the operation to the left has precedence. Whenever a non-forcing condition exists, the operands and operators involved remain in the statement. Operands and operators are removed from the string only when an operator is forced and the Interpreter-generated symbol F AC replaces them. The Interpreter controls the conversion of the statement to the modified form of Polish notation. As each operator is forced, the Interpreter, using the string address from the Forcing Table, selects the Section 11 • FORTRAN Compiler 91 associated string and performs the string operations. These operations result in the output of the forced operator and its operands, resequenced in the order of operational performance. The forced operator and its operands are put out into the output buffer by the Interpreter and are replaced in the statement body by the symbol F AC. The scan begins with the string pOinter moving from left to right. When an operator is encountered, the scan looks two words to the left for a second operator. If none is found, the string pointer moves to the right, one word at a time, in search of another operator. If an operator is found to the left, the scan converts the left and right operators to their respective forcing values and checks for the forcing condition. [f a forcing condition does not exist, the scan again resumes, moving the pointer to the right. If, however, a forcing condition does exist, the Interpreter handles the operator and operands involved. Upon return to the scanning process, the string pointer is positioned to the same operator that caused the previous force, the symbol F AC resides one word to the left in place of the forced operator and its operands, and a new operator resides two words to the left. These operators are then converted and the check is made for the forcing condition. If at any time the symbol F AC is an operand of a forced operator, F AC is replaced by a GT (generated temporary storage location). The GT is then outputted as the operand in place of FAC. FAC again replaces the forced operator and operands in the statement body. New GTs are created as they are needed in order to maintain FAC in the statement body. At the completion of the scan process the statement body has been reduced to the symbol FAC; the statement body now consists of less than four words. The output buffer contains the entire statement converted to the modified form of Polish notation. If in looking for a left operator the scan must bypass the argument list of a call operator, the elements of this argument list are stored temporarily in a special buffer called the Push-down List. When the call operator is forced and placed into the output buffer, the Push-down List is then emptied into the output buffer in reverse order so that the arguments are restored in their original sequence following the call operator. 92 When the scan detects that the statement consists of less than four words (the symbol F AC only), the output buffer is placed into the statement string overlaying the symbol FAC, and the scan moves to the next statement. The statement terminator (semicolon) serves as an operator that is scanned as any other operator. Figure 16 illustrates the scanning process. Errors Detected The following error is detected in phase 16: 64. PHASE 17 • Replaces FIND, READ, WRITE, GO TO, and RETURN statements with compiler-generated coding. • Replaces those parts of arithmetic, IF, CALL, and statement function statements that involve subscripting of variables with compiler-'generated coding. • Checks subprograms for a RETURN statement; generates the return linkage coding. Phase 17 replaces READ, WRITE, and FIND statements by a call to the appropriate I/O subroutine, along with the necessary arguments. Generated labels are added to READ and WRITE statements involving implied DO loops. Also, statement function, arithmetic, IF', and CALL statements are examined for subscripted variables. Those parts of these statements that involve subscripts are replaced by compiler-generated coding. In order to produce more efficient coding, phase 17, by means of an SGT Table, eliminates redundant loads of the same subscript offset. Also, the instructions used to load literal subscripts are placed immediately before the indexed operations. Errors Detected The following error is detected in phase 17: 69. Arithmetic Statement A=B+C*D-E Contents of the Output Buffer Contents of the string Step A = B+C*D-E A is not an operator, so the pointer, P, moves to the right. When scanning to the right for an operator, non-operators are simply skipped. When scanning for an operator to the left with which to force, non-operators are added to the push-down list. tP 2 A - B+C*D-E 3 A There is no operator to the left with which a forcing condition test can be made; therefore, the pointer moves to the right until an operator is encountered. t p = B+C*D-E· t Using the forcing table, the pointer indicates the RV (right forcing value) and P - 2 (two positions to the left) indicates the LV (left forcing value). The RV of + is OA; the LV of = is 3B. OA is not equal to or greater than 3B. The left operator is not forced, and the pointer moves to the next operator. ' P 4 A ~ Comments The RV of * is 05; the LV of + is OA. 05 is not equal to or greater than OA.~ The left operator is not forced, and the pointer moves to the next operator. B+C*D-E· t ' P A B+C*D-E· t' *CD The RV of - is OA; the LV of * is 05. OA is greater than 05. Hence, the left operator is forced. *CD is placed in the output buffer and the symbol FAC replaces the outputted operator and operands. The pointer is not moved; an attempt is made to force the new left operator. *CD+B The RV of - is OA; the LV of + is ~A. OA is equal to OA. Hence, the left operator is forced. +B is added to the output buffer. The symbol FAC still replaces the contents of the output buffer. The pointer is not moved; an attempt is made to force the new left operator. *CD+B The RV of - is OA; the LV of = is 3B. OA is not equal to or greater than 3B. is not forced and the pointer moves to the next operator. *CD+B-E The RV of ; is 3C; the LV of - is OA. 3C is greater than ~A. Hence, the left operator is forced. -E is added to the output buffer. The symbol FAC still replaces the contents of the output buffer. The pointer is not moved; an attempt is made to force the new left operator. *CD+B-E=A The RV of ; is 3C; the LV of = is 3B. 3C is greater than 3B. Hence, the left operator is forced. =A is added to the output buffer. The symbol FAC sti II replaces the contents of the output buffer. *CD+B-E=A The original statement now consists of three words or less. This indicates that the statement has been scanned. The symbol FAC is now replaced by the contents of the output buffer. P A 6 ~. B+FAC-E· t' P 7 A = FAC-E· t' The left operator P A = FAC-E; 8 t P 9 A = FAC' t P 10 FAC; 11 *CD+B-E=A; The scan is complete. Figure 16. FORTRAN Scan Example PHASE 18 • Replaces arithmetic, statement function, CALL, and IF statements not involving subscripted variables by compiler-generated coding. • Completes the replacement of arithmetic, statement function, CALL, and IF statements that do involve subscripted variables by compilergenerated coding. • Optimizes IF statement branch instructions. • Handles mixed-mode arithmetic. This phase generates the coding necessary to replace arithmetic, statement function, CALL, and IF statements. This phase wholly converts statements of these types that include no subscripted variables and merely completes the conversion, which was partially completed in phase 17, of statements of these types that do include subscripted variables. Phase 18 generates the code to perform integer, real, and mixed-mode arithmetic. Where possible, integer arithmetic is done in-line. The remainder of the coding consists of calls to System Library subroutines, followed by argument lists. As needed, calls to the FORTRAN-supplied FUNCTION subprograms IFIX and FLOAT are generated. Section 11. FORTRAN Compiler 93 All calls to these subprograms are made LIBFs. However, calls to exponentiation subroutines generated by phase 18 are made CALLs. GTs (generated temporary storage locations) detected in the string by this phase or generated by this phase for storing intermediate results of arithmetic calculations are made to agree in mode with the function of which they are a part. Variables that appear in EQUIVALENCE statements are allocated next, one combined equivalence nest at a time. The remaining variables in the Symbol Table are finally allocated, real variables first, followed by integer variables. Phase 19 also computes the core requirements for constants after all defined variables have been allocated. The core requirements for variables and for COMMON are then stored in the FORTRAN Communications Area. Errors Detected There are no errors detected in phase 18. Errors Detected PHASE 19 The error detected by phase 19 is either: H5, 66, or 67. • Fetches the principal print device subroutine for use by phases 19-24; also provides a print interface subroutine for these phases. PHASE 20 • Lists any errors that were detected during the compilation process. Allocates all storage aSSignments aligned according to EQUIVALENCE statements. • Rearranges the statement string if there were no errors detected. • Assigns all allocations according to the specified precision of the program. • Prints the allocations of the variables as they are assigned, if requested. Phase 20 deletes from the statement string EQUIVALENcE statements that do not have an error indicator and replaces EQUIVALENCE statements that have an error indicator by error statements. The Symbol Table is scanned twice. The first scan detects unreferenced statement nwnbers and lists them on the principal print device. The second scan detects undefined variables and lists these also on the principal print device. The statement string is rearranged (if there were no errors in the compilation) so that, if they are present, the DEFrnE FILE Table, format specification strings, and arithmetic statement functions precede the first executable statement. The statement string is scanned for error statements. Two counters are maintained during the scan. The first (STLAB) contains the statement number of the last numbered statement encountered. The second (STCNT) contains a count of the statements encountered since the last numbered statement. Compilergenerated statements and statement nwnbers are disregarded in these counts. When an error statement is detected, these counters are inserted into the error message along with the error nwnber for printing. A check is made on all DATA statements. If a data constant is defined in COMMON, error 81 is indicated. • Allocates storage for COMMON variables. • Phase 19 performs the allocation of the variables found in the Symbol Table; i. e., these variables are assigned storage addresses in the object coding. These addresses replace the Symbol Table entries for the variables. The COMMON area resides in high-addressed storage during execution of the object program. Thus, all COMMON variables are assigned absolute addresses within this high-addressed area. The variable area resides in storage just below the object program during execution. All variables not in COMMON are assigned relative addresses within this area. Phase 19 first allocates COMMON variables found in the Symbol Table. EQUIVALENCE statements that include COMMON variables are examined and the addresses are aligned during allocation to obtain an equivalence. A check is made to ensure that the equivalence does not cause a variable or array element to be allocated beyond the beginning of the COMMON area. 94 The following error is detected in phase 20: 81. allocation found in each of these statements is entered in the Symbol Table. The allocation and the label are then deleted from the string entry. PHASE 21 Errors Detected • Assigns the relative addresses to statement functions and numbered statements; inserts the· allocations into the string. There are no errors detected in this phase. • Creates the subroutine initialization call, if required. Errors Detected • Calculates the core requirements of the program; stores the result in the FORTRAN Communications Area. • Generates the statement function return linkage coding. Phase 21 allocates relative addresses to all numbered statements and statement functions. The allocation is placed into the statement string entry, following the statement number or function label. A calculation of the object program storage requirements is made from the Location Counter at the end of allocation and stored in the SOFNS word (word 4) in the FORTRAN Communications Area. If the program being compiled is a subprogram, this phase also creates the subroutine initialization call, CALL SUBIN, along with its dummy arguments; this subroutine directs the insertion of arguments during execution of the object program o Errors Detected There are no errors detected in this phase. PHASE 22 • Inserts the statement allocations into the Symbol Table. • Lists the statement allocations on the principal print device, if requested. This phase scans the statement string for statement function statements and numbered statements. The PHASE 23 • Lists the Features Supported by the program as indicated in the FORTRAN Communications Area. • Lists the System Library subroutines used by the program, if requested. • Lists the subprogram names found in the Symbol Table, if requested. Using the indicators in the CCWD word (word 14) in the FORTRAN Communications Area, phase 23 recreates the control records that were recognized in phase 1. These control records (with the exception of *IOCS) are listed on the principal print device under the title 'FEATURES SUPPORTED.' According to the indicators in the CCWD word, phase 23 also alters (for purposes of printing only) the names of subprograms in the compiler-generated calls to reflect extended precision, if specified. (The actual compiler-generated coding is not altered until phase 26.) If requested, a list is made of all the subprogram names that appear in the Symbol Table (all CALLs). Phase 23 also scans the statement string, bypassing all one-word statements and tagging the names in the System Library table that are called by the program (all LIBFs). While scanning the System Library table, phase 23 checks the indicators in the IOCS word (word 15) in the FORTRAN Communications Area. A tag is added to the names of those subroutines that service the devices indicated in the IOCS word (i. e., the devices listed in the *IOCS control record). The names of the associated conversion subroutines (if required) are also tagged. The Subroutine table is then scanned and, if requested, the tagged System Library subroutine names are listed o Section 11 • FORTRAN Compiler 95 Errors Detected There are no errors detected in this phase. PHASE 24 • Lists the Core Requirements. • Lists the constants and their addresses, if requested. Under the heading 'CORE REQUIREMENTS, ' phase 24 prints the amounts of storage used by the program, COMMON area, and variables. The program name is printed from the FNAME words (words 11-12) in the FORTRAN Communications Area. If a list request is specified in the CCWD word (word 14), the real and integer constants are converted to output coding and listed with their relative addresses according to the specified precision. Real constants are listed first, followed by integer constants. A check is made to see that the core requirements do not exceed 32767 words. If they do, the ERROR word (word 10) in the FORTRAN Communications Area is set and output to Working Storage is suppressed. Errors Detected There are no errors detected in this phase. PHASE 25 • Builds the program header and data header records; places these records onto the disk in Working Storage. • Plaees real and integer constants into Working Storage in absolute mode. placed into Working Storage. The file specifications are outputted in absolute mode, except for the associated variable, which is in relocatable mode (the only relocatable constant). The statement Btring is also searched for DATA statements. All data constants are placed in Working Storage in absolute mode. The Symbol Table is scanned twice. The first scan extracts real constants, computes their allocations, and inserts the allocations into the Symbol Table. The second scan performs the same operations for integer constants. All constants are placed into Working Storage in absolute mode. Errors Detected There are no errors detected in this phase. PHASE 26 • Converts the compiled statement string to object coding. • Places the object program into Working Storage. According to the indicators in the CCWD word (word 14) in the FORTRAN Communications Area, phase 26 alters the subroutine names referenced by the compiled program to reflect, if necessary, extended precision as specified by the user. Phase 23 made the same conversion for listing purposes; this phase makes the conversion during the generation of the object program. Phase 26 converts the statement string into the object program, which is written in Working Storage. At the completion of the output, the termination subroutine (OUTER) inserts the necessary data into the FORTRAN Communications Area so that the Recovery Phase can complete the compilation. Errors Detected There are no errors detected in this phase. Phase 25 initially builds the program header and data header records. These records and the Buffer Commtmications Area carry information to phase 26. The program header and data header records are placed in Working Storage. The statement string is searched for DEFINE FILE statements. These statements are analyzed and then 96 PHASE 27 • Sets up the switches and parameters needed by the Monitor Control Record Analyzer to assume control. This phase is the means by which the compiler returns control to the monitor system. The phase is entered under the following conditions: 1. 2. 3. Normal end of compilation, with or without program errors. Disk work area exceeded. Control record trap during input phase. In each case the Recovery Phase sets indicators in the FORTRAN Communications Area in order to inform the monitor system program called next as to the results of the compilation. Compilation errors, the exceeding of Working Storage, and the trapping of a monitor control record all cause the compilation output to be suppressed, the non-execute switch ($NXEQ) to be set, and the non-DUP switch ($NDUP) to be set. H the compilation is successful, the program length, the number of disk blocks used to store the program, and the execution address are all transmitted to DCOM on the master cartridge and to DCOM of the Working Storage cartridge if it is other than the master cartridge. Errors Detected There are no errors detected in this phase. Section 11 • FORTRAN Compiler 97 SECTION 12. SYSTEM LIBRARY FLOWCHARTS FORTRAN Non-disk I/O (SFIO): Wri te Cartridge ID (ID): Fetch Phase IDs From SLET (FSLEN): Fetch System Subroutine (FSYSU): Write Working Storage Addresses (ADRWS): Initialize Disk Cartridge (DISC): Read *ID Record and Convert (RDREC): Print Cartridge ID (IDENT): Call System Print Subroutine (CALPR): Copy Disk Cartridges (COPY): Delete Core Image Buffer (D LCIB): Dump SLET (DSLET): Maintenance Program (MODIF): SCAT2, Call Processing: SCAT2, Interrupt Processing: SCAT3, Call Processing: SCAT3, Interrupt Processing: Function UTLOI UTL02 UTL02 UTL03 UTL04 UTL05 UTL06 UTL07 UTL08 UTL09 UTLlO UTLllUTL13 SCAOI SCA02SCA03 SCA04 SCA05SCA07 Name(s) CARDZ: PRNTZ: PAPTZ: READZ: WRTYZ: PRNZ: PNCHZ: TYPEZ: HOLEZ: FIOOlFI003 FI004FI005 FI006 FI007 FI008 FI009 FIOlO FIOll FI012 FI013 The System Library consists of (1) a complete library of input/output (except disk I/O), data conversion, arithmetic, and function subprograms, (2) selective dump subroutines, and (3) special programs for disk maintenance. The following is a list of the contents of the System Library. ~ Subtype Reference Deck ID Utility Selective Dump on Console Printer Selective Dump on 1132 Printer Dump 80 Subroutine DMTDO, DMTXO DMPDl, DMPXl DMP80 4 4 4 0 0 0 CALL CALL CALL U5BOOOlO U5COOOlO U5AOOOlO DATSW DVCHK FCTST OVERF SLITE, SLITT TSTOP TSTRT PDUMP 4 4 4 4 4 4 4 4 8 8 8 8 8 8 8 0 CALL CALL CALL CALL CALL CALL CALL CALL T3FOOOlO T3GOOOlO T3HOOOlO T3JOOOlO T3LOOOlO T3MOOOlO T3NOOOlO T3KOOOlO ESIGN FSIGN ISIGN 4 4 4 8 8 8 CALL CALL CALL S2FOOOlO R2FOOOlO T31000l0 ETANH, ETNH EAXB, EAXBX 4 4 8 8 CALL CALL S2100010 S2COOOlO Common FORTRAN Test Console Entry Switches Divide Check Test Functional Error Test Overflow Test Sense Light Control and Test FORTRAN Trace Stop FORTRAN Trace Start Selective Dump FORTRAN Sign Transfer Extended Precision Transfer of Sign Standard Precision Transfer of Sign Integer Transfer of Sign Extended Precision Arithmetic/Function Extended Precision Hyperbolic Tangent Extended Precision A**B Function Section 12. System Library 99 Function Name(s) Extended Precision Arithmetic/Function {Cont~ Extended Extended Extended Extended Precision Precision Precision Precision Natural Logarithm Exponential Square Root Sine-Cosine Extended Precision Arctangent Extended Precision Absolute Value Function ~ Subt~Y]2e Reference Deck ID ELN, EALOG EEXP, EXPN ESQR, ESQRT ESIN, ESINE, ECOS, ECOSN EATN, EATAN 4 4 4 8 8 8 CALL CALL CALL S2EOOOIO S2DOOOIO S2HOOOIO 4 4 8 8 CALL CALL S2GOOOIO S2BOOOIO EABS, EAVL 4 8 CALL S2AOOOIO FTANH, FTNH FAXB, FAXBX FLN, FALOG FEXP, FXPN FSQR, FSQRT FSIN, FSINE, FCOS, FCOSN FATN, FATAN 4 4 4 4 4 8 8 8 8 8 CALL CALL CALL CALL CALL H2IOOOIO H2COOOIO H2EOOOIO R2DOOOIO R2HOOOIO 4 4 8 8 CALL CALL H2GOOOIO H2BOOOIO FABS, FAVL 4 8 CALL H2AOOOIO XSQR lABS FB'I'D (binary to decimal), FD'I'B (decimal to binary) 4 4 8 8 CALL CALL TICOOOIO TIBOOOIO 4 0 CALL TIAOOOIO 3 Standard Precision Arithmetic/Function Standard Precision Tangent Standard Precision Standard Precision Standard Precision Standard Precision Standard Precision Hyperbolic A**B Function Natural Logarithm Exponential Square Root Sine-Cosine Standard Precision Arctangent Standard Precision Absolute Value Function Common Arithmetic/Function Fixed Point (Fractional) Square Root Integer Absolute Function Floating Binary/EBCDIC Decimal Conversions Syste~ LOCAL/SOCAL Flipper DCOM Update FLIPR SYSUP 4 0 0 SEAR, SEARX SIAR, SIARX SFIF SElF SIIF SFAR, SFARX SGOTO 3 3 3 3 3 3 3 0 0 0 0 0 0 0 LIBF LIBF LIBF LIBF LIBF LIBF LIBF S2JOOOIO T6BOOOIO R2KOOOIO S2KOOOIO T6COOOIO H2JOOOIO T6AOOOIO SFIO, SIOI, SIOAI, SIOF, SIOAF, SIOFX, SCOMP, SWRT, SRED, SIOrx: SDFND 3 3 3 1 LIBF LIBF T4COOOIO T4BOOOIO U5DOOOIO U5EOOOIO FORTRAN Trace Extended Floating Variable Trace Fixed Variable Trace Standard Floating IF Trace Extended Floating IF Trace Fixed IF Trace Standard Floating Variable Trace GO TO Trace FORTRAN 1/0 Non-Disk Formatted FORTRAN I/O FORTRAN Find 100 Function Disk FOR TRAN I/O Unformatted FORTRAN I/O Name(s) ~ Subtype Reference Deck ID SD FlO, SDRED, SDWRT, SDCOM, SDAF, SDF, SDI, SDIX, SDFX, SDAI UFIO 3 3 1 1 LIBF LIBF T4A00010 T4D00010 PAUSE STOP 3 3 2 2 LIBF LIBF T2AOO010 T2BOO010 SUBSC SUBIN TTEST, TSET 3 3 3 0 0 0 LIBF LIBF LIBF T2DOO010 T2COO010 T2EOO010 CARDZ PNCHZ READZ PAPTZ PRNTZ PRNZ TYPEZ WRTYZ 5 5 5 5 5 5 5 5 3 3 3 3 3 3 3 3 LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF T5AOO010 T5GOO010 T5JOO010 T5FOO010 T5HOO010 T5IOO010 T5KOO010 T5LOO010 HOLEZ GETAD EBCTB HOLTB 3 3 3 3 3 3 3 3 LIBF LIBF T5DOO010 T5COO010 T5BOO010 T5EOO010 EGETP EAXI, EAXIX EDVR, EDVRX EDIV, EDIVX EMPY, EMPYX ESBR, ESBRX EADD, ESUB, EADDX, ESUBX ELD, ELDX, ESTO, ESTOX 3 3 3 3 3 3 2 2 2 2 2 2 LIBF LIBF LIBF LIBF LIBF LIBF S1EOO010 S1BOO010 SlDOO010 S1COO010 S1GOOO10 S1HOO010 3 2 LIBF S1AOOO10 3 0 LIBF S1FOOO10 FGETP FAXI, FAXIX FDVR, FDVRX FDIV, FDIVX FMPY, FMPYX FSBR, FSBRX 3 3 3 3 3 3 2 2 2 2 2 2 LIBF LIBF LIBF LIBF LIBF LIBF R1EOO010 R1BOOO10 R1DOO010 R1COO010 R1GOO010 R1HOO010 Common FORTRAN FORTRAN Pause FORTRAN Stop FORTRAN Subscript Displacement Calculation FORTRAN Subroutine Initialization FORTRAN Trace Test and Set FORTRAN I/O and Conversion FOR TRAN Card 1442 (Read/Punch) FORTRAN Card 1442-5 (Punch) FORTRAN Card 2501 (Read) FORTRAN Paper Tape FORTRAN 1132 Printer FOR TRAN 1403 Printer FORTRAN Keyboard/Typewriter FOR TRAN Typewriter FORTRAN Hollerith to EBCDIC Conversion FORTRAN Get Address Subroutine FORTRAN EBCDIC Table FORTRAN Hollerith Table Extended Precision Arithmetic/Function Extended Extended Extended Extended Extended Extended Extended Precision Get Parameter Precision A**1 Function Precision Divide Precision Float Divide Precision Float Multiply Precision Subtract Reverse Add -Subtract Extended Load-Store Standard Precision Arithmetic/Function Standard Standard Standard Standard Standard Standard Precision Get Parameter Precision A**I Function Precision Divide Reverse Precision Float Divide Precision Float Multiply Precision Subtract Reverse Section 12. System Library 101 Function Name(s) ~ Subt~Ee Reference Deck ill Standa.rd Precision Arithmetic/Function (Cont'd) Standa.rd Add/Subtract Standard Load/Store Standard Precision Fraction Multiply FADD, FSUB, FADDX, FSUBX FLD, FLDX, FSTO, FSTOX XMDS 3 2 LIBF H1AOO010 3 3 0 2 LIBF LIBF R1FOO010 83100010 XDD 3 2 LIBF 83GOO010 XMD SNR FLOAT IFIX FIXI, FIXIX NORM FARC 3 3 3 3 3 3 3 2 2 0 0 2 0 2 LIBF LIBF LIBF LIBF LIBF LIBF LIBF S3HOOO10 S3FOO010 S3COO010 S3DOOO10 S3BOO010 S3EOO010 S3AOO010 CARD 0 5 0 LIBF U2AOO010 CARD 1 5 0 LIBF U2BOO010 Common Arithmetic/Function Fixed Point (Fraction) Double Divide Fixed Point (Fraction) Double Multiply Sign Reversal Function Integer to Floating Point Function Floating Point to Integer Function I**J Integer Function Normalize Floating Accumulator Range Check Interrupt Service Card Input/Output (No Error Parameter) Card Input/Output (Error Parameter) Disk Input/Output (No Preoperative Parameter Checking) Disk Input/Output (No Simultaneity) High-Speed Disk Input/Output (Simultaneity) Paper Tape Input/Output Single Frame Paper Tape Input/Output Simultaneous Paper Tape Input/Output Plotter Output 1132 Printer Output 1403 Printer Output Keyboard/Console Printer Input/Output Console Printer Output 1231 Optical Mark Page Reader 2501 Card Input (No Error Parameter) 2501 Card Input (Error Parameter) 1442 Card Output (No Error Parameter) 1442 Card Output (Error Parameter) Special LIBF DISKZ* DISK1* DISKN* PAPT1 PAPTX PAPTN PLOT1 PRNT1 PRNT3 TYPEO WRTYO OMPR1 READO READ1 PNCHO PNCH1 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF LIBF U2D00010 U2FOO010 U2EOO010 U2GOO010 U2JOO010 U2KOO010 U2NOO010 U2000010 U2COO010 U2LOO010 U2MOO010 U2HOO010 U2100010 *Note: Whereas DISKZ, DISK 1 , and DISKN are not strictly ISS subroutines (they are stored in the System Area by the System Loader), they are included in this list because they possess many characteristics of ISS subroutines. 102 Function Name(s) Type Subtype Reference Deck ID Conversion 16 bits to 6 Decimal Characters (Card Code) 32 bits to 11 Decimal Characters 16 Bits to 4 Hexadecimal Characters (Card Code) 6 Decimal Characters (Card Code) to 16 bits 11 Decimal Characters to 32 bits EBCDIC to Console Printer Output Code Card Code to EBCDIC, EBCDIC to Card Code Card Code to Console Printer Output Code 4 Hexadecimal Characters (Card Code) to 16 bits PTTC/8 to EBCDIC, EBCDIC to PTTC/8 PTTC/8 to Card Code, Card Code to PTTC/8 PTTC/8 to Console Printer Output Code Card Code to EBCDIC, EBCDIC to Card Code Fast multi-purpose conversion BINDC BIDEC 3 3 0 0 LIBF LIBF U4BOOOI0 U4A000I0 BINHX 3 0 LIBF U4COOOI0 DCBIN DECBI 3 3 0 0 LIBF LIBF U4GOOOI0 U4H000I0 EBPRT 3 0 LIBF U3AOOOI0 HOLEB 3 0 LIBF U3BOOOI0 HOLPR 3 0 LIBF U3COOOI0 HXBIN 3 0 LIBF U3DOOOI0 PAPEB 3 0 LIBF U3EOOOI0 PAPHL 3 0 LIBF U3FOOOI0 PAPPR 3 0 LIBF U3GOOOI0 SPEED ZIPCO 3 3 0 0 LIBF LIBF U3HOOOI0 U3IOOOI0 EBPA HOLL PRTY EBHOL PT3CP CPPT3 PT3EB EBPT3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 U4KOOOI0 U4POOOI0 U4QOOOI0 U4JOOOI0 U4R000I0 U4FOOOI0 U4S00010 U4LOOOI0 HOLCP 3 0 U4000010 CPHOL CPEBC EBCCP PTHOL HLEBC HLPT3 3 3 3 3 3 3 0 0 0 0 0 0 U4EOOOI0 U4DOOOIO U4100010 U4TOOOI0 U4MOOOI0 U4N000I0 Conversion Tables EBCDIC and PTTC/8 Table Card Code Table Console Printer Output Code Table EBCDIC to IBM Card Code 1403 Code to Console Printer Code Console Printer Code to 1403 Code 1403 Code to EBCDIC EBCDIC to 1403 Code IBM Card Code to Console Printer Code Console Printer Code to IBM Card Code Console Printer Code to EBCDIC EBCDIC to Console Printer Code PTTC/8 Code to IBM Card Code IBM Card Code to EBCDIC IBM Card Code to 1403 Printer Code SCA Subroutines SCATI PRNT2 HOLCA STRTB LIBF LIBF WIFOOOI0 WIEOOOI0 WICOOOI0 WIGOOOI0 Section 12. System Library 103 Function Name(s) Subtype Reference Deck ID SCA Subroutines (Cont'd) HXCV EBC48 HOL48 WlDOO010 W1AOO010 W1BOO010 Mainline ---Initialize Disk Cartridge Print Cartridge ID Write Cartridge ID Copy Disk Cartridges Write WS Addresses Delete CIB Maintenance Program DumpSLET Paper Tape Utility DISC IDENT ID 2 2 COpy 2 2 2 2 2 2 ADRWS DLCIB MODIF DSLET PTUTL U13COO010 Ut3FOO010 Ut3GOO010 Ut3BOO010 U6AOO010 Ut3DOO010 UGHOO010 UGEOO010 U13IOO010 2 System/Miscellaneous Call System Print Subroutine Fetch Phase IDs from SLET Fetch System Subroutine Read *:lD Record and Convert CALPR FSLEN FSYSU RDREC 4 o o 4 o 4 o 4 CALL CALL CALL CALL U'7 AOO010 U'7BOO010 U'7BOO010 U'7COO010 Interrupt Level Subroutines Interrupt Interrupt Interrupt Interrupt Interrupt Level Level Level Level Level Zero Subroutine One Subroutine Two Subroutine Three Subroutine Four Subroutine ILSOO ILS01 ai:SIi*J ILS03 @~ 7 7 7 7 7 1 1 UIAOO010 UIBOO010 UICOO010 U1DOO010 UIEOO010 1627 Plotter Subroutines SCALE SCALF EGRID FGRID EPLOT FPLOT POINT ECHAR FCHAR ECHRX, ECHRI, VCHRI FCHRX, FCHRI, WCHRI ERULE FRULE PLOTI XYPLT PLOTX *These are special versions that consist only of IBT information. 104 V1NOO010 V1000010 VICOO010 V1HOO010 VIDOO010 VlIOO010 VIMOO010 VIAOO010 VIFOO010 VIBOO010 VIGOO010 V1EOO010 V1JOO010 V1KOO010 VIPOO010 V1LOO010 If the user supplies his own ILS04, it must be stored in the System Library as subtype 0, type 7. INTERRUPT LEVEL SUBROUTINES INTERRUPT LEVEL TWO SUBROUTINE (ILS02) MAINLINE PROGRAMS This interrupt level subroutine is actually a part of the Skeleton Supervisor. However, the Core Load Builder requires that a dummy ILS for level two be stored in the System Library. The dummy supplied by IBM is stored in the System Library as subtype 1, type 7. The coding in the dummy ILS02 is immaterial, because the Core Load Builder merely bypasses it when it discovers the subtype 1. If the user supplies his own ILS02, it must be stored in the System Library as subtype 0, type 7. DISK INITIALIZATION PROGRAM (DISC) The disk initialization program has three basic functions: • • Changes the cartridge labels as specified in the *ID record INTERRUPT LEVEL FOUR SUBROUTINE (ILS04) • This interrupt level subroutine is actually a part of the Skeleton Supervisor. HoW-ever, the Core " :Coad BUii'de~quires·tha:'t a dummy ILS for level four be stored in the System Library. The dummy supplied by IBM is stored in the System Library as subtype 1, type 7. The dummy ILS04 consists only of a nine-word table followed by a zero, as follows: D.C 'if..'5.ZI!! DC i,4,3,~, loc, [),C DC o,c, -'---'-L,R.E,S,E,R,V,£,~, I , I , , I , , , , , ' I , , R £S E.R. v,£ ~ ~ I" 73.£-..L-'-l.-L 1.4,42 1/,1 43,~, K,E.Y,80AR.O'/'CON.SOLE. P,R.IMT.£.R. I/,~~~-"--.L..-,- I f.3,4,/. fJd5.5. -'---'---'---.LL 0. -'-.l--L.-L.J....--'-'---.L ,E,N,O,-,O,6-,T.A,BL,E., ,l.N.O,I,C,AT,o,R. , ' ! , I I , ! , I, , , ! I I ! I " ! , I ! I , , , I Establishes that the cartridges specified in the *ID record have no more than 3 defective cylinders and that cylinder 0 is not defective I The leftmost eight bits of each word contain the relative entry point to the ISS for the associated device, and the rightmost eight bits contain @ISTV plus the ISS number. These eight words are used by the Core Load Builder to construct the IBT for interrupt level 4. ! , , Initializes portions of sectors 0, 1, and 2 to set up the cartridges specified as non-system cartridges DISC first reads an *ID record to obtain FROM and TO cartridge IDs. It then reads current cartridge IDs from the master cartridge DCOM (#PCID) and compares them with the FROM IDs specified in the *ID record. If there are any IDs not found, an error message is printed on the principal print device. DISC next seeks home on all drives to be initialized (up to four), and writes each of 3 patterns to an entire cylinder, one sector at a time. The patterns used, in sequence, are /AAAA, /5555, and /0000. DISC then reads back each sector and compares it with the pattern written (including the sector address). If no error occurs, DISC writes the next pattern to the same cylinder. If the error bit of the DSW is set at any time or if the data read does not compare with the pattern written, DISC repeats the write/read sequen<1e for the entire cylinder 50 times, using the same pattern. If a second error occurs, DISC puts the address of the first sector on the cylinder in which the error occurred in the defective cylinder table. DISC performs this write/read sequence for each of the 203 cylinders. Section 12. System Library 105 If (1) cylinder zero is defective, (2) more than three cylinders are defective, or (3) it is impossible to write a sector address, DISC types out an error message indicating that the cartridge may not be used. If the cartridge is good, DISC writes the defective cylinder addresses, if any, in the first three words of sector @IDAD. Wherever a defective cylinder does not exist, /0658 is written in the first three words of sector @IDAD. DISC also writes the cartridge ID in word four of sector @IDAD, writes zeros in words 7 -30, and stores an error message program beginning in word 31. If a cold start is attempted using this non-system cartridge, control is passed from the Cold Start Loader to the error message program instead of the Cold Start Program. An error message is printed on the Console Printer and no cold start is effected. DISC initializes the following words of DCOM (sector @DCOM): Location Value Inserted #ANDU #BNDU #FPAD #CIDN #CIBA #ULET /0200 /0200 /0020 Cartridge ID /0008 /0002 DISC initializes LET (sector 2) as follows: Word 1 2 3 4 5 Contents /0000 /0020 /0000 /0138 /0000 'I : 1 8 /7112 The name 1DUMY (in /4528 name code) /0620 I subroutine FSLEN. This IOAR header is u.sed to call in the principal print device subroutine when it is needed by FSYSU. Next, IDENT reads DCOM to obtain #PCID, the table of disk cartridge IDs and their related physical drive numbers. IDENT then prints the cartridge ID and physical drive number from the table until all available cartridge IDs have been printed. IDENT terminates with a CALL EXIT. CHANGE CARTRIDGE ID (ID) This program changes the ID on up to four disk cartridges. The IOAR headers for the principal input device, principal print device, and principal conversion subroutines are obtained from SLET on the system cartridge. These subroutines are used for input/ output. Using the RDREC subroutine, the *ID record is fetched. RDREC also builds two tables in core storage from the FROM-TO fields of the *10 record, one in packed EBCDIC for printer output, the other in binary for matching the cartridge IDs. DCOM is fetched from the master cartridge to obtain the cartridge ID table (#CIDN). Each drive on the system is selected. If the selected drive is present, the cartridge ID is fetched. The ID is matched with the ID s in #CIDN. If no matching ID is found, the ID is printed with an error message and the job is terminated. The cartridge ID of the selected drive is matched to the IDs in the FROM-TO table. When a match occurs, the cartridge ID is changed to the 'TO' ID; the ID for the cartridge in #CIDN is changed and the 'TO' ID is written onto the selected drive. IDs that do not match entries in the FROM-TO table are bypassed. When all IDs have been processed, #CIDN is written back to the master cartridge and the FROMTO table is printed. After printing the FROM-TO table, ID terminates with a CALL EXIT. DISC terminates with a CALL EXIT. DISK COpy (COpy) PRINT CARTRIDGE ID (IDENT) This program prints out the ID and the physical drive number of each disk cartridge mounted on the system. IDENT first fetches the principal print device subroutine IOAR header from SLE T using the 106 This program copies the contents of one or more cartridges (except words 0-3 of sector @IDAD) onto from one to four other cartridges. COPY first fetches the system device subroutine IOAR headers from SLET using the RDREC subroutine. The system device subroutines are called in by the RDREC subroutine as they are needed by the program. The RDREC subroutine also reads the *ID record and converts the numbers to binary and stores them in the FROM-TO table. COpy then checks the FROM and TO field IDs to ensure that each specified cartridge is available o An error message is printed for the unavailable FROM or TO cartridges. All available FROM-TO cartridge combinations are then processed. Sectors 0 thru 7 of cylinder 0 of each source cartridge are read and written, except for the defective cylinder table, to each specified destination cartridge. Sectors 0 thru 7 of the next 199 logical cylinders of each source cartridge are copied, 4 sectors at a time to each specified destination cartridge. One cartridge at a time is processed and at the end of each, a check for a Keyboard interrupt is made. If any occurred during the previous copy, the interrupt is now processed. After all cylinders from the specified cartridge have been copied, a completion message is printed using the principal print device subroutine. COpy terminates with a CALL EXIT. DLCIB uses the subroutine RDREC to obtain the system device subroutine IOAR headers from SLE T on the master cartridge and to fetch the *ID record containing the affected cartridge IDo The RDREC subroutine also converts the specified cartridge ill to binary If the specified cartridge is not present, DLCIB prints an error message and terminates with a CALL EXIT. The CIB of the specified cartridge is deleted. The User Area and Working Storage are moved one cylinder closer to cylinder zero. Accordingly, the file-protection address for the specified cartridge is altered in the $FPAD quintuple in COMMA. DCOM of the master cartridge is then read. The sector addresses of the CIB, User Area, and Working Storage are altered. DCOM is written back to the master cartridge and to the altered cartridge. DLCIB prints the new User Area and Working Storage addresses for the specified cartridge using the principal print device subroutine. D LCIB terminates with a CALL EXIT. 0 DUMP SLET TABLE (DSLET) DELETE CIB (DLCIB) This program deletes the Core Image Buffer (CIB) from a non-system cartridge to provide additional disk storage area for the User Area and Working Storage. An *ID record is used to specify the cartridge on which the CIB is to be deleted. DSLET dumps the System Location Equivalence Table (SLET) to the principal print device. Four 4-word SLET entries are printed per line. DSLET reads the SLET table into a 640-word buffer in core storage, prints the SLET table using the principal print device subroutine, and terminates with a CALL EXIT. Section 12. System Library 107 SECTION 13. SYSTEM DEVICE SUBROUTINES The system device subroutines are a group of special subroutines used exclusively by the monitor system programs. These are the only device subroutines used by the monitor system programs, aside from DISKZ. They are listed below: DISKZ 1403 Subroutine 1132 Subroutine Console Printer Subroutine 2501/1442 Subroutine 1442/1442 Subroutine 1134/1055 Subroutine Keyboard/Console Printer Subroutine 2501/1442 Conversion Subroutine 1134/1055 Conversion Subroutine (dummy) Keyboard/Console Printer Conversion Subroutine (dummy) Section 13. System Device Subroutines 109 SECTION 14. DISK CARTRIDGE INITIALIZATION PROGRAM (DCIP) When DCIP is entered, a message is printed instructing the user to select the particular DCIP function desired. Depending on his choice, one of the functions described below is performed. All messages, entries through the Console Entry switches, and operator instructions are printed on the Console Printer. All user options are entered through the Console Entry switches. After every cylinder on the cartridge has been tested in the above manner, the program writes three defective cylinder addresses and the cartridge ID into the. first four words of sector @IDAD. Where defective cylinder addresses do not exist, /0658 is written. Words 7-30 of sector @IDAD are set to zeros. DCIP also writes an error message program, beginning at word 31. If a cold start is attempted using this nonsystem cartridge, the error message program prints an appropriate message and no cold start is effected. DCOM (sector @DCOM) is initialized as follows: Location DISK INITIALIZATION A message is printed instructing the user to specify the number of the physical drive on which is mounted the cartridge to be initialized. At the same time, the user is given the option of doing an "address only" initialization, that is, an initialization that writes correct addresses on a cartridge without disturbing any of the data on that cartridge. The user is then asked to specify the cartridge ID. An entire cylinder of the cartridge is written with one of three test patterns. The patterns used are /AAAA, /5555, and /0000. The cylinder is then read back into core storage, one sector at a time, using double-buffering. While one sector is being read, every word of another is being examined to see that it compares with the data that was written. If no errors occur in any sector of the cylinder, the same procedure is repeated for the next pattern, and so on until all three patterns have been tested. However, if any disk operation causes the error bit of the disk device status word (DSW) to be set, or if the data read does not compare with that written, then the entire write/read/compare procedure is repeated fifty times on the same cylinder with the same test pattern. A second error, while in the retry mode, causes DCIP to indicate the cylinder as being defective. If (1) cylinder zero is defective, (2) more than three cylinders are defective, or (3) it is impossible to write a sector address, DCIP types out an error message indicating that the cartridge may not be used. STAND-ALONE UTILITIES Value Inserted #ANDU #BNDU #FPAD #CIDN #CIBA #ULET /0200 /0200 /0020 Cartridge ID /0008 /0002 LET (sector 2) is initialized as follows: Contents 1 2 3 4 5 ~} 8 /0000 /0020 /0000 /0138 /0000 /71121 The name 1DUMY (in name /4528 code) /0620 A message indicating that the initialization is complete and the addresses of any defective cylinders are printed on the Console Printer. At this time, the user is given the option of doing additional testing of the disk; i. e., the write/read/ compare sequence may be repeated up to 31 times. DISK DUMP The principal print device is determined by first initiating a carriage space operation on the 1403 Printer. The device status word (DSW) for the 1403 is then sensed to see if the 1403 is busy. If it is not, Section 14. Stand-Alone Utilities 111 the same procedure is followed with the 1132 Printer. On the basis of the results of the above test, a word that points to the appropriate conversion table and a branch. instruction that branches to the proper printer call are set up. The user enters through the Console Entry switches the sector address (with the drive code) of the first sector to be dumped and the number of consecutive sectors to be dumped. The logical sector address is determined in the following manner. The physical sector address is decremented by eight for each defective cylinder that has a lower sector address less than the cylinder to be dumped from. If the sector being dumped is on a defective cylinder, the sector is assigned the logical sector address of DEAD. Defective cylinder data for the cartridge is obtained from sector @IDAD. Each of the 320 data words of the sector is converted from binary to four hexadecimal characters of the appropriate printer code. The data is then printed, sixteen words per line. DISK COpy DCIP requests the user to enter the numbers of the source and destination drives in the Console Entry switches. The defective cylinder table from the source cartridge is fetched and checked to verify that the values in it are under 1624 and in ascending order. The source cartridge is copied sector by sector onto the destination cartridge. The cartridge ID and defective cylinder table in sector 0, cylinder 0 are not copied onto the destination cartridge. If a system cartridge is being copied, the cartridge ID found in DCOM is also not copied. 112 If a cylinder on the source cartridge is defective, the following cylinder is copied to the destination cartridge. If a cylinder on the destination eartridge is defective, the cylinder to be copied from the source cartridge is copied onto the following cylinder. UCART The user receives the 1130 Disk Monitor System on a disk cartridge. The contents of this cartridge are as follows: cylinder 0 contains a copy of the Resident Image, including DISKZ, a copy of the CARDO subroutine, a special cold start program, and a disk-tocard dump program; cylinders 1 through 202 contain the system decks stored in card images, four cards per sector. The execution of a cold start with this cartridge causes sector 0, cylinder 0 to be fetched. Sector 0, cylinder 0 contains DISKZ and the special cold start program. DISKZ is loaded into the locations it normally occupies in the Resident Monitor; the special cold start program immediately follows it. Control is transferred to the special cold start program. The special cold start program fetches the Resident Image (sector 2, cylinder 0) into the locations it normally occupies in low core storage, fetches the CARDO subroutine (sector 3, cylinder 0) into core storage at /0250, and fetches the disk-to-card dump program into core storage at /0390g Control is transferred to the disk-to-card dump program, which punches the svstem decks and terminates. The disk-to-card dump program uses a onecylinder buffer origined at its high-address€ld end. PROGRAM ANALYSIS PROCEDURES PROGRAM ANALYSIS PROCEDURES SUMMARY INTRODUCTION Flowdiagram 1 shows the procedure used for program analysis. At each step in the procedure, the parts of this document that apply to that step are indicated. The purpose of the Program Analysis Procedures is to provide the user with a step-by-step method for analyzing the execution of any monitor system or user program. The procedure is problemoriented; it begins with some program malfwlCtion, assists the user in defining the failing component or function, and provides the facility for detailed analysis of that component or function. Ana lysis Procedure .--______ __. Flowdiagram 2 shows the procedure used to identify the component or function failing. Where applicable the parts of this document that are pertinent to that identification are indicated. Supporting Documentation _______--. ____ .--____.... Determine which program is failing. If it is a subroutine, determine its name and its location in core . (0 IDENTIFICATION OF THE FAILING COMPONENT OR FUNCTION Failing subroutine ID .----------1.---------.----.-------, Get a full core dump. Core Dump Procedures r----------I.---------~-,----.------.., Block out and identify the significant ite~s in the core dump listing. Core Layouts r.-~-~~~---I.-----------,----r----_~ Analyze the failing subroutine: -Correct input -Data parameters - To and from Linkage -Function code -I/O area .-------------1.------------.----.------""1 If necessary, determine which program called the failing subroutine and where it is located in core. r:---:---:---:-:-~--I.--~-------.----.------..., Analyze the calling program for correct parameters and linkage. If necessary, continue tracing back all the way to the source program. Subroutine Data Charts Flowdiagram 1. General Procedure for Program Analysis Program Analysis Procedures 113 Reference Analysis Procedure Supporting Documentation Contents of $PHSE Non-Zero Monitor System Program execution -A DSLET Listing will provide reference to phase ID Contents of $PRET Yes Pre-operati ve I/O Error -Invalid Control Function -Device Not Ready No Error number in ACC shou Id identify subroutine. Go to Subroutine Maintenance Analysis Procedure --rI I I ...------....., - - - Contents of: $PSTI $PST2 $PST3 $PST4 ...--_________.., __ -.JI -- Levell Level 2 Level 3 Level 4 Post-operative I/O Error >---------~ -Error Bits in DSW >-________~ Using IAR contents, go to step 11 in Trace Back Procedures --T--I I I -[ Trace Back Procedures I ...--_ _ _ _ _ _ _ _-.., __ -1 >--.;......;;..._.......,...--_ _ _....~ Using IAR, XR 1, XR2, XR3, ACC, EXT, attempt to correlate back to program. Go to step 11 in Trace Back Procedures No Other Errors; Incorrect Answer I etc. Dump as soon as possible after the fai lure. -- --- - - Flowdiagram 2. Procedure for Identification of the Failing Component or Function 114 - - - - - - - - - ----..-----... Program Analysis Procedures SUBROUTINE ERROR NUMBER/ERROR STOP LISTS Table 8 lists the errors detected by the System Library ISSs and system device subroutines by error code, describes the conditions under which the error is detected, and provides a list of corrective actions for those errors. Table 9 lists the error stop addresses and their meanings. Retain Console Information-ACC, EXT, XR1,XR2,XR3 -Lights -Device Status YES Perform NOCAl Dump CORE DUMP PROCEDURE YES To obtain a dump of the contents of core storage, perform the following (see Flowdiagram 3): 1. 2. 3. 4. 5. If the error symptoms indicate that an error has occurred in the disk or disk I/O subroutine (i. e. DISKZ) , the System Core Dump program should not be used, because this same disk I/O subroutine is used to load the System Core Dump program, thus destroying the information needed. Was there a NOCAL Dump inclu-____...... for Incorrect Flow Device Failure, Run Diagnostics Loop Subroutine Go to That Subroutine Possible Device Fai lure, Run Diagnostics or Loop Call .....---1..---,----_._------. Loop Subroutine Looping Capabilities Yes Determine Preceding Function Flowdiagram 4. Generalized Subroutine Maintenance/Analysis Procedure Program Analysis Procedures 121 r-~==:::""- -- -- -- -- - -- - - - -This procedure assumes the user has already analyzed the subroutine' per Subroutine Analysis Procedures and has blocked out a core dump per Core Location Procedures. Get the core map printed during program loading - - -- - - - --A core map is obtained by punching an II L" in column 14 of the XEQ card if the program being loaded is in disk system format. Yes Determine which function was being used Get the symbolic entry point from the Subroutine Data Charts Find the symbolic entry name in the core map - - - - - - - - Get the contents of the word located at the address computed in step 8 Get the first word of the transfer vector entry Flowdiagram 5. Trace Back Procedures 122 - - The subroutine type is obtained from the Subroutine Data Chclrts The contents of the address derived in step 5 is the Link Word back to the calling statement in the calling program Yes Add 2 to the Core Load Address obtained in step 5 -This is the Core Load Address of that entry point. - -- -- - - - - - - - - - - - - - - - - -- -- -- - This gives the address of the word that points to the transfer vector. -This gives the address of the transfer vector. - - - - -This is the Link Word back to the calling statement in the calling subroutine. The Ccre Load contains the Link Word back to the caller. Addres~; Procedure ---------- - -- - - - - --Now determine the name of the failing subroutine. No Yes Match the address of the ca Iii ng program to the addresses in the core map Determine which overlay Is in core• . - -_ _ _ _ _ _-1._ _ _ _ _ _---. _ _ _ _ _ _ _ _ _ _ _ Use the Core Dump Analysis Procedures to locate SOCAL linkage words, 3 for each overlay Locate the SOCAL linkage words in the core dump -SOCAL L1NKAGE- r-------...L.--------.-- - - -- - - The word group containing "FOFD" is th~ -....,;~-*+--+----;~-*+--+--:=*''+--I overlay In core Mark the core map to identify all subroutines in the Incore overlay -- - - - - - - - Overlay 3 Overlay 2 Overlay 1 -The overlay in core contains 7QFD in third word -Overlays not in core contain 7CF4 (SOCAL level 2) or 7CF7 (SOCAL level 1) In third word -Make a table of subroutines by overlay assignment Match the address of the ca II i ng program obtained In step 7 (CALL) or step 10 (L1BF) to the addresses marked in step 15 .---------'----------.-The address closest to and less than the - --- - - - You now have name of calling subroutine. calling program's address identifies the name in core map Flowdiagram 5. Trace Back Procedures (Continued) Program Analysis Procedures 123 Procedure .-------:--:-~----~---_r_- Get the symbolic location of function code from the Subroutine Data Charts - - - - - - - - The different entry points are related to the various "functions" performed by the subroutine. r - - - - - - - - J l - - - - - - - - - r - - - - - - - --Microfiche reference to subroutine list,ng is given in Appendix D. Find the symbolic location in the subroutine listing r--------L...----------..- - - - - - Get the relative address of the location of function code - - The address at the symbolic location determined in step 20 is the relative address. Get the load point address for th is subroutine from core map r--------L--------,- - - - - - - - Calculate core location of function code Get the function code from core dump and decode with Subroutine Data Chart Get the symbolic name for each function entry point from the Subroutine Data Chart Flowdiagram 5. 124 Trace Back Procedures (Concluded) The relative address determined in step 21 plus the load point address determined in step 22 gives the location of the function code. SUBROUTINE DATA CHARTS SYSTEM DEVICE SUBROUTINE FOR KEYBOARD/CONSOLE PRINTER Phase ID: @ KBCP Used by: Monitor system programs Subroutines required: ILS04 Linkage: LDD LIST KBOOO+l L BSI LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: ACC Function Read, Convert, Print I/O Area Address EXT /7002 Word Count Address of I/O Area Postoperative conditions and entry points: at KB080 Symbolic entry point Read, Convert, Print /7002 KBOOO+l Function Return address at Interrupt entry point Return address at KBOOO+l KB020+1 KB020+1 Interrupt level Register status: Mainline ACC EXT XRl XR2 X X X X XR3 Status Saved at/restored from symbolic location Used Significant variables: Symbolic location Contents/Use KB080 The function is placed here. It becomes an MDX *+2 when executed. KB160 Original I/O area address. KB170 Original word count. KB270 Character buffer area, containing a 12-bit character read from the Keyboard, the rotate/tilt code character printed, or a control character. KB280 Data area pointer, pointing tot he next word in the data area into which the EBCDIC character will be pI aced. KB290 Remaining word count. KB370 and KB370+1 Read/Print Control IOCC. Program Analysis Procedures 125 SYSTE M DEVICE SUBROUTINE FOR 1442/1442 Phase ID: @ 1442 Used by: Monitor system programs Subroutines required: ILS04 Linkage: LDD LIST BSI L CDOOO+1 LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: Function ACC Read /7000 Address of the I/O Area No word count is used but an 80 position area must be specified. Punch /7001 Address of the I/O Area No word count is used but an 80 position area must be specified. Read /7002 Address of the I/O Area No word count is used but an 80 position area must be specified. Feed /7003 Not used Not used EXT I/O Area Address Postoperative conditions and entry points: 126 Interrupt level CD090 Symbolic entry point Return address at Interrupt entry point Return address at Read /7000 CD100+1 CD100+1 CD016+1 CD010+1 CD016+1 CD010+1 0 4 Punch /7001 CDOOO+1 CDOOO+1 CD016+1 CDOIO+l CD016+1 CDOIO+l 0 4 Head /7002 CDOOO+l CDOOO+1 CD016+1 CDOIO+l CD016+1 CDOIO+l 0 4 Feed /7003 CDOOO+l CDOOO+l CDOIO+1 CDOIO+l 4 Function at Register status: ACC Mainline Interrupt level 4 XR1 XR2 XR3 Saved at/restored from symbolic location Used Interrupt level 0 EXT CD120 X Sa ved at/restored from symbolic location Used Status CD190 X ---- CD190+1 CD018 --.--- X Saved at/restored from symbolic location Used X X X X X Significant variables: Symbolic location Contents/Use CD120 First column indicator. CD250 Current column address. CD260 Second half of the last IOCC performed, read or punch. CD230 Second half of the last IOCC performed, start read or punch. CD188 Skip indicator; non-zero $LAST Last card indicator; non-zero = last $CTSW Control card switch; non-zero = control $lBSY Busy indicator for 1442; non-zero = take one feed cycle. card. card read. = busy. Program Analysis Procedures 127 SYSTEM DEVICE SUBROUTINE FOR 2501/1442 Phase ID: @ 2501 Used by: Monitor system programs Subroutines required: ILS04 Linkage: LDD LIST L RPOOO+1 BSI LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: ACC Function EXT I/O Area Address I- 1.--. Read /7000 Address of I/O Area Word count Punch /7001 Address of I/O Area Not used Read /7002 Address of I/O Area Word count Feed /7003 Not Used Not used Postoperative conditions and entry points: ...--. RP360 Symbolic entry point Read /7000 RPOOO+1 RPOOO+1 Punch /7001 RPOOO+1 Read /7002 Feed /7003 Function at Return address at Interrupt entry point Return address at Interrupt level RP020+1 RP020+1 4 RPOOO+1 RP040+1 RP020+1 RP040+1 RP020+1 0 4 RPOOO+1 RPOOO+1 RP020+1 RP020+1 4 RPOOO+1 RPOOO+1 RP020+1 RP020+1 4 XR3 Status Register status· ....--::::-. ACC Mainline 1--. Interrupt level 4 128 XR1 XR2 Saved at/restored from symbolic location Used Interrupt level 0 EXT Saved at/restored from symbolic location Used RP440 X RP480 X RP060 RP480+1 X Saved at/restored from symbolic location Used X X X Significant variables: Symbolic location Contents/Use RP500 Current column address. RP520 I/O address for restart information. RP600 Word count for 2501 Reader. RP200 Device last used: /1702 = 1442 /4F01 = 2501 $LAST Last card indicator; non-zero = $CTSW Control card switch; non-zero = control $IBSY Busy indicator; non-zero = last card. card read. busy. Program Analysis Procedures 129 SYSTEM DEVICE SUBROUTINE FOR CONSOLE PRINTER Phase ID: @ CPTR Used by: Monitor system programs Subroutines required: ILS04 Linkage: LDD LIST BSI CPOOO+1 L LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: r--' Function ACC Restore /7000 Write /7001 Skip /7002 I/O Area Address EXT 1--, Address of I/O Area Word Count Postoperative conditions and entry points: tion at 11 CP120 I Symbolic entry point Return address at Interrupt entry point Return address at CPOOO+1 CPOOO+1 CP020+1 CP020+1 Register status: ACC r--' Mainline '---. 130 EXT Saved at/restored from symbolic location Used XR1 XR2 XR3 ~ Inte Ie ~ "- Status CP170+2 "X X X X ,,- Significant variables: Symbolic location Contents/Use CP120 The function is placed here. /7000 is a MDX /7001 is a MDX + 1 /7002 is a MDX + 2 CP200 Carriage return counter, used for counting carriage returns for restore. CP350 10CC for printing on console. CP350+1 CP350 contains address of CP450. CP370 Actual word count of message not including trailing blanks. CP380 Data area pointer, pointing to the word containing the 2 EBCDIC characters, one of which is being printed. CP450 Print character buffer word. The 10CC points to this word, which contains the character or control character just printed. * * * This word is executed to decode the function. Program Analysis Procedures 131 SYSTEM DEVICE SUBROUTINE FOR 1132 Phase ID: @1132 Used by: Monitor system programs Subroutines required: ILS01 Linkage: LDD LIST BSI L PNOOO LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: Flmction ACC I/O Area Address EXT r-Print /7001 I/O Area address o ~ word count :S. 80 Skip to Channel 1 /7000 Space Immediate /7002 I/O Area is referenced Not used Not used Postoperative conditions and entry points: ,....-" PN380 Symbolic entry point Return address at Interrupt entry point Return address at Interrupt level Print /7001 PNOOO+1 PNOOO+1 PN010+1 PN010+1 1 Skip /7000 PNOOO+1 PNOOO+1 PN010+1 PN010+1 1 Space /7002 PNOOO+1 PNOOO+1 PN010+1 PN010+1 1 Function at Register Status: ACC EXT Saved at/restored from symbolic location XR1 XR2 PN400+1 PN400+3 X X X PN200+1 PN440+1 X X XR3 Status PN400+5 Mainline Used Interrupt level 1 Saved at/restored from symbolic location Used ~- 132 X PN200 X PN440+3 X X PN440+5 X X PN450 X Significant variables: Symbolic location Contents/Use PN040 Last emitter character read as a result of a read emitter res ponse interrupt. PN050 Second word of PN060 Last DSW sensed in interrupt. PN070 Second word of Sense-DSW-with-no-reset 10CC. PN080 First word of Read emitter 10CC, contains the address of location PN040. PN090 Second word of Read emitter 10CC. PNI00 First word of Start Printer 10CC, also the idle scan counter. PNII0 Second word of Start Printer 10CC. PN120 Print scan counter. PN130 Second half of Stop Printer 10CC. PN150 Second half of Start Carriage 10CC. PN170 Second half of Stop Carriage 10CC. PN180 First half of Stop Carriage 10CC and mask to check bits 3, 5, and 6 of Printer DSW. PN370+1 Address of the I/O area. PN460+1 Word count. PN470+1 Address of message. $PBSY /0001 indicates I/O buffer is busy and 49 print scan cycles have not been completed. Se~se-DSW-with-reset 10CC. /0000 indicates routine may still be busy completing the 16 idle scans; however, I/O buffer is ready to accept new input. $CHI2 Zero = Channel 12 has not been sensed. Non-Zero = Channel 12 has been sensed and skip to channel 1 has not been performed. Program Analysis Procedures 133 SYSTEM DEVICE SUBROUTINE FOR 1403 Phase ID: @1403 Used by: Monitor system programs Subroutines required: ILS04 Linkage: LDD LIST L PROOO+1 BSI LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: I/O Area Address Function ACC Print 1 Line /7001 Address of I/O Area o ~ word count ~ 60 Skip /7000 Address of I/O Area I/O Area is referenced Space Immediate /7002 Not used Not used EXT Postoperative conditions and entry points: PR150 I/O Area word count Print /7001 Non-Zero Skip /7000 Not used Space /7002 Not Used Function at 1...... Location reference Symbolic entry point Return address at PROOO+1 PROOO+1 Interrupt entry point Register status: ACC Mainline Saved at/restored from symbolic location Used 134 EXT X X XR1 XR2 XR3 PR230+1 PR240+1 PR250+1 X X X Status X Significant variables: Symbolic location Contents/Use PR140 A NOP after the following areas have been adjusted to the correct address as a result of relocation: PR300 PR500+1 PR180+2 PR280+2 PR170+1 PR220+2 PR080 PR400+1 PR430+1 PR080 PR080+1 First word of Print IOee, contains address of print buffer. Second half of Print IOCC. PR110 Second half of Sense-without-reset IOCC. PR300 PR300+1 First word of Skip-to-channel-12 IOCC. Second word of Skip-to-channel-12 IOCC. PR090 PR090+1 First word of Space immediate IOCe. Second word of Space immediate IOCC. PR290+1 Address of the user's I/O area. PR060 Storage location for the last DSW sensed during interrupt; also, first word of Sense-DSW-with-reset IOCC. PR070 Second word of Sense-DSW-with-reset IOCC. PR110 Second word of Sense-DSW-without-reset IOCC. PR330 60-word buffer from which the line is printed. $PGCT Binary page count, where 0 $CH12 Channel 12 switch indicating channel 12 detected in DSW during interrupt; not reset until a skip to channel 1 is requested by the user. $PBSY Printer busy switch, modified during execution of routine. ($PBSY) = = = ~ page count ~ 32767 Zero: routine and printer not busy. Positive: transmission to printer is in progress; transmission complete has not been received; subroutine I/O buffer is busy. Negative: transmission complete has been received; subroutine I/O buffer can now be set up with new message. Program Analysis Procedures 135 SYSTEM DEVICE SUBROUTINE FOR 1134/1055 Phase ID: @ 1134 Used by: Monitor system programs Subroutine required: none Linkage: LDD LIST BSI L PTOOO+1 LIST DC DC FUNCTION CODE I/O AREA ADDRESS _. Preoperative input parameters: Function ACC EXT I/O Area Address Read with conversion /7000 Address of I/O Area Word Count Punch /7001 Address of I/O Area Word Count Read without conversion /7002 Address of I/O Area Word Count Postoperative conditions and entry points: PT060 Symbolic entry point Read with conversion /7000 PTOOO+1 PTOOO+1 PT010+1 Punch /7001 PTOOO+1 PTOOO+1 PT010+1 Read without conversion /7002 PTOOO+1 PTOOO+1 PT010+1 Function at Return address at Interrupt entry point Interrupt level Register status: ACC Mainline XR1 XR2 XR3 Saved at/restored from symbolic location Used 136 EXT X X X Status Significant variables: Symbolic location Contents /U se PTOOO+1 Return address to caller from main line. PTOIO+1 Return address from interrupt. PT060 Function code, executed as follows: /7000 = MDX * /7001 = MDX *+1 /7002 = MDC *+2 PT340 Data area pointer. PT360 Remaining word count. PT370 Switch used for reading or punching: /0001 PT380 Switch used to indicate if conversion of information read is needed: zero = no conversion, non-zero = conversion. PT460 and PT460+ 1 IOCC for read and pWlCh. PT480 Data buffer. PT500 Counter for counting first 3 characters. = punch, /0002 = read. The character to be read or punched is contained here. Program Analysis Procedures 137 SYSTEM DEVICE SUBROUTINE FOR DISK -- DISKZ Phase ID: @DZID Used by: Monitor system programs Assembler Language programs FORTRAN programs Subroutines required: ILS02 Linkage: LDD liST BSI DZOOO L LIST DC DC FUNCTION CODE I/O AREA ADDRESS Preoperative input parameters: ~. ACC Function Read Write Find I/O Area Address I/O Area Address + 1 o ::;. word count Drive code and sector address EXT /7000 or /0000 Address of the I/O Area (must be even) /7001 Address of the I/O Area (must be even) word count length of area to be written on disk Drive code and sector address Address of the I/O Area (must be even) /0000 Drive code and sector address /0000 ~ length of defined data area o~ ~ Postoperative conditions and entry points: ~. DZ945 Symbolic entry point Return address at Interrupt entry point Head /0000 DZOOO DZ100+5 DZ150 DZ150 2 Write /0100 DZOOO DZ100+5 DZ150 DZ150 2 Find /0000 DZOOO DZ100+5 DZ150 DZ150 2 Function at Return address at Interrupt level Register status: ACC Mainline Saved at/restored from symbolic location Used 138 EXT XR1 DZIOO+l X X X XR2 XR3 Status DZ100+3 X X Significant variables: Symbolic location Contents/Use DZ350+1 Address of the word in COMMA containing the current position of the heads on the referenced disk. DZ230+1 Address of the first word of the I/O Area. C [C(DZ230+1)] = originally requested word count C [C(DZ230+1) + 1] = originally requested sector address DZ904 and DZ905 First and second words of the last 10CC performed (excluding sense DSW). DZ908 and DZ909 First and second words of forced-Read after-Seek 10CC. DZ901 Sector address of previously executed forced Read. DZ906 and DZ907 lOCC developed for user-requested function. DZ975 Second word of Read-Back-Check 10CC. DZ912 Word count remaining to be read or written from original. DZ913 Next sector to be read or written. DZ910 Second word of Seek 10CC. Program Analysis Procedures 139 CARDZ Flowcharts: FI004-05 Used by: SFIO Subroutine required: HOLEZ, ILSOl, ILS04 Linkage: LIBF CARDZ (BSI 3 TV DISP) where ACC = FUNCTION CODE XRl = I/O AREA ADDRESS XR2 = WORD COUNT Peroperative input parameters: Function ACC XRl XR2 Read /0000 I/O Area Address Word COWlt Write /0002 I/O Area Address Word COWlt Postoperative conditions and entry points: FWlction CZ912 at Symbolic entry point Return address at Read /0000 CARDZ LIBF TV link word Write /0002 CARDZ LIBF TV link word Interrupt entry point Heturn address at CZIOO (column) CZIOO (column) CZIIO (op complete) Interrupt level 1 CZIIO (op complete) 4: Register status: Mainline EXT X X XRl XR2 XR3 Status Saved at/restored from symbolic location Used 140 ACC X X X Significant variables: Symbolic location Contents/Use CZ904 CZ904+1 Start read or punch 10CC, set by program depending on function used to initiate operation. If read, CZ904 + 1 = CZ906 + 1 If write, CZ904 + 1 = CZ908 + 1 CZ902 Read or Punch 10CC, set by program depending on function to read or punch columns. If read, CZ902 + 1 = CZ906 If write, CZ902 + 1 = CZ908 CZ923 Address pointer to I/O area, incremented on each column interrupt. CZ925 Original I/O area address -1. CZ920 DSW is saved here on an operation-complete interrupt. CZ010 Switch used for waiting for interrupt: Set positive when waiting for any interrupt. Set zero When column interrupt occurs. Set negative when op-complete interrupt occurs. $RWCZ Previous operation switch: /0000 = previous operation was a read. /0002 = previous operation was a write. If a write function is to be performed and the previous operation was a write, this switch causes CARDZ to read a card and test for / / in columns 1-2. CZ913 Switch used to test for / / card before writing on it; zero means only reading or previous operation before write was a read. CZ918-3 thru CZ918 Buffer area for saving first 3 columns; rest of card is read into fourth word when reading before write. Program Analysis Procedures 141 PNCHZ Flowchart: FIOll Used by: SFIO Subroutines required: HOLEZ, ILS01, ILS04 Linkage: LIBF PNCHZ (BSI 3 TV DISP) where ACC = FUNCTION CODE XRl = I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: ~ tion L: ite ACC XRl XR2 /0002 I/O Area Address Word (character) count of 80 Postoperative conditions and entry points: Function Symbolic entry point Write PNCHZ Return address at Interrupt entry point LIBF TV link word '---. Return address at Interrupt level PZ060 (column) PZ060 0 PZ080 (op complete) PZ080 4 XR3 Status Register status: Mainline _. 142 ACC EXT XRl XR2 X X X X Saved at/restored from symbolic location Used X Significant variables: Symbolic location Contents/Use PZ340 Address pointer to I/O area; First word of Punch IOCC, Incremented on each column interrupt. PZ340+1 Second word of Punch IOCC. PZ360 and PZ360+1 Feed IOCC for initiating punch operation. PZ400 PZ400+1 Error display indicator. Second word of last card feed IOCC. PZ120+1 Original I/O area address. PZ040 Switch used for waiting for operation -- complete interrupt: zero = op complete interrupt has occurred non-zero = waiting for op-complete Program Analysis Procedures 143 READZ Flowchart: FI008 Used by: SFIO Subroutines required: HOLEZ, ILS04 Linkages: LIBF READZ (BSI 3 TV DISP) where XRl = I/O AREA ADDRESS Preoperative input parameters: --Function XRl Read I/O Area Address Postoperative conditions and entry points: -FW1ction Symbolic entry point Return address at Read READZ LIBF TV link word _. Interrupt entry point Return address at Interrupt level RZ060 4 RZ060 Register status: ACC EXT XRl XR2 X X XR3 Status 1---' Mainline _. Saved at/restored from symbolic location Used X X Significant variables: Contents/Use Symbolic location RZ860 I/O Area Address; also, first word of Read IOCC. RZ860+1 Second word of Read IOCC. RZ380 Switch used for interrupt processing: non-zero = waiting for interrupt zero = set by occurrence of interrupt '----. 144 X TYPEZ Flowchart: FI012 Used by: SFIO Subroutines required: HOLEZ, GETAD, ILS04 Linkage: LIBF TYPEZ (BSI 3 TV DISP) where ACC = FUNCTION CODE XRl =I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: Function ACC XRl XR2 Read /0000 I/O Area Address Word count, set to 80 by TYPEZ Write /0002 I/O Area Address Character count Postoperative conditions and entry points: Interrupt entry point Interrupt level KZ910 Symbolic entry point Return address at Read /0000 TYPEZ TYPEZ+2 KZ100 KZ100 4 Write /0002 TYPEZ TYPEZ+2 KZ100 KZ100 4 Function at Return address at Register status: Mainline ACC EXT XRl XR2 X X X X XR3 Status Saved at/restored from symbolic location Used Significant variables: Symbolic location Contents/Use KZ911 Original character count plus one. KZ210+1 Original I/O area address. KZ910 Read-Write function indicator word. KZ906 IOCC used to print characters from KZ914. KZ914 Buffer word used to hold character to be printed. KZ913 KZ900 Saved DSW from Sense-with-reset in interrupt routine. KZ902 IOCC used to read Keyboard character into !/O area. IOCC used to release Keyboard. KZ912 Number of remaining characters to be typed. (Each character read is typed. ) Program Analysis Procedures 145 WRTYZ Flowchart: Fl009 Used by: SFlO Subroutines required: GETAB, EBCTR, lLS04 Linkage: LlBF WRTYZ (BSl 3 TV DlSP) where XRl:: I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: Function XRl Write I/O Area Address XR2 Character Count Postoperative conditions and entry points: Function I Write Symbolic entry point Return address at Interrupt entry point Return address at Interrupt level WRTYZ WRTYZ+2 TZIOO TZIOO 4 Register status: Mainline -. ACC EXT X X XRl Saved at/restored from symbolic location Used X Significant variables: Symbolic location 146 XR2 Contents/Use TZ907 Number of characters remaining to be printed. TZ908 Output buffer for printing character. TZ902 10CC used to print character out of TZ908. X XR3 Status PRNZ Flowchart: FI010 Used by: SFIO Subroutines required: ILS04 Linkage: LIBF PRNZ (BSI 3 TV DISP) where XR1 = I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: Function XR1 Print XR2 I/O Area Address Word count, including 1 for carriage control character Postoperative conditions and entry points: Symbolic entry point Function I Print PRNZ Return address at Interrupt entry point PRNZ+2 INTZ Return address at Interrupt level INTZ 4 Register status: Mainline ACC EXT XR1 XR2 X X X X XR3 Status Saved at/restored from symbolic location Used X Significant variables: Symbolic location Contents/Use PRNT First word of Print IOCC, Address of output area. SIO+1 Address for store after character conversion. COUNT Counter for character conversion. TABL EBCDIC-to-140 3-Printer- code conversion table. TRCSW Transfer complete switch: zero CHAR EBCDIC character being converted. = transfer complete. Program Analysis Procedures 147 PRNTZ Flowchart: FI006 Used by: SFIO Subroutines required: ILS02 Linkage: LIDF PRNTZ (BSI 3 TV DISP) where XRl = I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: r=; L: ction XRl int XR2 Output buffer address (first character is carriage control) Word count, including carriage control character. Postoperative conditions and entry points: r-: L; ction int I Symbolic entry point Return address at PRNTZ PRNTZ+2 Interrupt entry point AZIOO Return address at Interrupt level AZIOO 2 Register status: ...---' ACC EXT XRl XR2 X X X X XR3 Status 1---. Mainline Saved at/restored from symbolic location Used Interrupt level 2 148 Saved at/restored from symbolic location Used X Significant variables: Contents Iuse Symbolic location AZ150+1 Address of first data word in output buffer. AZ919 Word count. AZ900 Interrupt exit switch: + , if line is complete - , if idles complete o , if waiting AZ922 Space counter (positive number of spaces). AZ914 DSW storage. AZ924 Scan counter (print). AZ918 Emitter-character storage. Program Analysis Procedures 149 PAPTZ Flowchart: FI007 Used by: SFIO Subroutine required: ILS04 Linkage: LIB F PA PT Z (BSI 3 TV DISP) where ACC = FUNCTION CODE XR1 = I/O AREA ADDRESS XR2 = WORD COUNT Preoperative input parameters: Function ACC XRl XR2 Read /0000 Address of I/O Area Word count, set to 120 by PAPTZ Write /0002 Address of I/O Area Word count Postoperative conditions and entry points: BZ924 Symbolic entry point Read /0000 PAPTZ PAPTZ+2 Write /0002 PAPTZ PAPTZ+2 Function at Interrupt entry point Return address at Return address at Interrupt level BZ100 BZ100 4 BZ100 BZ100 4 ~. -. Register status: ACC Mainline Saved at/restored from symbolic location Used 150 EXT XR1 XR2 XR3 Status Significant variables: Symbolic location Contents/Use BZ924 Read/Write indicator. BZ929 Number of words remaining to be read or punched. BZ300+1 Address of I/O Area. BZOIO Routine busy indicator: zero, no interrupt waiting to be processed; nonzero, an interrupt waiting to be processed. BZ902 10CC used to Start paper tape reader. BZ904 10CC used to Read paper tape. BZ925 Read area for BZ904, Read paper tape 10CC. Write area for BZ906, Punch paper tape 10CC. BZ926 DSW from sense-with-reset in interrupt subroutine. BZ906 10CC used to Punch paper tape. Program Analysis Procedures 151 CARDO Used by: Assembler Language programs Subroutines required: ILSOO, ILS04 Linkage: LIDF CARDO (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: Function ARGI ARG2 ARG3 I/O Area Address ~. Test /0000 Return to this word if busy Return to this word if not busy Not used Read /1000 I/O Area Address NSI Word count Punch /2000 I/O Area Address NSI Word count Feed /3000 Not used NSI Not used Stack /4000 Not used NSI Not used Postoperative conditions and entry points: Function at CA20 Symbolic entry point Return address at CARDO CA34+1 Interrupt entry point Return address at Interrupt level f--. Test Read /7000 CARDO CA34+1 INTI INT2 INTI INT2 0 4 Punch /7001 CARDO CA34+1 INTI INT2 INTI INT2 0 4 Feed /7002 CARDO CA34+1 INT2 INT2 4 Stack /7003 CARDO CA34+1 i-.-. Register status: ACC Ma.inline Saved at/restored from symbolic location Used 152 EXT XRl XR2 TEMP CA30+1 CA31+1 X X X XR3 Status CA32 Significant variables: Contents Iu se Symbolic location COUNT Number of words left to be transferred. COLM Address being transferred to or from. RSTRT Word count for restart. RSTRT+l Starting address for restart. BUSY Busy indicator; non-zero CHAR Second half of the Sense DSW lOCC that was last executed. ERROR Skip indicator; non-zero = = busy. feed a card. Program Analysis Procedures 153 CARDI Used by: Assembler Language programs Subroutines required: ILSOO, ILS04 Linkage: LIBF CARDI (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperati.ve input parameters: ...---' Function ARGI ARG2 ARG3 I/O Area Address Test /0000 Return to this word if busy Return to this word if not busy Not used Read /1000 I/O Area Address Address of user error routine Word count Punch /2000 I/O Area Address Address of user error routine Word count Feed /3000 I/O Area Address Address of user error routine Not used Stack /4000 Not used Not used Not used "- Postoperative conditions and enter points: Function at CR24+1 Test 154 Symbolic entry point Return address at CARDI EXIT+l Interrupt entry point Return address at Interrupt level Read /0001 CARDI EXIT+l INTI INT2 INTI INT2 0 4 Punch /0002 CARD 1 EXIT+l INTI INT2 INTI INT2 0 4 Feed /0003 CARDI EXIT+l INT2 INT2 4 Stack /0004 CARDI EXIT+l Register status: Mainline Saved at/restored from symbolic location Used ACC EXT XRl TEMP CR42+1 CR44+1 XR2 XR3 Status CR46 X X Significant variables: Symbolic location Contents/Use RESTR Count information for restart. RESTR+l I/O area address for restart. RESTR+2 Address of error routine; also, busy indicator. ERROR Skip indicator; non-zero INDIC Feed check at read station indicator; non-zero INIT Last initiate command given. COLM Address being transferred to or from. COUNT Number of words to transfer. CHAR Second half of the Sense DSW IOCC used. = feed a card. = feed check. Program Analysis Procedures 155 READO Used by: Assembler Language programs Subroutines required: ILS04 Linkage: LlBF READO (BSI 3 TV DISP) DC ARGI DC ARG2 Preoperative input parameters: Function ARGI ARG2 I/O Area Test /0000 Return to this word if busy Not used Read /1000 Address of word count Word count Feed /1000 Address of word count Word count (must be zero) r--' ---. Postoperative conditions and entry points: Function Symbolic entry point Return address at T est READO RE180+1 I ~ead READO Interrupt entry point Return address at Interrupt level RE180+1 RE048 RE048 4 RE180+1 RE048 RE048 4 I ~eed READO Register status: ACC M ainline Saved at/restored from symbolic location Used XRl XR2 RE144+1 RE156+1 EXT RE324 XR3 Status RE168 X X Significant variables: Symbolic location RE228 Contents /U se Busy indicator; non-zero indicates busy. ------------------------------.---------J ___RE2~_4___________~____I~/_0__ ar_e_a__a_d_d_re_s_s_.______________ 156 READ1 Used by: Assembler Language programs Subroutines required: ILS04 Linkage: LIBF READ1 (BSI 3 TV DISP) DC ARG1 DC ARG2 DC ARG3 Preoperative input parameters: ARG2 I/O Area Address ARG3 Function ARG1 Test /0000 Return to this word if busy Return to this word if not busy Not used Read /1000 I/O Area Address Address of user's error routine Word count Feed /1000 I/O Area Address Address of user's error routine Word count (must be zero) Preoperative conditions and entry points: Interrupt level Interrupt entry point Return address at RE180+1 RE048 RE048 4 RE180+1 RE048 RE048 4 Function Symbolic entry point Return address at Test READ1 RE180+1 Read READ1 Feed READ1 Register status: XR1 XR2 RE324 RE144+1 RE156+1 X X ACC Mainline Saved at/restored from symbolic location Used EXT XR3 Status RE168 Significant variables: Contents fUse Symbolic location RE228 Busy indicator; non-zero indicates busy. RE264 I/O Area address. RE360+2 Address of user's error routine for read error. RE370+2 Address of user's error routine during last card. Program Anal ysis Procedures 157 PNCHO Used by: Assembler Language programs Subroutines required: ILSOO, ILS04 Linkage: LIBF PNCHO (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: Function ARGI ARG2 ARG3 I/O Area Address Test /0000 Return to this word if busy Return to this word if not busy Not used Punch /2000 Address of I/O Area Return to this word following call Word count Feed /3000 Not used NSI Not used Postoperative conditions and entry points: Function at CA20 Test Symbolic entry point Return address at PNCHO CA34+1 Interrupt entry point Return address at Interrupt level Punch /7001 PNCHO CA34+1 INTI INT2 INTI INT2 0 4 Feed /7002 PNCHO CA34+1 INT2 INT2 4 Register status: ACC Mainline Saved at/restored from symbolic location Used 158 EXT XRl TEMP CA30+1 X X XH2 CA31+1 XR3 Status CA32 Significant variables: Symbolic location Contents/Use CHAR Second half of DSW last sensed. COLM Address being punched from. BUSY Non-zero indicates busy. COUNT Number of columns to be punched. ERROR Non-zero indicates feed a card (SKIP). RSTRT Word count for restart. RSTRT Data address for restart. Program Analysis Procedures 159 PNCHI Used by: Assembler Language programs Subroutines required: ILSOO, ILS04 Linkage: LIBF PNCHI (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: Fun ction ARGI Te.st /0000 Return to this word if busy. Return to this word if not busy Not used /2000 Address of I/O Area Address of user's error routine Word count /3000 Not used Address of user's error routine Not used ch Fe ed ARG2 ARG3 I/O Area Address Postoperative conditions and entry points: .....-. Function at CA20 Test Symbolic entry point Return address at PNCHI CA34+1 Interrupt entry point Return address at Interrupt level Punch /7001 PNCHI CA34+1 INTI INT2 INTI INT2 0 4 Feed /7002 PNCHI CA34+1 INT2 INT2 4 Register status: ACC Ma.inline Saved at/restored from symbolic locations Used 160 EXT XRl XR2 TEMP CA30+1 CA31+1 X X XR3 Status CA32 Significant variables: Symbolic location Contents/Use CHAR Second half of Sense DSW IOCC. COLM Address being punched from. BUSY Busy indicator; non- zero COUNT Number of columns to punch. ERROR Non-zero indicates feed a card (SKIP). INDIC Read station feed check if non-zero. RSTRT Word COWlt for restart. RSTRT+l Data address for restart. RSTRT+2 Address of uSer's error routine. = busy. Program Analysis Procedures 161 TYPEO Used by: Assembler Language programs Subroutine required: ILS04 Linkage: LIBF TYPEO (BSI 3 TV DISP) DC ARGI DC ARG2 Preoperative input parameters: F1IDction 1......-. ARG1 ARG2 Test /0000 Return to this word if 0 peration is not complete Read-Print /1000 I/O Area Address Word Count Print /2000 I/O Area Address Word Count I/O Area Address Postoperative conditions and entry points: ...---' Function at TY24 Symbolic entry point Return address at TYPEO EXIT+l Interrupt entry point Return address at Interrupt level ~, Test Read Print /7000 TYPEO EXIT+l INTI INTI 4 Print /7001 TYPEO EXIT+l INTI INTI 4 Register status: .--. ACC ~- Mainline Saved at/restored from symbolic locations Used 162 SAVAQ X EXT XR1 XR2 SAVAQ+l SAVl+l SAV2+1 SAVST X X X XR3 Status Significant variables: Symbolic location Contents/Use TY24 Functional branch instruction: /7000 = MDX * if Read/Print. /7001 = MDX *+1 if Print. READ Pointer to data input area. READ+1 Last half of Read IOCC. RSTRT+1 Data area address. RSTRT+2 Word count. COUNT Contents depend on the function: /7000 - number of words remaining to be read. /7001 - count of remaining characters to be printed, inItially set to twice the word count. PRINT IOCC used to print character from TEMPI. INTT IOCC used to release keyboard. DSWRD Device status word from sensing device in interrupt routine. RIGHT Switch indicating which character in TEMPI will be used next: /0000 = Use right character /0001 = Go get next word from data area and use left character. TEMPI Contents depend on the function: /7000 - rotate/tilt character converted from hollerith input character from keyboard. Character is printed on console from this area. /7001 - Temporary storage for printing a character (high order 8 bits was last character printed). TY90+1 Address of Hollerith table. TY92+1 Address of Rotate/Tilt character table. Program Analysis Procedures 163 PRNTI Used by: Assembler Language programs Subroutines required: ILSOI Linkage: LIBF PRNTI (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: FWlction ARGI ARG2 ARG3 Test /0000 Returns to this word if routine is busy Returns to this word if routine is not busy Print /20XO X = s pace control o , s pace after print I , suppress space I/O Area Address Error routine address Control Carriage /3XYO X = imlnediate control Y = after print control Return to this word. Print Numeric /40XO X = s pace control o , space after print I , suppress space I/O Area Address 1....-.. Error routine address Postoperative conditions and entry points: Function at PARI Test Symbolic entry point Return address at PRNTI EXIT+I Interrupt entry point Return address at Interrupt level Print /02XO PRNTI EXIT+I INTI INTI I Control Carriage /3XYO PRNTI EXIT+I INTI INTI I Print Numeric /40XO PRNTI EXIT+I INTI INTI I 164 Register status: Mainline Saved at/restored from symbolic location ACC EXT XR1 XR2 AQ AQ+1 FC58+1 FC58+3 FC58+5 X X X X X Used Interrupt levell Saved at/restored from symbolic location Used XR3 Status OUT+1 X X Significant variables: Symbolic location Contents/Use ILLGL+1 Address of call +1. NEGWD 2's complement of the word count. CLEAR Last entry to the clear print buffer routine. DSW DSW from the last interrupt. SPSK Space count if (-). Skip if (+). PASS Interrupt switch. FC16+l Address of call +2. STRE3+2 Address of call +3. SCAN+l End of the I/O area. CTR48 Scan counter to determine when line is complete. CTR16 Counter for 16 idles. Compare for skip response interrupt. Program Analysis Procedures 165 PRNT3 Used by: Assembler Language programs Subroutines required: ILSO,! Linkage: LIBF PRNT3 (BSI 3 TV DISP) DC ARG1 DC ARG2 DC ARG3 Preoperative input parameters: .... .Function ARG1 ARG2 ARG3 1--. Test /0000 Return to this word if busy Print /20Z0 Z = s pace control 1, space suppressed 0, s pace after print Address of I/O Area Control /3XYO X = immediate control Y = control after print Return to this word if not busy Postoperative conditions and entry points: Symbolic entry point Function Test Return address at PRNT3 W3160+1 Interrupt entry point Return address at Interrupt level Print Third digit at W35·40 PRNT3 W3160+1 W3020 W3020 4 Control Third digit at W354:0 PRNT3 W3160+1 W3020 W3020 4 Register status: ACC Mainline Saved at/restored from symbolic location Used 166 W3520 X EXT W3520+1 X XR1 XR2 W3100+1 W3120+1 X X Status XR3 ~ W3140 X Significant variables: Symbolic location Contents /Use W3540 First word of the Sense-DSW-without-reset IOCC; also, Carriage control character. W3540+1 Routine busy switch, non-zero indicates the routine is processing a message. W3920 First word of 60-word output buffer. W3900 DSW in interrupt, except carriage interrupt; also carriage control in interrupt. W3260+1 Address of user output area. Program Analysis Procedures 167 PAPT1 Used by: Assembler Language programs Subroutines used: ILS04 Linkage: LIBF PAPT1 (BSI 3 TV DISP) DC ARG1 DC ARG2 DC ARG3 Preoperative input parameters: .---.... Function ARG1 ARG2 ARG3 I/O Area Address Test /0000 Return to this word if the operation is not complete Return to this word if previous operation is complete Read /lXOO X=O, Check X=l, No check I/O Area Address Address of user error routine Word count (1/2 the number 0 f characters) Punch /2XOO X=O, Check X=l, No check I/O Area Address Address of user error routine Word count (1/2 the number 0 f characters) 1-.. Postoperative conditions and entry points: Filllction at DEVIC T est Symbolic entry point Return address at PAPT1 RET+1 Interrupt entry point Return address at Interrupt level R ead /0002 PAPT1 RET+1 INT1 INT1 4 I ~ch /0001 PAPT1 RET+1 INT1 INT1 4 Register status: ACC EXT XR1 XR2 XR3 Status 1---. Mainline Saved at/restored from symbolic location Used 168 SAVA XRL+1 XRL+2 X X X Significant variables: Contents/Use Symbolic location DEVLC Function indicator: /0002 == Read. /0001 == Punch. CHECK Switch for controlling checking function: /FFOO == Do not check. /0000 == Check for a Delete or Stop character" WDCNT Count of remaining words. IOAR Data area pointer. USERR+2 Address of user error routine. BUF Temporary storage for word containing 2 characters to be punched. SENSE Sense DSW for paper tape. READS IOCC for starting paper tape reader. IOCC Read or punch control word. CHART Character switch: (Punch) Even == (Read) Odd == Even == Odd == Both characters in the word have been punched, go get the next character. Punch the right character. Second character of word was just read. First character of word was just read. Program Analysis Procedures 169 PAPTN Used by: Assembler Language programs Subroutine required: ILS04 Linkage: LIBF PAPTN (BSI3 TV DISP) DC ARG1 DC ARG2 DC ARG3 Preoperative input parameters: Function ARG1 ARG2 I/O Area Address ARG3 Test /0000 Test reader /0001 Test pWlch Return to this word if the previous operation is not complete Return to this word if previous operation is complete Read /lXOO X=O, Check X=1, No check I/O Area Address Address of user error routine Word count (1/2 the number of characters) Punch /2X00 X=O, Check X=1, No check I/O Area Address Address of user error routine Word count (1/2 the number of cha.racters) Postoperative conditions and entry points: Function Test Symbolic entry point Return address at PAPTN RET+1 Interrupt entry point Return address at Interrupt level Read RDTBL PAPTN RET+1 INTN INTN 4 Ptmch PNTBL PAPTN RET+1 INTN INTN 4 Register status: XR1 XIl2 SAVA XR1+1 XR2+1 XR2+2 X X X X ACC Mainline Saved at/restored from symbolic location Used 170 EXT XR3 Status Significant variables: Symbolic location Contents/Use CHECK /0000 = Check for a Delete or Stop character. /FFOO = Do not check. WDCNT RWDCT Number of words remaining to be punched. Number of words remaining to be read. IOAR RIOAR Address pointer to user data area (punch). Address pointer to user data area (read). USERl RUSEl Address of user error routine (punch). Address of user error routine (read). BUF RBUF Temporary storage for word to be punched. Temporary storage for word to be read into. Index Register 2 Address of RDTBL, if reading. Address of PNTBL, if punching. IOCC READS IOCC used for punching a character. IOCC used to start tape reader. CHAR (RCHAR) Switch used to indicate which half of the word is to be used: Even = Both characters in word used. Odd = First character of word was used. SENSR DSW received from Sense-with-reset IOCC. RlOCC IOCC used to read paper tape. IOCC2 IOCC used to punch a Delete character. Program Analysis Procedures 171 PLOTI Used by: Assembler Language programs Subroutines used: ILS03 Linkage: LmF PLOTI (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: Function ARGI Test /0000 Return here if routine busy Return here if routine not busy Not used Plot /1000 I/O Area Address Address of user's error routine Word count ARG2 ARG3 I/O Area Address - .. Postoperative conditions and entry points: Function Symbolic entry point Return address at Test PLOTI RET+l Plot PWTl RET+l Interrupt entry point Return address at Interrupt level INTI INTI 3 1---. 10---. Register status: Mainline Saved at/restored from symbolic location Used /....--, 172 ACC EXT XRl SAVAQ SAVAQ+l XRl+l X X XR2 XR3 Status XRl+2 Significant variables: Symbolic location Contents/Use DEVIC Non-zero indicates invalid device. BUSY Non-zero indicates busy. DIGIT Counter to determine which section of packed word is being used. SENSE Word count, number of words for this plot. IOAR Output area address in user program. BUF Word being decoded for plotting. FIRST Non-zero indicates first command. DUPCT Non-zero indicates repeat some command or plot. CTRL Last plot command executed. WORK Command that has been separated out of BUF. Program Analysis Procedures 173 OMPRI Used by: Assembler Language programs Subroutines required: ILS04 Linkage: LIBF OMPRI (BSI 3 TV DISP) DC ARGI DC ARG2 DC ARG3 Preoperative input parameters: ARG2 EXT Flmction ARGI ARG3 Test /0000 Return to this word if program is busy Return to this word if program is not busy Timing Mark Test /0001 Return to this word if bit 8 2!l in DSW Return to this word if bit 8 is 2!f in DSW Read /2000 I/O Area Address Address of user error routine Read /3000 NSI (return to this word after feed) NSI Disconnect /4000 NSI (return to this word after disconnect) NSI Stc'1cker Select /5000 NSI (return to this word after Stacker Select) NSI /X--X = 1, Stacker Select X = 0, No Stacker Select /X--X = 1, Stacker Select X = 0, No Stacker Select Postoperative conditions and entry points: -. Function _. at FUN Symbolic entry point Test OMPRI Timing Mark Test OMPRI Return address at Interrupt entry point Return address at Interrupt level Read /FFFE OMPRI INTI INTI 4 Feed /0000 OMPRI INTI INTI 4 Disconnect OMPRI Stacker Select OMPRI 174 Register status: Mainline Saved at/restored from symbolic location Used ACC EXT XRl XR2 SAVAQ SAVAQ+l SAVXl MPR32+1 X X X XR3 Status MPR34 X Significant variables: Symbolic location Contents/Use Accumulator At entry to a user error routine: ACC = 0001, Master Mark detected. ACC = 0002, Read Error and/or Timing Mark Error. ACC = 0003, Hopper Empty. ACC = 0004, Document Selected. ERREX+2 Entry to user's error routine. FUN Function: /FFFE = Read (2000) /0000 = Feed (3000) READ 10CC for Read function. READ+l Address of user I/O area. FEED /0000, Feed has already been performed. /0001, Feed has not been initiated for this Read function. CNTRL and CNTRL+l 10CC for Feed function. STKSL and STKSL+l 10CC for Stacker select. DSCNT and DSCNT+l 10CC for Disconnect function. BUSY Program busy indicator: zero = Not Busy. non-zero = Busy. FCl Zero, No first character interrupt. Non Zero, Have received first character interrupt. MMARK Master mark indicator switch: zero = No master mark. non-zero = Master mark read. Index Register 1 Address of the calling sequence. Program Analysis Procedur es 175 WRTYO Used by: Assembler Language programs Subroutines required: ILS04 Linkage: LIBF WRTYO (BSI 3 TV DISP) DC ARGI DC ARG2 Preoperative input parameters: Function ARGI ARG2 Test /0000 Return to this word if operation is not complete Print /2000 I/O Area Address I/O Area Address Word Count Posto perati ve conditions and entry points: ~. Function Symbolic entry point Return address at Test WRTYO WR36+1 Print WRTYO WR36+1 Interrupt entry point INTI Return address at Interrupt level INTI 4 Register status: ACC Mainline Saved at/restored from symbolic location Used XRl XR2 SAVA WR30+1 WR32+1 WR34 X X X X EXT XR3 Significant variables: Symbolic location '---- 176 Contents/Use COUNT Dynamic word counter; number of words remaining to be printed. 10AR Pointer to data area, address of last word used. TEMPI Character to be printed, high order 8 bits was last character printed. PRINT First word of 10CC to print character out of TEMPI. PRINT+l Second word of 10CC to print character out of TEMPI. RIGHT Switch indicating which character in TEMPI will be used next: /0000 = Right character. /0001 = Go get next word from date area and use left character. TEMP Right half of Sense-with-reset 10CC. Status DISK1 Used by: Monitor system programs, Assembler Language programs Subroutines required: ILS02 ' Linkage:* for monitor system programs LDD BSI LIST LIST L DC DC DOOOO FUNCTION CODE I/O AREA ADDRESS for Assembler Language programs LIBF DC DC DC DC DISK1 (BSI 3 TV DISP) ARG1 ARG2 ARG3 ARG4 *This subroutine may be entered by user-written Assembler Language programs via the LIBF TV or by monitor system programs via a direct branch. If a direct branch is used, DISK1 uses the parameters contained in the ACC and EXT to construct the parameters of a LIBF and simulates a LIBF entry by calling on itself. Preoperative input parameters (for LIBF entry) t Function ARG1 ARG2 ARG3 ARG4 I/O Area Addre Test /0000 Not used Return to this word if busy Return to this Not used word if not busy Read /1000 Address of the I/O Area Address of user error routine Return to this word after initiating operation Write W/O RBC /2000 Address of the I/O Area Address of user error routine Return to this word after initiating operation Write With RBC /3000 Address of the I/O Area Address of user error routine Return to this word after initiating operation Write Immediate /4000 Addres s of the I/O Area Address of user error routine Return to this Word 1 = not us ed word after ini- Word 2 = drive tiating operation code and se cto r address Seek /500x x = seek option dis placement Address of the I/O Area Address of user error routine Return to this word after initing operation t Applies to simulated LIBF. Word 1 = word count Word 2 = drive and sector address Word 1 = word count Word 2 = drive code and sector address \Vord 1 = worrl c otmt Word 2 = drive code and secto r address Word 1 = not us ed Word 2 = drive code and secto r address Program Analysis Procedures 177 I Postoperative conditions and entry points: Function at Symbolic entry point D0945 Return address at Interrupt entry point Return address at I nterrupt level Test /0000 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Read /0001 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Write 'W/0 RBC /0002 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Write W/RBC /0003 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Write Immediate /0004 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Seek W /0 Seek Option /0005 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 DOOOO (branch) D0007 (LIBF) D0030 DOO04 DOO04 2 Seek With Seek Option /0005 (D0946=xOOO) Register status: -Mainline Saved at/restored from symbolic location Used 178 Ace EXT XR1 XR2 D09I8 D0919 D0020+I D0020+3 X X X X XR3 Status DOOI0 X Significant variables: Symbolic location Contents/Use D0006 If DISKl was entered by a monitor system program at DOOOO, this word is used by DISKl to simulate a LIBF link word. The contents of this word should reference the simulated LIBF at symbolic location D0060. D0008+l Address of the link word in the LIBF TV if called by a user-written LIBF; address of D0006 (simulated LIBF TV) if routine was entered from a monitor system program via a direct branch. D0235+l (D03l0+l) Address of the word containing the beginning of the file- protected area of the disk on the specified drive. D0280+l Address of a table in COMMA containing the list of defective cylinders of the disk on the referenced drive. D0305+l (D0330+l) Address of the device code to be used corresponding to the referenced drive. D0350+l (D0390+l) Address of the word in COMMA containing the current position of the heads on the referenced disk. D090l Sector address of previously executed Forced Read. D0904 and D0905 First and second words of the last IOCC performed (excluding Sense Device). D0906 and D0907 First and second words of the IOCC for the user-requested operation: D0906 = address of the next I/O area; D0907 = area cOde,lfunction to be performed and current or next sector address. D0909 Second word of Read-after-Seek 10CC. D09l0 Second word of Seek 10CC. D09ll Second word of Sense 10CC. D09l2 Word count remaining to be read or written from originally requested word count. D09l3 Next sequential sector to be read or written. D0938 Current sector address. D0947 If seek option was envoked, this word contains the displacement from the originally requested sector address. D0908 Second word of Read-back-check 10CC. DBUSY Non-zero indicates routine is busy; this word must be cleared to zero before entry to this routine is permitted. D0902 and D0903 Last 2 words of sector just read or written. Program Analysis Procedures 179 DISKN Used by: Monitor system programs, Assembler Language programs Subroutines required: ILS02 Linkage: * for monitor system programs LDD BSI LIST LIST L DC DC DOOOO FUNCTION CODE I/O AREA ADDRESS for Assembler Language programs LIBF DC DC DC DC DlSKN ARG1 ARG2 ARG3 ARG4 (BSI 3 TV DISP) *This subroutine may be entered by user-written Assembler Language programs via the LIBF TV or by monitor system programs via a direct branch. If a direct branch is used, DISKN uses the parameters contained in the ACe and EXT to construct the parameters of a LIBF and simulates a LIBF entry by calling on itself. Preoperative input paramaters (for LmF entry) t : r---' Function ARG1 ARG2 ARG3 ARG4 I/O Area Address Test /0000 Not used Return to this word if busy Return to this Not used word if not busy Read /1000 Address of the I/O Area Address of user error routine Return to this Word 1 = word word after inicount tiating operation Word 2 = drive code and sector address Write W/O RBC /2000 Address of the I/O Area Address of user error routine Word 1 = word Return to this word after inicount tiating operation Word 2 = drive code and sector address Write With RBC /3000 Address of the I/O Area Address of user error routine Word 1 = word Return to this count word after initiating operation Word 2 = drive code and sector address Write Immediate /1000 Address of the I/O Area Address of user error routine Return to this Word 1 = not used word after ini- Word 2 = drive tiating operation code and isector address Seek /500x x = seek option displacement Address of the I/O Area Address of user error routine Return to this Word 1 = not used word after ini- Word 2 = drive tiating operation code and sector address t Applies to simulated LIBF. 180 Postoperative conditions and entry points: Function at Symbolic entry point D0995 Return address at Interrupt entry point Return address at Interrupt level Test /0000 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Read /0001 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Write W/O RBC /0002 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Write With RBC /0003 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Write Immediate /0004 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Seek W/O Seek Option /0005 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Seek With Seek Option /0005 DOOOO (branch) D0025 (LIBF) DOOOO (branch) D0900+5 (LIBF) DOO04 DOO04 2 Register status: ACC Mainline Saved at/restored from symbolic location EXT D0918 D0918+1 X X XR1 D0900+1 XR2 status XR3 D0900+3 D0080 - Used X X X Significant variables: Symbolic location D0020 Contents/Use If DISKN was entered by a monitor system program at DOOOO, this word is used by DISKN to simulate a LIBF link word. the simulated LIBF at D0010-1. The contents of this word should reference D0025+2 Contents of the LIBF link word if called by a user-written LIBF. D0010 and D0010+1 Simulated LIBF parameters for direct branch input: D0010 = /1100 for read input = /2200 for write input D0010+1 = address I/O area DISKN is capable of executing 5 drives simultaneously. Reference to the proper disk drive work areas is accomplished by use of a table. XR1 is used to point to the relative starting position for each specific drive in the table. The starting address in the table is computed as follows: Program Analysis Procedures 181 Significant 'variables: Symbolic location (Continued) Contents/Use The contents of location D0800 + (drive code x 2) Example: Assume drive 1 is referenced. The address would be: D0800 +(1 x 2) == D0800+2 XR1 contains this computed address. References to specific significant variables used in the routine is Xl + some displacement value. The table (DT) contains many significant variables concerning the referenced drive. 182 VWXYZ and VWXYZ+1 First and second words of Seek 10CC if one is required; also used as temporary storage. STOXl+1 Drive determination: the drive currently being referenced may be determined by the contents of XR1 corresponding to the relative starting address in the drive table, or by exami.ning the contents of STOX1+1. This location contains the drive cl)de. Index Register 2 Drive code and I/O area address at various times during execution of this routine. D0800 (XR1 + 1) Current position (sector address) of the heads on the referenced drive. SVlOland SVlOl+1 (XR1 + 10) (XR1 + 11) Last two words of the I/O area just read into RSTRT (XR1 + 20) Address of the user's error routine. Sli'LAG (XR1 + 21) Current seeking status of the drive: /FFFF = drive is seeking, has just seeked, or seek is required. /0000 = seek not required, or not in process. D0995 (XR1 + 30) Originally requested user function. SCNTR (XR1 + 31) Error counter for referenced drive for this operation: 50 - C(DT + 31) == total errors occurred for this drive during requested Jfunction 10 (DT + 30) 10CC and IOCC+1 (XR1 + 40) (XR1 + 41) IOCC for the current user-requested operation, except for Seek and Sense DSW. oruGS (XR1 + 50) Originally requested sector address. SADR (XR1 + 51) Current sector address for current 10CC. Significant variables: (Continued) Contents fUse Symbolic location WCNT (XR1 + 60) Remaining word cOWlt to be read or written. COUNT (XR1 + 61) Word cOWlt to be used in next I/O operation. lOA DR XR2 + 70) Current I/O area address. RBCNT (XR1 + 71) Read-back-check counter: 100 = C(DT + 71) = total errors occurred attempting to perform RBC. 10 $DBSY Current I2tatus of each of the 5 possible drives; i. e., if drives 0 and 2 are both busy, bits 0 and 2 of $DBSY are set to 1. PrograT'fl Analysis Procedures 183 FLOWCHARTS System loader Flowcharts: SYlOl -05 Cold Start loader Flowchart: CSTOI f------- Cold Start Program Flowchart: CST02 LINK DUMP I EXIT I ~ Skeleton Supervisor Flowchart: SUPOI , Core Image loader Flowcharts: CllOl - 02 I I EXIT entry LINK entry, DSF program Monitor Control Record Analyzer Flowcharts: SUP02 - 08 DUP record FOR record ASM record 1 I DUMP entry, negative parameter DUMP entry , non-negative parameter Auxiliary Supervisor Flowchart: SUPIO System Cor e Dump Progra m Flowchart : SUP09 xlQ Terminal Dump record I LINK entry, DCI program 1 Dyn amic Dump ~ Subroutine library Flowcharts: UTLOl-13 SCA01-o7 FIOOl-13 USER EXECUTION DCI program Disk Utility Program (DUP) Flowcharts: DUPOI -13 ~ EXIT FORTRAN Compiler Flowcharts: FOROI - 30 EtT Assembler Program Flowcharts: ASMOI -24 t EXIT Core load Builder Flowcharts: ClBOl - 02 LINK t LINK 1 EXIT EXIT LINK DUMP EXIT Flowchart DMS01. Disk Monitor System, System Overview Flowcharts 185 ... ··.Al··.········ • MANUAL LOAD OF • BOOTSTRAP LOADER ·.... ·A2··········· • FETCH PHASE 2 • ••• X FROM DISK ·····A3 •.•.....•. : p~~~~KI~A~~R : ••• X.AGREEMENT Ii ITH • : PHID CARD : ................. ... .. -. •.• X.:· ~~gT~~ .:.~~ .. Ait •• •• DECKS •• ..... .;;; ..!... : X ··.···B1········· . ·· BOOtSTRAP • X :PHASE2 LOADER LOADS P+iASE 1 ·:INI~MkW:TaND ... ·82··········: • RESIDENT MONITOR · .. ••••••••••• a ••••• x : •••• 83 ••••••••• : • BUlLD SleT • • TABLE AS EACH :PHASE IS lOADED: ................. ··...... ... ... 02 : : ENDSY X : •••• 84 ••••••••• :, • SET UP • • PRINCIPAL 1/0 • : DATA IN SLET : ................. • C3 •• X. PHASE1 X .- ••• C1 -. X • ••• ·e2·· ..... •••• .. •• 1ltlt2 •• YES • •• READER USED .. ft • • • • e. •• a. * .... •• • NO :uP~~6eM~~~~!ON : - NUMBER ON 10 : CARTRIDGE ................. ·· .. ..... • 02 •• X. •••• X X ...• OVERLAY ···01·· . ········ 1ltlt2 CARD 110 WITH .2501 CARD 1/0. • •• •• . X e 1.......... . ....••••• PROCESS LOAD .. • MOOE CONTROL : CARD • : ••••••••• co ••••••• .•.x • oft 02 •• INITIAL LOAD •• YES • • - ....... . .. .. ... . ..... *.. .. a ••• • e. .. •• NO ••••••• ·.................. .~ yeS ·····D3·••.••. •. ~ :D~o~~lA~O~~A~~Y: • : ······e5··········. • INITIALIZE • • •• X:RESIDENT IMAGE: THAT IS ENCOUNTERED X X ······D4·········.· : •••• 05 ••••••••• : • INITIALIZE • :FIRST HpOR OF: • : ................. :X •••••••••• : : X ·····E2·········· -SEARCH SLET FOR. • PHASE 10 OF • • EACH PHASE TO : BE RELOADED : .* • EXPAND INTO .. CUSHION WHEN • NECESSARY • • .............. .. . .... .. .. ~ .. E3 *. *. ·····GI···.·····. • SET SI< TO • • OVERLAY A • • SECTOR Of PHASE. 2 WITH • • :.. ~~:~:~e!~.! ..: •• .... •• .- NO ••••••• ft. .- • YES X ·····F3······ ·· .00 NOT LOAD .. ANY. PHASE.ASSEMBl~R EHl~ONTUED ................. : : ic ·····E4 ......... . :U~yA~E I~U~HA2N • AN6 CORE ~IZE : IN RES I14AGE X ·····G3 ....•••••. • SET UP AN • .IN-CORE RELOAD. • TABLE FOR • :PHASeS WINEG 10: ................. ······E5 ..X·.···.· .. : • : .FETCH AND ENTERSUBPHASE 3 ................. .-. X Fit -. ..··INITIAL·· •• YES • *. LOAD .a •••••• *. *. .. .. •• .- • NO :X •••••••••• : : •• X: C3 : X .•.X •• BYPASS •• ASSEMBLER .................. .. ·• •• ·.C4.··X .• ·.•••. e. BYPASS FORTRAN • NO X • YES .•• • • • • • • • • • • • • • • fI • • : •••• F2 ••••••••• : •• x C3 •• X e. •• •• INITIAL •• NO •• LOAO . . . . . . .. ·.OPERATIDN.· fl. •• .. .. :x •••••••..• : : Fl .. • •••• X ·....F5.········· • • INDICATE IN • SLET THE 110 • DEVICES NOT : PRESENT ................. ••••••••••• X: X ······G"'··········· -FETCH AND ENTER • SUBPHASE 3 X : •••• GS .......... : • PROCESS THe • ENTRIES IN : RELOAD TABl E x • STORE PHASE 2 • : ON CARTRIDGE : ·.................. x : •••• J 1 ••••••••• : • PROCESS SYSTEM. • CONFIGURATION. .. DECK • ·.................. ·..···Kl··········.. X :C~~~~~~SR~~~RD : ••••• : ·.................. Flowchart SYL01. System Loader, General Flow 186 .. .. .. H3 •• •• .•.X •• INITIAL LOAD e •• _ -. ' .. .- • •••••• X. • YES i ···.·J3······ .. ·· -FORCE A GAP IN • -SLET JUST AHEAD. • • OF CIL PHASE ••••••• : ID'S : ................. : • : Sl~~I~~~EI}~ DEVICES NOT PRESENT : • : ................. .. ... X X ·····H4.·.·· ..... e. NO • • : ............ ..... :x ...•••••.. : : : •••• Hl ••••••••• : • • : H5 •• •• *. •• ~. INITIAL LOAD *. * ••• •• NO •••••• •• .ft - YES X :··UP~~TE·T~E···: X ·····J5·····tt ....• • BR TO RES ................. : •• ~~2~~~!!~~~ •• : • RELOAD TABLE. • ••••••• • ENTRIES ON : CARTRIDGE : MONI TOR TO • FETtH DUP TO • LOAD • • • X • •••• KS ••••• o •••• ............... : END OF RELOAD : e : •••• ............... BOOTSTRAP LOR : .. . =.. : . *. a. 0,-,+ * •• a •• .* : : TEST FOR LOAO • MODE CARD : •••• .~ ··...... . • x : •••• Cl ••••••••• : : C2 •••• • OVERLAY 1442 -SUBR. WITH 2501* : SUBR. : .. .. ··.·.Slt·.·X .. ·.. ·. : •••• 65 ••••••••• : • SET UP • COMMUNICATION· : AREA AND FILE : :INITIAlIZE FOR: • BEGINNING OF • : NEW SEC TOR : • : X ·····C4 ..... ·.• ·· : •••• C5 ••••••••• : -READ CARD INTO • : BUFFER A : • START TEST FOR SCON • CARD - ...x * * •_ •• -. .- E2·-· e • I S IT : • _ FZ··· •• * ••• • NO X X .···G2········· Gl e. ••• - CO~fROL e. _. YE S CARD .a •••• •• EXPECTED •• ............... ..E••. * •• • N~· --....-. -.. : HI •• X. •••• X :DISPLAY ERROR 3: • G3 • -. a. a. a ••• * .... BREAK •• .. . YES ..... • -OOZ- .G~. :X •••••••••• : ...••••••••• x: •• ·: . ·................... : •••• G4 ••••••••• : NO • TRANSFER DATA • :TO DISK BUFFER: ·.................. x ...............9: .. •• •• I SPLA Y ERROR .. H4 ...X •• BUFFER .. FUll •.•.•. y;; · TBLZ X •• •• ·GS.· •• • •• ••• X * ••• :0 :O~HHTgE~l~:h : :STORE IN TABLE: ................. .- ................. NO • •••• H3 •••••••••• .* •• •• ·ES.· •• • •• • ... w CONVERT COLS • • • ESTABlI SH • .SECTOR ADDRESS. : FROM WORD 11 : .... -. ._ .- .• X REQ x : •••• FIt ••••••••• : AZ : -. e. CARD TYPE *. • 0-·- p~b~~c .-. • _ HI ... E4 e. •• DOES •• -. T·· -. YESX : -.ADDRESS LESS ••••••• -. THAN 630 •• •• HEX •• • .·. ·x •• X: 01 : HI : .-.x ..... ·OOZ· • E5 • .:Foltb~ ~~~~0R:.~~ •• •• IS THIS •• YES •• INITIAL . - •••• •• LOAD .w .=... ·.... : *. F3 e. IS IT •• YES PRESENT •••••• *. a. ._ .- • .X: 01 : ·002. .. .. .. .. .. .. MODE .. . ..E:. .OOZ· _F~. w .w.x ................ . .... ..... : ..... - 01 : •• -. .-. CARDP 13 ·.!....... • F2 *. X. •••• X : •••••••••• X: • DISPLAY ERROR. ............... •••••• • NO -WORDS IN BUFFER: B : a. X ··.·03··.······ -. YES ._ .- a ••• .·· FI·········· : .. ~8=C~Ef~ gg : ................. CARD : X .CALCULATE CORE • • S IlE AND SAVE • : FOR PHASE 2 : •• X: 01 : DATA PRESENT *. a. SET XCARD TO • TEST FOR SCON • CARD NEXT : ................. .................. · ..... .. .... e• . ··...... .. YES X :STUFF • : X -. a. • _ El NO •• IS PAK e. ••• • *. INDICATOR .e e. ON •• a •• • ·..................- ·.................. x • SECTOR ADDR. • - WILL BE TAKEN. .FROM NEXT DATA : CARD : A3 : X X *. : AND ENTER AT MAING : : •••• • 02 •••• DISK ................. w - : •••• 01 ••••••••• : -002* : 01. • • : X : •••• 02 ••••••••• : . .X ••••••••••• : : : •••• 83 ••••••••• : YES .... -.X.. ..... TO • FILE LAST w SEC TOR - PROCESSED TO : 01 SK ................. • ·................. . .=.. ................. . ... ··...... . ·....CARD PRO~~~~~~ X • ................. .... • LOAD PHASE Z w TEST FOR PHIO • : FILE LAST : : X ·····C3·········· : •••• C2 ••••••••• : ................. • •• NO •••••• .····AS .... •.. ·•. EOP F2 : X • X ·····A4 •. ·· . ·. ··· e. IS IT PRESENT .. ................. · . :...............: * •• * • YES w. ABSSC C2 : x : •••• 82 ••••••••• : Bl .* e. •• WAS -. NO •• 2501 READER •••••• •• a. USED ._ .- A3 .. .. ·.=... • 0 DZ : .-.x *. •• x .e • · · .. A3 •••• .•• ·OOZ· • AS. ·OOZ· ·· .. AZ -. .*. -.. TEST •• + ••• -. XCARD FOR •••••• ***ENUii-FROM-- e _ •• A:. .... .... ..... -. ..... _ AZ : ...x Al : .... T~3~ ~~io~~ T A : ····.·H5.···· ..·... ·.................. X •• NO .. •••••• -.!... • COMPRESS DATA • • • AND SAVE FOR • PHASE 2 • : D1 : : ••• S.B ••• 002 A4 X .····J3·········· : ••• MODE •• 002 F3 : ••• DATA •• 002 E4 : ••• S/0 ••• 002 01 ..... : ••• REQ ••• 002 E5 - : ••• EOP ••• 002 A5 ·OOZ- : ••• TERM •• 002 G5 : ••• CORE •• 002 KZ CORE wK~- · • INITIAlIZE DISK. • 1/0 WITH • • DEFECT IVE TRACK• DATA • ·.................. .. . • .X: 01 : . . . ·.................. X • •• ·.J4 •• • •• ••••• : ••• :sEc~AkEA~~laET : • NEXT • X .···.Js.··.····· . • ESTABLISH • .PRINCIPAL PRINT. .DEVICE AND I/O • : INDICATORS : ................. .. . • .X: 01 : X : •••• K2 ••••••••• : • USE VALUE IN • • CORE CARO FOR • CPU S IlE • ·.................. .. . •• X: 01 : Flowchart SYL02. System Loader, Phase 1 Flowcharts 187 ·" ... • 1.5 .. •••••••••••••• X MAING ·····*· AI··.. FROM .. •••• ENTER : PHASE 1 A2·"· *. • •••• A3 •••••••••• we.,. .. .. .. •• -. •• 2501 •• NO -READ TO BUFFER • •• READER ON •••••••••• X" A WAIT FOR OP • *. SYSTEM •• • COMPLETE " ••••••••••••• <1. *..e * •• it .. .. .. .. •• X: F2 : X SETIO ··· ..INITIALIZE Sl······· . ··.. • INTERRUPT 8RANCH ADDRESSES • • ................. X DU8 82· *. *. .e.. .:" *. .. X :.u-•• C1 ••••••••• : UVERM • UPDATE VERSION * *AND MODel LEVEL: NUIlBER : BUFJ~R A *. ... BUSY e. w* ··:.~~~ ••••• X.:· *. ... ~~~PEINIO i YES." •• • *. ".. *. x .... *. w- .* • ". - • .. • ••• 84 ••••••••• ERROR STOP : ••• EOP •••,003 G5 : : ••• EOS ••• 005 1.1 .. ..... -003• .D~ • . X ·····05·········· " FILE LAST - XSll : READ INTO BUFFER 1.2 . .... . .. - YES PRo~~HF~ TO : : ................. : .~ DISK : Fl : * ··.... EI···.····.· X "SAVE ADDRESS OF* * SECTOR * .. FOLLOWING : CUSHION .... .... • fI • • • • • • • • • • • • • • • *003* • : fl. * .. x. f ..••••• • WAIT • : w- ·:.~~~ ••••• X: .e X ····.·D3··.···· ... · w * .... : ••• DATA •• 004 1.1 *. ................. e• *. •• •• .. ...-... : ••• S.8 ••• 003 05 • POINT ADDRESS • :IN ~~tPEAO~~ TO: •• IS •• NO •• BUFFER 1.2 •••••• •• 8USY .- " NO Fl ".. * e •• e 02 *. : •••• C.3 ••••••••• : X w* •• CARD TYPE x X .• e. 01 ". * .. INITIAL ". LOAD ." * •• e ...x • NO ••••••• n ••••••••• •* ~~S¢2 *. • NO ······e2····· . . ····· SET INDICATOR • 1.1 ON AND START • • .* 83 .e._. 1.5 .. .. ••••••••••••••••• • YES •• : • TPAK E3 .-.x •• x : •••• E5 •••••••••• : •. •IS •• NO •• BUFFER A •••, ••• •• BUSY .- .. .... .. ...... .......: ~~ · -. • .." .* • IN 8UFFER • PACKI NG • • SU8ROUT I NE TO " • X 1 •••••••••• FOR 1/0 OPEIIATIONS COMPLETE X ·····EZ·········· .MODI FY ADDRESS .. ...... x • YES NO •• .. .X ••••••••••• X ••• F2 •• .. .. -..... IS It .. ..X: . .... • -. • : •..•••• R~a5N~8 •••• • • • • • • '. . . . . . . 11 • • • • .................. : Fl : FZ _. X. •••• .INITIAlIZE FOR. • BEGINNING OF • : NEW PHASE : YES Fl : X .····F3··.··.·.· . -MODIFY ADDRESS. • IN 8UFFER • PACKING :SU8ROUTINE TO A: ..... ................. x · .003- .G~. XSL3 X ·····Gs· ······•·• FILE . . LAST : •••• G2 ••••••••• : .PACK DATA FROM. : A OR 1.2 TO B : • SECTOR • PROCESSED TO : 01 SK . ................. " : ........ ......... ~ : .•••...... x: x . ..".. . HZ •• .. ..~~~K~~ ... ..·:.~~ _:- ••• - . •••••• X: ... CLi~~ItA¥~~Y :····J2 ...••.... : • CLEAR 1.2 BUSY " INDICATOR : ......................x . .... : A5 : Flowchart SYL03. System Loader, Phase 2 188 : •••••••••••••••• * - YES x . • •••• H3 •••••••••• X .... - : AS : X ······H5··········• COMPLETE SLET " ENTRIES fOR • : THI S PHASE : ................. x : •••• J5 ••••••••• : -UPDATE SlET ON • • DISK - ..- ." •• X" fl - ..... ... • 001t • • AI • X XSL2 •• •• •••• ••• AI.. IS •• LOADER •• NO ~~lU~G . ... .... •• ·······X·· • YES ••• A2 •• •• DOES •• •• CARD FOLLOW •• YES X•••• Sfi~l~~ *... .. .. FEAT •••••••••••• ••• A3 •• •••• •• I S . . NO X·· •• ~~anIJ~ ••••••• : ... ... .. ··........ • NO FRONE : •••• A't ••••••••• : .SEARCH SLET FOR • ••• X: THIS PHASE : ................... • YES • 82 *. x. .•.ic X X : •••• 82 ••••••••• : : •••• 83 ••••••••• : • TRANSFER OAT A • :TO 01 SK BUFFER : .STORE PHASE 10 • .AND OTHER DATA. :IN RELOAO TABLE: . .. ................. Bit •• ." IS It. •• PHASE •• NO tt. LONGER THAN • tt • • • • ·.ORIGINAL •• ................. tt • • • tt ..!... .y~; :X •••••••••• : : x : •••• C1 ••••••••• : • CLEAR BYPASS. • : SWITCHES : •••••• ................... .. .. .. •• •• ...ic .. .. ic ... -.. ..... C2 ic FUll •• NO •••••• • YES ic : •••• 02 ••••••••• : • FILE THIS -SECTOR AND GET • : NEXT : ................. ic ..... ·003· •• Fl· - .- .". .. .. .. .. ... . C3 •• BUFFER : 82 : .- *. x : •••• Clt ••••••••• : It. INITIAL LOAD NO It. .* •••••• " YES • 003· •• Fl· " F INLD • .GO TO EXPND TO • " EXPAND INTO " : CUSHION : ................. X : •••• 03 ••••••••• : " POINT XR2 TO " NEXT SET IN : SLET " • : ................. x .. .". .. .. *. •• .. .... .....x " 04 ... It. •• CUSHION USED UP •• NO •••••• • YES : B2 : FIZZ X ic .... E4········· : •••• E3 ••••••••• : :PHn~I~~ I~AIN : : ................. ...... ." : ORDER ..x: • DISPLAY ERROR. : ............... 11 : 82 : Flowchart SYL04. System Loader, Phase 2 Flowcharts 189 ..... . ·005· •• A! • : : ·-....".. .. A3 w••• • XSL4 X : •••• A1 ••••••••• : ~~gR~FF'~rO~~ : : ................. TABLE STRING ·.... A3·········· ·.··.A2········.· NOOA -INITIALIZE CORE. SIZE AND ENO •••• X.AOOR SS OF .OF 0 SKZ 'N RES• : : : ·................. ..... .....: ~~~:~ •• ···B2 •••••••••• : •••• 83 ••••••••• : • SET PRINCIPAL • • 1/0 DATA IN • : SLET : :FETCH AN6 ENTER: : N~~~p~n~L~Y : • FILE IN-CORE • : TABLE TO DISK: i : ..... Cl ••••••••• : ic . - • : IN SECTOR ADDRESSES • : ................. • ft . . . . . . . . . . . . . . . . •• 0 • • • • • • • • tt • • • • • • • • X ··.··85···.···.·· .INCREASE STRING. ic ·····8"········· • BR TO RE S HON . • .TO FETCH DUP TO- :SUBRO~1~~~ • LENGTH BY 3 • • PUSH END WORD : DOWN STRING : ................. ................. lIBR: o. .. .. INIl :FETCH OISKl AND: • •• X:INSERT CIL DATA: ·.................. x '·0 C5 -. .. END OF -. YES •• DISK STRING •••••• . . : •• •• ·.A5· CURRENT .. •••••••• PLACE • OF: CORE STRING : X:EN9A~K AfA~~~ : X ·····C3····~···.· :MASK -FETCH AND ENTER. SUBPHASE 2 : : : : ................. ·.................. ·................... X ·····e2·········· - CLEAR SLET OF • - All SIGN BITS. . 0.x:U~8~~5N~~Hto~ : AREA x SET PO X : •••• 81 ••••••••• : • • • • • • iI • • • • • • • • • • ·.···.AIt•••••• ••••. x PROCESS IHE : IN-CORE T BLE : .0.0 .oN~· 04 : .. •••!: : ··....Dl·········· :Fn~~ HhD~~: ................. X : X ·····02·····.···· : 'fNOTZ DISKZ ...x ·····El.·· ..·. . . .· :UP~H~HCB~~~llN .. .. • • • • • • • '• • • • • • tt • • • a. ,," .... x .... .. .. .. .. .- ••• -. INITIAL LIlAD a. •• • YES x ·.................. • UPDATE • • ADDITIONAL : WORDS IN DCOM : .IN-CORE RelOAD : TABLE : x : ..... Hl ••••••••• : ................. . .................. • READ OISK • RelOAD TABLE : INTO BUFFl • : ................. ...x •• •• •• .0 .0 JZ -• ANY DATA IN YES" DISK ....... X. Dit • TABLE •• •• .0 .. • •• * . . • NO ..!.. : A3 : Flowchart SYLOS. System Loader, Phase 2 190 DISPLAY END RELOAD '·0 • ~ .~ X Eit .. .. : •• • •• * • NO ·····FIt······.··. D~~~P~~KL~N~O ................. X : : • WITH ALL CORE : TABLE 10'S : : .. .0 .. ... x.. .. .. .... G4 •• '·0 ANY MATCH •• NO • YES X ·····HIt· •.•••• ·•. 5¥~~A~~B~~Xlo : : • •••• WITH ALL CORE. : TABLE 10'S : o • •••••••• a ••• : •••• H2 ••••••••• : ••••• J 1 •••••••••• - INITIALIZE A • -NUMBER OF WORDS ••••••• : IN RES IMAGE : .. .. X :GETR ................. - X ··.·F3····.···. ............... . :P~~~TF~8D~N~OOF: INITIALIZE -FIRST SECTOR OF: LET : STRING •• END OF •• YES • •• IN-CORE •••••• X. •• STRING •• ................. • : ......... ....... . .... ................... • • • : • FETCH NEXT - ENTRY Of DISK : STRING : X •• ··.G2 •••••••••• x .. CLEAR SYSTEM .. LOADER FROM : DISK X : ...... Gl., •••••••• : ................. ott : •••• 05 •• ·••••••• : :L8~DC~R~H~Ul~0: : •••• E3 ••••••••• : : •••• F2 ••••••••• : • FETCH RELOAD • :TABLE FROM DISK: .: .. ~~ ••• : X X :CZOO -. NO • •••••• X. .... .. .. x x :COMTL • : •••• 0"' ••••••••• : •••• • YES :COT - YES Ft •• EZ -. •• e. •• RELOAD •• NO • -. OPE RAT ION •••••••• : - SIZE AND FILE : B,lCK : .!. o~~k~~YON .:- ................. X .. •• 03 :~g~EfH~18~v'~a: : NOT PRESENT : : : ................. Dit : A3: :IPL .... ·.Al··········· ...... : x 83 : X ······B3··········· : •••• 81 ••••••••• : :BEXl\8a~V~~ON: ................. : 0000 : x : •••• C1 ••••••••• : • BUILD 10CC TO • :E~U~ ~e~~g~~s •• •• : ................. .* -. C3 *. ...x •• DISK RE,.DY e. .• •• NO • * •••••• X. E2 • .* •• * •• * • YES :x .••.....•.•.••.•••.•••••••..••.••.••.• X X ...... 01···.·····.· : •••• 03 ••••••••• : ·8UIlD REfUIRED • • lON • : INSTRUC IONS : ...... ................. .... : E2 : •• El .!. X •••• : •••• E2 ••••••••• : VALID NO. -.• _.- NS=4n ._-.•••••••••• X: ae •.•._ . .. ,.IT • YES x : •••• Fl ••••••••• : • BUILD DEVICE :COD~p~~~F~~&VE :• •••• ••••••••••••••••••• • : ................. X X : •••• E3 ••••••••• : 8UIL~E~~CC TO : : ·.................. X ·····f3·········· S~~u~f ~2~D : : :S8Pg~l~D~nn ................. : • •• ·.Gl· ••• • •• ••• X ·····G3·········· ................. ·.................. :Sf~nDDI~~C .. JyH: : RE ET : .. ... ~ 8Un~DI8~~K TO ~ ~ : B3 : X ······H3··········· • SEEK TO HOME POSITION X •••••• J~ ••••••••••• • LO~8lDJnlR~ND • PROGR,.M «SECTOR • : 01 • X .·.·K3.·.·.···· ~Hh T~R&8k~M ............... : Flowchart CST01. Cold Start Loader Flowcharts 191 .· .. A1········· -ENTER fROM COLO- START LOADER - -...............;( ·.···Sl ... ········ -GET OEVICE COOE- fDR LOGICAL 0 -SET UP flY COLD : START I.OADER : .................... x : •••• Cl ••••••••• : INITIALIZE -LOCATION 0 WITH:8RANCH TO SDUMP: ................ ~. ·····01.·X. ······· .. SET UP WORO COUNT ANO • *SEcrOR ADORESS OF RESIOEt-4T • .. • .. : ••• (f.!:~~~ ••••• : i ·····EI·········· -................... .. I t-4lT I All ZE - SOCYl ENTRIES .. fOR lOGICAL 0 TO PO S IT I VE .. .. .. ·..... .. X Fl···~······* • SET Soasy AND .. .. SCYlt-4 TO ZERO - .. -.................. .." .·.·.·GI.·.·.·.·.·. X -FETCH RESIOEt-4T IMAGE i • ••• ·H] •••• '...... . - ................... INITIALIZE .SACOE ENTRY FOR: LOGICAl 0 : i - •••• J 1 ••••••••• EXIT TO AUXIlARY • ••• ~~~~~~!~~: •.• Flowchart CS T02. 192 Cold Start Program " : ....SDUMP Al··.·· ..... ENTRY " ............... POINT i •• •* 81 • : : .. ··A2········· $EXIT ENTRY • ............... POINT : ·... A3········· ;.....:~!::.....: • SL INK ENTRY - X••••••••••• .". ". ic •• : •••• 82 ••••••••• : • -INDICATE ENTRY * : MADE AT SEXIT : •• YES. ". INTERRUPTS .e •••• .. * ••• .. ·.................- ". PENDING ." • NO X ····...B3·········.-.: .-................:I~~b~An ~N~~ : X •••••••••••••••••••••••• : X ..... Cl·········· -SAVE REGISTERS,. " GET AND SAVE " DUMP FORMAT : CODE e • : ................. X : •••• C2 ••••••••• : • ••• X: SAVE ENTRY INDICATOR • : ·.................:X ••••••••••• X . ·····01····· .. ···· " SAVE FIRST 4K 2F CORE ON CIB. e •• X • e• .. .. . .. * •• * .. •••••••• 02 e. ··e!N~~~~V~lS •• YES. - NO ic : •••• El ••••••••• : -INDICATE ENTRY • : MADE AT SDUMP : •••••• -.................. ic .....ez·········· • RESET :CO~~a~~~~~yg~s • : • ·................." ADAPTER X ... ··F2·······.·· - GET AND SAVE • -LINK NAME, TWO. "WORDS FOllOWING" : CAll LINK : ................. X ······G2·······.··. .. - FETCH CORE IMAGE LOADER, PHASE 1 • ic .... H2········· " EXIT TO CORE : IMAGE LOADER ............... • : Flowchart SUP01. Supervisor, Skeleton Supervisor Flowcharts 193 ...... : A3 : x .a. .... .... ,43 •••• Al··,I •••••• .ENTER FROM CORE. : IMAGE LOAOER : ........ ...... REg~~D • :. •• ~ .•. ... . .... .. .. x: . •• A4 ." ····.··81··. . ··••··· 83 • YE~ ••• ... X . ······e2··....·.... .. C1··· .. .. .* C3 •• .:. -. El ...x •• •• •• -... •• : *. •• • •••••••••••••••• • NO E3 •• REI!8RD .•.x •• • •••• EIt •••••••••• •••• PRNT· • • YES : ~~n8~R~Hi: •••••• •• RE~ORD •••••••••• X.PRIN8lPA~ IN~UTe •••• X. C2 •• •• •• •• : PERMXAE~TL Y : o ..... . .:.~~~ ••••• .* X •• •• e NO e •• * ·003•• A!. ••••••••••••••••• • NO ...x .. .. .. .... ..~... .. X ••••• ·FI· ••• •• ••••• PRINT THE RECORD F3 • ••••• F~ ••• • ••••••• e• .... •• EJECT •• YES .EJECT PAGE AND. • • ..... RECORD •••••••• ,. ••• X .PRINT HEADING••••• X: C2 : • NO X .. .. -. .- : C2 : G1····•• •• • 0 -. YES· • COMMEN"rS ....... x. C.2 • e. RECORD •• •• a • • (1 • NO .. -. • :. HI .•.x "lAME, CARTR lOGE. 10 OR SUBR. • NAME IN DISK :~.;~~D~~~~~: ••• : i X C 3·"· •• • ••• .II>lCRE"ENT WORD. • COUNT 0 : ACCCRDINGlY : -. NEXT x • •• ··C4 •••••••••• •••• .. .. .. .. YES NO -. .. .. .. .. .• 03 .i -• *. NEXT -. YES • COLUMN • - •.••••• o. BLANK .0 •• •• ............. :CONVERT NAME COLUM/j A • - •••••••• X_. COMMA •X. - • • •• 0 1 ••••••••• o RETURN TO • :CALLING ROUTINE: .~ • ................. - · ·C1··········. .. ............... . • *· .. STORE TI"E COLUMN IN CONVERSION BUFFER • •• x- • • > TO: NAME CODE - ................. ····04.· ......· X ............... RETURN TO :CALLlNG ROUTINE: - Ne RROCO El ••••• E2 ...... ••••• • • • 0 RECORD 0 • • • YE S : SET lAS'f WORD: >. COUNT ZERO •••••••••• X.COUIH NEGATIVE' *. ... ... ... .* ... ........ ......... .. .. ~ • NO .- E3 .i-. WROOO Eit. -._ • - • • NO.THIS -. ••• • -. _.COlUI'IN THE . 0 .SIXTH .. .. .. .. ..... ..c:• · •••• DISK - ••• YES •• liD BUFFER • - •••• •• CLEAR .-. .. ...... • NO • YES i x .. ••••• f 1* .......... . . READ A RECORD . ······Gl······D.... X PRINT THE RECORD i • ••••• FZ··ft •••••••• .WRITE DISK IIC • 2UFFER TO SCRA. -DOS- i ····Gz········· • RETURN TO XEC • : PROCESSOR : .... ........... i .·····F4.··.· ...··· . . -WRITE DISK 1/0 BUFFER TO SCRA - -·····G4.···.... ··X -CLEAR 01 SK 1/0 BUFFER • : x•••••••••• : x i: ....HIIt·······.· ........ *H l;t . . . . . . . . . . > • _ RETURN TO :CAlLlNG ROUTI/jE: • DECRE~ENT • .RECORD COUNT BY. • ONE • ............... · tt • • • • • • ;t • • • • • • • • • i ..... J 1 0 • • • • • • • • • RETURN TO > :CAlllI>lG ROUTINE: •••••• 0 •••••••• Flowchart SUP08. 200 Supervisor, Supervisor Control Record Analyzer ...... : ·..... A2 : : ····Al·· ... ·· .. : E~U~E Fr8~D~~RE: .. X AZ··· *. .. .. NO •• •••••• ............... .. • X .a. •• .... .... .... A3 .....- .. NEW PAGE A3 : ••• •• •• A4 a. •• • YES YES • ·009. ·009· • : 83 ••• X. X ..···.83· ......... . ···.·.82.··· .... ·.. • FETCH PR[NC[PAL. PRINT DEV[CE • SUBROUTINE • : X MM2···· X ······81·· .. ··· .. ·· . •. •• .... ....... * ••• .... . •• LOWER •• NO •• LOWER •• NO • • •• L[MIT LESS •••••••••• X •• L[MIT LESS •••••• X. E4 • •• THAN 2566.. •• THAN 4096.. •• • 'pR[NT HEAD[NG. YES • B4 ••• X. ···.··84··· ... ·· ... MM3 FETCH WORDS • 1286-2565 FROM C[B • • X • FETCH WOROS • 2566-4095 FROM CIB • • : •••••••••• X: x .. .•. .. .. .. .. .. .. .Cl YES •• ••• ••• x •• RETURN ADDRESS · • •• •• NO x x : •••• C2 ••••••••• : : •••• C3 ••••••••• : : •••• C4 ••••••••• : • • : • : • : CONVERT NEXT • • ADDRESS AND NEXT 16 WORDS : [NO[CATE NEXT. SECTION [S 3 : ................. ·.................. X ..!... . X ·····01·········· 02··· •• ................. -. ...... : [ND[CATE NEXT • SECTION IS 4 : ·.................. ..~... : A2 : .SET LIMITS FOR. •• *• • COMPLETE • .:. HEXADECIMAL ••••• •• ~~.:. I~R~O~~~ • •• EQUAL •• : DUMP : • ..... •• E: • ·009 • . YES ... x X ·.····EI······· ...· MM4 E2 •• •• TH[S •• X ·.... E4·········. .MAKE LOCATIONS • .ABOVE 4096 THE • • • BUFFER FOR DUMPING OF • • : . LnELU~E .:.!~~. •• L[NE •• *. A2 : •• : ••• ~2~~;;~~~ •••• a ••• • NO :X •••••••••• : : •••••••••• X: X ······Fl··········· X ...... f2···· .. ··... . · . ·.................. ..~... • : : X•••••••••• : X X ······GI··········· G2··· *. .- •• DUMP -. COMPLETE *. .•.x .. .. .. .. .. .. .... .... x.. H1 •• •• LOWER •• NO •• LIM[T LESS •••••• •• THAN 1286 •• • ..:... YES ·009· • : J 1 .... MMI : •• •• .... .. .. .. *. H2 • NO ...X •• BUFFER •• YES •• •••••••••• X.. .* .* •• RETURN ADDRESS .. •• NO • *. ... ... . . • •• •••••• A3 : : A2 : •• YES • - •••••• .• NO X ···.H3······.·· EXIT TO SEXIT • ...... ~;; ..~..- :.J~d;~H2~:..: DUMPED [NDICATE NEXT • SECTION [S 1 : : G3··· •• -. X • •••• F4.** •••• • •• • PRINT REGISTERS. ~ND INDICATORS. •• •••• H4.·· •••• • ••• • • RESTORE CORE • ••• X .LOAD FROM C[B. A2 : X X ······Jl··········· •* J2··· -. •• X .. .... .. •-. NEXT SECTION •• · •• •• •* • : •••• J4 ••••••• • • RETURN TO • CALLING LOAD : ............... : ••• 1 ••••• 009 J1 x : •••• K1 ••••••••• : : ~~~H~~EI~EP : ·.................. ··.....~.... • : ••• 2 ••••• 009 B3 : ••• 3 ••••• 009 B4 : ••• 4 ••••• 009 E4 A2 • Flowchart SUP09. Supervisor, System Core Dump Program Flowcharts 201 ..... ..... - --- -010•• A~. .... A1··*······ it ..... A2····.····· AS500 . -ENTER FROM CORE• I MAGE LOADER - - •••••••• n •••••• : • • • tt B1 : x ••••••••• : SET SDUMP TO ZER~6M~PCH • : .................. C1 .. .... •• *. .. .•.x -. .. .. .. DUMP -. fORMAT CODE .- * ••• - : ••• -1 •••• 010 A3 : ••• -2 •••• 010 Ait : ••• -3 •••• 010 A5 : •• • -It •••• 010 A5 : ••• -5 •••• 010 A2 - DUMMY UP DUP -CONTROL RECORD - IN SUPERVISOR : BUfFER ..... -. -010- A5- -010• AIt- • : • • • • • • • • • • • • • • fI • • X ·· ... A)···· ... ·.· AS100 it ·••· .• A4.·.· •.••••• AS200 :FETCH CARTRIOGE: : 10 FROM SLKNM : : -.................x x : •••• 8"' ••••••••• : CONVERT -CARTRIDGE 10 TO: EBCDIC : - : ................. SET SFLSH NON-ZERO .-................. X ·····C3··.· ..... · • DUMMY UP JOB -CONTROL RECORD • IN SUPERVISOR • BUFFER I NOI CATE THE APPROPRIATE MESSAGE : ................. . : •••• 83 ••••••••• : ................. AS300 X : •••• AS ••••• tt • • • : - X ····C4······.·. _ EXIT TO SEXIT IN SKELETON SUPERVI SOR - ............... X .. ··.·85··.·· . ·.··· -FETCH PRINCIPALPRINT DEVICE - SUBROUTl NI: - X : •••• C5 ••••••••• : • CONVERT NAME. INSERT IN • : MESSAGE _ ................. : •••••••••••••••••••••••• X: X : •••• 03 ••••••••• : SET SCTSW NON-ZERO ·.····05· ..X ·· ..... . : .................X ····E3····· ... ·. • EXIT $EXIT TO IN SKELETON ·.. ~~~~:n~2:... • - X : •••• ES ........... : - SET SNXEQ NON-ZERO - X ····FS.·.·····. • EXIT TO SEXIT I N SKELETON • - ••• ~~~~~~!~~~ •••• Flowchart SUPlO. Supervisor, Auxiliary Supervisor 202 .. ··...... • CMOOO • - ····Al·· .. ··.·· ENTER FROM SKELETON A4 •••• CM1l1 X ••••• ·A4 •• • •••••••• • • .. •• ~~~~:~!~~~ ..... X ······B1·· ......... .* -MOVE DISK READ. • ~OUTINE TO • : $HASH : ................. •• •• .* *. C1 x .*. *. *. * •• * .• NO •• •.• • *. .* *. 01 * •• * • El ...x • •• YES • •••••••• • .* ••••••••••••• NO X ··.··.B4······v.... .................. CM220 .LOOK UP NAME OF. • LI NK IN • LET/FLET C4 •• .... FETCH DUMP PROGRAM •• NAME IN •• LET/FLET •. ····es········· •• N O . •••••••••• X. EXIT TO SDUMP • . *.••• . * .• x. ••..••.•.•••••• • YES X 04 ••••• X -. •• .* .* .- • : ····02·······.· TRANSFER TO DUMP PROGRAM ............... *. .* •• NAME OF •• YES • •• A OATA FILE •••••••• • : •. *. * ••• YES • •• .... .. ... .. F 1 *. x. X ····EZ···· ... ·. .~ •• A4 :.!::~~:~~:~::..: .ENTER F ROM CORE. •• • .* ~.. E4 *. .* *..* * •• * NO CALL LINK *..* •• * • NO • FETCH MONITOR. •••••••••• X CONTROL RECORD •• • ANALYZER • YES • •• F4 ...x .. •• DCI -SET COR~ IMAGE. •••••••••••• x :kgt~~~ T~ I~~6 .. : •••••••••••••••••.. • •• * ...... F3···.· ..... . *. •• • •••• ES •••••••••• *. *..* X • •• 01 SKI •• YES •• ••• X •• IN RESIDENT •••••••••• X.. •• MONITOR •• •• .* .. .x *. • .e. *. F2 •• NO DSF OR DC I .. .. -... .*. *. Fl .•.x • *. * .... N~· • . ••••••••••••• .... •- • ••••• 83 ••••••••••• *. X • ••••• e2 ••••••••••• ANY _. •• COMMON •• YES •• BELOW •••••• •• 4096 •• .. ...... *. * •• * .•.x •• CALL *. ... NO LINK •- *. CALL DUMP 62 •• FORMAT •• YES .FETCH AUXILARY • COOE •••••••••• X SUPERVISOR • •• X.. ·.NEGATIVE •• tt. ._ DSF ......• .X: Hl : •• *. . : . BE~8=M2~96 . : . ~~ •• *. *. * •• * • .• .* YES ··...... x • Fl • ······GI··......... X X ······G2·.·· ...... . • SET CORE IMAGE. .LOADER SWITCH, • : SCLSW, TO 1 : ................. .. . : Hl :.X. ..X: Fl : . LDOOO X •••••• HI··· •••••••• • SAVE COMMON • co~~~~Ei~D L2~96 • • • ON THE CIS · .. .... X ······G4····.·· ..... • • FETCH CORE IMAGE LOADER • PHASE 2 X ....H2········· EXIT TO CORE LOAD BUILOER • • . ..•. :~~~~.2 ...... x •••• J 1 ••••••••• • • .. .... EXIT TO CORE I MAGE LOADER, ~~~~~.~ • • ...... Flowchart CIL01. Core Image Loader, Phase 1 Flowcharts 203 ****A I·••••••••• -ENTER FRO,.. CORE' • IMAGE LOADER, • ., **.*~~~;~.! ••••• .' . • *tl~ORE'... ..B2 •••• : •••• 63 ••••••••• : .' LOAD '. 1 .' 01 SKI *. YES • PREPARE TO • '. SIOITCH, •••••••••• X.. REQUESTED •••••••••• X. FETCH DI5K1 ••••• ,.. $Cl S k, ... •• •• ... .*.. *. • • • * .* • ••• * • NO 0 ••••••••••••••••• .. C3 ......·C1·······**·· X • Ft.: TCf< CORE r MAGE HEADER • TRAfl.5FER • -PARAMETERS FROM' • CORE I "AGE • 'hl AOER TO COMMA. • • • (10 • • • • • • • • • • • • • . -. *.-. .•.• .. ·.... :.................: NO ' . ' . X. ·.....02.......... '. .................... • ·. . ··Dl·········· · .. x :* ••• C3 ••••••••• : PREPARE TO • FETCH DISKl ..• •• C2··· •• *. .' DISKl ' . YES • '. REQUESTED •••••••••• X. • X * ••• 02 •••• X • • • • • ...... · . ...... 03........... • • • 03 ' . X. . .x ........... . 04.w. .. X PREPARE T O ' -FETCH REQUESTED.' FETCh DISKN ••••••••• X DISK 110 SUBR •••••••• X.. • * ............. *. •• CORE • LOAD SWITCH, *... ... . ' . '. $CLSW, • " • ••• U5 . . . . . . . . . . '. 1 •• .RETURN TO CORE. IMAGE LOADER • • PHASE 1 • .* ..•••••• X. •••••.••..•.••. 0 .. E4 •• X. ··.··El·.·····*·. X X .. .. .... ··.E4 •• • •••••••• • STURE ABS SCTR • • AUDRESSES OF • • * LOCAL SAND 'SUCALS, IF ANY,' 'IN C.I. HEADER • FE TCH CORE LOAD • • • • • • • • • • • • • • -ct • • . . ..... ·F4····.**... X F1 .. ..... " .. NU.. COI~E *. •••••• LOAD IN CIB . ' - E XIT TO CORE • LUAD • • " YF 5 :< • n. Gl ' • • 'PARlr OF •• • ' CURE LOAD ' . NO *. BEl.O" •••••••••••••••••••••••••••••••••• •• *. 40<)6 ... ... . .. ~ Hl ....i: . .. .' YE S .. H3 • •• • •••• H2*......... .. H3 H4 . *. ' • • -ALL Of *. • PREPARE T O . • .' '. •• CORE LCAD ' . NO • Ff.:TCH All O F . X .* NECESSARY'. YE:S .' DISKN *. YES '. BELOw . •••••••• : * ••• •• *. ................. .... •• .X:* X ZORRO REMOVE • • STATEMENT FROM * : STRING : .- *. .... E3 *. *. NAME IN •• YES • SYMBOL .* •••••• TABLE .- *. * •• * * .* NO *005* • : F3.-.X. 01 :* .... . PLACE X ·····f3 .... ···.·." ** PUT NAME IN SYMBOL TABLE : " : * ". SYMBOL ...... . ". TABLE •• *. * •• ·N~· •• !. ..• E3... .. : " .. .·····G5·.···..... PIECE X " ................... PUT NAME IN : SYMBOL TABLE .- " : " •• X: 04 : Flowchart FOROG. FOR TRAN Compiler, Phase 4 Flowcharts 249 PHAS : ...... Al •••••• " •• : • • INITIALIZE PHASE · .. :_,1(. : 81 •* Bl .".X •• *. •• END •• STATEMENT •'. *..* YES •••••••••• X B. .* ••••• • " .* *008. •• A~. • NO i MIX *. • •••• e2 •••••••••• *. .. .. •" •• YES • INITIALIZE TO " •• DIMENSION ........... X.SCAN DIMENSION. *. STATEMENT.* • STATEMENT • •* C1 .... *..* * ... * -....... -.. .......-.x. -.. - X 01 ••••••••• : • MOVE TO NEXT STATEMENT • - · Ot :.a... ...... .. .. ••••••••••••••••• • NO : • 02 -. X. •••• X SIP 02- *. ". 03 : X .* • •••• 03 •••••••••• .. .. *. •• STATEMENT •• YES • REMOVE • •• TERMINATOR •••••••••• X.STATEMENT fROM. •• •• • STRING • .. . .. . **.. . ... •• § •••••••••••••• ..• ................ ... ....... • NO •• X: 01 : • .X: 81 : X PADS E2·--· e • • _ ... LEGAL NAME *. *. *. tI. • .. * •• * • YES *. NO .* ..•• .* ..~... : G3 : X ZORRO f2··... PREV •••• .:. •• ~¢=~OlN *. TABLE * •• * ... SUB~ •••• f4 •••••••••• f3···.. ." *. • SPREAD SYMBOL : ·:.!~~ ..... X.:NA~~BS~OhEV::.~~ •••••• X: •• •• DIMENS. •• .. · .. .. NO .....x .. : G3 :.X. X ······G2··········.. ·................. .. . PlACE .. PUT NAME IN .. SYMBOL TABLE ER • • X ....• CONSTANTS ···H2·········· COLLECT • TO • ONt ·.................. • BINARY. PUT IN • • SYMBOL TABLE • X : •••• G3 ••••••••• : PUT S ~~~2~ ON ·.................. : : X •••• ·H3·· •••• •• .. • • REPLACE • :~~:~~~E~lo ~~ T~p: ................. : STRING : .. .. x: . 81 : NEX X : •••• J2 ••••••••• : • MOVE TO NEXT : ELEMENT • • ·.................. ." .. •• X: 02 : Flowchart FORO 7 • FORTRAN Compiler, Phase 5 250 ~~~h~s~8~ • INFORMATION • ..• •••••••••••••••• .. **.. .••.... .• YES, : 03 : · . BEGIN X •• • •• AI •• •• •• •• •• • • INITIALIZE PHASE • • . . * ••• ·...... : · .. • 81 *. x. •••• X DAP ••• Bl •• SOS .. .* ..·.82········· •• • * END *. •• YES -EXIT TO THE ROL. •• STATEMENT •••••••••• X. ROUTINE • *. • * . . * .* ••••••••••••••• .. * •• * •• B4 Cl ...x ". *. •• LAP *. *..* * •• * 01 ...x * •• * .* *. * •• * • .. *. ". • NO E1 X 02- *. *. *. -. * •• * ...... ·N~· •• •• *. .* •• ·.. ......... .. .. : •••• .. . .................. ....... X ..... fl.···.···.· • MOVE TO NEXT • STATEMENT lAR STRING CLQSe·" SW3A ON ". YES • PUT ERROR ON •••••••••• X. STRING ... X.. ................... ....... . • : ". .. F2 ".X • •••• X f2·-· * • •• * •• * *. *. * .... *. *. .- •• NO .* ...X *• •• •• ••• * ....... ··.... ..x.. .* ·· .... .~ •• .- .* ·..... x • NO : • Elt •• LAP5 E3 : X : •••• E4 ••••••••• : .SET APPROPRIATE. • INOICATORS IN .. : SYMBOL TABLE : ................. x F4 NAME *. • • .. 04 •• X: fl : e. LEGAL : Fl : X : •••• E3 ••••••••• : • NO •• •• •• NAME •• YES •• EQUAL FLOAT •••••• ::::: ..............: •• ~ ... .. ·.. .. .. Fl •• X. .* .. X *. a . . . . .- .... • NO · *. T1CKK 80B ••••• 03 •••••••••• *. •• e2··· •••• •• •* •• •• YES • •• EXTERNAL •••••••• ". STATEMENT." ...X • E3 • : E3 :_.. ...x •• • NO ..:·T~aI~~~~~ ·:.~~~ ••••• X:STAT~~~2¥EFROM .- .. •• NAME •• YES •• EQUAL IFIX •••••• 02 •• X. •••• e. •• INTEGER •• YES • •• STATEMENT •••••• X. *. C4 ·.. .. ". • •• •• .. .. ••••••••••••••••• :~ ... MLTN : •••• C2 ••••••••• : • I NITIALlZE TO .. •••••••••• X.SCAN STATEMENT .. .* X" .. .' NO •• • YES *. •• YE S STATEMENT .•.x •• NO .. • EXTERNAL •••••• X. E4 • •• STATEMENT.. •• • NO • * REAL •• Bit : ••• SI S •• • •••• F5 •••••••••• •••• .SET SW3A ON TO • •• NAME •• NO • INDICATE • •• DIMENSIONED •••••••••• X. STATEMENT • ". • • • • 0" X .TERMINATOR MUST. • FOLLOW • • • * •••••• ................. .. .. ....... • YES • YES .... •• X: 02 : • .X: 81 : X PLACQ : •••• G3 ••••••••• : e ZOR GZ· • .* e. •• NAME IN •• NO • PLACE NAME IN • •• SYMBOL •••••••••• X. SYMBOL TA'BLE •• TABLE •• • **. .** •• .. .. ••••••••••••••••• • YES o. H2 ••• •• .0 •• COMMON OR •• NO • • •• PREVIOUSLY •••••• X. B4 • •• OIMEN'D •• •• *. . ... :··.. ·g~LLeCT····: :.BINARY. c02~~~~HO~0 : PUT IN • ................. • SYMBOL TABLE • .~ X FUN X SUBQ . .. ........ * .... • YES : .... Bit : X YELP : •••• H4 ••••••••• : • MOVE STRING • .POINTER TO NEXT • : elEMENT : ................. •• X: E3 : .. •* *. *. J4 •• ...X •• -. COMMA * ••• .* •• YES • •••••••• .- • NO x : •••• K4 ••••••••• : • MOVE STRING • • POINTER TO NEXT. elEMENT : : ................. · ..... .. .. x: F2 : Flowchart FOR08. FORTRAN Compiler, Phase 5 Flowcharts 251 START : •••• Al ••••••••• : INITIALIZE PHASE • .................... . .. Bl :. x. : CAP B1 ...X •• ... GUT •• .* • * *. END •• YES • STATEMENT •••••••••• X. *..* * •• * .. NO .* • 82········· • • ••• EXIT TO ROL ROUTINE -..... X Cl···.. : Z3..C2···.. X • •* .. .... .. ••••••••••••••• *. C3 : * ••• C2 .* X • •••• e3 .......... . *. .. .. ••• Y E S . . •• NO • MOVE TO NEXT. • •• AR I THMET IC •••••••••• X.. OPERATOR •••••••••• X. ELEMENT ••••• x- CZ ".STATEMENT.X -. .• •• • a •• * • NO •* 01 • YES .t •• *. a •• * X :RC .* e. •• 02 ••• •• CLSUP • •••• 03 •••••••••• *. .. .. .. .. .:·T~~~n:~~~ ·:.:~~ ••••• X: HP~~~En~~~G •" If •• YES • -. STATEMENT •••••• X. *. ................... **. ..... *..* *. .* .. NO *. * • • ·N~· .* : •••• :••••.••••••••••• : .! .. - : ... X 0" • * •• E1 •• EZ··· - • ... *• •*. NO .. .. DECIMAL •••••• X. C3 .. *. .* ... *. .* ... * *. CALL •• YES • STATEMENT X. •• 0 ••••• *. *. a • • _ .- .* • - NO •* f1 .!. •• *. * •• * .- .- YES X :zz e. •" READ •• YES • •• STATEMENT •••••• X. *. F2- J8R * .. e. .- *• : •••• F3 ••••••••• : •• LEGAL •• NO .. REPLACE •• CONSTANT ••••••••.•• X.STATEMENT WITH ••••• •••• •••• : ERROR MESSAGE : - •• * .................. • YES • NO . . X •••• : .* G1 .-.x :zn : •••• G2 . .X. . . . . . . . : •• e. •• IjRITE •• YES • •• STATEMENT •••••• X. *. *. a •• * .- .• X *. STH~~ENT ·:.:~~.X: *. a • • _ .- •* J1 NO .-.X •• ..* : : X .PUT CONSTANT IN. : SYMBOL TABLE : ·.................. X ·····J2··q.······· :RCZZ e• DATA •• YES • •" -. STATEMENT •••••••• *. a. BINARY : •••• H2 . . . . . . . . . . : *• s co~~H~P TO :RC21 Hl·-· *. •• : ................. : • NO • :" ._ .- • PUT CONSTANT • OPERATOR, • SYMBOL TABLE • ADORESS ON • • • • :.... ~!:!~: .....: * ••• • NO MOVE j( : •••• Kl ••••••••• : ................... - MOVE TO NEXT : STATEMENT • : .. . •• X: Bl : eat • • X NUMM : •••• K2 . . . . . . . . . .: .PACK STATEMENT. : If" NECESSARY : · . • • • • • • • • • tt • • • • • • • ..~... : C3 : Flowchart FOR09. FORTRAN Compiler, Phase 6 252 81 : X .... B1 : PHST : •••• Al ••••••••• : " INITIALIZE PHASE ................." " ·.. ......... " B1 ".X. CKI X : •••• B1 ••••••••• : ·.................. • INITIALIZE TO • • SCAN STATEMENT • X ••• DF1 ••• DF5 •• C 1 ... *. • .. C 3 ... ... : •••• C4 ••••••••• : ." DEFINE i t . YES •• SORF •• YES .CHECK FOR VALID. *. FILE •••••••••••••••••••••••••••••••••••• X.. ZERO •••••••••• X. NAMES AND .. •• STATEMENT.. •• •• • CONSTANTS • *. * •• * * .... * •• * . . *••••••••••••••••• .* • NO • NO X 01·"· ER72 CE1"" ••• D2 •• " ••••••• .* .. *..* * •• * .. .. ••••••••••••••••• • NO X •" ... El-·-.. CALL *. Cll ••••• E2 •••••••••• •• YES .. * • •• sT~l~~ENT •••••••••••• X:" *..* * •• * CHECK SYNTAX .. • .* •• *. F1 X AND MODify: •••• .. .. ••••••••••••••••• .*.x * • . *.••• .* XR2R X : •••• 04 ••••••••• : :s~~~~~I~A Hb~s " : " . ................. : ."................" X : •••• E4 ••••••••• : • ADD FILE • .INFORMATION TO • : SYMBOL TABLE : ................. X ED1 *. •• •• F2··· •• •••• END •• YES .EXIT TO THE ROl. STATEMENT ." •••••••• X. ROUTINE • .* • PUT ERROR ON : STRING DF3 • " NO •* X : •••• 03 ••••••••• : .. •• CAll •• YES .MOOIFY TO MATCH. •••• sT~H~ENT •••••••••••• X: CAll EXIT : •••• .. •.•....•..•..•• .. • NO .................... ••••• F4 •• • •• •• •• • "" : " UPDATE OFCNT : •• X••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• X X • IDSVl X : •••• G1 ••••••••• : • MOVE TO NEXT : STATEMENT • : ·................. . " ." • .X: 81 : Flowchart FORlO. FORTRAN Compiler, Phase 7 Flowcharts 253 . . : · . ·................... ·· .. .. ORGIN • ... ··Al .. ••••••••• INITIALIZE PHASE •* • NO • 83 -.X. • . •••• 1 OX CV5A .- • INITIAlIlE TO • • SCAN BODY Of • : STATEMENT : ................. .• ... · .. :.11-... 81 ••••••••• : .t *. •• *. * •• * ." 1O.x. •••• X Cl ...x •• INTERNAL •• YES. • •• STATEMENT •••••• X. G2 • 1O. NUMBER .1O 1O1O • !Ii CVl A3 A3 : ·· .. *. ••• •• CV5B *. •• *..••• * .* X • •••• e2 ••••••• • •• ._ C3 *. ••• · . .* Ei •• •• •• .. ••••••••••••••• .. •• *. LEGAL NAME *. a • • _ .- .* CV2 X · * . ···.··f3··.·······.. ·................. . .:.. .... X CV17 · : X GI···.. " G3 : ••• •••• • CV25A G2···... CV1~ •••• G3.~ •••••••• ..... •• LEGAL •• • • •• 00 •• YES •• STATEMENT •• NO .. PUT ERROR ON • •• STATEMENT •·••••••••• X.. NUMBER IN •••••••••• X. STRING • •• .1O •• SYMBOL •• • *. TABLE.· • • w. •• w. •• • •••••••••••••••• • NO • YES X YYlQ X : ••••H2 ••••••••• : Hi •• •• READ •• f to: .WR~~E ~(JT~' . : . ~~ •• ·.STATEMENT.1O a. •• ••• o;es * : ..x ~. A3 : • PUT SYMBOL • • TABLE ADDRESS" : ON STRING : . .. .·............... ....... . · .. ·.. .~.. : • 83 : • J2 •• X. tV7 •••• X : •••• J2 ••••••••• : .. .. MOVE STRING POINTER • - . •• * •• X. Hl • Flowchart FORl1. FORTRAN Compiler, Phase 8 254 . .. ..~.. .. .... : C2 : X F4 .". CViO •• • •••• FS •••• II • • • • • ..... LEGAL •••• NO •• 1O.d~n~~~ ••••••• : •...... ~~: : ..·..G4···.···.·· COOT X .................. :COllEC T INTEGER: • CONSTANT : JDC .: ................. ·: X ••••• H4 •• •• •••••• : ~A~~T~~l~~ SYMBOL TABLE : : Op~~~¥~:T TO : : .. . •• X: J2 : G3 : • FOR~~~~T~~BLE :X ••• •• !.". :... 1O •••• **.~ .. * .... : :• HI :* *... .. Hl •• X. •••• CV22 .. FINO OR PUT • -NAME IN SYMBOL ••••• * TABLE .. ·..... : X •••• •• X: J2 : .. F4 •••• : G2 : CV5 .. . • : C2 : C4 : . -·...... ...·,t * G3 : .. .. ..... • • • • (Jo • • • • • • • • • • • • CV3 .REMOVE CONS T ANT. OPERATOR : : ic : ••• ~~~S!!.~.* •• : i ...... .. • •• **FI ... •••••••• • SET SWITCHES • :R~~~' IS A ~~I9~ * •• * • YI:S X • .CLOSE UP STRING. : IF NECESSARY : .1O • • • • ·····E3··.······· •• •j9~H~~~T.1O ••••• : : NO • .. .ADJUST SHAPE OF1O • NAME If • REQU IRE~ IN • • • • STATEM NT •• YES .. NO X * •• NO X CV13 *. * •• *.* *. *. ···.·05···.·· ..... . ................ ..... ·.···Olt····.····· ·................... ·..... .~.. CV50 e. • YES •• *• CONSTANT •••••• ..OPERATOR .1O a. ...... .. : •• 1O. C5 • f4 • END *. _. YES .EXiTDiii·T~E·Riil. STATEMENT •••••••••• X. ROUTINE .tI. .- .- X .. YES X j( x .1O. CV6 D3 .-. e. * •• ., -NO .*..* •• - •• e. *. *. ..... •• *. * . . * .* •• • YES •• X: 81 : •• •• 1O. NO VARIABLE •••••• •• NAME •• x .1O.. ••• •• •• .. . 01 B4 X CVii ··o~H~~ YES : 1'10 E TO NEXT : •• FILE, CALL •••••••••• X. ~TATEMENT • LINK,. FORMAT. • • OR .~R~ .STMI : ................: • NO .1O • .* YES •• STATEMENT •• NO •••••••••• X•• TERMINATOR •••••••••••••••••••• • NO • C2 • •.•. B3 •• •• OPERATOR • to " •• X: J2 : ·· .. • A4 • • • INITIALIZE PHASE ••• A4 •• •• NAME •• •• ANO •• NO •• CONSTANT •••••• •• COMPAT- •• • .. !~~~y;; ·· .. .. • Bl •• X. •••• X FINDD ••• EXIT EXlTl •• 81 *. *. ; •••• 82 ••••••••• : •••• 83 ••••••••• •• END •• YES .. COMPRESS. .EXIT TO THE ROL. •••• STATEHENT •••••••••••• X: SHn~~NT : •••••••• X: ROUTINE : *..* .. * •• * .* .~. *. .. · . *. .. **. .* •• .* .. : •••• B4 ••••••••• : • BUILD SYMBOL • .TABLE POINTER . . . :SET DEFINED BIT: ................. : •••• C4 ••••••••• : .. .PUT POINTER IN • : WORK AREA • • • ·.......-......... .. ....... • YES ·........ .. x: .. 01 *. x. 81 : X · . ·.................. 04 •• •• •• NO •• SUBSCRIPT •••••• :LOCATE CONSTANT: • YES X •• EI ...x .. .. .. .. .- .. * ••• : •••• 01 ••••••••• : NEXTC · . X NXTN8 X e2 •••••••••• .. .. ••••••••••••••••• * .... . · .. FINDC .. ~ ... • K2 • • C2 •••• NEX;····.. i • •••• •• DATA •• NO • MOVE TO NEXT •• STATEMENT •••••••••• X. STATEMENT *. ••••••••••••••• ••••••••••••••••• • NO C1 X NXTN4 BEGIN : •••• A1.,. ••••••• : : •••• E4 ••••••••• : •••• : •••• E2 ••••••••• : •• •• YES • SAVE • •• DUPLICATION •••••••••• X. DUPLICATION • •• FACTOR •• • FACTOR • *..* * •• * X NXTN2 ••• • BUILD • • SUBSCRIPT. PUT • : IN WORK AREA : ................. .. .. ••••••••••••••••• • NO :X •••••••••• : x X NXTN •••• : •••• FS ••••••••• : •• •• NO • DECREMENT • •• CONSTANT •••••••••• X. DUPLICATION • •• EXHAUSTED.. • FACTOR " · . ·................. ·.................. X NXTN9 : •••• F2 ••••••••• : •• •• ·Fl· •• ••• •• •• :SET DUPLICATION: : FACTOR TO 1 : ••• ... f4 :LOCATE CONSTANT: ..... .. .. • :X •••••••••••••••••••••••• : BLPH X : •••• Gl ••••••••• : SLSH2 :Py~ ~~~~E~R~~RD: ... G4 ... .................. .....x . YES .•.x •• .. : J2 : • : . ENC~b~~~RED . : . ~~ •• ·.................. *w *. •• we •• •• • YES x ·........" • 01 • X .PUT CONSTANT IN. : WORK AREA • .•. : X Jl •• H4 •• •• NAMES " • •" AND •• NO •• CONSTANTS •••••• •• e.BALANCE._ •• ...... ·................. •• .".x SLSH : •••• Hl ••••••••• : GCON a. .... X *..* * •• * LOCATE NEXT NAME •• •••• .". .MOVE WORK AREA • STRING AREA: ·.:TO................. .. ................. . ERR •••• X : •••• K2 ••••••••• : NXTD : •••• K3 ••••••••• : •• ········X· .... . . . . . .•••••••••••••••••.. •.• ·;ES ..:...••••••••••••••••• ....... NAME IN Sl~REk .:.. " " ". NO • X: : PUT ERROR ON STRING " K2 : : •••• JIt ••••••••• : ~X •••••••••••••••••••••••• : •• Kl x ·.... X SLSHI • .. • NO NXTN3 YES : : •••• J2 ••••••••• : e• •• PREVIOUS •• YES • *. NAME •••••••••• X. •• EXHAUSTED.· • wa • J2 : • • : •••••••• X: K2 : COMPRESS SHn~~NT •• K4 ••• •••• CONTS : •••• Ktj ••••••••• : • YES ." STATEMENT ". NO • REINITIALlIE :X ............ !ERMINATOR •••••••••••• X: ~~:T~~~~T ..X: C2 : .... *.... .. .•......•...•...... ." ..... •• X: 01 : : A4 : Flowchart FOR12. FORTRAN Compiler, Phase 9 Flowcharts 255 . START Al·········· .......INITIALIZE ·.... PHASE • • • • • • • • • • • • it • • • • - . -. -..-. Bl - .. X. •••• X Bl .it • , •• .-.... w. ··.·B2········· END •• YES .EXIT TO THE ROL • STATEMENT •••••••••• XROUTINE • w..it I' • • .* • * ••••••••••••••• • - - • NO : C3 : X CBEl Cl···.. .- DECEM *. BAKER CZ··· •• X : •••• C3 ••••••••• : . * -. * . .* . •. e FORMAT •• Y E S . . •• NO e PUT ERROR ON •• _. STATEMENT ••• e •••••••• X•••• S~M~~~NT •••••••••••• X: STR ING e...it * •• * it • • • NO • : .••••••••••••••••• .. - • YES •• X: 81 : · X . ............. ... .. . NOVEM •• * •• 01·········· • MOVE TO NEXT : STATEMENT e : ,. e • INOIC X : •••• 02 •• ~ •••••• : • INITIALIZE TO • :SCAN STATEMENT : ·.................... ·· .. .. .. • EZ •• X• •• X: 81 : •••• X EZ ••••• •• ENO OF •• YES e. STATEMENl •••••• *. •• e. _. N~ ~ .- _.!. __ : x .... 81 : : •••• f2 ••••••••• : -SCAN FOR VALID • • FORMA T TYPE A"O: SYNTAX : ................. ic TST •* G2 ••• •• * ••• w. •• SYNTAX •• NO • • •• AND TYPE •••••• X. C3 -. VALID.. •• *. * ••• .- - YES HANl X : •••• H2 .......... : -PUT OUT FORMAT • :SPECIFICATIONS : -.................. x : •••• J2 ••••••••• : .................. .. . - MOVE TO NEXT • STATEMENT • : •• X: E2 : Flowchart FOR13. FORTRAN Compiler, Phase 10 256 ...... : -..... Al·········.- START - INITIALIZE PHASE ABEll A3 : X : •••• A3 ••••••••• : e GET DIMENSION. : PARAMETERS : - .-................. ..................- - -. - -..-. .. 81 •• X. •••• •e. *. X CK6 -. *. .. ••• 82 •• •• •• • •• END -. YES eEXIT TO THE ROLe STATEMENT •••••••••• X. ROUTINE • .• Bl *..* .* .. * .•* ••••••••••••••• X : •••• 03 ••••••••• : • : CALCULATE 0 VALUES • : ·.................- .. • NO e • • C2 •••• •e •• •* *. C1 X .-. .. ...... *. • X • •••• e2 •••••••••• *. .. .. ERROR -. YES • MOVE TO THE • STATEMENT •••••••••• X.NEXT STATEMENT. .* X.. .. *..* .. * •• * .. ••••••••••••••••• • NO ....... •• X: 61 : X ... 01'·' •• *. .... ••••••••••• X: :L : •••• 03 ••••••••• x : •• FORMAT •• YES • •• STATEMENT •••••• X. * •• * • MOVE TO NEXT • ELEMENT .. . • NO .• El ...x • • •• X: Hi : •• *. •• e. YES • •• CONTINUE •••••• X. ·.STATEMENT.· *. * .... .* • NO ...x Fl·• •• flO, e• •• DEFINE •• YES e. ~~ ~~h~~E2~!!'."" *. * •• * .* • X: • NO x : •••• Gl ••••••••• : .. ·................. · .. • INITIALIZE TO • -SCAN STAH'MENT • it';t." : :.x~ Hl TESTi~·· •- ••• HI·• *• •• STATEMENT -. YES • •• TERMINATOR •••••••• *. *. * •• * .* .* • NO • _ Jl ...x •• e • •• DIMENSION •• NO • *. LEVEL 1. 2, ................................... . •• OR 3 *. * •• * .* •• • YES X ABEL ••• Kl *. • •••• K2 •••••••••• *. e. YE S ..e ..• • _,• * REPLACE -. STATEMENT •••••••••• X.STATEMENT WITH e •• FUNCTION •• _ERROR STATEMENT. *..* * •• * • NO -.~... : .. .. ••••••••••••••••• .... . - •• Xe C2 .. e • A3 : Flowchart FOR14. FORTRAN Compiler, Phase 11 Flowcharts 257 SURT : ..... A1 ••••••••• : • INITIALIZE PHASE • ................. .. e * •• Bl w. X. w • .... e w • ,,1 •• *. Bl *. • ••• ·84.· •••••••• • ••• B2 ••••••••• .* .....* * •• * • .. .PUT IF OPERATOR* : ON STRING : ••••••••••••••• .. · . NO • X XY5 C1 ••• •••• * : .. X • •••• e2 ••••• • ••• • • MODIFY • ·:.~~~ ••••• x:Ex~~H~~~~I~OR .. : . ARITHMETIC •• STATEMENT.. w. .." C4 .•.x •• .. •• LEFT •• YES •• PARENTHESI!' •••••• : • .. • SCAN PROCE SS .. * •• * • * C2 •••• .. ...... ARITH *. X · . ................. OVERF W• 84 : .... •••• END w. YES .EXIT TO THE ROL. STATEMENT •••••••••• X. ROUTINE * w. • : •X • w. *. ••••••••••••••••• *. * •• *.* .. NO NO .- ...... : .. X: E3 : XY23 .- .01 •w •• a. ...x x •• -. IF w. YES S rATEMENT •••••• ... ". .....x . .* * •• * • ...x a •• * • XY28 o. •• f'l •• XVl3 *. •• .* NO *..* • .. * •• 11 NO · . : Gl : a • .. Eit * ..... .. ...... X : •••• E3 ••••••••• : ••••• E2 .. ••••••••• :CHECK STATEMENT: • NUMBER 1I ST FOR. : VALIDITY : Eit : .... X •••••• a NO X LIST • • PUT ERROR ON STRING • • .•• •• ....... *. E4 •• LEGAL NAME a. *. * • •• w.y;; .- NO •••••• •• VALID e. _. w.._ * w.._ * X ....•CZ·········· : . .............. · ..... .. MOVE TO NEXT STATEMENT ..~.... w• • .. YES ·....f4·········· • : • INDICATE • .SUBPROGRAM NAME. .1 N SYMBOL TABLE" : ENTRY : ................. X XY30 : •••• G4 ••••••••• : PUT STATEMENT * FUNCTION " " OPERATOR ON STRING. COUNT .. • " " PUT CAll OPERATOR ON STRING • .X: 81 : X XY29 • <1. •• •• •* *. ". LESS THAN 15 e. *. a . . . . .•• .* •• NO •• .* •••• * YE~ ••• • • " ."................" : ••• ~~~~~~~!~ ••• : H2 E3 • EJ : X " • • • .a•• ··.... .. • X w. : •••• G1••••••••• : .....X • • E3 • .. • X: C2 : •••••• Flowchart FOR1S. FORTRAN Compiler, Phase 12 2S8 .•.X •• X: Gl : .... X: G1 : ·: Gl ::_X. ". .~ *• : E3 :.X: a •• " NO .. .w. " • *..* * ... " *. YES •• STATEMENT •• NO <10 STATEMENT •••••••••• X.. FUNCTION •••••• •• FUNCTION .* •• NAME ." • • 03 .. : C2 : YES •• STATEMENT a. YES •• a!HIY~~~~~ ••• a •••••••• X·. a!ERM INATOR. a ...... : . ..:... ................ ....... .* : .•.x .. *. B4 : •• e. • _ El •• CAll e. YES ". a. S"fATEMENT ._ •••••• *n 02 NO : XY25 .•• X •••• H4 ...X " • e. 0" TERMINATOR STATEMENT ". NO •••••• *. e. .* .- "0 * •• - ·....x . " YE~" •• .." • • E3 • .. .. X: Gl : . • . . : XY6 START ·.··.Al······.. ··· .* A3 ••• *. X • •••• A4 •••••••••• .. .. *. •• 10CS •• NO • PUT ERROR ON ••• X •• INDICATORS •••••••••• X. STRING : INITIALIZE TO : • SCAN STATEMENT. : STRING : *. .................. ·....... *..* * •• * • .* X.. Bl :XY6A •• 82········· .- *. •• YES • ••• TO THE ROL. •• • END .EXIt -. STATEMENT •••••••••• XROUTINE • *. *..* .* .. * •• * ••••••••••••••• B3 .•• •• *. Cl ...X •• .. *. *. :PUT *. * •• * .- .• 01 ...X •• a. * •• * • .- El ...x *. * •• * • .* ••• •• Fl *. .- .- E3 *. -. • XY27 *. *. : •••• F2 ••••••••• : .. • Gl •• X. ................. .. :X •••••••••• : • X .- YES .CHECK LIST FOR. .VALID VARIABLE. : NAMES : .x •••••••••...•••.••••••••• : •••• G1 ••••••••• : *. : •••• F3 ••••••••• : ••••••••••••••••• · .. •• X XYl4A • NO XY15 ._ G3 x .-. •• *. •• RANGE •• OPERATOR .................. MOVE TO NEXT STATEMENT ...X YES * •• * NO *..* * •• * • • •• . : . VA~I~¥LE .:.~~ •• •• FOLLOWS •• •• GOTO •• YES .CHECK STATEMENTe •• STATEMENT •••••••••• X.NUMBER LIST FOR. •• •• • VALIDITY • .. ...... .•.X * •• * X XY24 03 • .* • : ..READ/WRITE •• NO • •• STATEMENT •••••••• •• NUMBER •• ·.VALID.- •• FIND •• YES • •• STATEMENT •••••••••••••••••••••••••••••••••• *. X NO •• .- PUT OUT I/O OPERATOR .- *. • .. .- YES ·.................. •• •• WRITE •• YES • -. STATEMENT •••••••••••••••••••••••••••••••• X. *. *. : •••• C3 ••••••••• : • : • NO XY~ •• * •• * • READ •• YES • STATEMENT •••••••••••••••••••••••••••••••• X. *. .!. •• LEFT •• NO • •• PARENTHESIS •••••• X. • NO XY3 .. ....... YES •• X: Gl : X ••• • • .. .. ••••••••••••••••• : 81 :.X. XY2 A4 : • : *. · ..... .. *..* .* .* *. •• X: 81 : XY16 .-. •• e. *..* ... .. . * •• * a •• * • G4 •• NO •• STATEMENT •• NO • • •••••••••• X•• TERMINATOR •••••• X. A4 • YES • .. - ••• .. YE~ ••• •• X: Gl : ... X H3 •• •* e• •• NON-DIMEN • • • NO • • •• INTEGER •••••• x. A4 • ·.VARIABLE •• •• e. .e * ••• • PUT YES X : •••• J3 ••••••••• : • : PUT OUT DOA OPERATOR • : ·.................. XY21 X • •••• K3· •••••• * •• • • REARRANGE • IMPLIED DO • :STATE~~~~S FOR: ................. ....... •• X: Gl : Flowchart FOR16. FORTRAN Compiler, Phase 13 Flowcharts 259 "... • . ................. ·••....*... : *- : JAY .-SUBSCRIPTS -. NO *. 0, 1, 2, .- •••• '. 3 C2 .. *. •• STArEM~NT •• NO •• TERMINATOR ." •••• ....x .. H2 • X • NO ... X : •••• 1-5 ••••••••• : G4' •• * .... .. ··.... . .....x YeS : cz: ••••• f4 •••••••••• X DO OPERATOR ·· .. • NO PURGE BOUNO VARIABLES .. •• .* . * ..... • G2 •• X. .. ...... *.** • ... it. ... * ••• .. . . . x••••••••••• *. HI '. •• BOUND •• •• VARIABLE *. YE::; •• TABLE •••••• •• EMPTY •• •• •• ·....... · . (--4- .• *. NO ". REFERENCI'D ." •••• ..STATEMEII/T •• ••••••• *.* •• * •••• .* G2- *. *. E5 • ••• E5 MOVE SHING " • *POINTER TO END. : O~ SUBSCRIPT : ...x. ... " : F4 :.X • *. .* * •• * * NO .. TESTl ••• •• f4* ••••• * ••• ...... * ••••••••••• . .. " .. E5 * ••• "• ..... X "* .···.F2····....·· J4 • • " ••••• .. ••••••••••••••••• X • PUT ASSOCIATED' • VARIABLES IN • • KOUND VAR IABL E • TAlllE : • *.*. X .. PURGE I NOEX .FRUM ~UBSCRIPT EXPRESS !UN : TABlI: * NO •••••• f-4· ·· .. ·05··.·.····. PURG C2 : J4 : " x *. .... • " * ••• • 05 ................. •• FILE . ....... x. . ....... ·.... • TES T2 ••• • REMOVt: " "EXPR[SSION fROM" •••• : STATEMENT : OPtN X •••• ·04*.* ••• ***" PUT SUBSC * " GENERATED " • TEMPORARY UN .. : STRING : . ' . ';I:S snn *. YES HAVE NUMBER • * •••• *. .. x:* • : •••• C5 ••••••••• : .. . *............... .....x ·........' .. . J4 : • * DEFINE * • *. *. . X •• E2 •• •• ' . YES • NO *. .................. X . TAG NAME X * •• * G I'" .CLEAR SUBSCRIPT. EXPRESSION • : TABLE •••• : FI x :** •• 03 ••••••••• : " INITIALIZE TO • :SCAN STATEMENT: X TS T5A .. ..~... : X .. NO DO x : •••• 02 ••••••••• : . • * CALLING *. •• *. *. ...... X * • ••• YES ••• " •••• *..* .. . . * • NO ... • YES AVAR EXIT *. ... J4 • E 1·-· *. ...... *. TAG NAMt: .·.··C4............ 1:3 .... ·.................. _x ".. " X *. *. •• ··STMT IF *. NO •••• •••• 8~l~kl~~w •••••••••••• X.... J4 • •• YES •••••• • f'.l0 •• •• C2 •••• •••• X x PUT I N . SUBSCRIPT • EXPRESS ION • TABLE : ................. ••••••••••••••• .. C2 *. • NO ... • • : X TST5 ••••• B4 •••••••••• ·· ." . .' . " NO ·•• •• ·135.·.••••••.." .................. · " X OUT *. ... •• ·.82 ••••••••• •• END ". YES "EXIT TO ROl " •• STATEMENT .* ...••••• X. ROUTINES " ... : A4 *. *.... " .. " * A4 • SUBSC *. YI:S ' . EXPRESSION •••••••••••••••••••• -.IN TABLE .- INITIALIZE PHASE : • X .. **** • .. F4 .. · X G2 : . • ..... ~f4.** ••••••• • CLOSE UP • STh.TEMEf'.lT IF : NECf.S~MY • • ••••• ** •• ** ••••• ·.. ......... • •• * • J4 *.X. TS T4 X : •••• J2.** •••••• : " • · G~T SUBSCR I PT * EXPRESS I ON • .... .. .. X .. A4 . X • •••• J4 ••• *** ..... " .. MuVE TO NEXT : STATEMENT • .. ................. ·.. x:.. .. .. • • •'iIf\ 61' : * Flowchart FOR18. FORTRAN Compiler, Phase 15 Flowcharts 261 CO~ · . ·..................... ...... *nAI·*· .. ··~**· • INITIALIZe • PHA SE · SCANI . .. •••• A2 •••••••••• 'INITlALlZE FOR • ••• X:SCAN STATEMENT: ·.. ................... ..... - -. ..... - B3 - - 81 -.X. SEf:P···* .~. B1 '. .- ARITH *. -. YE:S • • * ASF CALL -. GOTO IF R/W ........ . -. ST,..TS .tt. .' .* • PERFORM ALL - FUNCTIONS OF * INTERPRETER PACKAGE: :x ••....••.•.••...••.••.• •: . *. CKN,.. END .. ..•••••••• STATE~ENT * .• - * • : ................. . ... - .-NO Cl ... X ..... S3········ . •· PLACE -RESET GENERAHll' • TEMPORARIES : • .. x *. x : •••• 92 ••••••••• : ' . 1'<0 •* *. ... C2 .x-. *• NOR~l *. NO LESS THAN 4 .- •••••••••••••••••• *. .- .• * .... YES - YES :X ••••••••••••••••••••••••••••••••••••• X • * ···.al········· X I T TO lWL J: '~OUTINE : PTPUL X ••• ·.02 .. •••• •• ••• •* CALCULATE •* *STAHMEIljT NORM * * x NAME 03 .'. * *. *. ... - AOV *. FllRCf * IF I' 4MY * • STRING TILL • *. STATEME"H •••••••••• X. VARIABLE TO ••••••••• X' NEXT ••••••••• '.FUNCTION . ' • OUTPUT STRING' • NON-PROCESSED * *..* .. .... OPERATOR.. *. -I • • * •••••••• • NO *........ .'END OF " • • < STATEMENT ' . YES TERMINATOR •••••• X'. ................. '. **.. ....- .' • NO it .... · . •• it Fl···.. •* •' <. <. READ, ~RITE, *. FIND ••• * E2- *. 01< .. 'It ... YES o. .0 •••••••••• X.. .' '. • NO n x • • •••• [ ] •••••••••• .. NO' UNIT •••••••••• X. OUTPUT ERROR INTEGER .< • 1/0 ** .... . ." . ~ YES :X ••••••••• ,', •••••••••• ,. : Fl *. :·CAt~!T~R If·:.;~~.X: ... '.STATEMENf.' .... * ... " o -... .' • • *. < .. • X: Cl : x • <. '. *. * .... • STATEM~NT *. .< IF '. OPERATOR 0 . P2Gl3 ••••• G 1 ............ . ..'MOVE • P3011 *. .• NO X • MOVE ope RA lOR < • AND NAMfS TO < : OUTPUT HRING : *** .... *.* ... ***.** ................. x . x .. **** • o. •• •' '. Hl <. *.. • ..... WAS *. "lO ~ .. LAST STMT •••••• X" (1 • 5 TMT . ' * < . .. <. END *. * ... * .. YES X .. .. ••• *J 1* ......... . EXIT TO ROL .. ROUTINE : ................. Flowchart FOR21. FORTRAN Compiler, Phase 18 264 .. D3 • .. < .... • •••• f5 ........... . .. .. ' . yES T . ' • .. • A3 • x X .····ES····*····* •• H3 • OECR •• NO SPACE eTR, •••••• •• CTR=O .' x .... • NO * * F3 : ••• AZ 145 ..... • * .•.it ::~*:. RE~~A~SE • EXIT TO CALLER. •• CHARAC TER •• YES •• COUNT .* •••• •• .GT.1 •* - 104 ·................ ....x .. .. ..... .- .. . ·..... .... • : F I 61 X : •••• f 1••••••••• : .* .. x H4 • *. •• .. . YES. .. .. H5 .. .x •• .. .... NO.. IDLE .* EMITTER '. *. INTERRUPT •••••• • ••• *. COUNT ZERU *. *. * ••• • :.•........ x: • .. •• NO *... - •• YES X ······J3··········· X ..···"J5*··.···.··· • STOP CARRIAGE. STOP PR INTER • YES • A4 • : X •••••••••••• : x .. •••• KZ •••••••••• :EXIT TO CALLER: ........... -... x :..... K3 ••••• * ••• : AZ195 •••• K4.!....... X :.* .. K5 .•..•.••• : • SET INTERRUPT. * • • SET INTI:RRUPT • ••••••••• X.RETURN TO ILSOI.X ••••••••• SWITCH TO IDLE • • SWITCH TO :CHANNEL 1 FOUND: • * •••••• * . . . . . . . . :SCANS COMPLETE: Flowchart Fl006. System Library, PRNTZ Flowcharts 299 .... • o PAPll ··· . AI········· •••••• A2· . . . . . . . . . .. * * -ENTRY VIA LIBF * PAPTI ·....... ....... ..... • • • X BI200 * •••• YES •• " A2.. • ••••• tl2 •••• ... •* 8I220 BI'*' WRITE FUNCTION * .... .. •• ••• A3 •••••• • ••• * • ••• X* • START READER •• X A4 ." *. ••••• • .. "• * ••• .. B3 .. X ............ . X B2'.' • ... . • SET CHAR COUNT. MAXIMUM FOR. • READ • • ••••• .. 1l4'* • .' NL NO ' . SwITCH SET ." •••• '.FOR EXIT ." .. .... ... · . . X .... .. F l · C3 •••• X • •••• C3 . . . . . . . . . . .. • CONVERT • • CHARACTER • 0 • ACCORD ING TO 'CASf, STORE IN • " " :.... ~~~~;~ ..... : . ···C4*··x .••..• RETURN TO CALLER • : •••••••••.. X: x .. ••••• 0 l . . . . . . . . . . . :INCREI~ENT CHAR: • COUNT BY 1 FOR • NL CHAR • • DZ' .. A4 • ,ET Nt. NO EXIT • • OUTPUT CASE • • SH I FT "JO : . *. ·. .... ...... ..BZ350 .J 1 ' . YES * A4 K2 *• • " Fl· X .. CHAR YES." ...* .* .. .. x : •••• G4 ••••••••• : •• ••• G3 ••••• • •••• •• • SWITCH'* SET NL FOR EX IT • 'X ••• .CONVER r CHAR TO' :PTTClB AND SAVE: NO : .* *. • * •••• *• OELETE CHAR *. H3 : •• . :* .X. ". •• ** SET UP TO :OUTPUT NL CHAR: YES * NO AZ • * • : f-1 : . /3000 . .. . H4 ns .•. * •••••• ' . * CASE CHANGE .' *.REQUIRtO . ' .. ... -.. '. : •. .•KI......... ·" .. ... .. ... ... ·" .. •• NL CHAR • ." •••• SET TO OUTPUT" • *X ••• • PROPER CASE • CHAR • ' . X. : • C3 : K2 • •... K3 .....•... " • ;~:.:·RE~6~5A~~AD·:.~? *. .. ... .. ... * •• X. K4 tlDOO :X ••••• . "" YES ._..••. K2 NO • NO : X •••••••••• : • ...... J3· ••••••••• J2 .' . ..X* K4 • IlZ450 " ............... x X • .. • •• H3· •••••••• * * •••••••••••••••• " " ••••• X: • . • • ............... RETURN • ···.. J4.····.···· X Bl430 *• * CLEAt( CASE SwITCH LOAD CHARAC TER Flowchart Fl007. System Library, PAPTZ ** • : ................. ·..... • " K4 " .• •• X .·· ...K4·····**···· ....... X • ~UNCfI CHARAC TE~ * •• X. B2 • • 300 ' • COUNT D " NO .x' . • •... YE S •* * .... * NO CALL $EXIT x . . ·.... * ••• ;[~ •• * NO H2 ..... ............. : . .. x :WAIT AT LOC 12A: •• wITH DISPLAY Of" " ... DECREMENT • :CHARAC TER COUNT: • ••••• ". . ' • * LOWER •• YES '. CASE CHAR •••••• X ••••• J 1 . . . . . . . . . . . • '" ... . • •••• £4· ••••••••• Fl : ... •••••• .. :• .. "• ' . NO •••••• .. .. ..·... GZ NO HI '. ••• * READER *. READY .' NO F4 ••• .. ....·" .. x .... .... " . ...x .x'. .' ....... .. .~. · .. .. ·... ... * ... . .. .... . CASE *. YES SwiTCH SET .* •••• ... X *. •* UPPER ' . YES • *. CASE CHAR •••••••• •• WRITE FUNCTION ... *. *. CHAR COUNT *. FZ • • * ." .' •• ... •• •• X. X••• • *. * C 3· .. • .... CHARACTER * ~EAO . SENSE DEVICE ." it. x X ** •••• F l ••••••••••• GI '. . .* x. X .* 04 • ·................... ·· '.. ••• X X • INCREMENT • • BUFFER ADR. * 'DECREMENT CHAR • COUNT • • •* • x··········· . ..... 03···· ..... . ·................... ······r.2············ : ... • •• E ll ••••••••• : Bl2l0.... .. .. .. . YES.' wRITE ••••• FUNCTION ·..... ............... · . · . x .. f l . " *. * " J1 • * YES *CLEAR INTERRUPT" • SWITCH * ·.................. .....x YES X SET UP FOR LOWER CASE CONVERS I ON *. NO • * •••• .• • ... * YES ••• ··C2 ••• ••• •••• .ro .... * .' " X • • : *. PUNCH READY FI " ••••• B) • • • • • • • • • • o * x " *. * ••• • * • NO : ••• *C 1 ........ ·.... : •••• A4"'". " •• ... X .. INH:RRUPT ' . NO • • SWITCH •••••• SET '. • SET UP FOR UPPER CASE CONVERS ION .... Ol400 READl Rl060 **.·A3.··· .. ••. -· .. At·····_··· • ENTRY VIA L IBF • : READZ • • INTER~UPT FROM : ILS04 • .-............ . ** ••• * ••••••••• : X••••••••••••••••••••••••• ·····B3 ...X ·.·.· .•• * X RllOD ··· . ··81··········· . • • SeNSE DEVICF · x .' . .. • •••• C2*~.*.* ••• * .. • .. *. • ' . ND :WAIT AT LOC 12A: •••••••••• X'wITH DISPLAY OF' • 14000 • . . . * SENSE OEV ICE wiTH RESET • •• ** •• * •••• * •••• X 03· *. *. • PLACE wORD • .COUNT IN FRONT. • Of- 110 BUFFER * .' '. ... • *** ••••• * •••••••• NO Rl090 :WAIT AT LOC IBE: *WITH OrSPLAY OF* : 14000 : READ CARD ................. :...•.................... x: : x ••••••••••• Rl070 ...INTERRUPT . *. NO • SwITCH .* •••• *. ...SE ... .. X ****F4·· •• ****· "" * *RETURN TO ILS04** T • * •• * • ••• *04 ••• *.* •••• SET ILS04 * *. YES * INTERRUP EXIT * .* •••••••• X* TO RETURN TO * .* RZlOO * ····*E4··X.. ·· .... X •' '. ERROR * ·*·***El····****··· X .*. *. .* *. *. .... .... ... .....* FI X ······C3.*·· .. **.·. YE S X .• ·... 01.········· SET UP IOCC. • RlllO INTERRUPT. SWITCH • ••••••••• ** •••••• CI '. "·-DEVICE '. READY •.. SET * ••••••••••• *** • * YE S X ·····Gl···· ... · .. •.RESET • * INTER~UPT* SWITCH * *. HI .' IIBLANK -. YES * '. CONTROL •••••••••• X'.READ CARD.* • - *..* .... • • **.·H2·· ••• *.·· CALL $EXIT * **** ••• * ••• **** t';O X ····1<.1········. RETURN TO • CALLER • Flowchart Fl008. System Library, READZ Flowcharts 301 . .. A2 X · WR TYl f1300 **.*Al········· ................ • tNTRY VH LlflF WRTYl • ... TlIDO . ...... A2 ........... . • • TZ400 • • •• A3·· •• •• ••• *1 NTERRUPT FROM • ILS04 • CUNVERT EBC • CHAR TO • • -TYPEWRI TER CODE- ·..................- • • • • ..... A4···· •. •• • TEST Df:VICf: READY • : ............... :x ....•.................•.• X ·.· .. BI·········· . · ... ·B2···X ....... . TZ 2eo • TZ400 009A4- *--------------- .. • CHECK TYPEWR ITER • ··.···93· X... · .... ·· T/330 'TYPE OR CHARAC TER CONTROL • •••• X • • X ....... 84.·.· .. ·· ... SENSE DEViCE wiTH RESET SENSE - : •••• II~;~~~ ••••• ~ X ·····C1···,······· • 'S TURE CHARACTER. • CDUNT- LOAD' • -CARRIER RETURN ••••• • CHAR • ••••••••••• X:X : TZ340 • • NO . •••••• .* C2 . -. -. 1 NTERRUPT SWITCH SE T * .... - · '. .' • • .-. ' SET INTERRUPT SWITCH X x 009A4. TYPEWRITER :(t •••• ~~~~~ ••••• : F2 *. NO ALL - YES X • •• •• G2 ••• • •• RETURN TO CALLtR *·. • Flowchart FI009. System Library, WRTYZ 302 .. * CHARACTERS •••••• X. A2 • *. OUTPUT .. " ..... ... * .... YES x • :-----CHECK------ ... .. •. ... ... .• • ..... 04 . . . . . . . . . .. x •" *. -. NO : WAIT AT /2A : •••••••••• X. DISPLAY /2000 • .. •••• 03 . . . . . . . . . ... .... • •• EZ·· •••••••• x .. .-. ••••• C5.;. •••••••• "··DEVICE •• RI:ADY 'RETURN TO ILS04- ...............- - -. • • -CLEAR I NTERRUP • SWITCH. - - . C4··· YES ······02·.·· ........ • Tl400 X ...···C3· X•.•...•.. *. DEVICE RETURN ..•• •••••••••• * •••••... *.. .. .... A3 • -.. WI? 20 PRNZ ** ••• .. .x ••••••••••• X ••• A3 •••• A2 ••••••••• .ENTRY VIA LlBF • : PRNI : ............... •• X*. *. wllOO *• *. *. .*.* YES: ... * .-.. CARRIAGE .* •••• BUSY .* ".·*A4 •••••••• * .INTERRUPT FRO'"' * : ILS04 : .......... _._ ... NO .. A3 * •••••••••••••••••••••••• •X: ...... B2····.···· .. X "Z200 .. • X •• ·***B3· •• • ••••••• ,'SfNSE DSW WI ••••••••••••• X:X WI300 C2··· •• • WAIT AT LOC 12A. NO •• ··DEVICE .WITH flISPLAY OF.X.......... READY • 17.000· •• ••••• - ••••••••••• * ••• C3 .. •• •• •• * ••• * .CONVERT BUFFER ** :F~~~/~¥~I~O~~ * F2 *• .- ** * SFT CHNL I SW ITCH 9 ** SET TRANSfER *• • COMPLETE Sw ITCH. X *. •••• •• F3· •• **** •••• • .* SUPPRESS *. YES. •• SPACE •••••• •• REQUEST •• *. PRINT LINE ... * ... • .. NO ••••••••••• X:X •• YE 5 ... •••••• •* *. GI • *. G2 ... CARR IAGF •• BUSY.· *• ... *. ... * ... ... ... ... • * • NO • * .-TRANSFER *. •• • ••• *. COMPLETE .* *. SWITCH .* * .CLEAR. * ... .. .. * *. • NO NO * : X H2· ••• ••• Hi •• ••• •• •••• x * CI * * X *. * *. *. • .. : •••.••••••• X: :I>Z210 J2 :VfS .~. ................. * • x WIllD .. .. -. .. D4'.' *. YI:: S • * CHANNEL *. •••• *. I SwiTCH .* SE T •• * •• • NO • *. E4 *• • • *CHANNEL*. X NO • * 12 •• •••• *. ENCOUNTERED •• *. •• •* * •• * YES •• X •• •• ·F4 •••••••••• **SET * CHANNEL 12 •* SWITCH • ·····G4.. -••..••. YES •.CLEAR CHANNE:L 1* * SWITCH : .·................ * ····H3· .. ·..... RETURN TO CALLER • * . ····H4 ••x·•·.• ·•• ·................ .RETURN TO ILS04. A3 : *. .*.* •••••• * ....x . .. • YES •* H3 :.X. X •• ··DOUtlLE NO *. SPACE •••••• *. REQUf'ST •• SKIP TO CHNL I .* NO X G3 .* ••• • ·CHANNEL·. • YE S • * 12 •• •••••• *. ENCOUNTERED .* .. .. • •••• C5 •••••••••• • • ·:.~~~ ••••• x:~bA~~EnA~~H~H: : •••••••••• X: ••••••••••• X:X x •• *. x .................... * NO *. -. *._ •.•. _•• • *·.*E3*.··.*.··. X X •• ••• FI •• •• •••••• : X *. ... * •• - ... .. •••• ----.......... .:*•• COMPLETE TRANSfER : X •••••••••••••••••••••••• : X W1305 • : : CLEAR CHNL 12 : YES •••• EJECT • f.NCOUNTERED Sw .X •••••••• *. PAGE • * * X •• RfQUEST .* • *. -. • .··.*03**····.··· • X E2··· C4 H3 * .. •• *.*** WI3!2 ••• E1 •••••••••• ... •• * YES ·•.** _... • x :* ••• 02 ••••••••• : • LOAU CONTROL CHARAC TEll. • ....x ... * x *. NO ••••• COUNT .GT. .* *. 1 .- •* • CI • • *. * - • •• •• • CHARACTER * YES X • SeNSE DEVICE wITH RESET *SPACE PRINTER* x l:~ ••• Cl.; ••••••• : x • ..... *84 . . . . . . . . . _ •• *• CARRIAGE •• •• tlUSY •• *. ... * ... • .. NO .... ·.K2***······.. X .. SPACE PRINTER • • * ..... •••• X* A3 * Flowchart FlO 10. System Library, PRNZ Flowcharts 303 PZ C60 I'NCH1 ·_·*A] ••••••••• 'INTERRUPT FROM' • ILSOO • X ······Bll1.··.· ..... .SENSE DSk hlTH • RF.SET Pl080 ····AIt····.···· • ••• Al·· •• ••••• .ENTRY ViA lIBF * • PNCH1 * .1 NTERRUI'T FROM • • ILS04 : · •. ··B2.·X.• •.. · .. X ·.··.·H4·.··.· .. ·.. ............... PllOO :~~~~~-----~~~~~: .SENSE OSlo wI TH • RESE T .CONVERT BUFFER * :EBCDIC TO HOlL : .................... X ·.··.·el·.· .. · .. ·.. P 1200 X Pl120 : •••• C2 ••••••••• : C4 * LOAD STAIHING • :IlUFfER ADDRESS :X ••••••••••••••••• ~UNCH A COLUMN .. · .*. . '. .. • • • • • • • • • (1 • • • • • • ... ... PZ090 K : •••• C5 ••• *.** •• : '. *. YE!:): .*.* ERRUR ... * ...... ... •••••• NO • SETUP ILSOI • • • X:RETUI\N TU P1l20: . . • C5 * · ;( •• •• ·Dl·lt ........ . .. • .. INCREMENT TO NEXT BUFFER LOCATION ..• • .................. * * X . E 1 ••••••••• ..:RE••••TURN TO IlSOO: ................. ·····02······.··· x :* ... 05 ••••••••• : .. ................ . ................. • * X • SET ROUTINE • .BUSY IND CLEAR. • LAST CARD • Sw ITCH : • • : X IS, DRIVE 1 .. FORMAT OF !>ROG IN loiS, DRIVE 2 · .. .. .. . . .. .. Appendix B. Listings 323 DeOM ADDR REL OBJECT ST.NO. 0085 0086 0087 0088 0089 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0103 0104 0105 0106 0107 LABEL OPCD FT OPERANDS • 13 • • • • • • • .. • • • .. .. .. 74 75 76 77 78 79 80 81 82 83 84 85 86 87 • 88 • .. • .. .. • .. 89 90 91 92 93 91t 95-319 • =FLET .. =ULET • =WSCT .. • =CSHN • • • .. • • • • .. .. • .. • .. • .. • • • • • .. .. • FORMAT OF PROG IN loiS, DRIVE 3 FORMAT OF PROG IN loiS, DRIVE 4 FlET SCTR ADDR, LOGICAL DR a FLET SCTR ADDR, LOGICAL DR 1 FLET SCTR ADDR, LOGICAL DR 2 FUT SCTR ADDR, LOGICAL DR 3 FLET SCTR ADDR, LOGICAL DR 4 LET SCTR ADDR, LOGICAL DR 0 LET SCIR ADDR, LOGICAL DR 1 lET SCTR ADDR, LOGICAL DR 2 LET SCTR ADDR, LOGICAL DR 3 LET SCIR ADDR' LOGICAL DR 4 BLK CNT OF PROG IN loiS, DRIVE 0 BLK CNT OF PROG IN loiS, ORI VE 1 BLK CNT OF PROG IN loiS, DRIVE 2 BLK CNT OF PROG IN loiS, DRIVE 3 BLK CNT OF PROG IN loiS, DRIVE 4 SCTR CNT CUSHION,LOGICAL DR 0 SCTR CNT CUSHION,LOGICAL DR 1 SCTR CNT CUSHION,LOGICAL DR 2 SCTR CNT CUSHION,LOGICAL DR 3 SCTR CNT CUSHION,LOGICAl DR It RESERVED FOR FUTURE USE ID/SEQNO SYSOO850 SYSC0860 SYSOO870 SYS00880 SYSOC890 SYS00900 SYS00910 SYSOO920 SYS00930 SYS00940 SYS00950 SYS00960 SYS00970 SYSOO980 SYSC0990 SYS01000 SYSOIOI0 SYSCl020 SYSOI030 SYS01040 SYSOI050 SYS01060 SYS01070 RESIDENT IMAGE ADDR REl OBJEC T ST.NO. 0109 0110 0111 0112 0113 0114 LABEL OPCD FT OPERANDS ID/SI::QNO SYSOI090 SYSOllOO SYSOlllO • INITIAL VALUES FOR WORDS 4-213 SYS01l20 SYS01l30 .. OF THE RESIDENT MONITOR SYS01140 .. RESERVED FOR FUTURE USE • RLTV ADDR. SYMBOL" DESCRIPTION .. 0-209 • 210-319 .. • RESIDENT MONITOR ADDR REL OBJECT ST.NO. 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 OIS3 0154 0155 324 LABEL OPCD FT OPERANDS ID/SEQNO .................................................................. • .. "STATUS-VERSION 2, MODIFICATION 0 • • • .FUNCT ION/OPERATION• .. THIS SECTION ALWAYS REMAINS IN CORE. IT • .. IS COMPRISED OF THE COMMUNICATIONS .. • AREA ICOMMA), THE SKELETON SUPERVISOR, AND .. .. A DISK I/O SUBROUTINE, NOMINALLY DISKl. (THE • FIRST TWO OF THESE SECTIONS ARE INTERMIXED.) • COMMA CONTAINS THE SYSTEM PARAMETERS REOUIR- • EO TO FETCH A CORE LOAD IN CORE IMAGE FOR.. MAT. THE SKELETON SUPERVISOR PROVIDES IN• STRUCTIONS FOR INITIATING A CALL EXIT, A • CALL LINK, A DUMP-To-PRINTER OR A CALL TO THE • AUXILIARY SUPERVISOR. IN ADDITION, THE SKELE-. TON SUPERVISOR CONTAINS SEVERAL TRAPS FOR CER~. TAIN I/O FUNCTIONS/CONDITIONS. THE DISK 110 • SECTION CONSISTS OF A SUBROUTINE FOR READING .. FROM OR WRITING ON A DISK CARTRIDGE ON A .. GIVEN LOGICAL DISK DRIVE. .. • .. .ENTRY POINTS.. • SPRET-A TRAP FOR PREOPERATIVE I/O ERRORS. THE CALLING SEQUENCE IS • BS I L $PRET • • SPSTX-A POSTOPERATIVE ERROR TRAP FOR I/O • DEVICES ON LEVEL X eX=1,2,3,OR 4). • THE CALLING SEQUENCE IS .. BSI L $PSTX • .. SSTOP-THE PROGRAM STOP KEY TRAP. • • SEXIT-THE ENTRY POINT FOR THE EXIT/CALL • EXIT STATEMENT. THE CALLING SEQUENCE IS. LOX 0 $EX IT .. .. SLINK-THE ENTRY POINT FOR THE LINK/CALL • LINK STATEMENT. THE CALLING SEQUENCt IS" SSI L SLINK • .. • SDUMP-THE ENTRY POINT FOR THE DUMP/POMP STATEMENT. THE CALLING SEQUENCE IS • SSt l SDUMP • SYS01160 SYS01l10 SYSOl180 SYS01l90 SYS01200 SYS01210 SYS01220 SYS01230 SYS01240 SYS01250 SYS01260 SYS01270 SYS01280 SYS01290 SYS01300 SYS01310 SYS01320 SYS01330 .... .. ..• .. .. .. .... • SYSOI3~O SYS01350 SYS01360 SYSOl370 SYS01380 SYS01390 SYS01400 SYS01410 SYS01420 SYS01430 SYS01440 SYS01450 SYS01460 SYS01470 SYS01480 SYS01490 SYS01500 SYS01510 SYS01520 SYS01530 SYS01540 SYS01550 ADn!! REL OB JEC T ST. NO. LABEL OPCD FT OPERANDS 0156. DC FORMAT it 0157 DC LIMIT1 it 0158. DC LIMIT 2 it 0159. WHERE LIMIT1 AND LIMIT2 ARE THE LIMITS. 0160. BETWEEN WHICH THE DUMP IS TO OCCUR, ANO. 0161 it FORMAT IS A CODE INDICATING THE FaRHAT. 0162 * OF THE DUMP. IF FORMAT IS NEGATIVE, 0163. THE AUXILIARY SUPERVISOR IS FETCHED • 0164 AND CONTROL PASSED TO IT. * 0165 * * DIOOO-ENTERED WHEN THE CALLER WISHES TO • 0166 * PERFORM A DISK I/O OPERATION. THE 0167 CALLING SEQUENCE VARI~S WITH THE • 0168.. VERSION OF THE DISK 1/0 SUBROUTINE. • 0169 * * $I200/$I400-ENTEREO WHEN THE OPERATIONit 0170 * COMPLETE INTERR~PT OCCURS ON • 0171 • LEVEl 2/4. * 0172 • • 0173 -INPUT-N/A • 0174 • 0175 *OUTPUT-WoRDS 6-4090 SAVED ON THE CIB ON A CALL • 0176. DUMP it 0177 * * 0178 *EXTERNAL REFERENCES-N/A * 0179 * 0180 *EXITS0181 - NORMAL • 0182 .THE EXITS FROM THE SUBROUTINES AT $PRET • 0183. $PSTl, SPST2, SPST3, $PST4, AND SSTOP • 0184 ARE BRANCH INSTRUCTIONS FOLLOWING A * 0185. WAIT INSTRUCTION. SSTOP TURNS OFF IN• 0186 TERRUPT LEVEL 5 AFTER THE START KEY IS * 0187 * DEPRESSED. • 0188. .THE EXITS FROM $EXIT,$LINK,AND $DUMP ARE. 0189. TO THE CORE IMAGE LOADER, PHASE 1, * 0190 AFTER THAT PHASE HAS BEEN FETCHED. • 0191 .THE EXIT FROM DZOOO IS BACK TO THE • 0192 CALLER AFTER THE REQUESTED DISK OPERA• 0193 lION HAS BEEN INITIATED. * 0194 -THE EXITS FROM $1200/$1400 ARE BACK TO • 0195 THE ADDRESSES FROM WHICH THE DI5K op• 0196 ERATION COMPLETE INTERRUPT OCCURED 0197 * AFTER THE INTERRUPT HAS BEEN SERVICED • 0198 * BY THE APPROPRIATE ISS. • 0199 * ERROR-N/A • 0200 • 0201 .TABLES/WORK AREAS• 0202 * SACDE 0203 * - SCH12 • 0204 • SCILA • 0205 * SCL5W 0206 • - $COMN • 0207 • • SCORE 0208 - $CTSW • 0209 * • SCXRl 0210 * • SCYLN it 0211 • SOABL it 0212 * $DAOR 0213 • $DBSY • 0214 • SDCYL 0215 * * SDMPF • 0216 • - SDREQ • 0217 * * $FPAO * 0218 • $HASH • 0219 * * SIBT2 .. 0220 • $IBT4 • 0221 * SIBSY 0222 • SIOCT 0223 * $KCSW * 0224 • • SLA5T • 0225 • - SNOUP • 0226 • * SNXEQ 0221 • SPBSY 0228 • • SPGCT • 0229 • $PHSE 0230 * • SRMSW • 0231 * * $5NLT * 0232 • SUFIO • 0233 * - SULET 0234 - $WRDI 0235 • SWSDR • 0236 • • 0237 -ATTRIBUTES-REUSABLE • 0238 * 0239 -NOTE5• 0240 • THERE ARE WAIT INSTRUCTIONS AT $PRET+l, 0241 $STOP+1, AND SPSTX+1. DEPRESSING THE START • 0242 KEY WILL RETURN CONTROL TO THE CALLER IN ALL • 0243 CASES. • 0244 - •• _--* ••• ***._-_._*-* ••• -.-* •• _*_._ ••••••• - •••• _•• 1D/5EQNO SY501560 SYS01570 SYS01580 SYS01590 SYS01600 SYS01610 SYS01620 SYS01630 SYS01640 SYS01650 SYS01660 SY501670 SYS01680 SYS01690 SYS01700 SYSOl710 SYS01720 SYS01730 SYS01740 SYS01750 SYS01760 SYS01770 SYS01780 SYS01790 SYS01800 SYS01810 SYS01820 SYS01830 SYS01840 SYS01850 SYS01860 SYS01870 SYS01880 SYS01890 SYS01900 SYS01910 SYS01920 SYS01930 SYS01940 SYS01950 SYS01960 SYS01970 5YS01980 5YS01990 SYS02000 SYS02010 5YS02020 SYS02030 SYS02040 SYS02050 5YS02060 SYS02070 SYS02080 SYS02090 SYS02100 5YS02110 SYS02120 SY502130 5YS02140 SY502150 SY502160 SYS02170 SYS02180 SYS02190 SYS02200 SYS02210 SYS02220 SYS02230 SYS02240 5YS02250 SYS02260 SYS02270 SYS02280 SYS02290 SYS02300 SYS02310 SYS02320 5YS02330 SYS02340 SY502350 5Y502360 SYS02370 SYS02380 SYS02390 SY502400 SYS02410 SYS02420 SYS02430 SYS02440 Appendix B. Listings 325 AOOR REL OBJECT 0280 0004 0005 0006 0007 0 0 0 0 aHA 0000 0000 0000 0008 0009 OOOA 0008 OOOC 0000 0 0 0 0 0 0 0000 0000 00B3 0000 0'0C4 0091 OOOE OOOF 0010 0011 0012 0013 001" a 0000 0000 0000 5540 0000 0000 OOOC 0 0 0 0 0 0020 0008 0028 0 0000 0029 0 3000 C02A 00 4C800028 002C 0020 002E 002f 0030 0031 0032 0033 0034 0035 0036 0031 a a 0 0 0 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0038 0 7014 0039 003A 003B 003C 003C 0030 C03E 003F 0040 0042 0043 0044 0045 0047 0048 0049 004B 004C 0 0 0 0 0 0 a 0 0 0 0 0 0 0 00 0 0 0 00 0 0 00 0 0 0040 0 004E 0 326 0000 1810 7012 0000 0001 0004 FFFF 0000 14C00032 10FO 0806 6902 C480003F 0001 C8F3 "40000F2 COFO 7001 COFO DOC1 ST.NO. 0246 0247 0248 0249 0250 0251 0252 0253 0254 0255 0256 0257 0258 0259 0260 0261 0262 0263 0264 0265 0266 0261 0268 0269 0270 0271 0272 0273 0274 0215 0216 0271 0278 0279 0280 0281 0282 0283 0284 0285 0286 0287 0288 0289 0290 0291 0292 0293 0294 0295 0296 0291 0298 0299 0300 0301 0302 0303 0304 0305 0306 0301 0308 0309 0310 0311 0312 0313 0314 0315 0316 0311 0318 0319 0320 0321 0322 0323 0324 0326 0321 0328 0329 0330 LABEL OPCD FT OPERANDS ID/St:QNO * PROVIDE PARAMETERS FOR SYSTEM LOADER SYS02460 SYS02470 SYS02480 SYS02490 SYS02500 SYSC2510 SYS02520 SYS02530 SYS02540 SYS02550 SYS02560 SYS02510 SYS02580 SYS02590 SYS02600 SYS02610 SYS02620 SYS02630 SYS02640 SYS02650 SYS02660 SYS02610 SYS02680 SYS02690 SYSC2700 SYS021l0 SYS02120 SYS02130 SYS021"0 SYS02750 SYS02760 SYS02170 SYS02180 SYS02790 SYS02800 SYS02810 SYS0282C SYSC283C SYS0284( SYS0285( SYS0286( SYS0287C SYS02880 SYS02890 SYS02900 SYS02910 SYS02920 SYS02930 SYS02940 SYS02950 SYS02960 SYS02910 SYS02980 SYS02990 SYS03000 SYS03010 SYS03020 SYS03030 SYS03040 SYS03050 SYS03060 SYS03070 SYS03080 SYS03090 SYS03100 SYS03ll0 SYS03120 SYS03130 SYS03140 SYS03150 SYS03160 SYS03170 SYS03180 SYS03190 SYS03200 SYS03210 SYS03220 SYS03230 SYS03240 SYS03260 SYS03210 SYS03280 SYS03290 SYS03300 ABS ORG DC SCIBA DC SCH12 DC scmolN DC 4 4095-* WD CNT FOR WRITING CORE ON CIB *-* SCTR ADOR OF THE CIB *-* ADDR OF CHANNEL 12 INDICATOR *-* LENGTH Of COMMON (IN WORDS) * * ULTIMATE RESIDENCE OF THE INTERRUPT TV SUVO SLEV1 SLEV2 SLEV3 $LEV4 SLEV5 DC DC DC DC DC DC LEVEL LEVEL S1200 LEVEL LEVEL *-* SI400 LEVEL SSTOP LEVEL SCORE SCTSW SDADR SOABL SDREQ SIBSY SHASH DC DC DC DC DC DC BSS *-* *-* *-* *SSCAN BSS *-* o BRANCH ADDRESS 1 BRANCH ADDRESS 2 BRANCH ADDR 3 BRANCH ADDRESS " BRANCH AODR ~ BRANCH ADDR * * E SIZE OF CORE, E.G., 4096=4K CONTROL RECORD TRAP SkITCH SCTR ADDR OF PROG TO BE LOADED 15540 IOCC FOR SCA RESET CODD ADDR) *-* IND. FOR REQUESTED VERSION OKI/O *-* NON-ZERO IF CO/PAP TP DEV. BUSY 12 WORK AREA 8 1132 SCAN AREA 32 * * * TRAP FOR PREOPERATIVE 110 ERRORS * SPRET DC WAIT BSC ENTRY POINT WAIT TIL START KEY PUSHED RETURN TO CALLER SPRET * $IREQ DC SULET DC DC DC DC DC $IGCT DC $LAST DC SNDUP DC SNXEQ DC SPBSY DC SPGCT DC *-* *-* *-* *-* *-* *-* *-* *-* *-* *-* *-* *-* ADoR OF INT REQUEST SUBROUTINE ADDR OF LET, LOGICAL DR 0 ADDR OF LET, LOGICAL OR 1 ADDR Of LET, LOGICAL DR 2 ADDR OF LET, LOGICAL DR 3 ADDR OF LET, LOGICAL OR 4 ZERO IF NO 110 IN PROGRESS 50 NON-ZERO WHEN LAST CARD SENSED 00 NOT CUP IF NON-ZERO DO NOT EXECUTE IF NON-ZERO NON-ZERO WHEN PRINTER BUSY PAGE NO. FOR HEADINGS * CALL EXIT ENTRY POINT TO SKELETON SUPERVISOR *SEXIT MOX SSOOO BR TO fETCH CIL, PHASE 1 56 *-** CALL LINK ENTRY POINT SLINK DC SRA MDX BSS SS900 DC DC $S910 DC *-* 16 $S100 E o E:NTRY POINT 51 BR TO FETCH CIL, PHASE 1 1 DISK PARAMETERS FOR SAVING CORE SCIBA-1 *IN CONNECTION WITH DUMP -1 CALL EXIT INDICATOR *** SAVE 1ST 4K OF CORE ON THE CIS *$DUMP DC MDX ,.,OX STD STX LO STO LDD BSI LD MOX *-* $I0CT ,0 *-3 SACEX 1 SCXR1 I SDUMP SDMPF $$900 L OZOOO $S900 SS100 L ENTRY POINT 63 SKIP IF NO INTERRUPT *PENDING, BR OTHERWISE SAVE ACCUMULATOR, EXTENSION SAVE XR1 SAVE DUMP FORMAT CODE SAVE WDS 6-4095 ON CIB BR TO FETCH CIL, PHASE *** FETCH CORE IMAGE LOADER, PHASE 1 *$SOOO LO SS100 STO SS910 SRMSW SAVE EXIT-LINK-DUMP SWITCH ADDR REL OBJECT 004F 0051 0052 0053 0055 0056 0057 0058 00 0 0 00 0 0 0 0 74000032 70FD 08BD 65800039 C101 1800 ClOD D8BS 0059 005B 005C 0050 005F 0061 0062 00 0 0 00 00 0 0 65000000 COFE 1890 440000F2 740000EE 70fD 4102 0005 0009 0063 0068 0071 0072 0072 0073 0074 0075 0076 0077 0018 0019 001A 001B 001C 0070 001E 001F 0080 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 OOOC 0000 0000 0000 0000 0081 a 0000 0082 0 3000 0083 00 4C 800081 0085 0 0000 0086 0 3000 0087 00 4C800085 0089 0 0000 008A 0 3000 008B 00 4C800089 0080 0 0000 008E 0 3000 008F 00 4C80008D 0091 0 0000 0092 0 3000 0093 00 4CCOO091 0095 0096 0097 0098 0099 0 0 0 0 0 0000 0000 0000 0000 0000 ST.NO. LABEL OPCD FT OPERANDS 0331 0332 0333 0334 0335 0336 0331 0338 0339 0340 0341 0342 0343 0344 0345 0346 0347 0348 0349 0350 0351 0352 0353 0354 0355 0356 0357 0358 0359 0360 0361 0362 0363 0364 0365 0366 0361 0369 0310 0311 0372 0313 0374 0375 0316 0317 0378 0379 0380 0381 0382 0383 0384 0385 0386 0381 0388 0389 0390 0391 0392 0393 0394 0395 0396 0391 0398 0400 0401 0402 0403 0404 0405 0406 0407 0408 0409 0410 0411 0412 0413 0414 0415 0416 0417 MDX L $I0CT.0 HDX ·-3 $OABL-1 XIO LOX 11 SLINK LO 1 1 RTE 16 LD 0 STO $lKNM ... $S150+1 CONTAINS ADDR $S150 LOX II SCILA LD SRT 16 BSI L DZOOO HDX L $OBSY,O HDX "'-3 aSI 2 .-. • •SFlSH BSS BSS ID/SEQNO SKIP IF NO INTERRUPT LEFT BR IF INTERRUPT(S) PENDING TURN OFF THE SCA LINK ADDR TO XR1 FETCH 2ND WD OF LINK NAME FETCH 1ST WD OF LINK NAME SAVE TEMPORARILY LAST WD OF DISK 1/0 MINUS 3 AD DR END OF DKI/D-l TO XR1 FETCH CI LOADER, PHASE SKIP IF READ OP DONE BR UNTIL READ FINISHED BR TO CI LOADER, PHASE RESERVED FOR THE 2250 PATCH AREA 5 9 .-. .--.-. .-..-...-.-. .-.-..-. .-..-. .-. .- FLUSH-TO-NEXT-JOB SWITCH l=FlUSH DC BSS E 0 WORD COUNT AND SECTOR ADDRESS $CWCT DC ... DC ... .FOR SAVING/RESTORING COMMON AGDR FOR SAVING/RESTORING COMMON $CCAD DC ... $LSAD DC StTR AD OR OF 1ST LOCAL/SOCAL DISKZ/1/N INDICATOR (-1,0,+1) $DZlN DC $DCOE DC ... LOGICAL DRIVE CODE FOR PROGRAM NO. OF PHASE NOW IN CORE $PHSt: DC UNFORMATTED 110 RECORD NO. SUFI 0 DC ... ... - ... WORKING STORAGE DRIVE CODE $WSDR DC LOADING ADDR OF THE CORE LOAD $WRDI DC I IF KB,CP BOTH UTILIZED SKCSW DC ... UNFORMATTED 1/0 DRIVE CODE $UFDR DC CHANNEL 12 INDICATOR FOR tP $CPTR DC CHANNEL 12 INDICATOR FOR 1132 $1132 DC CHANNEL 12 INDICATOR FOR 1403 $1403 DC ... TRAP FOR POSTOPERATIVE 1/0 ERRORS ON LEVEL 1 ... $PSTl DC WAIT BSC ENTRY POINT RETURN TO DEVICE SUBROUTINE $PSTI • • TRAP FOR POSTOPERATIVE 1/0 ERRORS ON LEVEL 2 $PST2 DC WAIT BSC • • TRAP FOR •$PST3 DC asc ...• SPST2 RETURN TO DEVICE SUBROUTINE .-. ENTRY POINT SPST3 RETURN TO DEVICE SUBROUTINE POSTOPERATIVE 1/0 ERRORS ON LEVEl 4 WAIT asc •... ENTRY POINT POSTOPERATIVE I/O ERRORS ON LEVEL 3 WAIT •... TRAP FOR •SPST4 DC .-. .-. ENTRY POINT SPST4 RETURN TO DEVICE SUBROUTINE PROGRAM STOP KEY TRAP $STOP DC WAIT BOSC .-. J ENTRY POINT WAIT TIL START KEY PUSHED RETURN TO CALLER $STOP ... PARAMETERS USED BY THE DISK 1/0 SUBROUTINES. THE • LOGICAL DRIVE CODE IS FOUND IN BITS 1-3 FOR ALL ... BUT THE AREA CODE • BIT 0 WILL ALWAYS BE ZERO. ...• ..... DISK! AND DISKN WILL NOT WRITE BELOW THE ....... FOLLOWING SCTR ADDRESSES (eXCEPT WRITE IMMED). ... $FPAD DC DC DC DC DC •....... .-.• .-. .-. .-..... FILE FILE fILE FILE FILE PROTECT PROTECT PROTECT PROTeCT PROTECT ADDR. ADDR, ADDR, ADDR, ADDR, LOGICAL LOGICAL LOGICAL LOGICAL LOGICAL DR OR DR DR OR THE ARM POSITION IS UPDATED WHENEVER A SEEK OCCURS. 0 1 2 3 It SYS03310 SYS03320 SYS03330 SYS03340 SYS03350 SYS03360 SYS03370 SYS03380 SYS03390 SYS03400 SYS03410 SYS03420 SYS03430 SYS03440 SYS034S0 SYS03460 SYS03470 SYS03480 SYS03490 SYS03500 SYS03510 SYS03520 SYS03530 SYS03540 SYS03550 SYS03560 SYS03570 SYS03580 SYS03590 SYS03600 SYS03610 SYS03620 SYS03630 SYS03640 SYS03650 SYS03660 SYS03670 SYS03690 SYS03700 SYS031l0 SYS03720 SYS03730 SYS03740 SYS03750 SYS03760 SYS03770 SYS03780 SYS03790 SYS03800 SYS03810 SYS03820 SYS03830 SYS03840 SYS03850 SYS03860 SYS03870 SYS03880 SYS03890 SYS03900 SYS03910 SYS03920 SYS03930 SYS03940 SYS03950 SYS03960 SYS03970 SYS03980 SYS04000 SYS04010 SYS04020 SYS04030 SYS04040 SYS04050 SYS04060 SYS04070 SYSOlt080 SYSOlt090 SYS04100 SYS04110 SYS04120 SYSOIt130 SYSOlt140 SYS04150 SYS04160 SYS04170 Appendix B. Listings 327 ADOR REL OBJECT 328 009A a 009B 0 009C a 0090 a 009E 0 0000 OOCO 0000 0000 0000 009F 0 OOAO a OOAI 0 00A2 a 00A3 a OOCO 0000 0000 0000 0000 00A4 00A5 00A6 00A7 00A8 00A9 OOAA 00A8 OOAe OOAD OOAE OOAF OOBO OOBI 0082 0 0 0 0 0 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00B3 a 00B4 0 0085 0 00B6 a 00B7 0 0000 6906 6A07 2807 080A 0 a C a a 0 C a 0 a 00B8 008A OOBe 008E OOBF OOCO 00e2 00C2 00C3 00 44000000 00 65000000 00 66000000 o 2000 a C802 00 4CCOOOB3 0000 0 OOCO 0 0000 00e4 00C5 00C6 00C7 00C8 00C9 OOCA 00C8 OOCD 0000 0818 280E a 690F a 6AI0 a 0816 a 1002 00 4C1000DO 00 4480002C 0 a 0 ST.NO. 0418 0419 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 0450 0451 0452 0453 0455 0456 0457 0458 0459 0460 0461 0462 0463 0464 0465 0466 0467 0468 0469 0470 0471 0412 0473 0474 0475 0476 0477 0478 0479 0481 0482 0483 0484 0485 0486 0487 0488 0489 0490 0491 0492 0493 0494 0495 0496 0497 0498 0499 0500 0501 0502 0503 0504 0505 LABEL OPCD FT OPERANDS SCYlN DC DC DC DC DC o o o o o ARM ARM ARM ARM ARM ID/SEQNO POSITION POSITION POSITION POSITION POSITION FOR FOR FOR FOR FUR LOGICAL LOGICAL LOGICAL LOGICAL LOGICAL DRIVE DRIVE DRIVE DRIVE DRIVE 0 SYSC4180 1 SYS04190 2 SYS04200 3 SYS04210 4 SYS04220 SYS04230 * SYS04240 *** BtLOW ARE THE DISK AREA CODES. A ZERO SYS04250 INDICATES THE CORRESPONDING DRIVE IS NOT *** SYS04260 *** ON THE SYSTEM SYS04270 * SYSC4280 SACDE DC *-* AREA CODE FOR LOGICAL DRIVE 0 *,.... AREA CODE FOR LOGICAL DRIVE 1 SYS04290 DC SYS04300 DC *-* AREA CODE FOR LOGICAL DRIVE 2 SYS04310 DC *.-* AREA CODE FOR LOGICAL DRIVE 3 DC SYS04320 *-* AREA CODE FOR LOGICAL DRIVE 4 SYS04330 * THE ADR OF THE CYLINDER IN WHICH A DEFECT OCSYS04340 *** CURS, IF ANY, IS STORED IN THE 1ST, 2ND, OR 3RD SYS04350 *** WORD BELOW, DEPENDING ON WHETHER IT IS THE 1ST, SYS04360 SYS04370 *** 2ND, OR 3RD DEFECT ON THE CARTRIDGE. SYS04380 * 1 SYS04390 SDCYl DC *-* DEFECTIVE CYLINDER ADDRESSES 2 SYS04400 DC *-* *FOR LOGICAL DRIVE 0 DC 3 SYS04410 *-* DEFECTIVE CYLINDER ADDRESSES 1 SYS04420 DC 2 SYS04430 DC *-* *FOR LOGICAL DRIVE 1 3 SYS04440 DC *-* DC 1 SYS04450 *-* DEFECTIVE CYLINDER ADDRESSES DC 2 SYS04460 .-* *FOR LOGICAL DRIVE 2 DC 3 SYS04470 *-* DC 1 SYS04480 *-* DEFECTIVE CYLINDER ADDRESSES 2 SYS04490 DC *-* .FOR LOGICAL DRIVE 3 DC 3 SYS04500 *-* DC 1 SYS04510 *-* DEFECTIVE CYLINDER ADDRESSES 2 SYS045l0 DC *-* *FOR LOGICAL DRIVE 4 3 SYS04530 DC *-* SYS04550 * ILS02--THIS SUBROUTINE SAVES XR1, XR2, STATUS, SYS04560 AND THE ACCUMULATOR AND ITS EXTENSION v SYS04570 * • THE ADDRESS OF THE INTERRUPT SERVICE ROU- SYS04580 * TINE IS STORED IN $1205 BY PHASE 2 OF SYS04590 * THE CORE IMAGE LOADER. WORD 10 ALWAYS SYS04600 CONTAINS THE ADDRESS OF SI200. SYS04610 SYS04620 * SYS04630 * SYS04640 *SI200 DC *-* ENTRY PT (LEVEL 2 INTRUPT) SYS04650 STX 1 $1210+1 SAVE XRl SYS04660 STX 2 $1210+3 SAVE XR2 SYS04670 STS $1210+4 STORE STATUS SYS04680 STD $1290 SAVE ACCUMULATOR,EXTENSION SYS04690 * S1205+1 CONTAINS ADDR INTERRUPT ENTRY PT TO DKI/O SYS04700 SI205 8SI L BR TO SERVICE THE INTERRUPT SYS04710 $1210 LDX II *-* RESTORE XRl SY$04720 LDX L2 *-* RESTORE XR2 SYS04730 LOS 0 RESTORE STATUS SYS04740 LDD SI290 RESTORE ACCUMULATOR,EXT SYS04750 BOSC I SI200 RETURN FROM INTtRRUPT SYS04760 $1290 BSS E 0 SYS04770 DC *-* CONTENTS OF ACCUMULATOR AND SYS04780 DC *EXTENTION SYS04790 * SYS04810 * ILS04--THIS SUBROUTINE SAVES XR1, XR2~ STATUS, SYS04~20 AND THE ACCUMULATOR AND ITS EXTENSION. SYS04830 IF THE INTERRUPT IS FOR A KEYBOARD REQ- * SYS04840 UEST,AND IF A MONITOR PROGRAM IS IN CON- * SYS04850 TROL, CONTROL IS PASSED TO DUMP. OTHER- * SYS04860 WISE, CONTROL IS PASSED TO THE KEYBOARDI * SYS04870 CONSOLE PRINTER SUBROUTINE. WORD 12 Al- * SYS04880 * WAYS CONTAINS THE ADDRESS OF $1400. • SYS04890 SYS04900 * SYS04910 * THE TABLE BELew CONTAINS THE ADDRESSES OF THt * INTERRUPT SERVICE ROUTINES FOR ALL THE DEVICES SYS04920 * ON LEVEl 4. SYS04930 SYS04940 SYS04950 * SYS04960 SI400 DC ENTRY POINT SYS04970 $1490 STD SAVE ACCUMULATOR, EXTENSION SYS04980 $1410 STS SAVE STATUS SYS04990 1 51410+2 STX SAVE: XR1 SYS05000 STX 2 51410+4 SAVE XR2 SYS05010 XIO S1492 SENSE DSW SYS05020 SLA 2 IS THIS INTERRUPT REQUEST SYS05030 8SC L $1403,BR IF NOT INTERRUPT REQUEST SYS05040 SIREQ BR IF INTERRUPT REQUEST BSI I SYS05050 *-. AODR REL OBJECT OOCF DODO 0001 0002 0 FFFE 0 6109 0810 1140 0003 0005 0006 0008 OODA OODB 00 45800000 0 2000 00 65000000 00 66000000 0 C803 00 4CCOOOC4 0000 OODE OOEO OOEO OOEI 00E2 OCE3 0 0 0 0 0000 0002 0000 C 0 C aO~4 aOEE 0 OFOO 0001 0300 OOOA 0000 ST.NO. 0506 05U7 0508 0509 0510 0511 0512 0513 0514 0515 0516 0517 0518 0519 0520 0521 0522 0523 0524 0525 0526 0527 0529 0530 ID/SEQNO LABEL OPCD FT OPERANDS DC -2 $1403 LOX 9 XIO $1494 SLCA 1 * $1405+1 CONTAINS ADDR $1405 BSI I l *-* $1410 LOS 0 LOX Ll LOX L2 *-. LOD $1490 BOSC $1400 .-. • ERROR CODE NO. DEVICES ON LEVEL TO XRl SENSE lLSW FIND CAUSE OF INTERRUPT OF LEVEL 4 t6T MINUS 1 BR TO SERVICE THE INTERRUPT RESTORE STATUS RESTORE XR1 RESTORE XR2 RESTORE ACCUMULATOR, ~XT. RETURN • CONSTANTS AND WORK AREAS • EVEN-NUMBERED LABELS ARE ON EVEN BOUNDARIES •$OOSW DC $1490 BSS $1492 DC $SYSC EQU DC $1494 BSS DC BSS $OBSY DC E .-. DSW FOR THE DISK CONTENTS OF ACCUMULATOR, EXT. 2 .-* ·-1 VERSION AND MOD NO. /OFOO IOCC FOR SENSE IOCC FOR KB/CP PATCH AREA 1 /0300 10CC FOR SENSING ILSW04 PATCH AREA 10 NON-ZERO WHEN DISK I/O BUSY .-. SYS05060 SYS05070 SYS05080 SYS05090 SYS05100 SYS05110 SYS05120 SYS05130 SYS05140 SYS05150 SYSC5160 SYS05170 SYS05180 SYS05190 SYS05200 SYS05210 SYS05220 SYS05230 SYS05240 SYS05250 SYS05260 SYS05270 SYS05290 SYS05300 DISKl I\DOR REL OBJECT OOFO OOFO OOFl 00F2 OOF3 OOF4 0 OOCO OOEF 0 Ff6A 0 0 00E8 OOCI ST.NO. LABEL OPCD FT OPERANDS IO/SEQNO 0532 0533 0534 0535 0536 0537 0538 0539 0540 0541 0542 0543 0544 0545 0546 0547 0548 0549 0550 0551 0552 0553 0554 0555 0556 0551 0558 0559 0560 0561 0562 0563 0564 0565 0566 0567 0568 0569 0510 0571 0572 0513 0574 0575 •••••••••••••••••••••••••••• *.* •••• * ••••••••••••••• • • .PROGRAM NAME• • .FULL NAME-FORTRAN/SYSTEM DISK I/O SUBROUTINE. • .CALLING SEQUENCE• • LOD PARAM • • BSI l DISKl • • WHERE PARAM IS THE LABEL OF A DOUBLE-WORD * • CELL CONTAINING THE FUNCTION CODE AND THE • • ADDR OF ThE I/O BUFFER,l.E., ADDR OF WD CNT • • • SEE 'CAPABILITIES' FOR DISCUSSION OF PARAM- • • ETERS. • • .PURPOSE• • TO PROVIDE A SUBROUTINE TO PERFORM DISK OPERA-. • TIONS. THIS SUBROUTINE IS INTENDED FOR USE BY • MONITOR PROGRAMS AND USER PROGRAMS WRITTEN IN * FORTRAN. THUS,IT IS INTENDED FOR USE IN AN • • ERROR-FREE ENVIRONMENT. • SYS05320 SYS05330 SYS05340 SYS05350 SYS05360 SYS05370 SYS05380 SYS05390 SYS05400 SYS05410 SYS05420 SYS05430 SYS05440 SYS05450 SYS05460 SYS05470 SYS05480 SYS05490 SYS05500 SYS05510 SYS05520 SYS05530 SYS05540 SYS05550 SYS05560 SYS05570 SYS05580 SYS05590 SYS05600 SYS05610 SYS05620 SYS0563C SYS05640 SYS05650 SYS05660 SYS05670 SYS05680 SYS05690 SYS05700 SYS05710 SYS05720 SYS05730 SYS05740 SYS05750 0577 0518 0519 0580 0581 0582 0583 0584 • PROVIDE PARAMETERS FOR SYSTEM LOADER * • *METHOD• • DISKl REQUIRES A BUFFER,THE LENGTH OF WHICH IS. • 2 GREATER THAN THE NO. WORDS TO BE REAO/WRIT- • TEN. • • * *CAPABILITIES AND LIMITATIONS• • THE WO CNT,AS WELL AS DZOOO,MUST BE ON AN EVEN. • BOUNDARY,MUST BE IN THE RANGE 0-32161. THE • • DRIVE CODE MUST BE IN BITS 1-3 OF THE SECTOR * ADDR,WHICH FOLLOWS THE WD CNT. THE FUNCTION • INDICATOR MUST BE XXOO fOR A READ OR XXOI FOR • A WRITE,WHERE 'XX' MEANS ANY 2 HEXADECIMAL • • CHARACTERS. A WD CNT OF ZERO INDICATES A SEEK •• (READ OR WRITE MAY BE INDICATED.) AUTOMATIC • SEEKING IS PROVIDED AS A PART OF READ/WRITE. • • A WRITE IS ALWAYS WITH A READ-BACK-CHECK. • • DISKl MAKES NO PREOPERATIVE PARAMETER CHECKS • • • • *SPECIAL FEATURES• * DISKl PROVIDES ONLY THOSE FUNCTIONS MENTIONED. ABOVE. DISKI AND DISKN OFFER THIS BASIC SET OF. FUNCTIONS PLUS OTHERS. • • •••• * •• * ••••••••• * ••••••••••• ** •••••••••••••••••••• BSS DC DC DC DC ORG E SYS05770 SYS05780 SYS05790 0 $lEND-* DISKl WORD COUNT SYS05800 -'DlID PHASE 10 SYS05810 $ZEND-6- •• 1 AODR OF SLET EXTRACT SYS05820 1 NO. ENTRIES IN SLET EXTRACT SYS05830 .-2 SYS05840 Appendix B. Listings 329 AOOR REL OBJECT 00f2 00f3 OOfS 00F6 0 00 0 0 0000 140000EE 10fO 1002 OOf7 00f8 00f9 OOFA OOFB OOFe OOFD OOfE OOFF 0100 0101 0102 0103 0104 0 0 0 0000 7015 690F 6AlO 1008 D03e 1800 0058 6211 6AED eOFO 0 0 0 0 0 0 0 0 0 DOH 0 70"53 00 4COOOOOO 0106 0 0107 C 6908 081E 0108 00 65000000 010A 00 66000000 010e 00 4e8000Fl 010E 0110 0111 0113 0114 0115 0116 0111 0118 OllA 011B 011e 0110 011E 011F 0111 00 00 0 0 0 0 0 0 00 0 0 0 0 0 00 0 0122 0122 0123 0124 0125 0126 0127 0128 0129 012A 0128 011e 0110 011E 011F 0130 0131 0132 0133 0134 0135 0136 0131 0138 0139 013A 013B 013C 330 65000000 660000F2 0819 00e9 4850 10EE C800 0900 14FFOOEE 103E e811 e014 4293 1810 04800198 1000 0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0001 0000 0000 0000 0000 0000 0000 0000 0122 0000 0000 0000 0000 0000 5002 5004 FEeo 0001 0080 0600 0008 5000 OFF8 0000 0101 0001 OOOA ST. NO. 0586 0581 0588 0589 0590 0591 0592 0593 0594 0595 0596 0597 0598 0599 0600 0601 0602 0603 0604 0605 0606 0607 0608 0609 0610 0611 0612 0613 0614 0615 0616 0611 0618 0619 0620 0621 0622 0623 0624 0625 0626 0621 0628 0629 0630 0631 0632 0633 0634 0635 0636 0631 0638 0639 0640 0641 0642 0643 0644 0645 0646 0647 0648 0649 0650 0651 0652 0653 0654 0655 0656 0651 0658 0659 0660 0661 0662 0663 0664 0665 0666 0661 0668 0669 0670 0611 ID/SEQNO LABEL opeD FT OPERANDS DIOOO DC MOX MoX MOX L *-* $oBSV,O "-3 DI020 ENTRV POINT LOOP UNTIL OPERATION IN .PROGRESS IS COMPLETE BR AROUND INT ENTRY POINT * INTERRUPT ENTRV POINT '* DI010 DC MDX 01020 STX STX SLA STO *-* DZl80 1 01l00+1 2 OZlOO+3 8 OZ945 16 01235+1 2 'TCNT 2 $OBSV 01000 DIOI0 Dl230 RTE STO D1030 LOX STX LO STO MOX 01060 Bse L *-* INTERRUPT ADDRESS BR TO SERVICE INTERRUPT SAVE XRl SAVE XR2 SHIfT INDICATOR 8 BITS SAVE FUNCTION INDICATOR SAVE AODR OF THE 110 AREA TURN BUSV INDICATOR ON AND *SET RETRY COUNT BR TO CONT INUE 8R TO SERVICE THE INTERRUPT * * START ALL DISK OPERATIONS *DI010 STX XIO 1 OZl80+1 01904 SAVE AOOR OF THE 1/0 AREA START AN OPERATION * RETURN TO USER * OZIOO LOX LOX Bse ** L1 *-* L2 *-* I 01010 RESTORE XRl RESTORE XR2 RETURN SERVICE ALL INTERRUPTS * 01180 LOX Ll 1t-* LOX L2 OlOOO XIO OZ910 STO $ODSW BOSC MDX OZ060 DIl85 LDD 01902 STO 1 0 MOX L $DBSV,-l MDX Ol235 ADOR OF 1/0 AREA TO XRl ADoR OF DIOOO TO XR2 SENSE THE DSW SAVE THE DSW SKIP IF ERROR BIT SET BRANCH If ERROR BIT NOT SET RESTORE WORD COUNT .AND SECTOR ADDRESS SKIP IF 16 RETRIES DONE BRANCH IF LESS THAN 16 * * TRAP OUT TO POSTOPERATIVE TRAP • LDD LD DZl90 BSI SRA STO MDX Dl912 01915 2 $PST2-X2 16 D1350+1 Dl030 l+SCTR ADOR TO EXTENSION BR TO POSTOPERATIVE ER TRAP CLEAR *ARM POSITION RETRV OPERATION * CONSTANTS AND WORK AREAS * ass E 0 1t EVEN-NUMBERED LABELS ARE ON EVEN BOUNDARIES Dl900 DC 1 CONSTANT ,READ-AFTER-SEEK WD CNT Dl90l DC 0 CURRENT ARM POSITION Dl902 DC .-* LAST TWO WORDS OF SECTOR De *-* *PREVIOUSLV READ Dl904 DC *-1t loce FOR OPERATION CURRENTLY 01905 DC *-* *BEING PERFORMED 01906 DC *-* SAVE AREA FOR loce FOR Dl907 DC *-* *USER-REQUESTED OPERATION 01908 DC Dl900 IOCC FOR READ 01909 DC *-1t 1tAFTER SEEK 019IO DC *-. 2ND WORD OF SEEK 10CC Ol911 DC 1t-* SENSE 10CC Ol912 DC 1t-* INTERMEDIATE WORD COUNT Dl913 DC *-* AODR OF NEXT SEQUENTIAL SECTOR 01914 DC 15002 WRITE SELECTIPOWER UNSAFE INOR DZ915 DC 15004 READIWRITEISEEK ERROR INDICATOR -320 TO BE USED TO SIMULTANEOUSLV OZ916 DC DC 1 *DEeR WO CNT, INCR SCTR ADDR Dl920 DC 10080 READ CHECK BIT FOR IOCC Dl925 DC 10600 2ND WO OF READ IOCC WIO AREA CO 01930 DC 8 NO. SECTORS PER CYLINDER 01935 DC 15000 NOT READY DISPLAV CODE 01940 DC IOFF8 'AND' OUT DR CODE, SCTR ADDR DZ945 DC 1t-* FUNC INDICATOR (O=READ,I=WRITE) 01950 DC 10701 SENSE IOCC WID AREA CODE DZ955 DC 10001 'AND' OUT ALL BUT SCTR NO. 01960 DC SDCVL-$CYlN BASE DEFECTIVE CVL ADOR SYS05860 SVS05870 SVS05880 SYS05890 SVS05900 SVS05910 SVS05920 SVS05930 SVS05940 SVS05950 SVS05960 SVS05970 SYS05980 SVS05990 SYS06000 SVS06010 SYS06020 SVS06030 SYS06040 SVS06050 SVS06060 SYS06070 SYS06080 SVS06090 SYS06100 SYS06110 SVS06120 SVS06130 SVS06140 SVS06150 SYS06160 SYS06110 SVS06180 SVS06190 SYS06200 SVS06210 SYS06220 SVS06230 SVS06240 SVS06250 SVS06260 SYS06270 SVS06280 SYS06290 SVS06300 SVS06310 SVS06320 SVS06330 SYS06340 SVS06350 SYS06360 SVS06310 SYS06380 SYS06390 SYS06400 SVS06410 SYS06420 SYS06430 SVS06440 SVS06450 SVS06460 SVS06470 SVS06480 SVS06490 SVS06500 SYS06510 SVS06520 SYS06530 SYS06540 SVS06550 SYS06560 SYS06510 SVS06580 SYS06590 SVS06600 SVS06610 SVS06620 SVS06630 SVS06640 SVS06650 SVS06660 SVS06670 SVS06680 SYS06690 SYS06700 SYS06110 ADDR REL OBJEC T 0130 0 013E 013F 0140 0141 0142 0143 0 0 0 0 0 0 0144 00F2 0 0146 0147 0148 014A 014B 009f FHB 0000 0400 0141 0000 FFFF 0002 0 1810 0 00A6 00 74FF0032 0 1000 0 70BC 014C 0 0140 0 COE3 70CF 014E 0 COE8 014F 00 44000028 0151 0 703A 0152 0153 0154 0155 0156 0 0 0 0 0151 0159 015B 01SC 0150 015E 015F 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 016A 016B 016C 0160 016E 0170 0171 0172 0173 0174 0176 0177 00 00 0 0 0 0178 011A 011B Ol7C 0170 Ol7F 0180 0181 0182 0183 0184 0185 C C009 1800 C101 1803 7040 14010032 65000000 C900 08C7 0800 0 1810 0 1084 0 DOOE 0 80DB C 001B 0 800A C 0033 0 8006 0 8008 0 8007 0 0006 0 62FD 0 69BO 0 C101 C EOCB 0 0101 00 94000000 0 4828 0 7006 0 C101 0 80C2 00 7401016F 0 7201 0 70F5 00 0 0 0 00 0 0 0 0 0 0 0 660000f2 C230 E249 0250 C4000000 EA4E 023A EA43 0239 EA50 9247 0237 ST.NO. 0672 0673 0674 0675 0676 0677 0678 0679 0680 0681 0682 0683 0684 0685 0686 0687 0688 061:19 0690 0691 0692 0693 0694 0695 0696 0697 0698 0699 0700 0701 0702 0703 0104 0105 0706 0701 0708 0709 0710 0111 0712 0713 0714 0715 0116 0711 0718 0719 0720 0721 0722 0723 0724 0725 0726 0727 0128 0729 0730 0731 0732 0133 0734 0735 0736 0731 0738 0139 0740 0141 0742 0743 0744 0745 0746 0747 0748 0749 0750 0751 0752 0153 07.54 0755 0756 0757 ID/SEQNO LABel OPCD FT OPERANDS OZ965 OZ970 OZ975 DZ980 OZ985 DZ990 OZ995 • ..• RESERVED ass X2 $ACOE BASE AREA CODE AOOR $CYLN-$ACDE BASE ARM POSITION ADDR 2ND WORD Of READ CHECK IOCC /0400 2ND WD OF SEEK IOCC W/O AREA CD 321 NO. WORDS PER SECTOR (W/ AODR) CURRENT SECTOR NO. MASK FOR COMPLEMENTING -1 DC DC DC DC DC DC DC .-. .-. FOR SAVING CORE ON A DUMP ENTRY TO SKEl THIS AREA MUST BE AT $CIBA+319 2 01000 EQU • *OZ210 • SRA STO MOX NOP MOX * PREPARE *Dl215 LD L 16 $OaSY $I0CT ,-1 CLEAR BUSY INDICATOR DECREMENT IOCS COUNTER DIlOO TO EX IT TO TRAP OUT ON 'POWER UNSAFE' CONDITION 01914 OZ190 MOX BR TO TPAP OUT * • PREPARE TO TRAP OUT ON 'NOT READY' CONDITION •DI220 • • •DZ225 • • LO BSI MOX LD RTE LO SRA MOX • OZ230 MOX OZ235 LOX LOO STD STO OZ240 SRA SLT STO A STO A STO A A A STO LOX STX LO AND OZ250 STO OZ280 S BSC MOX LO A MOX MDX MOX L OZ935 $PRET OZ340 FETCH ERROR CODE BR TO PREOPERATIVE ERR TRAP RETRY THE OPERATION OZ910 16 1 3 0Z380 FETCH 1ST WO SEEK IOCC FETCH DESIRED CYLINDER AOOR .-. INCREMENT IOCS COUNTER AODR I/O AREA TO XR1 L $I0CT ,I II 1 0 OZ902 DZ912 16 4 DZ280+1 OZ965 DZ330+1 DZ970 01350+1 OZ960 OZ280+1 OZ280+1 OZ280+1 2 -3 1 OZ906 1 1 OZ940 1 1 L Z+ 01300 1 OZ930 L OZ280+1,1 2 1 OZ250 .-. •* CONSTRUCT THE 2ND • 01300 LOX L2 OZOOO LO AND STO 0Z330 LO OR STO OR STO OR S STO BR TO PERFORM THE SEEK DRIVE CODE IN BITS 12-15 COMPUTE AND STORE THE *ADOR OF THE AREA CODE COMPUTE AND STORE THE -AODR OF THE ARM POSITION ADD IN BASE OT AOOR ADD IN THE DRIVE .CODE TWICE MORE INITIALIZE COUNTER fOR LOOP FETCH DESIRED SECTOR AODR 'AND' OUT SECTOR NO. .AND DRIVE CODE SUB DEFECTIVE CYLINDER ADDR SKIP IF BAD CYLINDER BR TO CONTINUE PROCESSING INCREMENT SCTR AOOR BY 8 POINT TO NEXT DEFECTIVE CYL SKIP AFTER 3RD PASS COMPARE W/ NEXT OEf CYL ADR WORD OF ALL IOCC'S 2 OZ913-X2 2 OZ955-X2 2 OZ990-X2 L 2 DZ980-X2 2 DZ910-X2 2 OZ925-X2 2 OZ909-X2 2 OZ990-X2 2 OZ945-X2 2 DZ907-X2 .-. SAVE WORD COUNT, SCTR ADDR ADOR OF DZOOO TO XR2 FETCH SECTOR ADDRESS 'AND' OUT ALL BUT SECTOR NO SAVE SECTOR NO. FETCH AREA CODE 'OR' IN SEEK FUNCTION CODE SEEK IOCC MINUS DIRECTION 'OR' IN READ FUNCTION CODE IOCC FOR READ-AFTER-SEEK 'OR' IN SECTOR NO. COMPLETE READ/WRITE CODE 2ND WO Of REA~/WRITE Ioec SYS06720 SYS06730 SYS0671t0 SYS06750 SYS06760 SYS06770 SYS06780 SYS06790 SYS06800 SYS06810 SYS06820 SYS06830 SYS0681t0 SYS06850 SYS06860 SYS06870 SYS06880 SYS06890 SYS06900 SYS06910 SYS06920 SYS06930 SYS06940 SYS06950 SYS06960 SYS06970 SYS06980 SYS06990 SYS07000 SYS07010 SYS07020 SYS07030 SYS07040 SVS07050 SYS07060 SYS07070 SYS07080 SYS07090 SYS07100 SYS01110 SYS07120 SYS07130 SYS07140 SYS07150 SY507160 SYS07170 SYS07180 SYS07190 SYS07200 SYS07210 SYS07220 SYS07230 SYS07240 SYS07250 SYS07260 SYS01270 SYS07280 SYS07290 SYS07300 SYS01310 SYS01320 SYS01330 SYS07340 SYS07350 SYS07360 SYS07310 SYS07380 SYS07390 SYS07400 SYS07410 SYS07420 SYS07430 SYS01440 SYS07450 SYS07460 SYS07470 SVS07480 SYS07490 SYS01500 SYS01510 SYS01520 SYS07530 SYS01540 SYS07550 SYS07560 SYS01570 Appendix B. Listings 331 ADDR REL OBJECT 0186 0187 0188 0189 018A 018B 018C ')180 JI8E 018F 0190 0191 0192 0193 0194 0195 0196 0197 0199 019A EAlt2 8247 0240 C EA48 0 D23B a CA3C 0 OA3A 0 02EB 0 4828 0 70BC 0 1002 0 4828 0 10BB 0 100B 0 4828 0 70BC 0 C101 00 94000000 0 4818 0 7014 0 0 0 019B 019C 0190 019E 019F 01AO alAI 01A2 01A3 01A4 0 0 0 0 0 0 0 0 0 0 alAS 0 1893 l80F 1002 EA3A 1800 4810 7002 F251 8230 DA34 4213 01A6 0 OlA7 a 01A8 0 CA38 oA34 4213 01A9 OlAA 01AC alAO C23l 04800198 9101 4C200116 0 00 0 00 ST.NO~ 0758 0759 0760 0761 0762 0763 0764 0765 0766 0767 0768 0769 0110 0771 0112 0113 0774 0775 0776 0711 0118 0779 0780 0181 0782 0183 0784 0185 0786 0787 0788 0789 0190 0791 0192 0193 0194 0795 0796 0791 0798 0799 0800 0801 0802 0803 0804 0805 OlAF OlBO OlBl 0162 0163 OlB/, 01B5 01B6 01B7 01B8 01B9 OlBA OlBB OIBC 01BO 016f O16F 01CO OlC 1 0lC2 0lC3 01C4 01C5 01C6 01C1 01C8 OlCA OlCB OlCC OlCO OlCE 332 0 0 a 0 a a 0 0 0 0 0 0 0 0 0 CA3C 4808 7094 8AltO DA3C 4830 1810 82ltF 0100 CA36 OA34 ClOl EA50 0101 4213 C24D D235 C247 4820 4213 CA32 D900 C23C 4808 a 70E9 00 15000140 C C900 0 oA32 0 CA3C a 0900 a 708F 0 0 0 0 0 0 0 0 0 0806 0807 0808 0809 0810 0811 0812 0813 0814 0815 0816 0811 0818 0819 0820 0821 0822 0823 0824 0825 0826 0827 0828 0829 0830 0831 0832 0833 0834 0835 0836 0837 0838 0839 0840 0841 0842 LABEl OPCD FT OPERANDS A STO OR STO LOD 0Z340 XIo STO BSC MOX SLA BSC MOX SLA esc MOX LO 02350 S BSC MOX ID/SEQNO 2 DZ920-X2 01945-X2 IORI IN READ CHECK BIT OZ975-X2 DZ950-X2 OZ911-X2 2 OZ912-X2 2 OZ910-X2 2 SOOSW-X2 Z+ Dl215 2 Z+ DZ220 11 2ND WD OF READ CHECK IOCC 10RI IN SENSE IoCC BITS COMPLETED SENSE IoCC l+SCTR AOOR TO EXTENSION SENSE FOR DISK READY SAY£: THE DSW SKIP UNLESS POWER UNSAfE OR -WRITE SElECT, BR OTHERWISE BR TO PREOPERATIVE ERR TRAP *IF DISK NOT READY, SKIP *OTHERWISE CR 2 2 2 2 1+ 01225 1 1 L *-+DZ400 FETCH DESIRED CYLINDER ADDR SUBTRACT ARM POSITION SKIP IF SEEK NECESSARY BRANCH TO PERFORM OPERATION - SEEK - SRT SRA SLA OR RTE BSC 19 15 2 2 D1910-X2 16 PUT NO. CYLINDERS IN EXT + OR - SIGN TO BIT 15 SHIFT SIGN TO BIT 13 OR IN REMAINDER OF IDee SKIP IF SEEK TOWARD HOME DZ380 BRANCH IF SEEK TOWARD CENTR 2 D1995-X2 COMPLEMENT NO. CYLS TO BE 2 DZ900-X2 -SOUGHT TO GET POSITIVE NO. 2 DZ904-X2 2 DI070-l-X2 START SEEK ~DX EOR A DZ380 STD BSI - - SEEK COMPLETE INTERRUPT PROCESSING * LDD 2 DZ908-X2 SET UP IOCC FOR STD 2 DZ904-X2 *READ AFTER SEEK SSI 2 D1070-l-X2 START READ-AFTER-SEEK - READ-AFTER-SEEK COMPLETE INTERRUPT PROCESSING - LD STO S BSC 2 DZ901-X2 Dl350+1 1 1 L OIlB5,1 I FETCH ADR OF SCTR JUST READ UPDATE ARM POSITION SUB DESIRED seTR ADDR BR IF SEEK UNSUCCESSFUL * - READ/WR IT E Dl400 LOD esc 02410 MDX AD STD BSC SRA A STO LOO STD LD OR STO eSI 2 DZ912-X2 FETCH INTERMEDIATE 1010 eNT + SKIP. WD CNT NOT EXHAUSTED Dl210 BRANCH IF READ/WRITE DONE 2 DZ916-X2 DECREMENT WORD COUNT AND 2 D1912-X2 *INCREMENT SECTOR ADDRESS 1SKIP IF THIS IS LAST SECTOR 16 CLEAR ACCUMULATOR 2 DZ985-X2 ADO BACK 321 TO WD CNT 1 0 STORE RESULT IN I/O AREA 2 D1906-X2 RESTORE IOCC FOR ORIGINALLY 2 01904-X2 -REQUESTED OPERATION 1 1 ADD SECTOR NO. TO SECTOR 2 D1990-X2 -ADDRESS 1 1 2 DZ070-1-X2 START READ/WRITE OPERATION - READ/WRITE COMPLETE INTERRUPT PROCESSING - LD STO LD BSC BSI LOD STD LO BSC HOX MDX LOD STD LDO STO HDX 2 DZ975-X2 SET UP FOR READ CHECK 2 DI905-X2 2 DZ94.5-X2 FETCH FUNCTION INDICATOR I SKIP IF READ REQUESTED 2 DZ070-1-X2 START READ CHECK OPERATION 2 DZ902-X2 RESTORE LAST 2 WDS OF SEC1 0 -TOR PREVIOUSLY READ 2 DZ912-X2 FETCH INTERMEDIATE WD CNT + SKIP IF MORE READING/WRTING DZ410 6RANCH IF FINISHED I I 320 POINT XRl TO NEW I/O AREA 1 0 SAVE LAST 2 WDS OF SECTOR 2 DZ902-X2 -JUST READ/WRITTEN 2 DZ912-X2 WD CNT, SCTR AOOR NEXT OP STORE BOTH IN NEW I/O AREA 1 0 Dl240 BACK TO SET UP NEXT OPERATN SYS07580 SYS01590 SYS07bOO SYS07610 SYS07620 SYS01630 SYS07640 SYS01650 SYS07660 SYS07670 SYS01b80 SYS07690 SYS01100 SYS011l0 SYS07120 SYS01730 SYS07740 SYS07750 SYS07160 SYS07770 SYS07780 SYS07790 SYS07800 SYS01810 SYS07820 SYS07H30 SYS07840 SYS01850 SYS01860 SYS07870 SYS07880 SYS07890 SYS01900 SYS07910 SYS07920 SYS01930 SYS01940 SYS07950 SYSC1960 SYS01910 SYS01980 SYS01990 SYS08000 SYS08010 SYS08020 SYS08030 SYS08040 SYS08050 SYS08060 SYS08070 SYS08080 SYS08090 SV'S01l100 SYS08110 SYS08120 SYS08130 SYS08140 SYS08l50 SYS08160 SYS08170 SYS08180 SYS08190 SYS08200 SYS08210 SYSOll220 SYS08230 SYS08240 SYS08250 SYS08260 SYS08270 SYS08280 SYS08290 SYS08300 SYS08310 SYS08320 SYS08330 SYSOll34CJ SYS08350 SYS08360 SYS08370 SYSC8380 SYS08390 SYSC8400 SYS08'tl0 SYS08420 ADDR REl OBJECT 0008 OlCF OlDA OIDA 01DC 0100 OlOE ClEO 0 0 0 0 OOAO OOCO OOCO OOCO 0002 C ST.NO. 0843 0844 0845 0846 0847 0848 0849 0850 0851 0852 0853 lABEL opeD FT OPERAND5 • • B5S • DC $CIDN DC DC DC B5S $lEND ECJU ID/5EQNO 5Y508430 5Y508440 PATCH AREA 5YS08450 SYS08460 5YS08470 10 NO. OF CORE IMAGE lDR,Pl 5Y508480 CORE ADDR/CID NO. SYS08490 WORD COUNT 5Y508500 5CTR AODR 5YS08510 WO CNT, 5CTR AD DR CORE lOS 5Y508520 1 + END OF DI5Kl 5YS08530 11 .-..-. .-. ' CILl 2 EQUIVALENCE5 ADDR REl OBJECT 006E 0070 0071 0078 008C C080 O08E 008F 0090 0091 0092 0093 0094 0095 0096 0097 0098 OOAO 00A1 0014 0016 0017 0018 0019 001A 005A 00119 00D4 OOEf OOFO OOFl 0000 0001 0002 C003 0006 0007 0000 0000 0001 0002 C003 0004 0005 0006 0007 0008 0009 OOOA OOOB 0011 D01A 001C ST.NO. 0 0855 0856 0857 0858 0859 0860 0861 0862 0863 01i64 0 08b5 0 0 0 0866 0867 0868 0869 0870 0871 0872 0873 0874 0875 0876 0877 0878 0819 0880 0881 0882 :J883 )884 )885 )886 0887 0888 0889 0890 0891 (,'192 0139,:; 0894 0895 0896 0897 0898 0899 0900 0901 0902 0903 0904 0905 0906 0907 0908 0909 0910 0911 0912 0913 0914 0915 0916 0917 0918 0919 0 C C 0 C C C C 0 0 0 0 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C 0 0 0 0 0 G 0 0 0 C 0 0 C 0 0 0 0 0 lABEL OPCD FT OPERAND5 ID/5EQNO • • • 5Y508550 5Y508560 5YS08570 5YS08580 SYS08590 SYS08600 SYS08610 SY508620 5YS08630 SYS08640 SYS08650 SY508660 5'1508610 5,(S08680 SY508690 5YS08700 SYS08710 SYS08720 SY508730 SYS08740 5'(508150 SYS08160 5'(508770 5YS08780 5Y508790 5Y508800 S,(S08810 SY508820 SYS08830 5YS08840 5Y508850 5YS08860 5YS08870 SYS08880 5Y508890 5'(508900 SYS08910 5Y508920 5YS08930 5YS08940 SYS08950 5'(508960 S,(508970 S,(S08980 SY508990 5Y509000 SYS09010 5Y509020 5Y509030 5Y509040 SYS09050 5Y509060 SY509010 SYS09080 5,(5C9090 SYS09100 SYS09110 5Y509120 S,(S09130 SYS09140 5Y509150 5YS09160 S,(509110 5YS09180 S,(509190 EQUIVALENCES FOR PHASE 10 NUMBERS ' SUPI ' 5UP3 'SUP4 'ClBO '1403 '1132 'CPTR '2501 '1442 '1134 'KBCp 'CDCV 'PTCV 'KBCV 'DlID 'DlID 'ONID 'CIll 'CIl2 ECJU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EOU EQU EQU EQU EQU EQU EQU EQU 110 112 113 120 140 141 142 143 144 145 146 147 148 149 150 151 152 160 161 PHASE PHASE OHA5E PHASE PHASE PHASE PHA5E PHASE PHASE PHASE PHASE PHA5E PHASE PHASE PHASE PHASE PHASE PHASE PHA5E $RfoI5W $CXR1 $ClSW $OMPF $ACEX $CIlA $1 BT2 $loT4 $5NLT $PAU5 $RWCl Eeu EQU EQU Eeu Eeu Eeu EQU EQU EQU EQU EQU $HASH+2 $hASH+3 $HA5H+4 $HA5H+5 SHA5H+6 $5150+1 $1205+1 $1405+1 $DB5Y+l DlOOO-2 NAME OF lINK EXIT-lINK-DUMP SWI-1,0,+1) SAVE AREA fOR XR1 SW FOR CORE IMAGE lDR,PH 2 DUMP FORMAT CODE ACC AND EXT wHEN ENTER DUMP ADDR OF END OF DK I/O - 3 ADR OF SERVICE PART OF DKIO ADDR OF THE IBT 5EN5E lIGHT INDICATOR PAUSE,INTERRUPT INDICATOR READ/WRITE SWITCH ICARDl) 10 1D ID 10 10 ID ID 10 ID 10 ID ID 10 10 10 10 10 10 10 FOR FOR FOR FOR FOR FOR FOR FOR FOR FOR FOR FOR FOR fOR fOR FOR FOR fOR fOR • • EQUIVALENCES fOR RESIDENT MONITOR •$lKNM EQU $HASH SAVE AREA fOR DlOOO-1 MCRA DUMP PROGRAM ERR ANAL PROG ClB, PHASE 0/1 5YS 1403 5UBR SY S 1132 SUBR 5YS CP 5UBR SY5 2501 SUBR 5YS 1442 SliBR 5YS 1134 SUBR S,(S KB/CP SUBR SYS CD CONV 5YS 1134 CONV SY5 KB CONV DISKl DISKI OISKN CI LOADER,PH 1 CI lOADER,PH 2 • EQUIVALENCES fOR ABSOLUTE SECTOR ADDRESSES ' lOAD 'DCOM 'RIAD 'SlET 'RTBl 'HDNG 'STRT EQU EQU EQU Eeu EOU Eeu EQU 0 1 2 3 6 7 0 ADDR OF ADOR OF ADDROOF AODR OF ADDR OF ADOR OF ADDR OF SCTR SCTR SCTR 5CTR SCTR SCTR 5CTR WITH lD,DEF CYL ADR CONTAINING OCOM CONTAINING RE5 IMGE CONTAINING 5LET CONTAINING RElD TBL CONTAINING PAGE HDR WI COLD START PROG • EQUIVAlENCE5 FOR THE CORE IMAGE HEADER 'XE:QA 'CMON 'ORHJ 'FILE 'HWCT 'lSCT 'lOAD 'XCTl 'TVWC "wCNT 'XR3X 'I TVX ' IlS4 'OVSW 'ceRE EQU fQU EQU EQU Eeu Eeu Eeu Eeu EQU EQU EQU EQU EQU Eeu E:QU 0 I 2 3 4 5 6 7 8 9 10 11 17 26 28 RlTV RLTV RlTV RlTV RlTV SCTR RLTV RlTV RlTV RlTV RLTV RlTV RlTV RlTV CORE ADOR OF CORE lOAD EXEC ADOR ADDR OF WD CNT OF COMMON AODR OF DI5K I/O INDICATOR ADOR OF NO. FILES DEFINED ADDR OF WD CNT OF C1 HEADER CNT OF FILES IN WK 5TORAGE ADDR OF lOAD ADDR CORE LOAD ADDR DISK1/DI5KN EXIT CTRL AODR OF WD CNT OF TV ADDR OF WD CNT OF CORE LOAD ADDR OF EXEC SETTING OF XR3 ADOR OF 1ST WD OF lTV ADOR OF 1ST WD OF I6T4 ADDR OF lOCAl/SOCAl SWITCH SIZE OF BUILDING 5Y5TEM Appendix B. Listings 333 AODR REL OBJECT OOlD C 0005 0003 0000 0001 0003 0004 0000 0002 0005 0380 04CO 0600 0011 00F9 00F7 007F C a C 0 0 0 0 0 0 0 C 0 0 0 0 0 ST.NO. 0920 0921 0922 0923 0924 0925 0926 0927 0928 0929 0930 0931 0932 0933 0934 0935 0936 0937 0938 0939 0940 0941 0942 LABEl OPCD FT OPERANDS 'HcND EQU ID/SEQNO SYS09200 SYS09210 SYS09220 • EQUIVALENCES FOR LET/FlET SYS09230 5 WORD COUNT OF LET/FLET HEADER SYS09240 'LFHD Eeu NO OF WDS PER LET/FLET ENTRY SYS09250 3 'LfEN EQU RLTY AODR OF LET/FLET SCTR NO. SYS09260 0 'SCTN EQU RLTV ADoR OF SCTR ADoR OF UA/FXA SYS09270 1 'UAFX EQU SYS09280 3 RLTV ADDR OF WDS AVAIL IN SCTR 'WOSA Eeu 4 RLTV AoOR OF ADDR NEXT SCTR SYS09290 'NEXT EQU 0 RLTV AOOR OF LET/FLET ENTRY NAME SYS09300 'LFNM EQU IBlCT Eeu 2 RLTV ADDR OF LET/FLET ENTRY DaCT SYS09310 SYS09320 SYS09330 • MISCEllANEOUS EQUIVALENCES SYS09340 5 MAX NO. DRIVES SUPPORTED SYS09350 'MXDR EQU ICOMI EQU B96 LOW COMMON LIM IT FOR DISKZ SYS09360 SYS09370 1216 LOW COMMON LIMIT FOR DISK1 'COM1 EQU SYS09380 1536 LOW COMMON LIMIT OF DISKN 'CCH2 EQU NO. TRIES BEFORE DISK ERROR SYS09390 'TCNT r:QU 17 DZOOO .. 7 LIBF ENTRY TO DISKI/N SYS09400 'DKEP EQU OZOOO+S DISK I/O INTERRUPT ENTRY PT SYS09410 'DKIP EQU EQU 127 Y SYS09420 29 RLTV ADDR OF LAST WD OF CI HDR • COLD START PROGRAM ADDR REl OBJEC T ST.NO. 0944 0945 0946 0947 0948 0949 0950 0951 0952 0953 0954 0955 0956 0957 0958 0959 0960 0961 0962 0963 0964 0965 0966 0967 0968 0969 0970 0971 0972 0973 0974 0975 0976 0977 0978 0979 0980 0981 0982 0983 0984 0985 0986 0987 0988 0989 0990 0991 0992 0993 0994 0995 334 LABEL OPCD FT OPERANDS ID/SEQNO ••••••••••••••••••••••••••••••••••••••••••••••••••• SY$09440 * SYS09450 .STATUS - VERSION 2, MODIFICATION LEVEL O. • SYS09460 • SYS09470 .FUNCTION/OPtRATION • SYS09480 • THIS PROGRAM IS READ INTO CORE FROM SECTOR 0 • SYS09490 • OF THE SYSTEM CARTRIDGE AND TRANSFERRED TO BY • SYS09500 THE COLD START CARD. DEFECTIVE CYLINDER • SYS09510 • ADDRESSES, CARTRIDGE 10 AND DISKZ ARE ALSO ON - SYS09520 • SECTOR 0 AND ARE READ IN AT THE SAME TIME. • SYS09530 ALL THAT REMAINS FOR THE COLD START PROGRAM IS. SYS09540 TO READ IN THE RESIDENT IMAGE, SAVE THE • SYS09550 CARTRIDGE 10 AND TRANSFER TO THE AUXILIARY • SYS09560 SUPERVISOR THROUGH $DUMP IN THE RESIDENT • SYS09570 • MONITOR. • SYS09580 • • SYS09590 .ENTRY - CR010-2 • SYS09600 ENTER PROGRAM BY TRANSFER FROM COLO START CARD. SYS09610 • • SYS09620 -INPUT • SYS09630 • THE CARTRIDGE ID OF LOGICAL DRIVE ZERO (THE • SYS09640 SYSTEM CARTRIDGE) IS READ IN FROM SECTOR 0 • SYS09650 WITH THE COLO START PROGRAM. • SYS09660 • • SYS09670 .OUTPUT • SYS09680 • TH[ RESIDENT IMAGE IS READ INTO CORE FROM • SYS09690 THE DISK. • SYS09700 • • IN COMMA• SYS09710 SACOE • SYS09720 SCIBA-l • SYS09730 • SCION • SYS09740 • SCYLN • SYS09150 • SDBSY • SYS09760 $IOCT • SYS09770 • SYS09780 -EXTERNAL REFERENCES • SYS09790 OZOOO SUBROUTINE TO PERFORM DISK I/O. • SYS09800 • SYS09810 .EXITS • SYS09820 THE ONLY EXIT IS TO THE AUXILIARY SUPERVISOR - SYS09830 AS FOllOWS• SYS09840 BSI $OUMP • SYS09850 DC -1 • SYS09860 • SYS09870 .TABLES/WORK AREAS - N/A • SYS09880 • SYS09890 .ATTRIBUTES • SYS09900 • ~HIS PROGRAM IS NOT NATURALLY RElOCATABLE. • SYS09910 • • SYS09920 .NOTES • SYS09930 DISK ERRORS RESULT IN A WAIT AT $PST2. • SYS09940 ••••••••••••••••••••••••••••••••••••••••••••••••••• SYS09950 AOOR REL OBJECT OlEO OlEl 01E2 01E4 01E5 01E6 01E7 01E8 01E9 OlEA OlEB OlEC OlEO 01EE 01EF OlfO OlH 01F2 01F3 C1F4 01F5 01f6 01Fl 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1810 01B3 C81B 0 0 0 0 C01C 0120 C016 0181 0985 41CO ffFF 01fA 0013 0 0 0 0 0 0997 0998 0999 1000 1001 1002 1003 1004 1005 1006 1001 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1021 1028 1029 1030 1031 1032 1033 1034 1035 1036 1031 1038 1039 1040 1041 1042 617f C82E OCOOOO04 0125 C184 0120 0029C156 DOH COf8 1890 D16F 011B 4173 3000 01F8 0 01F9 0 0200 020E 020F 0210 0211 0212 ST.NO. 103F 0001 0007 00E8 0002 0212 ID/SEQNO LABEL OPCO FT OPERANDS -- READ THE RESIDENT IMAGE INTO CORE V LOX LDD CRnO SET UP WORD COUNT AND SCTR CROIO STO L SCIBA-1 -AODR Of RESIDENT IMAGE STO -INITIALIZE OEf CVL NO. 1 1 SCCYl-V LD fETCH LOG DRIVE 0 AREA coDe 1 3-V -AND STORE IT IN COMMA STO 1 $ACDE-V CR920+1 STO SAVE THE AREA CODE LO DZOOO-2-27-V FETCH AND SAVE THE STO SCION -CARTRIDGE 10 LD CR010+1 FETCH CORE ACOR Of RESIDENT SRT 16 -IMAGE AND PUT IN EXTENSION STO CLEAR DISK BUSV INDICATOR 1 SDBSV-V INITIALIZE ARM POSITION STO 1 SCYlN-V FETCH RESIDENT IMAGE BSI 1 DZOOO-Y WAIT WAIT OUT THE INTERRUPT - - INITIALIZE ITEMS IN COMMA - SRA STO LOO STO LD STO LD STO 16 UOCT-Y CR910 SCIBA-I-Y CR920+1 UCDE-Y CR905 O-V * TRANSFER TO * TO COMPLETE * BSI DC - CLEAR IOCS COUNTER *FOR SAVING CORE ON THE CII) fETCH AREA CODE RESET AREA CODE INITIALIZE WD ZERO TO BR TO -DUMP ENTRV POINT PLUS 1 THE AUXILIARV SUPERVISOR INITIALIZATION SOUMP-V -1 BR TO AUXILLIARV SUPERVISOR *FOR JOB PROCESSING 19 PATCH AREA BSS - CONSTANTS AND WORK AREAS CR905 MOX CR910 DC DC CR920 DC DC END X SDUMP+1-1 TO BE STORED IN LOCN ZERO WD CNT,SCTR AODR OF CAUSE 1 'HONG *HARMlESS WRITE TO DISK $DBSV-SCH12 WO CNT AND SCTR *ADOR OF RESIDENT IMAGE ' RIAO - SVS09970 SVS09980 SVS09990 SVSICOOO SVSIOOIO SVS10020 SVS10030 SVS10040 SVS10050 SVSI0060 SVSI0010 SVSI0080 SVS10090 SVSI0I00 SVSI0110 SVSI0120 SVSIC130 SVSI0140 SVS10150 SVSI0160 SVSI0170 SVS10180 SYS10190 SVSI0200 SVSI0210 SVSI0220 SVS10230 SVSI0240 SVS10250 SVS10260 SVS10270 SVSI0280 SVS10290 SVSI0300 SVS10310 SVSI0320 SVS10330 SVS10340 SVSI0350 SVSI0360 SYSI0310 SYS10380 SVSIC390 SVS10400 SVSI0410 SVSI0420 CROSS-REFERENCE SYMBOL CROIO CR905 CR910 CR920 OZOOO OZ010 DI020 DZ030 OZ060 OZ010 DllOO OZl80 OZl85 OZl90 OZ210 Dl215 OZ220 OZ225 01230 01235 01240 01250 OZ280 0Z300 Ol330 DZ3 /tO OZ350 DBSO OZ400 OZ410 VALUE 01E2 0200 020E 0210 00F2 COF7 00f9 OOFF 0104 0106 0108 010E 0116 0110 0146 014C 014E 0152 0157 0159 015E 0160 016E 0178 0170 018C 0197 01A4 OlAf 01Bl REt DEfN REFERENCES 0 0 0 0 0 0 0 0 0 0 0 1002 1031 1038 1040 0586 0593 0595 0601 0606 0610 0615 0621 0621 0636 0687 0695 0700 0106 0714 0715 0719 0734 0735 0746 0750 0764 0775 0790 0809 0811 1009 1024 1020 1001 0322 0604 0589 0639 0626 0191 0595 0594 0804 0696 0811 0767 0170 0773 0605 0600 0842 0742 0121 0137 0123 0702 0638 0710 0177 0836 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1006 0343 0617 1022 0603 0797 0596 0610 0823 0691 0831 0127 0728 0129 0125 0787 0802 0622 0683 {)146 0890 0891 0940 0941 1001 1013 0630 0140 Appendix B. Listings 335 SYMBOL '" 336 OZ900 01901 OZ902 OZ904 OZ905 01906 OZ907 OZ908 OZ909 01910 DZ911 OZ912 OZ913 OZ914 OZ915 01916 01920 01925 OZ930 OZ935 OZ940 OZ945 OZ950 OZ955 OZ960 OZ965 OZ910 OZ975 OZ980 01985 OZ990 01995 $ACOE $ACEX SCCAO $CH12 SCIBA SCION SCIlA SClSW SCOMN SCORE SCPTR SCTSW SCWCT SCXRl SCYlN SOABL SOAOR SOSSY SOCDE SDCYl SoDSW SOMPF SORfQ SOUMP «nuN VALUE 0122 C123 0124 0126 0127 0128 0129 012A 012B 012C 0120 al2E 012F 0130 C131 0132 0134 0135 0136 0137 0138 0139 Ol3A 013B 013C 0130 013E 013F 0140 0141 C142 0143 009F COLA 0014 0006 C005 010B 005A 0018 0007 OOOE C07E COOF 0072 C017 009A 0011 0010 COEE 0077 COM 0000 0019 0012 003F "--0(5'1'6- SEXIT SFlSH $FPAO SHASH SIBSY SIBT2 $IB14 SIOCT SIREQ SI200 SI205 $1210 $I29Q S1400 S1403 $1405 $1410 SI490 0038 0071 0095 0014 C013 00B9 0004 0032 002C 00B3 00B8 COBA 00C2 00C4 0000 0003 OOOS OOoE $1492 OOEO $1494 $KCSW $lAST SUVO SLEV1 $lEV2 $lEV3 $lEV4 $lEV5 SUNK 00E2 C07C 0033 0008 0009 000/\ 0008 OOOC 0000 0039 REl Off iii REFERENCES 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0645 0646 0647 0649 0650 0651 0652 0653 0654 0655 0656 0657 0658 0659 0660 0661 0663 0664 0665 0666 0667 0668 0669 0670 0671 0672 0673 0674 0675 C616 0677 0678 0428 0885 0355 0252 0251 0849 0886 0883 0253 0265 0365 0266 0353 0882 0418 0268 0267 0530 0358 0439 0521 0884 0269 0314 0357 0300 0351 0409 0271 0270 0887 0888 0291 0285 0465 0471 0472 0417 0497 C507 0511 0512 0522 0523 0526 0363 0292 0257 0258 0259 0260 0261 0262 0304 0653 0801 0627 0611 0828 0731 0757 0795 0754 0623 0762 0634 0747 0695 0635 0812 0158 0753 0739 0100 0133 0598 0761 0148 0126 0722 0724 0760 0751 0816 0749 0788 0672 0311 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a 0 0 0 0 0 0 0189 0717 0790 0832 0796 0839 0819 0706 0752 0764 0784 0718 0763 0809 0813 0834 084C 0156 0759 0829 0629 0688 0889 1011 0885 01118 0827 0155 0821 0673 1005 1002 1021 0673 1012 0344 0587 0602 0671 0624 0320 1003 0765 0319 1030 1031 0880 0881 0882 0883 0884 0315 0505 0259 0887 0466 0469 0261 0504 0888 0499 0498 0502 0508 0331 0689 0714 1019 1040 0309 1008 0341 0318 0671 0333 0334 0476 0467 0475 0516 0468 0500 0515 0501 1023 1040 SYMBOL $lKNM $lSAO $NOUP $NXEQ SPAUS $PBSY $PGCT SPHSE SPRET SPSTl SPST2 SPST3 SPST4 SRMSW $RWCZ SSCAN $SNLT SSTOP SSYSC $SOOO $S100 5S150 $S900 SS910 $UFOR SUFIO SULET $WROI SWSDR $lEND 51132 $1403 X2 y 'BLCT 'COCV 'CIll 'CIl2 'CLBO 'CHON 'COMZ 'COMI 'COM2 'CORE 'CPTR 'OCOM 'OKEP 'OKIP 'ONIO 'OREQ 'OlIO 'OlIO 'FILE 'HONG 'HENO 'HWCT 'lOAD , ILS4 '1TVX 'KBCP 'KBCV 'LOAD 'LFEN 'LFHD 'LFNM 'LSCT 'MXOR 'NEXT 'OVSW 'PTCV 'RIAO 'RTBL , SCTN 'SLET 'STRT 'SUP1 'SUP3 'SUP4 'TCNT 'TV\;C 'lJAFX 'WCNT 'WDSA 'XCTl 'XEQA 'XR3X '1132 '1134 '1403 '1442 '2501 VALUE REL OEFN REFERENCES 0014 0075 0034 0035 OOFO 0036 0037 0078 0028 0081 0085 0089 0080 0016 OOFl 0020 OOEF 0091 OOEO 0040 0041= 0059 003C 0031:: 0070 0079 0020 007B 007A OlEO 007F 0080 OOF2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0880 0356 0293 0294 0890 0295 0296 0359 0280 0371 0377 0383 0389 0881 0891 0274 0889 0396 0524 0329 0330 0340 0308 0310 0364 0360 0286 0362 0361 0853 0366 0367 0683 0338 007F C002 0093 OOAO 00A1 0078 0001 0380 04CO 0600 OOIC 008E 0001 00F9 COF7 0098 0002 0096 0097 0003 C007 COlO 0004 COOO 0011 OOOB 0092 0095 0006 0003 0005 0000 0005 0005 0004 COlA 0094 C002 0006 0000 0003 0000 CObE: 0070 0071 COll 0008 COOl 0009 0003 0007 0000 OOOA 0080 0091 008e C090 008F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0942 0931 0869 0875 0876 0861 0906 0936 :937 0938 0919 0864 0896 0940 0941 0874 0907 0872 0873 0908 0900 0920 0909 0895 0917 0916 0868 0871 0911 0925 0924 0930 0910 0935 092e; 0918 0870 0897 C89e; 0926 C898 0901 0858 0859 0860 0939 0913 0927 0914 0928 0912 0905 0915 0863 0867 0862 0866 0865 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a 0 0 0 0 0 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0282 0373 0379 0385 0391 0330 0701 0262 0398 0300 0306 0886 0321 0329 0636 0324 0323 0580 0582 0636 0762 0813 1000 0747 0763 0816 1003 0748 0764 0818 1004 0749 0765 0819 1005 0751 0784 0821 1007 0752 0788 0823 1011 0753 0789 0827 1012 0754 0790 0828 1013 0755 0791 0829 1019 0756 0795 0831 1021 0757 0796 0832 1023 0758 0797 0834 1025 0759 0801 0839 1030 0760 0809 0840 0761 0812 0848 0581 1039 1041 0601 NO STATEMENTS FLAGGED IN THIS ASSEMBLY Appendix B. Listings 337 APPENDIX C. ABBREVlA TIONS Below is a list of the abbreviations used in the listings of the 1130 Disk Monitor System, Version 2. Included in this list are the abbreviations used in current 1130 and 1800 systems. Abbreviation Meaning ABS ACC ACCT ACT ADDL ADDR ADJ ADV AI ALG ALLOC ALLOCN ALPHA ALT AO APPDGE APPROX ARITH ASDNG ASM ASMBL ASGN AUX AVAIL AVG Absolute Accumulator, Accumulate Account Actual Additional Address Adjust Advance Analog Input Algebraic Allocate Allocation Alphabetic Alternate, Alteration Analog Output Appendage Approximate Arithmetic Ascending Assembler Assemble Assign Auxiliary Availability Average BEGNG BFR BKSP BLK BLKCNT BLNK BR BM Beginning Buffer Backspace Block Block Count Blank Branch Buffer Mark CAD CALC CAR CARR CART CAT CATLGD Core Address Calculate, Calculator Channel Address Register Carriage Cartridge Catalog Cataloged Abbreviation Meaning CC CD CDE CHAN CHAR CHK CHG CHKPT CIB CIL CLB CLD CLR CLS CMN CMP CMPL COMMA COMP CNSL CNT COL COMM CON COND CONT CORR CP CPLD CPTN CTR CTRL CURR CVRT CYL Card Column Card Code Channel Character Check Change Checkpoint Core Image Buffer Core Image Loader Core Load Builder Core Load Clear Close COMMON Compare Complement Communication Area Compute Console Count Column Communication Constant Condition Continue Correction Console Printer, Control Parameter Coupled Computation Counter Control Current Convert Cylinder DAO DB DC DCMT DEC DECML DECR DEF DEFN DEL DESCG Digital-Analog Output Disk Block Data Channel Document Decision Decimal Decrement Defective Define Delete Descending Appendix C. Abbreviations 339 Abbreviation DETM DEVC DGT DI DICT DIM nmCTY DISP DISPCHG DK DLMTER DPC DR DSW DT DUP DUPCTN Determine Device Digit Digital Input Dictionary Dimension Directory Displacement Dispatching Disk Delimeter Direct Program Control Drive Device Status Word Defective Track Disk Utility Program Duplication EBC ELIM ELT ENT EOF EOJ EOR EP EQ EQU ERP ERR ES ETV EVAL EXCH EXEC EXP EXPR EXTYP EXTR EBCDIC Eliminate Element Entry End Of File End Of Job End Of Reel Extended Precision Equal, Equate Equate Error Parameter Error Electronic Switch Executive Transfer Vector Evaluate Exchange Execute Exponent Expression Exit Type Extract FAC FOR FlO FLD FLDL FIG FLET Floating Accumulator FORTRAN FORTRAN I/O Field Field Length Figure The Location Equivalence Table for the Fixed Area Floating Format From FLT FMT FR 340 Meaning Abbreviation Meaning FREQ FUNC FWD FXA FXD Frequency Function Forward Fixed Area Fixed GEN GENL GM GT GTE Generator General Group Mark Greater Than Greater Than or Equal To HDLER HDR HEX HI HLT HSK HYPER Handler Header Hexadecimal High Halt Housekeeping Hypertape IAR IC ID IDX ILS ILSW INCR IND INDN INDR INFO INITLZ INQ INT INTFCE INTLD INTM INTl\I1D INTNL INTRPT I/O 10AP 10CC IOCR INST INTERP INVAL ISS ITER ITG I/P Instruction Address Register Instruction Counter Identification Index Interrupt Level Subroutine Interrupt Level Status Word Increment Indicate Indication Indicator Information Initialize Inquire Initial Interface Interlude Interim Intermediate Internal Interrupt Input/Output I/O Area Parameter I/O Control Command I/O Control Routine Instruction Interpret Invalid Interrupt Service Subroutine Iterate, Iteration Integer Input Abbreviation Meaning KB KP Keyboard Keypunch LBL LCT LD LET Label List Control Table Load Location Equivalence Table for User Area Left Left-Hand, Leftmost Link/Busy Word Literal Line Length Low Location Load -on -Call Subroutine Less Than Less Than or Equal To Letter Level LFT LH LINKB LIT LN LNG LO LOC LOCAL LT LTE LTR LVL MACH MAGT MAINT MALF MAX MEM MIN MISC ML MOD MON MPXR MPY MRGE MSG MSTR Machine Magnetic Tape Maintain, Maintenance Malfunction Maximum Memory Minimum Miscellaneous Mainline Mnemonic Modification Monitor Multiplexor Multiply Merge Message Master NEC NEG NO. NORM NUM NXT Necessary Negative Number Normalize, Normalized Numeric Next OBJ OP O/p Object Operation Output MN Abbreviation Meaning OPN OPND OPTN OPTR ORG OVFLO OVLP OVLY Open Operand Option Operator Origin Overflow Overlap Overlay PAPT PARAM PARTL PERF PERPHL PFM PG PGLIN PH PHYS PK PKD PNCH PNDG POS PR PREC PRE V PRGE PRI PRINC PROC PROG PROT PRTN PRVNT PT PTR PTV Paper Tape Parameter Partial Perforate, Perforated, Perforation Peripheral Perform Page Page and Line Phase Physical Pack Packed Punch Pending Position Print Precision Previous Purge Priority Principal Process Program Protect Partition Prevent Pointer, Point Printer Positive QUALFD QUANT QUE Qualified Quantity Queue RAND R+S R/W RCD RCV RD RDY Random Reset and Start Read/Write Record Receive Read Ready Appendix C. Abbreviations 341 Abbreviation 342 Meaning REF REG REL RELOC REQ RET RH RI RLS RLTV RM RO RPT RSLT RST RSTRT RT RTE RTN RWD Reference Register Release Relocate, Relocatable Request, Require Return Right-Hand, Rightmost Read in Reels Relative Record Mark Read Out Report Result Reset Restart Right Route Routine Rewind SAD SAT SAH SCHED SCN SCTR SECT SEL SEN SEQ SEQNO SER SEG SIG SIM SK SLET SM SNGL SOCAL SP SRCH SPEC ST STA STD STG STMNT STP Sector Address Satellite System Action Required Schedule, Scheduler Scan Sector Section Select Sense Sequence Sequence Number Serial Segment Signal Simulator Skeleton System Location Equivalence Table Storage Mask Single System Load-On-Call Subroutine Space Search Specification, Specify Store Station Standard Storage, Storing Statement Standard Precision Meaning Abbreviation SUB SUBP SUBR SUBSC SUMM SUP SUP SYNC SYM SYSRx SYST SW Subtract Subprogram Subroutine Subscript Summarize Suppress Supervisor Synchronize, Synchronizer Symbol System Reserved Word (x is a digit) System Switch TBL TECHNQE TEMP TERM TM Table Technique Temporary Terminal, Terminate Tapemark T ransmis sion Transmit Total Tape Transfer Track Trailer Truncate, Truncation Test Tape Unit Transfer Vector Typewriter TMN TMT TOT TP TR TRK TRLR TRUNC TST TU TV TW UA UAR UFLO UNC UNLD UNPKD UTIL V VAL VAR VIOL VOL WD WM WR WRK WS User Area User Action Required Underflow Unconditional Unload Unpacked Utility Version Value Variable Violation Volume Word Word Mark Write Work Working Storage Meaning Abbreviation wi w/o With Without XPL XR1 XR2 XR3 XTR Explain, Explanation Index Register 1 Index Register 2 Index Register 3 Extra Z ZN Zero Zone Meaning Abbreviation 1st 2nd 3rd 4th 5th 6th 7th 8th 9th First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Appendix C. Abbreviations 343 APPENDIX D. Disk Monitor System Component Microfiche Identification System Loader (Paper Tape) Bootstrap Phase 1 Phase 2 BAA. 001. 00 BAA. 002. 00 BAA. 003. 00 System Loader (Card) Bootstrap Core Image Loader Phase 1 Phase 2 BAA. 004. 00 BAA. 005. 00 BAA. 006. 00 BAA. 007. 00 Disk Utility Program DUPCO DCTL STORE FILEQ DDUMP DMPLT DELET DFINE DEXIT CDFAC KBFAC PTFAC PRECI JAA. 001. 00 JAA. 002. 00 JAA. 003. 00 JAA. 004. 00 JAA. 005.00 JAA. 006. 00 JAA. 007. 00 JAA. 008. 00 JAA. 009. 00 JAA. 010. 00 JAA. OIl. 00 JAA. 012. 00 JAA. 013. 00 FORTRAN Compiler Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 8 Phase 9 Phase 10 Phase 11 Phase 12 Phase 13 Phase 14 Phase 15 Phase 16 KAA. 001. 00 KAA. 002. 00 KAA. 003. 00 KAA. 004. 00 KAA. 005. 00 KAA. 006. 00 KAA. 007. 00 KAA. 008. 00 KAA. 009. 00 KAA. 010. 00 KAA. OIl. 00 KAA. 012. 00 KAA. 013. 00 KAA. 014. 00 KAA.015.00 KAA. 016. 00 MICROFICHE REFERENCE TABLE Disk Monitor System Component Phase Phase Phase Phase Phase Phase Phase Phase Phase Phase Phase 17 18 19 20 21 22 23 24 25 26 27 Microfiche Identification KAA. 017. 00 KAA. 018. 00 KAA. 019. 00 KAA. 020. 00 KAA. 021. 00 KAA. 022. 00 KAA. 023. 00 KAA. 024. 00 KAA. 025. 00 KAA. 026. 00 KAA. 027.00 Assembler Program Phase 0 Phase 1 Phase 1A Phase 2 Phase 2A Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 7A Phase 8 Phase 8A Phase 9 Phase 10 Phase lOA Phase 11 Phase 12 Error Message Phase Punch Conversion Phase Read Conversion Phase Supervisor Monitor Control Record Analyzer System Core Dump Program Auxiliary Supervisor Core Load Builder MAA. 001. 00 MAA. 007. 00 MAA. 008. 00 MAA. 012. 00 MAA. 013. 00 MAA. 010. 00 MAA. OIl. 00 MAA. 015. 00 MAA. 016. 00 MAA. 017. 00 MAA. 018. 00 MAA. 019. 00 MAA. 020. 00 MAA. 014. 00 MAA. 003. 00 MAA. 009. 00 MAA. 004. 00 MAA. 005. 00 MAA. 006. 00 MAA. 021. 00 MAA. 002. 00 NAA. 001. 00 NAA. 002. 00 NAA. 003.00 OAA. 001. 00 Appendix D. Microfiche Reference Table 345 Disk Monitor System Component Microfiche Identification System Device Subroutines PAA. 001. 00 Standard Precision Arithmetic and Function Subroutine s FADD FAXI FDIV FDVR FGETP FLD FMPY FSBR FABS FATN FAXB FEXP FLN FSIGN FSIN FSQR FTANH SFAR SFIF RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. RAA. 001. 001. 001. 001. 001. 002. 002. 002. 002. 002. 003. 003. 003. 003. 003. 004. 004. 004. 004. Extended Precision Arithmetic and Function Subroutine s EADD EAXI EDIV EDVR EGETP ELD EMPY ESBR EABS EATN EAXB EEXP ELN ESIGN ESIN ESQR ETANH SEAR SElF FARC SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. 001. 00 001. 00 001.00 001. 00 001.00 002.00 002.00 002.00 002.00 002. 00 003. 00 003.00 003.00 003.00 003.00 004.00 004.00 004. 00 004.00 004.00 346 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Disk Monitor System Component FIXI FLOAT IFIX NORM SNR XDD XMD XMDS Microfiche Identification SAA. SAA. SAA. SAA. SAA. SAA. SAA. SAA. 005. 00 005. 00 005.00 005. 00 005. 00 006. 00 006. 00 006. 00 FORTRAN Common Subroutine s (No Precision) FBTD lABS XSQR PAUSE STOP SUBIN SUBSC TTEST DATSW DVCHK FCTST ISIGN OVERF PDUMP SLITE TSTOP TSTRT TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. TAA. 001. 001. 001. 001. 002. 002. 002. 002. 002. 003. 003. 003. 003. 003. 004. 004. 004. FORTRAN Trace Subroutine s SGOTO SIAR SnF TAA. 009. 00 TAA. 009. 00 TAA. 009. 00 FORTRAN Conversion Subroutine s and Table s EBCTB GETAD HOLEZ HOLTB TAA. TAA. TAA. TAA. 006. 006. 007. 007. 00 00 00 00 FORTRAN 110 Subroutines SDFIO SDFND SFIO UFIO TAA. TAA. TAA. TAA. 004. 005. 005. 006. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Disk Monitor System Component Microfiche Identification FORTRAN Device Subroutines CARDZ PAPTZ PNCHZ PRNTZ PRNZ READZ TYPEZ WRTYZ TAA. 006. 00 TAA. 007.00 TAA. 007.00 TAA. OOB. 00 TAA. OOB. 00 TAA. OOB. 00 TAA. OOB. 00 TAA. OOB. 00 Interrupt Level Subroutines (ILSs) ILSOO ILS01 ILS02 ILS03 ILS04 UAA. 001. 00 UAA. 001. 00 UAA. 001. 00 UAA. 001. 00 UAA. 001. 00 Interrupt Service Subroutines (ISSs) CARDO CARD1 OMPR1 PAPT1 PAPTN PAPTX PLOT1 PNCHO PNCH1 PRNT1 PRNT3 READO READ1 TYPEO WRTYO UAA. 002. 00 UAA. 002. 00 UAA. 002. 00 UAA. 002. 00 UAA. 002. 00 UAA. 003. 00 UAA. 003. 00 UAA. 003. 00 UAA. 003. 00 UAA. 004. 00 UAA. 004. 00 UAA. 004. 00 UAA. 004. 00 UAA. 005. 00 UAA. 005. 00 Conversion Subroutines and Tables EBPRT HOLEB HOLPR HXBIN PAPEB PAPHL PAPPR SPEED UAA. 005. 00 UAA. 005. 00 UAA. 006. 00 UAA. 006. 00 UAA. 006. 00 UAA. 006. 00 UAA. 006. 00 UAA. 007.00 Disk Monitor System Component ZIPCO BIDEC BINDC BINHX CPEBC CPHOL CPPT3 DCBIN DECBI EBCCP EBHOL EBPA EBPT3 HLEBC HLPT3 HOLCP HOLL PRTY PT3CP PT3EB PTHOL Microfiche Identification UAA. 007.00 UAA. 007. 00 UAA. 007. 00 UAA. 007. 00 UAA. OOB. 00 UAA. OOB. 00 UAA. OOB. 00 UAA. OOB. 00 UAA. OOB. 00 UAA. 009. 00 UAA. 009. 00 UAA. 009. 00 UAA. 009. 00 UAA. 009. 00 UAA. 010. 00 UAA. 010. 00 UAA. 010. 00 UAA. 010. 00 UAA. 010. 00 UAA. 011. 00 UAA. 011. 00 utility Dump Subroutines DMPBO DMTDO DMPD1 UAA. 011. 00 UAA. 011. 00 UAA. 012. 00 System Subroutines SYSUP FLIPR UAA. 013. 00 UAA. 012. 00 Mainline Programs ADRWS COpy DISC DLCIB DSLET IDENT ID MODIF PTUTL CALPR FSLEN RDREC UAA. 014. 00 UAA. 014. 00 UAA. 015. 00 UAA. 016. 00 UAA. 016. 00 UAA. 017.00 UAA. 017. 00 UAA. 01B. 00 UAA. 019. 00 UAA. 019. 00 UAA. 019. 00 UAA. 020. 00 Plotter Subroutines ECHAR VAA. 001. 00 Appendix D. Microfiche Reference Table 347 Disk Monitor System Component ECHRX EGRID EPLOT ERULE FCHAR FCHRX FGRID FPLOT FRULE PLOTI PLOTX POINT SCALE SCALF XYPLT SCA Interrupt Service Subroutines (ISSs), Conversion Subroutines, and Conversion Tables EBC48 HOL48 HOLCA HXCV 348 Microfiche Identification VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. VAA. WAA. WAA. WAA. WAA. 001. 00 001. 00 001. 00 002. 00 002. 00 002. 00 002. 00 003. 00 003. 00 003. 00 003. 00 003. 00 004. 00 004. 00 004. 00 001. 001. 001. 001. 00 00 00 00 Disk Monitor System Component PRNT2 SCAT1 STRTB Stand-alone Programs Cold Start Card Console Printer Core Dump (Paper Tape) Console Printer Core Dump (Card) DCIP 1132/1403 Printer Core Dump (Paper Tape) Phase 1 Phase 2 1132/1403 Printer Core Dump (Card) Phase 1 Phase 2 PTREP UCART Microfiche Identification WAA. 002. 00 WAA. 003. 00 WAA. 004. 00 ZAA. 001. 00 ZAA. 003. 00 ZAA. 002. 00 ZAA. 004. 00 ZAA. 007. 00 ZAA. 008. 00 ZAA. ZAA. ZAA. ZAA. 005. 006. 009. 010. 00 00 00 00 INDEX Assembler program 65 Communications area 66 Core layout 71 Double-buffering 67 Error message phase 71 Flowcharts 220 General 65 Intermediate I/O 67 Introduction 2 Overlay area 66 , Phase 0 67 Phase 1 67 Phase lA 68 Phase 2 68 Phase 2A 68 Phase 3 68 Phase 4 68 Phase 5 68 Phase 6 69 Phase 7 69 Phase 7A 69 Phase 8 69 Phase 8A 69 Phase 9 69 Phase 10 70 Phase lOA 71 Phase 11 71 Phase 12 71 Program operation 65 Punch conversion phase 71 Read conversion phase 71 Symbol table 66 Auxiliary supervisor 23 Cartridge -dependent parameters COMMA 3 DCOM 3 CIB (see core image buffer) Cold start loader 15 Cold start program 15 Cold start programs 15 Cold start loader 15 Cold start program 15 Core layout 15 Flowcharts 191 Introduction 1 COMMA (in-core communication area) (see also resident monitor) Communications areas 3 Cartridge-dependent parameters 3 Disk-resident (DCOM) 3 Drive-dependent parameters 3 Introduction 1 In-core (COMMA) 3 3 Core image buffer (CIB) Core load builder 34 Core image loader 27 Core layout 28 Debugging/ analysis aids 30 Flowcharts 203 Introduction Phase 1 27 Phase 2 27 Special techniques 27, 28 Core load builder 33 Core image buffer (CIB) 34 Core layout 33 Debugging/ analysis aids 42 DEFINE FILE table 39 Disk buffers 34 FILES information 35 Flowcharts 205 General comments 33 Interrupt branch table (IBT) 35 Interrupt level subroutines (ILSs) Introduction 2 ISS table 35 Linkage to LOCALs 37 Linkage to SOCALs 38 Load table 35 LOCAL information 35 LOCALs 37 NOCAL information 35 Overla y scheme 33 Pass 1 36 Pass 2 36 Phase 0 40 Phase 1 40 Phase 2 40 Phase 3 41 Phase 4 41 Phase 5 41 Phase 6 42 Phase 7 42 Phase 8 42 Phase 9 42 Phase 10 42 Phase 11 42 Phase 12 42 SOCALs 37 Transfer vector (TV) 37 37 DCIP 111 DCOM 3 DEFINE FILE table (DFT) Core load builder 39 DFT (see DEFINE FILE table) Disk cartridge initialization program (DCIP) 111 Index 349 Disk I/O subroutine Resident monitor 17 Subroutine data charts 125 System library 102 Disk utility program (DUP) 43 CFACE phase 59 Communications area (CATCO) 45 Control records 44 Core layout 43 DCTL phase 51 DDUMP phase 55 DEFINE phase 57 DELE TE phase 57 DEXIT phase 58 Diagnostic aids 63 DUMPLET/DUMPFLET phase 56 Dupeo phase 49 FILEQ phase 54 Fixed location equivalence table (FLET) 44 Flowcharts 207 Introduction 2 KFACE phase 60 Location equivalance table (LET) 44 PFACE phase 60 PRECI phase 62 STORE phase 52 Disk-resident communications area (DCOM) 3 Drive -dependent parameters COMMA 3 DCOM 3 DUP (see disk utility program) FILES control record processing Disk utility program 54 Supervisor 22 FILES information in SCRA Disk utility program 55 Supervisor 22 Fixed location equivalence table (FLET) FLET 44 Flowcharts 185 Assembler program 220 Cold start programs 191 Core image loader 203 Core load builder 205 Disk utility program 207 FOR TRAN compiler 244 Supervisor 193 System library 274 System loader 186 FORTRAN compiler 73 Communications area 76 Compilation errors 81 Compiler I/O 81 Core Layout 75 Flowcharts 244 General 73 Introduction 2 350 44 Phase area 77 Phase objectives 73 Phase 1 82 Phase 2 82 Phase 3 83 Phase 4 83 Phase 5 84 Phase 6 84 Phase 7 85 Phase 8 85 Phase 9 86 Phase 10 86 Phase 11 87 Phase 12 88 Phase 13 89 Phase 14 89 Phase 15 90 Phase 16 91 Phase 17 92 Phase 18 93 Phase 19 94 Phase 20 94 Phase 21 95 Phase 22 95 Phase 23 95 Phase 24 96 Phase 25 96 Phase 26 96 Phase 27 96 Statement string 80 String area 77 Symbol table 78 IBT (see intelTUpt branch tablj;!) ILSs (see intelTUpt level subroutines) Interrupt branch table (IBT) Core load builder 35 Interrupt level subroutines (ILSs) Core load builder 37 Skeleton supervisor 1 7 System library 105 Interrupt service subroutines (ISSs) Subroutine data charts 152 System library 102 Introduction 1 ISSs (see interrupt service subroutines) LET 44 LOCAL control record processing Disk utility program 54 Supervisor 22 LOCAL information in SCRA Disk utility program 55 Supervisor 22 LOCAL linkage in TV 37 LOCALs 37 Location equivalence table (LET) 44 MCRA (see monitor control record analyzer) Monitor control record analyzer (MCRA) 19 JOB control record processing 19 Other control record processing 20 System update program 20 NOCAL control record processing Disk utility program 54 Supervisor 22 NOCAL information in SCRA Disk utility program 55 Supervisor 22 Procedures Core dump 115 Core location 115 Generalized subroutine maintenance/analysis 120 Identification of the failing component or function 113 Program analysis 113 Subroutine looping 120 Trace back 120 Program analysis procedures 113 Core block diagrams 115 Core dump procedures 115 Core location procedures 115 Generalized subroutine maintenance/analysis procedure 120 Identification of the failing component or function 113 Introduction 113 Subroutine data charts 125 Subroutine error number list 115 Subroutine error stop list 115 Subroutine looping capabilities 120 Summary 113 Trace back procedure 120 Reload table System loader 14 Resident monitor 17 COMMA 17 Disk I/O subroutine Flowcharts 193 Introduction Skeleton supervisor 17 17 SCRA (see supervisor control record area) Skeleton supervisor 17 CALL LINK, CALL EXIT, CALL DUMP processor Error traps 17 ILSs 17 SLET System loader 13 SOCAL linkage in TV 38 SOCALs 37 Stand-alone utilities 111 DCIP 111 Introduction 2 UCART 112 17 Subroutine data charts 125 CARDZ 140 CARDO 152 CARD 1 154 DISKN 180 DISKZ 138 DISKl 177 OMPRl 174 PAPTN 170 PAPTZ 150 PAPTl 168 PLOTl 172 PNCHZ 142 PNCHO 158 PNCHl 160 PRNTZ 148 PRNTl 164 PRNT3 166 PRNZ 147 READZ 144 READO 156 READ 1 157 System device subroutine for console printer 130 System device subroutine for disk 138 System device subroutine for keyboard/console printer 125 System device subroutine for 1132 132 System device subroutine for 1134/1055 136 System device subroutine for 1403 134 System device subroutine for 1442/1442 126 System device subroutine for 2501/1442 128 TYPEZ 145 TYPEO 162 WRTYZ 146 WRTYO 176 Subroutine error numbers 115 Subroutine error stops 115 Supervisor 19 A uxiliary supervisor 23 Core layout 24 Introduction Monitor control record analyzer (MCRA) 19 XEQ control record processor 21 System core dump program 23 Supervisor control record area (SCRA) Disk utility program 55 Supervisor 22 Supervisor control record processing Disk utility program 54 Supervisor 22 Symbol table Assembler program 66 FOR TRAN compiler 78 System core dump program 23 System device subroutines 109 Introduction 2 Subroutine data charts 125 System library 99 Arithmetic and function subroutines, common 100, 102 Index 351 Arithmetic and function subroutines, extended precision 99, 101 Arithmetic and function subroutines, standard precision 100, 101 Conversion subroutines 103 Conversion tables 103 Flowcharts 274 FORTRAN common 99, 101 FOR TRAN conversion 101 FORTRAN I/O 100 FOR TRAN sign transfer 99 FORTRAN trace 100 Interrupt level subroutines (ILSs) 104, 105 Interrupt service subroutines (ISSs) 102 Introduction 2 Mainline programs 104, 105 Plotter subroutines 104 SCA subroutines 103 Utility subroutines 99 System Loader 9 352 Cartridge identification sector 13 Core layout 12 Flowcharts 186 Introduction 1 Phase 1 9 Phase 2 10 Reload table 14 System location equivalence table (SLET) System location equivalence table (SLET) System loader 13 Transfer vector (TV) Core load builder 37 TV (see transfer vector) XEQ control record processor 21 Supervisor control record area (SCRA) 22 Supervisor control record processing 22 XEQ control record processing 21 13 READER'S· COMMENT FORM Form IBM 1130 Disk Monitor Programming System, Version 2 Program Logic Manual Y26-3714-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. • Does this publication meet your needs? • Did you find the material: Easy to read and understand? Organized for convenient use? Yes No D D D D D D D D D ~m~~? D Well illustrated? Written for your technical level? D D • What ~ your occupation? ~~~~~~~~~~~~~~~~~~~~~~~~~~~ • How do you use this publication? As an instructor in a class? D As an introduction to ~he subject? D As a student in a class? D For advanced knowledge of the subject? D As a reference manual? D For information about operating procedures? D Other~ _________________________________________________________________ • Please give specific page and line references with your comments when appropriate. COMMENTS • Thank you for your cooperation. No postage necessary if mailed in the U.S.A. Y26-3714-0 YOUR COMMENTS, PLEASE ••• I' This SRL bulletin is one of a series which serves as reference sources for systems analysts, programmers and opera tors of IBM systems. Your answers to the questions on the back of this form together with your comments, will help us produce better publications for your use. Each reply will be carefully reviewed by the persons responsible for writing and publishing this material. All comments and suggestions become the property of IBM. Please note: Requests for copies of publications and tor assistance in utilizing your IBM system should be directed to your IBM representative or to the IBM sales office serving your locality. 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 . . . IBM Corporation Monterey & Cottle Rds. San Jose, California 95114 Attention: Programming Publications, Dept. 232 fold fold International Business Machines Corporation Data Processing Division 112 East Post Road, White Plains, "l.Y.10601 [USA Only] IBM World Trade Corporation 821 United Nations Plaza, New York, New York 10017 [ International] t Y26-3714-0 ...... ...... w o International Business Machines Corporation Data Processing Division 112 East Post Road, White Plains, N.Y.106Ot [USA Only] IBM World Trade Corporation 821 United Nations Plaza, New York, New York 10017 [ International]
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:28 09:31:58-08:00 Modify Date : 2012:08:28 09:54:56-07:00 Metadata Date : 2012:08:28 09:54:56-07:00 Producer : Adobe Acrobat 9.52 Paper Capture Plug-in Format : application/pdf Document ID : uuid:76f51bc3-091f-4f4f-94b8-18ca66449dbf Instance ID : uuid:0c8655f1-a857-4256-a5f0-f4e427c4e653 Page Layout : SinglePage Page Mode : UseOutlines Page Count : 363EXIF Metadata provided by EXIF.tools