• Keine Ergebnisse gefunden

EQUIT CLOSUB

Im Dokument FORTRAN FOR (Seite 21-27)

FORMA T

SUBDEF C O M M O N HOLARC NONEXC TSTOPS CALLFN FMTEFN

TSKIPS

EQUIVA.LENCE statements

names of closed subroutines referenced F0RMA.T statements

SUBROUTINE or

FUNCTION

statements COMMON statements

Hollerith arguments in CALL statements IFNs of non-executable statements

IFNs of STOP and RIETURN statements

first a ~ d last IF'Na of CALL statements ~u~wILL) 1-0 statement references to FORMAT numbers

IFNs of possible machine language rlcip.

FORTRAN

11, Section One (704 Version)

ASSEMBLY routine reads records from the BC;D input tape until a statement and a l l its continuation cards a r e assembled in an erase- able buffer termed the F- region. This region remains until replaced, by the following statement. In order to ascertain that all continuation cards have been read the program reads one record ahead into an a r e a termed FT. Blank cards and comments cards a r e ignored.

A word of all-ones i s written after the l a s t non-blank word in the

F-

region to serve a s an end-of-statement marker.

An internal statement number O((1FN) i s assigned.

If an external statement number (EFN) appears in the source state- ment it i s converted to binary and following table entry made:

TEIFNO table

word 1

1

(X(1FN) O(

(EFN) (

Any special mode character in cc 1 a r e isolated and saved.

CLASSIFICATION After assembly each statement i s classified accord- ing to type. This classification is a two-phase procedure.

I. The sqatement i s classified as arithmetic if:

1) There exists an

=

sign not within "(" ")".

2 ) This t sign is not followed by a t t

,

not within "('* ")".

Control goes to the ARITHMETIC processor.

11. If the statement i s not classified a s .arithmetic by the above pro- cedure it i s assumed to be non-arithmetic. The beginning of

statement i s compared to entries in a dictionary of non-arithmetic statement beginnings. When identified a s to type control goes to the appropriate processor. Failure to identify causes a Diagnostic message.

ARITHMETIC P r o c e s s o r

The reader is advised that this preliminary paper does not include a description of the ARITHMETIC Proc,essor. A paper, describing this processor from a theoretical standpoint, m a y be found in the commun- ications of the Association for Computing Machinery, Vol. 2, No. 2, February, 1959.

FORTRAN 11, Section One (704 Version)

DIMENSIONS

V( I ~ ,

. . . , 1 ~ 1 ~

V ( I ~ ,

. . . , 1 ~ 1 ~ . . .

The statement i s scanned collecting the variable name V and assoc- iated specification (Il,

. . ,

Ik) where K

k

3. It i s verified that V has not been previously defined in a DIMENSION statement. Dimen- sionality i s based on the number of specifications Ikwhere 1

a.

K

4

3.

There a r e thus three possible cases:

K

1. The following table entry i s made:

D I M table

word 1 V a r i a b l e N a m e (BCD)

1

word 2

1

0

I

K =

2. The following table entry i s made:

DIM3 table

w o r d 1

I

V a r i a b l e N a m e (BCD)

1

DIM2 table

L .#

word,l word 2

processed.

V a r i a b l e N a m e (BCD)

I1 12

word 2 word 3

Each specification of .equivalence i s scanned. The variable name i s collected. The constant, i f present, i s collected and converted to binary.

If not present i t i s understood to be 1. The following table entry is made:

K

It 3. The following table entry i s made:

I1

I2

0 Iq A

This procedure i s repeated until a l l V(Ip

. , . Ik)

have been

On the l a s t such the following table entry is made:

EQUIT table -

EQUIT

table 3

word 1 V a r i - a b l e N a m e (BCD)

word 2

-

N

where the

-

signifies the end of a specification.

The entire procedure i s repeated for each specification.

word 1 word 2

V a r i a b J e N a m e (BCD)

N

where

N

i s the associated constant o r 1. '

This is repeated for each variable of a specification until the last.

FORTRAN 11, Section One (704 Version) COMMON

Vl* .

a Vn

Each variable name i s collected and the following table entry made:

COMMON table

w o r d 1

I

V a r i a b l e N a m e (BCD)

I

If the variable name i s fixed-point the following table entry i s made:

FORVAL

table

word 1

I

1 0

1

w o r d 2

1

V a r i a b l e N a m e

(BCD) 1

The above procedure i s repeated for each argument name.

The statement i s scanned, collecting the statement number Bi. It i s converted to binary and the followjng table entry is made:

FRET

table 5

word 1

I -

0 Bi(EFN)

I

Each branch frequency Ni i s collected and converted to binary.

The following table entry is made:

FRET

table

word 1

I

0

id

This i s repeated for each branch frequency.

The entire procedure END (11,

.

6 a

In)

is repeated for each specification.

Each specification is

END

table word 1

collected and the following table entry made:

This is repeated for each specification.

)

FORTRAN

11, Section One (704 Version) FORMAT ( .

. .

)

The following table entry is made:

FORMA T table

w o r d 1 1 1 6C(EFN)

1

Each word of the

FORMAT

specification as found in the F

-

region i s made into the following table entry:

FORMAT

table

w o r d 1 I ~ o r m a t S p e c i f i c a t i o n (BCD)

1,

The f i r s t word, if l e s s than eix characters, is prefaced by blanks.

When the entire Format specification has been entered the following table entry i s made:

During the above procees&g a scan i s made of the Format specification for legality of charactere and balance of parenthesie (excluding hollerith fields).

FORTRAN

11, Section One (704 Version)

The termination of the DO range N i s collected and converted to binary.

The variable I i s collected. The parameters M, N2, N3 a r e collected.

Any constant parameter i s converted to binary.

N3

i s understood to be 1 if not specified. The following table entry i s made:

TDO table

word 3 1 N1 1

word 1 word 2

H

(IFN) N(EFN)

V a r i a b l e N a m e (BCD)

where N1, N2,

N3

may each be constant o r variable and where word 4

word 5

for each which is variable a 1 i s placed in bit 20, 19, 18 re-

~2 N3

spectively of word 1.

Each branch address M, NZ, N3 i s collected and converted to binary.

The following table entry is- prepared:

TIFGO table

This entry i s held until treatment of the arithmetic expressick

--- - - - -

is completed. If the expression contained any references to subprograms, resulting in the final O((IFN)i

#

O((1FN) then such M I F N ) i replaces O((1FN) in the pending entry. The entry is then made.

word 1 word 2

The statement is modified by the following transformation.

I is replaced by

X

F

is replaced by non-BCD character 12 ,

( is replaced by

=

) i s replaced by non-BCD character 77.

The statement i s then treated by the ARITHMETIC processor.

-

O((1FN) Nl(EFN)

N2(EFN) N3(EFN)

FORTRAN

11, Section One (704 Version) IF ACCUMULATOR

OVERFLOW Nl,

N2

The branch addresses Nl, NZ a r e collected and converted to binary.

The following table entries a r e made:

CIT table

IF QUOTIENT

OVERFLOW M I

MZ

Im Dokument FORTRAN FOR (Seite 21-27)