C26 5774 1_1620_Monitor_II_System_Reference_Manual_Apr65 1 1620 Monitor II System Reference Manual Apr65
C26-5774-1_1620_Monitor_II_System_Reference_Manual_Apr65 manual pdf -FilePursuit
C26-5774-1_1620_Monitor_II_System_Reference_Manual_Apr65 C26-5774-1_1620_Monitor_II_System_Reference_Manual_Apr65
User Manual: C26-5774-1_1620_Monitor_II_System_Reference_Manual_Apr65
Open the PDF directly: View PDF .
Page Count: 184
Download | ![]() |
Open PDF In Browser | View PDF |
File No. 1620-36 Form C26-5774-1 Systems Reference Library IBM 1620 Monitor II System Reference Manual This publication describes the 1620 Monitor II System, a combined operating and programming system. This system includes a Supervisor Program, a Disk Utility Program, an SPS II-D Assembler, and a FORTRAN II-D Compiler. The latter three programs operate under control of the Supervisor Program to provide continuous operation. Also described is the 1620-1443 Monitor II System. This system is designed to use the IBM 1443 Printer as an integral unit in the processing of source programs. :,;1,/ ; '":3¥r,JJi-~\:) , ,~:,~,(:t"'OMMAt-':: This is a reprint of an earlier publication (C26-5774-0) incorporating the following Technical Newsletters: Form No. Pages Date N26-0057 Cover, 3-4, 17-18, 21-22, 25-26, 29-30, 37-38, 49-50, 53-54, 55-56, >87-88, 1Q7-108, 109-110, 113-114, 117-118, 123-124, 125126, 127-128, 131-132 Cover, iii-iv, 5-6, 93-94, 101102, 102.1-blank, 117-118, 119120, 121-122, 123-124, 125-126, 129-130, 131-132, 133-134, 135136, 143-144, 153-154 1(20(64 N26-0064 2/20(64 N26-0080 Cover, iii-iv, 135-135.1, 135.2135.3, 135.4-135.5, blank-136 5(22(64 N26-0091 135-135.1, 135.4-135.5, 135.6136 10(1164 N26-0095 1-2, 3-4, 5-6, 11-12, 13-14, 2324, 24.1-blank, 35-36, 39-40, 4950, 55-56, 65-66, 67-68, 69-70, 71-72, 73-74, 77-78, 85-86, 8990, go. I-blank, 111-112, 126.1blank, 131-132, 133-134, 135135.1, 135.6-136, 137-138 3-4, 7-8, 15-16,23-24,39-40,8384, 107-108, 123-124, 129-130, 133-134, 135.4-135.5, 135.6-136, 155-156 12(14(64 N26-0111 4/16(65 The original publication and applicable newsletters are not obso;, lete. Copjes~ of this and other IBM publications can be obtained through IBM Branch Offices. A fonn has been provided at the back of this publication for readers' comments. If the form has been detached, comments may be directed to: IBM, Programming Publications Dept. 234, San Jose, Calif. 95114 @ International Business Machines Corporation 1963 ii Contents Page Page Supervisor Program ............................................................ Monitor Control Records ................................................ Stacked Input ...................................................................... Monitor Control Record Analyzer Routine .................... I/O Routine ........................................................................ I/O Error Routine ............................................................ Error Count Retrieval Routine ........................................ Loader Routine .................................................................. Monitor II System Communications Areas .................... 1 8 8 13 14 17 20 23 23 25 I/O Macro-Statements .......................................................... 81 Linkages for GET, PUT, and SEEK ......................•......... 82 Linkages for CALL LINK and CALL LOAD .............. 82 Linkage for CALL EXIT .................................................. 82 Input/Output Declarative Statements .............................. 82 SPS II-D Processor ................................................................ 84 Operating Procedures ........................................................ 84 On-Line Error Correction ................................................ 87 Post Assembly Phase ........................................................ 87 Execution of SPS II-D Object Programs ........................ 89 Rules of Relocatability ...................................................... 90 SPS II-D Modification Program ...................................... 91 Disk Utility Program ........................................................ Write Addresses Routine .................................................... Alter Sector Routine ....... ................................................. Disk-to-Output Routine .................................................... Load Programs Routine .................................................... Replace Programs Routine .......... ............................... ....... Disk-to-Disk Routine ........................................................ Delete Programs Routine ...... ............................................ Define Parameters Routine .. .............................................. Define Disk Pack Label Routine ...................................... Define FORTRAN Library Subroutine Name ................ Error Detection and Correction ........................................ FORTRAN and SPS Output ............................................ 27 28 29 30 32 34 35 36 36 37 38 38 41 1620 SPS II-D .................................................................... Introduction ........................................................................ Symbolic Programming ...................................................... Coding Sheet ...................................................................... Statement Writing .............................................................. Operands ............................................................................ Types of Addresses Used as Operands ............................ Programming the 1620/1710 Using SPS II-D .................... Declarative Operations ......................•............................... 1620/1710 Imperative Operations .................................... Processor Control Operations .......................................... 1710 Product-Area Macro-Operations .............................. 1620 Subroutines .................................................................... Classification of Subroutines ............................................ Subroutine Macro-Instructions .......................................... Floating-Point Arithmetic .................................................. Description of 1620 Subroutines ...................................... Adding Subroutines .......................................................... 42 42 42 43 45 47 49 52 52 60 62 65 66 66 67 69 72 77 mM 1620 Monitor II System FORTRAN II-D ..................................................... .:.............. FORTRAN II-D Language .............................................. Arithmetic Statements ........................................................ Control Statements ............................................................ Input/Output Statements .................................................. Specification Statements .................................................... Library Functions .................................. ............................ Arithmetic Statement Functions ........................................ Subprogram Statements .................................................... FORTRAN II-D Processor .................................................... General Compilation Process .......................... ............... ... FORTRAN II-D Control Records .................................... Entering the Source Program ............................................ Object Program Execution ................................................ Operating Procedure .......................................................... Adding Subroutines to the FORTRAN Library .............. FORTRAN Subprograms Written in SPS ...................... Disk Storage Location of the FORTRAN Compiler ...... IBM 1620-1443 Monitor II ~ystem ................................ Supervisor Program ........................................................ Disk Utility Program ...................................................... SPS II-D .......................................................................... FORTRAN II-D .............................................................. 93 93 98 99 103 106 112 114 115 117 117 118 119 126 129 131 133 135 135.1 135.1 135.1 135.1 135.4 Monitor II System Loader ................................................ 136 Card Formats ...................................................................... 136 Operating Procedures ..................... ................................... 136 Appendix A 138 Appendix B 154 Index ............................... ,...................................................... 156 lii Preface These records direct the sequence of jobs without interrupting continuous operation. A typical sequence of jobs could be a compilation of FORTRAN programs, assembly of sps programs, compilation and execution of a FORTRAN program, execution of a disk-stored program, and punching of a disk-stored program into cards. . In data processing installations, a large amount of computer idle time may be spent between jobs to set up the computer for the next job. Programs must be readied, data must be readied, etc. The amount of time spent in these activities is greater in installations where many different jobs are part of the daily schedule. Because computer utilization is usually based upon the time spent in executing a job, utilization may appear to be low where multiple jobs increase setup time. To increase 1620 computer utilization, the user may now adopt the 1620 Monitor Programming System. The primary function of a monitor system is to provide continuous operation during a sequence of jobs which might otherwise involve the manual loading of several independent programming systems. To do this, the Monitor coordinates computer activity by providing a communication region for independent programming systems and by transferring control between them. Operation is continuous and setup time is reduced. This effects a substantial time saving in computer operation and allows greater flexibility in programming. The monitor concept - to control the operation of several unrelated routines and machine runs so that the computer and computer time are used advantageously - is not new. This concept, previously employed by other large-storage-capacity data processing systems, is made possible for the 1620 by the 1311 Disk Storage Drive. Through the use of Monitor II, it is possible to assemble, assemble and execute, compile, compile and execute, and execute programs stored in disk storage. In addition, the normal disk storage maintenance tasks, such as storing programs, can be performed by the system. A stacked input arrangement provides direction for the system. This direction is given in the form of control records, which are prepared prior to the actual operation by the programmer and/or operator. In addition to substantial saving of computer time, Monitor II reduces the amount of programming time required by the user. This is made possible through the sharing of common subroutines by unrelated programs. For example, input and output for all sps object programs can be performed by a common input/ output subroutine. Because most programs require a subroutine of this nature, it has been made an integral part of the Monitor II System, available to all 1620 user programs. To use the Monitor System, the programmer must pay particular attention to control records and stacked input arrangements described in this publication. In addition to directing the sequence of jobs, control records allow the user the Hexibility of assigning the specifications for each job. Various jobs, each with its own control record, are entered into the 1620 in the stacked arrangement. Jobs are performed , in the order in which they are encountered, under control of the Monitor and without operator attention. However, some messages generated by the Monitor regarding the status of processing may require operator intervention. The IBM 1620 Monitor II System is comprised of four separate programs: Supervisor Program Disk Utility Program SPS II-D FORTRAN II-D The material contained in this publication is organized and presented under these headings. iv IBM 1620 Monitor II System Monitor II (Figure 1), a collective name for four distinct but interdependent programs - Supervisor, Disk Utility, SPS II-D, and FORTRAN II-D programs - is a powerful, combined operating and programming system. Systems of this type have previously been available only on other large-storage capacity computers. The 1311 Disk Storage Drive with two-million positior": of storage makes possible the implementation of such a system on the 1620. Although both sps and FORTRAN are included with the Monitor System, either may be deleted from the system, if desired. The complete Monitor System resides in disk storage and only those routines or programs required at anyone time are transferred to core' storage for execution. This feature, which is common to a Monitor System, minimizes core storage requirements and permits segmenting of long programs. It makes anyone of many programs accessible to the computer with minimum delay or manual operation. Inclusion of sps and FORTRAN programming languages in the Monitor System facilitates development of a library of user object programs. Programs can r------- 1620 Monitorll- System - - ---, 1620 Supervisor Program ~ ~ 1620 1620/1710 1620 FORTRAN n-D Compiler SPS ll-D Assembler Disk Utility Program L- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Figure 1. 1620 Monitor II System ......J be stored in cards or paper tape, as they were stored in the past. In addition, they can be stored in disk storage without the necessity of assigning actual storage areas, remembering or documenting the storage assignments, and updating assignments and documentation as conditions change. These disk-stored programs can be referred to by a name or number when called for execution. If a program is added to the user's repertoire of programs, the storage locations of the other programs may be adjusted to prevent the overlapping of data in disk storage. An account of available disk storage is kept for the user as adjustments are made to disk storage. To make effective use of disk storage, a common disk working area is maintained for all facets of the Monitor System. One use for this area is to store intermediate output from FORTRAN compilations or sps assemblies to speed up these operations. Approximately 22 percent of disk module zero is used for the Monitor System itself. The remainder of disk storage, with the exception of a few sectors on each additional disk module, can be used for user programs and data records. The use of disk storage is controlled by three diskstored tables. The first and major table is the Disk Identification Map. known as DIM. Each disk-stored item (program, data, or table) has a DIM entry which contains information on where the item is stored, how many disk sectors it occupies, and, if it is a program, its core storage address. Thus, to refer to an item, it is only necessary to use its DIM entry number. For those who prefer to use an alphabetic name instead of a number, a second table, called Equivalence table, lists the names and their equivalent DIM entry numbers. The third table, a Sequential Program table, shows the assignment of disk storage by DIM entry numbers and the availability of unassigned storage. Maintenance of these tables is performed automatically by the Monitor without user supervision or direction. To examine the Monitor System, it is best to summarize the functions of its various parts: Supervisor Program, Disk Utility Program, SPS, and FORTRAN. Subsequent sections present the detailed information IBM 1620 Monitor II System 1 required to program and operate. each one. The four primary functions of the Supervisor Program are: • • • • Input/output I/O error detection and correction Program loading Control Individual routines which perform these functions follow. Input/Output routine, which performs all I/O functions (card, paper tape, typewriter, or disk) for the Monitor System. I/O Error routine, which provides for error detection and correction for all I/O operations performed by the Input/Output routine. Loader routine, which loads object programs into core storage from card, paper tape, typewriter or disk input. Monitor Control Record Analyzer routine, which records and interprets jobs to be performed, and transfers control to other routines or programs while maintaining communication so that control may eventually be returned to itself. Because all input/output is processed by the Input/Output routine, all data, programs, or control information from any input unit enter the 1620 CPU through this routine. The Input/Output routine is able to segment the continuous How of input information into discrete jobs. Certain information is recognized as control information. With the proper control information, the Monitor could, for example, execute a particular series of jobs consisting of (1) compiling a FORTRAN program and executing it using supplied data from any input source, (2) loading an SPS object program from disk storage and executing it .using data supplied from any input source. All of thIS can proceed automatically from one task to the ~ext without stopping the machine for operator action. Thus, ease of operation is achieved with increased efficiency and throughput. The Input/Output routine recognizes Monitor control information by two record marks (=f==f=). If the first two columns of a card or tape record contain record marks, the control information is examined by the Monitor Control Record Analyzer routine to see which one of twelve possible tasks is to be performed next. 1. =f==f= JOB, initiates a new job. 2. =f==f= sps, indicat~s that an SPS source program ( s ) is to be assembled. 3. =f==f= SPSX, indicates that an SPS source program is to be assembled and executed. 4. =f==f= FOR, indicates that a FORTRAN source program ( s) is to be compiled. 5. =f==f= FORX, indicates that a FORTRAN source program is to be compiled and executed . 6. =f==f= DUP, indicates that a Disk Utility routine is to be executed. 7. =f==f= TYPE, indicates the next control record is to be entered from the typewriter by the operator. 8. =f==F PAUS, allows operator action. 9. =f==f= XEQ, initiates loading and execution of an SPS object program. 10. =F=f= XEQS, initiates loading and execution of FORTRAN or sps object programs with subroutines. 11. =F=F=F=f=, is used to indicate the end of a job. 12. =f==f=, serves as a Comments record. These control records can be classified as being one of three types. Type 1 provides control information which is used as instructions to the Supervisor Program. Type 2 provides for loading and starting the execution of user-written programs, using data from control records to initialize various subroutines used by programs. Type 3 provides for functions similar to type 2 except that the FORTRAN, SPS or the Disk Utility Program with its functional capabilities is also executed. When FORTRAN, SPS, or the Disk Utility Program is executed, all input records are examined for an asterisk (.) in the first position to determine if they are control records. These records have two functions: (1) they provide information about specific Disk Utility jobs to be performed, (2) they provide the specifications for FORTRAN compilations or SPS assemblies. Ten Disk Utility Control records provide various user options. Each of these control records transfers control to an individual routine to perform the desired function. 1. ·DWRAD, indicates sector addresses are to be written on a disk pack. 2. ·DALTR, allows the operator to alter disk-stored data from the typewriter. 3. ·DDUMP, indicates disk-stored data or programs are to be outputted in cards, paper tape or on the typewriter. indicates a program is to be loaded into disk storage from cards, paper tape, or the working cylinders. To eliminate the necessity of having an entire object program in core storage for execution at anyone time, a CALL macro-instruction is provided. This instruction enables an object program in core storage 5. °DREPL, indicates a disk-stored program is to be to be overlayed with instructions from disk storage. replaceq by another. Thus, the size of an object program can be virtually 6. ° DCOPY, indicates that data or programs are to unlimited. be copied into another area of disk storage. Immediately follOwing assembly, an object program 7. oDELET, indicates a program is to be deleted is located in the disk working cylinders. It can be from disk storage. stored in disk storage without outputting it in some other form, thereby greatly reducing program loading S. °DFINE, allows changes to be made to the Monitime. Program listings can be obtained in either card tor System specifications. or typewriter form. The program can also be immedi9. °DLABL, is used to write identity labels on disk ately executed or punched out into cards or paper packs. tape for loading and executing at any later time. 10. °DFLlB, allows names to be assigned to FORTRAN Any library subroutine set may be used by an library subroutines. object program. User-written relocatable programs can be automatically added to the library subroutine Examples of FORTRAN and SPS asterisk control records set, if desired. are: The FORTRAN compiler translates programs written FORTRAN SPS Description in the FORTRAN II-D language into 1620 machine lan°poBJP4 °OUTPUUARD Punch object program guage. Because of the large storage capacity of the into cards 1311, source programs are read into the computer °PSTSN4 °PUNCH SYMBOL Punch Symbol Table Just once. Intermediate output is stored in the disk TABLE into cards work area to minimize input/output time. Following The many routines of the Disk Utility Program are compilation, an object program may be executed imdesigned to perform the necessary but tedious disk mediately, punched into cards or paper tape, or stored housekeeping functions. Items stored on the disk in disk storage for executiun at a later time. or items to be stored on the disk can be referred to Statements are provided in the FORTRAN language symbolically; that is, by a symbolic name. The Monithat permit the use of disk storage. These statements tor System will allocate and keep track of disk storage provide for (1) defining the size and quantity of data areas for the user. records to be stored, (2) reading and writing on disks, The SPS ll-D assembler translates programs written ( 3) positioning the disk access mechanism for readin symbolic language into machine language. The ing or writing, (4) returning control to the Supervisor symbolic language is an extension of 1620/1710 SPS. after execution of a FORTRAN object program, (5) overOnly one pass of the source statements is required belaying programs in core storage with other programs cause intermediate output is stored op the disks. Also, from disk storage and executing the overlaying prothe Symbol table is disk stored, thereby allowing for grams. assembly of programs with a great number of labels. Subprograms can reside in either core or disk storAn additional symbol table, known as the System age. Disk-stored subprograms can be called into core Symbol table allows different SPS source programs to storage only when needed. Thus very large problems use common labels. can be accommodated. I/O macro-instructions are provided in the SPS New floating-point and subscripting subroutines, language to relieve the programmer of writing Input/ which use the Indirect Addressing feature and comOutput routines in source programs for card, paper piler algorithms, provide for efficient object program tape, or disk operations. Thus, all I/O functions inexecution. Subroutines written in SPS II-D language cluding error detection and correction can be standcan easily be added to the FORTRAN subroutine library. ardized. GET and PUT macro-instructions are used for Also, subprograms written in SPS can be called for reading and writing. These instructions generate apexecution by FORTRAN programs or subprograms. propriate linkages to the Input/Output routine which Object programs, either SPS or FORTRAN, can be does the actual reading or writing (card, paper tape, or disk). punched into cards or paper tape following assembly 4. °DLOAD, IBM 1620 Monitor II System 3 or compilation, if desired. However, assembly or compilation time is shortened if the object program is stored in disk storage rather than cards or papertape. A standard System Output format, which may be in absolute or relocatable form,. is used to output object programs. Only the programs outputted in the standard format can be reloaded by the Monitor System. sps and FORTRAN source programs are assembled or compiled using a given mantissa length, noise digit, subroutine set, etc., specified in a common Communications Area. These given specifications are used for all assemblies or compilations; however, the user may change one or more of the specifications, such as mantissa length, with control records for a particular assembly or compilation. SPS or FORTRAN source programs can be entered into the 1620 from cards, paper tape, or typewriter. Object programs, however, can be entered from cards, paper tape, or disk storage. Data, of course, can be entered from any input source as directed by an object program. SPS II-D and FORTRAN II-D object programs will be in a System Output format. System Output consists of relocatable or absolute records. The relocatable format allows the programmer to specify a diHerent core storage address for the start of a program each time it is loaded. All addresses within a program that are being relocated are adjusted relative to a new starting address. The starting address (relocation address) is specified by means of a control card at load time. Absolute format, which can he generated by the SPS II-D assembly program, is assembled to load to a fixed core storage area. Machine Requirements The Monitor II System operates on a 1620 System, Model 2, which has a minimum of 20,000 positions of core storage, a 1311 Disk Storage Drive, Model 3, and index registers. In addition, the Automatic FloatingPoint Operations feature is required to execute FORTRAN object programs. Disk storage drive 0 (address block 00000-19999) is required for storing the Monitor System. A description- of the loading process, including operating procedures, is included under MONITOR II SYSTEM LOADER. During operation of the Monitor System, the disk pack cpntaining the Monitor System can be on any disk module. To begin operation of the Monitor System, load the Supervisor Program into core storage from disk storage. NOTE: Indirect Addressing must be selected ON. Loading the Supervisor Program is accomplished by entering from the typewriter or a card, the following instructions : Core Storage Address of Instruction 00000 00012 00024 00031 00032 Instruction 34 00032 00701 36 00032 00702 49 02402 X Y1963611300102 X identifies the form of input for the Monitor Control records: 1 for typewriter, 3 for paper tape, and 5 for cards. Y specifies the disk drive code (1, 3, 5, 7) identifying the disk module where the Monitor II System is loaded. (Any time the Monitor pack is moved to a different drive, this sequence of instructions must be repeated.) When the Release and Start key or Load key is depressed, the Supervisor Program is read into core storage and the first Monitor Control card is read in under control of the Supervisor Program by the Monitor Control Record Analyzer routine. This routine reads all control records and types them out to inform the operator of the status of processing. If operator intervention is required for any reason, the routine will type a message and halt the 1620. Processing can be resumed as explained in the section concerning the MONITOR CONTROL RECORD ANALYZER ROUTINE. The Parity, I/O, and Overflow Program switches should be on PROGRAM to operate the Monitor II System. Operation The Monitor II System is available in either card or paper tape versions, ready for loading to disk storage. After either version is loaded, both cards and paper tape may be used with the programs. The system is self-loading, i.e., it contains the loading instructions that enable it to load itself into disk storage. For handling convenience, a sequencenumber is punched in card columns 76-80 of card input. 4 Disk Storage Requirements Portions of cylinders 24-25 and 78-99 of module 0 are used by the Monitor System. Unused portions of these cylinders can be listed using the Disk-to-Output routine to obtain an availability list. A list of the assigned cylinders and DIM entry numbers associated with the programs, routines, and tables stored in this disk area follows. Program/Table Working Storage DIM table Equivalence table FORTRAN Subprogram Loader FORTRAN Library Subroutines SPS Library Subroutines FORTRAN I/O and Arithmetic Subroutines FORTRAN Compiler Cylinders DIM Numbers 00-23 1 24 3 2 25 138, 147, 149, 80,84 150, 152, 157 *10-39, 170-199 81 82-83 **40-130 144-146, 200-202 78,79, 84,97 79,86-90 136-137, 153, 156, 203 85,91-92 139-143, 154, 155 93-96 8, 9, 131, 132 133 85 134, 148 98 Disk Utility Program SPS Assembler SPS Subroutine Supervisor Supervisor Program with I/O Routine System Output Loader Routine 98 135 1440, 1401, 1410, Systems 99 166-169 Header Label Area *** Monitor Disk Pack Labp.I *** 99 158-161 Mutual Disk Pack Identifica99 162-165 tion Label *** Sequential Program table *** 99 4, 5, 6, 7 System Area 99 151 *Only DIM entries 10-25 and 170-185 are in use when the system is delivered. **Only DIM entries 40-57, 70-87, 100-117, and 130 are in use when the system is delivered. ** *Present on all available modules. Any program or routine not to be used may be deleted from disk storage using the Disk Utility Program, Delete Programs routine. All areas are assigned automatically to module 0 when the system is initially loaded; however, certain assignments can be altered by the user as described in the section concerning 1620 Disk Utility Program, under DEFINE PARAMETERS ( DFINE) CONTROL CARD. With this entry it is possible to utilize more than one disk storage drive and to enlarge or shorten the tables used by the Monitor System. WORKING CYLINDERS Cylinders 00-23, reserved for working storage, are available to every program. This area is not available for permanent storage of programs and data. This area is identified by DIM entry 0001. The working cylinders may be thought of as a "scratch pad"; i.e., an area for storing intermediate results. These results should be moved to another disk area if they are to be retained for further use. Because the Monitor System uses this area to perform its function, the contents of the area are continually changing. However, an object program will occupy the area at the beginning of the working cylinders immediately after compilation or assembly 'is completed. EQUlVALENCE TABLE When a user's object program, identified by name, is loaded into disk storage by its compiler or by the DLOAD or DREPL routines of the Disk Utility Program, its name as well as its DIM entry number is entered in the EqUivalence table. Sixteen digit positions are required for each entry, twelve for the 6-character alphabetic name and four for the DIM entry number that starts with 0001. Eighty sectors with a capacity of 500 program names are reserved to store the Equivalence table immediately following the standard DIM table (cylinder 24). When the Monitor System is delivered, the first 51 entries are reserved for the system, fifty for FORTRAN library subroutine names and one for the SPS ll-D modification program. Unused names in the first 50 entries will be identified by a field of 16 nines. When a name, other than a FORTRAN subroutine, is added to the table, it is placed in the 16 positions follOWing the last entry. When a name, other than a name from the first 50 entries, is deleted from the table, all entries in higher-numbered positions are shifted left to overlay the deleted entry. Thus, the table, with the exception of the first 50 entries, will contain only those entries that are in force at any one time. The rightmost position of the table is identified by a record mark. DISK IDENTIFICATION MAP (DIM) TABLE The Supervisor Program, Disk Utility Program, SPS assembler, and FORTRAN compiler use th,is table to find subroutines, data areas, or tables in disk storage. The DIM table on cylinder 24 can accommodate up to 999 20-digit entries. One entry is required for each program or data area permanently stored in disk storage. The format of the 20-digit DIM entry follows: DDDDDDSSSCCCCCEEEEE =f= DDDDDD is the disk sector address of the program or data. SSS is the sector count. ccccc is the core address. If this field is all 9's, the program is in System Output fonnat (see SYSTEM OUTPUT FORMAT). If the units position is flagged, the Subroutine Supervisor is used to load the program. EEEEE is the entry address. This address is relative to the load address (first core address to be loaded) for programs in relocatable format. $, $ =f=' or =F is the rightmost character of a DIM entry. These characters indicate the following conditions about a referenced program. IBM 1620 Monitor II System 5 Character S 4= =*= File Protected Pennanentll Assigned Yes Yes No No No Yes No Yes NOTE: (1) That a file-protected program can be read but not written because it has read-only Hags written in all (or anyone) of the sector addresses in the disk area which it occupies. If read-only Hags are written by a user's program in sector addresses where a program is stored, that disk storage area will not be «file protected," however, data cannot be written in individual sectors which contain read-only Hags. ( 2) That a permanently assigned program cannot be repositioned (moved) in disk storage because it has been assigned to a given address by the user. The Supervisor Program locates a DIM entry in the following manner: 1. It refers to the Equivalence table to find the 4-digit DIM entry number. 2. It doubles this number and adds the sum to 048000. 3. It uses the leftmost five digits of the result to locate the disk sector of the DIM table. 4. It uses the rightmost digit of the result to find the particular DIM entry. The DIM table can be expanded (see DEFINE PARAMETERS ROUTINE) to contain up to 4995 DIM entries, an increase of 999 entries for each additional cylinder, 4 additional cylinders maximum. Available sector numbers always begin with 9 ( 9xxx ); the three rightmost digits denote the number of consecutive available sectors. For example, 9021 indicates that 21 consecutive sectors are unused within a cylinder. A maximum of 200 available sectors can be represented by an entry. Cylinder entry numbers always begin with 70 (70xx); the two rightmost digits represent the cylinder number. One hundred of these entries are contained in the table, one for each of the 100 cylinders numbered 00-99. An example of how the three types of entries might appear in a Sequential Program table for cylinders 48-52 follows: 7048 0434 0435 7049 0436 9010 0437 7050 0437 7051 0437 7052 0437 where the programs identified by DIM entry numbers 0434 and 0435 occupy all 200 sectors of cylinder 48, and the programs identified by DIM entry numbers 0436 and 0437 occupy all sectors of cylinders 49-52, with the exception of 10 unused sectors between the two programs in cylinder 49. Note that programs that overlap cylinders will have the associated DIM entry number repeated for each cylinder on which it is stored. The length of the Sequential Program table is 80 sectors unless changed by a DFINE control record (see DISK UTILITY PROGRAM). Fifty sectors should provide sufficient space in the table if 1000 programs are to be written on a disk pack. Therefore, the user may want to lengthen or shorten the table for his particular needs. SEQUENTIAL PROGRAM TABLE The second through eighty-first sectors (80 sectors) of cylinder 99 are reserved on each disk pack for a Sequential Program table which lists the programs, tables, and data areas sequentially by DIM numbers, and available storage space by special coding. The Sequential Program table is used by the 1620 Disk Utility Program to determine the order of programs and available storage space. When a program is added to or deleted from disk storage, the table is updated to reHect the new squence. Each 80-sector table will accommodate up to 2000 4-digit entries. Three types of entries are included in a table. 1. entry numbers for every program or data area specified in the DIM table. 2. Availab1e sectot count to in_dicate the number of available sectors between programs or data within cylinders. 3. Cylinder entry numbers to identify the beginning of each cylinder. 6 IBM 1440, 1401, 1410, Systems Header Label Area To facilitate the processing of common disk packs, a standard alphabetic identification label is created on the 1401, 1410, or 1440 Systems. This label is not used by the 1620 System. The disk storage area (first 19 sectors of the last disk track of the last cylinder), reserved for this label can be released for other storage purposes, using the DELET Disk Utility routine, if a disk pack will be used with the 1620 only. The DIM entries for the four modules that may be connected to the system are 166, 167, 168, and 169. DIM Mutual Disk Pack Label A 5-digit disk pack identification label that can be used by the other systems (1440, 1401, or 1410) must be written on the 32nd through 36th position on the last sector of cylinder 99. This sector should be given the sector address 00199 regardless of the addressing scheme used on the remainder of the disk pack. The sector can be labeled automatically using the Define Disk Pack Label routine of the Disk Utility Program. Inter-Phase - May be Used by Object Program 00000 - 00099 00100 - 00400 Arithmetic Table. System Cammunications Monitor Disk Pack Label 00402 - 00439 02040 1 ()C)4M) - The first sector of cylinder 99 is a label sector, that is, it contains a label to identify the disk pack. Each disk pack used by the Monitor System must include this label. A 5-digit disk pack· identification number in the five leftmost positions of the sector constitutes the label. This number is used to provide protection for user's records as explained in the section entitled DISK PACK IDENTIFICATION NUMBERS. This file-protected label must be generated using the Define Disk Pack Label routine. The DIM numbers for these labels are: 0158, 0159, 0160, and 0161 for packs placed on modules 0, 1, 2, and 3, respectively. I/O Routine, I/O Error Routine, loader Routine and Initializing Routines. 020402 - 19999 Supervisor Program, Monitor Contro I Record Ana Iyzer Routine, SPS Processor, and FORTRAN Compiler. (May be Used by Object Programs.) 20000Available Storage Core Storage Requirements The Monitor II System requires certain areas of core storage in order to operate. Core storage positions 00100-02401 must be permanently assigned to the Monitor II System; however, positions 00000-00099 and 02402-19999 are, only temporarily assigned to the system. A temporary area is available to the user for execution of object programs. The core storage layout for the Monitor II System follows. r 1 IBM-1620 MpnitOf'I1 System 7 Supervisor Program The Supervisor Program performs the control functions and Input/Output (I/O) functions for the 1620 Monitor System. The FORTRAN ll-D compiler and the SPS II-D processor, under control of the Supervisor Program, can be used to compile or assemble machine language object programs. The Disk Utility Program, also under control of the Supervisor Program, can be used to write disk addresses, to alter a disk sector of data from the typewriter, to load, update, and move programs in disk storage, to delete programs from disk storage, and to copy data, disk to disk. SPS I1-D or FORTRAN II-D object programs can be loaded from cards or paper tape into disk storage under control of the Supervisor Program. Because the I/O functions are performed by a routine contained in the Supervisor Program, the programmer need not concern himself with writing these routines in SPS source language. By use of a macro-instruction in the sps source program, cards and paper tape can be read and punched, data can be stored and retrieved from disk storage, and data can be read and typed from the typewriter under control of the I/O routine in the Supervisor Program. When a macro-instruction is encountered in a source program, linkage instructions, which provide an exit to an I/O rQutine, are created in the object program. If desired, the user may manually code linkage instructions without the use of macro-instructions. Manually coded linkage instructions offer certain input/output options, unobtainable with macro-instructions. Error checking and correction procedures are a part of the I/O routine. The Supervisor and Disk Utility Programs use the I/O routine to perform their assigned tasks. Monitor Control Records Although the Monitor Control records are described in terms of cards, these records can be in paper tape or typewriter form. The input to the Supervisor Program consists of one or more "job decks" (Figure 2). A job deck, as the term is used in this manual, may be a program to be compiled or assembled, a combination of these two (including data); it may also be a series of Disk Utility Program operations. The Processing of each 8 job deck is controlled by the Supervisor as specified by the Monitor Control card tbatprecedes it. When a Monitor Control card is read, the program required to do the job is read into core storage from disk storage. The program then processes input until the end of the job deck is reached, a new Monitor Control card is encountered, or an error occurs. When the end of a job deck is reached or a new Monitor Control card is encountered, the Supervisor Program is reloaded into core storage from disk storage, and the process is repeated. If an error occurs, a message will print to identify the error, and the remainder of the job will be processed. If it is not possible for the job to continue, the Supervisor Program will skip to the next job. All Monitor Control records, with the exception of those entered from the typewriter, will be typed out on the 1620 console typewriter. The 1620 Monitor II System uses eleven Monitor Control cards to indicate the processing required of the 1620 Supervisor Program. The manner in which the Supervisor handles each of these cards is described in Figure 3. Operation Codes An alphabetic pseudo operation code, left-justified in columns 3-6, is used to identify each of the eleven Monitor Control cards. By examining the operation code, the Supervisor Program is able to determine what processing action is required. JOB A JOB operation causes (1) the description or operating instructions contained in the JOB Monitor Control card to be typed, ( 2 ) modifies the module, if required, and (3) checks to ensure that the proper disk packs have been attached by the operator. SPS This operation causes the SPS II-D assembly program to be read into core storage from disk storage and to be executed. The assembled object program may be stored in disk storage and an entry made in the DIM (Disk Identification Map) table. ~ SPsx operation is similar to the SPS operation, h one exception: after the object program is asIbled, it is then executed. FOR operation causes 'gram to be read into ~ and to be executed. red in disk storage. If de in the DIM table. the FORTRAN II-D compiler core storage from disk storThe object program can be this occurs, an entry will be \X e FORX operation is the same as the FOR operation, with one exception: the object program is executed after it is compiled. XEQ The XEQ operation causes the SPS II-D object program, identified by the Monitor Control card data, to be read into core storage from the input device indicated in column 27, and then to be executed. If the object program requires any of the sps subroutines to operate, or if the object program is a FORTRAN compiled program, the XEQS operation must be used instead of the XEQ operation. Each disk-stored program, called by the XEQ operation, must have a DIM entry to enable the Supervisor Program to find it. ,tacked Input (Card, or Paper Tape) 1311 Drive 0 Program Monitor Control Card 1620 Drive 1 Drive 2 Drive 3 Disk Storage I/O Ure 2. Processing Input Data Under Supervisor Control Supervisor Program 9 XEQS STACKED INPUT (Monitor Control Card., Data Card., SPS and FORTRAN Source Card., Di.k Utility Program Control Card.) 1620 Supe ..../iso( . with I/O Routine Type Description Load SPS II-D Processor into Core Storage from Di.k Storage and Execute Load FORTRAN II-D Compiler into Core Storage from D i.k Storage and Execute Load Di.k Utility Program into Core Storage from Disk Storage and Execute Enter Succeeding Monitor Control Record. from Typewriter HALT Depress Start Key to Resume Processing This operation causes an SPS II-D or FORTRAN II-D object program, identified in the Monitor Control card, to be read into core storage from disk storage, cards, or paper tape, and to be executed. If the object program uses any of the SPS subroutines, the XEQS operation must be used. Each disk-stored program called by the XEQS operation must have a DIM entry to enable the Supervisor Program to find it. DUP The DUP operation causes the 1620 Disk Utility Program to be read into core storage from disk storage and to be executed. TYPE The TYPE operation causes a message - which requests the operator to enter the next 'Monitor Control record from the typewriter - to be typed and the program to stop to await keyboard input. After the operator enters the Monitor Control record, the Release and Start key should be depressed to resume computer operation. All succeeding control records must be entered from the Typewriter until a JOB Control record is entered to change the source of input. PAUS The PAUS operation halts the program to allow the operator to change paper tapes, load input cards, etc. Job processing is resumed by depressing the Start key. =l==l= The Load SPS II-D Object Program without Subroutine. into Core Storage from Di.k Storage and Execute Lood FORTRAN II-D or SPS II-D Object Progrom with Subroutines into Core Storage from Disk Storage and Execute (END-OF-JOB) =f= =f= (end-of-job) operation causes the message END OF JOB to be typed, if a job has actually started, and control is to be resumed by the Supervisor Program. An endof-job record must follow each job. If this record is not present, erroneous results may be obtained. Monitor Control Card Formats Pass Card. to next Monitor Control Card Columns No Pass Cards to Next Monitor Job Card Figure 3. 10 JOB. Logic of Supervisor 1-2 3-6 7 =F=F (identification r e cor d marks) Operation (JOB, left-justified). Source of input, 5 == card. 3 == paper tape. 1 == typewriter. 8-11 12-31 32-80 Module change numbers (for disk input only). Disk pack identification numbers (for disk input only), 12-16 drive O. 17-21 drive 1. 22-26 drive 2. 27-31 drive 3. Description. 3-6 7-12 13-16 SPS, FOR, DUP, TYPE, PAUS. Columns 1-2 3-6 7 =t==f= (identification r e cor d marks). Operation ( SPS, etc., left-justified). Source of input, for sPs, FOR, or DUP Monitor Control cards, 5 card. 3 = paper tape. 1 typewriter. 17-21 22-26 = = SPSX. Columns 1-2 =F=F (identification r e cor d marks). 3-6 Operation (spsx). Source of input, 7 5 = card. 3 =:; paper tape. 1 = typewriter. 08-9 SPS subroutine set identification number. 010 N (Noise) digit. 011-12 Two digits for indicating length of mantissa. °Required only when the program to be executed uses other than the standard operating specifications (02 standard subroutine set, 0 standard N digit, 08 standard mantissa length). FORX. Columns 1-2 3-6 7 8 9-10 XEQ. Columns 1-2 =F=F ( identification record marks). Operation (FORX ) • Source of input, 5 card. 3 paper tape. 1 typewriter. FORTRAN subroutine set identification number. Control card count (number of LOCAL control cards). = = = 27 XEQS. Columns 1-2 3-6 7-12 13-16 17-21 22-26 =F=F ( identification marks). record Operation (XEQ, left-justified). Name of user's program, to be executed (same name assigned in Equivalence table). DIM (Disk Identification Map) entry number. Note that either the name or the DIM entry number must be given (if program is in disk storage), but if both are given, the name takes precedence. Address where loading of user's program begins if program is not in core image. If not supplied, address 02402 is assumed. Address where execution of user's program is to begin if program is not in core image. This address must be relative to the start of the program if the program is relocatable; otherwise, the absolute entry address must be supplied. Source of input, Blank = disk. 5 = card. 3 = paper tape. ( Note that card or paper tape input must be in System Output format). =F=F (identification r e cor d marks). Operation (XEQS). Name of user's program to be executed (same name assigned in Equivalence table). DIM (Disk Identification Map) entry number. Note that either the name or the DIM entry number must be given (if program is in disk storage), but if both are given, the name takes precedence. Address where loading of user's SPS object program begins if program is not in core image. If not supplied, address 02402 is assumed. Address where execution of user's SPS object program begins if program is not in core image. Supervisor Program 11 27 28 29-30 °31-32 °33 °34-35 This address must be relative to the start of the program if the program is relocatable; otherwise, the absolute entry address must be supplied. Source of input, Blank == disk. 5 == card. 3 == paper tape. (Note that card or paper tape input must be in System Output format.) Subroutine set identification num ber for FORTRAN programs only. Control card count (number of LOCAL control cards) for FORTRAN programs only. sps subroutine set identification number (e.g., 01 == fixed-length subroutines, etc.). N (Noise) digit for sps subroutines. Two digits for indicating length of mantissa for sps subroutines. ° Required only when the program to be executed uses other than the standard operating specifications (02 standard subroutine set, 0 standard N digit, 08 standard mantissa length). =1==1= (End-ot-Iob). Columns 1-2 3-4 =1==1= (identi fica tion record marks). Operation (=f==t=, end-of-job). Comments Records Comments records - in card, paper tape, or typewriter form - can be used to specify operating instructions and identify each job. Any number of these records may be inserted in front of a job in the stacked input. Usually they are inserted behind a JOB Monitor Control record. Comments records, unlike Monitor Control records, have no control over the Supervisor. When Comments records are encountered in the stacked input, they are typed out. The format of the Comments record in terms of cards follows: Columns 1-2 3-6 12 =1==1= (identification record marks). Operation (blanks or any combination of letters and/or digits other than the eleven Monitor pseudo operation codes, JOB, SPS, etc.). 7-80 Comments. When the Supervisor Program reads a Comments card, it will pass subsequent cards until another card with =1= =1=, columns 1-2, is encountered. Therefore a Comments card should be followed by another Comments card or a Monitor Control card. SPSX, Module Change Numbers Module change numbers, punched in card columns 8-11 of the JOB Monitor Control cards, can be used by the operation on 1620 Systems with more than one 1311 Disk Storage Drive to alter the normal assignment of disk storage drives fOT any job. For example, in the execution of its proa job that uses drive gram could use drive 1 instead of drive by the entry of a JOB Monitor Control card with the appropriate module change numbers. Card columns 8, 9, 10, and 11 of the JOB card represent disk storage drives 0, 1, 2, and 3, respectively. A change to the normal program assignment of a disk storage drive is made by punching the number of the substitute drive into the card column which represents the normal drive. Therefore, in the preceding example, a digit 1 would be punched into card column 8 to alert the program that drive 1 should be used for the job instead of drive O. Card columns 9, 10, and 11 could be left blank because only the assignment changes must be punched. The assignment of disk storage drives, placed in effect by a JOB card, remains in effect until changed by a succeeding JOB card. If the system is redefined to use more than one drive, a JOB card with module change numbers punched in columns 8-11 must be entered before the additional drives will be accepted by the Supervisor program. To overlap the time required to change disk packs for one job with the processing time for a different job, the operator may choose to alternate the use of disk storage drives from one job to the next. Alternating drives is possible only when all drives are not in use for anyone job. For example, assume that job A is to be followed by job B in the stacked input and the programs for both of these jobs use disk storage drives 0 and 1. Assume further that four disk storage drives are available to the 1620 System that is to perform these jobs. By entering a module change number in the JOB Monitor Control card for job B, the operator can use disk storage drives 2 and 3 for job B in place of drives 0 and 1. Therefore, while job A is being done, the operator could mount the disk packs for job B on drives 2 and 3, thus saving valuable operating time. The JOB card module change numbers ° ° should be punched I I Card columns ~ ~ Module change numbers so drives 2 and 3 will be used in place of drives 0 and 1, respectively, for job B. 1 10 1111 Disk Pack Identification Numbers Card columns 12-31 of the JOB Monitor Control card can be punched with the four 5-digit disk pack identification numbers, one identification number for each disk storage drive. Disk Pack Disk Storage Identification Number Drive -0Card columns 12-16 17-21 1 22-26 2 27-31 3 The disk pack identification number from the JOB card is compared with the identification numbers recorded on the respective disk packs. If the proper disk packs are not attached by the operator, the Supervisor will halt for operator instructions. If it is desired to omit this check for any disk storage drive, the card field representing the disk storage drive may be left blank. When the operator enters a module change number, no change to the disk pack identification numbers (card columns 12-31) is required. Stacked Input Stacked input consists of control records (Monitor, Disk Utility Program, SPS, and FORTRAN), source programs, object programs, and data arranged logically by job. Each job consists of phases which must fit into one of four categories: 1. sps source program ( s) to be assembled. 2. FORTRAN source program ( s) to be compiled. 3. Disk Utility routine ( s) to be executed. 4. FORTRAN or SPS object program ( s) to be called from disk storage with subroutines and executed; or SPS program ( s) to be called from disk storage without subroutines and executed. The order in which jobs are executed is not important, i.e., a Disk Utility routine may be executed be fore a FORTRAN compilation or vice versa. Jobs are executed in the order in which they are encountered in the stacked input. Each job must be preceded by a JOB Monitor Control card and followed by an end-ofjob (=.f= =f= =f= =f=) Monitor Control card. Job Arrangement A Disk Utility, FORTRAN or SPS job is always represented by at least three Monitor Control records. Card 1. JOB Monitor Contro] Record 2. DUP, SPS, SPSX, FOR, FORX, XEQ, or XEQS, Monitor Control record Purpose Identify beginning of job. Transfer control to Disk Utility Program, FORTRAN compiler, SPS Assembler, user's object program. Identify end of job. 3. End-of-job Monitor Control record. In addition to the Monitor Control records, there may be one or more Disk Utility Program, SPS or FORTRAN system control records. These records are a part of the input for the individual system. TYPE or PAUS Monitor Control records may be inserted immediately preceding any of the records in the above sequence. Any number of Comments records may be inserted in front of type 2 records. Source programs or input data can be entered immediately following type 2 records. The following three points must be taken into consideration when arranging the input for any job. 1. All Monitor Control records, with the exception of Monitor records that follow a TYPE Monitor Control record, must be read from the same input source. The input source can only be changed at the beginning of each job or by a TYPE Monitor Control record. 2. A job, with the exception of a Disk Utility job~ may consist of several system functions possibly terminated by execution of a user's program. Execution of a user's program is considered as the end-of-job. If any cards remain in the stacked input for a job when it is ended in this manner, they will be passed without processing. Processing resumes with the first Monitor Control card of the next job in sequence. 3. If an error is detected in an SPS assembly or FORTRAN compilation, the resulting object program or any programs that follow within the job cannot be executed. Examples of stacked jobs are given in Figure 4 and Figure 5. In these examples: Job A assembles two SPS source programs and stores the assembled programs in disk storage. The second SPS program is executed after assembly. This job includes Comments cards to instruct the operator and a PAUS Monitor Control card to allow the operator to intervene and change program switch settings. Job B compiles and executes a FORTRAN source program. Job C replaces an existing object program in disk storage with a new object program and copies a proSupervisor Program 13 gram from disk-to-disk. Job D calls a program from disk storage with subroutines and executes it. Monitor Control Record Analyzer Routine This routine, a part of the Supervisor Program, is used to read the Monitor Control records and Comments records, which are identified by =f: =f: in columns 1-2, and to analyze these records, and to perfonn the operations or transfer control as directed by the pseudo operation codes. The first Monitor Control record is read from the input source that is specified by the operator when the Supervisor Program is originally loaded into core storage from disk storage to Job "6" Source Program ---------7 , ,,, I , / / SPS Control Records , / ** JOB Monitor , /. --------_1 Figure 4. 14 Stacked Input, SPS and FORTRAN Jobs Job "A" start the entire operation. Subsequent Monitor Control records and Comments records are read from the same input source until a JOB Monitor Control record changes the input source by specifying a different "source of input" or a TYPE card is encountered. Reading of Monitor Control records continues from the new source until again changed by another JOB Monitor Control record. When the input source is the "typewriter," the Monitor Control Record Analyzer routine types the message tum Program Switch 4 off and depress the Start key. The Monitor Control record input source will be changed to the typewriter, and the operator may then re-enter the control record. If it is desired to read succeeding records from the original input source, column 7 must identify the input source. Message ENTER MONITOR CONTROL RECORD The operator may then enter the next control record. The record is not typed out if the entry is made by the typewriter. If the operator makes a mistake while entering the record, he may correct the error by turning on Program Switch 4 and depressing the R-S key on the typewriter. Switch 4 should then be turned off and the entire record re-entered. When an SPS, SPSX, FOR, FORX, DUP, XEQ, or XEQS Monitor Control record is read, control is transferred from the Analyzer routine to the individual program specified by the control record. Control is returned to the Analyzer routine after the program is executed. When control is returned, the Analyzer routine will pass records, provided the input source is other than the typewriter, until a Comments or Monitor Control record is encountered in the stacked input. Therefore, the last job to be executed should be followed by a TYPE or PAUS control card. If this control card is not present, the 1620 will stop on a Read Select instruction, expecting another control card. ERROR MESSAGES Cause Action Action Message Cause Action Message Cause During execution of the Monitor Control Record Analyzer routine, certain error messages may be typed. After typing a message, the 1620 will stop if any operator action is required. A list of these messages, the conditions which cause them, and the corrective actions required of the operator, follows. Message Cause ERROR IN FIELD AT COL. XX. SET SW4 TO IGNORE, OFF TO RE-ENTER CARD An illegal character has been detected in a JOB Record data field. To ignore the error tum Program Switch 4 on and depress the Start key. The message "CONDITION IGNORED" is typed and processing continues. To correct the error, Action Message Cause Action Message Cause Action PACK NUMBER. ERROR ON MODULE X. SET SSW4 TO IGNORE OFF TO RECOMPARE Disk pack identification num bers compare "unequal." To ignore the error, tum Program Switch 4 on and depress the Start key. The message "CONDITION IGNORED" is typed and processing is resumed. To correct the error, place the correct disk packs on the disk drives and depress the Start key. The disk pack identification number will again be checked by the program. If the pack involved was a Monitor pack, the instruction sequence previously described under operation must be repeated. END OF JOB The end of a job has been reached. (This message will not be typed, if the input source is the typewriter.) None required. CANNOT RESTORE COMMON -RESET AND START TO RETRY Common area does not read into core storage from disk storage correctly. Depress Reset and Start keys to retry the read operation. EXECUTION Loading and execution of user's object program has started. None required. JOB CARD GROUP ONLY Control Record Analyzer routine is expecting a JOB, TYPE, or PAUS Monitor Control record, but it does not find one. Enter JOB, PAUS, or TYPE, Monitor Control record from typewriter and depress the Release and Start keys. Supervisor Program 15 ERROR IN FIELD AT COLUMN XX. PHASE TERMINATED A Monitor Control record contains an invalid code in the field starting at column xx. The phase is skipped and the supervisor will pass records from the control record source until it encounters the next Monitor Control record. Message Cause Action EXECUTION IS INHIBITED An error has occurred within a job which may prevent successful ex- Message Cause ecution of the user's object program. Non~ required. No user object program can be executed until the next JOB Monitor Control record is encountered. Action Message Cause Action OBJECT DIM ERROR PHASE TERMINATED The Supervisor is unable to find the DIM entry specified by an XEQ or XEQS control record. None required. The phase in which the error occurred is terminated and processing continues. :f: :f: PAUS Monitor :to :to Comments Monitor :to Job "D" *Comments Monitor Object Program ! I I I Job "C" :to :to Job Monitor Figure 5 16 Stacked Input, DUP,and XEQS Jobs Message OBJECT NAME ERROR PHASE TERMINATED Cause The Supervisor is unable to find a name in the Equivalence table which corresponds to the name supplied in an XEQ or XEQS control record. Action None required; the phase is terminated. Message ENTER MONITOR CONTROL RECORD Cause A "=F =F TYPE" Monitor Control record has been encountered. Action Enter a Monitor Control record from the typewriter. (Monitor input source is changed to the typewriter. ) Message SYSTEM DIM ERROR PHASE TERMINATED Cause Supervisor is unable to find DIM entry for SPS assembler, FORTRAN compiler, or Disk Utility Program. Action All linkages for I/O routines are generated automatically through the use of macro-instructions in SPS source programs or the I/O statements (e.g., FIND, RECORD, FETCH, PUNCH, READ, etc. ) in FORTRAN source programs. The data and addresses supplied in a macro-instruction or the parameters in a FORTRAN statement are incorporated into the linkage instructions where they are made available for use by the I/O routine. Each time the I/O routine is entered as the result of an SPS macro-instruction or FORTRAN statement, the read, write, and parity check indicators are turned off. If a read or write error occurs that cannot be corrected without operator intervention, an error message is typed and the program halts. A restart procedure is specified for all error conditions (see I/O ERROR ROUTINE). An error count is maintained by the I/O routine for inspection by the user or for diagnostic analysis by an IBM Customer EngineeJ;'. In addition to using the I/O routine with SPS macroinstructions and FORTRAN statements, the routine may be used by coding the general form of I/O routine linkage directly in the user's program. I/O Routine Linkage General Form. None required; the phase is terminated. TFM B + 10RT, 23 ENTRY, DEF, 7 (/< is the address ( 00565 ) of a 5-position storage area in the I/O routine. ENTRY may be anyone of the four possible entry pOints in the I/O routine represented by the following symbolic addresses: IORT I/O Routine The I/O routine is designed to relieve programmers of the necessity for writing input/output subroutines. The I/O function is performed automatically by the I/O routine. Therefore, the programmer can concentrate on describing his files and disregard the actual operation of the I/O function. Provision is also made in this routine for error detection and correction. Ii Parity, Wrong-Length Record Check, or Address Check disk errors occur in a disk operation, the routine will repeat the operation which had the error, up to nine times, in an attempt to correct the error. The Monitor System uses this routine for I/O operations. The I/O functions performed by the I/O routine include reading and punching cards or paper tape, reading or writing typewriter, reading or writing disk records, and seeking disk cylinders. These functions may be used in an SPS object program by entering I/O macro-instructions (GET, PUT, SEEK, or CALL) in the user's source program. These macro-instructions, as well as the associated declarative statements for defining declarative constants (DTN, DTA, etc.), are described in the section concerping SPS II-D. Actual Entry Point Address 00520 IORBC Function Write record into disk storage with Read-Back Check. . Write a record to an output device. Seek a disk record. 00554 IOSK IOGT 00566 Read a record from an input device. DEF can be the address of any I/O declarative constant (see I/O CONSTANTS). 10PT 00532 CALL LINK or CALL LOAD Linkage. These linkages are usually used to call programs from disk storage, with or without execution. Linkages may be in either a short or long sequence form. Both forms are alike with the exception that the long sequence form contains a relocation address. Supervisor Program 17 Short Sequence TFM B7 DC DC } or DSC DSC DC Long Sequence TFM B7 DC DC } or DSC DC DC DSA DSC I/O Constants 10RT, 0 lOCAL 1, Mo + 19 An I/O constant for card, paper tape, or typewriter consists of eight digits. 1, Ml 1,0 5,1111 @ 10RT, 0 lOCAL 1, Mo CCCCC is the address of an I/O area. Mo Ml is one of the following codes which identifies the operation: 00 + 19 02 04 06 08 To 1, Ml 1,0 4,1111 LLLLL 1,@ lOCAL is an entry to the I/O routine (core storage address 00716) . Mo Ml is a constant 32 for CALL linkages, Ml is flagged for CALL LINK only. IIII is the DIM entry number of the program to be called. LLLLL is the relocation core storage address where the program is to be loaded. If the short sequence is used to call a relocatable program, LLLLL is assumed by the I/O routine to be the address contained in the "high" indicator field of the Communications Area. If the long sequence is used to call a core image program, the I/O routine will disregard LLLLL. NOTE: The contents of all index registers are destroyed whenever the sps macro-instructions CALL LINK or CALL LOAD are executed. Also, if the called program requires subroutines, the "no index register" mode is selected; thus, it is the user's responsibility to turn the index registers on again when needed. Disk I/O constants may be in any of the following four forms: 1. 2. 3. 4. 18 =F LLLLL is a relocation core storage address of a program to be called. 'iIII is the DIM entry number of a program to be called. Mo and Ml provide various ,disk ~ptions for the user. A list of these codes and their associated options follows. Mo (code) Option o Add the starting address of the work cylinders from the Communications 'Area (core positions 422-425) to the sector address in the disk control field. (Used with constant types 1 and 2 only. ) 1 Same as option zero, except the "high"indicator in the Communica,tions Area will also be updated for disk read operations only. This indicator is merely a field which contains the core storage address of th~ highest position to be loaded plus one. 2 D se the sector address in the disk MONCAL MONCAL (core storage address 00796) is an entry to the I/O routine which will call in the Monitor Control Record Analyzer routine. CALL EXIT linkage is used at the end of the execution of an object program to return control to the Monitor Control Record Analyzer routine to read another Monitor Control record. If, during execution of an object program, an error is encountered which will not allow normal exit to the Analyzer routine, the operator may manually branch the program to MONCAL (00796) to resume processing. Mo Ml DDDDD =F MoMl iSDDDD LLLLL Mo Ml 0 IIIILLLLL =F Mo Ml 01111 =F I>DDDD is the address of the leftmost position of the associated disk control field. CALL EXIT Macro-Instruction Linkage. B7 Typewriter Numerical Paper Tape Numerical Card Numerical Typewriter Alphameric Paper Tape Alphameric Card Alphameric control field for the disk operation (SEEK, READ, or WRITE). 3 n Ml (code) o Use the sector address in the disk control field for the disk operation. Also, update the "high" indicator in the Communications Area for read operations only. A flag over the code n, (n == 0, 1, 2, or 3) causes the read/write heads to be repositioned to an assigned cylinder (specified in the Communications Area) after any disk I/O operation, except seek. Option Disk read or write in sector mode with WLRC. NOTE: The user must place a group mark ($) in the core storage location following the last character position of the last sector of the record. 2 Disk read or write in sector mode without WLRC. 4 Disk read or write in track mode with WLRC. NOTE: The user must place a group mark ($) in the core storage location following the last character position of the last sector of the record. 6 Disk read or write in track mode without WLRC. A Hag over code Ii (n == 1, 2, 4, or 6) causes the I/O routine to branch to a given address after a disk read operation. The given address will be the "execution address" if an extended disk control field is used. Otherwise, it will be the "core address" of the disk control field. If code n is unflagged, the I/O routine will branch to the first instruction following the disk operation calling linkage iw the object program. If the entry address is not specified, the entry is made to the (possibly relocated) first card address of the deck to be loaded. mats: DDDDDD SSS CCCCC =F DiSDDDD SSS CCCCC EEEEE =F is the first sector address of the data or program. sss is the number of sectors to be read or written. CCCCC is the core address (must be an even-numbered address) of the data or program. EEEEE is the execution address where program execution is to continue after a disk read operation is completed. The second disk control field, known as an extended disk control field, is used when Ml of the I/O constant is flagged. DDDDDD Card I/O Cards are read or punched in alphameric or numerical form from a user-specified constant (generated from an I/O declarative statement) designated in general linkage. If a punch error is detected during a write instruction, the instruction is again executed to correct the error. If the error persists or a parity error occurs during a write operation, an error message is typed and the program halts (see I/O ERROR ROUTINES). Error messages will be typed for all read errors. Typewriter I/O A specified I/O declarative constant designated in general linkage will be used by read or write typewriter instructions (alphameric or numerical). If a read error or a parity error occurs during reading, the program will branch back to the read instruction and await entry of data. The operator can then type in the data and return control to the program. If a parity error or write check occurs during writing, it will be counted and the indicators will be turned off ~ but the program will not halt. Control operations (RCTY, SPTY, TBTY) are not executed in the I/O routine. These must be handled in the main program coding. Paper Tape I/O Paper tape is read or punched in alphameric or numerical form from a specified I/O declarative constant designated in general linkage. If a parity read error occurs during a read operation, an error message is typed and the program halts. DISK CONTROL FIELD Disk Storage I/O The disk control field, associated with I/O constants, types 1 and 2, may be in either of the following for- Disk storage will be read or written as specified by the I/O declarative constant designated in general Supervisor Program 19 linkage. Also, disk seek operations will be initiated to disk addresses contained in the I/O declarative constant designated in general linkage. For a CALL macroinstruction, disk data records or programs will be written in the area of core storage designated by the relocatable address in CALL linkage. If this address is not present for a relocatable program, the processor selects the address. If the relocation address is present but the program is not relocatable (i.e., it is in either Absolute or Core Image format), the relocation address is ignored and the program is stored at the core address specified by the DIM entry. Disk storage indicators are reset by the I/O routine. If the Cylinder Overflow indicator (38) is turned on before the sector count reaches zero, a seek to the next cylinder is initiated and reading or writing is resumed. If read, write, or parity indicators, or indicators 36 or 37 are turned on, the instruction associated with the error will again be executed up to nine times. If the error persists, an error message is typed and the program halts. The seek only linkage TFM B + IORT, 0 23 IOSK, DEF, 7 will allow computing time and seek time to overlap. DEF refers to any disk I/O constant. The cylinder location of the arm on each drive is entered into a list by the I/O routine. Every time the I/O routine executes a disk operation~ the current entry cylinder is compared to the previous cylinder and the arm is instructed to SEEK only if it is not already located at the current cylinder. REPOSITIONING OF ACCESS ARMS The I/O routine contains four 2-digit cylinder indicators that can be used to reposition the access arm on each of the four possible disk drives to a new cylinder following a read or write operation. The four cylinder indicator core storage locations and their associated drives follow: Indicator Addresses Drive 00512 - 00513 0 00514 - 00515 1 00516 - 00517 2 00518 - 00519 3 These indicator positions are reset to '00000000 by the Monitor Control Record Analyzer routine. Therefore, a program which uses other cylinders for repositioning must provide for changing the indicators. Repositioning the access arm following a GET or PUT macro-instruction is optional. If Mo of the I/O constant used by a GET or PUT is flagged, the read/ write heads will be repositioned. 20 FULL TRACK OPERATION If any I/O operation is to be attempted with the Write Address light on, the programmer must set a flag at OLDDA 14 (core position 00455) before entering the I/O routine. The flag will prevent accumulating error counts (which is a write disk sector operation). The flag must be cleared before terminating the routine in which the Writ\!} Address light "on" condition is present. If an I/O operation is attempted with the Write Address light on, no flag present at OLDDA 14, and an indicator 06, 07, 16, 17, 36, 37, or 38 on or turned on by the I/O operation, the program will stop with the instruction at 00728. To save the error count, the operator must (1) turn the Write Address light off, ( 2 ) depress the STOP / sm key, ( 3) turn the Write Address light on, if desired, and (4) depress the Start key to resume automatic operation. + + I/O Error Routine Each time the I/O routine begins execution, it tests indicator 19 (any check) to determine if an error had occurred prior to entry. If the indicator is on, the I/O error routine will be called into core storage and executed. This routine records a count of errors by type (for indicators 06, 07, 16, 17, 36, 37, and 38), and provides the necessary error messages and corrective operating options. In addition the error routine turns off the individual indicators (06, 07, 16, 17, 36, 37, and 38 ), by testing them. After an I/O f~nction is executed, indicator 19 is again tested. If it is on, the I/O error routine is entered to process the error. Error Detection and Correction During execution of the I/O error routine, error messages are typed to describe errors and the operator is allowed to intervene to decide how errors should be treated by the program. A list of error correction options available to the operator follows. Error Correction Code 00 05 Option Ignore the error. When this option is used, the I/O routine will finish processing the I/O operation as though the error had not occurred. Re-execute the I/O operation. If an error recurs during the next execution, an error message is again typed, the computer stops, and the operator can exercise the same option or another option. 10 Skip this phase of the job if error occurs at system time (sps assembly, FORTRAN compiling, Disk Utility Program, or Supervisor Program execution time) and return control to the Monitor Control Record Analyzer routine and pass records to the next Monitor Control record. 15 Discontinue execution and return control to the Monitor Control Record Analyzer routine and pass records to the next JOB Monitor Control Record. 20 Continue processing by branching to a specified core storage address without further processing of the I/O request. When this option is exercised, the operator enters the 5-digit branch address from the typewriter. After each error message is typed, the computer halts. The operator then depresses the Start key, enters a 2-digit error correction code from the typewriter, and depresses the R-S key to resume processing. If an error is made while entering a 2-digit correction code, it may be corrected by turning Program Switch 4 on, depressing the typewriter R-S key, turning Program Switch 4 off, and re-entering the 2-digit code. The I/O error routine has the facility to handle any of the following errors. Entry Check Typewriter write Typewriter read Paper tape read Card write Card read Cylinder overflow Write error count Illegal DIM entry System Unavailable disk drive Control record trap Error messages, conditions, and corrective operator action associated with each type of error is described as follows: Entry Check. If indicator 19 (any check) is on, when tested in the preprocessing phase, the message ENT ERROR 06071617363738 is typed on the console typewriter. Each pair of indicator numbers is flagged in the leftmost digit. If an indicator was on when tested, the rightmost digit will also be flagged. Typewriter Write. For this error, no error message is typed; however, the error is automatically indicated by over-printing the error character ( s) with a horizontalline. Typewriter Read. For this error, the message TYP ERR is typed.To restart the computer, the operator exercises one of the error correction options. Paper Tape Read. The message PTR ERR is typed. The operator must backspace the tape to the beginning of the record before exercising error option 05. Card Write. For this error, the I/O error routine retries the operation once for a write check error (indicator 07). If the error is corrected by the retry, control is returned to the I/O routine; if the error is not corrected, the message CDP ERR is typed. The error option can then be exercised by the operator. Card Read. For this error, the I/O error routine retries the operation once for a read check error (indicator 06). If the error is corrected by the retry, control is returned to the I/O routine; if the error is not corrected, the message CDR ERR is typed. The error option can then be exercised by the operator. Cylinder Overflow. For this error, the I/O error routine tests to determine if a legitimate overflow has occurred during a disk read or write operation. For a legitimate overflow, a seek operation to the next cylinder is automatically initiated and reading or writing continues. A maximum of three seek operations will be performed if sufficient core storage is available to accommodate the data being read or written. If the disk read or write operation results in an attempt to read or write data beyond the highest sector Supervisor Program 21 address of the addressed disk module, the message DSK OFL is typed. All error correction options, except 05, are available to the operator. If 05 was inadvertently entered, it would have the same effect as error correction option 00. For a disk error, which is other than a legitimate overflow, the disk read or write operation causing the error is retried up to nine times; if this fails to correct the error, the message DSK ERR XXXXX 06071617363738 is typed, where XXXXX is the 5-digit return address to the object program. A flag is typed over the leftmost position of each pair of indicator numbers. The indicator ( s) which identifies the type of error will also be flagged in the rightmost position. If indicator 38 is flagged in its rightmost position, it may mean either of two things: 1. A legitimate overflow did occur, but another type of error occurred in attempting to transmit data to or from the succeeding cylinder. 2. A machine malfunction occurred. If the operator exercises error correction option 05, but this does not correct the error, he should' turn the Disk, Parity, and I/O Check switches to STOP, and again exercise option 05. The console lights may then be examined to determine the nature of the error. If a legitimate cylinder overflow condition occurs, a seek operation to the next cylinder is automatically initiated and reading or writing continues. Write Error Count. If an error occurs while the I/O error routine is writing the error count in disk storage, the message BAD DISK WRITE. RESET START will be typed. In this case, the operator does not exercise an error correction option, but he must: 1. Clear the Select-Lock light, if it is on. 2. Depress the Reset and Start keys. Illegal DIM entry. If the user supplies an illegal DIM number (not in DIM table) in a CALL statement, the I/O routine will transfer control to the I/O error routine and the message MAP ERR XXXXX nn is typed, where xxxxx is the core storage position immediately follOwing the call linkage, and 1111 is the illegal DIM entry number. The operator then enters error correction code 00 and depresses the Release and Start keys. The computer will again halt. The 22 operator must then type in a corrected 4-digit DIM entry number and depress the Release and Start keys. System. If the I/O error routine cannot interpret the nature of the error, the message IMP ERR is typed and control is returned to the Monitor Control Record Analyzer routine without stopping to allow operator intervention. In addition to the system error just described, the computer may halt in the I/O routine at core storage address 00467 without typing a message. This halt occurs if a read error occurs while the I/O routine is reading one of its subroutines from disk storage. To retry the operation, the operator should 1. Clear the Select-Lock light if it is on. 2. Depress the Reset and Start keys. If this error persists, it may mean either of two things. 1. The user inadvertently altered the I/O routine in core storage. 2. A machine malfunction occurred. Unavailable Disk Drive.. If the programmer specifies a logical module for which there is no phys'ical disk storage drive, the message MOD ERR XXXXX is typed, where xxxxx indicates the return address to the object program. The operator must enter the error correction code 00 and depress the Release and Start keys. The computer will again halt. The operator must then enter a corrected I-digit drive code and depress the Release and Start keys to continue. Illegal Drive Code. If the user gives an illegal drive code in the disk control field for a disk operation, the message MOD ERR XXXXX is typed, where xxxxx is the 5-digit return address to the object program. To continue, the operator should enter an error correction code 00 and depress the Release and Start keys. The computer will halt to allow the operator to enter a corrected I-digit drive code from the typewriter. Depress the Release and Start keys to resume operation. Control Record Trap. To prevent the I/O routine from inadvertently reading a control record as a data record, the I/O routine is designed to trap control records, if they are read from the Supervisor input source. Each record read is tested for =f= =f= in its first two positions. If present, control is transferred to the I/O error routine and the message TRP ERR is typed. If the control record was read in numerical mode and it was not an end-of-job record (=f:=f:=f:=f:), an additional message is typed: MUST RELOAD The operator then depresses the Start key and reenters the record. The Monitor Control Record Analyzer routine assumes control and processes the trapped control record. If the control record was read in alphameric mode, it is processed in the normal manner by the Supervisor. Programs are sequence checked as they are loaded if input is from cards. This check is performed on the last five digits of each input record. If any records are out of sequence, an error message is typed and the operator is allowed to intervene to correct the sequence error. Patch cards may be interspersed with other cards of an object program to be loaded. The sequence number of card input appears in columns 76-80. Sequence numbers start with 00001 and must have a Hag over their leftmost position in order to be sequence checked. Error Count Retrieval Routine System Output Format Each time an error is detected by the I/O error routine, an error count is incremented by one. An error count is maintained for each of the following error indicators: The general format in which FORTRAN ll-D and SPS ll-D object programs will be outputted to paper tape, disk, and cards is shown below: 06 07 16 17 36 37 38 Read C~eck Write Check MBR-E Check MBR-O Check Address Check WLR-RBC Cylinder OverHow The error counts can be typed out and reset to zeros by entering the following instructions and data from the typewriter: 34 00032 00701 36 00032 X0102 49 00070 0 11975400100046 (disk control field) X is the drive code for the Monitor II System. The Release and Start keys are depressed to start the operation. The seven indicator counts are then typed in sequence in 14 consecutive positions with a Hag over the leftmost position of each count. Xx Xx Xx Xx Xx Xx Xx The error counts are reset to zeros after the typeout. Loader Routine The Loader routine, a part of the Supervisor Program, is used to load user's object programs into core storage from cards, paper tape and disk storage. To perform the loading function, the Loader routine is called into core storage whenever an object program is to be loaded into core storage. The user's object program could be any program in System Output format. Columns 1-5 6 1-8 9-15 16-80 Address of data. Indicator code. Length of data. Data, indicator codes, etc. Sequence number. Patch cards should be prepared in the same format. However, the sequence number must be all zeros without Hags. All patch cards must precede the card that defines the end of a relocatable program (see INDICATOR CODE· 6). The entries shown above are described as follows: NOTE: The descriptions given here will be in terms of cards; however, .paper tape and disk formats will be the same with the exception of the sequence number. Address of Data - This entry will always refer to the location where the first digit of data on the card is to be loaded. This entry will appear in columns I through 5 of a reloadable card. The address is an absolute address, i.e., no relocation increment (presuming this program is relocatable) has been added yet. Indicator Code - This I-digit entry is used to either define the type of data that is to follow or to convey certain loading instructions to the loader. There are thirteen different indicator codes that may be used; some are applicable to SPS ll-D only (see INDICATOR CODES). Length of Data - This field is used in conjunction with certain indicator codes (1, 2, 2, 3, 3, 4, 4) to specify how many digits of data are to follow. With other indicator codes, this field becomes part of a larger field and assumes a different role. Supervisor Program .23 3' - Data - This field contains actual data to be loaded. Data may be instructions, constants, etc., depending upon the indicator code. All instructions for relocatable programs will contain Hags over 00, 0 1 of the operation code to specify if the P' and Q addresses, respectively, should be incremented by the relocation address. If patch cards are prepared, these Hags must be punched for addresses to be adjusted. Instructions of programs in absolute format must not be flagged. This digit indicates that the data follOwing the ",length of data" field are relative addresses'that are not to be relocated. 4 - This digit is used to supply numeric blanks when a relocatable program is loaded. The 2-digit "length of data" field follOwing the indicator specifies how many numeric blanks are desired. Thus a 412 will cause twelve numeric blanks to be inserted into core storage when loading. 4" - This digit is used in the same manner as the digit 4 above except that the Hag indicates the program is in "absolute" form. 6 - This digit indicates the end of a relocatable program. In SPS II-D, th! five digits immediately preceding a 6 or 6 (described below) will be the number of core positions needed for this program. In SPS or FORTRAN, th~ card that follows a card containing a 6 or 6 will contain five 9's in columns 1-5. '6 - This digit indicates the end of an "absolute" program. INDICATOR CODES Although the output fonnat is shown divided into specific fields, these same fields do not always make up the columns that are indicated. As will be seen by the descriptions of the various indicator codes, the format varies conSiderably as the type of data on the card changes. The indicator codes are described as follows: NOTE: in Those codes marked with an asterisk are used output only. SPS II-D =1= - This digit indicates that a change is being =1= - o 0- o1- 2- 23- 24 made in the sequence of loading addresses for the program. The five digits that follow the record mark denote the new address or origin. After the 5-digit address, there will be another indicator code to define the data that follows. This digit is used whenever the data that follows is an instruction or relative address which cannot be fully contained before the seventy-fifth column of the card has been reached. This digit is used when a TRA-TCD declarative combination is assembled in any relocatable SPS program. The five digits that follow the zero constitute a branch address for entrance to a routine. This digit is used in the same manner as 0 above, except the flag denotes an SPS program with absolute addresses. This digit indicates that the data to follow after the "length of data" field are instructions. This digit indicates that the data following the "length of data" field are constants that are to be relocated. This digit indicates that the data following the "length of data" field are constants that are not to be relocated. This digit indicates that the data follOWing the "length of data" field are relative addresses to be relocated. Example The first 35 columns contain the following: 010121i2490036600000=l=0101920500428~ Columns 36 through 75 are blank and colwnns 76-80 contain 00101. Explanation Columns Contents 1-5 '01012 6 1 7-8 }2 9-20 490036600000 21 22-26 01019 27 2 28-29 05 30-34 00428 35 76-80 "00101 Description Loading address of first infonnation. Code indicating the follOwing infonnation is an instruction. Length of the following infonnation. The infonnation to be loaded, which is a Branch instruction with a relocatable P field. Code indicating a change in the loading address sequence. Loading address of the following infonnation. Code indicating the following information to be loaded is a relocatable constant. Length of the following infonnation. The information to be loaded, which is a relocatable constant. Code indicating nothing further is to be loaded from this card. Sequence number. With a relocation factor of 14000, the above data would be loaded s!artil!,g at location 15012. The data would appear as: 491436600428. Error Messages If an error occurs during execution of the Loader routine, an error message will be typed and the 1620 will stop to await operator action. A list of error messages, the conditions which cause them, and the corrective action required, follows. Message - XXXXX LD1 (XXXXX is the sequence number of the last card read in correct sequence ). with the card following XXXXX, and place them in the card reader. Depress the Start key. Message - LD2 Cause - Card read error. Action - Reread card by depressing the Check Reset and Start keys on the card read punch. Cause - Card sequence error. Message - LD 3 Cause - Disk read error. Action - Depress Start key and retry. Action - Correct the order of input cards, starting Message - LD 4 24.1 A Hag in this position indicates that a DEND type entry starts execution of the object program. No Hag indicates that a TRA-TCD type entry starts execution of the object program. Cause - Disk read error while reading Loader routine into core storage. Action - Depress Start key to retry. Monitor II System Communications Areas Core storage positions 402 through 439 and disk sector 19663 are reserved for use by the Supervisor Program, SPS assembler, FORTRAN compiler, Disk Utility Program, and other programs as common communications areas. The Communications Areas are automatically established when the Monitor system is loaded. Changes to the communications areas are made as specified by control records (see DFINE CONTROL CARD) or by the Supervisor program itself. Care should be taken by the user, so that the communications areas are not inadvertently altered. A description of each of the fields in the core storage and disk sector communications areas follows. 429 Source of monitor control input, 1 == typewriter. 3 == paper tape. 5 == card. A Hag is present in this position if library subroutines are to be called with SPS or FORTRAN objects programs. 430-434 "High" indicator, i.e., the core storage address of the highest position to be loaded plus one. 435-439 Address where loading is resumed folle wing an SPS TRA statement. This address will always be one of the following: 00000, 00075, 00150, or 00225. Core Storage Area Core Storage Positions 402-421 422-425 Description A 20-digit DIM entry or a 14-digit disk control field being used by the I/O routine, Disk Utility Program, or other programs. Starting address of work cylinder. Only the four leftmost positions of the sector address are given. This address will be 1000 (with the flag) unless changed by a DFINE control card. 426 Source of sps or FORTRAN source program input, 1 typewriter. 3 == paper tape. 5 == card. 427 If this position is flagged, loading resumes after a TeD at core storage address 00000. If unflagged, loading resumes at the core storage address specified by positions 435-439 of this Communications Area. 428 Source of object program being loaded, 3 == paper tape. 5 == card. 7 == disk. Disk Sector Area (Sector 19663) Disk Sector Positions Description 00-19 DIM 20-21 Not Used. Available for use by the 1620 user. 22 entry used by I/O routine and Supervisor program. oindicates that the program to be loaded into disk storage is in core image format; I indicates that the program to be loaded into disk storage is in relocatable format. 23 oindicates card output; I indicates paper tape output. 24-35 Six-character alphabetic name of user's source program to be loaded into disk storage after assembly. 36-39 Four-digit DIM entry number of user's source program to be loaded after assembly. 40-41 0 Two digits (xx) indicating length of mantissa for sps subroutines. ( Standard mantissa length is 08. ) Supervisor Program 25 42-43 0 44 0 45-46 0 47-48 0 49 50-72 73 74-75 76 26 Two-digit SPS subroutine set identification number. (Standard set number is 02.) N (noise) digit for SPS subroutines. (Standard N digit is 0.) Two digits ( ff) indicating length of mantissa for FORTRAN subprograms. (Standard mantissa length is 08.) Two digits (kk) indicate FORTRAN fixed-point word length (04 standard length). Digit indicates number of disk storage drives available to the Monitor System. Supervisor Program indicators. Source of input, other than disk, for FORTRAN subprograms (from DFINE control record; 5 is standard, 3 == paper tape, 5 == card). Number of control cards for FORTRAN at load time. Object machine core size (from DFINE control record; 1 when system is delivered). 77 78-79 80-81 82 84-88 89-93 94-98 99 o N (noise) digit for SPS subroutines ( from Noise Digit control record). Mantissa length for sps subroutines (from Mantissa Length control record). sps subroutine set identification number ( from Subroutine Set control record). FORTRAN A and I/O subroutine set numbers (from FORX or XEQS control record). FORTRAN A and I/O standard subroutine set number (from DFINE control record; 1 when system is delivered) . First core storage address of a relocatable object program. Computed relocation address of a relocatable object program. Card sequence number. A record mark (=f=). These items are the systems standards. See Define Parameters under Disk Utility Program. Disk Utility Program In every data processing installation there are certain operations that must be performed frequently. These operations may differ in detail, depending on the user's particular machine configuration and data format, but essential functions remain the same. Because of their frequent use, the burden of programming these operations can become a costly, time-consuming task. Therefore, there is a need for generalized routines which will satisfy specific functions and allow the user the flexibility of assigning the specifications for his particular problem. The generalized routines, provided by IBM Programming Systems, described in this publication, are grouped under the heading Disk Utility Program. They are designed to assist the user in the day-to-day operation of his installation. By means of these routines, certain frequently required operations, such as loading or unloading disk storage (data or programs) from cards or paper tape, etc., can be performed with minimum programming effort by the user. The routines described in this publication are: 1. Write Addresses. This routine writes sector addresses on a disk pack as specified by the user. Data on the disk pack can be replaced by zeros or left unchanged. 2. Alter Sector. This routine uses the typewriter to change data in a sector of disk storage. In most cases, only the digits to be changed must be typed. 3. Disk-to-Output. This routine unloads disk storage containing data or programs into cards, paper tape, or on the typewriter. 4. Load Programs. This routine loads one or more programs from cards or paper tape to disk storage at either a specified address or an address selected by the load routine itself, and checks for an overlap of previously stored programs. 5. Replace Programs. This routine implements the changes or additions necessary to update a program on disk storage. Input can be in either card or paper tape form. 6. Disk-to-Disk. This routine copies data or programs from one area of disk storage to another. 7. Delete Programs. This routine effectively deletes programs from the system by deleting their associated DIM entries and Equivalence table entries without actually removing the programs themselves. 8. Define Parameters. This routine redefines certain essential parameters of the Monitor System. 9. Define Disk Pack Label. This routine writes the "label sectors" (first and last sectors, cylinder 99) and establishes a Sequential Program table on a disk pack. It can be used to initialize new disk packs. 10. Define FORTRAN Library Subroutine Name. This routine generates an entry in the Equivalence table for FORTRAN subroutines that have multiple entries. Thus, a name can be assigned to all entries in a subroutine. Each routine can be entered and executed by means of control records read by the Disk Utility Program. In addition, the routines are used by both SPS II-D and FORTRAN II-D to output assembled programs into cards or paper tape and to load and replace programs in disk storage. The Equivalence table, DIM table, and Sequential Program tables are used and modified by the Disk Utility Program in the execution of its routines. These tables are updated automatically for each disk storage change when the user adds, deletes, or replaces a program. Entries are created in the tables whenever a new program is loaded to disk storage. Operation The Disk Utility Program, a self-loading program, is loaded into disk storage along with the other programs that make up the Monitor II System. When a DUP Monitor Control card (=F=F DUP in card columns 1-5) is recognized by the Supervisor Program, the Disk Utility Program will take control and select the appropriate Disk Utility routine as identified by the next card in seqence, which should be a Disk Utility Program Control card. This card is identified by an asterisk in card column 1. Card columns 2-6 contain a code word to identify the Disk Utility routine desired: such as, Alter Sector, Load Programs, etc., and the remaining card columns provide additional control information to be used by the Disk Utility routine itself. The user supplies the control information which describes the function he desires. Because the control Disk Utility Program 27 information for each type of Disk Utility Program Control card is different, the format of each is described separately in the separate routine descriptions. After the execution of a Disk Utility routine is completed, control is returned to the Monitor Control Record Analyzer routine. A DUP Monitor Control card, as well as a Disk Utility Program Control card, is required each time a Disk ,Utility routine is to be executed. These cards are stacked with the other input cards to be processed by the Monitor System. This stacked input may be in card or paper tape form or it may be entered from the typewriter. If the code word contained in, a Disk Utility Program Control card is not one of the ten legitimate codes (DWRAD, DALTR, DDUMP, DLOAD, DREPL, DELET, DFINE, DCOPY, DLABL or DFLIB) an error message will be typed and the computer will halt. This message will be comprised of the data from the control card and a constant, ERR CONTROL. When the Start key is depressed, the Disk Utility routine will return control to the Monitor Control Record Analyzer routine which will pass all cards until the next Monitor Control card is reached. If the control record is entered from the typewriter, the message ENTER DUP CNTRL REC is typed and the computer halts. The user may then enter the next Disk Utility Control record from the typewriter and depress the R-S key to continue processing. Records are entered in the alphameric mode The Disk Utility Program uses the I/O routine of the Supervisor Program to perform its I/O functions Therefore, error messages associated with that routine will be typed if an I/O error occurs. The I/O error messages, as well as operating options for I/O errors, a:ce described under, I/O ERROR ROUTINE, in the Supervisor Program section. Whenever a Disk Utility routine is instructed by a control record to write read-only flags with sector addresses, the message DUP 0 TURN ON WRITE ADDRESS KEY, START is typed and the program halts. The operator should tum on the Write Address key (to allow read-only flags to be written) and depress the Start key to continue processing. After the program has been completely loaded, the message operator to turn off the Write Address key. Whenever a program of less than 200 sectors is assigned to disk by any Disk Utility routine, it will always be placed in consecutive sectors of one cylinder. However, a program can be assigned by the user, to any available disk storage area as described under LOAD PROGRAMS HUUTINE.. Programs as large as 999 sectors long can be processed by the Disk Utility Program. After a program is loaded to disk by any Disk Utility Program routine, the message DK LOADED AAAAAA lIII DiSDDDD SSS CCCCC EEEEE =1= is typed to inform the user about the assigned DIM entry. AAAAAA is the assigned program name, nn is the assigned DIM entry number and the remainder of the message is the DIM entry itself. Write Addresses Routine The Write Addresses routine is used to write sector addresses on a disk pack. Addresses may be written with or without read-only flags over the leftmost positions. Data positions of each sector may be changed to zeros or left unchanged. When the Write Addresses routine is executed, the \Vrite Address key must be turned on. The message: DUP ~ TURN ON WRITE ADDRESS KEY, START is typed to signal the operator to turn the switch on. After the routine has been executed, the message: DUP ~ TURN OFF WRITE ADDRESS KEY, START is typed to signal the operator to turn the switch off. The format of the control card follows. Control Card (DWRAD). Columns 1 2-6 7-12 17 18 DUP 0 TURN OFF WRITE ADDRESS KEY, START is typed and the program again. halts to allow the 28 Asterisk (0) Code word, DWRAD. Disk sector address where writing is to start (seek address ). Letter P if read-only flags are to be written over addresses; 0 the r w i s e leave blank. Letter Z if data positions are to be changed to zeros; letter S if data positions are to remain unchanged. 21-26 Address to be written at sector where writing is to start. time this routine is used. Control is .transferred to the Alter Sector routine when the control card is read. 27-32 Final address to be written. Control Card (DALTR). Columns 1 Asterisk (0) 2-6 Code word, DALTR. When the DWRAD Control card is read, control is transferred to the Write Addresses routine and the message WRITE AND SAVE SEEK START STOP XXXXXX XXxxXX XXXXXX or the message WRITE AND ZERO SEEK START STOP XXxxxx XXxxXX XXXXXX is typed to allow verification of control record data and the computer is halted. (Note that the second form of the message indicates that sector data positions are to be changed to zeros.) Six X's indicate the respective seek, start, and stop addresses. Depressing the Start key causes execution of the routine. The routine seeks the disk sector address specified in columns 7-12. The address specified in columns 21-26 is written in that sector; the address is then incremented by one and written in the next sector. Writing continues in this manner until the incremented address is equal to the final address (columns 27-32) and the final address has been written. If the program is unable to find the starting address (columns 7-12), or any address that should be on the specified track in disk storage, an error message ER SK XXXXXX will be typed. XXXXXX is the disk address on the last sector examined when no equal comparison could be made with the sector addresses that should be on the track that has been read. In addition, the 20 sector addresses from the selected track will be typed and the program will halt. \Vhen the Start key is depressed, control is returned to the Monitor Control Record Analyzer routine to read the next Monitor Control record. Alter Sector Routine This routine allows the user to alter the data in any selected sector of disk storage. The sector data to be changed· is typed out. All, or selected portions of the sector may then be updated. After the changes have been made, the old and the new data are typed out for visual comparison and verification. If the changes are satisfactory, the new data.is stored on the disk pack. As many sectors as desired may be altered each After the control card is read, the message SECTOR is typed and the program halts. The operator types in the 6-digit address of the sector to be altered and depresses the Release and Start key. If more or less than six digits are typed, the message SECTOR ADDRESS ILLEGAL, START TO RE-ENTER °DALTR is typed and the machine halts. Pushing the Start key will restart all operations on the given sector. The routine reads the sector and types it out in the following format. 1st Half xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx ORIGI NAt 2nd Half xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx ORIGI NAl Note that the two halves of the sector are identified by the phrases, "1st Half" and "2nd Half," respectively. (Typewriter margins must be at least 70 spaces apart to permit this format.) Each group of ten characters is assigned a section number by the routine. The first five groups are assigned numbers 01-05; the last five groups are assigned numbers 06-10. After the sector data is typed out, the routine requests the number of the section in which the first change will be made. The message typed out is shown below: SECTION The user now types in one 2-digit section number between 01 and 10. After depressing the Release and Start key, the message SECTION NUMBER ILLEGAL, START TO RE-ENTER °DALTR is typed if the section number is greater than 10. If the section number is correct (between 01 and 10), the selected section is typed out for verification as shown below. XXXXXXXXXX TYPE CHANGE The changes can now be entered directly under the typed section. If a particular character does not Disk Utility Program 29 require changing, an "x" may be typed under that character, or the character itself may be retyped. Although only one section is typed out for anyone selection, succeeding sections may be altered by continuing to type changes. Spacing is optional except that the number of characters (including spaces) cannot exceed 100. Spaces (alpha blanks) will not become part of the sector data. For example, assume that section 3 is selected and is typed out as shown below: 3574246798 The operator desires to make some changes in section 3 and section 4. For this example, the typewritten page may look like this: At this point the routine will again type the word SECTION If other changes must be made, the operator enters a new (or possibly the same) section number and depresses the Release and Start key. The SECTION change routine is now repeated. When all the changes prove satisfactory, the operator enters a record mark instead of a section number and depresses the Release and Start key. The routine then writes the updated sector back on the disk pack and types the message DISK SECTOR DDDDDD CORRECTED is the sector address that was selected to be changed. The routine then branches to the part of the routine that types the message "SECTOR" to allow the user to choose another sector address and change another sector. When all desired sectors have been altered, this routine is concluded by typing a record mark instead of a sector address after the word SECTOR has been typed out. This will cause control to be returned to the 1620 Supervisor Program, which will read another 1620 Monitor II control statement. DDDDDD 3574246798 TYPE CHANGE XXX7625X82 75234XX479 Typing may be terminated as soon as the last digit to be changed is typed; that is, if the fifth digit in section 4 (previous example) is the last change, the last five digits of section 4 do not have to be typed in. If the user does not type changes but simply depresses the Release and Start key, the message CORRECTIONS HAVE NOT BEEN ENTERED is typed and the computer will halt on a read alphameric instruction to allow the user to enter the changes. If more digits are entered than the sector can contain, the message TYPE-IN EXCEEDS SECTOR LENGTH, START is typed. Depressing the Start key allows the operator to begin again and enter a new sector address. Spaces are optional and do not become part of the sector data; however, they are counted toward the maximum allowable number of characters which is 100. After all changes have been made, the operator depresses the Release and Start key. The routine then types out the Original sector data along with the changes that were typed in. The output appears as shown below: 1st Half 1234567890 1234567890357424679886542132120987654321 ORIGINAL 1st Half 1234567890 1234567890 3577625782 7523413479 0987654321 CORRECTED 2nd Half 7265417623 0176421432 8543217290 5482797654 8243176521 ORIGINAL 2nd Half 30 7265417623 017642143285434172905482797654 8243176521 CORRECTED Operating Notes When the routine is ready to accept the new data (after the section number is typed in), it positions the console typewriter in the "alphameric shift" mode. Therefore, typing numerical data requires the operator to manually shift into numerical mode. Flagged digits 1-9 may be inserted by typing the corresponding alphabetic letters J-R. Flagged zeros, numeric blanks, flagged record marks, and flagged group marks may be entered by using minus (-) key, @ key, W key, and G key, respectively. Alpha blanks ( spaces) do not become a part of the sector data. Disk-Io-Output Routine The Disk-to-Output routine transfers data from selected portions of disk storage to cards, paper tape, or the typewriter. This routine enables the user to preserve original records before they are updated or changed, thus providing an audit trail. The card or paper tape output will be in numerical form and will contain record marks and group marks. Numerical blanks result in blank card columns. This routine can be used to obtain any of the following items of output as directed by the user. l. Program or data identified by name. 2. Program or data identified by DIM number. 3. Data between sector limits. 4. DIM table. 5. Equivalence table. 6. Availability list (extracted from Sequential Program table). 7. Sequential Program table. The routine is executed whenever a DDUMP control card is read by the Disk Utility Program or wherever a FORTRAN compilation or sps assembly requires punching into cards or paper tape. The Disk-to-Output routine can be used to transmit any number of disk sectors to cards, paper tape, or typewriter. Transmission will start with the first sector specified in a DIM entry or with a beginning sector specified by the user. Transmission will end when the sector count in the DIM entry reaches zero or when a specified ending sector is found. The output following compilation or assembly is terminated by a "9's" trailer record. The trailer record format is five 9's followed by a record mark, 69 zeros and a sequence number. This record always follows all sps and FORTRAN object programs. During execution of the Disk-to-Output routine, resulting from DUP control records, error messages 01, 04, 06 or 20 may be typed (see ERROR DETECTION AND CORRECTION). The control card used to transfer control to the Disk-to-Output routine is punched in the following format. Control Card (DDU"AIP). Columns 1 2-6 7-12 13-16 17 Asterisk (1<). Code word, DDUMP. Alphabetic name of program or data to be punched or typed (same name that a p pea r s in Equivalence table) . DIM entry number of programs to be punched or typed. (If the letter M is present in column 18, either a name or DIM entry number must be present, but both need not be present.) Output device, C == card P == paper tape T == typewriter 18 Identify output I == Dis k Identification Map (DIM). E == Equivalence table A == Avalability entries from the sequential program table from' the disk module specified by column 19 ( typed output only). S == E n t ire sequential program table from the disk module specified by column 19. M == Program identified by columns 7-12 or 1316 of this card. L == The sectors between limits as specified by columns 21-26 and 2732 of this card. 19 Module number (0, 1, 2, or 3) to be used if output options S or A are exercised (see column 18 above). 21-26 Beginning disk storage address of output (lower limit) . 27-32 Ending disk storage address of output (upper limit). Output Format CARD Each 300 positions of disk storage (three sectors) will be punched into four successive cards; 75 columns of disk data followed by a five-column sequence number in each card. When 2 sectors are to be outputted, 3 cards are punched. When 1 sector is outputted, 2 cards are punched. Therefore, all disk data is punched from 1 or 2 sector outputs. A special trailer card containing 9's in columns 1-5, a record mark in column 6, zeros in columns 7-75, and a sequence number in columns 76-80 will be punched following the last output card. This record is used to terminate loading when the output is reloaded by the Load Programs routine or Replace Programs routine. If the output deck is reloaded by the Load Programs routine or Replace Programs routine, the trailer card must remain behind the deck for control purposes. DISK Utility Program 31 The 9's trailer record will load into the work cylinders along with the balance of the data; however, the trailer record will not require extra disk storage positions if the data is moved to another disk location. If the output is a program to be reloaded by the loader routine, the entire program must be outputted. The System Output Loader routine requires an entire program, with all of its indicator codes, in order to operate. When either the DIM table or Equivalence table is punched out, they Will be in a loadable format; i.e., alphameric characters will be in 2-position alphameric coding form. Sequential Program table by the Disk-to-Output routine. Equivalence Table. Equivalence tables are typed in the following format with five entries per line. NNNNNN 1111 NNNNNN ill I NNNNNN illl NNNNNN ill I NNNNNNili1 - - - - NNNNNN 1111 NNNNNN 1111 NNNNNN 1111 NNNNNN 1111 NNNNNN 1111 is the alphameric name. is the DIM entry number. Available FORTRAN library entries will appear as RRRRRR 9999 in place of NNNNNN lIll. NNNNNN PAPER TAPE IIII This output will be in standard loadable format, i.e., it may be reloaded to disk storage by the Replace Programs routine. The output will be identical to the card format described above, except that the sequence number will not be punched with paper tape records. The last output sector will be followed by a trailer reGord for control in the event that the output is reloaded into disk storage. TYPEWRITER With the exception of the Availability list and Equivalence table, all typewriter output will be in a standard format. Each 100-character sector will be typed on two lines as shown below. 11 100 I ,1 1001 I] ]00 I Availability Lists. Availability lists are typed as follows: AAAAA BBBBB CCCCC BBBBB CCCCC BBBBB CCCCC is the disk pack identification number. is the starting disk address of an unused area of storage. ccccc is the ending disk address for the unused area. These entries, one per line, are extracted from the AAAAA BBBBB 32 Load Programs Routine The Load Programs routine is used initially to load SPS I1-D or FORTRAN II-D object programs from the working cylinders or programs previously dumped by the Disk-to-Output routine, from cards or paper tape into disk storage. Overlap of occupied areas of disk storage is prevented by the routine. Programs cannot be loaded in the work cylinders with this routine. Programs will be loaded into areas of disk storage selected by the routine itself, if the user does not specify a storage area preference. If the routine selects the storage area, it will always store the program on a Single cylinder, without overlapping cylinders, unless it is longer than an entire cylinder. If the user selects the storage area, it will be stored in the selected area regardless of cylinder overlap conditions. This routine provides the following program loading options. 1. A name may be assigned to the program and placed in the Equivalence table. 2. A DIM entry may be assigned to the program. 3. The disk storage location can be specified and permanently assigned (fixed). 4. An entry address (execution address) can be assigned in the DIM entry to the program. 5. Read-only Hags can be written in the sector addresses. 6. The disk storage location for the program can be specified by cylinder ( s) without causing permanent assignment. Thus, several associated programs can be assigned to the same cylinder or group of cylinders by the user without actually specifying sector addresses. 7. Programs in either core-image or system output formats can be loaded; and programs in system output format can be converted to core image while loading. It is possible, by exercising option 3, to permanently assign the sectors where the program is to be loaded in disk storage. This capability is provided in this routine only. When using this option, any programs already in the specified load area, but not permanently assigned, will be moved. The overlapped program is moved to the area which immediately follows the new program. If this in turn would result in additional overlapping of other programs, the process of moving programs continues until available space is found. If any program, in this move, is a permanently assigned program, or contains read-only flags in its sector addresses, no programs are moved and the new program will not be loaded. A program is considered immovable if it is either permanently assigned by the Load Program'S" routine or if it contains read-only flags in any of its sector addresses. Permanently assigned programs can be . l. Deleted by the Delete Programs routine. 2. Copied by the Disk-to-Disk routine. 3. Changed by the Alter Sector routine. 4. Dumped into card or paper tape or printed on the typewriter. 5. Read for any purpose with normal read commands. However, a permanently assigned program will not be moved in disk storage by the Disk Utility Program. Programs being loaded can be "file protected" by writing read-only flags over the disk addresses of the storage sectors. All loading options are indicated by the control card. Control Card (DLOAD). Asterisk (~) Columns 1 Code word, (DLOAD). 2-6 7-12 Alphabetic name (left-justified) of program to be load/" ed into disk storage. 17-20 A DIM entry number to be given the program to be loaded. ( This number will not be used by the routine if it is already assigned to another program.) 21-26 Beginning disk sector address in the work cylinders that contains the program to be permanently loaded. The first digit of the sector address selected must be 1, 3, ,5, or 7. 27-32 33-38 39-43 44-48 49 50 51 Ending disk address in the work cylinders that contains the program to be permanently loaded. The first digit of the sector address selected must be 1, 3, 5, or 7. Assigned disk storage address of the program to be loaded. (If this address is included, the program will be permanently assigned to the given address.) The first digit of the sector address selected must be 1, 3, 5, or 7. Core storage address for a program that is placed in disk storage in core-image format. This address will be placed in the CCCCC portion of the associated DIM entry. Entry address ( address of the first instruction to be executed) for a program that is being loaded. This address is placed in the EEEEE portion of the associated DIM entry. This address is used for reading programs from disk in core-image format with the I/O routine. Input device, C == card P == paper tape. D == disk storage w 0 r k cylinders. Letter I, if program to be loaded is in Core Image format. S, if program to be loaded is in System Output format. M, if program to be loaded is in System Output format, and it is to be converted to Core Image format before loading t 0 disk storage. Letter P, if read-only flags are to be written over disk addresses of storage sectors; Disk Utility Program 33 52-54 55-57 60 otherwise leave blank. Beginning cylinder (three digits XYY, where X is the module, 0, 1, 2, or 3, and YY is the cylinder number 0099) to define lower limit where program can be loaded. Ending cylinder (three digits XYY, where X is the module 0, 1, 2, or 3, and YY is the cylinder number 0099) to define upper limit where program can be loaded. (Note that both the upper and lower limits will be ignored by the routine if columns 33-38 of this card are punched.) Any non-blank character, if program to be loaded is a FORTRAN or sps object program which requires subroutines. 13-16 17-20 21-26 27 -32 39-43 Replace Programs Routine The Replace Programs routine is used to replace programs in disk storage with updated, changed, or new programs. Programs can be loaded to a disk storage area from cards, paper tape, or from another assigned disk storage area. In addition to loading disk stored programs, identified by DIM entries, programs can be loaded from work cylinders. A program can be given another name in the Equivalence table by reloading the program over its original assigned disk area using a different name. The program can then be called by either name since both names are maintained in the Equivalence table. With this routine, it is possible to load a program to itself adding read-only flags to the disk addresses. A permanently assigned program in disk storage cannot be replaced by this routine. To replace a permanent program, (1) delete the program with the Delete Programs routine and, (2) load the replacement pro. gram with the Load Programs routine. The format of the control card for this routine follows. All fields are optional with the exception of columns 1-6, 17-20, and 49. Control Card (DREPL). Columns 1 2- 6 7-12 34 Asterisk (~). Code word, DREPL. Alphabetic name of pro- 44-48 49 50 gram. The DIM en try number which identifies the program to be loaded if the program is from another assigned disk storage area. (The program to be loaded will be deleted from its original disk storage location.) The DIM entry number which identifies the program to be replaced. Beginning disk sector address if the program to be loaded is in the work cylinders. The first digit of the sector address selected must be 1, 3, 5, or 7. Ending disk sector address if the program to be loaded is in the work cylinders. The first digit of the sector address selected must be 1, 3, 5, or 7. Core storage address for a program that is to be placed in disk storage in core-image format. This address will be placed in the CCCCC portion of the associated DIM entry. Entry address (address of the first instruction to be executed) for a program that is being loaded. This address is placed in the EEEEE portion of the associated DIM entry. Input device, C == card. P == paper tape. D == disk storage. Letter I, if program to be loaded is in Core Image format. S, if the program to be loaded is in S y s t em Output format. M, if program to be loaded is in System Output format, and it is to be. converted to core image format before loading to disk storage. Letter P, if read-only flags are to be written on disk addresses of storage sectors; otherwise I e a v e blank. Any non-blank character, if program to be loaded is a FORTRAN or SPS object program which requires subroutines. 51 60 13-16 The DIM entry number which identifies the program .to be copied. 21-26 Beginning sector address of program or data to be copied. 27-32 Ending sector address of program or data to be copied. (Note that the beginning and ending sectors will always be used if present.) 33-38 Beginning disk sector address of the new copy. This address must be that of work cylinders or available disk storage. This field must always be punched. Letter P, if read-only flags are to be written on disk sector addresses at the new location of the program; otherwise leave blank. The sectors that are to contain the copy must not have read-only flags in the sector address initially or an error will be indicated and copying will be terminated. After the data is successfully copied, the message 51 Disk-to Disk Routine This routine can be used to copy data or programs in disk storage to any available (unoccupied) disk storage area including the work cylinders. A program to be copied should be specified by a DIM entry, an alphabetic name that is in the Equivalence table, or a sector address given by the user. The program cannot be copied into an area which is already identified by a DIM entry number, except the work area (DIM entry 0001). Read-only flags may be written with the disk sector addresses of the copy, except in work cylinders,. at the option of the user. When this routine is used, the DIM table and the original program remain unchanged. It is not possible to copy a program over a portion of that same program. It is not possible to copy a program into the work cylinders if that program exceeds the work cylinder limits. Data can be copied from one portion of the work area to another; however, no check will be made for overlapping of data within the work area. If a program or data to be copied is less than 100 sectors, there is no danger of overlap. If any read-only flags are encountered in sector addresses within the copy area, an I/O routine error message is indicated. The program will be copied up to the point of the error. The options offered by this routine are identified in the control card that follows. Control Card (DCOPY). Columns 1 Asterisk (0) 2-6 Code word, DCOPY. 7-12 Alphabetic name of program to be copied. NNNNN SECTORS OF DATA COPIED FROM xXxxxx TO yYyyyy is typed, where NNNNN specifies the number of copied sectors and xxxxxx and yyyyyy are the beginning sector addresses of the From and To areas, respectively. If the copied data is written with readonly flags, an additional message is typed. AND FILE PROTECTED To move a program or data from one disk area to another, it should be: (1) copied to the working cylinders from the original area, (2) deleted from the original area, and (3) loaded to the new area from the working cylinders. This can be accomplished by using the Disk-to-Disk, Delete Program..;;,. and Load Programs routines, in that order. Therefore, a °DCOPV control record is used to copy the program into working cylinders; a ODELET control record is used to make the original storage "area available by deleting its DIM entry and Equivalence table entry; and a °DLOAD control record is used to load the program to a specified sector address and to generate the new DIM entry and Equivalence table entry. Disk Utility Program 35 Delete Programs Routine This routine can be used to delete a program and its associated DIM entry, Sequential Program table entry, and Equivalence table entry (if any) or entries (where the program has more than one name) from disk storage. When a program is deleted, read only Bags will be~ removed and programs in successively higher disk storage positions will not be moved up to fill the vacated storage area. The format of the control card follows. Control Card (DELET). Columns 1 Asterisk (~) 2-6 Code word, DELET. 7-12 Alphabetic name of program to be deleted (same name that appears in Equivalence table). 13-16 DIM entry number of program to be deleted. (Note that either a Name or DIM entry number must be present, but not both.) Define Parameters Routine This routine can be used to alter the assignment of work cylinders, DIM table, Equivalence table, Sequential Program table, or certain system specifications in the System Communications Area for the Monitor System. The DIM table may be lengthened or shortened, but may not-be moved from cylinder 24. The Sequential Program table may be shortened, but must remain on cylinder 99. The EqUivalence table may be lengthened or shortened. It will always immediately follow the DIM table, even if the DIM table is altered in length. This routine can also be used to indicate that more than one disk storage drive is to be used with the 1620. When the size of the DIM table is changed, the Equivalence table will be moved to immediately follow the DIM table. When redefinition of an area (working cylinders, DIM table, or Sequential Program table) is attempted, the area must be available; i.e., it must not be occupied by programs with assigned DIM entries. If an area is unavailable, it will not be redefined and the follOWing message will be typed. DUP ~ ERROR 08 The normal assignment of disk storage for the above mentioned tables is as follows. Cylinder Description Assignment Work Cylinder 00-23 DIM table 24 Equivalence table 25 (first eighty sectors) Sequential Program table 99 ( second through eighty-first sector) 36 To make any alterations to these assignments, or to the system specifications, the user must enter a control card containing the new parameters. Only the parameters to be changed need to be punched in the control card. The parameters from a control card are processed from left to right by the routine. If any parameter is invalid, those parameters to its right will not be processed. Control Card (DFINE). Columns 1 Asterisk( ~ ). 2-6 Code word, DFINE. 7-12 Beginning disk sector address of work cylinders (must be first address of a cylinder). 14-16 Number of cylinders to be reserved for work cylinders ( 11 minimum, 99 maximum). 18 Number of disk storage drives on system (1-4). 20-22 Number of sectors to be reserved for DIM table (35 minimum, 999 maximum). 24-26 Number of sectors to be reserved for Equivalence table (9 minimum, 999 maximum). 28-30 Num ber of sectors reserved for Sequential Program table (80 sectors maximum). (Note that the same number of sectors is reserved for each disk storage drive on the system as defined in column 18.) 37-38 Standard length of mantissa for sps Boating-point subroutines (disk sector positions 40-41 of the Communications Area; 08' when the system is delivered). This value may be any number between 02-45. 40-41 Standard sps subroutine set identification number (disk sector positions 42-43 of the Communications Area; 02 when the system is delivered). 01 - Fixed length mantissa (08) Boating-point subroutines for machines equipped with Automatic Divide feature. 02 - Variable-length mantis·sa floating-point subroutines for machines equipped with the Automatic Divide feature. 03 - Variable-length mantissa floating-point subroutines for machines equipped with the Automatic Floating-point feature. 43 Standard N (noise) digit (any number 0-9) for sps subroutines (disk sector position 44 of Communications Area; 0 when the system is delivered). 45-46 Standard length of mantissa (any number 02-28) for FORTRAN programs ( disk sector positions 45-46 of Communications Area; 08 when the system is delivered). 48-49 Standard fixed-point word length (any number 04-10) for FORTRAN programming system (disk sector positions 47-48 of Communication Area, 04 when the system is delivered). 51 Source of Input, other than disk input, for FORTRAN subprograms (disk sector position 73 of Communications Area; 5 when the system is delivered). 3=paper tape 5=card 53 Core storage capacity of object machine (disk sector position 76 of Communications Area; 1 when the system is delivered). 1=20,000 3=40,000 5=60,000 57 Arithmetic and I/O subroutine set identification number (disk sector position 83 of Communications Area; 1 when the system is delivered). FORTRAN 1 or 3 == disk storage version for machines equipped with the Automatic Floating-Point feature. 2 or 4 = core storage version for machines equipped with the Automatic Floating-Point feature. The number of disk storage drives on the system may be 1, 2, 3 or 4. The Supervisor Program and the Disk Utility Program will need to know this number in order to utilize all available disk storage. The system will utilize only the first disk storage drive unless additional drive availability is specified by a DFINE control card. Therefore, it may be necessary for the user to process a DFINE control card immediately after initially loading the Monitor System. When loading programs and assigning addresses, the Monitor System will start with the first available sector on the first available disk drive and proceed sequentially higher to available drives. Also, the user may want to change some of the other parameters of the system before any actual processing is initiated. If any errors are found in any data on a DFINE control card, all data to the left of the data in error will have been processed and data to the right will be ignored. See ERROR DETECTION AND CORRECTION for a description of possible DFINE errors. When the routine is used to enlarge or shorten the tables or to change the number of disk storage drives for the system, the °DFINE record should be followed by a =F =FPAUS record. After the routine is executed, =F =FP AUS record will halt the computer to allow the operator to reinitialize the System; i.e., to reload the Monitor System into core storage. The procedure for calling the System into core storage from disk storage is deserted under OPERATION in the Monitor II System Section. Define Disk Pack Label Routine This routine can be used to initialize a new disk pack for the Monitor System by writing the disk pack identification number in the label sectors (first and last sectors of cylinder 99) and the Sequential Program table in cylinder 99. All disk packs 'Used by the Monitor System must be labeled and must contain a Sequential Program table. The disk pack identification number is written in the first five positions of the first sector in cylinder 99 and a read-only flag is written over the corresponding sector address. The same number is also written in the 31st through 35th positions of positions 1-100 of the last sector of the disk pack. This sector address is changed to 00199 regardless of the addressing scheme used for the remainder of the disk pack. Note that it is necessary to initialize the disk pack which contains the Monitor system because the sysDisk Utilitu Program 37 tern pack is not automatically initialized when the system is loaded. Label sectors on a pack which contains the Monitor System may be changed by this routine; however, the Sequential Program table will not be re-initialized. The Monitor System disk pack is identified by '04800 in the sector address portion of DIM entry 3. The format of the control card follows. Control Card (DLABL) Columns Asterisk (0). Code word, DLABL. Disk pack indentification numder to be assigned. 12 Disk drive number (0, 1, 2, or 3) of the disk drive that contains the disk pack to be labeled. Both a disk pack identification number and disk drive number must be given. If either one is missing, the message 1 2-6 7-11 DUP 0 ERROR 01 is typed and the computer halts without writing label sectors. To correct the error, the operator may enter a corrected control card in the stacked input. Depressing the Start key will return control to the Monitor Control Record Analyzer routine to read the next Monitor Control record in the stacked input. Only numerical characters may be entered for the disk pack identification number. If this number is all zeros or any position contains a letter or special character, the message DUP 0 ERROR 10 is typed and the computer halts without writing a label sector. The restart procedure is the same as that given above for ERROR 01. Control Card (DFLIB). Columns 1 2-6 7-12 14-15 Asterisk (0). Code word, DFLm. Name of library subroutine, left-justified. DIM number. This number was odginally specified by the user when the subroutine was added to the system disk pack. The abbreviated 2-digit DIM numbers for the sixteen standard library subroutines may be found)n the FORTRAN II-D Library Subroutines table in the FORTRAN section. When a name is entered in the Equivalence table, the message FORTRAN LIB NAME ENTERED NNNNNNIIII is typed, where NNNNNN is the name specified in columns 7-12 and rUI is the DIM number specified in columns 14-15 (preceded by two zeros). Both a Name and DIM entry number must be given. If either is omitted, error message 01 will be typed. Error message 10 will be typed for any of the following conditions. 1. The Name is all numbers, its first character is not alphabetical, or it contains special characters, including nonterminating blanks. 2. Columns 7-15 contain a record mark or group mark in any position or column 13 is not blank. 3. The DIM number is outside the range 10-39 or it contains letters or special characters. Error message 54 will be typed if no space is available for the Name within the first 50 entries of the Equivalence table. Also, the Name itself will be typed. Error message 51 will be typed if the name is a duplicate of another name in the Equivalence table. If operator action is required for any of the above messages, refer to ERROR DETECTION AND CORRECTION. Define FORTRAN Library Subroutine Name Error Detection and Correction This routine permits the user to assign additional names (synonyms) for the FORTRAN library subroutines or to assign names to user-written library subroutines. Any user-written library subroutine with more than one entry will require this routine in order to place the name of the additional entries in the Equivalence table. These names are added to the Equivalence table within the first 50 entries of the system disk pack. In addition to the messages described with the individual Disk Utility routines, other numbered error messages may be typed. These messages, described here, may be common to more than one Disk Utility Program as well as FORTRAN or SPS output operations that follow compilation or assembly. Table 1 indicates, by message number, the error messages that may be generated by each routine. A list of the error messages and their cause, and a list of operator actions for the associated messages follow. The control card format follows. 38 Error Messages DUP DUP DUP DUP DUP 0 0 0 0 0 ERROR 01 ERROR 02 ERROR 03 ERROR 04 ERROR 05 DUP 0 ERROR 06 DUP 0 ERROR 07 Table 1. Cause Field missing from control card. "TO" DIM entry number specified in DREPL control card is not in use in DIM table. "TO" DIM entry number, specified in a DREPL control card refers to permanently assigned program. ~~FROM" DIM entry number specified i n a DDUMP, DBEPL, or DCOPY control card is not in use in the DIM table W 0 r k cylinders illegally specified for program storage by DLOAD or DREPL control card entry. DIM entry number specified in a DDUMP, DLOAD, DREPL, DCOPY, or DELET control card is out of range of DIM table entry capacity. "FROM" DIM entry number in a DBEPL control card re- DUP DUP DUP ERROR 08 0 0 ERROR 09 ERROR 10 DUP 0 ERROR 11 DUP 0 ERROR 12 DUP 0 ERROR 13 DUP 0 ERROR 14 DUP 0 ERROR 15 0 fers to an immovable program. Insufficient available storage space at location specified by a DLOAD, DREPL, DCOPY, DFINE control card. DIM table is full. Field in DFLIB, DCOPY or DLABL control car d contains invalid data. Number of modules specified . in DFINE control card is greater than 4, or less than 1. Beginning disk sector address of work cylinder, in DFINE control card, is not first address in cylinder. Insufficient available storage for specified work cylinder (DFINE control card). Number of sectors specified by DFINE control card for Sequential Program table exceeds 80 seCtors. Sector address is non-numerical in a DWRAD, DDUMP, DLOAD, DREPL, DCOPY, or DELET control record. Numbered Error Messages Generated by Disk Utility Routines ERROR MESSAGE NUMBER ROUTINE Write Addresses (DWRAD) 1 2 3 4 5 6 7 8 9 10 1112 1314 1516 7 18 1920 21 24 5152 5..: 154 55 56 57~8 59 60 61 X X X Alter Sector (DALTR) X X Load Programs (DLOAD) X Replace Programs (DREPL) X X X XX X X X Disk-to-Disk (DeOPY) X De Iete Programs (0 ELE T) X Define Parameters (DFINE) X Define Disk Pock Lobel (DlABL) X X Define FORTRAN Library Subroutine Nome (DFLlB) X X FORTRAN or SPS Output X X Disk-to-Output (DDUMP) X X X X X X X X X X X X X X X X X X X X X X X X X XX X X X X .x X X X X X X X X X X X X X X X X X X Disk Utility Program 39 DUP 0 ERROR 16 DUP 0 ERROR 17 DUP 0 ERROR 18 DUP 0 ERROR 19 DUP 0 ERROR 20 DUP 0 ERROR 21 DUP 0 ERROR 24 DUP 0 ERROR 51 DUP 0 ERROR 52 DUP 0 ERROR 53 AAAAAA 40 Storage location specified by a DCOPY con t r 0 I car d would cause program storage to overlap work cylinders if allowed. Starting sector address is greater than ending address for DWRAD, DLOAD, DREPL" or DCOPY control card. Sequential Program table is defined as less than required by the present contents of that table (DFINE control card). Core storage address of a program to be placed in disk storage in core image format is less than 02302. A blank address will be treated as 02402. If the program is a Library function ( DIM enbies between 10 and 130), the message will not be indicated. Name specified by DDUMP, DCOPY, or DELET control card is not used in Equivalence table. DIM number specified by DELET control card is not in use. Cylinder limits specified in °DLOAD control card are greater than allowed by System parameters. Name specified is a DLOAD, DREPL, or DFLm control card or a FORTRAN or sps control card has been rejected because a duplication name exists in the Equivalence table. "TO" DIM entry number specified in DLOAD control card is in use in DIM table (The routine will load the program and assign the DIM entry. ) Narne specified in a DLOAD or DREPL control card or a FORTRAN or sps control card has been rejected because the Equivalence table (with the exception of the first 50 entries) is full. AAAAAA is DUP 0 ERROR 54 AAAAAA DUP 0 ERROR 55 CARD SEQUENCE NNNNN DUP 0 ERROR 56 DUP 0 ERROR 57 DUP 0 ERROR 58 DUP 0 ERROR 59 DUP 0 ERROR 60 DUP 0 ERROR 61 the rejected name. Name specified in a DLOAD, DREPL, or a DFLIB control cord or a FORTRAN or SPS control card has been rejected because the first 50 entries of the Equivalence table are full. AAAAAA is the rejected name. Sequence error has been found while reading a program to be loaded to disk storage. NNNNN is the sequence number of the card that is out of sequence. Only cards with an eleven punch over the leftmost position of the sequence number (column 76) are sequence checked; therefore, patch cards are excluded from the check. DIM number supplied in FORTRAN or SPS control card is in use in DIM table, and Name specified in the same card has a different DIM number in the Equivalence table. DIM number supplied in FORTRAN or sps control card is in use in DIM table, and Narne specified in the same card has no matching name in the Equivalence table. <<,D, , T£H.P.3 7.£ I1.P3. 1 0 0, I.B, AS / #.£.-,3.,4 , , 1 1 0 ODD,VN. A A C C(}N, , " " " , . " , ,I •T,Eo 11, p,J, , , , , ' , , , , rE/tf.P3 1 2 0 A XSVSN. ,HI N,ES 130 C XSUE,N. 1 ~ 0 IB,I(,H !A.S / No£.- 3* L lo 5S , TEH.P J - 4 r F. 0 3S 30 I HI.71 AL I ZA.TI ON. FON. 106.0 o Operands & Remarks Operation 11 12 t , • . SPS Statements in Modified "Fixed" Form the Q operand represents the actual data to be used by the instruction. It may be absolute or symbolic as previously defined. High-order zeros of absolute data may be eliminated. During assembly) the processor automatically places a flag over position Q7 of an immediate instruction unless a flag indicator operand indicates otherwise. For example, the statement Mask Digit Operand A mask digit operand is required to specify the mask digit for the Branch on Mask and Branch on Bit instructions. The D in the follOwing examples shows the position of the mask operand in the source statement. Operands & Remarks £.NT Operands & Remarks TOrI! 1.., 1002,3 which assembles to: 91 PPPPP DQQQQ Operands & Remarks causes the number 10023 to be subtracted from the field called TOTAL because the flag that terminates the field to be subtracted is automatically placed over position Q7' However, the statement Operands & Rema rlcs 20 75 JI) so TO TA L • 10023,10 will cause only the number 23 to be subtracted from the field called TOTAL because the Hag indicator operand directs that the field-terminating Hag be placed over position QlO rather than Q7' There is one exception to this rule: a transmit digit immediate instruction (TDM, code 15) does not require a flag; therefore) none is automatically set by the processor. 48 35 which assembles to: 90 PPPPP DQQQQ The mask operand may be symbolic or absolute. The P, Q, and Hag operands are processed in the same manner as for other instructions. If the mask operand is an absolute value, the units character replaces the Q7 character of the Q ?perand. For example: Given: Line 3 label 5. •. , o.i 0.2 8, Operands & Remarks Operation 1112 151' 20 1)5 ,/234.5 DS , ,",34.5.' 75 JI) 35 .0 .5 SO Then: Symbolic Address will assemble to: 91 12345 13456 If the mask operand is a symbol, the units position of the symbolic address will be inserted in the Q7 position of the assembled instruction. For example: Given: line Label o B oMK.D Operands & Remarks Operation 111'2 1516 DS. ,12345 D$ ,234.5'. ,5 D,5 A symbolic address is the name assigned by the programmer to the location of an instruction or a piece of data. A symbolic address is valid only if it is defined (given an actual numerical value) by a declarative statement somewhere in the source program, or if it is used as the label of an instruction. Symbolic addresses may contain from one to six characters (letters, digits, or special characters) with the following restrictions: 1. At least one character must be nonnumerical. 2. The only permissible special characters are: equal sign (=), slash symbol (/), "at" sign (@), and period (.). Blanks are permitted within a symbol; however, they are ignored by the processor during assembly. The example shown below contains both an actual address and a symbolic address. Then: Operands & Remark. 2S ,12251 18MK, IA,',B,'M~D, "", "" !, I I" I! ! !, ! II! , will assemble to: 91 12345 53456 In this example, the data in the field whose actual address is 12251 is added to a field whose address is the symbolic name TOTAL. Types of Addresses Used as Operands Asterisk Address Operands assembled by the processor may be of three types: actual, symbolic, and asterisk. The individual applications for a particular type of address are described in the section PROGRAMMING THE 1620/1710 USING SPS II-D. When the asterisk is used as the first character of an operand in an imperative operation, it is interpreted by the processor to be the address of the high-order (leftmost) position of the instructiQn. For example, the statement Actual Address Operand. & Rema"" An actual address consists of five digits (00000-19999) for a standard capacity machine and is, as the nalne implies, the actual core storage address of a piece of data or an instruction. High-order zeros of an actual address may be eliminated. For example, the statement Operands & Remarks 20 2S 368*".J2251 causes the data in storage location 12251 to be added to the data in storage location 03684. '0 so indicates to the processor that the Q portion of the instruction should contain the address of the instruction. This instruction is assembled as 44 01234 01876, where START equals 1234 and the address assigned to the instruction is 1876. Thus, when executed in the object program, this instruction examines its own leftmost position (1876) for a Hag and either branches to the instruction at location 01234 or continues, on the basis of the examination, to the next instruction located at 01888. When an asterisk (0) address is used with either declarative or control operations, it refers to the SPS II-D 49 rightmost position of storage last assigned by the location assignment counter of the processor - not to the leftmost character of the instruction. For example, the statements Line 3 Label S, 10.10 0,7. ~atior Operand. & Remark. 1516 2S 20 TFM,1204-.5,70000 DC 1 .• .lfil,. produce the instruction traction required to calculate the adjusted address. Intermediate results that are greater than ten digits or a final result (adjusted address) that is over five digits, cannot be calculated by the processor. The following rules apply for address adjustment division operations. 1. The result of an address division operation is the whole number quotient. Any remainder is lost. 2. Division by zero gives the same result as division by one. 3. The order of multiplications and divisions may affect the result. For example: ° 16 12045 7000=1= Since record marks can be defined only in declaraoperations, an imperative statement should be followed by a DC statement when a record mark is required in the instruction. The rightmost position of the instruction is the rightmost position of storage last assigned; therefore, it is also the position where the =1= (constant) is stored. 1/2°2 == (1/2)°2 == (0)°2 == 2°1/2 == (2°1)/2 == (2)/2 == 1 2/1°2 == (2/1)°2 == (2)°2 == 4 tiv~ Address Adiustment of Operands Address adjustment is used to tell the processor to arithmetically adjust the addresses in operands. It is permitted with all types of addresses: actual, symbolic, and asterisk, and is used to refer to a location that is a given number of positions away from a specific address. Use of this feature of the language reduces the number of symbols necessary for a source program. By writing a (plus sign) for addition, - (minus sign) for subtraction, / (slash) for division, and ° ( asterisk) for multiplication, immediately after the first or subsequent term of an operand (an asterisk as a term of an operand does not represent multiplication but means the address of the instruction, as previously explained), the programmer indicates to the processor that the address is to be adjusted. Arithmetically adjusted operands may take the form + / / Lobel Operation IlR/THM£lIC 1000+40 1000 + {2WJ 1000 - 30 where the terms A, B, C, and D may be numerical quantities. The number of terms in the operand is limited only by the size of the operand and remarks field. Thus the operand A B ° C - D may be further adjusted by writing after the last term another term, E,. for example, A B ° C - D E. In arithmetically adjusted operands, the operation or operations of multiplication and division are always performed first, followed by the addition and sub50 EXAMPLES line / ° ° ° A±B±C+D + + For the 1620 or 1710 with standard storage capacity (20,000 storage positions), addresses that exceed 19999 are considered errors; however, they will not be detected as such. Therefore it is possible, with a standard capacity machine, to assemble an object program for a machine with 40~000 or 60,000 positions of storage. For machines that have 40,000 or 60,000 positions of core storage, the processor is automatically modified to use the additional storage to enlarge the size of the symbol table. In that case, addresses that do not exceed 39999 or 59999, depending upon the storage capacity~ are considered valid addresses. In using address adjustment, the programmer should be careful that insertions or deletions do not affect the adjusted address. For example, if a P operand in a branch (B) instruction refers to an address as ° +48 (i.e., branch to the instruction that follows the next three sequentially higher instructions), the programmer must ensure that no new instructions are introduced within the three instructions to make the ° +48 incorrect. In this example, the asterisk (0) is the leftmost position of the 'instruction itself. 1000 + (2X4) 1000 X.3 1000 X 4 500+(;~0 X:3)-11 (foo X5)+(20 X3)-// 2000+12 (ZOOOX3)X2 + The operands shown will produce the adjusted addresses, as indicated, provided the location 1000 has b~en assigned to the symbolic address ALPHA, the 10- cation 4 has been assigned the symbolic address L, and the instruction location (0) is equivalent to 2000. whereas the statements line 3 Operand Modification with Index Registers line Label 56 ~eration 1112 20 2S 30 10 , A ADV'R- 5(.3), S VBTU') 0 A ADD~-5(A3),SUB'R(A') 35 '0 " Operands IE: o,oNEXT & Remarks 20 13668 TFM 12.0IJ.fi,70000 are stored as Operands & Remarks 1516 pperation 1112 0.'0 Any operand that can be indirectly addressed may be modified with an index register. The index register is specified by placing the number of the index register in parentheses as shown in the following examples. 3 label 56 50 Either of the preceding examples which will be assembled as 21 XXXXX XXXXX The number in parentheses must be an integer from The processor decodes the number and places the proper flags over the operands. In the second example, the A in the index register portion of the P operand is ignored by the processor, however, it may be included by the programmer as an aid in keeping track of the IX band currently selected. The processor decodes the rightmost numerical character within the parentheses as the index register number. (See the note under CALL LINK or CALL LOAD LINKAGES in the Supervisor section.) o to 7. 491366800000161204570000 because the unused Q address is not eliminated. In the first example, only four positions of storage are saved; however, a considerable amount of storage can be saved in a program that contains many instructions where the Q or both t.he Q and P portions of instructions are unused. Because the ~ in the DORG statements (see PROCESSOR CONTROL OPERATIONS) refers to the rightmost position of storage last assigned (Qll of the B instruction), 0 -3 is the address where the next instruction starts. To automatically eliminate the unused storage assigned to Branch or Branch Back instructions; the following two imperative mnemonics are included in the SPS II-D language: Meaning Branch and adjust location assignment counter Branch Back and adjust location assignment counter Mnemonics B7 BB2 Branch Operands In some instructions such as Branch and Branch Back, the Q address is not used, although a zero (00000) address is generated. Thus the instruction uses twelve storage positions. By using an 0 address in the following statements, line Label 10' 0 B Line Label Operands & Remarks pperotion 1516 20 Operands & Remarks joperatior 1\12 These mnemonics are written left-justified in the operation field of the statements as shown in the following example. 1516 20 1366,8, The first statement is equivalent to the following symbolic instructions: the instructions are condensed, to eliminate four positions of the unused (zero) Q address, and are stored as 49136680161204570000 B ADDR DORG o -4 where ADDR is the address used by the branch instruction (B). The second statement is equivalent to the SPS II-D 51 following symbolic instructions: BB DORC ~ -9 For all imperative statements, except B7 and BB2, the address assignment counter is incremented by 12. For B7 and BB2 statements, the address assignment counter is incremented by 7 and 2, respectively. A label may be included with a B7 or BB2 statement. Inserting Flags By placing a minus sign in front of the first term of an operand, a Hag ( minus sign) can be inserted over the units position of the adjusted address. This feature of address adjustment can be used for inserting Hags required for Indirect Addressing ( special feature). However, an operand written as -0 (minus zero) does not insert the Hag in the units position over the zero. When the minus sign is written in front of the first term of the operand in order to set a Hag over the units position, other signs following the first term should be reversed so that the correct address is obtained. Programming the 1620/1710 Using SPS 11-0 areas are automatically assigned core storage locations in the order in which they appear in the source statements. To assign addresses for instructions, constants, etc., the processor uses an address assignment counter. This counter is adjusted for each assignment made by the processor. If an address is assigned by the programmer, the counter is not adjusted. The declarative statements provide the object program with the input/output areas, work areas, and constants it requires to accomplish its assigned task. These statements do not produce instructions that are executed in the object program. The entries, DS, DSS, DAS, and DSB assign storage. The entries, DC, DSC, DVLC, DAC, DSAC, DSA, DNB, DDA, DGM, and DMES usually assign storage) and also produce, in the object program, both the machine address of the area assigned and the constants that are to be stored in this area. Constants are then loaded with the object program. Declarative statements may be entered at any point in the source program. However, these statements are normally placed by themselves, preferably at the beginning or end of the program - not within the instruction area. If not placed at the beginning or end, the programmer is required to branch around an area assigned to data so the program will not attempt to execute what is in a data area as an instruction. The declarative mnemonic operation codes and their meanings follow: Code DS DSS DAS DC DSC DVLC This section describes in detail the various steps to be followed in writing a program for the 1620 or 1710 using SPS II-D. The material has been divided into three categories: Declarative Operations, Imperative Operations, and Processor Control Operations. The imperative operations that apply to the 1710 only are listed in Table 22 in the Appendix. DAC DSAC DSA DSB DNB DDA DGM DMES DOT Meaning Define Symbol (N umerical ) Define Special Symbol (Numerical) Define Alphameric Symbol Define Constant (Numerical) Define Special Constant (Numerical) Define Variable Length Constant Define Alphameric Constant Define Special Alphameric Constant Define Symbolic Address Define Symbolic Block Define Numerical Blank Define Disk Address Define Croup Mark Define Message (1710 Only) Define Octal Table Declarative Operations In programming the 1620 or 1710, all records, and any other data that is to be processed by the program, must be assigned storage areas. Normally, all records and data to be processed consist of fields of known length and arrangement. Unless otherwise specified, 52 os - Define Symbol {Numerical} A DS statement may be used to define symbols used in the source program (i.e., to assign storage addresses or values to symbolic addresses or labels) and' to assign storage for input, output, or working areas. A DS statement does not cause any data to be loaded with the object program. The length of the field is defined by the first operand. This operand must be positive and may be an absolute value or a symbolic name. If a symbolic name is used, the symbol must previously have been defined as an absolute value, that is, it must have appeared in the label field in a statement of the source program preceding the one in which it is used. Address adjustment may be used with this operand. The address in core storage of the field being defined may be assigned by the programmer or the programmer may let the processor assign the address. If the processor assigns the address, the statement is terminated after the first operand. If the programmer assigns the address, a second operand, which may be symbolic, asterisk, or actual, is used to establish the address of the field. Since data fields are addressed at their rightmost (low-order) digit, the processor assigns this position as the address of the field. Address adjustment may be used with the second operand. If the second operand is symbolic, it also must previously have been defined. Addresses assigned by the programmer do not disrupt the sequence of addresses assigned by the processor. A DS statement may also be used to define a symboL without assigning any storage, ie., to define it as an absolute value. In this case, the fir~t operand is omitted (Qt' written as 0) and the second operand represents the value (may not exceed five digits in length). The second operand may be an actual value or a previously defined symbol. To define storage which will not be referred to symbolically, the label of the DS statement may be omitted. following statements. cause the processor to associate the address 12930 with the label SUM: Line J Label 5 , ~.(/H Ib.S 0,2,0 $,11,., Po$. 50 In the next example, the programmer assigns the address of the field and excludes the field length (the first operand) from the statement because it is without significance, and replaces it with a comma. The 1 •• 20 25 30 35 <0 50 '5 1293.0 11,J.2,9.3.0 ,,"'Wo. COJII.Itf.AS A G.A./ N. R.E.o.IIIIU,D Again, in this example, two commas are required when remarks form part of the statement. The following statement, which is similar to the one previously given, is assigned a value that is other than an address. Operandi & Remarks (l1N.T $,r.tlT:S This statement defines the symbol FL as being equivalent to the value 17. Subsequent uses of this symbol are permitted because the symbol has been defined. DSS Operand. & R.mark. ,/I,EJf.A~,K,S, Operand. & R.mark. \5\ It should be noted that an area defined by the processor for a DS statement is always addressed at the rightmost position. However, to use this area for input/output, the leftmost digit must be addressed. This is done by using a pss statement in place of a DS statement or by address adjustment with a DS statement, which subtracts a number that is one less than the length of the area from the address of the area. In a previous example, where DELTAX was defined as having a field length of 7, the operand of another instruction to read numerical data into the DELTAX field should be written as DELTAX -6. The follOWing statements define the field length only. When remarks are added to the statement, the field length must be followed by two commas. , ,F,O.!?, p...ration 1112 0\.0 ! Define Special Symbol (Numerical) The DSS statement is similar to the DS statement with one exception: when the second operand is omitted, the processor assigns the leftmost position as the address of the field. If the second operand is assigned by the programmer, this address is assumed to be equivalent to the leftmost position of the field. A DSS statement is normally used to define a storage area for input/output. The data in such an area may be moved during execution of the object program by a Transmit Record instruction which requires that an address assigned to an area must be that of the leftmost position. SPS Il-D 53 ! DAS - Define Alphameric Symbol The DAS statement is similar to the two exceptions: DS statement with 1. The length specified by the first operand is automatically doubled by the processor to allow for alphameric data. Each alphameric character requires two storage positions. 2. The address of the field, if generated by the processor, is the leftmost position of the field plus one. The position is always odd-numbered, as it must be with any alphameric field. The following example illustrates a DAS statement. label line 3 5 6 ~OliOf II 12 IS 16 10 •. 0 T/ T.-L.E IbAS 13.0 10 2 0 T./ T.L E. DA.S 13. 0.. 20 25 3 peration 1112 A record mark may be used in a constant but must be in the units position and must be written as the character @. The following example contains statements that; 1. Store a record mark by itself as a constant. 2. Store a constant 6 and record mark. 3. Store a mi.nus 0773 and record mark. label Line 3 5 6 Operands & Remarks p"erotion. llll 1516 20 3 location 00099, regardless of where the rightmost dividend digit is placed by the Al address. A Hag bit automatically marks the high-order digit of the dividend. The divisor (B address) is successively subtracted from the dividend. The Bl address of the divide macroinstruction positions the divisor for the first subtraction from the high-order position ( s) of the dividend, as in manual division. The Bl address is determined by subtracting the number of digits in the quotient from 100. The quotient and remainder replace the dividend in the product area. The address of the quotient is 00099 minus the length of the divisor. The algebraic sign of the quotient (determined by the· signs of the dividend and divisor) is automatically placed in the low-order position of the quotient. The address of the SPS II-V 73 remainder is 00099; a flag bit is automatically placed in the high-order position of the remainder. The remainder has the sign of the dividend and the same number of digits as the divisor. The high/positive indicator is on if the quotient is positive and not zero; the equal/zero indicator is on if the quotient is zero. Neither indicator is on if the quotient is negative. in effect, restricts the size of the dividend to 10,020 digits if only 20,000 positions of core storage are installed. Floating Shift Right Macro-instruction Operands & Remarks The quotient must be at least two digits in length. This is the minimum field length that the 1620 will accept. EXAMPLES 1. The macro-instruction DIV A, B, 99, 96 will perform the division for (273) 3972 and store the result 0014 in storage locations 00092 through 00095. The effect of this macro-instruction is to shrink the mantissa by shifting it to the right and truncating the low-order digits. The A address is normally the units position of the mantissa. MMMMMMMMEE t 2. The macro-instruction units position of mantissa DIV A, B, 96, 93 will perform the division for 0273 ) 3972.000 and store the result 0014.549 in storage locations 00089 through 00095. NOTE: In examples 1 and 2, A represents the address of the dividend 3972, and B represents the address of the divisor 0273. Incorrect Positioning of Divisor. The following error conditions are caused by an incorrect B1 address. 1. An incorrectly positioned divisor can cause more than nine successful subtractions and an incorrect quotient. The divide operation is terminated, the Overflow indicator and Overflow Arithmetic Check light are turned on, but processing will not stop unless the Overflow Check switch is set to STOP. A divide by zero (K/O) causes the same error conditions just described. 2. The high-order digit of the dividend is assumed by the 1620 to be one position to the left of the high-order digit of the divisor. The high-order digits of the dividend are lost if the divisor is positioned too far to the right. Processing continues with no indication of an incorrect quotient. 3. If the B address is less than 10000, i.e., between 00100 and 00999, the divide operations will terminate when a subtraction occurs at OXX99. This, 74 The B address specifies the digit of the mantissa which will become the low-order digit of the mantissa. Operation. The field at the B address (the portion of the mantissa to be retained) is shifted right to the location specified by the A address. The exponent is not moved or altered. For example, the macro-instruction FSRS 00097,00093 causes the mantissa 30590011325701 tt Storage Address Storage Address 00093 00097 to be shifted, producing the following result 00003059001101 Storage Address 00093 tt Storage Address 00097 Vacated high-order positions are set to zeros, an existing flag at the A address is retained for algebraic sign, and the field flag bit is transmitted with the highorder digit of the B field. Floating Shift Left Macro-instruction --_._--Operands & Remarks The effect of this macro-instruction is to expand the mantissa by shifting it to the left and filling the vacated positions with zeros. It is important to note that the B address is the low-order position of the field moved, and the A address is the high-order position of the resultant field. Operation. The field at the B address, which is the low-order digit of the mantissa, is shifted left so that the high-order digit is moved to the location specified by the A address. The exponent is not moved or altered. For example, the macro-instruction: FSLS 00090,00097 causes the mantissa 0011325701 t t Storage Address Storage Address 00090 00097 to be shifted, producing the following result 1132570001 t t Operation. The field at the B address is transmitted to the location specified by the A address. The B field remains unchanged in storage. Flag bits in the three low-order positions of the B field are also transmitted. Starting with the fourth low-order position, only one additional flag bit is transmitted, and it stops transmission. Branch and Transmit Floating :Macro-instruction The B address is normally the low-order position of the floating-point field exponent, whereas the A address is the leftmost position of the next instruction to be executed. Operation. The address of the instruction following the macro-instruction is saved at a storage location in the BTFS subroutine, and the field at the B address is transmitted to the A address minus one. The normal exit of a routine which is entered by a BTFS is a Branch Back (BB) instruction. The instruction at the A address is the next one executed. The B field remains unchanged in core storage. Any flag bits in the three low-order positions of the B field are transmitted. Starting with the fourth low-order position, only one additional flag is transmitted, and it stops transmission. Storage Address Storage Address Floating Square Root 00090 00097 Macro-instruction An existing flag bit at the Q address is retained for algebraic sign; the field flag bit is transmitted with the high-order digit of the Q field. Operands & Remarks Transmit Floating Macro-instruction The Baddress refers to the low-order digit of the floating-point field exponent, whereas the A address refers to the low-order position to which the field is transmitted. The A and B addresses refer to the units position of the exponents of the fields. Operation. The square root of argument B is extracted and the result, in floating point form, is stored at A. The argument, which must be in floating-point form, is unchanged by the operation. The floating-point square root subroutine accepts all numbers within the floating-point range that are greater than or equal to zero. If the argument is less than zero, a 0 is placed in location 00401 and A is· set equal to SQR jAj. SPS II-D 75 Floating Sine Macro-instruction Operand. & Remarks 20 25 30 35 <5 50 The A and B addresses refer to the units position of the exponents of the fields. Operation. The sine of argument B is computed and the result, in floating-point form, is stored at A. The argument must be in radians and in floating-point form. The computation does not disturb the original value of the argument. The floating-point sine subroutine accepts all numbers of floating-point range up to and including exponent 08 (fixed length mantissa) or L ( variable length mantissa). For arguments with exponents less than 03, the magnitude of the maximum truncation error in the mantissa of the result does not exceed 10-L. Accuracy in the mantissa of the result decreases as the size of the argument (exponent of 03 or greater) increases. For error codes, see Table 5. Floating Cosine Operation. The floating-point value of the arctangent of B is computed and the result is stored at A. The argument must be in floating-point form; the result in radians will also be in floating-point form. The arctangent subroutine accepts any number within the floating-point range. During the evaluation of the arctangent of B, use will be made of the divide subroutine. The maximum truncation error in the mantissa of the result is ± 10-L , except for results having an exponent less than or equal to 02 (E L 02). The maximum error for these results is ± 1 in the (L+ 1 ) th decimal place. L == 08 for the fixed length mantissa. Floating Exponential (Natural) Macro-instruction Operand. & Remark. 20 30 35 <5 50 Operation. The A and B addresses refer to the units position of the exponents of the fields. The value of the e B , where B is in floating-point form, is computed and the result, also in floating-point form, is stored at A. An input value that exceeds Macro-instruction 227.955924206n ...... n(227955924206n ...... n(3) Operand. & Remark. 20 25 30 35 <5 causes an exponent overflow, and one which is less than 50 The A and B addresses refer to the units position of the exponents of the fields. Operation. The cosine of argument B is computed and the result, in floating-point form, is stored at A. The argument must be in radians and in floatingpoint form. The computation does not disturb the original value of the argument. The allowable range of the argument, maximum accuracy, etc., for the cosine subroutine is the same as that previously described for the sine subroutine. -227.955924206n ...... n(227955924206n ...... n(3) causes an exponent underflow. Depending on the type of error, a 1 or 1 is placed in location 00401. For negative arguments, the subroutine uses the absolute value of the argument to evaluate the function and then finds the reciprocal value. For positive and negative arguments, the maximum truncation error in the mantissa of the result is ±10-L. Floating Exponential (Base 10) Floating Arctangent Macro-instruction Macro-instruction Operand. & Remarks 20 Operand. & Remark. 20 25 <5 25 30 35 50 50 B -: The A and B addresses refer to the units position of the exponents of the fields. 76 The A and B addresses refer to the units position of the exponents of the fields. Operation. The value of lOB is in floating-point form; it is computed and the result, also in floatingpoint form, is stored at A. An input value that exceeds 98.9n ... n(989n ... n02) causes an exponent overflow, and one which is less than -98.9n ... n(989n ... il(2) causes an exponent underflow. This subroutine handles negative arguments in the same manner as they are handled by the natural exponential subroutine. Maximum accuracy is the same. Floating Logarithm (Natural) Adding Subroutines The user may add from one to twelve subroutine macros to subroutine sets 01, 02, and 03. Each new subroutine may use from two to nine operands. Although the minimum number of operands allowed is two, both the A and B operands may be the same. To add a subroutine, it is necessary to: 1. Modify the Op Code table to include the new mnemonic (see SPS II-D MODIFICATION PROGRAM). 2. Write the subroutine in SPS language, keeping in mind certain factors regarding PICK, mantissa length (L), and modifications with regard to the subroutine itself. 3. Assemble the subroutine in relocatable form, and store it on the disk. Macro-instruction Modifying the Op Code Table Operand, & Remarb 00 4S 50 The Op Code table is modified by executing the Modification Program. This program is part of the Monitor system; it is described later in the manual. SPS II-D Writing a Subroutine The A and B addresses refer to the units position of the exponents of the fields. Operation. The floating-point value of the In B is computed and stored at A. Input arguments must be in floating-point form. This subroutine accepts all arguments greater than zero within the floating-point range. For error codes, see Table 5. When writing a subroutine, the programmer should be aware of certain information concerning PICK, namely: the functions of PICK, PCK area, linkages, common work areas in PICK, and the means of signifying operands that are relative to PICK and/or are a function of mantissa length. FUNCTIONS OF PICK is common to all subroutines in. the subroutine set. Therefore, it is to the advantage of the subroutine writer to make use of PICK. The listing of the appropriate PICK subroutine (furnished with the Library package) should be studied. Briefly, PICK performs the following operations: PICK Floating Logarithm (Base 10) Macro-instruction Operand, & ....... rb 25 The A and B addresses refer to the units position of the exponents of the fields. Operation. The floating -point value of the log lOB is computed and stored at A. Input arguments must be in floating-pOint form. This subroutine accepts all arguments greater than zero within the floating-pOint range. For error codes see Table 5. 1. Resets location 00401 (subroutine error digit). 2. Moves A and B operands into PCK + 15 and PCK + 20, respectively. If more than two operands are used, all should be handled by the user's subroutine. 3. Calculates the return address to the mainline program. However, if a subroutine uses more than two operands, the return address must be calculated by the subroutine itself. To calculate the return address, use the following formula: (PCK +10) + 5n + 1 if n is even, or (PCK +10) + 5n + 2 if nis odd SPS II-D 77 + where PCK 10 (befDre entering the PICK subrDutine) is the address Df the high-Drder digit Df the first Dp erand, and n is the number Df Dperands. P and Q Operand If PICK calculates the return address (two Dperands ), eleven is added to' PCK 10. 2 3 4. Moves the B operand (mantissa and exponent) into working area beta. If the· A operand is also used by the subroutine for calculation, it (the A operand) must be moved by the subroutine itself. This requires one instruction: 4 5 + TFL ALPHA, PICK + 15, 11 5. Sets error indicator 00401 for overflow and underflow. Modifiers o 1 6 7 8 9 6. Stores the computed floating-point result in the location specified by the A operand. The functions of PICK are not mandatory, but are under control of the user. When a subroutine is called, the object program branches directly to the subroutine. If the functions of PICK are desired, the user may branch to PICK via the following linkage: TFM PCK 5, ... 20 B7 PCK, , 6 + + OPERANDS THAT ARE FUNCTIONS OF PICK AND/OR MANTISSA LENGTH Whenever PICK is used, the programmer must use instructions in his subroutine which make reference to the PICK subroutine. (All references to PICK must be written as relocatable quantities.) The operands of these instructions are then adjusted to make them correspond to the actual addresses of PICK in the object program. This is done by using a pseudo constant (DC statement). The constant does not become a part of the object program; its only function is to indicate that the instructions that follow are to be modified. One DC statement can modify up to 25 instructions. Each instruction, whether it is to be modified or not, requires two digits in the pseudo constant, one for the P operand and one for the Q operand. The statement itself consists of three operands: the first specifies the length of the constant which may not be greater than 50 nor less than 2; the second, the actual constant; the third, the storage address of the constant. This address must be specified as an absolute address of 00350. The P and Q operand modifier constants follow. 78 Modification No ModificatiDn AddL Subtract L Add 2L Subtract 2L Modify with respect to PICK, no L modification Modify with respect to PICK, addL Modify with respect to PICK, subtract L Modify with respect to PICK, add2L Modify with respect to PICK, subtract 2L The following example shows how a variablelength mantissa subroutine may be modified by the use of modifier constants. DC TF SF TFL B7 6, 527005, 350 SAVE, 98 SAVE PCK 15, SAVE, 6 PCK 10, , 6 + + NOTE: (1) Intervening DORG statements and constants between instructions are never modified in this manner. (2) SAVE is a relocatable quantity. Assembling a Subroutine When a subroutine is assembled, it must be "Assembled Relocatable;" stored in relocatable format, and must have the following items defined: 1. Disk Identification Map (DIM) entry 2. Subroutine identification number 3. Desired entry points SUBROUTINE DIM ENTRY A subroutine DIM entry is in the same general format as that described in the Supervisor section of this manual. However, the last two 5-digit fields specify the length of the subroutine and the subroutine identification number instead of a core address and a starting or entry address. Subroutine DIM entries occupy fixed locations in the DIM table. There are 30 entries reserved for subroutine sets 01, 02, and 03 (this includes an entry for PICK in each set). The 30 entries are needed for the 17 subroutines (plus PICK) provided by IBM plus 12 subroutines that may be added by the user. To calculate the DIM entry number for a new subroutine, add the new subroutine number (18-29) to the base DIM number for the applicable subroutine set. The base numbers for each set are as follows: Base Number 100 70 40 Subroutine Set Fixed Length - 01 Variable Length - 02 Automatic Floating Point - 03 For example, the DIM entry number for the first user-written subroutine to be added to the variable length set would be 70 18 == 88. A DIM entry number is assigned to a subroutine by including an "m NUMBER" control record when the subroutine· is assembled (see SPS CONTROL RECORDS). In the preceding statements, ORIGIN is any label not otherwise used in the subroutine; ENTRY 1 is the label of the first entry point; ENTRy2 is the label of the second entry point. The DORG is needed to ensure that the subroutine will begin at relocatable 00000. SUMMARY OF ASSEMBLY PROCEDURE By inserting a DSA for entry points and placing the subroutine identification number in the DEND statement of the source program, it is possible through the use of proper control records to assemble a subroutine and have it loaded to disk and ready to use all in one operation. Of course, the mnemonic of the added subroutine must be defined in the Op code table prior to assembly of a program that uses it. + SUBROUTINE LENGTH The length of a particular subroutine is automatically placed in its respective DIM entry when an LIBR control record (see SPS CONTROL RECORDS) precedes the subroutine source program. Example This example illustrates how a subroutine is added to the subroutine library of the Monitor System. In this example, the new subroutine is assembled along with a mainline program and both are then executed (Figure 10). The example assumes that the Supervisor program is already in core storage. GIVEN: SUBROUTINE· IDENTIFICATION NUMBER As stated previously, all subroutines are identified by a 5-digit code number. When a subroutine is being added, this number must be supplied by the user. The number is composed of two digits for "subroutine set number" (01, 02, 03), two digits for "subroutine number" (01-29), and one digit for "number of entry points" (1-9). The number will automatically be loaded to its proper position in the DIM table if it is used as the address operand of the DEND statement that terminates the subroutine source program. Example DEND 02182 This code number identifies subroutine number 18, a "2-entry point subroutine" that is to be placed in the variable-length subroutine set (02). SUBROUTINE ENTRY POINTS Each subroutine requires at least one entry point but may have as many as nine entry points. These must be specified at the beginning of the user's source program. Two records of data are needed: ORIGIN DSA ENTRY1, ENTRY2, etc. DORG ORIGIN-4 Macro - EXCH A, B Function- to exchange floatingpoint numbers between A and B Identity - Subroutine No. 18, Set No. 02 PROCEDURE: 1. Modify Op Code table by loading the following records; Monitor Control - XEQ specifying SPSLIB SPSLIB Control DEFINE OP CODE EXCH - 181 (Col. 12-19) ENDLIB NOTE: The above four records must be entered from the same input unit. 2. Precede the source subroutine (Figure 11) in the stacked input with the following control records: Monitor Control - JOB SPS ASSEMBLE RELOCATABLE SPS Control LIBR m NUMBER 0088 STORE ~LOADABLE LIST CARD ERROR STOP SPS II-D 79 Source Mainline Source Subroutine I I I I I I I SPS Control Records I I I I I I I I I ----------1 I I Monitor Control Records I I ____________ J I I I I I SPS LIB Co'ntro I Records I I I I Monitor C~ntrol Records I ......_--------------------------1- __________ ...! Figure 10, Stacked Input for "Adding SPS Subroutine Example" 80 Label Line 3 5 6 2,0 0,3 0 o o 4 0 5 0 20 E NTIlY D5A IS l) 0 !J,G *-4 * ZER.O [)S BE711 peK DS £ N.T RY 7~M. 7 0 137 P,C KS+5 PCK 8 0 TFL PCk+20 10 6,n o o 15 16 25 30 35 45 40 55 50 60 65 70 75 DSA 10 1 0 o Operands & Remarks pperation 11 12 1 0 0 2 iFL '!p,e K+ 1 1 0 87 1 2 0 D6N,lJ 02 Figure 11, ,,*+2.0 , G' ,,p,e 1<+ 1,5 , 6 ,,OS DC 10 9 0 US E D 70 DEFINE SUBROUTINE EN.TRY P.OIM" , DEFINES ~ELOeIJ71l8I.E ZE.RO , f .ZEIJO+19~ DEFINES REt 0 e 1/ r.1l8 t E S YM80,'DEFINeS IIBSOLUT£ s YM.80L .23'S •• I5 IPCKflO 18 I • , ,, ," • :3 50 ,8£TII , I I, , . t L / N/(IlG E 70 ,PICK. 1/ 1.0 8 PSEU[)O CO NS 111Ni. /tIo VE B 10 II .R,E r.tlflN f.(} M,IJIN £1 N.t. . and) , or return control to Supervisor (requires EXIT operand). The six types of macro-statements that use the I/O routine are written as follows: . Label --' f----1- -, •.1.. Mnemonic GET Meaning Read card, paper tape, typewriter, or disk. Punch card, paper tape, or write typewriter, or write disk records with or without readback check. Seek disk record. Read disk stored subprogram and execute ( requires LINK operand), or read disk stored subprogram or data without execution (requires LOAD oper- ~ati"" 1112 ------------Operands & Remarks IS" 20 GET D£F PUT 'P'U.T '5 30 ~- -~ -~- 35 <0 , DEF DfF ,7f:I/,C I SO '5 I , , I I , I I I I I I I , I , I SEt,H ])[F --' CA~T L/~K,DIN£NT,R£LOC CIIL L LI NK, NAME, REL DC ,, ,-,-L•. .1..-' SEEK I Source Program for "Adding SPS Subroutine Example" The I/O macro-statements are provided to relieve the programmer of the task of writing his own I/O subroutine in a source program each time he wants to read or punch cards or tape, read or write disk storage, or read or write typewriter. I/O macro-statements may be inserted anywhere in the user's program. When an I/O macro-statement is encountered in the source program during assembly, linkage instructions to the I/O routine (part of the Supervisor program) are generated in the object program. The macro-instruction mnemonic operation codes and their meanings follow: CALL · · · · I ID FOR SV8R 1/0 Macro-Statements PUT . M.OV£ . · eA LL L OAP, DI MENT, R[L DC CALL L DAD, NAME •. lfEL OC ! , , I , CA.Ll EXI T A label and remarks may be included with each of these statements. The address associated with the label will be that of the first instruction in the generated linkage. The operands RBC, LINK, LOAD, and EXIT are fixed symbols, i.e., they must be written exactly as given. The symbol DEF is the address of the associated I/O constant generated by an I/O declarative statement. DIMENT is the DIM entry number of a SPS II-D 81 With a relocation address program to be called from disk storage; RELOC is the relocation core storage address of a program to be called; and NAME is the name of a program (as it appears in the Equivalence table) to be called. DEF, DIMENT, and RELOC may be in actual or symbolic form. PUT statements may be specified with or without read-back check (RBC), as shown. Either a DIM entry number or the program name can be given with CALL LINK or CALL LOAD statements. Also, the relocation address is optional with these statements, i.e., the programmer does not have to include a relocation address. A CALL EXIT statement should be included in the user's source program. This statement, when executed at the end of the object program, causes control to be returned to the Supervisor program. All linkages for I/O routines are generated automatically through the use of macro-instructions. The data and addresses supplied in the macro-instruction are incorporated into the linkage instructions where they are made available for use by the I/O routine. The linkage instructions generated in an object program for macro-instructions by the processor are equivalent to the following- series of symbolic instructions. IORT, lOCAL TFM B 7 specified. Non-numeric IX specified. ER6 A DSA statement has more than ten operands. ER7 A DSB statement has the second operand missing. ER8 1. 2. 3. 4. A DC, DSC, or DAC has a specified length greater than 50. A DVLC has a length greater than 50. A DMES has a length greater than 100. A DNB has a length greater than 99. ER9 A DC, DSC, DAC, DVLC, or DMES statement has no constant specified. ER10 1. 2. A DC or DSC statement has a specified length which is less than the number of digits in the constant itself. A DAC statement has a specified length which is less than or greater than the number of digits in the constant itself. Table 7. Disposition of SPS Errors When no Error Stop Statement is used ERROR CODE ER 1 DISPOSITION No disposition. ER2 The label is ignored. ER3 A NOP is assembled. ER4 The second definition of the label is ignored; the first definition of the label is used in the assembly. ER5 1-5. The operand is assembled as an absolute 00000. 6. 0 perand is assembled but no IX flags are set. 7. Operand is assembled. Numerical portion of units character is used to define IX flags. ER6 The first ten operands are assembled; any remaining operands are ignored. ER7 The number of elements is set to I. ER8 1. 2. 3. 4. ER9 A field of zeros is generated, 'equal to the size of the length operand for the DC, DSC, DAC, or DVLC constant. In the case of a DMES, an end of message (* *) is assembled and the address counter is increased by 100. ER 10 For a DC or DSC, the length of the, constant is used as the length operand; for a DAC, the s~dcified length is used, and the programmer-assigned a ress, if present, is ignored. ER I I The HEAD character is set to blank. ER 12 The first character of the operand is used as the HEAD character. ER 13 The starting mode is assembled as the alphabetic mode. Length Leng·th Length Length is is is is set set set set to to to to 50. 50. 100. 99. ER 11 An invalid character is used as a HEAD character in a HEAD statement. ER 14 An end of messoge (*:f) is inserted into the constant. ER12 A HEAD operand contains more than one character. ER 15 An end of message (=t::=t:) is inserted into the constant. ER13 A DMES statement contains an invalid starting mode character. ER 16 A 0 is placed in the next available location following the mode change. 1. A DMES statement contains a control character which is incorrectly specified. A DMES statement has an invalid format, i. e., stray parenthesis, etc. ER17 ER 18 A DIM number of 0000 is assembled. ER15 A DMES statement contains an alpha character in a numerical field. ER 19 ER16 A DMES statement contains an invalid mode change. Processing continues bu t no more labels are stored. After completion of the intermediate phase, processing stops, the following message is typed, and control returns to the Superv isor Program. ER14 2. ER17 1. 2. A relocatable assembly contains either a relocation error (see Rules of Relocatability) or, A DORG with an absolute operand. ER18 A symbolic name used in a CALL LINK or CALL LOAD statement is not in the Equivalence table. ERI9 The storage area allotted for the symbol table has been exceeded. ER20 Intermediate output has exceeded disk storage work area (program requires two passes). ER21 Object output has exceeded disk storage work area. ER22 Improper "select" operand ~n a CALL statement; i.e., neither LINK, LOAD, nor IT is specified. 88 1. 2. The operand is assembled as an absolute 00000. The DORG is ignored. DISK AREA TOO SMALL. ASSEMBLY DELETED ER20 Processing continues, but no more intermediate data is sent to disk storage. After completion of the intermediate phase, processing stops, the following message is typed, and con trol returns to the Supervisor Program. DISK AREA TOO SMALL. ASSEMBLY DELETED ER21 Processing stops immediately and control is returned to the Supervisor Program. ER22 The statement is ignored. NOTE: Assembly and outputting continue in all caSes except ERI9, 20, and 21. Card. A card list deck usually consists of one card for each source statement. The fonnat is as follows: Columns 1-5 6 7-12 13 14-17 18 19-78 61-65 66 Page and line number. Blank Label as on source card. Blank. Op mnemonic as on source card. Blank. Operand fields as on source card. If the fields extend beyond column 59, the object i n for mat ion ( normally found in columns 61-80 of first card) is placed on a subsequent card or cards. Actual address of assembled instruction or constant. Blank. NOTE: The data in columns 67-80 is peculiar to the type of statement assembled. Imperative Statements. Columns 67-68 Op code in machine language. Blank. 69 70-74 P operand in machine language. Blank. 75 76-80 Q operand in machine language. Non-imperative Statements. Columns 67-71 72 73-80 Length of assembled data. Blank. If these columns are punched , they will contain actual assembled data. POST ASSEMBLY ERROR MESSAGES The follOWing error messages are applicable after assembly. EXCEEDED SPECIFIED CAPACITY BY XXXXX The above message indicates that the object program together with applicable subroutines would exceed the available core storage if the program were to be executed. The available core storage is determind by the user's Object Core control card. This error does not invalidate the assembly, however, since a different set of subroutines may be specified at execution time. A different subroutine set might occupy less core storage; therefore, the error may no longer apply. NO DIM ENTRY FOR SUBROUTINE The above message is typed out when the DIM entry which corresponds to a called subroutine cannot be found in the map. This would indicate that the entry was either deliberately deleted from the map or otherwise destroyed. The assembly will continue, however. and the object program will be stored. But if execution was planned immediately after assembly ( SPS card), assembly would be deferred and control would return to the Supervisor program. MORE THAN SCYLINDERS OF RELOADABLE OUTPUT SSW4 ON TO DUMP OUTPUT OFF TO CONTINUE, NO OUTPUT The above message is typed when the reloadable object output would occupy more than 999 sectors on disk storage (approximately 5 cylinders). This situation is an error because programs greater than 999 sectors cannot be specified in the Disk Identification Map. After the message is typed out, the computer halts. At this time the user can either tum Program Switch 4 on and depress START to have the program outputted on a pre-chosen output unit, or tum Program Switch 4 off and depress START to continue, in which case the program is not outputted. In either case the program is not stored on disk storage. Execution of SPS II-D Object Programs When SPS II-D object programs are to be executed, they are read into core storage from disk storage, paper tape, or cards by the use of Monitor Control records. The subroutines which are called for in the program are loaded from disk storage at execution time. Neither subroutines nor subprograms are ever a part of the mainline object program. They are stored on disk in relocatable form and brought into core storage if needed. The selection of proper subroutines at execution time is made by referring to an "indicator record" which is stored with the mainline object program. This record, generated at assembly time, contains a I-digit location for each of the subroutines in a set. At assembly time, as the individual subroutine SPS II-D 89 macro-instructions are encountered in the source program, a 1 is placed in the I-digit location that corresponds to the subroutine being called. The record is then a "map" of the subroutines needed for the particular mainline object program. Examples of both relocatable and absolute quantities follow: relocatable ~ B absolute Execution Time Error Messages The following error messages are applicable at execution time. Their occurrence terminates loading and returns control to the Supervisor program. CORE CAPACITY EXCEEDED BY XXXXX LOCATIONS PROGRAM IS TERMINATED The above message is typed out when the total core storage required for the object program and all applicable subroutines exceeds the available core storage. Note that there is a similar message at assembly time if available core storage is exceeded. However, it is possible to get the message at execution time without having gotten it at assembly time. This could happen if a diHerent subroutine set is specified at execution time (in XEQS card) than that which was assembled with the source program. 0+24 ~ AM X, 12345 The processor recognizes relocatable and absolute quantities by applying the following rules: 1. An integer (e.g., 1, 12345, etc.) is an absolute value. 2. A processor-assigned address, which is associated with a label (i.e., the address of an instruction or constant with an associated label), is a reloeatable quantity. An asterisk address (0) is also relocatable. 3. A symbol defined as equal to some quantity has the same relocation property as the associated quantity. An example follows: SYMBOL DS ,QUAN 4. The product of two absolute quantities is an absolute quantity. SUBR NOT LOCATED IN SUBROUTINE MAP 5. The sum or diHerence of two absolute quantities The above message occurs if a subroutine that is specified in the "indicator record" of the object program cannot be found in the subroutine section of the Disk Identification Map. 6. The sum or diHerence of a relocatable quantity and an absolute quantity is a re.locatable quantity. IMPROPER IND CODE IN SUBR XXXX The above message occurs when an invalid "reloadable indicator code" (see SYSTEM OUTPUT FORMAT in Supervisor section) is found in the object output of a subroutine. In this message, xxxx are the first four digits of the subroutine identification number; two digits are for the set number, and two digits are for the subroutine number. is an absolute quantity. 7. The diHerence between two relocatable quantities is an absolute quantity. The processor will recognize any of the following situations as "relocation errors." 1. The sum of two relocatable quantities. 2. The product of a relocatable quantity and any other quantity. 3. An operand below the relocatable address of 00000. For example, RELOC -10000, where RELOC is a relocatable quantity of less than 10000. NOTE: The exact negative of a valid relocatable quantity is a valid relocatable quantity. Rules 01 Program Re/ocalabilily When a program is relocated~ as specified by an ASSEMBLE RELOCATABLE statement, certain addresses within the program are adjusted relative to the relocation (starting) address. Only relocatable quantities are adjusted. Absolute quantities are not adjusted. 90 Although the quantity defined by an operand may be either positive or negative, a symbol may be equivalent to a positive quantity only. If a symbol is defined equal to a negative quantity, any reference to that symbol by the assembler will produce the absolute value of the quantity. Converting SPS Object Programs to Core Image Two methods of storing object programs in core image have been described in this manual. One is by using the disk utility routines DLOAD and DREPL (see DISK UTILITY PROGRAM) , and the other is by using a STORE CORE IMAGE control card when the program is assembled. Both of these methods have the following limitations: • Subroutines cannot be converted and stored with the main program. • The core storage limits of the program image do not extend beyond the last processor-assigned statement. Thus, an address assigned by the programmer, e.g., DC 1, @, 19999, would not be included unless it fell within the addresses assigned by the processor. • No TRA-TCD sequences are allowed. • A program which requires subroutines and is assembled with an 0 ASSEMBLE RELOCATABLE control record cannot be converted to core image using the methods mentioned above. A procedure which will overcome all these limitations is outlined below. l. End the source program with a sequence of instructions which will dump the program into the work cylinders when it is called for execution. When the program is called the first time, only the special instructions will be executed. An assembly of this type is shown in the following example: =F =F JOB =F =* SPS °NAME TEMP °STORE RELOADABLE °Other control records -listings, symbol table, etc. START XX etc. STORE PUT CALL X DD XDDA DDA DC DEND X, RBC EXIT , XDDA , 1,00000, SSS, CCCCC 1, @ STORE In the special sequence of instructions, sss is a sector count sufficient to store the entire core image program with applicable subroutines. The transfer into the work cylinders will start from core address ccccc. If subroutines are used, CCCCC should be 02276 so as to include the subroutine transfer vector area. 2. Assemble the program. 3. Call the program as if it were to be executed. This will cause the special sequence of instructions to be executed, thereby dumping the program and subroutines into the work cylinders in core image format. 4. Using the disk utility routine, DLOAD or DREPL, load the program from the work cylinders into permanent disk storage. If DLOAD is used, give the program a different name and delete the old name, so as not to duplicate names in the DIM table. The parameters for the DLOAD or DREPL operation can be obtained either from the listing or from the messages typed out after the assembly; e.g., xxxxx CORE POSITIONS REQUIRED gives the highest processor-assigned address, including subroutines. An example of how to implement steps 3 and 4 is shown below. =l= =l= JOB =l= =F XEQS NAME =l= =F JOB =l= =F DUP °DLOAD or °DREPL =l= =F DUP lnot needed if DREPL is used ODELET NAMEJ end of regular source program To call and execute a core image program which has been converted by this method, use an XEQ control record. 90.1 SPS II-D Modification Program This program allows the user to modify the SPS II-D assembler by: (1) Adding or deleting operation codes from the System Op code table, and (2) Adding or deleting symbols from the System Symbol table. The SPS II-D Modification program is loaded into disk storage as part of the Monitor II system. It is identified in the Equivalence table by the name "SPSLIB." An XEQ Monitor Control record with the assigned name SPSLIB punched in columns 7-12 is used to call the modification program for execution. To specify the type of modification desired, the user places modification control records following the ;XEQ record. These records and any other input data to the Modification program must be entered from the same input device that was used to enter the XEQ record. Modification program control records, in terms of cards, use the same format as that used for sps control records. The five modification control statements must be written exactly as given (DEFINE OP CODE, DELETE OP CODE, DEFINE SYSTEM SYMBOL TABLE, LIST OP CODE. Only one statement may be included in a ('ontrol record. These statements are typed when they are read. A description of the five control statements follows. DEFINE OP CODE. This statement causes userassigned Op (operation) codes, specified in Op code definitions cards, to be added to the SPS II-D System Op code table. The Op code definition card ( s) must follow the control record in the stacked input. The format of the Op code definition card follows: ENDLIB. DELETE OP CODE. This statement causes Op codes, specified in Op definition cards, to be deleted from the SPS II-D System Op code table. The Op code definition card ( s ), which must follow the control record in the stacked input, specifies in columns 12-15 the code to be deleted; columns 16-75 may be blank. Only one Op code may be specified per card. If an attempt is made to delete an Op code that is not in the Op code table, the message NOT IN TABLE will be typed and no change will be made to the table. DEFINE SYSTEM SYMBOL TABLE. This statement is used to modify the System Symbol table. The System Symbol table consists of certain symbols that were defined when the Monitor System was assembled plus any symbols the user adds by means of the DEFINE SYSTEM SYMBOL TABLE statement. Any symbol that is in the System Symbol table may be used in any assembly without defining the symbol within the program being assembled. vVhen used, the Define System Symbol Table statement first causes all user-defined symbols to be deleted from the table. Then all symbols which follow the Define System Symbol Table statement are added to the System Symbol table. Symbols to be added are defined in the Symbol Definition record. The format of this record in terms of cards is as follows: Columns 6-11 Columns 12-15 New mnemonic Op code (left justified) . 16-75 A 3-digit code which determines the instruction generated by the Op code. (The code may be preceded by a minlas sign.) The allowable 3-digit codes that may be entered in columns 16-75 are shown in Table 8. The digits X and Y may be any number 0-9. A separate Op code definition card should be entered for each Op code that is to be defined. If an attempt is made to define an Op code that is already present in the Op code table, the message ALREADY DEFINED win be typed and the new Op code win be ignored. If space is unavailable in the Op code table for a new Op code, the message NO ROOM IN TABLE will be typed and the new Op code will be ignored. 16-75 Symbol to be defined (left justified ). An operand, symbolic or actual, but not asterisk. (If a symbolic operand is used, it must have been previously defined in the System Symbol table.) If a symbolic operand, contained in the operand field. (columns 16-75) of a Symbol Definition card, cannot be matched with a previously defined symbol in the System Symbol table: the message UNDEFINED SYMBOL XXXXX is typed out, where xxxxx is the undefined symbolic operand; no change is made to the System Symbol table. Up to 150 user-defined symbols may be added to the System Symbol table. Any attempt to insert more symbols causes an error message to be typed and control to be returned to the Supervisor program, thus terminating the add-to-symbol-table function. Symbols that have less than six characters will be defined with. a blank "heading character" in the System SPS II-D 91 Symbol table. Symbols defined as positive quantities will be treated as positive-absolute quantities in both absolute and relocatable assemblies. Negative quantities will be treated as negative-absolute quantities in an absolute assembly and positive-relocatable quantities in a relocatable assembly. 9CCYLO 9CCYLI 9CCYL2 9CCYL3 Table 8. LIST OP CODE. This statement causes the processor to type a listing of the Op code table. All Op codes are listed in tabular form with their associated 3-digit codes. 02132 02134 02136 02138 These are the low-order positions of four 2-digit fields, similar to the previous four. However, these positions contain the cylinder numbers of the current access arm positions (the position of the arm after the last disk IORT operation). Codes and Assembled Data for SPS Modification Program CODE ASSEMBLED DATA PPPPP QQQQQ USE XYO XY -XY1 Macro-instruction subroutine linkage to subroutine XY -XY2* ax ppppp YQQQQ SIOC instructions -XY4 4X PPPPP QOOQY Mask and Unmask instructions -XY6 3X PPPPP Q34QQ Binary I/O IBM Defined System Symbols XY2 3X PPPPP Q07QY Disk instructions The following symbols will be available to the user in the System Symbol table. XY3 3X ppppp QOYQQ I/O instructions XY4 34 PPPPP Control instructions XY6 46 ppppp QXYQQ Branch Indicator instructions XY7 47 ppppp QXYQQ Branch No Indicator instructions XY9 6X PPPPP QQQQY Branch Select Instruction ENDLIB. This statement causes control to be returned to the Supervisor program. In the stacked input, it must follow other control statements which utilize the modification program. Symbol Equivalence Description 9RCYLO 9RCYLI 9RCYL2 9RCYL3 00513 00515 00517 00519 These are the low-order positions of four 2-digit fields which contain the numbers of cylinders (00-99), where the disk access arm is repositioned after a disk operation in which a reposition has been requested. The four fields refer to drives 0, 1, 2, and 3, respectively. 92 QOXQY Any instruction Subroutine Macros *If the first character of the Op code contained in columns 12-15 is the letter "R, " position 0 1 of the assembled instruction wi" be flagged. FORTRAN II-D The the programming system consists of language and the processor. The FORTRAN II-D language is comprised of a number of types of statements that the programmer may use in defining the problem to be solved. The FORTRAN II-D processor is a program that accepts the source program statements I1S input and produces, as output, a machine language program, known as the object program. The FORTRAN II-D processor can operate only under control of the Monitor System and the object programs it produces can be reloaded only by the Monitor Input/Output routine. It is possible for the user to remove the FORTRAN portion of Monitor II and still utilize the remainder of the system. It is also possible to remove some of the FORTRAN library subroutines that are supplied and still utilize the remainder of the FORTRAN system (see DISK STORAGE LOCATION FORTRAN II-D FORTRAN II-D OF THE FORTRAN COMPILER). FORTRAN II-D Language The FORTRAN I1-D source program consists of a number of statements. Each statement deals with one aspect of the problem; that is, it may cause data to be fed into the computer, calculations to be performed, decisions to be made, results to be printed, etc. Some statements do not cause specific computer action, but rather provide information to the processor program. FORTRAN II-D statements are arranged in five groups: Arithmetic statements which specify the mathematical calculations to be performed. Control statements which govern the sequence in which the statements will be followed. Subprogram statements that enable the programmer to define and use subprograms. Input/Output statements that read data into the program or print or punch the results of the program. Specification statements that provide information about the data that the object program is to process. The above statement types are explained in detail later in this manual. FORTRAN II-D statements are written on a standard FORTRAN Coding Form which is designed to organize the statements into the special format required by the processor program. All statements and comments of the source program are written on this form. The function of each portion of the coding form shown in Figure 12 is explained below. Space is provided at the top of each page for the name of the program, date, etc. This information does not constitute part of the source program and is not punched into cards. The series of numbers (1, 5, 6, 7, 10, ... , 72) across the top of the form indicates the card column that the information is punched into. Comments to explain the program are written in columns 2-72 of a line with a C in column 1. The letter C must be followed by two spaces for paper tape or typewriter input. A comment line is not processed by the FORTRAN II-D program but is listed when the source program cards are listed. Columns 2 through 5 are used for the statement number. Any number from 1 through 9999 may be used as a statement number. Statement numbers are used for cross reference within a program (see explanations of DO and GO TO statements) or may be used merely as a means of identifying statements. Statements should be numbered only when they are referenced by another statement and no two statements can have the same number. Also, there is no requirement that every statement must have a number, nor that statements must be numbered in sequence. Column 6 of the initial line of a statement must be blank or zero. If a statement is too long to be written on one line it can be continued on as many as four "continuation lines." Continuation lines are written by placing in column 6 any character or any number from 1 through 9 (zero allowed only for initial line). The normal method is to number the initial line zero, the second line one (first continuation line), the third line two, etc. A statement other than a comment statement may not consist of more than 330 characters (i.e., 5 lines) . NOTE: Continuation lines are not allowed when input is from the typewriter or paper tape, i.e., statements up to 330 characters in length are entered in one group. The body of the statements themselves are written in columns 7 through 72. Blank columns for the most part are ignored by the processor and may be used freely to improve the readability of the source program listing. Columns 73 through 80 are not processed and therefore may contain any identifying information. The information on each written line in the statement section of a coding form is punched into a card. FORTRAN II-D 93 range from minute fractions to large numbers may be handled by the computer. Floating-point numbers are expressed as decimal fractions times a power of ten. For example: A standard FORTRAN card is shown in Figure 13. After the cards are punched, they should be verified to lessen the chances of clerical errors causing source .and object program errors. 3.14159 is expressed as .314159 x 101 4800.0 is expressed as .48 x 104 0.0187 is expressed as .187 x 10- 1 Arithmetic Mode Quantities used in the FORTRAN statements may be expressed in either fixed-point or floating-point form. Numbers expressed as integers (whole numbers) are considered fixed-point. Thus, the integers 3, 57, and 1008 are fixed-point numbers. Flo~ting-point arithmetic is a technique used to eliminate the complex programming required for correct placement of the decimal point in arithmetic operations. Floating-point numbers are represented in a standard format which specifies the location of the decimal point. With this method, quantities which IB" For", X28·7327·3 , Printed in U. S. A. Date _ _ _ _ __ Page _ _ of _ __ Identification 80 73 ~ C FOR COMMENT I ARITHMETIC STATEMENTS. FORTRAN CODING FORM Program Coded By Checked By STATEMENT NUMBER The numerical part of the floating-point number is called the mantissa and the power of ten is called the exponent. For a floating-point number, the decimal is always moved to the left of the high-order nonzero digit. This is called normalizing the number. In FORTRAN II-D, fixed-point or floating-point numbers can be used, subject to the rules described under 'i FORTRAN STATEMENT ~ 6 7 15 10 I 20 I 25 I 30 35 50 ~5 <40 55 I 70 65 60 72 .l I I I , , I I I I I I I I I .l i '- I I I I I I I I I I I I I I I I t I I I I I I t I I I I 94 .l i I I I I I I I I I I t ~ I I I I 1 L I 1 ~. '- I I I I I I I I I I I I I .1 '- I I I I I I I I I I I I I I I I I I I I t I I ~ I I t I I I I I I I I I I I I I I I I I I I I I I I FORTRAN Coding Form I I I I I I t I I I I L I I I Figure 12. t . I I I / / C+CO:~:NT FORTRAN STATEMENT NUMBER 010000 STATEMENT IOENTlnCATION 000000000000000000000000000000000000000000000000000000000000000000 00000000 ,\ 2 3 4 5 7 • • 10 \1 12 13 14 15 16 17 18 1920 21 22 23 24 l il l l l 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11111111 ~ ~ Z7 2U9 30 31 32 33 34 l~ J6 37 38 39 40 41 424344 45 46 47 48 49 !>O 51 5253 54 5~ 54i 57 58 59 SO 61 6213 64 6!) 66 67 68 6S 70 71 J2 7314~18J7187UO I 2\2 2 2 2 2222222222222222222222222222222222222222222222222222222222222222222 22222222 313333 33333333333333333333333333333333333333333333333333333 33333333333333 33333333 4:4444 4444444444444444444444444444444444444444444444444444444444444444444 44444444 5\5 5 5 5 5555555555555555555555555555555555555555555555555555555555555555555 55555555 6\6 & 66 6666666666666666666666666666666666666666666666666666666666666666666 66666666 1 717 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 71 7 7 71 7 7 7 7 71 7 77 77 7 77 77 71 77 7 7 7 7 17 7 1 7 71 77 7 77 77 77 7 7 7 77 7 7 7 7 7777777"7 1 8 8 8 8 8 8"8 8 8 8 8 8 8 8 8 g 8 B8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 B8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 B8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 I ~ 919 9 9 9 919 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 112 3 4 5 I 11 • I 10 11 12 1J 14 15 II 11 11 19 20 " 22 23 24 25 16 21 28 ~ 30 31 32 33 34 35 J6 31 31 31 40 41 42 43 44 40 • 41 48 • 50 51 52 53 54 ~ 51 57 51 58 10 II 12 13 64 6!) 66 81 68 6t 70 71 12 73 74 15 JS 7J Ja 1. 10 lU18B81~7 Figure 13. FORTRAN Source Program Card Constants, Variables, Subscripts, and Expressions Mathematical problems usually contain some data that does not change throughout the entire problem, and other data that may change many times during calculation. These two kinds of data are referred to as constants and variables, respectively. Both constants and variables can be used in FORTRAN II-D, but they must be written so the processor can distinguish one from the other. Constants FLOATING-POINT CONSTANT A floating-point constant may be in either of two forms: 1. Any number consisting of 1 to 28 decimal digits with a decimal point at the beginning, at the end, or between two digits (see ARITHMETIC PRECISION). A preceding plus sign is optional for positive numbers. Zeros to the left of the decimal point are permissible. EXAMPLES A constant is any number which is used in computation without change from one execution of the program to the next. A constant appears in numerical form in the source statement. For example, in the statement J==3+K 3 is a constant, since it appears in actual numerical form. Two types of constants may be written in FORTRAN II-D: fixed-point (restricted to integers), and floating-point (characterized by being written with a decimal point). FIXED-POINT CONSTANT 17. 5.0 -.0003 0.0 2. An integral decimal exponent preceded by an E may follow a floating-point constant. The magnitude thus expressed must be between the limits of 10-100 and 1099 or must be zero (see ARITHMETIC PRECISION). EXAMPLES 5.0E3 5.0E 3.14E A fixed-point constant is an integer consisting of 1 to 10 numerical characters (see ARITHMETIC PRECISION). A preceding plus sign is optional for positive numbers. An unsigned constant is assumed to be positive. + == (5.0 X 103 ) 3 == (5.0 X 103 ) == (3.14 x 100 ) Variables EXAMPLES 3 +1 -28987 A FORTRAN variable is a symbolic name which will assume a value during execution of a program. This value may change either for different executions of the program or at different times within the program. FORTRAN II-D 95 For example, in the statement A == 3.0 +B both A and B are variables. The value of B will be assigned by a preceding statement and may change from time to time, and A will change whenever this computation is performed with a new value of B. As with constants, a variable may be in fixed-point or floating-point form. FIXED-POINT VARIABLES A fixed-point variable is named by using 1 to 6 alphabetic or numerical characters (not special characters) of which the first must be I, J, K, L, M, or N. user has the ability to define the precision to which fixed-point and floating-point values should be carried. Floating-point precision, denoted in this publication as f, may be varied from 2 to 28 places; fixedpoint precision, denoted by k, may be varied from 4 to 10 places. The precision of the values may be changed by the use of a control record which must precede the source program (see FORTRAN II-D CONTROL RECORDS, FANDK) or the values may be changed by use of the Disk Utility Program DEFINE control record. If not redefined (by either of these methods), the value of f is 8 and k is 4. Values for f and k must be the same for subprograms and link programs called by the main program. EXAMPLES I M2 JOBN01 A fixed-point variable can assume any integral value provided the magnitude is less than the maximum size as defined through the use of a control record as stated under ARITHMETIC PRECISION. (If not defined, the maximum size will be 4 decimal positions for fixed-point n'umbers.) FLOATING-POINT VARIABLES A floating-point variable is named by using 1 to 6 alphabetic or numerical characters (not special characters), of which the first is alphabetic but not I, J, K, L, M, orN. EXAMPLES Subscripts An array is a group of quantities. It is often advantageous to be able to refer to this group by one name and to refer to each individual quantity in this group in terms of its place within the group. For example, assume the following is an array named NEXT: 15 12 18 42 19 If it were desired to refer .to the second quantity in the group, the ordinary mathematical notation would he NEXT!.!. In FORTRAN this becomes NEXT (2) The quantity in parentheses is called a subscript. Thus A NEXT (2) has the value of 12 NEXT (4) has the value of 42 B7 DELTA A floating-point variable may assume any value expressible as a normalized floating-point number, i.e., zero or any number between 10-100 and 1099 • The number of mantissa characters may be from 2 to 28 (see ARITHMETIC PRECISION). If not defined, the maximum size will be 8 characters for the mantissa. The ordinary mathematical notation might be NEXT1, to represent any element of the array NEXT. In FORTRAN, this is written NEXT (I) where I equals 1, 2, 3, 4, or 5. A program may also use two or three-dimensional arrays. For example, the following is a two-dimensional array named MRATE. Arithmetic Precision The precision of the quantities used in the calculation is an important, consideration in most types of scientific computation. For example, the computation of 7.19 x 3.14 would not be as precise as 7.19286 x 3.14159. In the FORTRAN II-D system, the variable-field length capacity of the 1620 is used to allow varying the degree of precision from one program to another. The 96 Row Row Row Row 1 2 3 4 Column 1 14 48 29 1 Column 2 12 88 25 3 Column 3 8 4 17 43 To refer to the quantity in Column 2, Row 4, the FORTRAN statement would be written as MRATE (2,4). The value of MRATE (2,4) is 3. The value of MRATE (3,3) is 17. Thus, subscripts are positive fixed-point quantities whose values determine the member of the array to which reference is made. GENERAL FORM Let v represent any fixed-point variable and c (or c') any fixed-point constant. Then, a subscript is an expression in one of the following forms. v, c, v+c, v-c, cOv, cOv+c' or cOv-c' (The symbol ° denotes multiplication.) EXAMPLES I 3 MU+2 5°J 5 ° J-2 The variable in a subscript must not itself be subscripted. Subscripted Variables A fixed or floating-point variable may be subscripted by enclosing up to three fixed-point subscripts in parentheses to the right of the variable. operation symbols, commas, and parentheses, which comply with the rules for constructing expressions. Expressions appear on the right-hand side of arithmetic statements. In arithmetic-type operations, the following operation symbols are used: + addition subtraction multiplication division / exponentiation (i.e., raising to a power) RULES FOR CONSTRUCTING EXPRESSIONS Since constants, variables, and subscripted variables may be fixed-point or floating-point quantities, expressions may contain either fixed-point or floatingpoint quantities; however, the two types may appear in the same expression only in certain ways. (In the following description, no mention is made of the rules for using fixed-point and floating-point quantities in functions. These rules will be stated when functions are discussed and will be considered as addenda to the following rules. ) l. The simplest expression consists of a single constant, variable, or subscripted variable. If the quantity is an integer quantity, the expression is said to be in the fixed-point mode. If the quantity is a floating-point quantity, the expression is said to be in the floating-point mode. EXAMPLES A(I) K(3) BETA (5°J-2, K+2, L) The commas separating the subscripts are required punctuation. Note that subscript arithmetic may take place as shown in the third example above. For instance, if J is equal to 20, the first subscript will be 98. (The symbol ° denotes multiplication.) The value of a subscript (including the added or subtracted constant, if any) must be greater than zero and not greater than the corresponding array dimension. Each subscripted variable must have the size of its array (i.e., the maximum values which its subscripts can attain) specified in a DIMENSION statement preceding the first appearance of the variable in the source program. Expressions An expression in FORTRAN language is any sequence of constants, variables (subscripted or not subscripted), and functions (explained later), separated by EXAMPLES Expression 3 3.0 I A I(J) A(J) Type of Quantity Mode of Expression Fixed-Point constant Floating-Point constant Fixed-Point variable Floating-Point variable Fixed-Point subscripted variable Floating-Point subscripted variable Fixed Point Floating Point Fixed Point Floating Point Fixed Point Floating Point In the last example, note that the subscript, which must be a fixed-point quantity, does not affect the mode of the expression. The mode of the expression is determined solely by the mode of the quantity itself. FORTRAN II- D 97 2. Exponentiation of a quantity does not affect the mode of the quantity; however, a fixed-point quantity may not be given a Boating~point exponent. The following are valid: will be taken to mean A+ BOC D + EF _ G Using parentheses, the expression could be written IOOJ A 00 I A oOB The following is 100 A Fixed Point Floating Point Floating Point not valid: (Violates the rule that a fixed-point quantity must not have a Boating-point exponent) The expression A oOBooC is not permitted. It must be written AOO(BOOC) or (AOOB)OOC, whichever is intended. NOTE: 3. Quantities may be preceded by a + or a - or connected by any of the operators (+, _, 0, / , 00) to form expressions, provided: a. No two operators appear consecutively. b. Quantities so connected are all of the same mode. (Exception: Boating-point quantities may have fixed-point exponents.) The following are valid: which would be taken to mean (A+B)OC +EF-G D A valid expression will be evaluated when the object program is executed. An invalid expression may result in an error message from the FORTRAN II-D processor or may result in inaccurate object program results. Arithmetic Statements GENERAL FORM where A is a variable (subscripted or not subscripted) and B represents an expression. EXAMPLES Q == K+1 The following are not valid expressions: (must be written as A+( -B) (variables are of different modes) (must be written as 3 0 J if multiplication is intended) A+-B A+I 3J 4. The use of parentheses in forming expressions does not affect the mode of the expression. Thus, A, (A), and (( (A) )) are all Boating-point expressions. 5. Parentheses may be used to specify the order of . operations in an expression. Where parentheses are omitted, the order is taken to be from left to right as follows: Order 1 2 3 Operation Symbol 00 o and / + and- Exponentiation Multiplication and Division Addition and Subtraction For example, the expression 98 A(I) == 2(1) + SINF (C(I)) The numerical calculations to be performed in the object program are defined by arithmetic statements. FORTRAN arithmetic statements closely resemble conventional arithmetic formulas. They contain a variable to be computed, followed by an equal (==) sign, followed by an arithmetic expression. In FORTRAN language, the equals sign means "is to be replaced by" rather than "is equivalent to." For example, the arithmetic statement Y == N - LIMIT (J-2) means that the value in the storage area assigned to Y is to be replaced by the value of N-LIMIT (J-2). The equal sign description can be emphasized more with the example of 1 == 1+1 which means that the variable I is to be replaced with its old value plus one. .The result of the expression is stored in fixed-point form if the variable on the left of the equals sign is a fixed-point variable, or in floating-point form if it is a floating-point variable. If the variable on the left is in fixed-point form and the expression on the right is in floating-point form, the result is first computed in floating-point, then truncated (the fractional value is dropped) and converted to a fixed-point number. Thus, if the result of an expression is 3.872, the fixed-point number stored is 3, not 4. Likewise, the statement GENERAL FORM COTOn where n is a statement number. EXAMPLES CO TO 1009 COT03 A coding sample is shown below: J == AlB ~ C fOR COMMENT where the value of A is 7, and the value of B is 4, produces a result of 1. If the variable on the left is in floating-point form and the expression on the right is in fixed-point form, the expression will be computed in fixed-point and then converted to floating-point before it is stored as the new value of the variable. Example A=I 3 0 j NUMMR ~ fORTRAN STATEMENT 6 , Ie I~ 10 15 30 J> <) ., ,q:~ 8=.7 GO TO 6 I.B C=3.,*A 6 C=3·,*8 Meaning A==B I==B A S' ... !t,yIP\lT';: I B Store the value of B in A. Truncate B to an integer, convert to fixed point, and store in I. Convert I to floating-point, and store inA. Replace A with 3 times B. Not permitted. The expression is mixed, i.e., contains both fixed-point and floating-point variables. Not permitted. The expression is mixed. The GO TO statement transfers the program to statement 6 where the result 21 is obtained. Computed GO TO This statement also indicates the statement that is to be executed next. However, the statement number that the program is transferred to can be altered during the program. Control Statements The second class of FORTRANlI-D statements is comprised of control statements that enable the programmer to state the flow of the program. Normally, statements may be thought of as being executed sequentially. That is, after one statement has been executed, the statement immediately following is executed. However, it is often undesirable to proceed in this manner. The following descriptions discuss statements which may be used to alter the sequence of a program. GO TO Statement (Unconditional) This statement interrupts the sequential execution of statements, and specifies the number of the next statement to be performed. GENERAL FORM where nb n:! .. , nm are statement numbers and i is a non-subscripted fixed-point variable. The parentheses enclosing the statement numbers, the commas separating the statement numbers, and the comma following the right parenthesis are all required punctuation. This command causes transfer of control to the 1st, 2nd, 3rd, etc.; statement in the ·list depending on whether the value of i is 1, 2, 3, etc. The variable i must never have a value greater than the number of items in the list. FORTRAN II-V 99 GENERAL FORM EXAMPLES Meaning If L is 1, transfer to statement 3. If L is 2, transfer to statement 4. If L is 3, transfer to statement 5. If J is 1 or 2, transfer to statement 4. If J is 3, transfer to statement 5. If J is 4, transfer to statement 2. GO TO (3,4,5), L GO TO (4, 4, 5, 2), J where a is an expression and nt, n2, na are statement numbers. The expression must be enclosed in parentheses and the statement numbers must be separated by commas. The expression may be in eitheI fixed or floating mode. Control is transferred to statement number nb n2, na depending on whether the value of a is less than, equal to, OJ' greater than zero, respectively. EXAMPLE Further examples of the Computed GO TO and the Unconditional GO TO statements are illustrated below: , - - C fOR COMMENT ~srAUMlNJ NUMBER I > C FORTRAN S TA TEMENT ~ 6' 10 " '0 " 30 H '0 ., ~-J '1 8=4.• IF (A - B) 10, 5, 7 which means "If the value of A minus B is less than zero, transfer to statement 10. If the value of A minus B is equal to zero, transfer to statement 5. If ... A minus B is greater than zero, transfer to statement 7." . Suppose a value, X, is being computed. Whenever this value is negative or positive, it is desired to proceed with the program. Whenever the value is zero, an error routine is to be followed. This may be coded as: C-S •• 1(=0. J iJ<.=K+J ~ GO T.O (10•• 20,.30), K , --- ( fOIt COMMENT .SJAHM( .... ' "i: FORTRAN STATEMENT .j NUM8.U ,6' Ie I, w " J 3.0 'X =(8 t C / F * * E ) - z, / F-A-B GO 7.0 12 20 E=A-C G.O r.O J JJ) /):= B- C GO ToO J 30 J> '0 ., C JF (,X) 1 O,,4-Q, 1 0 J.() 4.0 (ERROR R/)I/TINf) 12 IF (SENSE SWITCH) Statement In the example, D, E, F are computed in that order, and the program is transferred to statement 12. This is a simplified example and if these were the only computations in the program, the programmer would simply list the arithmetic statements to compute D, E. and F in any desired order without using the Computed GO TO statement. IF Statement This statement permits the programmer to change the sequence of the statement execution, depending upon the value of the arithmetic expression. 100 This statement permits the program to transfer to a particular statement depending on the setting of any one of the four Console Program Switches. GENERAL FORM IF (SENSE SWITCH i) nl, n2 where i is the number of one of the Console Program Switches, and nb n2 are statement numbers. The parentheses enclosing the words SENSE SWITCH, and the commas separating the statement numbers are required punctuation. The program transfers to the statement number nl when the designated Program switch is on, or to the statement numbered n2 when it is off. DO Statement EXAMPLE IF (SENSE SWITCH 3) 14, 10 GENERAL FORM DO n i == mb m2 or DO n i == mb m2, ms which means, "If Sense Switch 3 is on, transfer to statement 14, otherwise transfer to statement 10." IF (OVERFLOW) Statement This statement permits the program to transfer to a particular statement depending on the on or off condition of the Arithmetic Overflow Check indicator. where n is a statement number, i is a non-subscripted fixed-point variable, and ml, m2, and ms are either an unsigned fixed-point constant or a non-subscripted fixed-point variable. If ms is not stated, it is understood to be 1. GENERAL FORM IF (OVERFLOW) nb n2 where nl and n2 are statement numbers. The parentheses enclosing the word OVERFLOW, and the comma separating the statement numbers are required punctuation. The program transfers to the statement numbered nl if the Arithmetic Overflow indicator is ON, or to the statement numbered n2 if it is OFF. When the indicator is on, it is turned off by the interrogation. EXAMPLE IF (OVERFLOW) 5, 21 which means, "If the Arithmetic Overflow indicator is on, transfer to statement 5, otherwise transfer to statement 21." IF (EXPONENT CHECK) Statement This statement permits the program to transfer to a particular statement depending on the on or off condition of the Exponent Check indicator. GENERAL FORM IF (EXPONENT CHECK) nl, n2 where nl and n2 are statement numbers. The parentheses enclosing the words EXPONENT CHECK, and the comma separating the statement numbers are required punctuation. The space. between the· words EXPONENT and CHECK is optional. The program transfers to the statement nl if the Exponent Check indicator is ON, or to the statement numbered n2 when it is OFF. When the indicator is on, it is turned off by the interrogation. EXAMPLES DO 30 DO 30 J == 1, 10 J == 1, K, 3 The DO statement is a command to repeatedly execcuate the statements that follow, up to and including the statement with statement number n . , i.e., it forms a program loop. The statements are executed with i == ml the first time. For each succeeding execution, i is increased by m3' After the statements have been executed with i equal to m2 (or as near as possible without exceeding m2), control passes to the statement following the last statement in the range of the DO. DO Range The range of a DO is that set of statements which are executed repeatedly; i.e., it is the sequence of consecutive statements immediately following the DO, up to and including the statement numbered n. DO Index The index of a DO statement is the fixed-point variable i, which is controlled by the DO in such a way that its value begins at mb and is increased each time by m3, up to, but not including the value which exceeds m2. Throughout the range, the i-value is available for computation, either as an ordinary fixed-point variable or as the variable of a subscript. After the last execution of the range, the DO is said to be "satisfied." Suppose for example, that control has reached statement 10 of the program: EXAMPLE IF (EXPONENT CHECK) 7,15 which means, "If the Exponent Check indicator is on, transfer to statement 7, otherwise transfer to statement 15." 10 DO 11 I == 1, 10 11 A (I) == ION (I) 12... FORTRAN II-D 101 DO The range of the DO is statement 11, and the index is L The DO sets I to 1 and control passes into the range. The value of ION ( 1) is computed, converted to floating-point and stored in location A( 1). Since statement 11 is the last statement in the range of the DO and the DO is unsatisfied, I is increased to 2 and control returns to the beginning of the range, statement 11. The value of 2 0 N(2) is then computed and stored in location A (2). The process continues until statement 11 has been executed with I == 10. Since the DO is satisfied (ml == m2), control then passes to statement 12. ,--D_O____'4 _ _ _ _) 1 4 .. ~11 __- - - - - - - - - - - - - 2 5 6 DO's Within DO's There may be other DO statements among the statements in the range of a DO. When this is so, the following rule must be observed. If the range of a DO includes one or more other DO's, then all of the statements in the range of the latter must also be in the range of the former. A set of DO'S satisfying this rule is called a «nest of This rule is illustrated in the drawing below. (Brackets are used to illustrate the range of a DO). DO'S." Permitted Not Perm i tted DO DO the DO becomes satisfied and control passes on to the next statement after the range) the exit is· said to be a normal exit. After a normal exit from a DO occurs, the value of the index controlled by that DO is not defined, and the index cannot be used again until it is redefined. However, if the exit occurs by virtue of a transfer out of the range, the current value of the index remains available for any subsequent use. If the exit occurs because of a transfer which is in the ranges of several DO'S, the current values of all the indexes controlled by those Do'S are preserved for any subsequent use. Exits. When a DO DO DO CALL statement (see CALL STATEMENT) is executed in the range of a DO, care must be taken that the called subprogram does not alter the DO index or indexing parameters. This applies as well when a FORTRAN function is called for in the range of a DO. Restrictions on Statements in the Range of a DO. A statement which redefines the value of the index or of any of the indexing parameters (m's) is the only type of statement not permitted in the range of a DO. In other words, the indexing of a DO loop must be completely set before the range is entered. The first statement in the range of a DO must not be a non-executable statement, such as END, CONTINUE, and FORMAT statements. Also a DO loop cannot end with a transfer statement. Transfer of Control and DO's Transfers of control from and into the range of a DO are subject to the follOwing rule: No transfer is permitted into the range of any DO from outside its range. Thus, 1,2, and 3 are allowable transfers in the drawing below, but 4,5, and 6 are not. Preservation of Index Values. When control leaves the range of a 102 DO in the ordinary way (i.e., when CONTINUE Statement is a dummy statement which results in no instructions in the object program. It is most frequently used as the last statement in the range of a DO to provide a transfer address for IF and GO TO statements that are intended to begin another repetition of the DO loop. CONTINUE exit occurs to the statement ( 13) following the EXAMPLE CONTINUE As an example of a program which requires a consider the table search: CONTINUE. PAUSE Statement CONTINUE, GENERAL FORM PAUSE or PAUSE n 10 DO 12 I == 1, 100 IF (ARC-VALUE (I) ) 12, 20, 12 12 CONTINUE 13 ... This program causes a scan of the l00-entry VALUE table until it finds an entry that equals the value of the variable ARG, whereupon it exits to statement 20 with the value of I available for fixed point use; if no entry in the table equals the value of ARG, a normal where n is an unsigned fixed-point constant. EXAMPLES PAUSE PAUSE 33333 This statement halts the machine. Depressing the Start key causes the program to resume execution of the object program with the next statement. In a PAUSE n statement, where n is a 5-digit number within the range of valid 1620 addresses, the n can be displayed on the 1620 console in OR-2. 102.1 CALL EXIT Statement This s.tatement is used at the end of a FORTRAN program to return control to the Monitor Control Record Analyzer routine. EXAMPLE CALL EXIT STOP Statement PUNCH TAPE, PRINT, and TYPE statements require the use of the FORMAT statement which is described under the section entitled SPECIFICATION STATEMENTS. In addition to the statements listed above, the RECORD and FETCH statements also must include an ordered list of the quantities to be transmitted (see SPECIFYING LISTS OF QUANTITIES). All FORTRAN II-D Input/Output statements cause the object program to make use of the Supervisor I/O routine (see section entitled I/O ROUTINES under suPERVISOR PROGRAM). GENERAL FORM STOP or STOP n where n is an unsigned fixed-point constant. EXAMPLES STOP STOP 33333 When the object program is executed, the machine types STOP on the console typewriter, halts, and n c~m be displayed as it is for the PAUSE n statement. Depressing the Start key causes control to be returned to the Monitor Control Record Analyzer routine. END Statement Specifying Lists of Quantities The input/output statements that call for transmission of data must include an ordered list of the quantities to be transmitted. The listed order must be the same as the order in which the words of information exist (for input), or the desired order for the output. '" The formation and meaning of a list is best described by an example. Assume that the value of K has been previously defined. A, B(3), (C(I), D(I, K), 1 == 1, 10) ((E(I,J), I == 1, 10, 2), F(J, 3), J == 1, K) If this list is used with an output statement, the information will be written on the output medium in this order: GENERAL FORM where I is 0, 1, or 2. EXAMPLES END END (1,2,0,1,1) This statement differs from the previous control statements in that it does not affect the flow of control in the object program being compiled. Its application is to the FORTRAN II-D processor during compilation. An END statement will generate a halt and branch (to the Monitor Control Record Analyzer routine) in the object program. The statement END (11, 12 , la, 14, 15) is acceptable; however, the I's specified are meaningless in 1620 FORTRAN II-D. The END statement must be the last statement (physically) of the source program. 'nput IOutput Statements Input statements are used to read data into core storage and output statements are used to print or punch or store data. The READ, ACCEPT, ACCEPT TAPE, PUNCH, A, B(3), C(l), D(l, K), C(2), D(2, K), . " C(10), D(10, K), E(l, 1), E(3,1), . . . , E (9,1), F( 1, 3), E(l, 2), E(3, 2), ... , E(9, 2), F(2, 3), ... , E (1, K), E (3, K), . . . , E (9, K), F (K, 3) Similarly, if this list is used with an input statement, the successive values, as they are read from the external medium, are placed into core storage in the indicated order. The list reads from left to right with repetition for variables enclosed within parentheses. Only variables, not constants, may be listed. If such a list is used, the execution is exactly that of a DO loop. It is as though each opening parenthesis (except subscripting parentheses) were a DO, with indexing given immediately before the matching closing parenthesis, and with the DO range extending up to that indexing information. The order of the above list can thus be considered the equivalent of the following "program": 1. 2. 3. 4. OUTPUT A OUTPUT B(3) DO 5 I == 1, 10 OUTPUT C( I) FORTRAN II-V 103 5. 6. 7. 8. 9. OUTPUT D(I,K) DO 9 J == 1, K DO 8 I == 1, 10, 2 OUTPUT E (1, J) OUTPUT F (J, 3) Note that indexing infonnation, as in DO'S, consists of three constants or fixed-point variables, and that the last of these may be omitted, in which case, it is assumed to be 1. For a list of the form K, A( K) or of the form K, (A( I), I == 1, K), where an index or indexing parameter itself appears earlier in the list of an input statement, the indexing will be carried out with the newly read-in value. Input/Output in Matrix Form As outlined in a previous section, FORTRAN II-D treats variables according to conventional matrix practice. Thus, the input/output statement READ 1, ( ( A (I, J), I == 1, 2), J == 1, 3 ) causes the reading of I x J (in this case, 2 x 3) items of information. The data items are read into storage in the same order as they are found on the input medium. INPUT/OUTPUT OF ENTIRE MATRICES When input/output of an entire matrix is desired, an- abbreviated notation may be used for the list of the input/ output statement; only the name of the array need be given and the indexing information may be omitted. Thus, if A has previously been listed in a DIMENSION statement, the statement, READ 1,A is sufficient to read in all the elements of the array. The elements of the array are stored in successively higher storage locations. (If A has not previously appeared in a DIMENSION statement, only the first element would be read in.) Lists for the RECORD and FETCH stcltements must be formed in the following manner: 1. Matrix Lists If any item in the list is a matrix, all items in the list must be matrices. All matrices will start at the beginning of a record. Matrices written with a matrix list must be read with a matrix list. 104 2. Element Lists An element list may consist of anyone or more of the following types (assume K previously defined). a. A b. B(l) c. C(l, K) d. (B(I),D(I,K),I==I,IO) e. ( (E (I, J), I == 1, 10, 2), F (J, 3), J == I, K) 3. The mode and order of lists must be the same for the reading and writing of the same data. Arrangement of Arrays in Storage Arrays are stored "column-wise," with the first of their subscripts varying most rapidly, and the last varying least rapidly. Arrays which are I-dimensional are simply stored sequentially. A 2-dimensional array named A would be stored sequentially in the order A 1,1' A 2,1' .. " AM,l' A 1,2' A 2 ,2' •. " AM,N' A 3-dimensional array named T would be stored in the order T1,1,1' T 2,1,1' T 3,1,1"'" TM,I,l' T 1,2,1"'" TM,N,I' T 1,1,2' T 2 ,},2"" , The storage of arrays is in ascending order, i.e., the elements are stored sequentially in locations with ascending addresses. READ Statement The READ statement is used to read data into core storage from the 1622 Card Read-Punch. GENERAL FORM READ n, List where n is the statement number of a FORMAT statement and List is a list of the quantities to be read. EXAMPLES READ 8, A, B, C READ 211, VOLT (I), OHM 0) The READ statement causes data to be read from a card and causes the quantities from the card to become the values of the variables named in the list. Successive cards are read until the complete list has been "satisfied," i.e., all data items have been read, converted, and stored in the locations specified by the list of the READ statement. The FORMAT statement to which the READ refers, describes the arrangement of information on the cards and the type of conversion to be made. ACCEPT TAPE Statement EXAMPLE The ACCEPT TAPE statement is used to cause data to be read into core storage from the 1621 Paper Tape Reader. GENERAL FORM PUNCH 40, (A 0), J == 1, 10) The PUNCH statement causes the object program to punch cards in accordance with the FORMAT statement until the complete list has been satisfied. ACCEPT TAPE n, List where n is the statement number of a FORMAT statement, and List is as described under INPUT/ OUTPUT STATEMENTS. PRINT and TYPE Statements The PRINT statement and the TYPE statement are used to type out data on the console typewriter. GENERAL FORM EXAMPLE ACCEPT TAPE 30, K, A 0) PRINT n, List TYPE n, List The ACCEPT TAPE statement causes the object program to read information from the paper tape reader. Record after record is brought in, in accordance with the FORMAT statement, until the complete list has been satisfied. where n is the statement number of a FORMAT statement and List is as described under INPUT/OUTPUT STATEMENTS. EXAMPLE PRINT 2, ( A 0), ACCEPT Statement The ACCEPT statement is used to allow data to be read in from the console typewriter. GENERAL FORM J == 1, 10) The PRINT and TYPE statements cause output data to be typed on the console typewriter. A carriage return occurs and successive lines are typed in accordance with the FORMAT statement, until the complete list has been satisfied. ACCEPT n, List where n is the statement number of a ment, and List is as described under FORMAT state- INPUT/OUTPUT STATEMENTS. EXAMPLE PUNCH TAPE Statement The PUNCH TAPE statement is used to cause data to be punched by the 1624 PAPER TAPE PUNCH. GENERAL FORM ACCEPT 20, A, B, C, D (3) PUNCH TAPE n, List The ACCEPT statement causes the object program to return the carriage of the console typewriter to await the entrance of data. The information is entered in accordance with the FORMAT statement until the complete list has been satisfied. where n is the statement number of a ment, and List is as described under The PUNCH statement is used to cause data to be punched out in cards by the 1622 Card Read-Punch. GENERAL FORM state- INPUT/OUTPUT STATEMENTS. EXAMPLE PUNCH TAPE 25, ( A 0), PUNCH Statement FORMAT J == 1, 10) The PUNCH TAPE statement causes information to be punched by the paper tape punch. Successive records are punched in accordance with the FORMAT statement until the complete list has been satisfied. PUNCH n, List where n is the statement number of a ment, and List is as described under STATEMENTS. FORMAT state- INPUT/OUTPUT FIND Statement This statement is used to position the disk access arm over a cylinder. FORTRAN II-D 105 GENERAL_ FORM FIND (I) where I specifies the record number where reading or writing will start. The parameter I must be either: 1. A nonsubscripted fixed-point variable. EXAMPLE FIND (IMAX) or 2. A subscripted fixed-point variable. of (I) is incremented by one and reading proceeds from the next sequential record. This procedure continues until either the list has been "satisfied," i.e., until the data for all the variables in the list has been read in, or until the end of the area specified by N 2 (see DEFINE DISK) has been reached. At the conclusion of a read operation, the value of I is one greater than the number of the last record read. The parameter ( I) is the same as described for the FIND (I) statement. The compiled instructions for the FETCH statement cause control to be transferred to the Monitor Input/ Output routine (see Supervisor section). EXAMPLE FIND RECORD Statement (IMAX( 3 ) ) The FIND statement causes the disk access arm to be positioned over a cylinder which will subsequently be read from or written on. The FIND statement may precede a FETCH or RECORD statement that contains the same I parameter, and, in this manner, takes advantage of additional processing time while the access arm is moving. The record numbers (I) start at 1, and correspond to every sector if one-sector records are specified in the DEFINE DISK statement; if two-sector records are specified, the record numbers correspond to every second sector. Only areas of disk storage within the area defined by a DEFINE DISK statement can be specified by a FIND. FETCH Statement This statement is used to read data from the 1311 Disk Storage Drive. GENERAL FORM FETCH (I) List where I specifies the record number and List is as described under INPUT/OUTPUT STATEMENTS. EXAMPLE FETCH (IMAX (3) ) (A (J), J == 1, 10) The FETCH statement may be preceded by a FIND statement containing the same I parameter. When the FETCH statement is executed, a check is performed to determine if the access arm is positioned over the proper cylinder. If the access arm is properly positioned, reading begins; if it is not, a seek is initiated (seek time is not available for computation). The data designated by the list is read from the record specified by (I). If the list specifies more items than can be obtained from one record, then the value 106 This statement is used to write dat-a on the 1311 Disk Storage Drive. GENERAL FORM RECORD (I) List where I specifies the record number and List is as described under INPUT/OUTPUT STATEMENTS. EXAMPLE RECORD (IMAX (3) ) (A (J), J == 1, 10) The RECORD statement may be preceded by a FIND statement containing the same I parameter. When the RECORD statement is executed, a check is performed to determine if the access arm is positioned over the proper cylinder. If the access arm is properly positioned, writing begins; if it is not, a seek is initiated (seek time is not available for computation). The data designated by the list is written in the record specified by (I). If the list specifies more items than can be contained in one record, then the value of (I) is incremented by one and writing proceeds to the next sequential record. This procedure continues until either all items in the list have been written or until the end of the area specified by N 2 (see DEFINE DISK) has been reached. At the conclusion of a write operation, the value of I is one greater than the number of the last record written. The parameter (I) is the same as described for the FIND (I) statement. The compiled instructions for the RECORD statement cause control to be transferred to the Monitor Inputl Output routine (see Supervisor section). Specification Statements The SPECIFICATION statements supply necessary information to the FORTRAN processor, or information to increase program efficiency. No executable instructions are created in the object program for a SPECIFICATION statement. DIMENSION. Statement The DIMENSION statement provides the information necessary to allocate storage for arrays in the object program. GENERAL FORM DIMENSION v, v, v, ... where each v is the name of a variable subscripted with 1, 2, or 3 unsigned fixed-point c;nstants. Any number of v's may be given. EXAMPLE DIMENSION A(10), B(5, 15), CVAL (3,4,5) Each variable which appears in subscripted form in a program or subprogram must appear in a DIMENSION statement of that program or subprogram; the DIMENSION statement must precede the first appearance of that variable. The DIMENSION statement lists the maximum dimensions of arrays; in the object program, references to these arrays must never exceed the specified dimensions. The above example indicates that B is a two-dimensional array for which the subscripts never exceed 5 and 15. The DIMENSION statement, therefore, causes 75 (i.e., 5 x 15) fields to be set aside for the array B. A single DIMENSION statement may specify the dimensions of a number of arrays. The maximum number is limited by the number of continuation cards permitted. A program must not contain a DIMENSION statement which includes the name of the program itself, or any program which it calls. If any of the subscripts in a DIMENSION statement exceeds 9999, an error will be indicated. locations to be shared by two or more variables. The statement should not be used to obtain mathematical equality between two or more elements. If fixed-point and floating-point variables are equivalenced, their word lengths must be the same, i.e., f + 2 must equal k. An EQUIVALENCE statement may be placed anywhere in the source program, except as the first statement in the range of a DO. Each pair of parentheses of the statement list encloses the names of two or more quantities which are to be stored in the same locations during execution of the object program; any number of equivalences may be given. In an EQUIVALENCE. statement, a term such as C (P) can be defined as p>O to mean the pth location of the C array. For example, C (5) would be the fifth location in the C array. Note that in an EQUIVALENCE statement a two- or three-dimensional array must be referenced by a linear subscript (a single subscript notation which denotes the element of an array regardless of how the array is dimensioned). If p is not specified, it is understood to be 1. Thus, the example indicates that the A, B, and C arrays are to be assigned storage locations such that the elements A ( 1 ), B ( 1 ), and C ( 5) are to occupy the same location. In addition, it specifies that D ( 17) and E ( 3) are to share the same location. Quantities or arrays which are not mentioned in an EQUIVALENCE statement are assigned unique locations. EQUIVALENCE COMMON Statement Variables, including arrays, appearing in COMMON statements are assigned to specific storage locations. Storage is assigned separately for each program compiled. GENERAL FORM COMMON A,B ... EQUIVALENCE Statement The EQUIVALENCE statement provides one method of controlling the allocation of data storage in the object program. where A, B ... are the names of variables and nonsubscripted array names. EXAMPLE COMMON X, ANGLE, MATA, MATB GENERAL FORM EQUIVALENCE (a, b, c, ... ), (d, e, f, ... ) , ... where a, b, c, d, e, f, . . . are variables that may be . subscripted with constants only. EXAMPLE EQUIVALENCE ( A, B(I), C(5) ), ( D (17), E(3) ) When the logic of the program permits, the number of storage locations used can be reduced by causing The COMMON storage area may be shared by a program and its subprograms. In this way, the COMMON statement enables a data storage area to be shared between programs in a way analogous to that by which the EQUIVALENCE statement permits data storage-sharing within a single program. Where the logic of the programs permits, this can result in a large saving of storage space. Array names appearing in the COMMON statement must previously have appeared in a DIMENSION statement in the same program. FORTRAN II-V 107 The COMMON storage area is located at the high end of core storage, starting with address 19999, 39999 or 59999. Variables in a COMMON statement are assigned storage locations in descending sequence. For example: A diagnostic error message results if either Rule 1 or 2 is violated. Arguments in Common Storage COMMON A, B, C With f = 10, A, B, and C would be stored in locations 19999, 19987, and 19975 and similarly for 40,000 or 60,000 positions. If C is dimensioned as C ( 10), then 19975 is the address of C ( 10), which is the last element in the array, and 19867 is the address of C( 1). The COMMON statement takes precedence over the EQUIVALENCE statement. Due to the complex interaction of these two statements, the programmer must adhere to the foIlowing two rules: 1. Variables which are to be placed in COMMON storage must be assigned prior to any EQUIVALENCE statement containing these variables. For example, COMMON A EQUIVALENCE (A, B, C) The order in which the variables appear in the EQUIVALENCE statement is irrevelent and rule 1 applies if the COMMON variable is B or C. 2. Within an EQUIVALENCE list there may be no more than one variable which previously has been: a. equivalenced, or b. placed in COMMON. The foIlowing sequence of statements is invalid: EQUIVALENCE (A, B, C) EQUIVALENCE (X, Y, Z) EQUIVALENCE (A, Z) COMMON D EQUVALENCE (D, X, P) Violates (a) above Violates combination of ( a) and (b) The sharing of storage locations desired in the above statements can be achieved by writing the statements as foIIows: COMMON Jj EQUIVALENCE (D, X, P) EQUIVALENCE (A, B, C, X) EQUIVALENCE (X, Y, Z) or COMMON D EQUIVALENCE (D, A, P, B, C, X, Y, Z) 108 COMMON statements may be used as a medium for transmitting arguments from the caIling program to the called FORTRAN function or SUBROUTINE subprogram. In this way, they are implicitly, rather than explicitly transmitted as when listed in the parentheses foIlowing the subprogram name. To obtain implicit arguments, it is necessary to have only the corresponding variables in the two programs occupy the same location. This can be accomplished by having them occupy corresponding positions in COMMON statements of the two programs. For example, (A, B, C) and (E, F, G) become implicit arguments when the calling program contains the statement COMMON A, B, C, and the called subroutine contains the statement COMMON E, F, G. NOTES: 1. To force correspondence in storage locations between two variables in different programs which otherwise would occupy different relative positions in COMMON storage, it is valid to place dummy variable names in a COMMON statement. These dummy names, which may be dimensioned, will cause reservation of the space necessary to cause correspondence. 2. While implicit arguments can take the place of all arguments in CALL-type subroutines, there must be at least one explicit argument in a FORTRAN function. Here, too, a dummy variable may be used for convenience. When one variable is EQUIVALENCED to a second variable which appears in a COMMON statement, the first variable is also located in COMMON storage. DEFINE DISK Statement The DEFINE DISK statement specfies to the FORTRAN processor the size and quantity of data records that wiIl be used with a particular program and its associated subprograms. This statement must appear in the main program (or link program) and may appear only once in that program, when Disk I/O statements appear in any part of the program or subprograms. Thus, all subprograms used by that main program or link program must use the same size record defined in the statement. GENERAL FORM where the parameters Nl and follows: N~ are defined as Nl - a fixed-point constant which specifies the number of words contained in a record of data. The value chosen for N 1 depends upon two things: (1) the word length (w) specified when the program was compiled, and (2) whether the user wants the length of a record of data to be one or two physical sectors. The value (N 1) is determined by following two rules: If w times (N 1) L 100, then the record length will be one disk sector. If w times (N 1) is more than 100 and L 200, then the record length will be two disk sectors. For example, assume that the word lengths specified at compile time were 8 for floating-point numbers (f) and 4 for fixed-point numbers (k). Since a record might contain all floating-point or all fixed-point numbers (words), the larger of the two specified word lengths must be used to determine w. In this example, the floating-point length is the larger of the two wot.d, iengths; its total length is 10 (word length == f 2). Therefore, if a data record is to be contained in one physical disk sector (100 disk locations), then N 1 must be in the range of 1 to 10. An N 1 of 10 would be making the most efficient use of the available disk storage. In this example, if the length of a data record is to be two physical disk sectors, then Nl would be in the range of 11 to 20. A data record may not be greater than 2 sectors (200 digits). + If arrays are read or written, the variables are not moved to a buffer area before going to or coming from the disk provided that both f and k are even in length. In this case, a group mark is placed at the end of the array before writing to disk. If 10-digit variables are used, the most efficient use of the disk would be with arrays containing 9, 19, 29, 39, etc. variables, so that the group mark is placed in the same sector as the variables to be recorded. N2 - a fixed-point constant which specifies the number of data records that will be used by this main program and its associated subprograms. N2 is used by the compiler to reserve a portion of the specified work cylinder area (see DEFINE PARAMETERS ROUTINE in the DISK UTILITY PROGRAM section of this manual) for the purpose of transferring data to and from disk storage. The number of sectors that the compiler will reserve depends upon the record length specified by N 1 • If one-sector records are specified, then N2 sectors will be reserved; if twosector records are specified, then 2 times N2 sectors will be reserved. FORMAT Statement The FORMAT statement is used to describe the format of data being transmitted to and from the typewriter, card, or paper tape units. GENERAL FORM FORMAT (Sl' •. , sn) where Sl is a format specification. The FORMAT specifications must be separated by commas, slashes, or left parentheses. EXAMPLE FORMAT (12/ (EI2.4, FI0.4) ) The Input/Output statements, in addition to the list of quantities to be transmitted, contain the statement number of a FORMAT statement describing the information format to be used. The FORMAT statement also specifies the type of conversion to be performed between the internal machine language and the external notation. FORMAT statements are not executable: their function is merely to supply information to the object program. Therefore they may be placed anywhere in the source program (except as the first statement in the range of a DO). For the sake of clarity, examples given in this section are for typing on the console typewriter. However, the description is valid for any input/ output unit simply by generalizing the concept of "typewritten line" to that of the unit record in the selected input/output unit. Thus, a unit record may be: 1. A typewritten line with a maximum of 87 characters. 2. A punched card with a maximum of 80 characters. 3. A paper tape record with a maximum of 87 characters. (The input record length may be variable up to 87; the output record length i~ fixed at 87.) FORTRAN II-D 109 Numerical Fields Alphameric Fields Three forms of conversion for numerical data are available: FORTRAN II-D provides a method by which alphameric information may be read or written. The specification for this purpose, wH, is followed in the FORMAT statement by w alphameric characters. For example: FROM/TO INTERNAL TO/FROM EXTERNAL TYPE Floating-point variable E Floating -point variable F Fixed-point variable I Floating-point number with exponent Floating-point number without exponent Integer 24H THIS IS ALPHAMERIC DATA Note that blanks are considered alphameric characters and must be included as part of the count w. Information handled with the H specification is not given a name and may not be referred to or manipulated in storage in any way. The effect of wH depends on whether it is used with input or output. 1. Input, w characters are extracted from the input record and replace the w characters included with the specification. 2. Output. The w characters following the specification, or the characters which replaced them, are written as part of the output record. Blanks are not ignored in an H specification as they are elsewhere. For example: The statement FORMAT (3HXY F8.3) could produce any of the following lines: These types of conversion are specified in the forms: Ew.d, Fw.d, and Iw. where wand d are unsigned fixed-point constants. Format specifications are used to describe the input and output format. The format is specified by giving, from left to right, beginning with the first character of the record; 1. The control character (E, F, or I) for the field. 2. The width (w) of the field. The value of w must be large enough to include the field d, plus spaces for a sign and the decimal point. In addition, four spaces for the exponent are needed in E-type conversion. The width specified may be greater than required to provide for spacing between numbers. XY XY XY 3. For E- and F-type conversions, the number of decimal positions (d) (of the field) which appear to the right of the decimal point. Specifications for successive fields are separated by commas. No format specification should be given that provides for more characters than the input/output unit record. Thus, a FORMAT statement for typewriter output· should not provide for more than 87 characters per line, including blanks. For example: the statement FORMAT (12, E12A, F10A) might cause the 'following line to be typed: 12 E12.4 ,-I'-.. A FJO.4 Ii • , b 7 - 92. 3 100 E + 0 0 b b b b - • 0 0 7 6 (In these examples, b is included to indicate blank spaces. ) 110 I == == == b-93.210 b999.999 bb28.768 Another alphameric specification, Aw, causes w alphameric characters to be read into or written from a variable or array name. Since each alphameric character is represented in core storage by two decimal digits, w must be less than, or equal to, the largest whole number resulting from k/2 or f /2, depending on whether the variable or array name is fixed or floating. If k or f is odd, a zero will be supplied as the least significant digit for the field in core storage. To facilitate manipulation of alphameric fields which are stored as floating-point numbers, the numbers will have zero as an exponent. This will have no effect on input/output. However, if the first character in a field is a blank, decimal point, or close parenthesis, the field will be treated as zero in the floating-point arithmetic subroutines. Blan k Fields Blank charaCters may be provided in-an output record, and characters of an input record may be skipped, by means of the specifications wX where OL w L 87 (w is the number of blanks provided or characters skipped). When the specification is used with an in- put record, w characters are considered to be blank, regardless of what they actually are, and are skipped over. right justified in the output field. If f is larger than w-2, only w-2 digits will appear in the output. The X specification should be used to space fields in the E-type format. In the statement E16.8, IX, E16.8, IX, E16.8 Repetition of Field Format It may be desired to print n successive fields within one record, in the same fashion. This may be specified by giving n (where n is an unsigned fixed-point constant which must be S;99) before E, F, I, or A. Thus, the statement FORMAT (12, 3E12.4) might result in: 27 - 92.3l00E + 00b75.8000E - a space will be provided between adjacent fields. A field read according to the E-type format need not have the exponent E( - )XX; i.e., it may actually take the same form as the F -type format. The P-scale factor may be used in a specification but it will be ignored by the FORTRAN II-D processor. 02b55.3600E - 02 Multiple Record Formats Repetition of Groups A limited parenthetical expression is permitted in order to enable repetition of data fields according to certain format specifications within a longer FORMAT statement specification. Thus, FORMAT (2( FlO.6, ElO.2), 14) is equivalent to FORMAT (FlO.6, ElO.2, FlO.6, ElO.2, 14). The number of repetitions is limited to a maximum of 99. Scale Factors The E-type specification implies a scale factor. Therefore, E16.8 for an output field will result in the printing or punching of a maximum of ten significant digits in the form (- ) XX.XXXXXXXXE ( - )XX. A maximum of f digits can be placed to the right of the decimal point if the d specification is greater than f. In this case, d-f low-order zeros will be inserted to satisfy the d specification. The following guide may be used when working with E-type specifications. 1. If f (floating-point, precision) L w-6, then significant digits will be printed or punched. f 2. If f >w-6, then w-6 significant digits will be printed or punched. For example, if f == 10 and the floating-point number is stored as 123456789135, it will be printed as -12.3456789lE-37, according to specification E16.8. The F -type specification also implies a scale factor. Therefore, F16.8 for an output field will result in the printing or punching of a maximum of fourteen significant digits in the form (-) XXXXXX.XXXXXXXX. However, a maximum of f digits will be placed to the right of the decimal point and the result will be To deal with a block of more than one typewritten line, a FORMAT specification may have several different one-line formats, separated by a slash (/) to indicate the beginning of a new line. Thus, FORMAT (3F9.2, 2Fl0.4/8E14.5) specifies a multiline typewritten block in which line 1 has format 3F9.2 and 2FI0.4, and line 2 has format 8E14.5. If a multiple-line format is desired, such that the first two lines are typed according to a special format and all remaining lines are typed according to another format, the last line specification should be enclosed in a second pair of parentheses; e.g., FORMAT (12, 3E12.4/2FlO.3, 3F9.4/ ( 10F12.4) ). If data items remain to be transmitted after the last line format specification has been completely satisfied, the format repeats from the last left parenthesis. As these examples show, both the slash and the closing parenthesis of the FORMAT statement indicate a termination of a record. Blank lines may be introduced into a multiline FORMAT statement by listing consecutive slashes. Format and Input/Output Statement Lists The FORMAT statement indicates, among other things, the maximum size of each record to be transmitted. In this connection it must be remembered that the FORMAT statement is used in conjunction with the list of some particular input/ output statement, except when a FORMAT statement consists entirely of alphameric fields. When the FORMAT statement is used with the list, control in the object program switches back and forth betwen the list (which specifies whether data remains to be transmitted) and the FORMAT statement (which gives the specifications for transmission of that data) . FORTRAN II-D 111 Automatic Fix/Float During execution of input/output statements, it is permissible to read a fixed-point argument into a floating-point field or a floating-point argument into a fixed-point field, and to write from a floating-point field in a fixed-point format or from a fixed-point field in floating-point format. During reading, the format specification dictates the data conversion, and the list designation controls the mode of storing the argument. During writing, the format specification dictates the mode of the field printed or punched. Ending a Format Statement During input/output of data, the object program scans the FORMAT statement to which the relevant input!.output statement refers. When a specification for a numerical field is found and list items remain to be transmitted, input! output takes place according to the specification, and scanning of the FORMAT statement resumes. If no items remain, transmission ceases and execution of that particular input/output statement is terminated. Thus, a numerical input/output operation will be brought to an end, when a specification for a numerical field or the end of the FORMAT statement is encountered, and there are no items remaining in the list. Data Input to the Obiect Program Input data to be read when the object program is executed must be in essentially the same format as given in the previous examples. Thus, a card to be read according to FORMAT ( 12, E12.4, F10.4) might be punched: 27b-O.9321Eb02bbb-O.OO76 Within each field, all information must appear at the extreme right. Plus signs may be omitted or indicated by a b (blank) or +. Blanks in numerical fields are regarded as zeros, but zeros may not be substituted for blanks. For example, a sign cannot be preceded by zeros. Numbers for E-type and F-type conversion may contain any number of digits, but only the high-order f digits are retained. Numbers for I-type conversion may not contain more than k significant digits. The concept of f and k is treated in this manual under CONSTANTS, VARIABLES, SUBSCRIPTS, AND EXPRESSIONS. To permit economy in punching, certain relaxations in input data format are permitted. 1. Numbers of E-type conversion need not have four columns devoted to the exponent field. The 112 start of the exponent field must be marked by an E, or if the E is omitted, by a + or - (not a blank). Thus E2, E02, +2, 02, Eb02, and E+02 are all permissible exponent fields. Blanks are not permitted between characters in the exponent field except for the optional blanks which may replace a plus sign. Numbers for E-type conversion must be right-justified in the data record field. 2. Numbers for E-type or F-type conversion need not have their decimal points punched. If not punched, the FORMAT specification will supply them; for example, the number -09321 +2 with the specification E12.4 will be treated as though the decimal point has been punched between the o and the 9. If the decimal point is punched in the card, its position overrides the indicated position in the FORMAT specification. Library Functions There are seven library functions (which are a part of 16 FORTRAN relocatable subroutines) included in the 1620 Monitor II system. These subroutines are selected for loading only when called for in the object program. The functions are: TYPE OF FUNCTION Logarithm (natural) Exponential Cosine of an angle given in radians Sine of an angle given in radians Arctangent of an angle given in radians Square Root Absolute Value FORTRAN NAME LOGF EXPF COSF SINF ATANF SQRTF ABSF The name of the library function is followed by the argument enclosed in parentheses. The argument can be a variable (subscripted or not subscripted), or an expression. EXAMPLES A == COSF (B) A == SQRTF (BETA) Y == A - SINF (BO SQRTF (C) ) For the last example, the assembled instructions of the object program will: 1. Branch to the square root subroutine to compute the value of C. 2. Multiply the square root value of C (obtained in step 1) by B. 3. Branch to the SINF subroutine to compute the sine of the value obtained from step 2. 4. Subtract the value computed so far from the variable A. 5. Replace the present value of the variable Y with the value of the complete expression. Results of the library subroutines are truncated, and, in general, errors are no greater than one in the last digit of the mantissa. Approximation methods and errors for functional subroutines are described in greater detail in the following paragraphs. 1. Logarithm. The natural logarithm of the fractional part of the positive argument is evaluated by using a power series expansion. The exponent of the argument is multiplied by In 10. The product is added to the logarithm of the fraction, and the sum is the logarithm of the argument. For an argument with its value A in the range .99< A L.. 1.01, the leading digits of its logarithm will be zeros, and the result will contain less than f significant digits because of normalization. The maximum truncation error in the result is ± lQ-f. 2. Exponential. The value of eA where A is the value of the argument, is calculated by using a series approximation for lOA. For IAI 227.955924206 ... an exponent overflow will result for A>O or exponent underflow for A for four FUNCTION subprogram Same for three Individual } Sa_ for ... two SUBROUTINE subprogram Individual .) Dummy Variables within an Arithmetic Statement Function A variable appearing as a dummy argument within an arithmetic statement function must not previously have been defined except as a dummy argument in a previous arithmetic statement function. After the variable is used as a dummy argument, it may appear elsewhere in the program. Subprogram Statements Subroutines which are referred to by other FORTRAN programs can be written as subprograms in the FORTRAN II-D language. A subroutine is considered to be any sequence of instructions that performs a desired operation. A subprogram is defined as a program written in FORTRAN language that is referred to or used by another FORTRAN source program. Two types of FORTRAN II-D coded subprograms are available: the FUNCTION subprogram and the SUBROUTINE subprogram. Four statements, SUBROUTINE, FUNCTION, CALL, and RETURN, are necessary for their definition and use. Although FUNCTION subprograms and SUBROUTINE subprograms are treated together and may be viewed as similar, it must be remembered that they differ in two fundamental respects: 1. The FUNCTION subprogram, which results in a FORTAN function, as defined under FUNCTIONS, is always single-valued, whereas the SUBROUTINE subprogram may be multivalued. 2. The FUNCTION subprogram is called or referred to by the arithmetic expression containing its name; the SUBROUTINE subprogram can only be referred to by a CALL statement (see CALL STATE- The function name consists of 1 to 6 alphabetic or numerical characters, the first of which must be alphabetic. EXAMPLES FUNCTION ARCSN (RADS) FUNCTION ROOT (B, A, C) FUNCTION INTRT (RATE, YEARS) In a FUNCTION subprogram, the name of the function must appear either in an input statement list, or at least once as the variable on the left-hand side of an arithmetic statement. An example of the latter is: II-D MENT). Subprograms of each of these two types are coded in FORTRAN II-D language. In all respects, they conform to the rules for FORTRAN programming. FUNCTION Statement The FUNCTION statement, always first in a FUNCTION subprogram, defines it as. a FORTRAN FUNCTION subprogram. FUNCTION NAME (A, B) RETURN The value of the function is returned to the calling program. The mode of a function subprogram is determined by its name. EXAMPLES FUNCTION AMAST (A, K) Floating point FUNCTION IAMAST (A, K) Fixed point The arguments following the name in the FUNCTION statement may be considered as "dummy" variable names, that is, during object program execution other actual arguments are subsituted for them. Therefore, the arguments which follow the function reference in the calling program must agree in number, order, and mode with those in the FUNCTION statement in the subprogram. Furthermore, when a dummy argument is an array name, the corresponding actual argument must also be an array name. Each of these array names must appear in similar DIMENSION statements within its respective program. N one of the dummy variables may appear in EQUIVALENCE statements in the FUNCTION subprogram. GENERAL FORM SUBROUTINE Statement FUNCTION Name (aI, a2, ... , an) GENERAL FORM where Name is the symbolic name of a single-valued function, and each argument aI, a2, ... ,an, of which there must be at least one, is a nonsubscripted variable name. SUBROUTINE N ame ( aI, a 2 , ••• , an ) where Name is the symbolic name of a subprogram, FORTRAN IJ-D 115 and each argument, aI, a:z. ... ,an, if any, is a nonsubscripted variable name. The name of the subprogram consists of 1 to 6 alphabetic or numerical characters, the first of which must be alphabetic. compiled or used in a multiple compilation with others. CALL Statement EXAMPLES SUBROUTINE MATMP (A, N, M, B, L, C) SUBROUTINE QDRT (B, A, C, ROOT 1, ROOT 2) The statement, always first in a SUBROUsubprogram, defines it as a SUBROUTINE subprogram. A subprogram introduced by the SUBROUTINE statement must be a FORTRAN program and may contain any FORTRAN II-D statements except FUNCTION, DEFINE DISK, or another SUBROUTINE statement. A SUBROUTINE subprogram must be referred to by a CALL statement in the calling program. The CALL statement specifies the name of the subprogram and its arguments. Unlike the FUNCTION subprogram which results in the calculation of only a single numerical value, the SUBROUTINE subprogram uses one or more of its arguments to return results. Therefore, the arguments so used must appear on the left side of an arithmetic statement in the subprogram (or alternately, in an input statement list within the subprogram). The arguments of the SUBROUTINE statements are dummy names that are replaced, at the time of execution, by the actual arguments supplied in the CALL statement. There must, therefore, be correspondence in number, order, and mode, between the two sets of arguments. Furthermore, when a dummy argument is an array name, the corresponding actual argument must also be an array name. Each of these array names must appear in similar DIMENSION statements within its respective program. SUBROUTINE The CALL statement refers only to the SUBROUTINE subprogram, whereas the RETURN statement is used by both the FUNCTION and SUBROUTINE subprograms. GENERAL FORM TINE CALL Name (a 1 , a:!, ... , an) where Name is the name of a SljBROUTINE subprogram, and al, a:!, ... , an are arguments. EXAMPLES CALL MATMP (X, 5, 10, Y, 7, Z) CALL QDRT (po9.732, Q/4.536, R-soo2.0, Xl, X2) This statement is .used to call SUBROUTINE subprograms; the CALL transfers control to the subprogram and presents it with the parenthesized arguments. Each argument may be one of the following types: 1. Fixed-point constant. 2. Floating-point constant. 3. Fixed-point variable, with or without subscripts. 4. Floating-point variable, with or without subscripts. 5. Arithmetic expression. The arguments .presented by the CALL statement must agree in number, order, mode, and array size with the corresponding arguments in the SUBROUTINE statement of the called subprogram, and none of the arguments may have the same name as the SUBROUTINE subprogram being called. For example, the subprogram headed by SUBROUTINE MATMP (A, N, M, B, L, C) could be called by the main program through the CALL statement CALL MATMP (X, 5, 10, Y, 7, Z) RETURN Statement EXAMPLE RETURN where the dummy variables, A, B, C, are the names of matrices. A, B, C must appear in a DIMENSION statement in subprogram MATMP, and X, Y, Z must appear in a DIMENSION statement in the calling progr~m. The dimensions assigned must be the same in both statements. None of the dummy variables may appear in EQUIVALENCE statements in the SUBROUTINE subproprograms. These subprograms may be independently 116 This statement terminates any subprogram of the type headed by either a SUBROUTINE or a FUNCTION statement, and returns control to the calling program. A RETURN statement must, therefore, be the last executed statement of the subprogram. It need not be the last statement of the subprogram physically, but can be any point reached by a path' of control. Any number of RETURN statements may be used. CALL LINK Statement This statement is used to call a new program from disk storage and transfer to the first executable statement in that program. GENERAL FORM CALL LINK (NAME) where NAME is the name of a FORTRAN program as contained in the Equivalence table. The program name must be formed with one to six alphabetic or numerical characters (no special characters) of which the first is alphabetic. EXAMPLES CALL LINK (JOE) CALL LINK (PROG18) The CALL LINK statement is used to call another program into core storage. The program that is called will cause all subprograms and library subroutines that it references to be read into core storage (the arithmetic and I/O subroutines are also reloaded). Any program called by using the CALL LINK statement must be in disk storage or it is assumed that the '1ink" program is the first mainline program encountered by the system input unit. If the logic of the program allows one of several links to possibly be called, it is necessary that the link programs be on disk storage. If a subprogram is not available (in disk storage) that the "link" program references, the FORTRAN loader will request that the missing subprogram be loaded into core from cards or paper tape. Only 50 links that call LOCAL subprograms can appear in anyone FORTRAN job. The COMMON area is not destroyed during the loading of the link programs. If the size of COMMON differs (between the calling program and.the link program being called), the COMMON area size will be the size defined for the new program. FORTRAN II-D Processor The 1620 FORTRAN II-D Processor program is used to change a user-written FORTRAN source program into an obiect program of 1620 machine language instructions. All programs are compiled in relocatable format, i.e., the program instruction addresses are compiled relative to a starting address of 00000. The instruction addresses must be modified before execution can take place. The processor operates under control of the Monitor Supervisor program. It can be called into operation only by use of the FOR or FORX Monitor Control records. 'The Monitor II system permits the follOwing operations: FOR- TRAN 1. 2. source program compilation. source program compilation and immediate execution of the compiled program. From the programmer's point of view, this is equivalent to entering a source program into the machine as an object program. FORTRAN FORTRAN 3. Object programs may be placed in disk storage after compilation and/or they may be punched in cards or paper tape. 4. Execution of FORTRAN object programs that are in disk storage or are in cards or paper tape. 5. Execution of programs in "links," a procedure necessary where the total program is too large to fit into core storage at one time. A "link" is a section of the total program ( see CALL LINK STATEMENT) • General Compilation Process Although the process of compiling an object program is a continuous one, there are two phases through which the source statements pass before an object program is compiled. The user enters the source statements using cards, paper tape, or typewriter input and obtains output in cards, paper tape, or on the typewriter or disk storage. The input and output units are selected by the use of control records. The object program may be placed permanently on disk and it may be punched out in either paper tape or cards. The source statements are analyzed during Phase I and broken apart into instruction generating elements that are strings of 5-digit codes. These strings are then written on disk storage for use by Phase II, which outputs the 1620 coding in relocatable format. Errors are indicated on the console typewriter as they are detected. The final output of any compilation is a Single program or subprogram. Unless this program is an independent entity, capable of being executed without other programs or library functions, the user will need to load the other programs before execution can take place. To initiate the loading process, the user may (1) call the compiler with a FORX Control record, or (2) call the compiled program using an XEQS Control record (see MONITOR II CONTROL RECORDS). A program loaded by means of a FORX or XEQS Control record will also have all associated subroutines and subprograms loaded with it. (All associated subprograms are loaded except those defined as '1oad-on-call"; see LOCAL CONTROL RECORD). FORTRAN II-V 111 The arrangement for stacked input to process \ source program is shown in Figure 14. the FOR or FORX Monitor Control record is followed by optional FORTRAN Control records, followed by the source program. The inclusion of a PAUS Monitor Control record will allow the operator to set the Console Program switches to the desired position (options for Program switches are shown in Table 9.) Mter setting the switches, the operator depresses START and the Supervisor reads the FOR or FORX record, the FORTRAN Control records, if any, and begins compilation of the source program. During Phase I (reading the source program and creating instruction generating elements, the Phase I source program errors that are listed in Table 10 may be detected. The Phase I errors are of two types: Type I, compilation continues, but outputting of intermediate output is stopped; Type II, compilation and outputting both continue. When all source statements have been read and the instruction generating elements entered in the temporary storage area, Phase II of the processor takes control. If the program uses subscripts, Phase II uses index registers in the generated instructions to save subscript calculations for reuse when possible. Phase II converts the Phase I instruction codes into machine language instructions and places the instructions in a temporary disk storage area. In-line instructions such as F ADD are generated wherever possible. When all intermediate output is processed, a message denoting the end of compilation is printed. Depending on the FORTRAN Control records loaded with the source program, any of the following options can occur: The compiled object program contains a header record which specifies various parameters and information needed when it is to be loaded for execution such the program name, length of the program, ; and k, FORTRAN program constant, and indicators to specify the Library subroutines used. Subprogram identification records, consisting of 18 digits of name and address information, are created for each subprogram called by a program. Up to 100 subprograms may be used with anyone FORTRAN main program or Link program. FORTRAN II-D Control Records The FORTRAN Compiler can utilize four control records that specify output options, etc. When they are used., these records may be in any order but they must be read in between the FOR or FORX Control record and the source program statements as shown in Figure 15. The FORTRAN Control records must have an asterisk in column 1 and the Name must be punched beginning in column 2. If a control record (00 in column 1) is read and is not a legally named record, the message shown below is typed and the program halts. ERROR, INVALID CONTROL RECORD ***:I: (End of job) .' 1. Control is returned to the Supervisor. Control records for output were not used; compilation was apparently for editing only of source pr~ gram. 2. Object program is loaded to permanent area of disk storage and/or outputted in cards or paper tape. 3. Object program is executed using data from input unit or disk storage. . The operator must correct the invalid record in the input unit and depress START. The prescribed format and specific function of each control record is described below. FANDK. The FORTRAN II-D Compiler, as delivered to the user, will process an object program with a Boating-point word length of 10 digits (f of 08 2==10) and a fixed-pOint word length of 4 digits. The operator may vary these lengths, at compilation time, by using the FANDK control record. The format of the F ANDK Control record is as follows: + --------7 FORTRAN II - D Control Records - - - - - - --', I MONITOR Control Records I ~--------------------~-- ______ I Figure 14. 118 Typical Stacked Input for FORTRAN Compilation Columns 1-6 00 FANDK 7-8 ff 9-10 11-80 kk not used where ff is the floating-point mantissa length and kk is the fixed-point word length. The operator must correct the record that contains the error and depress the 1620 Start key. LDISK. The LDISK Control record causes the object program to be moved to a permanent area of disk storage following compilation. The format for the LDISK control statement is: -------7 Columns 1-6 7-12 13-16 17-80 °LDISK Name (optional) Number (optional) not used I I (Punch Symbol Table & Statement Na.) I Optional FOR or FORX Monitor Control Record I f I I --------- I Figure 15. FORTRAN II-D Control Records If entry is from the console typewriter, the same format must be followed. The range of f is 2 through 28, of k, 4 through 10. If f or k is out of the prescribed range, the following message is typed: ERROR, F OR K OUTSIDE RANGE PSTSN. This control record causes the symbol table and addresses of numbered statements to be punched. The format is as follows: Columns 1-6 7 8-80 °PSTSN n not used where n is 2 if paper tape output is desired or 4 for card output. See NOTE below. POB]P. The POB]P Control record causes the object program to be punched following compilation. The format is as follows: Columns 1-6 °POBJP 7 n 8-80 not used where n is the same as for the PSTSN Control record. The format of the processor output (object program) is given under LOADER ROUTINE of the SUPERVISOR section of this publication. NOTE: If n is not 2 or 4 in the PSTSN or POBJP Control records, the following message is typed out on the console typewriter, and the program halts. ERROR, INVALID OUTPUT UNIT CODE where Name is the left-justified program name, and Number is a 4-digit DIM entry number not already in use. If a DIM entry number is not supplied, the Disk Utility Program will assign one. After compilation, the Disk Utility Program will load the programs to disk and create a DIM entry for the program. At that time, the Name supplied (in the LDISK record) will be placed in the Monitor Equivalence table. It is not necessary to supply the name of a FUNCTION or SUBROUTINE subprogram. The name used in the FUNCTION or SUBROUTINE statement is the name placed in the Equivalence table. Entering the Source Program The source program can be entered in the form of a punched paper tape, a deck of punched cards, or a list of statements to be typed in at the console typewriter. This entry option is specified in the FOR or FORX Monitor Control record. OPERATING PROCEDURES All of the following operations may be performed before the processor is called, except possibly items 1 and 3. If the operation taking place just prior to the compilation of a source program required the Console Program switches to be set differently than the desired settings for compiling a Monitor PAUS Contrpl record should have been inserted before the FOR· or FORX record. This will allow time for the operator to change the switches. The operations required to process a source program are as follows: 1. Set the Console Program switches for the desired compilation operations (see Table 9). 2. Set all check switches to PROGRAM. 3. If punching is to take place, ready the paper tape punch with feed code leader or, ready the card punch by loading blank cards and depressing the Punch S~t key. 4. Place a FOR or FORX Control record in the input unit (see the Monitor II Control Records section for format) . FORTRAN II-D 119 Table 9. SWITCH 1 Program Switch Settings for FORTRAN II-D OFF ON Source statements are typed Source statements are not listed on the console typewriter as they are processed. Phase I Errors During Phase I of compilation, a number of tests are made for source program errors. If an error is found in a source statement and Program Switch 1 is on, a message in the form Source statement errors are typed in the form ERROR n. * Source statement errors are typed in the form SSSS and CCCC ERROR n. * ERROR n At the end of Phase 1, symbol table and statement numbers are typed out. Symbol table and statement numbers are not typed out. is typed, where n is the error code (see Table 10). If switch 1 is off, the error message is in the form 2 Trace instructions for arithmetic statements are compi led but no additional instruct ions are generated. Trace instructions for arithmetic statements are not compiled. 3 A trace instruction is compiled to trace the value of the expression generated in an IF statement. An additional instruction is generated in the object program for every IF statement. Trace instructions for IF statements are not compiled. SSSS + CCCC ERROR n 4 Errors made while typing source statements can be corrected by a. turning on switch 4 b. pressing the Release and Start keys, At the end of Phase 1, the address of the first instruction generated for each statement is typed. (Switch 1 must also be on). 0509 + 0012 ERROR 1 r c. tum;n. off ,w;tch 4, d. retyping statement. Address of first instruction for each statement is not typed. *See description under Phase 1 Errors. 5. Place any desired FORTRAN Control records in the input unit (see FORTRAN II-D CONTROL RECORDS). 6. Place the source program statements in the input unit (specified in the FOR or FORX record). To resume machine operation, if the machine was stopped to allow the operator to perform any of the above operations, depress the Start key. Typewriter Input. If source statements are entered by way of the console typewriter, each statement must be terminated with a record mark. Mter a statement is typed, the operator must depress the R-S key to process that statement. As soon as a statement is processed, the carriage returns to await entry of the next statement. A statement of up to 330 characters may be typed with no intervening punctuation, spacing, etc. Normally card format need not be followed, however, in a comment statement the C must be followed by at least two blanks (spaces) before the comment is typed. 120 where ssss is the last statement number encountered by the program prior to the error, and cccc is the number of statements following the last numbered statement. ssss + ecce is the statement that contains the error. For example, the message means that the twelfth statement following the statement numbered 509 is incorrect. If an error occurs before a statement number is encountered, SSSS will be 0000. Errors detected after processing the END statement reference the END statement. Comment cards, blank cards, and continuation cards are not included in the statement count. If any Type I errors (see Table 10) are found during Phase I, no attempt is made to process the source program through Phase II. At the completion of Phase I, control is returned to the Monitor Supervisor program (Monitor Control Record Analyzer routine). If a Type II error is found (other than Error 60), compilation continues on through Phase II. However, any FORTRAN Control records specifying output that were included with the source program will be disregarded and control will transfer to the Supervisor program at the completion of Phase II. If Error 60 is encountered, normal processing is continued since N1 and N2 can be corrected when loading the object program (see SUBROUTINE ERROR CHECKS). Phase II Errors During processing of the intermediate output, certain checks are performed which were impossible to perform during Phase I. If an error is detected, an error message in one of the following forms is typed: SSSS+CCCC SSSS+CCCC SSSS+CCCC SSSS+CCCC SYMBOL TABLE FULL IMPROPER DO NESTING DO TABLE FULL MIXED MODE Table 10. FORTRAN Phase I Source Program Errors TYPE 1: Compilation continues but outputting of intermediate output is stopped. Only one error of this type is detected in anyone statement. Error No. Condition Error No. Condition Dimensioned variable used within an arithmetic statement function. I Undeterminable, misspelled, or incorrectly formed statement. 22 2 Syntax error in a nonarithmetic statement (exception: DO statements). 23 More than four continuation cords, 24 Statement number in a DO statement appeared on a previous statement. Dimensioned variable used improperly, i.e., without subscripting, or subscripting appears on a variable not previously dimensioned. 25 Syntax error ir, a DO statement. 26 FORMA T number missing in on input/ output 'statement. 4 Symbol table full (processing may not be conti nued). 27 5 Incorrect subscript. 6 Some statement number assigned to more than one statement. Statement number in on input/output statement appeared previously on a statement other than a FORMAT statement, or a number on a FORMAT statement appeared in other than on input/output statement. 28 7 Control transferred to FORMAT statement. Syntax error in input/output list or an invalid list element. Variable name greater than 6 alphameric characters. 29 8 Syntax error in CALL statement, or an invalid argument. 30 9 Variable nome used both as a nondimensioned variable name and as a Subroutine or Function name. SUBROUTINE or FUNCTION statement not the first statement in a subJ)r'ogram. 31 Syntax error or invalid parameter in a SUBROUTINE or FUNCTION statement. 10 Invalid variable within an EQUIVALENCE statement. 32 Syntax error or invalid variable in a COMMON statement. II Subroutine or Function nome or dummy variable used in on EQUIVALENCE statement (subprogram only). 33 Variable in a Common list previously placed in Comman or previously equivalenced. 12 k not equal to f + 2 for equivalence af fixed point to floating point variables. 34 13 Within an Equivalence list, placement of two variables previously in Common, or one variable previously equivalenced and another either equivalenced ar placed in Common. Library function name appeared to the left of on equal sign or in a COMMON, EQUIVALENCE, DIMENSION, or input/ output statement; or function name not followed by a left parenthesis. 35 Syntax error in FORMAT statement, or invalid FORMAT specifications. 36 Invalid expression to the left of on equal sign in an arithmetic expression. 37 Arithmetic statement function preceded by the fi rst executable statement. 38 Inval id expression in on IF or CA LL statement, or invol id expression to the right of on equal sign in an arithmetic statement. 39 Unbalanced parenthesis. 40 Invalid argument used in colling an Arithmetic statement function or Function subprogram. 3 14 Sense Switch number missing in on IF (Sense Swi tch n) statement. 15 Statement number or numbers missing, nat separated by cammas, or nonnumerical in a transfer statement. 16 Index of a computed GO TO missing, invalid, or not preceded by a comma. 17 Fixed point number greater than k digits. 18 Invalid floating point number. 19 Incorrect subscripting within a DIMENSION statement. 41 Syntax error in disk I/O statement. 20 First character of a nome not alphabetic. 42 Disk I/O list omitted. 43 Disk I/O list contains both simple variables and array names. 44 COMMON exceeds core storage size. (May occur when large array is defined.) Variable within a DIMENSION statement previously used as a nondimensianed variable, or previously dimensioned or used as a Subroutine or Function nome. 21 TYPE 2: Compilation of intermediate output continues. Error No. ConditiO'l 51 DO loop ended with a transfer statement. 52 No statement number for next executable statement following a tronsfer statement. 53 Improperly ended nonarithmetic statement. 54 55 56 Error No. Condition 57 RETURN statement appeared in program other ",on a sUbprogrom (statement ignored). 58 RETURN statement not contained in a Subrouti ne or Function subprogram. Unnumbered CON TI NUE statement. 59 Statement number not defined. See note at end of Table. Number of Common addresses assigned in excess of storage capaci ty because of Equivalence. See note at end of Table. 60 Syntax error in DEFINE DISK statement, invalid use of, or DEFINE DISK statement missing. Statement number or subscript greater than 9999 (only first 4 significant digits are retained). NOTE: Errors 55 and 59 are not detected if Type I errors occur during compilation. FORTRAN II -D 121 where ssss is the last statement number, encountered by the program prior to the error, and cccc is the number of statements following the last numbered cccc is the statement that contains statement. ssss the error. Comment cards, blank cards, and continuation cards are not counted in the statement count. If an IMPROPER DO NESTING or MIXED MODE message occurs, compilation is continued, but only to check for other errors. The FORTRAN Control records, PSTSN, POB]P, and LDISK will be disregarded. the object program will not be executed and control will be returned to the Supervisor program. Compilation stops immediately after the SYMBOL TABLE FULL or DO TABLE FuLL message is typed and control is returned to the Supervisor program. The approximate allowable number of symbols differs with the core storage size of the source machine. For a 1620 with 20,000 positions, approximately 200 symbols are allowed. For a 1620 with 40,000 or 60,000 positions, the number of symbols allowed is approximately 1200 or 2200, respectively. + End of Compilation 00100 2 67 987898 Subprogram Name N1 N2 When all of the intermediate output is processed, the following messages are printed: nnnnn LENGTH aaaaa NEXT COMMON END OF COMPILATION where nnnnn is the number of core positions the object program requires (object program and data areas except COMMON), and aaaaa is the next available core st~rage position of the COMMON area, (aaaaa 1 is the last used position of COMMON). If FORTRAN Control records specifying output are included with the source program, the outputting takes place following the END OF COMPILATION message. Word Length + Reo. Length Identification Data When a program (or subprogram) is compiled, it is headed with an identiBcation record that will be used when the program is to be loaded into core storage for execution. Both main program and subprogram header identification records are shown and described as below: Length ff and kk Mainline or link Word Rec __ First Next Subroutine ,00100,2 ! 67! 987898! Nil ;:;;2, Length 'length ,length Iff, kk, Core I Common ,Indicators I 5 I 2 6 2 5 2 3 5 2 2 5 5 30 Digits Entry Address Less Six First Core Subp.-ogram _ _ _ _ Subprogram _ _ Entry Address Next Subroutine ,00100,2,671987898 ,Nome 'length, kk, less Six , Common I Indicators I 5 I 2 6 12 5 2 2 5 5 30 ff, 122 The address of the origin of the program less 100. An indicator to the relocating loader that a constant to be relocated is forthcoming. The number of digits in the forthcoming constant. An arbitrarily chosen constant to identify this as a header record for a FORTRAN program. The name of the program in double digit representation (left-justified) . Used only in subprograms and FORTRAN function headers. The number of words per disk record. ( From the DEFINE DISK FORTRAN statement. ) This field is present only for m a i n lin e programs and links. The number of logical records in the disk, as used by the FORTRAN program. ( From the DEFINE DISK FORTRAN statement. ) This field is only present in mainline program and link header records. The number of digits in the words used to determine a logical record. This value is the larger of the floating word and the fixed word length. The number of sectors to be used when reading or writing logical records. This value is limited to the numbers 1 and 2. The length of the program ( This rp.~st be an even number) .. The length of the mantissa and the fixed point words in this program. The first location in the subprogram, less six, to enter the subprogram. The first location in the program to begin execution. Present only for mainline or link programs. Next The next location available in COMMON. This must be an even address (e.g., 19998) so that COMMON can correctly be written on disk during operation of the FORTRAN loader. Subprograms do not use this value. Sub. Indicators A digit position for each library subroutine in the FORTRAN system. The identification record occupies one whole sector when it is on the disk. The format for the balance of this sector, if the program is in relocatable format, is shown below: COMMON 000002i701234567891234567 Subprograms Called by FORTRAN The names of the subprograms called by a program are stored at the end of the program. The address within the calling program where the address of the subprogram will be placed is also stored along with the name of the subprogram. These 18-digit name and address records are created for the subprograms called and the last record is followed by a record mark. Up to 100 subprograms may be used with any one FORTRAN main program or link (50 can be loaded with the program; 50 can be called on an as-needed basis, i.e., LOCAL). Name 12 Digits I Address I 0 I 5 I The names. and addresses of the subprograms called are moved to the FORTRAN loader work area when the subprogram is loaded. This FORTRAN loader will determine which of the subroutines called by the subprogram have not already been loaded, and will load those routines (exception: LOCAL subprograms cannot call a new subroutine; see OBJEGr PROGRAM EXECUTION ). The proper addresses are placed within the calling programs to link them with the subroutines that they call. Trace Feature Under program switch control, instructions can be compiled into the object program to enable the operator to trace the How of the program when it is executed. During execution of the object program, the trace output is under control of Program Switch 4 as described under OBJEGr PROGRAM EXECUTION. The trace output contains the value of the left-hand side of each executed arithmetic statement and/or, the value of the expression calculated in an IF statement. Subroutines The subroutines for 1620 FORTRAN II-D are divided into two types: (1) Library subroutines and (2) Arithmetic and Input/Output subroutines. LmRARY SUBROUTINES Sixteen relocatable subroutines are included in 1620 (see Table 11). FORTRAN II-D The Library subroutines are loaded only when they are used in a program, "link" program, or subprogram, i.e., they are loaded before any execution of the calling program takes place but they are loaded only if required by the calling program. During compilation of a program, a 30-digit field of zeros is created (in the header record). When a subroutine is called for by a source statement or "required for use," a 1 is inserted in the proper location of the subroutine indicator field. The position in the field corresponds directly to the subroutine number given in Table 11. "Required for use" means that even though the user has not directly called a specific subroutine it may be required by the system. For example, the LOGF and EXPF subroutines are used to compute the values of floating-point roots and powers in arithmetic statements. They are loaded, if required, before execution of the program that requires them. Likewise, the Subscripting routines (library numbers 3 and 4), and the disk routines (library numbers 5-11), though never directly called, will be loaded if required. Sections of library routines 5-11 are loaded to disk storage Cylinder 1 (relative to the start of the disk work area) and the specific section required is loaded from the disk to core storage only when it is needed. All reading and writing of even arrays (f and k even) will be done without loading additional instructions from disk storage. The FORTRAN statements FIND, RECORD, and FETCH are processed by relocatable subroutines numbered 5 through 11. These routines are loaded into -core storage only if the disk FORTRAN statements are utilized in the object program. Different routines may be used to RECORD (or FETCH) an array. The routines that will write out or read in an entire array with one disk instruction will be used if both the fixed word length and the floating word length are even (not necessarily equal). If either of these variables was defined as odd in length, the array will be split into records that are the same length as those used when reading or writing lists of variables. The maximum speed in reading and writing of data from and to the disk is attained with even values for f and k (for example: 8 and 4). FORTRAN II-V 123 Table 11. FORTRAN ll-D Library Subroutines Storage Requirements TYPE OF FUNCTION SYMBOLIC NAME SUBROUTINE NUMBER DIM ENTRY NUMBERS VAR. TRANSFER ADDRESS FIXED VARIABLE WORD LENGTH (f = 8) FIXED WORD LENGTH (f = 8) Logarithm (natural) LOGF 1 10 170 02248 814 650 Exponential EXPF 2 11 171 02253 978 662 Subscripting (2 dimensions) 3 12 172 02258 Subscripting (3 dimensions) ENTSC2 ENTSC3 4 13 173 02263 Routine to load or unload disk buffer (fixed) ENTSDX 5 14 174 02268 FIND ENTFID 6 15 175 02273 RECORD ENTREC 7 16 176 02278 FETCH ENTFET 8 17 177 02283 Routine to load or unload disk buffer ENTSWD 9 18 178 02288 ~ 474 474 , ) 1530 1530 } 1154 742 Routine to write or read arrays ENTARR 10 19 179 02293 Routine to complete FETCH or RECORD ENTCPT 11 20 180 02298 Cosine COSF 12 21 181 02303 Sine SINF 13 22 182 02308 Arctangent ATANF 14 23 183 02313 SQRTF 15 24 184 02318 938 470 518 Square Root Absolute Value ABSF 16 25 185 02323 58 58 The FIND subroutine is used to position the access arm in the disk storage drive in advance of a FETCH or RECORD. It may be necessary for the FORTRAN system to change the position of the arm after a FIND operation has been initiated. If this is the case, the same location for the arm as specified in the FIND statement will be sought again after the FORTRAN system operation is complete. This automatic repositioning to the FIND cylinder will occur after every arm disturbance until the next FETCH or RECORD statement has been executed. The FORTRAN statements that use two or three dimensions of subscripting are handled by the subroutines numbered 3 and 4 (this is actually one routine with two entry points). Two forms of the supplied library routines are included with FORTRAN II-D. Both forms make use of the Automatic Floating Point Operations feature, and both forms are stored to disk storage when the Monitor II System is initially loaded. One set requires that the value of f be equal to 8, and is termed the fixed word length set. The other set is used when the value of f is not equal to 8, and this 124 ) I 376 form is termed the variable word length set. The value of k may range from 4 to 10 with either set. The operation of the fixed word length routines is faster and in most cases requires fewer positions of storage (see Table 11). The only way to make the selection of the fixed word length or the variable word length library sets is through the value assigned to f. If f equals 8, the FORTRAN loader automatically selects the fixed word length set; likewise, if f is not equal to 8, the variable word length set is selected. The user may add up to 14 subroutines to either set of the FORTRAN library. The procedures for adding subroutines and information for writing subroutines is given under ADDING SUBROUTINES TO THE FORTRAN LIBRARY. ARITHMETIC AND INPur/OUfPUT ROUTINES The arithmetic and input/output subroutines, including constants and working areas, are basic routines needed for proper execution of the object program. They are loaded without being specifically called for by the object program. Besides performing the fundamental tasks of adding, subtracting, etc., these routines also perform some diagnostic testing on the data being manipulated. Two sets of the arithmetic and input/output subroutines are provided, and - just as with the library subroutines - one set is a fixed word length set and the other is a variable word length set. The FORTRAN loader automatically selects the fixed or variable word length set, depending on the value of f. When the value of t is 8, the fixed word length set is selected; when the value of f is not 8, the variable word length set is selected. Both the fixed word length set and the variable word length set are supplied in two forms. One form 'of each set is sectionalized to create groups of the arithmetic and input! output routines. Each group contains several routines and is loaded to core storage only when required by the program being executed. The routines overlay one another which provides a substantial savings in core storage area. The second form of each set provides that all routines be in core storage at one time. This form requires more core storage, naturally, but allows for faster operation of the program as there is no time lost in reading a routine in that is not already present in core storage. The routines to be read from-disk-when-required are placed in the first cylinder of the disk work area just prior to beginning execution of a program that will utilize them. The first cylinder of the disk work area is cylinder zero unless the user redefines the working cylinder. (See DEFINE PARAMETERS ROUTINE in the Disk Utility Program section.) When the Monitor II System is delivered, the routines that read-in-when-required are designated as standard (since the value of f is deSignated as 8, it is the fixed word length set). These standards may be changed through the use of the DUP DFINE control card. The selection of the in-core or the read-in-as-required form can be made when a program is called for execution by placing the proper digit in the XEQS control statement (column 28). The digits that may be placed in this column are: 1 or 3 - read-in-as-required 2 or 4 - in-core The following core storage addresses are the nrst positions available for use by FORTRAN object programs, depending upon the set and form selected. Fixed Word Length In-core Fixed Word Length Read-in-as-required Variable Word Length In-core Variable Word Length Read-in-as-required - 11200 - 07500 -13000 - 07500 The arithmetic and input/output subroutines provided are listed in Table 12. The absolute addresses can be found by referring to their symbolic names in the program listing. Symbol Table Listing If Program Switch 1 is in the ON position during the FORTRAN compilation, the storage addresses of the symbol table will be listed in the follOwing order and form. 1. Floating-point constants XXXXX MMMMMMMMCC Fixed-point constants Xxxxx FFFFF where Xxxxx is the low-order address of the constant. Table 12. FORTRAN Arithmetic and Input/Output Subroutines Subroutine Symbolic Name Operation Floating Point Arithmetic Reverse Subtract Reverse Divide Set FAC to zero FSBR FDVR ZERFAC A - FAC FAC A/ FAC -FAC 0 • FAC FXSR FXM FXD FXDR 1- FAC ~ FAC FAC x I ......... FAC FAC / I ......... FAC 1/ FAC ......... FAC RSGN FIX FLOAT - FAC --FAC FIX (FAC) ~FAC FLOAT (FAC) ~FAC FIXI FAXI FAXB FAC FAC FAC Fixed Point Arithmetic Reverse Subtract Multiply Divide Reverse Divide Common Subroutines Reverse Sign of FAC Fix a Floating Point Number Float a Fixed Point Number Exponentiation Fixed Point J ** I Floating Point A ** (il) Floating Point A ** (iB) ** 1 --FAC ** (iI) ~FAC ** (t B) ~ FAC Input/Output Any digit higher than 4 will result in an error message of: ERROR L8 After this message the FORTRAN loader selects the system standard form and continues operation. Read Card Read Tape Read Typewriter Write Card Write Tape Write Typewriter RACD RAPT RATY WACO WAPT WATY FAC - simulated accumulator A & B - floating point variables I & J - fixed point variables - - - store in FORTRAN II-D 125 MMMMMMMMCC is a floating-point constant. FFFFF is a fixed-point constant. 2. Simple variable Dimensioned variables XXXXX NAME XXXXX NAME YYYYY where XXXXX for simple variables is the address at object time where the value for NAME will be stored. XxxXX for dimensioned variable is the address at object time of the first element in the array, NAME. yYyyY is the address of the last element in the array, NAME. If NAME>\) is typed, this indicates a dummy parameter within an arithmetic statement function. 3. Called subprograms XXXXX NAME where XXXXX is the location at which the starting address of the subprogram will be stored. 4. Statement numbers XXXXX SSSS where XXXXX is the address of the first instruction generated for the statement numbered SSSS. The address of the first generated instruction for each statement is typed with Program switches 1 and 4 in the ON position. If the statement number pertains to a FORMAT statement, the location of XXXXX will be the actual address of the FORMAT specification. ability to call subprograms and subroutines. Subprograms, defined with a FUNCTION or SUBROUTINE subprogram statement at compilation time, can be placed into two groups (which have nothing to do with the way they were defined at compilation). For execution, subprograms are either: 1. Loaded into core along with the main program (or link program) that calls them, or, 2. They may be left on disk storage and brought into core storage only when called. The user must determine which subprograms are to be loaded into core storage prior to execution and which are to be loaded when called for immediate execution. The subprograms that are to be loaded when called are defined by using a LOCAL Control record. The subprograms that are named in the LOCAL record will be loaded to the work area of disk storage prior to execution of the main program or link program that calls them. A subprogram requires no changes in order to be a LOCAL subprogram. A subprogram written for use in core with the main program can be used instead as a LOCAL subprogram merely by naming it in a LOCAL control record. However, a LOCAL subprogram cannot call an "in core" subprogram that is not called from either (1) the main program, or, (2) another "in core" subprogram, and a LOCAL subprogram can never call another LOCAL subprogram. The following illustration shows the layout of core storage during execution of a typical FORTRAN program. Symbol Table Listing for Subprograms When compiling a subprogram, the dummy arguments are listed after statement numbers, as follows: Multiply and Add Tables Supervisor Routines 02218 XXXXX NAME where XXXXX is the location at which the actual address of the variable in the mainline program, corresponding to the argument, NAME, will be stored upon entering the subprogram. This same form is also used for simple and dimensioned variables. The addresses listed are not the actual addresses at object time. Since programs are relocated upon loading, the listed addresses have to be adjusted relative to the starting location of the program or subprogram. Object Program Execution A 1620 FORTRAN II-D program may consist of three parts: a main program, a group of subprograms, and the library subroutines utilized by the main program and subprograms. The main program exercises control over the entire operation being performed. In addition to the normal execution of instructions, it has the 126 Arithmetic and I/O Routines 07500 or 11200 or 13000 Mainline Program In-Core Subprograms Library Subroutines Routine linkage Area and Loader Routine LOCAL Subprogram Read-in Area COMMON Converting FORTRAN Obiect Programs to Core Image ~DREPL Col FORTRAN Qbject prQgrams which are stQred Qn ,disk are in System Output fQrmat. When called fQr executiQn, these prQgrams must first be cQnverted to' CQre image fQrmat befQre they can be executed. In cases where the main program and/or the in-cQre subprograms are very long, the CQnversiQn time might becQme excessive. To eliminate this CQnversiQn each time a prO' gram is executed, the user can convert main prO' grams and in-cQre subprQgrams to' core image fQrmat and permanently stQre them Qn disk in that form. The means Qf cQnversiQn is the Replace PrQgrams rQutine, a disk utility functiQn described earlier in this manual. A prQcedure fQr cQnverting to' CQre image format fQIIQws: l. Clear CQre stQrage to' zerO's. 2. LQad the SupervisQr prQgram to' core stQrage. 3. Read in the fQIIQwing sequence Qf cards: =F =F JOB =F=F DUP NAME 7 DIM1 13 DIM2 17 CORE 39 D M F 4950 60 CQlumns CQde wQrd °DREPL. 1-6 7-12 Alpha name Qf prQgram. 13-16 DIM entry number of new prQgram. 17-20 DIM entry number Qf program to' be replaced. This will be the same as the number punched in Column 13-16. 39-43 Fixed CQre stQrage address where prO' gram will be loaded when called fQr execution. 49 Input unit (D for disk). 50 M denotes CQnversiQn frQm System Output fQrmat to' core image fQrmat. 60 Any non-blank character. NOTE: This procedure must be follQwed in its entirety each time the DREPL function is used with FORTRAN programs. 126.1 LOCAL Control Record Subprograms that are to be loaded when needed are defined at load time by a LOCAL Control record. The format of the LOCAL Control record is as follows: 0 LOCAL Columns 1-6 7-80 Main program name, comma, Subprogram name, comma, Subprogram name, comma, etc. The main program may be identified in either of two ways. If it has a name in the system Equivalence table, that name may be used. If no name is in the Equivalence table to identify the main program, the name may be omitted. In this event, the comma normally following the program name must be retained. Blanks may not be included between names and commas. The commas must be placed between subprogram names. When more than one card or tape record is needed to identify all LOCAL subprograms, a comma must be placed following the last name on each record that is followed by another LOCAL record. The name of the main program is omitted from all continued LOCAL records, but they must contain the asterisk and code word LOCAL. Up to 100 subprograms (50 maximum, in core; 50 maximum, LOCAL) may be called by a main program or link. LOCAL records to be entered into the system must follow the FORTRAN source program when compiling and executing a program (see Figure 16). The number of LOCAL records to be read must be placed in columns 9-10 of the FORX record or columns 29-30 of the XEQS Control record. When typing the LOCAL record, no more than 79 columns may be used. When the LOCAL record is in paper tape, only 79 positions may be used and the positions used must be followed by a blank. Library subroutines to be loaded at load time are selected by interrogation of the subroutine indicators in the header record that precedes each program, link, and subprogram. Each indicator, one for each subroutine, must be a numerical 1 if the corresponding subroutine is to be loaded to core storage at load time. All subroutines are loaded if called in the main program or if called in subprograms that are loaded to core storage. A LOCAL subprogram must not call for a subroutine that was not called for by the main program or a subprogram loaded to core storage (see Table 13). EXAMPLES o o o o LOCAL LOCAL LOCAL LOCAL MLNAME, SUBl, SUB2, SUB3, SUB4 LNKNAM, SUB2, SUB6 LNK2, SUB2, SUB6, SUB7 OAT A Control Record The purpose of the DATA control record is to indicate to the FORTRAN loader that all segments of the program have been loaded prior to beginning execution. Monitor Control Record Figure 16. Positioning of LOCAL and DATA Control Records in FORTRAN Stacked Input FORTRAN II-D 127 The rules for inclusion of the DATA control record are: l. If the mainline or link program, or any of its associated subprograms are loaded from the paper tape reader or card reader, a DATA control record must be included in the stacked input whether or not any data is to be read by the program. 2. If the mainline or link program, and its associat- ed subprograms are all loaded from disk a DATA control record must not be included in the stacked input. The format for the DATA Control record is as follows: Card °DATA Columns 1-5 6-80 must be blank Paper Tape ERROR CODE Ll MEAt':IING, REASON RESULT Inval id LOCAL control record Word lOCAL misspelled, misplaced, or no asteris,k Typeout JOB ABANDONED; branch to MONCAl* l2 Inval id name in lOCAL record Not formed according to FORTRAN rules Typeout JOB ABANDONED; branch to MONCAl* l3 Multiple name in LOCAL record Typeout JOB ABANSame subprogram name appears DONED; branch to more than once for some proMONCAl* gram or link, or program or link name appears more than once l4 lOCAL subprogram table full Greater than 50 lOCAL subprograms per link not allowed Mainline table {link names} full More than 50 links calling lOCALS not allowed Typeout JOB ABANDONED; branch to MONCAl* L5 Invalid header record Does not conform to standard FORTRAN header record Branch to MONCAl* l6 Unequal F or K Subprogram F and/or K does not compare with main program For K Subprogram not loaded l7 New subroutine called from lOCAl subprogram lOCAL subprogram cannot call new subroutine Subprogram loaded; subroutine not loaded l8 Invalid arithmetic and input/output Set defined as system subroutine set standard is loaded, Not defined as 1, 2, 3, or 4 depending on group loaded 19 In-core subprosram table full Greater than 50 subprograms not allowed Igl)ore above 50th subprogram LlO New subprogram called from LOCAl subprogram lOCAL subprogram cannot call new subprogram LOCAL subprogram loaded; new subprogram not loaded Lll lOCAL subprogram disk storage area overlaps reserved disk work area LOCAL subprogram is not loaded 128 FORTRAN Loader Errors When the DATA record is recognized by the loading routine, a check is made to detennine which subpro.,. grams have not yet been loaded. If there are any such subprograms they are listed on the console typewriter, the machine haIts; and the operator must then see that these subprograms are made available for the loading routine to load before depressing the Start key. If all subprograms have been loaded, any remaining data in the input unit will be skipped until the DATA record is read. Console Program Switch Settings Switch 1. When switch 1 is on, a list of the programs being loaded is typed on the console typewriter. The format of the list is: XXXXXX NNNNN LLLLL LOADED *MONCAl is the symbolic name for Monitor Control Record Analyzer routine, Table 13. t-- 75 zeros-I °DAT AOOOOOOOOOOOOOOOOOOOO® where xxxxx is the name of the program or subprogram or the number of the subroutine, NNNNN is the beginning core storage address, and LLLLL is the length of the program. Switch 4. When switch 4 is on, and trace instructions have been compiled into the object program, the trace output is listed on the console typewriter. The trace output contains the value of the left-hand side of each executed arithmetic statement and/ot', the value of the expression in an IF statement. If the typewriter input is called for by the object program the operator must: 1. Type in the required data. 2. Tum Console Program Switch 4 to the OFF position. 3. Depress the Release key. 4. Depress the Single Instruction key 7 times. 5. Tum Console Program Switch 4 to the' ON position. 6. Depress the Start key. If the operator makes a mistake when typing the input data it is necessary only to depress the R-S key and retype the required data. Operating Procedure To execute a previously compiled FORTRAN program, the following items must be placed in the input unit. 1. JOB Control record. 2. XEQS Control record. 3. LOCAL Control records (if required). 4. Main program (if not previously loaded to disk storage) . 5. Subprograms (if required and not previously loaded to disk storage). 6. DATA Control record. Note: This must be supplied even if data has been loaded to disk storage. 7. Input data (if not previously loaded to disk storage). 8. Job End Control record. When called for execution, the main program is converted from relocatable format and loaded into core storage (see LOADER ROUTINE in Supervisor section of this manual for a description of operation and errors). Following the loading of the main program the "in-core" subprograms are loaded. If any subprograms are not available the message NO ENTRY FOR SUBROUTINE nn JOB ABANDONED This would indicate that the entry was either deliberately deleted from the map, never entered into the map, or otherwise destroyed. After the message is typed, the FORTRAN Loader branches to MONCAL (symbolic name for the Monitor Control Record Analyzer routine ). OVERLAP Errors During the loading of the main program, subprograms, subroutines, or the read-in routine or the program linkage areas, the available core storage area may be exceeded. If a main program or link program would exceed the available area the following message is typed and control is transferred to the Supervisor program (see MONITOR CONTROL RECORD ANALYZER ROUTINE). NAME XxXXX OVERLAP JOB ABANDONED NAME is the name of the program or link program, xxxxx is the number of core storage positions required by that program. If the program has no asSigned name, MAIN is printed for NAME. If a subprogram would exceed the available area the NAME XXXXX OVERLAP message is typed and the named program is not loaded. Subprograms following the "overlap subprogram" are loaded if possible. If a subroutine would overlap the available core storage area the message LOAD SUBNAM NN XXXXX OVERLAP is typed, where SUBNAM is the name of the subprogram that must be loaded in the input unit. When all "in-core" subprograms are loaded, the library 'subroutines needed by the main program and "in-core" subprograms are loaded into core storage.Following the loading of the subroutines, if any subprograms have been defined as LOCAL subprograms, an "object-time read-in routine" is loaded and follOwing it a linkage area is reserved for each LOCAL subprogram. Then, the first LOCAL subprogram is loaded into core storage. The address to which this subprogram is loaded will be the input address for all LOCAL subprograms. The first LOCAL subprogram is then moved to the top end of the work area of disk storage and the next LOCAL subprogram is loaded to core storage. LOCAL subprograms may be loaded to the system by way of the input unit, however they must be stacked follOwing any "in-core" subprograms to be loaded. If a DIM entry for a particular subroutine cannot be found in the map, the following message is typed out. is typed, where NN is the library subroutine number and xxxxx is the length of the subroutine. The subroutine is not loaded. If the LOCAL subprogram read-in routine or program linkage areas exceed the available core storage areas, the message FLIPER XXXXX OVERLAP is typed. FLIPER is the name assigned to represent the read-in routine and xxxxx is the length of the routine and linkage area required. The read-in routine and the linkage area are not loaded. After all possible programs are loaded, and there is any error - overlap or others - the message EXECUTION INHIBITED is typed and a branch to MONCAL is executed. (MONCAL is the symbolic name for the entry point to the Monitor Control Record Analyzer routine. ) During loading of a FORTRAN program, the errors listed in Table 13 may appear. FORTRAN II-D 129 Subroutine Error Checks A number of error checks have been built into the library subroutines. The basic. philosophy .in the dis-· position of an error is to type an error message, set the result of the operation to the most . reasonable value under the circumstances, and.· continue the program (note error D1 exception, desciibedbelow). Subroutine error codes, the nature of. the error, and the value of the result in FAC (symbolic name of the accumulator in which arithmetic operations are. per.;. formed) are listed in Table 14. The error printout is in the form ERXX where xx is the error code in the table. Table 14. FORTRAN Subroutine Error Codes ERROR CODE 01 Disk I/O used without a DEFINE DISK statement. 02 Logical record specified exceeds N2. No group mark found at end of an array that was read from disk. 03 130 ERROR RESULT IN FAC El Zero division in FXD or FXDR 999 ..... E2 Overflow in FIX 99 •••••• Fl Loss of all significance in FSIN or FCOS 000 .....099 F2 Zero argument in FLN 99 ...... 999 F3 Negative argument in FLN F4 Overflow in FEXP In/x/ 99 ...... 999 F5 Underflow in FEXP F6 Negative argument in FAXB Negative argument in FSQR F7 Input data in incorrect form or outside the allowable range F8 Output data outside the allowable range F9 Input or output record longer than 80 or 87 characters (wh ichever is applicable to the I/O medium being used) Gl Zero to minus power in FIXI 999 ••••• G2 Fixed-point number to negative power in FIXI 000 ..... G3 Overflow in FIXI 999 ..... G4 Floating-point zero to negative power in FAXI 99 ...... 999 G5 Overflow in FAXI 99 ...... 999 G6 Underflow in FAXI 00 ...... 099 G7 Zero to negative power in FAXB 99 ...... 999 00 ...... 099 B /A/ SQR/x/ If errqr D1 occurs, the machine halts, the typewriter carriage returns, and the operator must enter the DEFINE DISK statement parameters by means of the typeWriter in the form of NNXXXXX where NN corresponds to N 1, .and xxxxx corresponds to N2 as described for the DEFINE DISK statement. Error D1 will be indicated until the values of N1 and N2 are within the correct range. The FORTRAN loader further checks the value of N2 (number of data records as specified in the DEFINE DISK statement) to see if the N2 disk work area would be overlaid by operation of the FORTRAN loader. The FORTRAN loader uses the disk working area (starting from the high-order positions) for tables, COMMON save area, and LOCAL subprograms. Also. the first ( low-order) 218 sectors of the disk work area are reserved to store the short form groups of the arithmetic and input/output subroutines. If N2 times Record length plus 218 is greater than the lowest disk address used by the FORTRAN loader, N2 will be redefined as X-218 Record Length where X is the lowest disk address used by the FORloader. The user is notified of this action by the following message: TRAN MAX N2 ALLOWABLE Xxxxx where Xxxxx is the maximum allowable value for N2 Loading and execution of the programs continues. If Error D2 occurs, the specified record will not be written (or read), and the index value (I) may be incorrect. If Error F7 occurs, the field which is incorrect is replaced by zeros, and processing continues. The exponent portion of an E-type input data field must be right-justified in that field and may contain only one sign. Deviations from this rule are not checked. For exponents greater than 99 (absolute value), the value is reduced modulo 100. If Error F8 occurs, the incorrect field is set to blanks in the output record, and an additional record is typed. This record contains the incorrect field in the form E (f I (k + 6). f + 1) for floating-point numbers, and for fixed-point numbers. This additional record is also produced on the output unit (card punch, tape punch, or typewriter) called for by the source statement. If Error F9 occurs, the incorrect field is ignored and processing continues. However, a remote possibility exists that part of the subroutines and the object program may have been destroyed by the abnormal record. In this case, the program may inexplicably halt at some later point in its execution. Object Program Subroutine Linkage The linkage generated by the is in the form FORTRAN II-D compiler BTM SUBR, A where SUBR is the name of the entry point for the subroutine and A is the address of the operand. For the relocatable library subroutines, an indirect address is used in the linkage. The actual address of the library subroutine entrance is stored at locations 02244-02248, 02249-02253, etc. The FORTRAN object program linkage for entrance to the first library subroutine will appear as, BTM-02248, A Adding Subroutines to the fORTRAN library The user may write library subroutines in SPS language and have them placed in the FORTRAN library. The subroutine must be assembled using the SPS II-D program, and may be loaded to disk storage at assembly time or at a later time -using the Disk Utility program. Special DIM entry numbers are reserved exclusively for the FORTRAN library subroutines. When the Monitor II System is delivered, the variable word length library set uses DIM entry numbers 10 through 25. Numbers 26 through 39 are available for user-written routines. The fixed word length library set uses DIM entry numbers 170 through 185, with numbers 186 through 199 available for user-written routines. If desired, the last 5 of the 16 subroutines in each set may be replaced with user-written routines. When a subroutine has multiple-entry points, a DIM entry is required for each entry point. No subroutine may have more than 9 entry points. The symbolic name of each entry point must be specified in a DSA statement at the beginning of the source program. Also, the number ot entry points must be specified in a special statement. The user must provide a 5-position area immediately preceding each entry point. This space will be used to contain the address of the parameter when the subroutine is entered. In installations where both the fixed and variable word length library subroutine sets are used, any additional subroutine must be added to both sets. The procedure for accomplishing this is described under DEND LOADING THE LffiRARY SUBROUTINE. When selecting the proper routine (before execution) the FORTRAN program decodes the name and finds the proper DIM number for the variable word length subroutine. If the fixed length routines are called for, a constant 160 is added to the DIM number. There must, therefore, be correspondence in numbers, names, and the number of entry points between the fixed and variable word length subroutines to be added. If only the variable word length set or only the fixed word length set is to be used, it is not necessary to add additional subroutines to both sets. (See LOADING THE LIBRARY SUBROUTINE for examples.) Working Areas In writing the subroutine, the programmer may first move the argument into one of the working areas such as FAC, BETA, or SAVE. In arithmetic subroutines, the exponent of a floating point result is usually stored in SAVE before being moved to FAC. A careful study of the arithmetic subroutines may reveal that the relocatable subroutine to be added can share the normalization, sign detennination, overflow, underflow, and error typeout sections. The value calculated by the subroutine must be left in FAC. Even if no value is calculated, it is advisable to place a constant in FAC. VVhen programming a subroutine with variable length floating-pOint numbers, it may be necessary to use certain addresses and constants available in the arithmetic and input/output subroutines. A reference to the listings of these subroutines will yield the information on these addresses and constants. As the mode of operation (fixed or floating point) is determined by the argument of the subroutine, _the FORTRAN I1-D Processor does not distinguish fixed-point from floating-point subroutines. It is up to the user to have a thorough knowledge of the added subroutines and to use them correctly. Loading the Library Subroutine Additional subroutines can be added to the FORTRAN library directly at the time of assembly, or after assembly. FORTRAN II-D 131 The following examples illustrate adding a subroutine with two entry points (at assembly time). EXAMPLE 1: HJOB oft SPS WRITTEN LIBR SUER FOR FIXED SET ~'i'SPS *LIBR *ASSEMBLE RELOCATABLE *STORE RELOADABLE *ID NUMBER 0186 START DSA ONEENT, DORG START-4 FAC DS ,2492 DC 5,0, , ONEENT NOP TFM FAC, 0, , BB2 DC 5,0 TWOENT NOP TFM FAC, 0 BB2 DEND 2 TWOENT (See Explanation Following Example 2) The above source statements make use of DIM entries 186 and 187; note that no names are actually assigned. In the following example, which adds the same routines to the variable word length set,· the name ONEENT is added at assembly time; the second entry point (named TWOENT) is added by the Disk Utility DFLm operation. (See ADDITIONAL ENTRIES AND SYNONYMS.) EXAMPLE 2: HJOB H SPS WRITTEN SUBR FOR VARIABLE SET 'I''i'SPS *LIBR *NAME ONEENT *ASSEMllLE RELOCATABLE *STORE RELOADABLE *ID NUMBER 0026 START DSA ONEENT, DORG START-4 FAC DS ,2492 DC 5,0, , ONEENT NOP TFM FAC, 0" BB2 DC 5,0 TWOENT NOP TFM FAC, 0 BB2 DEND 2 TWOENT (See Explanation Following This Example) HDUP *DFLIBTWOENT 27 An explanation of each of the source program statements follows. DSA 132 The name of each entry point must be listed in a DSA statement at the beginning of the source program. It is labeled so it can be referenced by the DORG statement. DORC This eliminates the core requirements of the DSA statement. DS Allows for symbolic reference to the Floating Accumul:;ttor area. DC Provides space for BTM address when the subroutine is entered during execution. A 5-position area must precede each entry point. NOP The NOP will be replaced by the userwritten statements of the subroutine to be added. TFM This illustrates the recommended restoring of the Floating Accumulator area. If a value is to be returned, a TF or TFL would be used in place of the TFM. BB2 Last executable statement. BB can also be used. DEND Last source statement as with normal SPS assembly except for the special number in the operand field which denotes the number of entry points. The procedure for assembling and adding a subroutine to the variable word length set only is as follows. HJOB HSPS *LIBR *ASSEMBLE RELOCATABLE *STORE RELOADABLE *ID NUMBER 0026 *NAME STAR T (Subroutine instructions including those required as shown in Examples 1 and 2) DEND n If the subroutine contains more than one entry point, the name and DIM entry number for each entry must be provided in a DFLm control statement as described under ADDITIONAL ENTRIES AND SYNONYMS. The procedure for assembleing and adding a subroutine to the fixed word length set only is the same as that for the variable word length set, except that no NAME statement is included. (Also, the range of the DIM entry for the ID NUMBER statement is from 0186 to 0199.) All names of the entry points are added with DFLm statements using the corresponding variable set DIM entry numbers. For example; the ID NUMBER statement could specify DIM entry 0187 but the DFLm statement would specify (and name) DIM entry 0027. The Disk Utility program can be utilized to load the subroutine to the library sets, in which case, the NAME, STORE RELOADABLE, and ID NUMBER statements must be omitted, while an OUTPUT CARD or OUTPUT PAPER TAPE statement should be included. * DF II B , I Object Program Output from Assemb Iy * DLOAD Used to Define Additional Entry Point Names and Synonyms. ,*,:to DUP Monitor Control Record Figure 17. Monitor Control Record Adding Subroutines for FORTRAN Subroutine Library The following example illustrates the necessary information to be included in the DLOAD control record for a subroutine named HCOS to be added to the variable word length set. °DLOAD HCOS Col. Columns 0026 0101200002 C I .. ... ........ A 7 17 39 44 49 50 1-6 Code word °DLOAD. 7-12 Alpha name of program to be used in FORTRAN arithmetic statements. 17-20 DIM entry number. 39-43 The length of the subroutine. This number must be even. 44-48 The number of entry points. 49 Input unit (C for card, P for paper tape ). 50 Core image format. Other options, such as read-only protection, are available if they are desired. (See DLOAD CONTROL RECORD in the Disk Utility Program section of this manual.) Additional Entries and Synonyms A DFLIB Control record must be entered if the subroutine contains more than one entry point, or if one entry point is to be called by more than one name. The format of the DFLIB Control record follows. Columns 1-6 °DFLIB 7-12 User-assigned name, left-justified. 13 Not used (must be blank) 14-15 DIM entry number 16-80 Not used. The DIM entry number must be between 21 and 39 and must correspond sequentially with the entry point names of the source program DSA statement. For example; assume the following DSA statement of a subroutine to be added to the FORTRAN library. START If the ID DSA ONE, TWO, THREE NUMBER statement contained: 0026 the DFLIB Control cards must assign TWO as 27, and THREE as 28. 0188 the DFLIB Control cards must assign TWO as 29, and THREE as 30. As delivered, the system makes use of DIM entry numbers 10 through 25, and 170 through 185 for FORTRAN library subroutines. The last 5 of each set may be removed, if desired. If no subroutines are removed from the FORTRAN library sets, the available DIM entry numbers for additional library subroutines are 26 through 39, and 186 through 199. The DFLIB Control card can only use the DIM numbers of 26 through 39. Typical input sequences to assemble and load a subroutine are shown in Figure 17. fORTRAN Subprograms Written in SPS The FORTRAN user is able to create subprograms using SPS and having these subprograms available immediately for call by FORTRAN programs. To ac~omplish FORTRAN II-D 133 this he must follow the writing specifications outlined here. The Indicator Record Each subprogram to be called by a FORTRAN program must contain a header record to identify the routine and to provide other essential information. The sps instructions necessary to create this record are shown below. S DS DC DAC DVLC DSC DORG ,0+101 6, 987898, 5-S 6, NAMEbb, 7-S 22-S, 5, LENGTH, 2, ff, 2, kk, 5, Entry Address-6, 5, 0, 30, 17,0,0 S-I00 ° where LENGTH is the address of a =t=or the first digit of a subprogram name in the call list (see CALLING OTHER SUBPROGRAMS) . Calling Library Su~routines If the subprogram or function is to call FORTRAN library subroutines, the user must write out the DVLC operand that contains the 30 zeros in the indicator record example. The position that corresponds to the subroutine must contain a one instead of a zero. The correspondence between the positions in this field and the standard library subroutines are presented in Table 11 so that the user may select any subroutine in the library. To effect a transfer to any library subroutine from the sps written subprogram, the user must write the following instructions: BTM -SUBR, PARAM, where PARAM is the address of the parameter required by the subroutine and -SUBR is the address for the subroutine entry shown in Table 11. The subroutine entry address must be indirect. Calling Other Subprogrdms If the user wishes to call other subprograms from an written subprogram, he may do so. To do this the user must code: BTM NAMESP, 0+11 DSA A,B, ... ', Z for each transfer to another subprogram, and must include the name of the subprogram called. This is equivalent to the FORTRAN coding of: SPS CALL NAMESP (A, B, ... , Z) Each called subprogram must have a 5-digit BTMaddress-field reserved in the subprogram just prior to the entry point. Also, the names of the subprograms to be called must be placed (in double-digit form) 134 at the end of the calling subprogram along with the address of the reserved address field with the subprogram. These names and addresses must follow the last location of the subprogram. They can be coded as follows. DAC 6, NAMlbb, DVLC NILOC DAC 6, NAM2bb, DVLC N2LOC DC 2,0@ This coding will cause the two subprograms named NAMI and NAM2 to be called out and made available when the SPS routine that requires them is loaded. where NlLoc is the low-order address of the P field of the BTM instruction that calls this subprogram. For example; BTM XXXXX, NILOC---1 0+11 The record mark must follow the list of names in the next even location available. When no subprograms are called, the record mark must be placed in the next even location following the last statement. Writing FORTRAN Subprograms in SPS In addition to the header record described above, linkage to obtain the subprogram parameters must be included in the subprogram. If no parameters are needed, or if the subprogram knows the location of the parameters, the user writes: DC 5,0 SUBNAM AM SUBNAM-l,I,lO \ The subprogram B SUBNAM-I" DC 1,@ 6 If one parameter is needed, and this subprogram is never nested within any other function or subprogram, the user writes: DC SUBNAM AM TF AM ° 5, SUBNAM-l, 5, 10 INSUB, SUBNAM-I, 11 SUBNAM-l, 2 The subprogram B SUBNAM-I, , 6 DC 1,@ If several parameters are to· be moved to the subprogram, a loop may be utilized to conserve core storage. The parameters must be stored in the subprogram in consecutive order. An example of the coding to accomplish this for three parameters is shown below: INSUB SUB CF TF DSA DC DC TFM AM AM TF BNF CF TF TF AM BNR AM 0,0,0 1, @ 5,0 TF +6, INSUB-4 TF+6, 4,10 SUB-I, 5, 10 CF+II, SUB-I, II 0+36, CF+II CF+ll CF+ll, CF+l1,"'II INSUB-, CF + 11 TF+6, 1, 10 SUB+12, TF+6, 11 SUB-I, 2, 10 (1) B SUB-I, , 6 (2) 1, @ DC The instructions that constitute the body of the subprograms are placed between number 1 and 2 above, Instruction 1 must add "two" if the number of parameters is an odd number, or "one" if this number is even. The record mark must be in the first even location following the subprogram. The instruction numbered 2 (B SUB-I, ,6) returns control to the calling program. When writing subprograms in sps the user must place this instruction at every point that a return is required. The following example shows a sample subroutinetype subprogram written in SPS. ttJOB Writing FORTRAN FUNCTION Subprograms in SPS The user must add one instruction to the set required for SUBROUTINE subprograms written in SPS in order to write FORTRAN FUNCTION subprograms ( subroutines normally produced by FORTRAN statements preceded by a FUNCTION statement). This statement is TFL F AC, ANS. F AC is the simulated floating accumulator and ANS is the location where the result of the subroutine calculation is stored. Prior to a return to the main program, this instruction must be executed. The actual address of F AC is constant and is available in the FORTRAN I1-D listing. Disk Storage Location of the fORTRAN Compiler The FORTRAN compiler and operating system is an integrated part of the Monitor system. It is possible, however, to eliminate the programs that constitute the FORTRAN portion of the Monitor, and still utilize the remainder of the system. It is also possible to delete specific FORTRAN library subroutines and to utilize the remainder of the FORTRAN system. The procedure to follow in order to delete any program from the disk is described in the DUP section. The DIM entry numbers that may be specified for deletion are shown below. Disk DIM No. Location FORTRAN Compiler 136, 137, 153, Cylinder 79, 86, 156,203 87,88,89,90 t~PS *ASSEMBLERELOCATABLE *NAME REVABS *STORE RELOADABLE * SPS WRITTEN SUBPROGRAM WHICH REVERSES THE TWO ARGUMENTS *AND ABSOLUTES THE RESULT. NOTE CALL TO LIBR SUBR ABSF. *IF NO LIBR SUBS ARE CALLED, DVLC WOULD BE *DVLC 22-S, 5, LENGTH, 2, 8,2,4,5, ENTRY-6,5,0,30,0 S D S , *+101 DC 6,987898, 5-S DAC 6,REVABS,7-S DVLC 22-S, 5, LENGTH, 2, 8, 2, 4, 5, ENTRY-6, 5,0,15,0,1,1,14,0 DSC 17,0,0 DORG S-100 FAC DS ,2492 ABSF DB ,2323 TEMP DC 5,0 TEMP1 DC 10,0 TEMP2 DC 5,0 DC 5,0" SPACE FOR BTM PARAMETER ENTRY AM ENTRY-1.5.10.GET A,QDRESS OF 1s'r ARG TF TEMP, ENTRY-1,ll, BUFFER ADDR OF 1ST ARG AM ENTRY-1,5,lO,GET ADDR OF 2ND ARG TF TEMP2, ENTRY-1,ll, BUFFER ADDR OF 2NDARG TFL TEMPi, TEMP2,ll,SAVE ARGUMENT B TFL TEMP2, TEMP, 611, REPLACE B WITH A TFL TEMP, TEMP1, 6, REPLACE A WITH B BTM -ABSF, -TEMP" ABSOLUTE A TFL -TEMP, FAC" ABSF LEAVES VALUE IN FAC BTM -ABSF, -TEMP2" ABSOLUTE B TFL -TEMP2, FAC, ,ABSF LEAVES VALUE IN FAC AM ENTRY-1, 1,10, COMPUTE RETURN ADDRESS B ENTRY -1, ,6, RETURN LENGTH DC l,@"RECORD MARK IN EVEN LOCATION DEND FORTRAN Loader Subprogram 138, 147,149, 150,152,157 Cylinder 80, 84 Arithmetic and I/O 144, 145, 146, 200,201,202 Cylinder 78,79, 84,85 Library Subroutines 010-39, 170-199 Cylinder 81 FORTRAN FORTRAN If the FORTRAN system is deleted using the DUP routines, the portion of the disk which it occupies will become available for assignment of other user written programs. °When the system is delivered, 10 through 25 and 170 through 185 are in use. The symbolic names of the subroutines that may be deleted are COSF, SINF, ATAN, SQRTF, and ABSF. The other subroutines may be deleted only if the complete FORTRAN system is deleted. FORTRAN II-V 135 IBM 1620... 1443 Monitor II System A printer-oriented Monitor II System is available for 1620 Systems that are equipped with an IBM 1443 Printer. This system is an extension of the standard Monitor II System described in the preceding pages of this publication. Only the differences between the standard system and the printer-oriented system are described here. Specifications and operating procedures pertaining to the standard system are valid for the printer-oriented system if no specific mention is made of them in this section. General Description The 1620-1443 Monitor II System requires that an IBM printer be included in the 1620 system configuration. Of course, any other applicable ingut/output units, special features, etc., may also be attached to the system. The principle advantage of a printer-oriented system is that it provides a convenient and relatively fast means of obtaining listings of assembled or compiled programs, symbol tables, and any other data that might be desired. The component programs of the Monitor II System have been modified to make the best possible use of the printer. The console typewriter is used only for messages which must be acted upon immediately by the operator. The following paragraphs were written under the assumption that the reader has a practicable knowledge of the IBM 1443 Printer. Those without such knowledge should read the publication, IBM 1443 OnLine Printer for 1620/1710 Systems (Form A26-5730). Supervisor Program The I/O routine of the Supervisor Program has been modified to handle printer output for both sps and FORTRAN object programs. This was accomplished without changing entry points, linkages, or core storage requirements. The language used to gain access to the I/O routine is described in the respective sps and FORTRAN portions of this section. Printer Errors The only change is the addition of the Printer Check indicator (code 25) . NOTE: If a halt occurs at address 00467, either with or without a prior error message, the program can be resumed by pressing the Reset and Start keys. Programming Considerations 1. The Printer Busy indicator (code 35) is not tested by the I/O routine; therefore, if the test is desired, the user must perform it before executing a call to the printer. 2. Carriage control operations must be handled in the user's program. Disk Utility Program Two Disk Utility Program routines have been modified to use the printer: Disk-to-Output and Define Parameters. Disk-to-Output Routine The Disk-to-Output routine has been modified to use the printer for all output that was formerly typed out on the typewriter. To specify the printer as an output unit, the user must punch the letter L in column 17 of the DDUMP control card. The format of the printed output is 100 characters (1 sector) per line, with the exception of the Availability List and the Equivalence Table which retain the format used in the standard system. Define Parameters Routine The Define Parameters routine has been modified to allow FORTRAN II-D to be set for either 120 or 144 print position usage of the 1443 Printer during compilation and execution of th~ object program. The user may put a zero in column 59 of the DFINE control record for 120 print position operation, or a one for 144 position operation. This indicator is set in position 65 of the Communications Area on disk. (When the system is delivered, this indicator is set to zero.) If a printer error (indicator code 25) occurs, the SPS II-D message PRT ERR XXXXX is typed out, and control is returned to core address xxxxx in the calling program. In addition, the error is recorded in a printer error counter which has been added to the error counters used in the standard system. Whenever the error indicators or error counters are typed out, they will be in the following sequence: 0607161725363738 135.1 The SPS II-D assembly program has been modified to include twelve printer-oriented imperative mnemonics, two printer declarative mnemonics, and three new SPS control statements. Printer Imperative Mnemonics The imperative mnemonics included in the printeroriented Monitor II System are listed in Table 14.1. Table 14.1. Imperative Printer Mnemonics OPERANDS OPERATION CODE OPERATION MNEMONIC ACTUAL P ADDRESS Q ADDRESS Printer Dump PRD 35 Storage address from which leftmost (first) numerical character is wri tten None Required Printer Dump and Suppress Spacing PRDS 35 Same as Printer Dump None Required Print Numerically PRN 38 Same as Printer Dump None Requ ired Print Numerically and Suppress Spacing PRNS 38 Same as Printer Dump None Required Print Alphamerically PRA 39 Storage address from which leftmost Alphameric character is written (odd numbered address) t"-lone Required Print Alphamerically and Suppress Spacing PRAS 39 Same as Print Alphamerically None Required Skip Immediate SKIP 34 Not used Control Code Skip after Printing SKAP 34 Not used Control Code Space Immediate SPIM 34 Not used Control Code Space after Printing SPAP 34 Not used Control Code Branch on c;,bannel 9 BCH9 46 Address branched to if indicator 33 is on. This indicator is turned on by the detec tion of a hole in channel 9 of the carriage tape. None Required Branch on channel 12 BCOV 46 Address branched to if indicator 34 is on. This indicator is turned on by the detec tion of a hole in channel 12 of the carriage tape. None Requ ired Also shown are the actual OP codes generated, and the P and Q address functions. Table 14.2 shows the Qaddress modifiers that are generated in the object program. Some examples of printer statements are shown below: . lobel p...,at;o 1112 Operands & Remarks 15 " p"RN DATA 20 25 30 35 PI? I NT NW1.ERI CALL Y" .. " " " PRN,s DATA .•. PRI NT NIJ.HER/CALLY AN!) SUPPRESS SPAC/Jit SK.I.P 2 ,I/vA In these examples, the operand DATA represents the core storage address of the data to be printed; the numerical operands (2, 5, 3, 3) are either channel numbers for skip operations or the number of spaces for space operations. Table 14.3 shows the Q operands to be placed in the skip and space statements for all possible skip and space operations. SK.U. I HlllDI ATE T.O CAR,RIA/U tHAI/NfL 2 t; SKIP AFTER PRINTING T.O CA.R.RIA.G£ CHAN/iEL S. SPIM 3 .•. .M.OV£ I CARRIAG~, 3 SPACE S.,,11'1lfEDI A T,£ SPAP 3"."1.O.VE CA/VU A G£ ;}.' 'SPA eE'S AFT,ER Pf3,1 NIJ!1,G , Printer Declarative Statements Two printer declarative mnemonics are included in the printer-Oriented Monitor II System. Descriptions of the mnemonics follow, together with the two-digit code that is generated for the I/O constant. Note the two forms of each declarative. IBM 1620-1443 Monitor II System 135.2 Table 14.2.0P Codes and Q Modifiers Generated for Printer Mnemonics MNEMONIC OPERATION Table 14.3. Q Operands and Q Modifiers for Skip and Space Operations Q MODIFIERS OP CODE °8 Q 9 QIO Q ll ACTUAL Qla' Q II MODIFIERS IMMEDIATE AFTER PRINTI NG (DELAY) I 71 41 I 2 72 42 0 3 73 43 4 74 44 5 75 45 6 76 46 7 77 47 8 78 48 9 79 49 10 70 40 II 33 03 12 34 04 Number of Spaces I (SPIM or SPAP) 2 51 21 52 62 3 53 63 CONTROL CODES PRO Printer Dump 35 0 9 PROS Printer Dump and Suppress Spacing 35 0 9 PRN Print Numerically 38 0 9 PRNS Print Numerically and Suppress Spacing 38 0 9 I PRA Print Alphamerically 39 0 9 0 PRAS Print Alphamerically and Suppress Spacing 39 0 9 BCH9 Branch on Channel 9 46 3 3 BCOV Branch on Overflow 46 3 4 SKIP Skip Immediate 34 0 9 * SKAP Skip After Printing 34 0 9 ". SPIM Space Immediate 34 0 9 * SPAP Space After Printing 34 0 9 * 0 Not used I "--- *Modifiers which specify the particular skip or space operation (see Table 14.3). For a detailed description of these modifiers, refer to the publication entitled IBM 1443 On-line Printer for 1620/1710 Systems (Form A26-5730). Mnemonic DPRN DPRN" S DPRA DPRA, ,S Code Name I4 Define Printer Numerical 22 Define Printer Numerical Suppress Spacing 18 Define Printer Alphameric 2B Define Printer AlphamericSuppress Spacing These declarative operations generate an I/O constant in the object program which can be used by a PUT I/O macro-instruction to print data under control of the I/O routine. When used in the source program, they identify the output record area. Three operands are required for each statement. The first operand is used to specify the address where the I/O constant is to be loaded into core storage. This operand may be an absolute value or a symbolic name. If a symbolic name is used, the symbol must previously have been defined as an absolute value. If the operand is omitted, the processor will assign the address to which the constant will be loaded in core storage. The second operand, which may be symbolic or actual, is the address of the output record area. This address will be included in the I/O constant in the object program. The third operand may be the letter S or it 135.3 Skip to Chamel (SK IP or SKAP) may be omitted. If the letter S is present, the automatic single space after printing will be suppressed whenever the associated output record is printed. Remarks are permitted following the third operand. If a label is included with this statement, the storage address assigned to it will be that of the leftmost position of the generated I/O constant. The statements which follow show how a DPRA declarative statement is used with a PUT I/O macro-statement to print a 110-alphameric character record under control of the Supervisor I/O routine. In this example, the first two statements define the output area where the record is stored. . Lobel P-o"" " RECOR.~ 12 IS 1, Operanch & Remattl:s 2'0 30 :H DAS IIO •.• DEFINE IM,e. I .a.HI/ST lS ALPHAME~/C iIO 45 50 ouTPUT ~ECO~D HARK " .. FOLLOWtllT.H RECO/?J) PJ(,N,TIl, ID.P.RA REC(lIID •• IPENTIH PRINTER OVTP.IIT RECORD. PUT. PRN,TR.. AIR I T.E OV,1P,IJr REC AS SPEC I F I E.D. BY DP.RA. The declarative statements are usually written preceding or following the program; however, the macrostatement is entered in the program at the point where printing is to take place. of the ann after the last disk IORT operation). Printer Control Records In the printer-oriented Monitor II System, there are three sps control records that pertain to printer operations. The first two described here are modifications of sps control records used in the standard system; the third is a new control record. o LIST PRINTER - This record replaces the LIST TYPEWRITER record used in the standard system. It causes a listing to be printed by the printer during assembly. The format of the listing is as follows: page and line number, label, op code, operands, remarks, core location, and object instruction. °PRINT SYMBOL TABLE - This record replaces the TYPE SYMBOL TABLE record used in the standard system. It causes the symbol table to be printed by the printer following assembly. 00 XXXXXXXXXXX - This record is used to print a heading above listings and/or symbol table printouts. The data (signified by Xs above) that follows the two asterisks is printed at the top of the respective printouts. When this record is printed during assembly, it is shown as an Identification record with the code (ID) printed to the left of the two asterisks. This is also true of all Identification records used in the printer-oriented system; that is, the code (ID) is printed to the left of the record instead of to the right as in the standard system. Assembly Errors In addition to the SPS ll-D error codes and deSCriptions listed in a previous section of this manual, the following error conditions will cause an error typeout: 1. A space specification that is either 0 or greater than 3 2. A skip specification that is either 0 or greater than 12 Either of the above conditions will be indicated by the error code ER5. If no Error Stop control record is included in the assembly, the processor will cause an erroneous space or skip specification to be set to 1. Error messages will appear on the typewriter, not on the printer. fORTRAN II-D The FORTRAN ll-D compiler has been modified to take advantage of the printer while compiling object programs. Although the basic FORTRAN language remains unchanged, the specifications of two FORTRAN output statements have been modified, and five new control records have been added. Also, the printer has replaced the console typewriter as the basic printedoutput medium. Language IBM-Defined System Symbols In the printer-oriented system, the following system symbols are available to the user. Notice that the symbols are the same as those used in the standard system, but some of the equivalences are changed. Symbol 9RCYLO 9RCYLI 9RCYL2 9RCYL3 9CCYLO 9CCYLI 9CCYL2 9CCYL3 Equivalence Description 00513 These are the low-order positions of four 2-digit fields 00515 which contain the numbers 00517 of cylinders (00-99) where 00519 the disk access arm is repositioned after a disk operation in which a reposition has been requested. The four fields refer to drives 0, 1, 2, 3, respectively. 02124 02126 02128 02130 These are the low-order p0sitions of four 2-digit fields, similar to the previous four. However, these positions contain the cylinder numbers of the current access ann positions (the position PRINT - In the printer-oriented system, a PRINT statement is used to print data on the 1443 Printer. A TYPE statement is still used to type data on the console typewriter. FORMAT - A FORMAT statement, when used in conjunction with a PRINT statement, can provide for up to 120 characters for each printed line (or 144 characters if the system has been properly defined using the DUP Define Parameters routine). A FORMAT statement used with a TYPE statement is still limited to 87 characters for each typed line. CARRIAGE CONTROL Each time a line of print is called for, the print output routine will initiate a carriage space or skip operation. The type of operation that is initiated is determined by the first digit (carriage control digit) in the record of data to be printed. The carriage operations that result from the carriage control digit are as follows: blank - single space before printing - double space before printing 1-9 - immediate skip to channels 1-9 o The carriage control digit is not printed. Therefore, to ensure that all of the data specified by the PRINT IBM 1620-1443 Monitor II System 135.4 statement is printed out, the user should insert a 1H specification in the corresponding FORMAT statement wherever a new line of print is called for. to take advantage of the characteristics of the printer. The loader map also appears on the printer. Error Messages Example PRINT 2, A, B, J 2 FORMAT (lHO, FB.2, FB.3, IB) This specification will cause the printer to space twice before printing any data. Since the printer does not automatically space before printing, a single blank line will appear between the line being printed and the previous printed line. If more than one line of print is specified in the same FORMAT statement, the carriage control specification might appear as follows: 5 FORMA T (lHO, FB.2/1HO, E14.6) Control Records The five new control records that have been added to FORTRAN II-D for the printer-oriented Monitor system are: LIST PRINTER ARITHMETIC TRACE o IF TRACE o ALL STATEMENT MAP 00 XXXXXXXXX , 0 o The first four in the list are compile-time options previously available through console switch settings. The last record is a means of obtaining a heading at the top of each printed page. The format of these records is the same as described in the section entitled FORTRAN II-D CONTROL RECORDS. o LIST PRINTER - This record will cause program listings and symbol table output to be printed. o ARITHMETIC TRACE - This record will cause trace instructions to be compiled for arithmetic statements. o IF TRACE - This record win cause trace instructions to be compiled for the purpose of tracing the value of the expression generated in an IF statement. o ALL STATEMENT MAP - This record will cause the address of the first instruction generated for each statement to be printed. 00 XXXXXXXXX - This record will cause a heading to be printed at the top of each printed page. The Xs represent the heading. Up to 78 characters may be specified. Listings and Symbol Table Output Listings and symbol table output will appear on the printer instead of the console typewriter. The control records used to obtain these outputs are described above. The formats of the outputs have been ch8!nged 135.5 All error messages will appear on the printer; in addition, error message D 1 will also appear on the console typewriter. Instructions to the operator, for example, LOAD SUBNAM, will appear on the console typewriter. Subroutine error code F9 has been modified to include any printer records that exceed 120-characters, or 144-characters if using the 144-print position subroutines. Trace Routine If the trace routine is used, its output will appear on the printer. If the 144-print position subroutines are used, floating variables will appear in E-type format and fixed variables will appear in I-type format. Carriage Control Tape The carriage control tape, when used for assembling and compiling, should be punched in channel 1 to indicate the beginning of a page, and punched in channel 12 to indicate the end of a page. When the program senses the hole in channel 12, it automatically executes a skip to the channell hole, which indicates the beginning of the next page. Arithmetic and I/O Subroutines The arithmetic and I/O subroutine sets used in the 1620-1443 Monitor II System are longer than the sets used in the standard 1620 Monitor II System. This means that the starting addresses of FORTRAN object programs are higher in the printer-oriented systems, as shown below: Standard System U sing in-core variable length arithmetic and I/O subroutines. 13000 Using out-of-core variable length arithmetic and I/O subroutines. 07500 Using in-core fixed length arithmetic and I/O subroutines. 11200 Using out-of-core fixed length arithmetic and I/O subroutines. 07500 120 Print Position System " 144 Print Position System 13300 13500 07Boo OBooo 11500 11700 07Boo OBOOO The 120-print position subroutines are a standard part of the 1620-1443 Monitor II System. If the 144print position subroutines are desired, program number 1620-LM-052 (card) or 1620-LM-053 (tape) should be loaded to disk in place of the standard set. The 144-print position subroutines can be loaded over the standard 120-print position routines. Care should be taken at this point to define the system for 144- print positions as previously described. After loading the 144-print position subroutines, the System Table Editor program must be executed due to the differences in DIM Table entries between the 120- and 144print position subroutines. If the 120-print position subroutines are later re-Ioaded, System Tables must also be loaded. IBM 1620-1443 Monit01' II System: 135.6 Monitor II System Loader This program is used initially to load the Monitor n System from cards or paper tape into disk storage. Cards contain 75 columns of data followed by a 5position sequence number. Sequence numbers are not present with tape data. The system to be loaded,. in card or paper tape form, is comprised of several blocks of data, each with a unique deck number, a Heading Control record, and a 9's trailer record. With this arrangement it is possible to load each new block of data to a different area of disk storage as specified by the Heading Control records. For card input, the cards within a data block must be consecutively numbered in ascending sequential order. The combined input data, i.e., all data blocks, must be preceded by the Loader Program itself. This program is contained in approximately forty cards. If the sequence of the first four cards is inadvertently altered, the program may not operate correctly. The loader program is deck number 00, columns 30-31. All input .cards, with the exception of the first four cards of deck 00, are sequence checked by the loader. Data Columns 1-75 Data to be loaded to disk storage. 76-80 Sequence number. Trailer Columns 1-5 99999 6 =f= 7-8 00 Operating Procedures Switches The Disk, Parity, I/O and O'FLOW check switches should be in the PROGRAM position for either card or tape loading. For card or tape input, the program will halt after each trailer card if Program Switch 1 is off. If the switch is on, all data blocks are loaded without stopping the computer. Therefore, the user can stack input, if desired. Paper Tape Loading 1. Ready the paper tape reader with the Loader tape reel. Card formats 2. Enter 36 00000 00300 from the typewriter. Heading Control Columns 3. Depress the Release and Start keys. 1 Asterisk (0). 2-7 Code word, 9-14 Name of data block (program, table, etc.) to follow. LDCNTR. 16-21 Address of first sector to be loaded. 23-28 Address of last sector to be loaded. 30-32 136 Deck number. This number, combined with the two positions 79-80, constitutes the sequence number. Blanks are interpreted as zeros. Therefore, the number 55 and a blank in columns 30-32 are interpreted as sequence number 55000. The first card of the data block must then begin with the sequence number 55001 in columns 76-80. 4. Ready the tape reader with the Data tape reel. 5. Depress the 1620 Start key. 6. Return to step 4 to load successive Data tapes. NOTE: When loading with Switch 1 on, the Loader will continue to read more data after each data group has been loaded. Therefore, several such data input groups may be present on one input reel. Card Loading 1. Ready the card reader with deck number 00, Loader Program. The remaining decks may be stacked behind deck 00 as explained under SWITCHES. 2. Depress the 1622 Load key. Messages FOR CARD LOADER ONLY Message/Cause/Operator Action FOR BOTH PAPER TAPE AND CARD LOADERS Message/Cause/Operation Action AAAAAA LOADED FROM FFFFFF TO LLLLLL, where AAAAAA is the name of a data block, FFFFFF is the address of the first sector loaded, and LLLLLL is the address of the last sector loaded. This message will type following each successful deck loading. If Program Switch 1 is on, it is an indication to the operator to load the next deck. DISK RD WR ERROR, START TO RETRY. This message will type if a disk write error occurs that cannot be corrected by one automatic retry. Depressing the Start key will cause the write operation to be retried twice. If the error is not corrected by the retries, the message will again be typed. RD ER. This message will type if a paper tap~ or card reading error occurs. To correct the error, ready the reader with the corrected record and depress the Start key. (An error card will be located next to the last card in the stacker when a halt occurs for a card reading error.) CONTROL STATEMENT INVALID, RE-ENTER. This message will type if any of the following conditions are encountered in Heading Control record data. 1. A misspelled code word. 2. A record mark in column 6. 3. First sector to be loaded is greater than last sector to be loaded. The user must supply a corrected control record and depress the 1620 Start key. SEQ. This message will type and the program will halt if any of the cards in the loader program, with the exception of the first four cards, is out of sequence. To resume loading, (1) restore the cards to their correct sequence and place them in the card hopper, (2) depress the Start keys on both the card reader and 1620 console. NNNNN CARD SEQ ERROR, CORRECT AND START, where NNNNN is the sequence number of the first data card out of consecutive ascending sequence. After the message is typed, the program will halt. To restart the computer, (1) restore the sequence of data cards, starting with the card in error, (2) place the resequenced cards in the card read hopper, (3) depress the Start keys on both the card reader and 1620 console. NO TRAILER REC. CORRECT, RE-LOAD COMPLETE DECK WITH CNTR REC, AND BR TO 7404. This message will type and the program will halt if a 9's trailer record is missing following any data block. To restart the computer, the user should (1) restack the cards in the card reader so as to restart card reading with the Header card of the data block which had the missing trailer record. (2) Depress the Reset and Insert keys. (3) Enter 49 07404 from the typewriter. (4) Depress the Helease and Start keys. (5) Depress the card reader Start key. TRAILER CARD SEQ ERROR, CORRECT AND START. This message will be typed if the sequence number on the trailer card is incorrect. The procedure for restarting as the same is for any other card sequence error. Monitor System Loadn 137 Appendix A Table 15. Summary of SPS Declarative Operations NOTE: Except for the constants in DC, DSC, and DAC, all operands may be actual or symbolic. All symbolic length and address operands must be previously defined. All operands may use address adjustment. Remarks may follow operands except in DSA and DVLC statements. "Alpha Record Address" in the table refers to the leftmost position plus one of an alphameric field, whereas "Field Address" refers to the rightmost position of a field. The term" Numerical Record Address" refers to the leftmost position of a field. DECLARATIVE STATEMENT FORMAT OP OPERANDS LABEL CODE AMOUNT ADDED TO LOCATlON ASSIGNMENT COUNTER IF ADDRESS (A) IS BLANK VALUE STORED IN SYMBOL TABLE AS EQUIVALENT TO "SYMBOL" DATA FIELDS WHICH ARE LOAQED AS A PART OF THE OBJECT PROGRAM SYM OS L,A l (length). If l is blank, 0 is added. A address. If A is blanK, the field address from .the location assignment counter is stored. None. SYM DSS l,A l (length). If l is blank, A address. If A is blank, the numerical record address from the location assignment counter is stored. None. SYM DAS l,A 2 x L is added . If L is blank, A address must be odd. If A is blank, the alpha record address from the location assignment counter is stored. None. SYM DC l,C,A L is added. A address. If A is blank, the field address from the location assignment counter is stored. C, the (numeriCal) constant. SYM DSC L,C,A l is added. A address. If A is blank the numerical record address from the location assignment counter is stored. C, the (numerical) constant. SYM DVlC A, l,C, l,C, etc. L is added. First C address. C, C, etc., the (numericQI) constants . SYM DAC L,C,A 2 x l is added. A address must be odd. If A is blank, the alpha record address from the location assignment counter is stored. C, the (alphameric) constant. SYM DSA D,E,F,G, H, I, J, K, l,M 5 x (number of addresses) is added. Field address of the first address on list. A list of the actual addresses that correspond to D,E,F, etc. SYM DSB l,N,A A address. If A is blank, field length of each element times the number of elements is added. address of the first element is stored. None. SYM DNB L,A l is added. A address. If A is blank, the field address from the location assignment counter is stored. Number of blank characters that equal L. SYM DDA A, D,F ,S, M 14, length of a disk control field. (Same as DSC) • D,F,S,M. SYM DGM A 1 A address or location counter. =1= SYM DOT P, A Length of table. A address or locati on counter. Octal table of powers to P followed by 138 o is added. o is added. (Group Mark) . Table 16. Summary of SPS Arithmetic Instructions NOTE: Indirect Addressing and indexing are allowable with all P address operands listed below. An * to the left of the 0 operand indicates these features may be used with it. OPERATION OPERANDS OPERA TlON CODE MNEMONIC ACTUAL P ADDRESS o ADDRESS Add A 21 Storage address of units position of augend Add Immediate AM 11 Same as code Subtract S 22 Storage address of units position of minuend Subtract Immediate SM 12 Same as code Multiply M 23 Storage address of units position of multiplicand Multiply Immediate MM 13 Same as code Load Dividend LD 28 Storage address in product area to which units position of field (dividend) is to be transmitted Load Dividend LDM 18 Same as code Divide D 29 Storage address at which first subtraction of the divisor occurs Divide Immediate DM 19 Same as code Floating Add (special feature) FADD 01 Storage address of units position of exponent of augend *Storage address of units position of exponent of addend Floating Subtract (spec i a I feature) FSUB 02 Storage address of units position of exponent of minuend *Storage address of units position of exponent of subtrahend Floating Multiply (special feature) FMUL 03 Storage address of units position of exponent of multiplicand *Storage address of units position of exponent of multiplier Floating Divide (special feature) FDIV 09 Storage address of units position of exponent of dividend *Storage address of units position of exponent of divisor 21 22 23 28 29 *Storage address of units position of addend 011 of instruction is units position of addend *Storage address of units position of subtrahend 011 of instruction is units position of subtrahend *Storage address of units position of multiplier 011 of instruction is units position of multiplier *Storage address of units position of dividend 011 of instruction is units position of dividend *Storage address of units position of divisor 011 of instruction is units position of divisor Appendix 139 Table 17. Summary of SPS Internal Data Transmission Instructions NOTE: Indirect Addressing and indexing are allowable with all P address operands listed below. An * to the left of the Q address operand indicates these features may be used with it. OPERATION OPERATION CODES MNEMONIC ACTUAL OPERANDS P ADDRESS Q ADDRESS Transmit Digit TD 25 Storage address to which single digit is transmitted *Storage address of single digit to be transmitted Transmit Digit Immediate TDM IS Same as code 25 Q 11 of instruction is the single digit to be transmitted Transmit Field TF 26 Storage address to which units position of field is transmitted Transmit Field Immediate TFM 16 Same as code 26 *Storage address of units position of field to be transmitted Q II of instruction is the units position of the field to be transmitted Transmit Record TR 31 Transmit Record No Record Mark TRNM 30 Storage address to which highorder position of the record is transmitted Same as code 31 *Storage address of high-order position of the record to be transmitted *Same as code 31 Transfer Numerical Strip TNS 72 Storage address of rightmost position of alphameric field to be transmitted *Storage address of the units position of the numerical field Transfer Numerical Fi" TNF 73 Storage address of rightmost position of alphameric field *Srorage address of the units position of the numerical field to be transmitted Floating Shift Right (special feature) FSR 08 Storage address to which units (rightmost) digit of mantissa is transmitted *Storage address (rightmost) digit of mantissa to be transmitted Floating Shift Left (special feature) FSL 05 Storage address to which highorder digit of the mantissa is transmitted *Storage address of low-order digit of mantissa to be transmitted Transmit Floating TFL 06 Storage address to which units *Storage address of units position position of eXJ?onent is transmitted of exponent of field to be transmitted Move Address (special feature MA 70 Storage address of units position of 5-digit field to w!:Jich data is transmitted *Storage address of units position of 5-digit field to be transmitted OR to Field (special feature) ORF 92 Storag/i address of leftmost position of first field for OR logic input *Storage address of leftmost position of second field for OR logic input AND to Field (special feature) ANDF 93 Storage address of leftmost position of first field for AND logic Exclusive OR to Field (special feature) EORF 95 Storage address of leftmost position of first field for Exclusive OR logic *Storage address of leftmost position of second field for AND logic *Storage address of leftmost position of second field for Exclusive OR logic Complement Octal Field (special feature) CPLF 94 Storage address of leftmost position of field to which data is transmitted *Storage address of leftmost position of field to be complemented Octal to Decimal Conversi')n (special feature) Decimal to Octal Conversion (special feature) 01'0 96 Storage address of the units position of the power-of-eight table *Storage address of leftmost position of field to be converted DTO 97 Storage address of the units position of the highest power-ofeight required *Storage address of leftmost position of field to be converted 14.0 Table 18. Summary of SPS Logic (Branch and Compare) Instructions NOTE: Both the BI {Branch Indicator} and BNI {Branch No Indicator} instructions require one of the switch or indicator codes listed in Table 21 as a Q address. The code indicates the switch or indicator to be interrogated for status. To relieve the programmer of having to code a Q address, unique mnemonics are included in SPS language for both BI- and BNI-type instructions. For a unique mnemonic, the processor generates the actual machine language code 46 {Branch Indicator} or 47 {Branch No Indicator} and the Q address that represents the switch or indicator. Indirect Addressing and indexing are allowable with all P address operands listed below except Branch Back. An * to the left of the Q address operand indicates these features may be used with it. OPERATION OPERANDS OPERATION CODES MNEMONIC ACTUAL P ADDRESS Q ADDRESS Compare C 24 Storage address of units position of the field to which another field is compared *Storage address of units position of the field to be compared with the field at the P address Compare Immediate CM 14 Same as code 24 Ql1 of instruction is units position of the field to be compared with the field at the P address Branch B 49 Storage address of the leftmost digit of the next instruction to be executed Not used Branch and Adjust Assignment Counter B7 49 Storage address of the leftmost digit of the next instruction to be executed Not used. However, these five 10cations.Qlll used by the next instruction in sequence Branch No Flag BNF 44 Storage address of the leftmost digit of next instruction to be executed if branch occurs *Storage address to be interrogated for presence of a flag bit Branch No Record Mark BNR 45 Same as code 44 *Storage address to be interrogated for presence of a record mark character Branch No Group Mark BNG 55 Same as code 44 *Storage address to be interrogated for presence of a group mark character Branch on Digit BD 43 Same as code 44 *Storage address to be interrogated for a digit other than zero Branch Indicator BI 46 Storage address of leftmost position of next instruction to be executed if indicator tested is on QS and Q9 of instruction specify the program switch or indicator to be interrogated {see Table 21} Branch High BH 46 Same as BI None required Branch Positive BP 46 Same as BI None required Branch Equal BE 46 Same as BI None required Branch Zero BZ 46 Same as BI None required Branch Overflow BV 46 Same as BI None required Branch Any Data Check BA 46 Same as BI None required Unique Branch Indicator Mnemonics: Appendix 141 Table 18. Summary of SPS Logic (Branch and Compare) Instructions (cont'd.) OPERATION OPERATION CODE MNEMONIC ACTUAL OPERANDS P ADDRESS Q ADDRESS Branch Not Low BNl 46 Same as BI Nonerequ ired Branch Not Negative BNN 46 Same as BI None required Branch Band A Selected BBAS 46 Same as BI None required Branch Band B Selected BBBS 46 Some as BI None required Branch Neither Band Selected BNBS 46 Same as BI None required Branch Console Switch 1 On BCl 46 Same as BI None required Branch Console Switch 2 On BC2 46 Same as BI None required Branch Console Switch 3,On BC3 46 Same as BI NC'ne required Branch Console Switch 4 On BC4 46 Same as BI None required Branch last Card BlC 46 Same as BI None required Branch Exponent Check (special feature) BXV 46 Same as BI None required Branch No Indicator BNI 47 Storage address of leftmost position of next instruction to be executed if indicator tested is off Qa and 09 of instruction specify program switch or indicator to be interrogated (see Table 21) Branch Band A Not Se lected BANS 47 Same as BNI None required Branch Band B Not Se Iected BBNS 47 Same as BNI None required Branch Either Band Selected BEBS 47 Same as BNI None required Branch Not High BNH 47 Same as BNI None required Branch Not Positive BNP 47 Same as BNI None required Branch Not Equal BNE 47 Same as BNI None required Branch Not Zero BNZ 47 Same as BNI None required Unique Branch No Indicator Mnemonics: 142 Table 18. Summary of SPS Logic(Branch and Compare) Instructions (coned.) OPERATION OPERATION CODE MNEMONIC OPERANDS P ADDRESS ACTUAL Q ADDRESS Branch No Overflow BNV 47 Same as BNI None required Branch Not Any Data Check BNA 47 Same as BNI None requ ired Branch Low BL 47 Same as BNI None required Branch Negative BN 47 Same as BNI None required Branch Console Switch 1 Off BNCI 47 Same as BNI None required Branch Console Switch 2 Off BNC2 47 Same as BNI None required Branch Console Switch 3 Off BNC3 47 Same as BNI None required Branch Console Switch 4 Off BNC4 47 Some as BNI None required Branch Not Lost Card BNLC 47 Some as BNI None required Branch Not Exponent Check (special feature) BNXV 47 Some as BNI None required Branch and Transmit BT 27 P address minus one is the storage address to which the units position of the Q field is transmitted. P address is leftmost digit of the next instruction to be executed *Storage address of units position of the field to be transmitted Branch and Transmit Immediate BTM 17 Some as cade 27 Q 11 of instruction is units position of field to be transmitted Branch and Transmit Address BTA 20 Same as code 27 Storage address of units position of the field to be transmitted Branch and Transmit Address Immediate BTAM 10 Same as cade 27 Q 11 of instruction is units position of field to be transmitted Branch Back BB 42 Not used Not used Branch Bock and Adjust Assignment Counter BB2 42 Not used. However, these five locations m used by the next instruction in sequence Not used. However, these five locations 2[! used by the next instruction in sequence Branch and Transmit Floating BTFL 07 P address minus one is the storage address to which the units position of the exponent portion of the Q field is transmitted. P is the storage address of the leftmost digit of the next instruction to be executed *Storage address of units position of exponent of field to be transmitted Branch and Select BS 60 Storage address of the leftmost position of the next instruction Q specifies condition to be se ected Unique Branch and Select Mnemonics: Branch and Select Indirect Addressing II " BSIA 60 Some as BS ,~ , None required Appendix 143 Table 18. Summary of SPS Logic (Branch and Compare) Instructions (cont'd.) OPERATION OPERATION CODE OPERANDS P ADDRESS MNEMONIC ACTUAL Q ADDRESS Branch and Se lett No 1/A BSNI 60 Same as BS None required Branch and Select Band A (special feature) BSBA 60 Same as BS None required Branch and Se leet Band B (special feature) BSBB 60 Same as BS None required Branch and Select No Index Register (special feature) BSNX 60 Same as BS None required Branch and Modify Index Register (special feature) BX 61 Same as BS .... Storage address of units posit ion of field to be added to selected index register Branch and Modify Index Register Immediate (special feature) BXM 62 Same as BS **Five digits of Q field are added to selected index register Branch Conditionally, Modify Index Register (special feature) BCX 63 Same as BS if (after modification) IX sign has not changed or result is not' zero Same as BX Branch Conditionally, Modify Index Register Immedidte (special feature) BCXM 64 Same as BCX Same as BXM Branch and load Index Register (special feature) ,SLX 65 Same as BS **Storage address of units position of 5-digit field to be loaded to selected index register Branch and load Index Register Immediate (special feature) BLXM 66 Same as BS "*Five digits of Q field are loaded to selected index register Branch and Store Index Register (special feature) BSX 67 Same as BS **Storage address of units position of field where selected index register data is to be stored Branch on Bit (special feature) BBT 90 Storage address of the leftmost position of next instruction if comparison is·successful *Q8-ll specifies storage address of units position of field to be compared with bits of the Q7 digit Branch on Mask (special feature) BMK 91 Same as code 90 *QS-Il specifies storage addre.ss of units position of field to be compared with Q7 digit **Specific index register is selected 144 Py flCl9S over the Q8-10 positions of the instruction. Table 19. Summary of SPS Input and Output Instructions NOTE: Indirect Addressing and indexing are allowable with all P address operands, where a P operand is required. None of the Q operands shown may be used with Indirect Addressing or Index Registers. OPERATION OPERATION CODE MNEMONIC ACTUAL OPERANDS P ADDRESS Q ADDRESS RN 36 Storage address at which leftmost (first) numerical character is stored Q 8 and Q9 of instruction specify input unit Read Numerically Typewriter RNTY 36 Same as RN None requ ired Read Numerically Paper Tape RNPT 36 Same as RN None required Read Numerically Card RNCD 36 Same as RN None required Write Numerically WN 38 Storage address from which leftmost (first) numerical character is written Q8 and Q9 of instruction specify output unit Write Numerically Typewriter WNTY 38 Same as WN None required Write Numerically Paper Tape WNPT 38 Same as WN None required Write Numerically Card WNCD 38 Same as WN None required Dump Numerically ON 35 Same as WN Same as WN Dump Numerically Typewriter DNTY 35 Same as WN None required Dump Numerically Paper Tape DNPT 35 Same as WN None required Dump Numerically Card DNCD 35 Same as WN None required Read Alphamerically RA 37 Storage address at which numerical digit of leftmost (first) character is stored. (Zone digit of first character is at P minus one) Q8 and Q9 of instruction specify input unit Read Numerically Unique Read Numerically Mnemonics: Unique Write Numerically Mnemonics: Unique Dump Numerically Mnemonics: Appendix 145 Table 19. Summary of SPS Input and Output Instructions (cont'd.) OPERATION OPERANDS OPERATION CODE MNEMONIC ACTUAL P ADDRESS Q ADDRESS Unique Read Alphamerically Mnemonics: Read Alphamerically Typewriter RATY 37 Same as RA None required Read Alphamerically Paper Tape RAPT 37 Same as RA None required Read Alphamerica Ily Card RACD 37 Same as RA None req u ired Read Binary Paper Tape {special feature} RBPT 37 Same as RA None required Write Alphamerically WA 39 Storage address of numerical digit of leftmost (first) character to be written. (Zone digit of first character is at P minus one) Q8 and Q9 of instruction specify output unit Write Alpha .. merically Typewriter WATY 39 Same as WA None requ ired Write Alphamerically Paper Tape WAPT 39 Same as WA None required Write Alphamerically Card WACD 39 Same as WA None required Write Binary Paper Tape (special feature) WBPT 39 Same as WA None required Control K 34 Not used Q8 and Q9 specify input/output unit.. Q 11 specifies control functIons BKTY 34 Not used None required Unique Write Alphamerically Mnemonics: Unique Control Mnemonics: Backspace Typewriter Tabulate Typewriter TBTY ~4 Not used None required Index Typewriter IXTY 34 Not used None required Return Carriage Typewriter RCTY 34 Not used None req u i red Space Typewriter SPTY 34 Not used None required 146 Table 19. Summary of SPS Input and Output Instructions (cont'd.) OPERATION OPERANDS OPERATION CODE MNEMONIC ACTUAL P ADDRESS Q Seek SK 34 Storage address of disk control field X07Xl Read Disk/ WLRC RDGN 36 Same as SK XOlXO Write Disk/ WLRC WDGN 38 Same as SK X07XO Check Disk/ WLRC CDGN 36 Same as SK XOlXl Read Disk Track;WLRC RTGN 36 Same as SK XOlX4 Write Disk Track;WLRC WTGN 38 Same as SK X07X4 Check Disk Track/WLRC CTGN 36 Same as SK XOlX5 Read Disk RON 36 Same as SK XOlX2 Write Disk WON 38 Same as SK XOlX2 Check Disk CON 36 Same as SK X07X3 Read Disk Track RTN 36 Same as SK XOlX6 Write Disk Track WTN 38 Same as SK X07X6 Check Disk Track CTN 36 Same as SK XOlX7 Table 20. ADDRESS Summary of SPS Miscellaneous Instructions NOTE: Indirect Addressing and indexing are allowable with all P or Q address operands that are marked with an *. OPERATION OPERANDS OPERATION CODE MNEMONIC ACTUAL P ADDRESS Q ADDRESS Set Flag SF 32 *Storage address at which flag bit is placed Not used Clear Flag CF 33 *Storage address from which flag bit is cleared Not used Move Flag MF 71 *Storage address to which flag bit is moved *Storage address of flag bit to be moved Halt H 48 Not used Not used No Operation NOP 41 Not used Not used Appendix 147 Table 21. 1620/1710 Indicator Codes for SPS BI-BNI Instructions NOTE: This table lists only those indicators that do not have unique mnemonics. Q ADDRESS INDICATOR Q7 Q 8 Q 9 QIO INDICATOR Process Branch Indicator 8 Q II Q ADDRESS Q 7 Q 8 Q 9 QIO 7 7 Process Branch Indicator 9 7 8 Process Branch Indicator 10 7 9 0 Process Branch Indicator 11 8 0 6 7 Process Branch Indicator 12 8 I MAR Check 0 8 Process Branch Indicator 13 8 2 3 Read Check 0 Write Check MBR-E Check I 6 Process Bran"ch Indicator 14 8 MBR-O Check I 7 Process Branch Indicator 15 8 4 Operator Entry I 8 Process Branch Indicator 16 8 5 Terminal Address Selector (TAS) Check Process Branch Indicator 17 2 I 8 6 Function Register Check 2 2 Process Branch Indicator 18 Process Branch Indicator 19 8 8 7 8 Analog Outp..lt (AO) Check 2 Mask 2 3 6 Customer Engineer (CE) Interrupt 2 7 Analog Outp..lt Setup 2 8 Multiplexer Busy 2 9 Multiplex Complete 4 0 Analog Outp..lt Setup Interrupt 4 J One Minute Interrupt 4 3 One Hour Interrupt 4 4 Any SIOC Interrupt 4 5 Process Interrupt I 4 Process Interrupt 2 4 8 9 Process Interrupt 3 5 0 Process Interrupt 4 5 1 Process Interrupt 5 5 2 Process Interrupt 6 5 3 Process Branch Indicator 20 8 9 SIOC Output Error 6 0 4 3 Alert 6 0 4 5 0 SIOC Unit 1 Response 6 0 7 Sloe Unit 2 Response 6 0 7 I SIOC Unit 3 Response 6 0 7 2 Sloe Unit 4 Response 6 0 7 3 SIOC Unit 5 Response 6 0 7 4 SIOC Unit 6 Response 6 0 7 5 SIOC Unit 7 Response 0 7 6 SIOC Unit 8 Response 6 6 0 7 7 SIOC Unit 9 Response 6 0 7 8 Sloe Unit 10 Response 6 0 7 9 SIOC Unit I I Response 6 0 8 0 SIOC Unit 12 Response 6 0 8 1 SIOC Unit 13 Response 6 0 8 2 Sloe Unit 14 Response 6 0 8 3 Sloe Unit 15 Response 6 0 8 4 SIOC Unit 16 Response 6 0 8 5 SIOC Unit 17 Response 6 0 8 6 SIOC Unit 18 Response 6 0 8 7 SIOC Unit 19 Response 0 8 8 0 8 9 Process Interrupt 7 5 4 Process Interrupt 8 5 5 Process Interrupt 9 5 6 Process Interrupt 10 5 7 Process Interrupt I I 5 8 Process Interrupt 12 5 9 Process Branch Indicator I "7 0 SIOC Unit 20 Response 6 6 Process Branch Indicator 2 7 1 Disk Address Check 3 6 WLR/RBC Cyli nder Overflow 3 3 7 8 Process Branch Indicator 3 7 2 Process Branch Indicator 4 7 3 Process Branch Indicator 5 7 4 Process Branch Indicator 6 7 5 Process Branch Indicator 7 7 6 148 QIJ Any Disk Check 3 9 Seek Complete 4 2 Table 22. 1710 SPS Operation Codes OPERATION OPERANDS OPERATION CODE MNEMONIC ACTUAL P ADDRESS Q ADDRESS SAO 84 Not used Q7 specifies operation; Q9 - Qll specify a terminal address Select Address SA 84 Same as SAO .Q7=I;Q9- Q ll specify terminal address of analog input point Select Address and Contact Operate SACO 84 Same as SAO Q7 = 2; Q9 - Qll specify terminal aCidress of contact point Select Analog Output Signal SAOS 84 Same as SAO Q 7 = 3; Q 9 - Q II specify terminal aCidress of analog output channel Select Read Numerically SLRN 86 Depends upon particular operation Depends upon particular operation Select TAS SLTA 86 Core location where high-orcler position of TAS is trcinsferred Q7 = 1; Q8 - Qll are not used Select ADC Register SLAR 86 Core location where high-order position of ADC register is transferred Q7= 2; Q9- Ql1 specify analog input address Select Contact Block SLCB 86 Core location where Q7 = 7; Q9 - Ql1 status of the first contact specifies the contact block address where scanned is stored reading begins Select RealTime Clock SLTC 86 Core location where high-order digi t of RTC is transferred Q7 = 4; Q8 - Qll are not used Select ADC and Increment (1711 Modell) SLAD 86 Core location where high-order position of ADC is transferred Q7 = 6; Q8 - Qll are not used Select Manual Entry Switches SLME 86 Core location where high-order digit of Manual Entry switches is transferred Q 7 = 8; Q8 - Q 11 are not used Branch Out Of Noninterruptible Mode BO 47 Address to be placed in IR-3 Q 8 - Q9 = 00; Q 11 Branch Out Of Noni nterruptible Mode and Load Mask BOLD 47 Address to be placed in IR-I Q8 - Q9 = 00; Q 11 = I MK 46 Not used Q8 - Q9 = 00; Q J I = 1 Unmask UMK 46 Not used Q8 - Q9 = 00; Q II Select Input Channel SLIC 86 Not used Q 10 - Q 11 specify the address of an S 10C input unit Select Address and Operate Unique Select Address and Operate Mnemonics: Un~ue Select Re Numerically Mnemonics: =0 =0 Appendix 149 Table 22. 1710 SPS Operation Codes (cont'd.) OPERATION OPERATION CODE MNEMONIC ACTUAL OPERANDS P ADDRESS Q ADDRESS = Read Numerical Input Channel RNIC 86 Core storage location where data is to be read Q 7 5; Q8 - Q 11 not used Read Alphameric Input Channel RAIC 87 Same as RNIC Same as RNIC Wri te Numerica Output Channel WNOC 88 Core storage location from which data is to be written Q 10 - Q 11 specify an SIOC output unit Write Alphameric Output Channel WAOC 89 Same as WNOC Same as WNOC Branch Outeut Record Mar BOR 46 Branch End of Message BRE 46 Core storage address of None requ i red leftmost posi tion of next instruction to be executed if indicator tested is on Same as BOR Same as BOR Branch Mode Shift BMC 46 Same as BOR Same as BOR Branch Data Ready BIR 46 Same as BOR Same as BOR Branch SIOC Not Busy BCNB 46 Same as BOR Same as BOR Branch No Outrt Record Mar BNOR 47 Core storage address of leftmost position of next instruction to be executed if indicator tested is off None requ ired Branch No End of Message BNRE 47 Same as BNOR Same as BNOR Branch No Mode Shift BNMC 47 Same as BNOR Same as BNOR Branch No Data Ready BNIR 47 Same as BNOR Same as BNOR Branch No SIOC Not Busy BCB 47 Same as BNOR Same as BNOR Unique SIOC Branch Indicator Mnemonics: Unique SIOC Branch No Indicator Mnemonics: 150 . Table 23. SPS Subroutine Macro-instruction Execution Times NOTE: These execution times depict the total time from the encountering of a Macro-statement to returning to the calling program. AVERAGE EXECUTION TIME SUBROUTINE Floating Add Fi xed length Average time = 4, 100 ,",sec. Variable length Average time (in ,",s) =70L + 3420 where L ~ length of mantissa Floating Subtract Fi xed length Average time" 4, 200 ,",sec. Variable length Average time (in ,",s) -" 70L + 3500 Floating Multiply Fixed length Average time ~ 5,300 ,",sec. Variable length Average time (in ,",s) = 36.6 L2 + 48L + 3240 Floating Divide Fixed length Average time = 10,900 ,",sec. Variable length Average time (in ,",s) " 98.5L 2 + 200L + 3490 Floating Shift Right Fixed length and variable length Average time (in ,",s) = 2270 + 45 (A-B) Floating Shift Left Fixed length and variable length Average time (in fls) = 3830 + 350 (B-A) 2 -t- 7.5 (B-A) Transmit Floating Fixed length and variable length Average time (in ,",s) .. 530 + 15L Branch and Transmit Floating Fixed length and variable length Average time (in ,",s) = 645 + 15L Floating Square Root Fi xed length Average time = 29 ms Variable length Average time (in ,",s) = 1OOL 2 + 2000L + 5500 FLoating Sine Fixed length Average time = 33.3 ms *Variable length Average time (in ,",s) = 5L3 + 320L2 + 3100L + 4900 Floating Cosine Fixed length Average time = 33.3 ms * Variable length A"erage time (in ,",s) = 5L3 + 296L2 + 2950L + 5400 Floating Arctangent Fixed length Average time = 31.7 ms Variable length Average time (in fls) = 35L3 + 570L2 + 400L + 7500 Floating Exponential (Natural) Fixed length Average time = 38 ms NOTE: Add 11.4 ms to the average time if the argument is negative. **Variable length Average time (in ,",s) = 21L 3 + 240L 2 + 6000L - 1300 Floating Exponential (Base 10) Fixed length Average time = 39.8 ms NOTE: Add 11.4 ms to the average time if the argument is negative. ** Variable length Average time (in ,",s) 3 = 23L 2 + 240L + 6050L - 1300 Floating Logarithm (Natural) Fixed length Average time 51.7 ms Variable length Average length (in ,",s) = 36.5L3 + 590L 2 + 1500L + 8600 Floating Logarithm (Base 10) Fixed length Average time = 56.6 ms Variable length 3 2 Average time (in fls) =33.5L + 680L ~ 2100L + 5900 *NOTE: These execution times are for arguments less than 211. Arguments greater than 211 are reduced by subtractions of 211 until withit. rcnge. TLerefore, the time required to perform these subtractions should be added to the average time required for an argumenr less than 211 • ** Add time for VL Divide if the argument is negative. Appendix 151 Table 24. 1620 Character Coding Character (Blank) Input Typewriter (Space) • (Period) ALPHAMERIC MODE Alpha Num C (Blank) C C XOS21 12,3,S C 3 Output Typewriter (Space) Tape Card C (Blank) X0821 12,3,S ) XOCS4 12,4,S C 4 ) XOCS4 12,4,S + + XOC 12 1 C + XOC 12 $ $ XCS21 11,3,S 1 3 $ XCS21 11,3,~ * * XS4 11,S,4 1 4 * XS4 11,4,S - (Hyphen) - X 11 2 C - X 11 / / OCl 0,1 2 1 / OCl 0,1 , (Comma) , OCS21 0,3,S 2 3 , OCS21 0,3,S ( ( 084 0,4,S 2 4 ( 084 0,4,S = = S21 3,S 3 3 = S21 3,S @ @ C84 4,S 3 4 @ CS4 4,S A-I A-I XO,1-9 12, 1-9 4 1-9 A-I XO,1-9 12, 1-9 0(-) (None) (None) 11,0 5 C - (Hyphen) X 11,0 J-R J-R X,1-9 11, 1-9 5 1-9 J-R X,1-9 11,1-9 1-9 (.:..) J-R X,1-9 11,1-9 5 1-9 J-R X,1-9 11, 1-9 S-Z S-Z 0,2-9 0,2-9 6 2-9 S-Z 0,2-9 0,2-9 0(+) 0 0 oor 7 C 0 0 0 1-9 (+) 1-9 1-9 1-9 7 1-9 1-9 1-9 1-9 * * OS2 0,2,S C CS2 (Stop) EOl 0,2,S (Blank) (Space) C (Blank) C 0 0 0 o (+) 0 0 0 C 0 0 0 o (-) 0 X,XOC 11,0 F 0 X 11 1-9 (+) 1-9 1-9 1-9 1-9 1-9 1-9 1-9 1-9 (-) 1-9 X,1-9 11,1-9 F,1-9 1-9 X,1-9 11, 1-9 * * * =1= OS2 O,2,S CS2 (Stop, WN) EOl(WN) OS2 (ON) ~ (ON) * XS2 11,S,2 FS2 * 08421 0,7,S *C8421 * X8421 12,7,S @ C84 4,S * ;' Num Blank t t For Card Format Use Only * Recorded as O,S, 4, 2, 1 in disk storage 152 Card ) ~~~tf~~~~rr~~~~fI~~~~I~~~;~~~l NUMERICAL MODE Core Storage Tape 12,0 + 0,2,S XS2 11, S, 2 08421 0,7,S FS421 * * X8421 12,7, S C84 @ C84 (Blank) Table 25. Core Storage Data Resulting F'tom Reading Alphameric Card Data with RN Instruction Alpha Character A B C D E F Bits Entered into Core Storage by Read Numerically Instruction. F 4 I C 8 2 J K L M .. N 0 P Q X X X X X X X X 0 1 X 2 3 X 4 X X X X X X X X X X X X X X X X X X X X X X X X T U X X 8 X 9 V X X W X X X X X X '. (period) I , (comma). X a X X X ( ) X • X X X Only X 11,0 X X X X X * X X X 1$ I Int('rpr~too X X 12,0 Blank X X X + Card I/O X X X X X X X X X X X X X X X X X X X X X X X X X X I X X X X X X X 6 X S Y X '=. X X X X X~ 7 X X X Bits Entered into COH' Sturagt' bl Read Numeric.dly Instruction 4 I C F 8 2 X 5 X X X R Z X X G H I Alpha Character X X X X X X as Record Mark on WN andTR instrunions. Appentik 153 Appendix B Alphabetic Listing of All Messages Message XXXX DO TABLE FULL XXXX IMPROPER DO NESTING XXXX MIXED MODE XXXX SYMBOL TABLE FULL XXXXX ALABEL + XXXX ERN (see Table 6) XXXXX CARD SEQ ERROR, CORRECT AND START XXXXX CORES USED XXXXX NEXT COMMON END OF COMPILATION XXXXX LDI XXXXX NAME XXXXX SECTORS OF DATA COPIED FROM XXXXXX TO XXXXXX XXXXXX LOADED FROM XXXXXX TO XXXXXX XX XXXXX OVERLAP XXXXXXXXXX TYPE CHANGE XXXXXX XXXXX XXXXX LOADED XXXX + XXXX ERROR N ALREADY DEFINED AND FILE PROTECTED BAD DISK WRITE. RESET START CANNOT RESTORE COMMON RESET AND START TO RETRY CDP ERR CDR ERR CONDITION IGNORED CONTROL STATEMENT INVALID, RE-ENTER CORE CAPACITY EXCEEDED BY XXXXX LOCATIONS PROGRAM IS TERMINATED CORRECTIONS HAVE NOT BEEN ENTERED DISK RD WR ERROR, START TO RETRY DISK SECTOR XXXXXX CORRECTED DK LOADED XX ..... XX DSK ERR XXXXX 06 07 i6 i 7 36 3738 DSK OFL DUP * ERROR 01 (01 through 24) DUP * ERROR 51 (51 through 61) DUP * TURN OFF WRITE ADDRESS KEY, START ,154 Program FORTRAN FORTRAN FORTRAN FORTRAN SPS Pages 120 120 120 120 86 Loader 137 FORTRAN Supervisor FORTRAN 122 24 126, DUP 35 Loader FORTRAN DUP FORTRAN FORTRAN SPS DUP 137 129 29 128 120 91 35 Supervisor 22 Supervisor Supervisor Supervisor Supervisor 15 21 21 15 Loader 137 SPS 90 DUP 30 Loader DUP DUP 137 30 28, 41 21 Supervisor 21 Supervisor DUP 38, 39, 40 40 DUP DUP 28 Message DUP * TURN ON WRITE ADDRESS KEY, START END OF ASSEMBLY XXXXX CORE POSITIONS REQUIRED XXXXX STATEMENTS PROCESSED END OF JOB ENT ERROR 06 071617 363738 ENTER DUP CNTRL REC ENTER MONITOR CONTROL RECORD ER Dl (Dl through G7) ERROR Ll (Ll through LI0) ERROR X Eij.ROR IN FIELD AT COL. XX. SET SW 4 TO IGNORE, OFF TO RE-ENTER CARD ERROR IN FIELD AT COLUMN XX. PHASE TERMINATED ERROR, INVALID CONTROL RECORD ERROR, INVALID OUTPUT UNIT CODE EXCEEDED SPECIFIED CAPACITY BY XXXXX EXECUTION EXECUTION INHIBITED EXECUTION IS INHIBITED ERROR, F OR K OUTSIDE RANGE FORTRAN LIBR NAME ENTERED XXXXXXXXXX FLIPER XXXXX OVERLAP IMP ERR IMPROPER IND CODE IN SUBR XXXX JOB ABANDONED ' JOB CARD GROUP ONLY LD 2 LD 3 LD 4 LOAD SUBNAM MAP ERR XXXXX XXXX MAX N2 ALLOWABLE XXXXX MOD ERR XXXXX MORE THAN 5 CYLINDERS OF RELOADABLE OUTPUT SSW 4 ON TO DUMP OUTPUT, OFF TO CONTINUE, NO OUTPUT MUST RELOAD NAME XXXXX OVERLAP Program DUP Pages 28 SPS Supervisor Supervisor DUP 87 10, 15 21 28 Supervisor FORTRAN FORTRAN FORTRAN 15, 17 130 128 120 Supervisor 15 Supervisor 16 FORTRAN 118 FOl\TRAN 119 SPS Supervisor FORTRAN Supervisor FORTRAN 89 15 ' 129 17 119 DUP FORTRAN Supervisor 38 129 22 SPS FORTRAN Supervisor Supervisor Supervisor Supervisor FORTRAN Supervisor FORTRAN Supervisor 90 129 15 24 24 24 129 22 130 22 SPS Supervisor FORTRAN 89 23 129 Message Program NO DIM ENTRY FOR SUBROUTINE NO ENTRY FOR SUBROUTINE NO ROOM IN TABLE NO TRAILER REC. CORRECT, RELOAD COMPLETE DECK WITH CNTR REC, AND BR TO 7404 NOT IN TABLE OBJECT DIM ERROR PHASE TERMINATED OBJECT NAME ERROR PHASE TERMINATED PACK NUMBER. ERROR ON MODULE X. SET SSW4 TO IGNORE OFF TO RECOMPARE PTR ERR XXXXX 06 07161736 3738 PTP ERR XXXXX 06 '07 1617 36 3738 RDER RE-ENTER STATEMENT RE-ENTER OPERANDS SECTION SPS FORTRAN SPS Loader SPS Pages 89 129 91 137 91 Supervisor 16 Supervisor 17 Supervisor 15 Supervisor 21 Supervisor Loader SPS SPS DUP 21 137 87 87 29,30 Message SECTOR SECTION NUMBER ILLEGAL, START TO RE-ENTER 0 DALTR SECTOR ADDRESS ILLEGAL START TO RE-ENTER 0 DALTR SEQ SUBR NOT LOCATED IN SUBROUTINE MAP SYSTEM DIM ERROR PHASE TERMINATED TRAILER CARD SEQ ERROR, CORRECT AND START TRP ERR TRP ERROR MUST RELOAD TYP ERR XXXXX 06 07 16 17 36 3738 TYPE-I~ EXCEEDS SECTOR LENGTH, START UNDEFINED SYMBOL XXXXX WRITE AND SAVE (SEEK START STOP) WRITE AND ZERO (SEEK START STOP) Pro8!am Pages DUP 29 DUP 29 DUP Loader 29 137 SPS 90 Supervisor 17 Loader Supervisor Supervisor 137 22 23 Supervisor 21 DUP SPS 30 91 DUP 29 DUP 29 NOTE: X's represent variable characters. Appendix B 155 Index Page Absolute format ...................................................................... 4 ACCEPT statement ................................................................ 105 ACCEPT TAPE statement .................................................. 105 Add (A) instruction ........................................................ 61, 139 Add Immediate (AI) instruction .................................... 61, 139 Adding macro-instructions to processor .......................... 77, 91 Adding subroutines 'FORTRAN .......................................................................... 131 SPS ...................................................................................... 77 Address actual, .................................................................................. 49 adjustment '.. ................ .................. ................ .... .... .............. 50 asterisk ................................................................................ 49 equivalents for PICK, ........................................................ 71 symbolic, .............................................................................. 49 types of, used as operands ................................................ 49 Address Check indicator ............... ................................ ....... 23 Altering assignment of disk storage drives .......................... 12 Alter Sector routine .............................................................. 29 Analog Output Check code .................................................. 148 Analog Output Setup code .................................................. 148 And to Field (AND F) instruction ...................................... 140 Arguments (FORTRAN)·.·····.·.· ... ·.· ...... ··.· .... ·.. ··· ... ·.·.·............. 108 Arithmetic Instructions summary ............... '......................... ~ 139 Arithmetic mode .................................................................... 94 Arithmetic precision (FORTRAN) ........................................ 96 Arithmetic statement functions ... ...... ...... ..... .. ...... ............... 114 Arithmetic statements ............................... ,. ..... ............ .......... 98 Arithmetic'subroutines FORTRAN .......................................................................... 124 SPS ...................................................................................... 66 Arithmetic subroutine macro-instructions ............................ 67 Arrays ................................................................................ 96, 104 Assignment of DIM entries and/or names, rules for .......... 41 ASSEMBLE RELOCATABLE, SPS Control record .......... 85 Assignment of System DIM numbers ..... ....................... 5, 134 Asterisk FORTRAN .......................................................................... 97 SPS .................................................................................. 46, 49 At(@)sign (special character) ............................................ 47, 49 Automatic Fix/Float .............................................................. 113 Availability list ... ... .... ................. .... ...... ............. ............... ..... 32 I Backspace Typewriter (BKTY) instruction .......................... BEGIN CARD INPUT, SPS Control record ...................... BEGIN PAPER TAPE INPUT, SPS Control record .......... BEGIN TYPEWRITER INPUT, SPS Control record ........ Blank character ...................................................................... headed by, .......................................................................... Branch and Adjust Assignment counter (B7) .............. 51, Branch and Load Index Register (BLX) instruction .......... Branch and Load Index Register Immediate (BLXM) instruction ........................ Branch and Modify Index Register (BX) instruction .. ........ 156 146 85 85 85 47 64 141 144 144 144 Page Branch and Modify Index Register Immediate (BXM) instruction ............................ 144 Branch and Select (BS) instruction ... ... ....... ......... ........ ..... ... 143 Branch and Select Band A (BSBA) instruction ....... ... ........ 144 Branch and Select Band B (BSBB) instruction .................. 144 Branch and Select. Indirect Addressing (BSIA) instruction ............................ 143 Branch and Select No 1/A (BSNI) instruction .................... 144 Branch and Select No Index Register (BSNX) instruction ............................ 144 Branch and Store Index Register (BSX) instruction .......... 144 Branch and Transmit (BT) instruction ................................ 143 Branch and Transmit Floating instruction (BTFL) ............................................................ 143 subroutine (BTFS) .............................................................. 75 Branch and Transmit Immediate (BTM) instruction .......... 143 Branch Any Data Check (BA) instruction .......................... 141 Branch Back and Adjust Assignment Counter (BB2) .... 51, 143 Branch Back (BB) instruction .............................................. 143 Branch Band A Not Selected (BANS) instruction .............. 142 Branch Band B Not Selected (BBNS) instruction .............. 142 Branch Band A Selected (BBAS) instmction ...................... 142 Branch Band B Selected (BBBS) instmction ................... ,.. 142 Branch Conditionally, Modify Index Register (BCX) instmction ................................................ 144 Branch Conditionally, Modify Index Register Immediate (BCXM) instruction .......................... 144 Branch Console Switch instructions (BC1, BC2, BC3, BC4) .............................................. 142, 143 Branch Data Ready (BIR)· instruction .................................. 150 Branch End of Message (BRE) instmction .......................... 150 Branch Equal (BE) instruction ..... :...................................... 141 Branch Exponent Check (BXV) instruction ., ............. ......... 142 Branch High (BH) instruction .............................................. 141 Branch Indicator (BI) instruction ........................................ 141 Indicator Codes summary ................................................... 148 Branch instmctions .................................................. 61, 141-143 Branch Last Card (BLC) instruction .................................. 142 ~ranch Low (BL) instruction ................................................ 143 Branch Mode Shift (BMC) instruction ................................ 150 Branch Negative (BN) instmction ...................................... 143 Branch No Data Ready (BNIR) instruction ........................ 150 Branch No End of Message (BNRE) instruction ................ 150 Branch No Flag (BNF) instruction .................................... 141 Branch No Group Mark (BNC) instruction ........................ 141 Branch No Indicator (BNI) instmction ................................ 142 Indicator Codes summary .................................................. 148 Branch No Mode Shift (BNMC) instruction ........................ 150 Br:anch No Output Record Mark (BNOR) instmction ........ 150 Branch No Overflow (BNV) instmction .............................. 143 Branch No Record Mark (BNR) instruction ...................... 141 Branch No SIOC Not Busy (BCB) instmction .................. 150 Branch Not Any Data Check (BNA) instruction .............. 143 Branch Not Equal (BNE) instruction ................................ 142 Branch Not Exponent Check (BNXV) instruction ............ 143 Branch Not High (BNH) instruction .................................. 142 Page Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Branch Not Last Card (BNLC) instruction ........................ Not Low (BNL) instruction .................................. Not Negative (BNN) instruction ............................ Not Positive (BNP) instruction .............................. Not Zero (BNZ) instruction .................................. on Bit (BBT) instruction .......................................... on Mask (BMK) instruction .................................... on Digit (BD) instruction ...................................... Operands .................................................................... Out of Noninterruptible Mode (BO) instruction .... Out and Load (BOLD) instruction ...................... Output Record Mark (BOR) instruction ................ Overflow (BV) instruction ...................................... Positive (BP) instruction ........................................ SIOC Not Busy (BCNB) instruction ...................... Zero (BZ) instruction .............................................. 143 142 142 142 142 144 144 141 51 149 149 150 141 141 150 141 CALL EXIT linkage ............................................................ 18 CALL EXIT statement FORTRAN .......................................................................... 103 SPS ...................................................................................... 81 CALL LINK linkage ............................................................ 17 CALL LINK statement FORTRAN .......................................................................... 117 SPS ...................................................................................... 81 CALL LOAD linkage ............................................................................... . macro-statement .................................................................. 17 81 CALL statement FORTRAN ......................................................................... . 116 SPS ..................................................................................... . 81 Card I/O .... -----------------------------------------._-----------_.-_._------_ .... ----_ .. - 19 Card read error ..................................................................... . 21 Card write error ..................................................................... . 21 Check Disk (CDN) instruction ........................................... . 147 Check Disk Track (CTN) instruction ............................... . 147 Check Disk Track/WLRC (CTGN) instruction ............... . 147 Check Disk/WLRC (CDGN) instruction ........................... . 147 Clear Flag (CF) instruction ............................................... - 147 Coding sheet FORTRAN ....................... _... _............ _.. _...... _............... _....... 94 SPS _........... _........... _............... _................................. _..... _..... 44 Commas ............... _................................................. _............... . 46 Comments FORTRAN ............... _.. _................................ _....................... 93 SPS with asterisk .. _.......................................................... _...... 46 see Remarks Comments Monitor Control record .................... _................. 12 COMMON statement .............. _............................................. 107 Communications Areas ... __ .... _........ _........................... 25, 36, 37 Compare Immediate (CM) instruction ................................ 141 Compare (C) instruction .................................... _................... 141 Complement Octal Field (CPLF) instruction ........... _........ 140 Compilation Process .............. _... _............. _....................... -..... 117 Constants FORTRAN ........... _.. _.................................................. _........ 95 SPS at • sign ......... _.................. _................................................. 47 Define Alphameric Constant (DAC) .... _.................. _...... 55 Define Constant (DC) instruction ............. _.................. 54 Define Special Alphameric Constant (DSAC) ............ 56 Define Special Constant (DSC) .................................... 55 Page Define Variable-Length Constant (DVLC) .................. 55 CONTINUE statement ..... _.. _....... _......................................... 102 Control (K) instruction ...... _................................................. 146 Control Card Formats .......... _......... _._................................... 10 Control operation codes ._ .. _....................................................................... 43, 146 Control record trap error .......... _........................... _............. 22 Control records DUP ... __ ....... _._ .................... _.... _............. _.............. _.......... 28, 38 FORTRAN _.. _....... _.................. _........ _.................................. 118 MONITOR .......................................................................... 8 . SPS .... _... _..... _............................. _...... _.................................. 85 Control statements (FORTRAN) ........ _............ _.. _..... _........... 99 Core storage requirements ................ _........ _._........................ 7 Customer Engineer (CE) Interrupt code ............................ 148 Cylinder Overflow Error ............................................... _...... 21 Cylinder Overflow indicator ..... _.......................................... 22 DAL TR, DUP control record ........................................ _..... 29 DAT A control record ................. _.................................. _....... 127 Data transmission subroutine macro-instructions .............. 67 Data transmission subroutines .............................................. 66 DCOPY, DUP control record .................... _........................ _.. 35 DDUMP, DUP control record .......... _................................... 31 Decimal Octal Conversion (DTO) instruction .................... 140 Declarative operations card format (list) ....... _.............................................. _......... 87 codes ...... _.......... _............................................................ 43, 52 summary ................................ _....... _.......... ........ ................... 138 Define Alphameric Constant (DAC) statement .................. 55 at sign ..................................... _............................................ 47 blank character .................................................................. 47 Define Alphameric Symbol (DAS) statement ...................... 54 Define Card Alphameric (DCA) .......................................... 83 Define Card Numerical (DCN) ............................................ 83 Define Disk without WLRC (DD) ........................................ 83 Define Disk with WLRC (DDW) ...................................... 83 Define Constant (DC) statement .......................................... 54 at sign .. _....................... _....................................................... 47 Define Disk Address (DDA) statement .............................. 57 Define Disk Pack Label Routine .................. _..................... 37 DEFINE DISK statement ................................................ _. 108 Define END (DEND) statement ........................................ 63 Define FORTRAN Library Subroutine Name routine ...... 38 Define Group Mark (DGM) statement .............................. 58 Define Message (DMES) statement .................................. _... 58 Define Numerical Blank (DNB) statement ........................ 57 DEFINE OP CODE, SPS Modification Control record .... 91 Define Origin (DORG) statement ...................................... 62 Define Paper Tape Alphameric (DPTA) ............................ 43 Define Paper Tape Alphameric (DPT A) .......................... _... 83 Define Paper Tape Numerical (DPTN) .. _........................... 83 Define Parameters routine .......... _........................... _............. 36 Define Special Constant (Numerical) DSC statement ...... 55 Define Special Symbol (Numerical) DSS statement .......... 53 Define Symbol (Numerical) DS statement ...... _... _............. 52 Define Symbolic Address (DSA) statement ........................ 56 Define Symbolic Block (DSB) statement .............................. 57 DEFINE SYSTEM SYMBOL TABLE, SPS Modification Control record .................................................................... 91 Define Typewriter Alphameric (DTA) .............................. 83 Define Typewriter Numerical (DTN) ................................ 83 Define Variable-Length Constant (DVLC) statement ...... 55 Index 157 Page Page DE LET, DUP control record ______________________________________________ 36 DELETE OP CODE, SPS Modification Control record ____ 91 Delete Programs routine ________________________________________________________ 36 DFINE, DUP control record ________________________________________________ 36 DFLIB, DUP control record ______________________________________________ 38 DIM entry ____________________________________________________________________________ 5, 41 DIM numbers for Monitor System ______________________________________ 5 DIM table ______________________________________________________________________________ 5 DIMENSION statement ________________________________________________________ 107 Disk control ReId ____________________________________________________________________ 19 Disk I/O constants ________________________________________________________________ 18 Disk I/O options ____________________________________________________________________ 18 Disk pack identification numbers __________________________________ 13, 37 Disk pack label ______________________________________________________________ 6, 7, 37 Disk storage I/O ____________________________________________________________________ 19 Disk storage requirements ____________________________________________________ 4 Disk Utility Program ____________________________________________________________ 27 Disk-to-Disk routine _____________ ,________________________________________________ 35 Disk-to-Output routine __________________________________________________________ 30 Divide (D) instruction __________________________________________________________ 139 Divide Immediate (DM) instruction ____________________________________ 139 Divide subroutine __________________________________________________________________ 73 Divisor, incorrect positioning ________________________________________________ 74 DLABL, DUP control record ________________________________________ ,_______ 38 DLOAD, DUP control record ______________________________________________ 33 DO statement ________________________________________________________________________ 101 Dollar sign (special character) __________________________________________ 47, 64 DOT Declarative Statement ____________________________________________ .___ 59 DREPL, DUP control record ________________________________________________ 34 Drive code ______________________________________________________________ 4, 12, 20, 58 Dummy variables __________________________________________________________ 115, 116 Dump Numerically Card (DNCD) instruction ____________________ 145 Dump Numerically (DN) instruction ____________________________________ 145 Dump Numerically Paper Tape (DNPT) instruction ________ 145 Dump Numerically Typewriter (DNTY) instruction __________ 145 DUP, Monitor Control record __________________________________________ 10, 11 Duplicate symbols (labels) ____________________________________________ 63, 132 DWRAD, DUP control record ____________________________________________ 28 SPS ______________________________________________________________________________________ 70 Expressions, FORTRAN ________________________________________________________ 97 F ANDK Control record _________________ .______________________________________ 118 FETCH statement __________________________________________________________________ 105 File protected programs ______________________________________________________ 6 FIND statement ______________________________________________________________________ 105 Fixed-length mantissa subroutines (SPS) ____________________________ 67 Fixed-Point Divide (FD) subroutine ____________________________________ 73 Fixed-point variables (FORTRAN) ____________________________________ 96 Flag indicator operand __________________________________________________________ 47 in immediate instructions __________________________________________________ 47 in indirect addressing ________________________________________________________ 47 Flags, set ________________________________________________________________________________ 47 END statement ______________________________________________________________________ 103 End-of-Job Monitor Control record __________________________________ 10, 12 End-of-line character ____________________________________________________________ 47 ENDLIB, SPS Modification Control record _____________________ .__ 91 Entry Check error ____________________________________________________________ ._____ 21 Entry 1?oints of I/O routine __________________________________________________ 17 Equal sign (SPS special character) ______________________________________ 49 EQUIVALENCE statement __________________________________________________ 107 Equivalence table ________________________________________________________________ 5, 32 Error checking, FORTRAN __________________________________________________ 130 Error correction (SPS) assembly time ______________________________________________________________________ Error correction codes, I/O Error routine __________________________ Error Count Retrieval routine ______________________________________________ Error detection and correction, DUP __________________________________ Error Messages - (see Appendix B) ____________________________________ ERROR STOP, SPS control record ____________________________________ Evaluation of arguments (subroutines) FORTRAN __________________________________________________________________________ SPS ______________________________________________________________________________________ Exclusive OR to Field (EORF) instruction ________________________ Execution times (SPS subroutines) _. ____________________________________ Exponents FORTRAN ____________________________________ ._. ______________________ .____ .__ .. ___ 158 86 20 23 38 154 85 113 67 140 151 94 Floating Add instruction (FADD) ____________________________________________________________ 139 subroutine (FA) ____________________________________________________________ 71, 72 Floating Arctangent (F ATN) subroutine ______________________________ 76 Floating Cosine (FCOS) subroutine ____________________________________ 76 Floating Divide instruction (FDIV) ____________________________________________________________ 139 subroutine (FD) ________________________________________________________ ._________ 73 Floating Exponential (Base 10) FEXT subroutine ____________ 76 Floating Exponential (Natural) FEX subroutine ________________ 76 Floating Logarithm (Base 10) FLOG subroutine ______________ 77 Floating Logarithm (Natural) FLN subroutine __________________ 77 Floating Multiply instruction (FMUL) . __ .. __ ._. _____ .__________________________________________ 139 subroutine (FM) __________________________________________________________________ 73 Floating-point arithmetic __________________________________________________ 69, 94 Floating-point variables (FORTRAN) __________________________________ 96 Floating Shift Left instruction (FSL) ________________________________________________________________ 140 subroutine (FSLS) ______________________________________________________________ 75 Floating Shift Right instruction (FSR) ________________________________________________________________ 140 subroutine (FSRS) ______________________________________________________________ 74 Floating Sine (FSIN) subroutine ________________________________________ 76 Floating Square Root (FSQR) subroutine __________________________ 75 Floating Subtract instruction (FSUB) ____________________________________________________________ 139 subroutine (FS) __________________________________________________________________ 72 FOR Monitor Control record __________________________________________ 9, 11 Format of DIM entry ____________________________________________________________ 5 FORMAT Statement ______ ._________________________________ . _____________________ 109 FORTRAN and SPS Output ________________________________________________ 41 FORTRAN Control records __________________________________________________ 118 FORTRAN II-D ____________________________________________________________________ 93 FORTRAN II-D language ____________________________________________________ 93 FORTRAN subroutine error codes _________________________________ .____ 130 FORX Monitor Control record __________________________________________ 9, 11 Full track disk operation ______________________________________________________ 20 Function Register Check Indicator code ______________________________ 148 FUNCTION statement _______________________________________ .__________________ 115 Functional subroutines _________________________________ .____________________ .___ 67 GET macro-statement ____________________________________________________________ GO TO statements ________________________________________________________________ 81 99 Halt (H) instruction ______________________________________________________________ 147 Halt at core address 00467 __________________________________________________ 22 Head character ______________________________________________________________________ 64 Head statement ______________________________________________________________________ 63 Page Page Heading for combining programs ................................... ................. in nesting ...................................... '... ...... ........... .......... .... .... High indicator ........... ........ .... ........ ............ ... ............. ..... ... ..... 63 64 25 I/O constants .......................................................................... 18 I/O Declarative statements .................................................. 82 I/O Error routine .................................................................. 20 I/O routine .............................................................................. 17 ID NUMBER dddd, SPS control record ............................ 86 Identification records, FORTRAN .............................. 122, 132 IF statement .......................................................................... 100 IF (SENSE SWITCH) statement .......................................... 100 Immediate-type instructions .................................................. 47 Imperative operations ................. ........................................... 60 arithmetic ... ........... ......... ........ ...... ................ ..... .......... 60, 139 branch .............................. :........................................... 61, 141 card format (list) ................................................................ 89 codes, 1710 ........................................................................ 149 input/output ................................................................ 62, 145 internal data transmission .......................................... 61, 140 miscellaneous ................................................................ 62, 147 Index, DO .............................................................................. 101 Index Register ........................................................................ 51 Index Typewriter (IXTY) instruction .................................... 146 Indicator codes ..... ..... ............... .... ........ ......... ... .... ...... ....... 23, 24 Indicator codes (1620/1710) ................................................ 147 Indirect addressing ................................................................ 4 Initializing the Monitor System ............................................ 4 Input/Output options ............................................................ 18 Input/Output statements (FORTRAN) ................................ 103 Input instructions .......................................................... 145, 146 Internal Data Transmission instructions ...................... 61, 140 I/O declarative statements .................................................... 80 lIO macro-statements ............................................................ 81 Job arrangement ....................... ..... ................. .... ........ ..... ...... 13 JOB Monitor Control record .............................................. 8, 10 Label (SPS) characters permitted in ... ........ ...... ..... .... ......... ......... ... ....... 43 five characters or less, headed .. ...... ...... ... ...... ......... .......... ,63 Symbol table ...................................................................... 87 table, see Symbol table Label, disk pack 1401, 1410, 1440 ................................................................ 6 Monitor ............................................................................ 7, 41 Mutual ................................................................................ 6 LDISK Control record .......................................................... 119 LIBR, SPS control record .................................................... 86 Library functions (FORTRAN) .......................................... 112 additional ............................................................................ 113 writing in SPS .................................................................... 134 Link program .......................................................................... 117 Linkage instructions .... ...... ........... ....... ... ..... ....... ... .... 67, 78, 82 Linkage for CALL LOAD and CALL LINK ...................... 82 Linkage for CALL EXIT ........•............................................. 82 Linkage for GET, PUT and SEEK .................................... 82 Linkages for Supervisor I/O routine .................................. 17 LIST CARD, SPS control record .......................................... 86 LIST OP CODE, SPS Modification Control record ............ 91 LIST TYPEWRITER, SPS control record .......................... 86 LIST (FORTRAN) ................................................................ 111 Load Programs routine ................. ............ ........ ........ .... ....... Load Dividend Immediate (LDM) instruction .................. Load Dividend (LD) instruction .......................................... Load-on-call subprograms .................................... 117, 126, Loader, System ...... ... ..... .... ... ...... ... ............... ............ ...... .... ... Loader routine ....... ..... ....... ...... ...... ............ ... ... ..... ....... ...... ..... Loading the Monitor System to disk storage .................. LOCAL Control record ........................................................ Location assignment counter (SPS) ........................ 60, 63, Logic instructions .................................................................. 32 139 139 127 136 23 136 127 138 141 Machine requirements ........................................ '.. ..... ....... ..... 4 Macro-instructions (see Subroutines) operation' of ...................................................... ,. ...... ..... ..... 67 rules for coding ......... ..... ....... ........ ..... .... ... ......... ...... .......... 72 Mantissa FORTRAN ............................................................ 37, 94, 118 SPS .......................................................................... 36, 69, 85 MANTISSA LENGTH nn, SPS control record .................. 85 Manual restart .............. .......................................................... 18 MAR Check Indicator code ................................................ 148 Mask Digit Operand ............................................................ 48 Mask Indicator code .... .... ... ... ... ...... ............ ................. ...... .... 148 Mask Interrupts (MK) instruction ........................................ 149 Matrix Input/Output (FORTRAN) ...................................... 104 MBR-E Check indicator ...................................................... 23 MBR-O Check indicator ........................................................ 23 Miscellaneous instructions (SPS) .................................... 62, 147 Mode of expressions (FORTRAN) ........................................ 97 Modification of variable-length subroutine .......................... 78 Modification program, SPS II-D .......................................... 91 Modifier constants .................................................................. 78 Module change numbers ............................. ......................... 12 Monitor Control Record Analyzer routine .......................... 14 Monitor Control Records ............ ...... ...... ..... ...... .......... ........... 8 Monitor Disk Pack label ........................................................ 7 Monitor System Loader ........................................................ 136 Move Address (MA) instruction ........................................... 140 Move Flag (MF) instruction ... ..... ...... ... ...... ...... ............ ......... 147 Multiplexer Complete, code ................................................ 148 Multiply Immediate (MM) instruction .............................. 139 Multiply (M) instruction ...................................................... 139 Mutual Disk Pack Labels ...................................................... 6 NAME aaaaaa, SPS Control record .................................... 86 N (noise) digit, defined .......................................................... 70 NOISE DIGIT n, SPS Control record ............................... , 85 No Operation (NOP) instruction .......................................... 147 Normalizing .......................................................... ;................. 70 NO SUBROUTINES, SPS control record ............................ 86 NO SYMBOLIC DIVIDE, SPS control record,................... 86 OBJECT CORE n, SPS Control record .............................. 85 .object deck format .................................... ,......................... 41 Object program execution (FORTRAN) .............................. 126 Octal Power Table .................................................................. 59 Octal to Decimal (OTD) ...................................................... 140 Operand .................................................................................. 47 address adjustment of ........................................................ 50 asterisk, use of ................................... '. ................ ......... 46, 49 at (@) sign, use of .............................................................. 47 blank in .............................................................................. 47 comma, use of .................................................................... 46 Index 159 Page dollar sign, use of ............................................................. . 47 end-of-line character, use of ... ~ ....................................... . 46 flag indicator ..................................................................... . 47 modification ............................................................. . 51 special characters in ... .... ... ....... ....... ......... ......................... 46 types of addresses used as .......................................... ~..... 49 see also P and Q operands Operating procedures (FORTRAN) ............ :............. :.......... 119 Operating procedures, FORTRAN object programs .......... 129 Operating procedures (SPS) ................................ :................. 84 Operation code coding sheet field ............................................................ ,... 45 Control ....................................................................... ..... 43, 62 Declarative ................. ... ................................................. ... 43,·52 Imperative ...................................................................... 43, 60 Operation of Monitor System .......................................... 4, 136 Operation symbols .................................................................. 97 Operator Entry Indicator code ............................................ 148 Operators FORTRAN .......................................................................... 97 SPS ...................................................................................... 50 Or to Field (ORF) instruction .......................................... 140 Origin .............................................................................. 62, 79 OUTPUT CARD, SPS Control record .................................. 86 Output format .................................................................. 23, 31 card ...................................................................................... 31 paper tape .......................................................................... 32 typewriter ............................................................................ 32 OUTPUT PAPER TAPE, SPS Control record .................... 86 Output Printer (1710) control codes .................................... 58 Output unit codes ................................................ 145, 146, 147 Output instructions .............................................. 145, 146, 147 Output listing (SPS) .............................................................. 87 Overflow, exponent ................................................................ 70 Overlap errors (FORTRAN) .................................................. 129 P operand .......................................................................... 45, 52 modifier constants .............................................................. 78 see also Operands Paper tape I/O ............................................ ,....................... 19 Paper tape read error ............................................................ 21 Parentheses FORTRAN .......................................................................... 98 SPS ...................................................................................... 47 PAUS Monitor Control record ............................... :........ 10, 11 PAUSE statement .................................................................. 102 Period (special character) ...................................................... 43 Permanently assigned programs .......................................... 6 Pick subroutine .................................................................. 67, 72 address equivalents for ...................................................... 71 POBJP Control record .......................................................... 119 PRINT statement .................................................................... 105 Process Branch Indicators 1-20, codes ................................ 148 Process Control Operations .................................................... 62 Process Interrupts 1-12, codes ............................................ 148 Processor (SPS) ...................................................................... 84 Product area .......................................................................... 73 mnemonics .......................................................................... 65 Programming SPS II-D .......................................................... 52 Program switch settings FORTRAN ........................................................................... 128 Loader ........................................................................ :......... 136 Monitor ................................................................................ 4 160 PSTSN Control record .......................................................... PUNCH RESEQUENCED SOURCE DECK, SPS Control record .................................................................................. PUNCH statement ................................................................ PUNCH SYMBOL TABLE, SPS Control record .............. PUNCH TAPE statement ............ ~ ...... ,................................... PUT macro-statement ............................................................ 119 86 105 85 105 81 Q operand .................. ,........................................................ 45, 51 in Immediate instructions .................................................. 47 see Operands Range, DO ............................................................................... 101 Read Alphamerically Card (RACD) instruction ................ 146 Read Alphamerically Paper Tape (RAPT) instruction ...... 146 Read Alphamerically Typewriter (RATY) instruction ........ 146 Read Alphamerically (RA) instruction ................................ 145 Read Binary Paper Tape (RBPT) ...................................... 146 Read check indicator ........................................................ 21, 23 Read Disk (RDN) instruction .............................................. 147 Read Disk Track (RTN) instruction .................................. 147 Read Disk Track/WLRC (RTGN) instruction .................. 147 Read Disk/WLRC (RDGN) instruction .............................. 147 Read Numerically Card (RNCD) instruction ...................... 145 Read Numerically Paper Tape (RNPT) instruction ............ 146 Read Numerically (RN) instruction ...................................... 145 Read Numerically Typewriter (RNTY) instruction ............ 146 READ statement .................................................................... 104 Record mark ...................................................................... 50, 54 RECORD statement .............................................................. 106 Relocatable program ............................................................. . 4 Relocatability, rules ............................................................... . 90 Remarks ................................................................................. . 45 Replace Programs routine ................................................... . 34 Repositioning of DISK access arms ................................... . 20 Restart, manual ..................................................................... . 18 Restore (RSTR) statement ................................................. . 65 Return Carriage Typewriter (RCTY) instruction ............... . 146 RETURN statement ............................................................. . 116 Rules for assignment of DIM entries and/or names ......... . 41 Rules for constructing expressions ..................................... . 97 Rules for statement writing (SPS) ......................................... 45 Save (SAVE) statement ........................................................ 65 Save error count procedure ................................................ 20 Scale factors ............................................................................ 111 Sector, disk address ................................................................................ 58 count .................................................................................... 58 Seek (SK) instruction ............................................................ 147 SEEK macro-statement .......................................................... 81 Select ADC and Increment (SLAD) instruction .................. 149 Select ADC Register (SLAR) instruction ............................ 149 Select Address and Contact Operate (SACO) instruction .... 149 Select Address and Operate (SAO) instruction .................. 149 Select Address (SA) instruction .......................................... 149 Select Analog Output and Signal (SAOS) instruction ........ 149 Select Contact Block (SLCB) instruction ............................ 149 Select Manual Entry Switches (SLME) instruction .......... 149 Select Read Numerically (SLRN) instruction .................... 149 Select Real-Time Clock (SLTC) instruction ........................ 149 Select TAS (SLTA) instruction ............................................. 149 Sequential Program table .................................. ,................... 6 Page Page Set Flag (SF) instruction ______________________________________________________ 147 Sign control in floating-point arithmetic (SPS) __________________ 70 Slash symbol FORTRAN __________________________________________________________________________ 97 SPS __________________________________________________________________________________ 46, 50 Tables 1. Numbered error Messages Generated by Disk Utility Routines __________________________________________ __ 39 2. DMES Representation of Output Printer Control Codes ____________________________________________________________________________ 59 Source program FORTRAN ______________________________________________________ -__________________ _ 117 SPS _____________________________________________________________________________________ _ 84 Space Typewriter (SPTY) instruction _________________________________ _ 146 3. SPS Subroutine Method of Evaluating Arguments __ 4. SPS Subroutine Group and Identification Numbers 67 68 Special characters for statement writing _________________________________________________________ _ 46 permitted in labels ......... _._ ....... __________ .......... ___ ... _______ .. __ ._ .. __ . 43 Specification statements _______________________________________________________ _ 106 SPS Control records _______________________________________________________________ _ 85 SPS Monitor Control record ______________________________________________ 8, 11 SPSX Monitor Control record ____________________________________________ 9, 11 Stacked input __________________________________________________________________________ 13 7. Disposition of SPS Errors when no Error Stop Statement is used -- __________________________________________ __ 8. Codes and Assembled Data for SPS Modification Program ________________________________________________ Statements FORTRAN ________________________________________________________________________ _ 93 SPS _____________________________________________________________________________________ _ 45 STOP statement ___________________________________________________________________ _ 103 STORE CORE IMAGE, SPS Control record ___________________ _ 86 STORE RELOADABLE, SPS Control record _________________ _ 86 Subprogram statements _________________________________________________________ _ 115 SUBROUTINE statement ___________________________________________________ _ 115 Subroutines FORTRAN library _____________________________________________________________________________ _ 123 adding to ___________________________________________________________________ _ 131 Arithmetic and I/O ------------------------------------------------------ 124 SUBROUTINE statement _____________________________________________ _ 115 SPS adding ---------------------------- __________________________ -_______________________ 77 arithmetic ________________________________________________________________________ 66 data transmission, ____________________________________________________________ 66 entry points _________________________________ .__________________________________ 79 equal/zero indicator ______________________________________________________ 71 functional ________________________________________________________________________ 66 high/positive indicator __________________________________________________ 72 identification number ________________________________________________ 68, 79 linkage ________________________________________________________________________ .. __ 68 overflow indicator __________________________________________________________ 72 pairing, --__________________________________________________________________________ 68 sets -----------_______________________________________________________________________ 68 writing, --__________________________________________________________________________ 77 see macro-instructions SUBROUTINE SET nn, SPS Control record ______________________ 85 Subscripted variables ---_________________________________________________________ 97 Subscripts ---------_______________________________________________________________________ 96 Subtract Immediate (SM) instruction __________________________________ 139 Subtract (S) instruction __________________________________________________________ 139 Supervisor program ----____________________________________________________________ 8 Symbol table FORTRAN __________________________________________________________________________ 125 SPS ---------------------- ____________________________________________________________ 86, 87 system -----------___________________________________________________________________ 86, 91 System error ---------------_____________________________________________________________ 22 System header label area, 1401, 1410, 1440 ______________________ 6 System Output format -- ______________________________________________________ 4, 23 indicator codes -----------_________________________________________________________ 24 System Symbol table ----____________________________________________________ 86, 91 SYSTEM SYMBOL TABLE, SPS Control record ______________ 86 ~: iJ::cr~:t~~~u~i;~:sr~;:or--C~d~~--:::::::::::::::::::::::::::::::: ~~ 9. Program Switch Settings for FORTRAN I1-D Compilation ___________________________________________________________ __ 10. FORTRAN Phase 1 Source Program Errors __________ __ 11. FORTRAN I1-D Library Subroutines ____________________ __ 12. FORTRAN Arithmetic and Input/Output Subroutines ________________________________________________________________ __ 13. FORTRAN Loader Errors ________________________________________ __ 14. FORTRAN Subroutine Error Codes ______________________ __ 15. Summary of SPS Declarative Operations ________________ __ 16. Summary of SPS Arithmetic Instructions ______________ __ 17. Summary of SPS Internal Data Transmission 88 92 120 121 124 125 128 130 138 139 Instructions .... __ . __ . ___ . _________ .. ___ ..... ______ . ______ ... __ ... ____ ........... _. __ .... __ 140 18. Summary of SPS Logic (Branch and Compare) Instructions __________________________________________________________________ 141 19. Summary of SPS Input and Output Instructions ____ 145 20. Summary of SPS Miscellaneous Instructions ____________ 147 21. 1620/1710 Indicator Codes for SPS BI-BNI Instructions __________________________________________________________________ 148 22. 1710 SPS Operation Codes ______________________________________ 149 23. SPS Subroutine Execution Times ______________________________ 151 24. 1620 Character Coding ______________________________________________ 152 25. Core Storage Data Resulting from Reading Alphameric Card Data with RN Instruction __________ 153 Tabulate Typewriter (TBTY) Instruction ____________________________ 146 Trace feature, FORTRAN ____________________________________________________ 123 Transfer Control and Load statement __________________________________ 64 Transfer and Return Address statement ______________________________ 65 Transfer Numerical Fill (TNF) instruction ________________________ 140 Transfer Numerical Strip (TNS) instruction ________________________ 140 Transmit Digit (TD) instruction __________________________________________ 140 Transmit Digit Immediate (TDM) instruction __________________ 140 Transmit Field (TF) instruction ____________________________________________ 140 Transmit Field Immediate (TFM) instruction ____________________ 140 Transmit Floating instruction (TFL) ________________________________________________________________ 140 Subroutine (TFLS) ____________________________________________________________ 75 Transmit Record (TR) instruction ______________________________________ 142 Transmit Record, No Record Mask (TRNM) ______________________ 140 TWO PASS MODE, SPS Control record ____________________________ 85 TYPE Monitor Control record __ ~_______________________________________ 10, 11 TYPE statement ---___________________________________________________________________ 105 TYPE SYMBOL TABLE, SPS Control record ____________________ 85 Typewriter I/O ---------_____________________________________________________________ 19 Typewriter read error ____________________________________________________________ 21 Typewriter write error ____________________________________________________________ 21 Unavailable disk drive error ________________________________________________ 22 Underflow, exponent --____________________________________________________________ 70 Unmask Interrupts (UMK) instruction ________________________________ 149 Unnormalized numbers --________________________________________________________ 70 Index 161 Page Page Variable length, defined ........................................................ Variables (FORTRAN) ...............................~.......................... Variable-length mantissa subroutines (SPS) ........................ 66 96 67 WLR-RBC check indicator .................................................... Working areas, subroutine FORTRAN .......................................................................... SPS ...................................................................................... Working cylinders ............................................ 5, 83, 108, Write Addresses routine ........................................................ Write Alphamerically Card (WACD) instruction .............. Write Alphamerically Paper Tape (WAPT) instruction .... Write Alphamerically Typewriter (WATY) instruction .... Write Alphamerically (WA) instruction ................................ 23 162 131 78 130 28 146 146 146 146 Write Write Write Write Write Write Write Write Write Write Write Binary Paper Tape (RBPT) ........................................ 146 check indicator ...................................................... 21, 23 Disk (WDN) instruction ............................................ 147 Disk Track/WLRC (WTGN) instruction .................. 147 Disk Track (WTN) instruction .................................. 147 Disk/WLRC (WDGN) instruction ............................ 147 error count error ........ .................................................. 22 Numerically Card (WNCD) instruction .................... 145 Numerically Paper Tape (WNPT) instruction ........ 145 Numerically Typewriter (WNTY) instruction ............ 145 Numerically (WN) instruction .................................. 145 XEQ Monitor Control record ............................................ 9, 11 XEQS Monitor Control record .......................................... 10, 11 C26-S774-1 TIrnlliir ® International Business Machines· Corporation Data Processing Division 112 East Post Road, White Plains, New York READER'S COMMENT FORM C26-'5774-1 IBM 1620 Monitor II System Reference Manual 2;!T()'VU\M VlHOt .RO lQ30 'r DO .:.' L'f H~~~ J ~ ffi"nj'~Uv\O:» • Your comments, accompanied by answers tcYl}i~f·fdii6.~lhg\.~~~k~~s, help us produce better publications for your use. If your answer If>:;;1;:~~~~,v.~~t~~M~;:~
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 : 2014:03:04 20:31:26-08:00 Modify Date : 2014:03:04 19:57:36-08:00 Metadata Date : 2014:03:04 19:57:36-08:00 Producer : Adobe Acrobat 9.55 Paper Capture Plug-in Format : application/pdf Document ID : uuid:f2c1c147-db0d-ee40-98bb-8ea4170d2f27 Instance ID : uuid:f70240ab-82a4-7541-97f5-edb431c0a43f Page Layout : SinglePage Page Mode : UseNone Page Count : 184EXIF Metadata provided by EXIF.tools