
File No. 1401 -25 Form C24-1455-2 Systems Reference Library Fortran Specifications and Operating Procedures IBM 1401 PROGRAM NUMBER 1401-Fo-050, VERSION 3 This reference publication contains the language spec­ ifications necessary to code a 1401 Fortran source pro­ gram and the procedures for assembling and running the object program. In addition to describing the 1401 Fortran language, the specifications section also con­ tains descriptions of: 1. the control card 2. the phases of the compiler 3. the arithmetic and input!output routines generated by the compiler 4. the 1401 Fortran facility for linking programs or segments for continuous processing and 5. the input/output routine option provided in 1401 Fortran. In addition to the procedures for assembling and - running the object program, the operating procedures section also includes explanations of: 1. compiler output 2. compiler diagnostics 3. object-program storage allocation and 4. object-program halts. The reader should be familiar with the Fortran General Information Alanual, Form F2B-B074, and the IBM 1401 configurations required for the assembly and the execution of the object program. Additional pub­ lications concerning the ffiM 1401 system can be found in the IBM 1401-1460 Bibliography, Form A24-1495. This is a reprint of an earlier edition, and incorporates the following Technical Newsletter: Form No. N21-0046-0 15, 20, 22, 28, 29, 4/27/65 33, 40, and 42 Copies of this and other IBM publications can be obtained through IBM Branch Offices. A form is included at the back of this manual for readers' comments. If this form has been removed, address comments to: IBM Corporation, Product Publications, Dept. 245, Rochester, Minn. 55901. © International Business Machines Corporation 1964 Contents Fortran Specifications - IBM _1401 ............................. 5 Machine Requirements ............................................ .............. 5 Source Program Characters .................................................. 6 \Vriting the Source Program ................................................ 6 Punching a Source Program .............. .................................... 7 Constants, Variables, Subscripts, Functions, and Expressions ............................................................ 7 Arithmetic Precision .............................................................. 7 Constants ................................................................................ 7 Variables .................... .......................................... .................... 8 Subscripts 8 Functions ................................................................................ 9 Arithmetic Expressions .................... .................. ........ ............ 10 1401 Fortran Statements .............................................. 11 Arithmetic Statement ............................................................ 11 Control Statements ................................................................ 12 Input/Output Statements ...................................................... 14 Specification Statements .................... .................... ................ 21 Input/Output Option 22 Program Linkage .............................................................. 22 Linkage Statement .... .......................................................... .... 23 Title Cards .............................................................................. 24 The Monitor Program ............. .......... ............ ......................... 25 The Proce·ssor Program ................................................. 26 Control Card .......................................................................... 26 Logical Flow of the Processor .............................................. 26 Arithmetic Operations ................... ............... .......................... 30 Input/Output Operations ......................................... ,............ 35 Performance Data 36 Fortran Operating Procedures - IBM 1401 ........... 38 Compiling Operation Procedures .......... ........ ............ .......... 38 Object Program Operation Procedures ................................ 42 Running Programs Containing Linkage Routine ........... ....... 43 Sample Programs .............................................. ...................... 43 Index ...................................................................................... 61 Fortran Specifications' - IBM 1401 The IBM 1401 Fortran is a symbolic programming sys­ Machine Requirements tem composed of (1) a language and (2) a processor The minimum machine requirements for the compila­ program (compiler). Symbolic or source statements are tion of a 1401 Fortran source program are as follows: coded using the 1401 Fortran language, which closely resembles the language of mathematics. The source 8,000 positions of core storage program is a particular sequence of source statements. Advanced Programming Feature After being coded on the Fortran Coding Form, Form High-Law-Equal Compare Feature X28-7327 (Figure 1), the source statements are punched Multiply-Divide Feature into cards, which are then used as input to the 1401 One IBM 1402 Card Read-Punch Fortran compiler. The compiler translates the source One IBM 1403 Printer, Modell or 2 program to a 1401 machine-language program (object program) that can be executed immediately or punched One magnetic tape unit, the IBM 729 or the IBM 7330, into cards for future use. may be used to store and load the 1401 Fortran cam- Form X28· 7327 Printed in U.S.A. IBWl FORTRAN CODING FORM Program Coded By ___________ Date ______ Checked By Identification Page __ of ___ 73 80 C FOR COMMENT ~TEMENT ~ NUMBER .3 FORTRAN STATEMENT I 5 6 7 10 15 20 25 30 35 40 45 50 55 60 65 70 72 I I ..1 1 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 I I I I 1 I I I Figure 1. Fortran Coding Form 5 piler. The Sense Switches feature may be used to pro­ 0-2-8 (prints as record mark) will be tolerated, but vide a 1403 listing of the object program during vari­ no characters following it in the statement ous stages of compilation. will be processed even if it is merely a member of an H-conversion format specification. The minimum machine requirements for exec:ution of the compiled object program are as follows: 8,000 positions of core storage Advanced Programming Feature Writing the Source Progam High-Low-Equal Compare Feature Each Fortran statement begins a new line of the cod­ Multiply-Divide Feature ing form. (Two statements may not appear on the One IBM 1402 Card Read-Punch same line.) Statements that are too long to fit on one line, however, may be continued on subsequent lines. One IBM 1403 Printer, Modell or 2 Statements and information are arranged on the coding sheet as follows (comments and continuation lines are handled separately): Source Program Characters 1. Columns 1-5 of the :6.rst line of a statement may The following chart indicates the list of characters contain a statement number, which can be refer­ 1 which may be used in a Fortran source program: enced by another Fortran statement. Statement numbers are unsigned and may range from 1 to Card Card Character Code Character Code 99999. Leading and trailing blanks and leading zeros in statement numbers are ignored by the Blank M 11-4 12-3-8 N 11-5 1401 Fortran processor. If no statement number is 12-4-8 0 11-6 needed, columns 1-5 may be left blank. + 12 P 11-7 2. Column 6 of the :6.rst line of a statement may be $ 11-3-8 Q 11-8 either blank or punched with a zero as the user * 11-4-8 R 11-9 wishes. See Continuation Lines. S 0-2 11 3. Columns 7-72 contain the Fortran statements. A / 0-1 T 0-3 statement cannot consist of more than 660 charac­ 0-3-8 U 0-4 0-4-8 V 0-5 ters (i. e., 10 lines - see Continuation Lines). The 3-8 W 0-6 Fortran processor ignores blank characters except A 12-1 X 0-7 in the case of H-conversion (see H-Conversion). B 12-2 Y 0-8 Blanks can be used freely to improve the readabil­ C 12-3 Z 0-9 ity of the source program. D 12-4 0 0 4. Columns 73-80 are not processed. They can be used E 12-5 1 1 to punch card numbers or other identifying infor­ F 12-6 2 2 mation. G 12-7 3 3 H 12-8 4 4 I 12-9 5 5 J 11-1 6 6 Continuation Lines K 11-2 7 7 When a Fortran statement is too long to fit on one line L 11-3 8 8 of the coding sheet, it may be continued on the next 9 9 line or lines. A statement may take up to nine con­ tinuation lines, or a total of ten lines (660 characters). No other card codes are acceptable in 1401 Fortran source program statement cards, with the following A continuation line is coded as follows: exceptions: 1. Columns 1-5 are blank. 4-8 will be taken to mean - (minus). 2. Column 6 contains any character other than zero or 11-3-8, which normally has meaning $ only when it blank. appears as H-conversion text in a FORMAT 3. Columns 7 -72 contain the continuation of the statement, will be taken to mean * when it ap­ Fortran statement. Column 7 can be considered as pears elsewhere. In this event a message will following column 72 of the preceding line. be printed in the source program listing in 4. Columns 73-78 are used for identification. The the same line as the statement. processor does not process these columns. 6 Fortran: 1401 Specs. and Op. Froc. FOR Ie '-COMMENT STATEMENT FORTRAN STATEMENT IDENTIFICATION NUMBER 010 0 0 0 0 0 0 0 () Il 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nOD 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 112 3 4 5 7 8 9 10 11 12 13 14 15 IS 17 18 19 20 21
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages66 Page
-
File Size-