CROM = E o T
'"
(Flab , I t )I
LAST RECORD ( F I L E I)
A a S l Q N ( F I L E l o ) FIXCON ( F I L E 9) F L O C O N ( F I L E 4 ) F O R M A T ( F I L E 4 )
P A R T I V
F - l
t
T O SECT. P R E V I (FIG,
ASSEMBLED T A B L E S AFTER E X l 8 T l N Q clTt 8 ( V I L E I)
SECTION
VI 2. 01. 10An equivalence s e n t e n c e , a s s e m b l e d by Section 1', c o n t a i n s a l l v a r i a b l e n a m e s , the r e l a t i v e l o c a t i o n s of which have been fixed by
EQUIVALENCE
s t a t e m e n t s . The s e n t e n c e contains no redundancies o r i n c o n s i s t a n c i e s , T h e s e n t e n c e i s m a d e up of t w o - w o r d e n t r i e s , the B C D v a r i a b l e n a m e , and t h e r e l a t i v e loca-9 tion ( s u b s c r i p t ) t o e a c h other. The end of e a c h s e n t e n c e is m a r k e d by a flag (negative sign) in t h e final s u b s c r i p t ,The equivalence s e n t e n c e i s scanned f o r the g r e a t e s t s u b s c r i p t , The c u r r e n t value of the location c o u n t e r , initially a t - 2 0 7 in the 709, i s r e d u c e d by t h e g r e a t e s t s u b s c r i p t . T h i s i s the b a s e f r o m which the l o c a t i o n a s s i g n e d t o e a c h of t h e v a r i a b l e n a m e s i s computed. The equivalence sentence i s scanned a g a i n f o r a n y v a r i a b l e s which a r e n a m e s of a r r a y s . It a v a r i a b l e a p p e a r s i n the SIZ t a b l e , the o v e r h a n g of the a r r a y length o v e r the b a s e l o c a t i o n ( a r r a y length
-
s u b s c r i p t ) i s computed, a n d t h e m a x i m u m of t h e s e i s found. The e q u i v a l e n c e s e n t e n c e i s s c a n n e d again. E a c h s u b s c r i p t i s added t o the b a s e a d d r e s s , i n effect c r e a t i n g an a r r a y s t o r e d b a c k w a r d s in m e m o r y , and t h e v a r i a b l e o r
a r r a y n a m e i s e n t e r e d into DEV with i t s c o r r e s p o n d i n g l o c a t i o n i n DEA, f l a g g e d m i n u s . T h e a r r a y n a m e with the g r e a t e s t s u b s c r i p t will b e a s s i g n e d t h e v a l u e
of the location c o u n t e r b e f o r e i t w a s r e d u c e d , in effect l o c a t i n g t h e m o s t precem- dent a r r a y n a m e in the f i r s t available m e m o r y location. T h e v a l u e of t h e l o c a t i o n c o u n t e r i s then r e s e r v i n g m e m o r y f o r the overlapping a r r a y extending f a r t h e s t into m e m o r y , and r e s e r v i n g f o r the next v a r i a b l e n a m e the n e x t l o w e r c e l l . Suppose t h e r e a r e common s y m b o l s E , D, X , which a r e r e l a t e d b y
EQUIVA-
LENCE(E
( 5 ) , D ( 2 ) , X ) , and t h eE
and D o c c u r in d i m e n s i o n s t a t e m e n t s giving t h e i r total s i z e a s E ( 6 ) and D(S), X being a non- s u b s c r i p t e d v a r i a b l e . T h e first v a r i a b l e t o b e defined i s t h e one with the l a r g e s t e l e m e n t n u m b e r i n t h e equiva- lence g r o u p , E i n t h i s c a s e , and the 1 s t e l e m e n t ofE
is given t h e h i g h e s t f r e e l o c a t i o n , i . e .,
,LCTR.
D and X a r e i m m e d i a t e l y defined by t h e i r e q u i o a l e n c e r e l a t i o n s h i p with E : .o r and
It m u s t a l s o be d e t e r m i n e d how m u c h s p a c e t h e s e v a r i a b l e s occupy. Since t h e a r r a y
E
h a s 6 e l e m e n t s , t h e l a s t of t h e s e would b e i n L C T R - 5, ands i m i l a r l y D h a s 5 e l e m e n t s , the l a s t of which would b e i n
LCTR-7.
C l e a r l y t h e n , the f i r s t f r e e location i s t h e one following a r r a y D, n a m e l yLCTR-3,
which then b e c o m e s t h e new LCTR f o r t h e n e x t s e t of a s s i g n m e n t s . T h i s m a x i m u m o v e r h a n g would be ( 5 - 2 )
.
3 , the b a s e a d d r e s s LCTR-5 b e i n g so r e d u c e d t o d e t e r m i n e the c e l l L C T R - 8,After a l l equivalence sentences i n common have been assigned, s t o r a g e i s
of the location counter a s the corresponding location in DEA. The value of gram. Each subprogram name i s entered into DEV with the 'corresponding
lower storage locations entered into DEA. If the name is a l r e a d y i n
DEV,
it haaRecord 36
Record 36 includes the f i r s t pass over the complete CIT file, to define all internal formula numbers, source p r o g r a m symbols not i n
DEV,
and internal eymbol s.The DEA table i s moved up in m e m o r y and packed against the end of
DEV.
The I F N table will s h a r e memory with the DEA table, the f o r m e r occupying the decrement portion of each word, while the l a t t e r occupies the address.
The
TEV
table will follow the longer of the two.CIT
r e c o r d s a r e brought into memory f r o m tape A4, and a r e replaced with the next subsequent r e c o r d when completely scanned. Each CIT i s scanned f i r s t f o r i t s opcode. I. i t i sOCT
o rB C D
the a d d r e s s p r t i o n i s ignored.F o r other codes the symbolic a d d r e s s i e scanned next. If the a d d r e s s i s an internal f o r m u l a number, the a d d r e s s i s ignored. A
SYN
to an IFN i s unde- fined. If the a d d r e s s i s a subsidiary internal formula number (nAm), the symbol is assembled intoTIV
form andTIV
i s searched to define a possibleSYN
to this symbol. If i t i s not inTIV,
it i e entered, undefined. If the ad- d r e s s i s*,
the content8 of the p r o g r a m counter are used to define a possibleSYN
to this symbol.If the a d d r e s s i s
~ i x ' e d point conetan t
3) Floating point constant
5 ) Assign constant
6 ) Universal constant
8) N F o r m a t specification word
9) Initialization addend constant
B)
Hollerith subroutine argumentIt i s in the symbolic listing, and the a d d r e s s i s ignored. A
SYN
t o one of t h e s e symbols i s undefined.If the a d d r e s s i s
Arithmetic e r a s e a b l e
Arithmetic statement function argument s t o r a g e
Arithmetic statement function index r e g i s t e r e r a e e a b l e Index r e g i s t e r eraseable.
It i s not i n the symbolic Listing, and i s entered into
TIV
with g r e a t e s t l e v e linto
TIV.
If the location symbol i s +, i t i s a flag s e t by section 111 that t h i s CIT r e sults froma TIFGOentry forTRASTO
t r a n s f e r a d d r e s s , for consid- eration by section IV, and i t i s ignored.F o r
a l l other internal symbols appearing in the symbolic listing, a TIV entry i s made, the contents of the p r o g r a m counter defining this symbol. If the location symbol i s $ o r $$, each of these i s defined by the contents of the p r o g r a m counter. If the lo- cation symbol ia an external symbol ( t r a n s f e r vector name), i t i s ignored.A t the end of the f i r s t p a s s over the complete
CIT
tape, a l l symbols appear- ing in compiled instructions have been entered into one of the tables,DEV,
aIFN,
TEV o r TIV. The upper location counter i s one cell below the l o w e s tcell r e s e r v e d for a
DEV
entry. T h e location counter i s reduced by the length of theTEV
table, and each variable i n TEV is implicitly defined as the current contents of the location counter plus its o r d e r e d location i n theTEV
table.L a t e r , these locations will be relocated downwards in memory,
Assignment of storage locations for e r a s e a b l e c e l l s in
TIV
is made next.E a c h TIV entry i s examined to determine if it i s an e r a s e a b l e c e l l (1)N, 4)N. 7)N. C)N.) If i t i s , the location counter i s reduced by the l a r g e s t value of the block required, the a d d r e s s portion of the TIV entry, and this location defines the symbol. This, in effect, creates an array stored for- w a r d s in memory. The location counter i s reduced by one more t o r e s e r v e . the next lower cell for the nest symbol. T h e symbol 4). e r a s e a b l e for l i b r a r y subroutines, i s defined a s the location at the top of m e m o r y , 77777.
T h e s t o r a g e a s s i g n m e n t o at t h i s p o i n t a r e as i n t h e f o l l o w i n g d i a g r a m .
R e c o r d 37
subprogram argument dummy variable (flagged 77777), o r an arithmetic sub-
If any a r i t h m e t i c subroutines exist, the location following them i s the f i r s t
a d d r e s s . The computed checksum of the c a r d i s i n s e r t e d in 9R.
T h e relocation b i t s a r e packed left adjusted a g a i n s t any p r i o r relocation b i t s
DOWN Adds a t h i r d file for each p r o g r a m compiled ( s e e above) containing the object p r o g r a m i n symbolic machine language on tape.
Note: T h i s listing will be stacked on tape A3 a s one file f o r the e n t i r e monitor run.
Sense Switch 3 U P No on line l i s t i n g s a r e produced.
DOWN L i s t s on line the f i r s t t w o o r t h r e e f i l e s of tape B2, depending on the setting of Sense Switch 2.
Sense Switch 4 U P Relocatable row b i n a r y c a r d s f o r t h e object p r o g r a m a r e punched on line, i f Sense Switch 1 i s up,
DOWN
Relocatable columnar b i n a r y c a r d s f o r the object p r o g r a m a r e punched on l i n e i f Sense Switch 1 i s up. T h e s e will not be stacked on t a p eB4.
Also these a p p e a r on tape B3, s e e note under Switch 1, Sense Switch 5 U P L i b r a r y routines a r e not punched out on line o rwritten on tape 334.
D O W N
C a u s e s l i b r a r y routines to b e punched on l i n e and w r i t t e n on tape B4, depending on whether SenseSwitch 1 and 4 a r e in the U p o r Down position. See note under Switch 4 down, and Switch 1,
Sense Switch 6 Not applicable to Section 6.
The t r a n s f e r v e c t o r , which h a s b e e n s t o r e d a s one r e c o r d following the CIT f i l e on tape A4, i s brought back into memory. End c a r d setting a n d / o r phy- s i c a l s e n s e switch 5 i s t e s t e d t o d e t e r m i n e i f a l i b r a r y s e a r c h is required.
If t h e t r a n s f e r v e c t o r i s not empty and a l i b r a r y s e a r c h is r e q u e s t e d , a flag f o r subroutire s found i n each pass over the l i b r a r y fjle on the
F O R T R A N
s y s t e m tape i s r e s e t .T h e next r e c o r d in t h e l i b r a r y file i s r e a d into m e m o r y . If 9L p r e f i x has a 4 punch, i t i s a p r o g r a m c a r d ; if not the next r e c o r d is r e a d in.
After a p r o g r a m c a r d h a s been found, the next r e c o r d is brought into m e m o r y with rows 8 through 1 2 packed against the e a r l i e r c a r d image. Row
9L
p r e f i x i s a g a i n . t e s t e d t o d e t e r m i n e i f the p r o g r a m c a r d continues o v e r m o r e than one c a r d . When a c a r d o t h e r than a program i s encountered, the tape i s backspaced o v e r the c a r d i m a g e , ana a consolidated p r o g r a m c a r d e x i s t s i n m e m o r y . The word count of the consolidated p r o g r a m c a r d i s i n s e r t e d in the d e c r e m e n t of 8L.E a c h r i g h t r o w ( e n t r y point r e l a t i v e t o z e r o c o r r e s p o n d i n g t o e n t r y point
After t h i s mapping, o r if the l i b r a r y s e a r c h w a s not r e q u i r e d , the t r a n s f e r
I
If following the' symbolic a d d r e s s (and, i f i t e x i s t s , the r e l a t i v e a d d r e s s ) no
End c a r d setting a n d / o r physical s e n s e switch 3 i s t e s t e d t o d e t e r m i n e i f on-line output of the s o u r c e p r o g r a m , s t o r a g e map, and machine language l i s t i n g (if any) i s required. If i t i s s o requested, the page i s r e s t o r e d s o that each file begins on a new page.
One r e c o r d (one printed l i n e ) is r e a d f r o m tape B2, i s converted to a c a r d
"image, and the line i s printed,
When the end of the s o u r c e p r o g r a m file i s sensed, the page i s r e s t o r e d and the map is prirt ed line by l i n e
When the end of the s t o r a g e map f i l e i s s e n s e d , s e n s e light 2 i s t e s t e d to de- t e r m i n e i f a t h i r d file, the machine language l i s t i n g , e x i s t s on tape B2. If i t d o e s , t h i s flag i s r e s t o r e d for monitor, the page is r e s t o r e d a n d t h e l i s t i n g is p r i n t e d l i n e by line,
When the end of the l i s t i n g file i s s e n s e d , tape B2 i s rewound. T h e
FORTRAN
c o m p i l e r h a s completed p r o c e s s i n g of the s o u r c e p r o g r a m . The r e s u l t s of theF O R T R A N
compilation are on two tapes: tapeB2,
theB C D
s o u r c e p r o g r a m , s t o r a g e map, and symbolic listing i f requested; and tape B3, t h e b i n a r y pro- g r a m c a r d , the object p r o g r a m , l i b r a r y subroutines including their p r o g r a m c a r d s if r e q u e s t e d , and t r a n s f e r c a r d i f a main p r o g r a m . If on l i n e output has been r e q u e s t e d , and t r a n s f e r c a r d i f a main program, If on l i n e output h a s beenr e q u r e s t e d , c a r d s have been punched and l i s t i n g s have been printed.
Control i s p a s s e d to the monitor.
FLOW IN
75
SECTION ViFLOW IN SECTION V I CON'T
FORTRAN LIBRARY
The l i b r a r y i s contained in the t h i r d file on the System Tape. T h e l i b r a r y contains the input, output, math, m o n i t o r , v a r i o u s c o n t r o l r o u t i n e s a n d the l i b r a r i a n , r e q u i r e d f o r the execution of any object p r o g r a m compiled
by FORTRAN,
The m t h a n d control routines w i l l not b e d i s c u s s e d in detail, The l o g i c and coding of t h e s e routines i s s t r a i g h t f o r w a r d , and r e f e r e n c e t o the
specific l i s t i n g s should b e m a d e i f any question should a r i s e .
The input/output routines a r e not a s s t r a i g h t f o r w a r d a s the aforementioned r o u t i n e s , t h e r e f o r e , a m o r e complete w r i t e - u p w i l l b e given in 2. 02. 01.
The l i b r a r y contains the following routines:
INPUT-OUTPUT LIBRARY Control Routines
IOS/ Input- Output S u p e r v i s o r
IOU/ Input
-
Output Channel- Unit Table SLO/ S h o r t - L i s t OutputW E R / Tape Write E r r o r
R E R /
Tape Read E r r o rHollerith Input- Output
O H Input- Output Hollerith
STH/ Storage to Tape Hollerith TSH/ Tape to Storage Hollerith CSH/ C a r d to Storage Hollerith SCH/ Storage to C a r d Hollerith sPH/ Storage to P r i n t e r Hollerith
B i n a r y Input- Output
IOB / Input- Output B i n a ry S T B / S t o r a g e t o T a p e B i n a r y TSB/ T a p e t o S t o r a g e B i n a r y D R M / W r i t e D r u m a n d R e a d D r u m
T a p e Non- T r a n s m i s s i o n B s T / B a c k s p a c e T a p e E F T / Endfile T a p e R W T / Rewind T a p e
MATH LIBRARY
X P ~ / E x p o n e n t i a l
- FXPT
B a s e-
F X P T Exp.X P 2 / E x p o n e n t i a l
-
F L P T B a s e-
F X P T Exp.X P 3 / E x p o n e n t i a l
- FLPT
B a s e-
FLPT Exp.A T N / F l o a t i n g P o i n t A r c t a n g e n t
XPF/ F l o a t i n g P o i n t Expenciltial Function L O G / F l o a t i n g P o i n t N a t u r a l ~ o ~ a r i t h r n , S C N / F l o a t i n g P o i n t Sine and C o s i n e
S Q R / F l o a t i n g P o i n t S q u a r e Root
T N H / F l o a t i n g P o i n t H y p e r b o l i c T a n g e n t
MONITOR L I B R A R Y C H N / Chain D M P / D u m p X I T / E x i t .
OTHER LIBRARY ROUTINES