Text preview for : R23-9518-0-1_FORTRAN_CE_Manual_1959.pdf part of IBM R23-9518-0-1 FORTRAN CE Manual 1959 IBM 704 R23-9518-0-1_FORTRAN_CE_Manual_1959.pdf



Back to : R23-9518-0-1_FORTRAN_CE_M | Home

1




C

Customer Engineering 1
> .*
Manual of Instruction I V
k




.?
1 FORTRAN
" I;'N,AND 7 0 9
*,I,


a I




a 1
C
C.
c,,
C. I




Customer Engineering
C
Manual of Instruction
c,
C..
C
C




L,
f - . FORTRAN
L... 8

I, II, A N D 709
Issued to:

Department or Telephone
Branch Office Number-


Address City-State-


Home Address City-state-



If this manual is mislaid, please notify the above address.




@ 1959 by
International Business Machines Corporation

Form R23-9518-0
Printed in U.S.A.
FOREWORD

THE PURPOSE of this manual i s to familiarize the IBM customer engineer with the
language and data processing methods found in the Fortran automatic coding systems.
Some service hints are also included where available.

The reader is expected to have at least a cursory knowledge of the Fortran Primer
and Fortran Reference manuals. With this background, the material in this manual
can be of great value; without it many points will be obscure. Wherever possible,
references are made to the two manuals just mentioned.

Much thought has been given to what should be included in this manual. A survey
of customer engineering opinion indicates that the most difficult problems are ex-
perienced in the data transmission area. Therefore, this manual concentrates most
heavily on input-output, and mentions arithmetic processing only briefly.

A word should be said concerning the interrelationships of the various Fortran
systems. At this time the Fortran I and I1 systems have been stabilized; that is,
C.
. there will be no more major changes in the organization of their executive programs.
The Fortran 709 system i s at present in a state of major change. In general, much
will be common in all three systems. For instance, the function of all tape units in
the three Fortran modes will be the same. Where the drum was used in Fortran I
and 11, upper core storage will be used by Fortran 709. More diagnostic routines are
written into Fortran I1 and Fortran 709 than in Fortran I. All manual operation
features of the three systems are alike, except for the use of sense switch 6 to control
batch compiling in Fortran I1 and Fortran 709.

This manual supersedes the Fortran Translator Customer Engineering Manual of
Instruction, Form 29-9437-0. It supplements the following published IBM manuals:

Title Form

Programmer's Primer for Fortran 32-0306
Programmer's Reference Manual Fortran 32-7026
IBM Reference Manual, Fortran I1 (S) C28-6000
IBM Reference Manual, Fortran I1 (S) C28-6001
IBM Reference Manual, Fortran Automatic
Coding System C28-6003
IBM Fortran Gener a1 Information Manual F28-6019
CONTENTS

1.00.00 FORTRAN EXECUTIVE 2.00.00 GENERAL FORTRAN RECORD
ROUTINE . . . . . 7 STRUCTURE . 33

1.01.00 Introduction . . . . . 2.01.00 CALLFN Record . . . . 33
1.02.00 General Organization of 2.02.00 CLOSUB Record . 33
Translator . . . . 2.03.00 Compiled Instruction Tables
1.02.01 Section 1 . . . . . (CIT) . 3 3
1.02.02 Section 1 . '. . . . 2.04.00 Common Record . . . . 34
1.02.03 Section 2 . . . . . 2.05.00 DIM Record . 35
1.02.04 Section 3 . . . . . 2.06.00 DOTAG B Format . . . . 36
1.02.05 Section 4 . . . . . 2.07.00 END Record . 37
. .
1.02.06 S e c t i o n 5 a n d 5 ' . 2.08.00 EQUIT Record . 38
1.02.07 Section 6 . . . . . 2.09.00 FIXCON Record . . . . 38
1.03.00 Number of Instructions in 2.10.00 FLOCON Record . 39
Each Section . . . . 2.11.00 FORMAT Record . . . . 39
1.04.00 Fortran Systems Tape . . 2.12.00 FORSUB Record . 39
. .
1.04.01 General Organization 2.13.00 FORTAG Record . . . . 40
1.04.02 F o r t r a n I Ordinary System 2.14.00 FORVAL and FORVAR
Records . . . . Records. . . 40
1.04.03 1-CS (Tape 1 to Core 2.15.00 FRET Table . . . . . 41
Storageprogram). . 2.16.00 HOLARG Record . . . . 42
.
1.04.04 The Tape Record Monitor 2.17.00 LAMBDA. ALPHA. and BETA
.
1.04.05 Listing of 1-CS on Tape Tables . . 42
.
1.04.06 Listing of 1-CS in Storage 2.18.00 NONEXEC Record . . . . 43
1.04.07 Control Words of 1-CS. 2.19.00 SIGMA and TAU Tables . . . 43
Monitor . . . . 2.20.00 SIZE Record . . . . . 45
1.05.00 Updating the Edit Deck. . 2.21.00 SUBDEF Record . . . . 45
. .
1.06.00 Fortran Tape Assignment 2.22.00 TDO Record . . . . . 46
1.07.00 Relating Tape Assignment 2.23.00 TEIFNO Record . . . . 46
Fortran I & I1 to Fortran 709 2.24.00 TIFGO Record . . . . . 47
1.08.00 Fortran Source Program 2.25.00 TRAD Record . 49
CardFormat . . . . 2.26.00 TSTOP Record . . . . . 50
.
1.09.00 Using the Fortan System Tape
.
1.10.00 Running the Object Program 3.00.00 FORTRAN AUTOMATIC CODING
1.11.00 Description of Tape and Drum SYSTEM. . . 51
Usage During a Fortran I Run
1.12.00 Service Aids . . . . . . .
. . .
1.13.00 Fortran I1 Refinements. . TABLE I . 62
1.14.00 Answers t o Common General
. .
Questions Involving Fortran 30 TABLE I1 . 64
1.00.00 FORTRAN EXECUTIVE ROUTINE


1.01.00 INTRODUCTION


The problems involved in man's communication with the complex computer
a r e in many respects similar to those problems involved with his communi-
cation with another man who speaks an unfamiliar language. There must be
language translation in either situation in order that the communication be
fruitful. In considering current problems of communication with the computer
we will consider here only the medium of "writtenMlanguage, although there
a r e research teams seriously engaged in communicating with the machine by
the spoken word.

The Frenchman who must learn English has a great advantage over the
Oriental who i s faced with the same task. The former need not learn a
new set of symbols (Roman and Arabic) that i s the first task of the latter.
The position of man and machine i s more akin to the Oriental's problem
of learning English than that of the Frenchman. Man must first learn the
symbols that the machine uses to build its words.

The machine's symbolism (speaking now of the 701, 704, 709, and 7090) is
binary in nature. The need for recognition of two symbols makes the internal
circuitry of the machine relatively simple. In terms of machine hardware,
the binary symbol takes the form of a component conducting or not conducting,
a pulse available or not available, a core saturated in one direction or the
opposite direction, o r a changing magnetic flux on tape or the lack of that
change. The internal evidence of this binary symbolism i s brought to the
surface of the machine in the readable fokm of light patterns. The individual
lights are binary, in that they are either on or off. Needless to say, the nor-
mal man has little difficulty learning the binary symbolism of the computer.

The Oriental should not be considered an English scholar, simply because
he has learned the 36 symbols that express all our literature. Similarly, the
man who wants to communicate with the machine should not feel satisfied that he
knows machine language by virtue of his recognition of the on or off condition
of a light. He must learn the limitations and rules involved in grouping the
symbols together into intelligible patterns to form words, and those words
into complete thoughts.

In considering words of the English language, we know that the words can
be categorized into one of seven types (nouns, verbs, adjectives, and s o on)
depending primarily upon their use in a sentence. When considering binary
language, the types of words recognizable by the machine are clearly defined
by their use in a program and fall into the following categories.
Operation Code. Command to the machine to perform a given sequence of
events (E. g. , the binary bit pattern 000101000000 informs the computer:
"Remove a number fr0.mcore storage and place that number into a central
processing unit register called the accumulator. If another number i s already
in the accumulator, destroy it. 11)

Address. Action in the computer cannot take place unless the location of an
activity i s defined. The address defines the location of activity during the
execution of an instruction. In the example given in the definition of an instruc-
tion, the core storage cell from which data is withdrawn has a location called
an address (e. g. , 01010101). Similarly, if an operation code informs a tape
unit to write, an associated address defines which specific tape unit is to
perform this action.

Data. Arithmetic processing involves the combination of numbers. Usable
numbers must have magnitude and sign and should be expressible in either
fixed point (1.64,268) or exponential form (3 x lo6, 1.6 x 10 -4). The internal
circuitry of the computer expresses all these factors in binary form.

AddressModifiers. It is possible to perform the same series of operations
many times on different areas of the machine, without repeating the writing
of the instructions, through modification of the addresses associated with the
instructions. The address modifiers alter the addresses between successive
executions of the instructions. This is comparable to the use of business
routing forms where the originator fills in the blanks, indicating destinations
of the information. For example:

Form number-is forwarded to , , and v i a -
on the following dates: a n d - .
The blanks represent areas of activity; the preset wording represents the
commands that a r e unchanging. The selection of words to "fill in the blanks1'
in a computer i s controlled by address modification words. Generally, the
select ion i s sequential in nature.

What can man gain by grouping the computer's words together? Consider
first the grouping of operation codes. The uninitiated vChinamanllwill be
delighted to learn that there a r e only 200 or less combinations of words that
can be called operation codes. He says to himself, "If I could express these
A, B, C combinations in Chinese, which is familiar to me, I will have little
difficulty remembering all the operation codes. "

This system has been adopted by the users of computers. IBM and the SHARE
organization have established a standard set of symbols to take the place of the
operation code bit-no-bit pattern. This symbolism is in the form of abbrevia-
tions of the function of each code. These symbols are called mnemonic because
they a r e reminders of the function. The following chart illustrates the point.
Machine Language Function Mnemonic Code

000100000000 ADD to the current value in the ADD
accumulator

000010000000 MULTIPLY the present value of the MPY
given register by a given number

000000010000 TRANSFER to a new location when the TRA
next instruction is required

000110000001 STORE the contents of the MQ STQ
register in core storage
Consider again the Oriental's problem of learning English. In the light of
the previous paragraph, he has learned that groups of symbols are called words,
and there seems to be no end to the combination of symbols. In order to
systematize his approach to the language learning problem, he knows that he
can group the words in categories depending on their usage. This grouping
brings out common factors from which general conclusions can be drawn.
Once the general conclusions a r e accurately drawn, the learning of the new
language i s reduced to expansion of well established facts. Unfortunately
for the Oriental, English cannot be resolved into a collection of precise,
arithmetic formulae. Therefore, he is always faced with modification of
his general conclusions.

The man communicating with the machine, however, does not have to
contend with this "grey area" of learning. After all, the machine is just
a machine. Provided it is operating in the manner for which it was designed,
the message delivered by a given command will be identical on the first
and millionth pass. The mechanism i s designed to respond in a s predictable
a series of events a s those which occur when a simple lever is operated.

Notice that the language of the computer i s highly precise in form, as is
the mnemonic code. There is no need for confusion intranslating from the
mnemonic to binary--and yet the translation must be accomplished.

The next question i s , which agent in the transaction should learn the foreign
language? (It is only necessary for the Oriental to learn English in order
to communicate with an ~iqglishman. If the Englishman were also to learn the
other language, a redundant effort would be made. ) Based on its speed and
accuracy and its untiring effort, the computer was selected a s the translator.

Fortran is a program which controls the machine to accept our familiar
notation and pass on the binary translation to the machine circuits. Man
writes his operation codes in familiar mnemonic and the machine translates
the mnemonic to binary. This translation i s one of the functions of Fortran,
SCAT, and other assembly routines. An important difference in Fortran is
that the machine does not start with mnemonic language but rather with a
special, concise Fortran language of mathematical symbols from which it
generates its mnemonic and binary operation codes. It is to be emphasized
here that the prime function of the Fortran system was to permit the math-
ematician to use his symbols rather than SHARE mnemonic codes in
controlling the machine. The word Fortran is a contraction of Formula Translation.
The following diagram shows how the Fortran language relates to mnemonic.

Fortran Language Mnemonic Function Machine Language

ADD Add to the current 000100000000
value in the
'



ac cumulator

TRA Transfer to a new
location when the
next instruction
is required

X=A + B *ST0 Put the current value
of A + B in storage
cell X

*The ST0 represents the mnemonic translation of the equal sign only.

The ultimate goal in translating the Fortran language to usable form is a binary
object program. In writing the binary program, Fortran also writes its own series
of mnemonic instructions. A listing of the mnemonic program i s available to the pro-
grammer under sense switch control, in addition to a binary punched object program.

In review, we have considered only one part of the machine language, operation
codes. Through our analysis we learned that the number of operation codes was
limited. The machine assumes the burden of translation. Also, since the machine i s
concise in its language, we must be concise in the language we use in communicating
with it. Fortran language is a form of mathematical language which meets the quali-
fications of precision. Fortran :mnemonic instruction coding i s a secondary output of
the prime function of converting from the mathematical source program to the binary
object program.

Let us focus our attention on the second category of machine words -- addresses.
We have stated that addressing defines the area of activity of an operation code. How
can these addresses be best grouped and then subjected to translating from binary to
familiar language? Grouping can best be accomplished by considering core storage
as opposed to non-core-storage locations.

Core storage addresses each have well defined binary "cell numbersll similar to
the house numbers on a given street. The number of numbers depends on how long
the street is or how large core storage is. (From the Fortran point of view, there
are different programs written for 4k and 8k systems. )

Again, difficulty i s experienced in communicating in the binary symbolism of the
machine when referring to core storage addresses. Man has grouped his addresses
into octal notation by considering groups of three binary lights to produce eight possi-
ble light patterns. By inspection, in other words, man has simply translated binary
to octal notation for ease of communication (from one man to another). The combina-
tion of a mnemonic operation code and address is called an instruction; e. g. , C LA
0700, clear and add the number which i s at storage location 0700. With the mnemonic
notation of operation code and octal addressing, man is prepared to program the com-
puter. He can specify precisely what i s to happen (operation code) and where it i s to
happen (address). However, in using the octal address notation already described,
the programmer i s limited in his programming flexibility, Programming of the type
just described (CLA 0700) i s called absolute addressing because the address (0700) is
inflexibly 0700. If for some unpredictable reason the data at 0700 was moved, the
CLA instruction must be altered to meet the requirements of the new data location
and, for that matter, any absolute address in the program may have to be altered to
meet unpredictable requirements.

In order to take into consideration future needs of a given program, absolute ad-
dressing was replaced by symbolic addressing. Essentially , symbolic addressing
put the bookkeeping job of assigning data and instructions to storage squarely on the
shoulders of the computer. Using the preceding example, the CLA 0700 instruction
in symbolic form might appear as CLA R, where R is now an arbitrary symbolic
address. The machine has the capability of doling out the storage area to a given
program and eventually assigning an absolute value to R once all the needs of the
program have been satisfied. The assignment of core storage locations to instruc-
tions and data i s called assembling. Assembly i s one of the functions of UASAP 1
and 2, UASAP 3 and 4, SCAT, and Fortran. Fortran differs from the other executive
routines listed because the programmer has no control over the symbols used as
symbolic addresses by the Fortran program. This i s a great advantage in that the
programmer using Fortran need not be concerned with the details of keeping track of
symbols. (Because the programmer using SCAT must make constant reference to
his symbols, it i s best that he have his choice of symbols for his addresses.) The
symbols that the machine has manufactured for its core storage addresses will ap-
pear in the printed symbolic listing of the Fortran assembled program.

In summary, although core storage addresses represent one of the major cate-
gories of machine "words, fl the programmer using Fortran need not concern himself
with these addresses because the machine assigns both symbolic and binary addresses
to the object program.

Let us next consider the non-core storage addresses. Input-output devices all have
addresses. Unlike core -storage, these devices provide the programmer with
his program results. If results are to appear on tape, for example, the programmer
must have control over which tape i s to receive this information. The Fortran
program cannot assign arbitrary symbolic and absolute binary addresses to input-
output media; this assignment i s the responsibility of the programmer. A family
of Fortran statements i s provided to specify use of tapes, card machines, drum,
sense lights, and sense switches during the run of the object program. The language
used is specific and closely resembles the standard SHARE coding. For example:

SHARE Fortran Statement

RDS 302 READ DRUM 2*, 1, AB
WRS 232 WRITE TAPE 2*, AB

*The 2's in these statements are drum and tape unit addresses.
Consider next the data. Like the operation code and the address, the internal cir -
cuits of the machine respond only to the data in binary notation. However, Fortran
controls the machine to accept decimal notation and to pass on the binary equivalent
to the machine circuits. In addition, when required, Fortran control informs the
machine to translate the binary back to understandable decimal for the printed report.

Using Fortran, data coming into the machine during the run of the object program
can be alphabetic, decimal, fixed point, floating point, on tape, or on cards. No
standard form is required of the data because the author of the source program de-
scribes the form with Fortran statements, called Format statements. Format state-
ments describe the data cards according to field length, floating versus fixed point,
sign, and placing of the decimal point.

Address modifiers like adverbs are difficult to describe in general terms. Their
use is associated only with the modification of core storage addresses. They add
finesse to the programmer's technique by relieving him of the monotony of repeating
instructions used in a repetitive manner. Address modification is defined in terms
of operation codes, addresses, and a new term, index registers. Index registers a r e
central processing unit devices. Index registers enter into the discussion because
they contain the amount that an address is changed during a given operation. For
example: TRA 6000, 1 is an ''indexedMinstruction written in SHARE symbolic. In
everyday terms it says lltake the next instruction from location 6000 less the amount in
the number one index register. " Therefore, if the index register contained 1000, the
transfer would take place to location 5000 instead of 6000. Address modifier words
describe the contents (i. e. , 1000) of index registers and the "nameMof the index regis-
t e r (i.e. , 1). There are three index registers in the 704 and 709, identified in SHARE
symbols as 1 , 2, and 4. Whenever an index register i s called for in an instruction such
as CLA, TRA, or STQ, the contents of the index register are subtracted from the ad-
dress of that instruction. Other instructions (e.g. , TM, TXI, AXT) alter the contents
of the index registers. Simply by using the notation already introduced in operation
coding and addressing, a system of address modification can be built into a UASAP 1
and 2, UASAP 3 and 4, or SCAT program. How does Fortran handle address modifiers?
Easily understandable Fortran statements are translated to address modifiers. Con-
sider the Fortran l1DOM statement. This statement permits the programmer to repeat
a series of commands. For example:

External Formula Number
1 DO25 I = l , 1 0
A(1) = B+C
R(1) = A*D
25 PRINT 1 . A (I), R (I)
STOP

The first statement (1)indicates the address modifiers. It says ''the object pro-
gram should execute the following statements up to and including the one labeled 25.
It should repeat this process from the time that I has an initial value of 1up to and
including the time that I equals 10, each time through the program increasing I by
a factor of 1. l 1 The contents of the index register would initially be 10, and indexing
instructions would be built into the object program to reduce these contents by 1 ,
each pass through the program. The selection of which index register (1, 2, or 4)
i s to be used in the object program is the choice of the Fortran program. A series
of SCAT coded instructions to accomplish the same result would require several
dozen instructions.

In conclusion, the Fortran system contains a concise language, mathematical in
background, employing familiar symbols which are readily translated to machine
binary coding. The programmer need not learn anything more about the machine
than the limitations placed on his mathematics by the physical size of the machine and
some statements governing the input-output transmission. In the run of the Fortran
executive routine, Fortran language i s translated to SHARE mnemonic and relocatable
binary cards. The SHARE symbolic operation code listing i s only secondary to the
machine control. Addressing of core storage i s symbolic and i s entirely under control
of the machine. Input-output addressing i s under option of the programmer. Data
can be of any decimal form, a s i s described by Format statements in the program.
Address modification i s employed by the Fortran program but i s given to the program-
mer in easily understood language. The selection of index registers and indexing
instructions i s made by the computer under control of the Fortran translator program.



1.02.00 GENERAL ORGANIZATION OF TRANSLATOR

In all three Fortran modes (I, 11, and 709), the translator i s described in terms
of six sections. Each section is distinct in purpose. Section 3.00.00 of this manual
describes, in programmer's terms, the functions of each section of the translator.
A digest of Section 3.00.00 follows in Section 1.02.

1.02.01 Section I

In this translator section, source cards, punched in the Fortran language, o r BCD
tape containing the source information, are read into the system. If card input i s
used, the information on the cards i s transmitted to tape 2 in BCD. If tape input
i s used, tape 2 i s originally set up with the source program in BCD.

With tape 2 containing the source program, the translator proceeds to code all
the statements in the source program. Every statement receives a code number,
called the "internal formula number" (IFN). These numbers are assigned in sequence
starting with 1. All internal references to the original statement a r e made using
IFN as identification. The IFN i s not to be confused with the "external formula number"
(EFN) punched in the source program cards. Input-output statements receive more
than one IFN.

The scanning of the BCD file on tape 2 occurs only once. All information con-
tained in this file must be coded as it i s being read. The information will take one
.
of two forms: compiled instruction tables (CIT) or non-CIT (The CIT format i s
described in detail in Section 2.03.00. It i s a standard form, and the final form of
all Fortran statements and data before they a r e compiled in Section 6). The CiT
information i s stored temporarily on tape 3 in Section 1. This information i s erased
during Section 1' and i s stored on tape 2, file 2. The CIT contains the results of
analysis of all arithmetic statements. This analysis i s completed in Section 1.
It is the most important part of the Fortran program in that it accomplishes the
translation between source arithmetic statements and machine instructions.

A l l arithmetic instructions written in this section are written in CIT form and
placed in a record called the COMP AIL file (Complete Arithmetic, Input-output,
Logical).

The non- CIT information is stored in buffer areas temporarily in core storage.
When the buffers are full, their information is transferred to tape 4. The buffer units
are ten words long and located in lower storage.

1.02.02 Section 1'

Section 1' places the CIT information of tape 3 on the second file of tape 2, arranges
the tape 4 tables in order, and stores the information in tape 2, files 3, 4, and 5.

1.02.03 Section 2

Section 2 compiles the instructions associated with indexing that result from DO
statements and the occurrence of subscripted variables. These instructions are
placed in the COMPDO file in CIT form.

In this section the program assumes that there are many index registers in the
machine. Indexing instructions are going to be generated through the use of:
Arithmetic statements. For example, I = N + 1 where N i s a subscript.
The contents of an index register will be increased by one.
D statements. For example, DO 10 I = 1, 5. Here, statements up to and
O
including 10 will be repeated for all values of I from 1to 5. To the reader
familiar with programming, this statement implies the use of indexing
instructions to accomplish the given result. The handling of indexing becomes
more complex where DO statements fall within DO statements to create
llDO nests. l 1
Combination of arithmetic and DO statements.

1.02.04 Section 3

Section 3 merges the COMPAIL and COMPDO files into a single file, meanwhile
completing the compilation of non-arithmetic statements begun in Section 1. At this
point the object program is complete but it has been assumed that the 709 is a machine
with an unlimited number of index registers .

1.02.05 Section 4

Section 4 carries out an analysis of the flow of the object program to be used by
Section 5. The running of the object program is simulated in order to do this. The
object program may be run several hundred times in this section.
1.02.06 Section 5 and 51

Section 5 manipulates the symbolic tag information so as to write the object pro-
gram with the three actual index registers of the 704-9. The processing is very
complex; however, certain tabled information of interest is generated during the run.
All major decisions concerning index registers are recorded in the predecessor
(PRED) table, and a table of all tagged instructions (STAG) is recorded. These a r e
one-word entry tables which remain in core storage.

Section 5' is generally considered a bookkeeping section. Up to this point the
constants involved in the object program have been stored in tables. Since all
information from the translation must get to the object program in compiled instruction
tables (CIT), a departure i s made from the normal sense of CIT1s in that the constants
are also transmitted in this form. In the place of an instruction code, the SAP
mnemonic for octal data (OCT) is entered into the decrement field of the second word
of the CIT entry. In this form the information from the following tables is recorded
in the object program: FMCON, FLOCON, ASSIGNED CONSTANTS, FORMAT and
UNIVERSAL CONSTANTS.

1.02.07 Section 6

Section 6 assembles the object program, producing a machine language program on
cards or tape ready for running. The object program can also be produced in Share
symbolic language, if desired.

1.03.00 NUMBER OF INSTRUCTIONS IN EACH SECTION

There are approximately 24,000 instructions in the Fortran executive program.
The number of instructions in each section of Fortran I are a s follows:

Section No. No. of Instructions




1.04.00 FORTRAN SYSTEM TAPE

1.04.0 1 General Organization

The complete Fortran translator program is written on the Fortran system tape.
The program is written and executed in sections, each section consisting of a number
of variable-length records. An individual record is called into core storage from the
system tape when it is needed.

Versions of the Fortran translator differ according to size of the 704 used to run the
program. The most common version is designated 4- 1-4-1. This program requires
a single 737 (4k words), a single 733 Drum (8k words), and four 727 tape units. There
is also an 8-1-4-1 version almost identical to 4-1-4-1 except that it requires a
704 with two 737 I s providing Bkstorage. For large programs it will run considerably
faster than the 4- 1-4- 1 version. There is another modified Fortran version for use
on 704% with the 738 (32k words and no drum).

The system tape has three files. The first two files a r e the executive routine o r the
system proper. The third file is the library (FSgure 1). File 1 contains a special
f i r s t record called 1-CS and 7 other ordinary system records (Figure 2.) The end-of-
file mark is not considered to be an ordinary system record. File 2 of the Fortran
system tape consists of ordinary records numbered 8 through 67 (Figure 3). These
records a r e not called into core storage and executed in sequence, but a r e executed in
the order shown in Figure 4. F i r s t of all, the special program 1-CS, the first record
(number 0) in file 1, is loaded. Then 1-CS reads in record 1. This is the first
executable record of Section 1. It i s called the "card-to-tape simulator. It reads
the source program from the card reader. This source program, consisting of
Fortran statements, is converted to BCD and written on tape 2. The EOF signal
from the card reader causes the skip to the beginning of file 2. Records 8 through
67 a r e then executed in sequence. The following list specifies the records of file 2
and the section of which each is a part, for Fortran I.
Section No. Records Included
1 8-20
2 21-36
3 37-41
4 42-48
5 49-54
5 55-67
6 2-7


1.04.02 Fortran I Ordinary System Records

The first word of each system record is a check sum for that record; it is placed
in location 2 by the 1-CS program (Figure 5). The second word of each record is a
control word which is placed in location 178. The address field of the control word
gives the first storage location into which the first step of the program is to be stored.
This location is called the llload address." The remaining words of the program will
be stored in consecutive locations above the first location o r load address.

The decrement of the control word contains the address to which control is to be
transferred after the record has been completely read (Figure 6). This address is
referred to a s the llTRA address."

The information stored in location 17 can be displayed to find out the last TRA
and LOAD address handled by the 1-CS program. This information could be helpful
if the machine "hangs upt1somewhere in the running of the Fortran program o r comes
to a halt at some storage location not in an e r r o r stop listing. Table I shows the
TRA and LOAD a d d r e ~ s e s the various records of the Fortran program, providing
for
a reference for determining what record or what area of the program is failing. By
displaying location 178 and using the table, the particular record and section where
the stop i s encountered can be identified. This does not necessarily mean that the
e r r o r is in this particular record, since the trouble could be introduced earlier and
not indicated at that time.
FILE I FNLE 2 EOF FILE 3 EOF




FORTRAN E X E C U T I V E
PROGRAM OR S Y S T E M PROPER LIBRARY
Figure 1. Fortran System Tape




- '
I
4
SPECIAL
F I R S T RECORD
I-cs
7 ORDINARY S Y S T E M
RECORDS

Figure 2 . File 1 of the System Tape




6 0 ORDINARY S Y S T E M 4
RECORDS


Figure 3. File 2 of the System Tape


LOAD



Y
I-CS




FlLE 2 FlLE 3
F




RECORD I
* RECORD 8 LIBRARY

9

2 -10
3 4 -11

4 - 12

5

6



STOP 7775
-65

-66

V -67




Figure 4. Execution Order of the Recordr

17
Figure 5 . Ordinary Fortran Record

TRA ADDRESS LOAD ADDRESS


STORE RECORD PROPER

LOCATION 17 ADDRESS A F T E R T H E BEGINNING A T T H I S

RECORD I S READ. ADDRESS


3 DECREMENT 17 21 ADDRESS 35

Figure 6 . Record Control Word

After record 67 is loaded, a search through the library, file 3, follows to incorpo-
rate any library functions into the compilation. When this search is completed, the
system tape is rewound and the first two records of file 1a r e skipped. Records 2
through 7 a r e loaded and executed. These six records comprise Section 6 of the
Fortran program. At this point the Fortran run is complete. This arrangement of
the program into records on tape requires a program within the machine that allows
the next record to be read when it is signaled that the previous record is completed.
This program is called 1-CS and is described in detail in the following section.

1.04.03 1-CS (Tape 1to Core Storage Program)

It is important from a service standpoint for the customer engineer to understand
the 1-CS self loading program. This short program is relatively simple but it is the
key program in monitoring the progression of the Fortran translator. With a knowledge
of the loader the customer engineer can better determine which record of the trans-
lator is failing. A listing or a map of the translator will have to be used by the
customer engineer to isolate the subroutine of the record that is giving trouble.

Figure 7 is a block diagram representing the loading of 1-CS into storage. After
the load-button sequence and bootstrap, the tape record monitor is loaded in des-
cending sequence from locations 27 to 4. The COPY instruction at location 1 and
the TXI at location 2 accomplish this loading. The copy loop stores COPY 3 at 3 and
LTM at 2. The LTM is performed and the COPY 3 stores BST a t location 3. The
program control enters the monitor proper at location 4. Figure 8 shows the oper-
ation of the monitor in block diagram form.

1.04.04 The Tape Record Monitor

The program in storage from 4 through 27 reads in, sequentially, all the records of
the systems tape (tape 1). The records are check sum and redundancy checked. If
no e r r o r s exist, the program proceeds into the record that has read in. The check
sum, which is the first word of each tape record, is stored a t location 2. The
record control word, which is the second word on tape, is stored a t location 17. The
record control word's address is the address used to store the first instruction
(third word) of the record currently being read in. The record control word's de-
crement is the location of the first instruction to be executed after the current r e -
cord is read in. These a r e not relative addresses but absolute locations. Refer to
FIgure 8.
1.04.05 Listing of 1-CS on Tape

The following listing of 1-CS shows the instruction
sequence on tape and the locations where the instruc-
tions a r e stored.

Sequence Storage Address, Tag,
On Tape Locations Operation Decrement
0 0 LXA 091
1 (originally) CPY 2,l
2 (originally) TXI 1,1,1
1 CPY 31,l
27 HTR 3
26 TZE 0
W I T H COPY A T LOC. I,
25 COM 6
LOAD N E X T 20 WORDS
24 ACL 2
23 COM 6 I N T O 27 THROUGH 4.

22 TRA 27
21 RTT 12
20 WRS 333
17 HTR 0 P U T COPY 3
16 TXI 15,1,77777
15 CAD 091
LOC. 3
14 CAL 17
13 STA 26
12 ARS 22
11 STA 15
10 CAL 17

+
a
7 CPY 17 INTO 2

6 CPY 2
5 RDS 221
4 LXD 27,l
3 (originally) CPY 3 LTM AT 2
2 LTM 7
3 BST 221




'
0
I
I
P U T E S T 221

INTO

LOC, 3




A T L O C A T I O N 4 ENTER

PROGRAM MONITOR O F
I


TRANSLATOR RECORDS




I: FlGUR E




Figure 7 .
n
p 7 l
FIGURE 7




TAPE



I SEQUENCE
I
r-l READ NEXT




OK

- TRANSFER TO

STOP A T 27 LOCATION
NO OK
UNMATCHED 4 F SPECIFIED IN

B I T S I N ACC DECREMENT OF

LOCATION 17
L




Figure 8. 1-CS, Tape Record Monitor
1.04.06 Listing of 1-CS in Storage

The original boot-strap loading loop in locations 1 , 2 , 3 is wiped out by the self-
loading 1-CS. After loading, the program is located in core storage a s follows:

ADDRESS TAG,
LOCATION OPERATION DECREMENT COMMENT

IXA Zero to XRA initially
CPY Loads most of 1-CS
LTM
BST Backspace to reread record
IXD Clear XRA before reading
next record of Fortran
RDS Read next record
CPY Check sum of record ----
2
CPY Control word -----------I7
CAL Control word ---------- Acc
STA Where record is to begin in
storage
ms DECREAcc ----ADRAcc
STA Transfer address -------26
CAL Again control word ----- Acc
to start computing check
sum
CAD Copy record &.compute check
sum
TXI Repeat & store record in con-
secutive ascending
addresses
HTR Control word location
WRS Write delay

RTT Test for redundancy e r r o r
TRA Recognize redundancy e r r o r
COM Check sum in Acc
ACL Bring in transmitted check
sum to be compared
COM
TZE Check sum OK, go to TRA
address
HTR Read e r r o r
1.04.07 Control Words of 1-CS Monitor

Table I shows a listing of all the control words used by the monitor. An under -
standing of this listing will give you access to the a r e a of Fortran that is causing an
e r r o r stop. The control word for the record currently in process i s stored i;
location 17. Suppose, for example, that the machine stopped at an unlisted stop
during the Fortran run. A display of location 17 showed a decrement of 335 and an
address of 110. In Table I you will find that all the control words a r e unique and
that the one in this example indicates the stop occurred during the run of Section 1,
while record 1 of the first file on the tape was being run. Also indicated in the
.
listing is the first instruction stored in this record (REW. .222). Notice that this
is not the first instruction executed in this record. The first instruction executed in
this record is located a t the address indicated by the decrement of storage location
..
17. In the present example this is an RDS. .321 instruction located a t 335. With a
dump or listing of the Fortran tape you should be able to follow the sequence of
instructions from that starting point. The last column in the list indicates the high
order storage location used in the storing of the current record. Notice that the
load address and last address of the records indicate that during the assembly many
core storage locations a r e rewritten many times. For instance, records 1 and 12 1
of Section 1a r e both stored starting at 3440 and ending above the 50000 area. This
may make tracing difficult where only portions of a previous record a r e erased in
order to store the shorter current record.

On a listing of the Fortran system tape you may have difficulty locating the
f i r s t executed record if you do not know the organization of the list. Most lists of
tape records indicate the order of full 704 words in the record starting with zero.
Recall that the I1zeroth" word in the record i s the record check sum and the flfirst'l
word is the control word that is stored in location 17. The first ordinary word of the
record proper is the "secondw word. Since the order of instructions is relative to a
starting point of zero, how do you find inthe listing, the first executed instruction
whose absolute location is 3351 To find the relative address in the list use the
following formula:

Relative Address =: decrement of 17 - address of 17 +2
In the example of the previous paragraph, the relative address in the listing of
the RDS .... 32 1 instruction is:

R.A. = 335 - 110 + 2 = 227

The corresponding listing of records on the Fortran I1 Systems tape i s given in
Table 1 . It follows the same general organization a s the information in Table I
1
for Fortran I.


1.05.00 UPDATING THE EDIT DECK

Additions, deletions, and changes in the list of library functions can be made by
means of the Fortran librarian, FNLIB 1. Each time the librarian is used it r e -
writes completely the list of functions; hence it should be followed by all the routines
which the system i s to contain.
Each routine consists of one o r more control cards, followed by the routine
proper on relocatable binary cards. The routine proper must meet the specifications
given on page 40 of Form 32-7026.

The control cards a r e punched a s if for loading by NYBL1. The loading address
(9L address) must be zero, and the check sum must be given. The first control
card has in its 8L address the number of locations occupied by the subroutine, and
in its 8R address the 2's complement of n, where n is the length of the common
storage regionused by the routine. Succeeding rows have in the left word a function
name (without the terminal F) followed if there is room by a blank character and
zeros in internal 704 BCD with the significant characters packed to the left, and
in the address of the right word the corresponding entry point into the routine,
relative to zero. For example, the control card for the UASC--1 routine, which
can calculate either cosine o r sine by entering a t relocatable 0 or 1, has COSbOO and
0 in its 7's row and SINbOO and 1 in its 6's row. If there a r e too many function
names to fit on 4 single control card, they may be continued on additional control
cards. On these additional cards do not repeat the information given in the 8's row
of the first control card.

The entry point which will cause the specifications for a library routine to be
met can be given a function name (or several names if desired). Such names can be
distinguished a s primary o r secondary names by not prefixing, or prefixing, the
entry point with a minus sign (punch in column 37 of the appropriate row of the
control card). The meaning of primary and secondary arises from the following
rule of precedence which is used by the Fortran system in compiling library routines
into the object program.

RULE. When a function is mentioned in a source program, the routine which will
be used is the first routine on the system tape which meets either of the following
conditions: (1)the name mentioned is a primary name of the routine; or (2) the
name mentioned is a secondary name of the routine, and at least one of the primary
names of the routine i s also mentioned. (If no such routine exists, the universal
empty routine HTR 1, 4 is compiled).

If the system tape is arranged with the routines which have many secondary
names preceding the routines with few or none, this rule will prevent unnecessary
duplication of routines in the object program. Suppose, for example, that the
system tape contains an a r c sine routine which also has an entry point which will com-
pute a square root, and that this routine is given two names, ASINF (primary) and
SQRTF (secondary). Suppose also that later on the tape is an ordinary square
root routine with the single name SQRTF (primary). Then a source program which
asks for both ASINF and SQRTF will cause compilation of the former program only.

In addition to the updating of the edit deck, your listing in this manual of the
records on the master tape should be maintained up to date. In order to do this
properly you must have three documents:

1. The memorandum describing the change.

2. The deck of cards which produce the correction.

3. Either a dump o r SAP listing of FORTRAN.
Referring to Table I, the following items a r e required:

Required Information Where Found

Record number First three digits of *000 correction card
Description of record Usually not changed
Transfer address 8L decrement of 000 correction card
Load address 8L address of 000 correction card
Last address 8R address of 000 correction card
Contents of transfer word S A P listing o r dump of Fortran
Contents of load word S A P listing or dump of Fortran
Section No. Memorandum

*The 000 correction card is the first card in the correction deck; the three
zeros a r e the last three digits of the card number.

1.06.00 FORTRAN TAPE ASSIGNMENT

Figures 9 and 10 represent the contents of the tapes in Fortran processing. They
indicate the contents of all four tapes at the end of each of the six sections. With the
exception of the first four records of file 5, tape 2, the assignment of tapes is
identical in all Fortran modes. (Fortran I processing does not develop these fowr
records. )

1.07.00 RELATING TAPE ASSIGNMENT IN FORTRAN I AND I1 TO FORTRAN 709

Fortran I and Fortran I1 utilize the first four tapes identically. Fortran 11, how-
ever, uses additional tape units 5, 6 and 7. They have the following function
during batch compiling;

Tape 5: The programs to be batch compiled a r e recorded on tape, separated
by END statements. If the input is card on-line, all card information
i s transmitted to tape 5. If the input is off-line, tape 5 is used a s
the off-line input.

Tape 6: This becomes the output tape for batch compiling. All source
programs in Fortran language, storage maps and SAP mnemonic
outputs appear on this tape. This tape receives the output infor-
mation for all object programs that p r e v i w l y were consigned to tape 2.

Tape 7: This tape recovers the binary object programs of the batch-compiled
source programs. This is, in Fortran I, the responsibility of tape 3.
Sect. File File File File File File File File File File
No. 1 2 3 4 5 6 7 8 9 10
1' SOURCE COMPAIL COMPAIL FLOCON 10 END
-'
Not
PROGRAM RECORD FORMAT 11 SUBDEF (1) in
(BCD) COUNT SIZE 12 COMMON Fortran I
All others and 13 HOLARG -_
in Binary FORSUB( 1) 0 TEIFNO
2 TIFGO
3 TRAD
1 TDO
6 FORVAL
5 FORVAR
4 FORTAG
7 FRET
8 EQUIT
9 CLOSUB
EOF EOF EOF EOF EOF (3)
- D O T A G B - m D O
2 Rec. Count RECORD
EOF EOF COUNT
ASSIGN FIXCON
3 CONSTANT
EOF EOF
4

ASSIGN
5 CONSTANT
EOF
5'


6


Notes: (1) If no entries exist, no identification exists either. (2) Also includes new FUNCTION statement. (3) Identification
label number of the tape tables.
FIGURE 9. FORTRAN TAPE 2



End of Fortran Tape 3 Fortran Tape 4
Section File 1 File 2 File 3 File 4 File 1 File 2
1 Tape Table
Entries
1' 1. Non Exc.
2. T Stops
2 TRALEN COMPDO
3 CIT Is Closed
lo0 WDS /REC Subroutines
4 CIT1s from Sec. 3 EMPTY Tag List B
B List CIT Is Closed
(erased) ? 5 WRIREC Subroutines
5 cm Is
St CIT Is
Pre-6 CIT Is
6 Binary Output

FIGURE 10. FORTRAN 709
Symbolic Name* Fortran 11 709 Fortran

STAPE4
STAPES
STAPE6
STAPE7

*This is the name used by the executive program in
referring to tape in any one of the three Fortran modes.

1.08.00 FORTRAN SOURCE PROGRAM CARD FORMAT

Each statement of the Fortran Source Program is punched onto a separate card.
If a single statement is too long to fit on a single card under the card layout system
specified below, it may continue over a s many a s nine continuation cards.

A properly punched Fortran 709 source statement card is shown in Figure 11.


I F T H I S CARD CONTAINS
A SOURCE PROGRAM THE STATEMENT I S

I
COMMENT ONLY, A C I S
PUNCHED I N COLUMN I.
PUNCHED I N
COLUMNS 7-72




FORTRAN S T A T E M E N T
SAMPLE Y(I)=A*X (I) + q




THE STATEMENT I F T H I S I S A CON- I F THE STATEMENT COLUMNS 73-80 A R E
NUMBER, WHICH T I N U A T I O N CARD, A HAS NOT BEEN IGNORED B Y
M U S T NOT EXCEED CHARACTER OTHER COMPLETELY FORTRAN AND ARE
32767, I S PUNCHED THAN ZERO I S PUNCHED AFTER A V A I L A B L E FOR
I N COLUMNS 1-5 PUNCHED I N COLUMN 7 2 , I T 8 0 U R C E CARD
COLUMN 6 M U S T B E CON- IDENTIFICATION.
TINUED ON A
CONTINUATION