901143A SDS Fortran IV Operations

advertisement
OPf~ . RTo~S
.
..
SDlS SIGMR 5/7
.
.
FORTRAN IV
\
Operations Manual
SCIENTIFIC DRTR SYSTEMS
Price: $3.50
FORTRAN IV
OPERATIONS MANUAL
for
SOS SIGMA 5/7 COMPUTERS
PRELIMINARY EDITION
90 11 43A
January 1969
SCIENTIFIC DATA SYSTEMS/701 South Aviation Boulevard/EI Segundo, California 90245
© 1969. Scientific Data Systems. Inc.
Printed
In ·U.S.A.
RELATED PUBLICATIONS
Title
Publication No.
SDS Sigma 5/7 FORTRAN IV Reference Manual
900956
SDS Sigma 5/7 FORTRAN IV Library Technical Manual
901524
SDS Sigma 5/7 Mathematical Routines Technical Manual
900906
SDS Sigma 5/7 Batch Processing Monitor Reference Manual
900954
SDS Sigma 5/7 Batch Processing Monitor Operations Manual
90 11 98
SDS Sigma 5/7 Symbol/Meta-Symbol Reference Manual
900952
SDS Sigma 5 Camputer Reference Manual
900959
SDS Sigma 7 Computer Reference Manual
900950
NOTICE
The specifications of the software system described in this publication are subject to change without notice. The availability or perfarmance of some features may
depend on a specific configuration of equipment such as additiona I tape unit. orlorger memory. Customers should consult their SDS soles representative for de toils.
ii
CONTENTS
1.
~
2.
COMPILER
4.
Compiler Options
Listings
Source Listing
Ob ject Listi ng
Compilation Summary
Miscellaneous Listing Conventions
Compiler Diagnostics
Compiler Tables
AI location Error Messages
Previous Equivalence
Different Storage Areas
Previous Allocation
Extension
EQUIVALENCE Item Subscript Count
Data in Blank COMMON
Doubleword Boundary Violation
Overflow
1
2
2
2
7
11
11
13
17
17
18
18
18
19
19
19
20
LIBRARY STRUCTURE
21
Library Initialization
Floating Overflow
Run-Time Di agnostics
Monitor Errors
Library Routines
21
21
21
23
24
CALLING AND RECEIVING SEQUENCES
34
,
~ ,
34
General Considerations
Mathematical Functions: Drivers and
34
Evaluators
34
Naming of System Routines
35
Standard Calling/Receiving Sequences
35
Standard Calling Sequences
Subprogram Names and Statement
36
Labels as Arguments
Arguments That Are Themse Ives
37
Dummies
38
Standard Receiving Sequences
Register Conventions in Standard
40
Subprograms
Word Format in Calling and Receiving
40
Sequences
41
Standard Accumulators for Arithmetic
41
Returning the Results of Functions
The Argument Set-Up Routines 9SETUPN,
41
9SETUPO, 9SETUP1, 9SETUP2
Receiving Sequences Involving Multiple
42
Dummies
The Argument Set-Up Routine 9SETUPV _ _ _ 42
43
The Argument Set-Up Routine 9SETUPM
Nonstandard Calling/Receiving Sequences _ _ _ 43
43
Mathematical Function Evaluators
44
Power Routines
45
Type Conversion Routines
46
Complex Arithmetic Routines
47
Use of Subprograms
47
Sharing Data Between FORTRAN Programs
and Assembly Language Programs
48
Differences Between GLOBAL and
EXTERNAL Declarations
50
Assembly Language Main Programs
51
Misce Ilaneous
52
Internal Data Formats
53
SYSTEM FORTLIB
53
Symbolic Parameter Values
54
56
FORTRAN Statement Procs
READ/vVRITE Proc
56
58
FORMAT Proc
REWIND, BKSPACE, ENDFILE Procs _ _ 58
PAUSE, STOP Procs
58
[NITIAL Proc
58
5.
INPUT/OUTPUT
59
59
BCD Input/Output
59
Output
Cards
59
59
Printer
"Listing" Magnetic Tape
59
59
Magnetic Tape
59
Sequential RAD File
59
Typewriter
59
Paper Tape
59
Input
59
Cards
60
Magnetic Tape
60
Paper Tape
60
Typewriter
60
Sequential RAD File
60
Binary (Intermediate) Tape Format
61
FBCD Conversion
61
Run- Time I/O Unit Assignments
62
Devices Other Than Tapes or RAD
62
Unlabeled Tapes
63
Labeled Tapes
63
RAD Files
63
Assignments to "NO"
64
BCD (026}/EBCDIC (029) Conversion
64
Vertical Carriage Control
Unit Assignments Under Program Control ___ 64
r'.
3.
INTERFACE WITH ASSEMBLY LANGUAGE
ROUTINES
6.
7.
JOB SETUP
65
Job Setup Examples
Load Map
65
70
OPERATIONAL CONSIDERATIONS
73
PAUSE, STOP, EXIT
Use of Sense Switches
Job Aborting
73
73
73
!
iii
Abort
Abort
Abort
Abort
by
by
by
by
FORTRAN Compiler or library
Computer Operator
the Monitor
the Loader
73
74
74
74
APPENDIXES
A.
ARGUMENT SETUP ROUTINES
75
B.
SAMPLE DIAGNOSTICS LISTINGS
80
C.
SAMPLE LIBRARY LISTINGS
89
D.
SDS SIGMA FORTRAN IV CHARACTER SETS
92
ILLUSTRATIONS
8
3.
Sample Summary
4.
Sample Map Produced by LOPE Loader
71
TAII..ES
1.
Error Messages (i n al phabeti corder)
14
2.
Error Messages Produced by Math Routines
24
3.
General Error Messages
25
4.
Formatted I/O Error Messages
26
5.
library Routines
28
6.
Register Names Defined in SYSTEM FORTLIB
54
7.
FBCD Conversion Table
61
1.
Sample Source Program listing
3
D-1 SDS EBCDIC
92
2.
Sample Object listing
3
D-2 Old Character Set
93
iv
1. COMPILER
Compiler Options
The list below defines the options that may be used on !FORTRAN control cards. Any combination may be re'luested
and they may appear in any order. Note that specifying no options at all results in a compilation with just a summary; no other listings are produced (except diagnostics)-and no object code is output. The object code is generated,
however, and the summary will tabulate its size.
When the source input is from the same device as the control input, any number of programs or subprograms may be
compiled following a single !FORTRAN card. To change options between compilations, additional control cards
may be used. When the source input and the control input are from different devices, however, there must be a
separate !FORTRAN card for each compilation. Please refer to Chapter 6 for further information on the use of control cards.
~.
LS
List Source program (via M:LO)
LO
List Object program (via M:LO)
NS
No Summary (normally printed via M:LO)
GO
Generate a binary object GO file (via M:GO)
BO
Generate a Binary Object deck (via M:BO)
SO
Source Output (reproduce source deck via M:SO)
X
Compile X cards (cards with X in column 1) -See reference manual.
ADP
Automatic Double Precision - See reference manual.
S
Accept S in column 1 (in-line assembly language) - See reference manual.
NMP
No Memory Protection - See below.
SBIT
Acknowledge largest negative integer (i. e., sign bit only) - See below.
CDEB
Compiler Debug mode -See below.
SI
Source Input. Unnecessary but accepted for compatibility.
The effect of the various listing options is covered in detail in the rest of this chapter.
t
The binary deck that is output when BO is re'luested conforms to the SDS Standard Sigma 5/7 Object Language • It
has decimal sequencing in columns 77-80, beginning with 0000. Columns 73-76 contain ID information, which,
for subprograms, is the first four characters of the subprogram name, and, for main programs, is "MAIN".
The NMP (No Memory Protection) option causes the generated code of the object program to be in a control section
with protection type 00 instead of 01. This has two applications:
1.
To be included in the library, a routine must have only one protection type. Since the temps and local variables must be unprotected, the only way to allow a FORTRAN compiled program in the library is to generate
it entirely with protection type 00.
2.
Any programs that input directly into a Hollerith field in a FORMAT statement (Le., an H, " or $ specification) must specify this option so that the text of the FORMAT will not lie in protected storage. Otherwise the
monitor will trap out on illegal memory reference.
The SBrr (Sign Bit) option causes the compiler to generate somewhat less efficient code in certain integer arithmetic
operations in order to preserve the integrity of the value -2,147,483,648, which is the maximum negative number
expressible on the Sigma 5/7. (The integer +2, 147,483,648 cannot be represented.) Consider the statements
N = (-K-M) /( -J)
IF (K-M*N
< 0)
GO TO 6
tSee Batch Processing Monitor manual.
Compiler
The compiler would like to generate these as
N = (K+M)/ J
IF (M*N-K >0) GO TO 6
because it takes fewer instructions. However, if it is possible for (-K-M) or (K-M*N) to acquire the value minus
full scale, this rearrangement is not valid, since the negative of said value cannot be expressed; when negated, it
remains the same. Thus, for example, the first IF statement shown above wou Id transfer to statement 6 whi Ie the second
one would not. It is felt that normally the restriction of integers to -2,147,483,647 instead of -2,147,483,648 to
improve object code efficiency is a good buy. However, given the facility to do Boolean operations with hexadecimal constants, the value 8Z80000000 begins to seem important again. Therefore, although it is unlikely that this
value will be used in expressions such as the above (requiring negation), this option is provided to guarantee rigorous treatment of it when such is needed.
The CDEB (Compiler Debug) option is used primarily by SDS Programming for the purpose of debugging or anolyzing
the compiler itself. It does not take effect unless a special debug version of the compiler has been created during
System Generation. Then the CDEB request provides features such as trapping, tracing, and dumping during
compilation.
Listings
This section describes the source and object listings and compilation summary generated by the compiler, plus the
compile-time diagnostics.
A compilation listing produced by SDS Sigma 5/7 FORTRAN IV may contain three parts: a source listing, an object
listing, and a summary, in that order. The !FORTRAN contral card options that control these listings are
LS
List Source
LO
List Object
NS
No Summary
Note that the summary is normally printed. Only a specific request will suppress it. The format of the listings is
described in the following sections.
Source Listing
A source listing is printed whenever the LS (List Source) option is specified on the !FORTRAN control card.
This listing is single-spaced and shows each source line, preceded by a line count. The line caunt includes comments and continuation lines and is thus an accurate card count that may be used for editing purposes. The line
count is also referred to by certain error messages. The format of the listing is
ddddd: image
where
ddddd: is the line count, in decimal, beginning at 1.
Leading zeros are not printed.
image: is the SO-character source image. One space separates the colon from the source image.
When LS is specified, the source listing is output on the LO (Listing Output) device, preceded by a page eject.
A sample source listing is shown in Figure 1.
When LS is not specified, the compiler normally prints the first and last statements in every compi Iation anyway,
as well as any SUBROUTINE, FUNCTION, and ENTRY statements (since SDS FORTRAN IV permits internal subprograms, there may be several of these). This is done to help the programmer identify which program was being
compiled, how many cards it consisted of, and what its entry points were. This may be considered as part of the
summary, except that it comes out first instead of last. Like the summary, it is not printed if NS (No Summary) is
requested. Source lines with diagnostics are always printed~ regardless of the LS option.
Object Listing
If the LO option is specified on the !FORTRAN control card, a listing of the object program (symbolic and hexadecimal machine instructions) is printed on the LO device. A sample object listing is illustrated in Figure 2.
2
Listings
1: C
SDS
FDRTRA~
IV LISTIN3 AND
SJMMA~Y
2: C
3:
DBU9LE PRECISIBN
4:
8:
91
lC:
it:
12:
13:
14:
15:
E~JIVALE~CE (I3EX/VANLINES(3»
WARF'A~E I VA~LI~ES(51
pROGRAM.
FCuX
FU~CTtB~ ~eLY
I R23 I P I TEST
/CBEFFICIENTS(M)/ )
(VHF',StJ)
X
5:
6:
7:
DEM5NST~ATISN
I
6/12/68
I
GLe3AL
c8~v,eN RADIX(25)1X, /S1S/~~RIME/S~
Cev,PLEX ALPHA'~lJX(20/201
oaUBLE PRECISIfN ~ADIX
REAL L~GF/"!3;)F
l..e1ICAL sw,p
EXTER~AL ALPHA,BETA
AL~HA(~/<PRI~EI • 11,.5) * F~JX«(P~IMEI3) * LBGF(X)
~SGF(X) = AL8GIX)
X
WRITE(3,17), R23, ~'(:BE~FICIE~TS(J)~ J=l,v,)
X 17 F59MAT (XF.61 ~G.31
CALL V,ATRIX ( sw I LAST(v) )
29
P9t..Y : RADIX(2) : TEST(FCUX) + C6M~ARE(R23)
16:
p:
18:
19: 3
RETJR~
20:
E'JD
Figure 1. Sample Source Program Listing
esteT
SYSTEM
SYSTEM
1
2
3
4
00000
00001
00002
00003
00001+
00005
00006
00007
00008
00009
p
22
6A
08
02
20
02
02
p
35 F OOOOD "
P
p
P
P
P
P
P
P
OOOOA P
5 F'F'FF'3 A
6 00000 X
0 0')003 V
0 00004 "
0 00005 V
0 00006 V
0 00007 "
OOOOF'
p
00010
00011
00012
00013
00011+
00015
00016
0001'
00018
00019
0001A
p
P
P
P
P
P
P
P
P
P
P
r
C
STW,I+
~1,9
A.!M,9
X
. 4,
ceMMeN RADIX!2SI,x,
I
(VHF,SIII
IS~S/<PRIME,Sw
:eM~~Ex ALPHA'~LjX(20/201
DeU:l~E PREe!Sle~
REA~ ~eGF':1e~~
~eGICAC
RADIx
sw,F'
EXTEQ~A~ ALPHA,B~TA
A~PHA(X/<PRl"'EI • (1,.5) • F'I.UXI~PRIMEI31 • ~e3F(xl
:I
6.1.1.,6
1G
9SETJP2
l~Ti3
X
KPR hE
aA~,15
1
I"flGF
"
A
P
STw,15
1.1/11+
A
"
A
V
X
..,
F~J)(
S"IGC
V
TEST
CBEFiICI
lPTi'1P
EQUIVACENCE (!~Ex'VA~LI~ES(3)1
3~e3A~ IiAR~ARE , VANI.INES(5)
"
V
I
P
ST'II,15
68 0 00013 P
I R~3 , I" I TEST
IC8EFFICIENTS(MII )
! FLUX
6/12/68
.. 5
S~GL
131
5WM'1ARy DEMflN5TRAT18N PR83RA'1.
9SETJpv
PL,jX
R23
SNGl,.
111
12:
~I5TI~G A~D
DeUB~E PREC!51~N FWNCTI3~ pe~y
Sil/ 3
101
tv
X
I.~GI.
61
71
8:
9:
00000 p
0000£ P
F8QT~AN
e'1P)(
35 1+ 00002 V
22 9 FFFD6 A
66 9 00003 V
6A 6 00000
02 0 00008
01 0 00009
35
OOOOE
22 E 00001
6.1. F COOlC
82 0 00008
22 9 00000
3;> 1 00009
20 1 0003e
92 A 20003
6A 6 00000
12 A 0003A
6A 6 OCOOO
EtI 0 OOOOE
5DS
1.115
BAI.,6
5:
OOOOB P
ooooe C)
e
C
1
513 5 •
FBRTCts
SNGL
I,. 119
1.1'111
AtIl
~0110
6AI,.,6
I"
1.0~10
X
V
:I
:lA~,6
.
2PTMC)
*X
o
*KPRI..,E
60
*Fl.d X,l
9C'luC
'(1'01151
9C"!UC
.2PT"'1)
Figure 2. Sample Object Listing
Listings
3
OOOll'!
OOOlC
00010
0001E:
OOOi'"
00020
00021
68
6A
02
35
32
6A
00022
00000
OOOOA
OOOOF'
OOOOA
00000
E8 0 OOOOF'
p
F'
F'
I>
I>
F'
F'
0
6
0
'"
8
6
P
)(
"
"
"
X
"
B
BAI.,6
SNGC
STII.15
1."1.8
SAI..6
B
2t)
9SE TUP1
)(
3PT/1:>
"x
9Ai:6tl
.. 3PTMI>
151 )(
w~ITE(3117), Ra 3 , ~'(CeEF'F'ICIE~TSCJII J.l,M)
16f X 17 F~R~AT (XF'.6/ ~G.3)
17:
CALL MATRIX ( SW , LAST(M) )
00022
00023
OOOh
00025
00026
00021
00028
00029
F'
P
22
61.
01
35
22
6A
20
01
P
F'
F'
F'
P
P
E
,..
0
9
E
F
0
8
00001
00000
00002
OOOO!'!
00002
00000
00(1)1
00003
A
X
"
"
A
X
L
V
2G
1,.1,11;
8AI.,15
I NT.:;
ST".9
1.1/1"
SALt is
LeGL
lNT(3,1>
1
I. A5T
1'1
lTE'1:>
2
MATRIX
sw
1TEMF'
18f 29
0002.
00023
0002e
00020
0002£
0002\1'
F'
P
p
P
P
F'
00030 Q
00031 Q
00032 F'
00033 P
00034 ;:>
00035 p
00036 p
00037 I>
22
6A
82
35
22
30
E
F'
0
8
7
7
35
22
EA
88
7 c::JC:J: "
E (liCC,)1 A
F 08006 V
0 oeOOe V
00001
00000
0000..
00003
0002A
oe003
A
X
V
V
A
29S
1
CB'1F'ARE
" R2 3
IT!;:'!:>
~2
V
F'I.JX
22 9 or;ooo A
15 !l 00002 C
15 8 :,)COO V
ST!),a
STo,a
12 8 COOOO "
E8 0 00000 V
ce
lTE'1:>
o
RA':i 1x + 2
PB",Y
3S
1.0,8
II
END
5 TAN T 5 ".. "
8
41100000 A
'+0800000 A
Q
Q
..... I.
0000'0
00003
00004
00005
00006
00001
00008
00009
0000.
00003
ooooe
00000
OOOOE
0000.
~
1
RETIJRN
<'01
* .. "
"TEsT
"cTE'1"
1.1"
191 3
0003A
00033
cTlM"
L.l'l lo
30 !l 0':1::103 V
00038 F'
0003~ P
STI'I,7
3AL,15
C"!Pl(
FAs,a
V
V
V
V
V
"
V
V
V
V
V
V
V
V
e e A I.
S TaR A 3 E ....
eSECT
o
RES
3
F't.JX
R23
RES
RES
?
RES
1
1
1
1
1
RES
TEST
C/}EFF'lC I RES
)(
RES
(F'RI'1E
RES
J(
RES
lTEMP
RES
<'TEMP
RES
R!;:S
lPT'11>
RES
<'PTMP
3PT'1P
RES
1
1
1
1
1
1
1
1
. Figure 2. Sample Object Listing (cont.)
4
Listings
t.eCAL VARIA3t.ts
:lUt'lMY
DUMMY'
OUMMV
OUMMV
DUMMV
OUMMY
OUMMV
DUMM'(
TEMP
TEi'!R,
PRIVATE TEMP
PRIVATE TEMP
PRIVATE TE"lp
""" c e
~,
M M fl N
:; \. e
ANu
B A I.
DSECT
RES
SDS
DSEe T
RES
VAN\.l'1ES OSEeT
RES
IIIARFARE DSlieT
RES
F"HC8~
"**
EXT
~
RNA L.
R
e:
F' E R E
"
EXT ERN A L.
00000 p
ooooe IS
;) E F' !
DEF'
DEF
BL,AN,( CIJI'1MflN
0
2
L,ABEL,ED e81'1MltN
0
GL,ltBAI.
51
5
0
GL,eSA\.
1
/oj
CE S
lO","
MATR!X'L.AST,Clt~PARE
REF'
REF
"lOll
".*
0
9SET'JPV ,9SETUP!/9CI'1UI.I SlSETUP1/9AL,OG
'II
J T ! e
'I
S
*,,"
peC Y
.Al-pHA
END
Figure 2.
Sampl e Object Listing (cont.)
Listings
5
The object listing includes a complete source listing, with object code interspersed. That is, each source statement
is followed by the instructions that were generated for it. Comments and nonexecutable statements are listed but
have no objecf code associated with them. Diagnostics will also appear in the object listing, in the same manner
as in the source listing.
Each object listing begins with a CSECT directive defining the protection type of the control section. This is always
1 unless the NMP option has been specified. Following this are two SYSTEM directives, which would be required
by a user assembling under Meta-Symbol in order to define the op-codes and special FORTRAN parameters used in
the object listing.
Each line of object code begins with the five digit hexadecimal location of the generated word. This is followed
by a tag that defines which control section is being used. This is either P or V and has the following meaning:
P
Program storage
V
Variable storage (including local variables, dummies, and temps)
The program is listed in order. That is, the location counter increases monotonically; it does not jump around.
Next is the hexadecimal representation of the item. All instructions are broken into three sections for ease of reading. For most instructions, the first two digits are the op-code, the next digit is the register involved, and the last
five digits include the index register (if any) in the first three bits and the operand address in the last 17 bits. Not
all instructions have this format. On "immediate" instructions, for example, the operand address occupies all 20
bits. For further information on this, please refer to the Sigma 5/7 Computer Reference Manuals. The operand
address is I ikewise followed by a relocation tag that defines its storage area, as follows:
A
Absolute
C
Blank (or unlabeled) COMMON
G
GLOBAL storage
L
Labeled COMMON storage
P
Program storage
U
Undefined label (if executed, this causes a run-time error)
V
Variable storage (including local variables, dummies, and temps)
X
External reference
Following this is the symbolic representation of the item, containing the same four fields as a Meta-Symbol line,
namely label field, operation code field, operand field, and comments field. The simulated assembly line begins
in the same column as the FORTRAN lines that are interspaced. In addition, the four fields begin in columns 1, 10,
19, and 37 of the simulated assembly linei these are the standard Sigma assembly columns.
The label field may contain the name of an entry point, a statement number (followed by S -for Statement), or a
com pi ler generated label (followed by G - for Generated). All of the user's statement numbers are shown in the
object listing.
The op-codes used are the same as those used by Meta-Symbol, except for the special calling and receiving sequence
mnemonics, which are defined in Chapter 3. Please consult the Sigma 5/7 Meta-Symbol Reference Manual for further information. The Sigma 5/7 FORTRAN IV Reference Manual also contains a list of op-codes. A register field
is used with most op-codes. Usually it is a value from 1 to 15 that identifies the register being used. On MTW
instructions it is an increment in the range -8 to 7. On calling and receiving sequence op-codes (e.g., PZE,
INTG), there are several symbolic values that may appear in the register field. These are listed in Chapter 4.
The operand field contains the symbolic representation of the item being addressed. This maybe any ofthe following:
6
1.
A FORTRAN identifier. All identifiers are referenced by name, be they scalars, arrays, subprograms, ordummies.
2.
A library reference. Most of these begin with the digit 9.
3.
A literal, i.e", a constant preceded by an equal sign. All constants are listed in a meaningful FORTRAN
representation, which may not be the same as that used in assembly language.
Listings
4.
A statement number (followed by S).
5.
A generated label (followed by G).
6.
A temporary storage cell (a number followed by TEMP or PTMP).
7.
An immediate value, such as 5.
Indirect addressing is indicated by an asterisk preceding the operand. If indexing is used, the operand is followed
by a comma and then the index register value, from 1 to 7.
The hexadecimal values of all the constants used are given at the end of the program, followed by an indication of
the layout of local storage. The directive BOUND 8 is used whenever a quantity must lie on a double word boundary.
Local storage is in a separate control section with protection type O. The local variables are always allocated first,
followed by dummies and temps. The symbol PTMP refers to a "private" temp that cannot be shored by various
statements.
Any COMMON or GLOBAL areas that have been defined are listed next in their assembly language form, namely
as DSECTs (dummy sections). Each specifies which kind of area it is and how big it is.
Finally, all external references and external definitions are listed. The external definitions include,in the locotion
counter field, the hexadecimal location at which the symbol is defined.
Compilation Summary
Unless the NS (no summary) option is specified on the! FORTRAN control card, a compilation summary is always
printed after each program. This consists of a group of tables that summarize for the user what the compiler knows
about the program. It answers questions such as
•
In the statement Y == F(X), was F a function or an array?
•
Have I used a statement number 260 yet?
•
I iust went through and changed all my ALOG references to ALOG I O. Did I catch them all?
•
Is CABS a complex function or a real one?
•
What is the size of my object program, not including variables?
•
How many errors did I hove in this program?
Except where otherwise specified, the heading for a table is not printed unless there is at least one entry in the
table. A sample summary is shown in Figure 3.
The first table is the unified symbol table, which is an alphabetic list of all the identifiers used in the program
(except COMMON block names, discussed below), along with their type, class, location and size. Note that
although SDS FORTRAN IV allows names of any length, only the first eight characters are used.
The "Type" column contains one of the following:
(blank)
= no type (applies only to SUBROUTINEs)
I
= integer
= real
R
D
double precision
C
= complex
K
= double complex
L
logical
Compilation Summary
7
HEX
DEC
TYPE CI.ASS
I.ec
WB~OS
."" .. "'
ALOG
R S!'Rea I~TRI~
C8E':""lCI R 1'IUl.TD *00001 1/ OV"1~'!'
IBEX
I SCAI.R OOOOr:! Cl
1
1 SPRBG EXTERN
I.AST
SPReG EXTERN
MATRIX
P81.Y
D SCAI,.R 00000 V
2
RU
R SCAI.~ -000011 1/ OU"I:"1Y
VA"lI.I'lES R ARRAY 31.68 AI.
5
X
RSCAI.R -00008 V OU"I'1y
"lAME
....
I.ABEL
3
HEX
La:::
rlEX
LBC
LAElEI.
000 3 8
?9
1.8CAI. VARIA3LES (3
N~ME
TYP;: c:I.ASS
'!""-.-."". ••••C SPRIlt3
ALPPlA
Cc:tM!)ARE
J(PRIME
I.I'IClJl'
M!lDF
peLY
SW
VPlF
X
LABEL
HEX
DEC
WeR;)S
.. ec
NAME
OOOOC P
R sPRe G E)(TER'I
i SCALI< 00000 L
8 SPRe~ 0001C P
e UNUSED
oeooo P
~ sPRe a
I. SCALR 00001 L
1
'< sCALR 00001 I.
1
R sCALR -00001. V DUMMY
>lEX
Lac
0002A
LABEL
HEx
LaC
.. "'
..
LABEL
TYPE CI.ASS
&;:TA
FLUX
I(PRIME.
'1
P
RAOIX
TEST
IIIARFARE
X
HEX
Loe
-",,,,
..
i,.ABEL
00002 ..,
BLA"l1( ell"lM6N (51
~eROSI:
00032 )(
00000 RADIX
00001 VioiF
GL8BAL VARJABI.ES:
VA'lLINES
WARFARE
E"lTRY "a1NTSI
00000 P0L.Y
~8CAI. SUBPReGRA~S
DEFINE';
0001e L03F
INTRINSIC
SU3PRBGRA~S
NUMBER SF X CARDS
USEO:
13~eRED;
HIGHEST ERROR SEVERITY; 0
DEC
.. eROS
"GENERATED ::OOEI
C!lNSUNTS:
1.8CAL. \lARlA3I.ES:
TE"IPSI
58
2
3
13
......
2
(~a ER~ORS'
.. EX
illeR,s
0003A
00002
00003
00000
Ooc~e
(PLuS BI.AN~ A'lO L.A3ELE~ eBM"ION AND GL9E1AL ST8QA3EI
Figure 3.
8
Campi lotion Summary
Sampl e Summary
OEe
WeROS
SPReG EXTER'!
C ARRAY -00003 1/ OUMMY
I SCA~R _OOOO!! V OU1'I:"1Y
I SCA!.,R 00002 V
1
L J'IJSEO-00003 V DUMMY
0 AR"!"y 00000 C
50
R SP~'G _OOOO~ V DUMMY
R SCA~R GL'6AL
1
R SCA~R 00032 C
1
~BROSII
00000 paL'!'
iofEX
I.ee
HEX
LeC
The "Class" of an identifier may be:
SCALR
= scalar
ARRAY
= array
SPROG
= subprogram
MULTD
= multiple dummy
UNUSED
= unclassified
An "unused" identifier is one that has appeared in a type statement or a dummy list, but has never been referenced
or allocated. Except for dummies, an unused identifier has no location or size.
The "Hex Loc" column either contains the hexadecimal location associated with the symbol or it contains one of the
words:
INTRIN
= intrinsic
EXTERN
= external
GLOBAL
= global
where the actual location is either meaningless or is unknown at compile time. When a location is printed, it contains five digits (leading zeros if necessary) and is followed by a one-letter tag indicating storage area:
P = program (or local) storage
V = variable data storage
C = blank COMMON
L = labeled COMMON
G =global storage
Note that the location in variable storage used by a dummy actually contains the address of the calling argument.
Thus the asterisk preceding the location in the symbol table indicates that the dummy is referenced with indirect
addressing. Also, since global variables have the word GLOBAL in the location column, only variables EQUIVALENCEd to globals will appear with a location followed by G, since these are allocated in a global block but
are not themselves global.
The last column in a symbol table entry contains the decimal size, in words, of all nondummy variables (scalars
and arrays). A dummy does not have a size since it merely represents an argument in the calling program. Therefore all dummies (including subprograms, multiple dummies, and unused) have the word DUMMY in the size column.
The alphabetic sort sequence used is the one that falls out of the EBCDIC character set; namely, blank first, then
the letters, then the digits.
The second table is the label table, which contains all the statement numbers used in the program and their hexadecimal locations. Undefined labels have UNDEF in the location field. The table is sorted into numeric order by
label value. When internal subprograms or END LABELS statements have been used, all of the local label groups
are sorted together. Thus there may be several label 2's, for example, and they will all appear before label 3.
Global (or nonlocal) labels are sorted separately and appear following the local labels. Each global label is printed
with a following dollar sign (as it appears in the source program).
The headings "LOCAL VARIABLES (n WORDS)" and "BLANK COMMON (n WORDS)" appear next, each followed
by a list of the appropriate variables with their hexadecimal locations. The list is sorted into numeric order by location. These headings appear even when there are no corresponding variables; it is often useful to have it specifically pointed out that the size of the blank COMMON is 0 words.
If any labeled COMMON blocks have been used in the program, the heading "LABELED COMMON BLOCK/name/
(n WORDS)" is printed for each block, followed by the names and hexadecimal locations of the variables within
that block, sorted into numeric order by location. The locations are relative to the beginning of the block. Note
that variables can, of course, appear in either blank or labeled COMMON due to EQUIVALENCE.
Compilation Summary
9
The global variables are tabulated next, in alphabetic order. This does not include variables that have been
EQUIVALENCEd to global variablesi only those variables that may be referenced by other programs. Note that
the size of each global variable Can be found in the unified symbol table (previously discussed).
The next two sections, "ENTRY POINTS" and "LOCAL SUBPROGRAMS DEFINED", list the identifiers of all subprograms defined within the program. These are shown with their hexadecimal location, in numeric order. The
locations are relative to the beginning of the program. The distinction between these sections is that entry points
are names that may be referenced (called) by other programs, while local subprograms are defined only within the
program where they appear.
Thus, "ENTRY POINTS" includes the names of all SUBROUTINEs and FUNCTIONs (except those that have been
declared LOCAL) plus any statement functions that have been declared EXTERNAL, while "LOCAL SUBPROGRAMS
DEFINED" includes all statement functions (except those that have been declared EXTERNAL) as well as any SUBROUTINEs and FUNCTIONs that have been declared LOCAL.
The next section is an alphabetic list of the intrinsic subprograms used in the program. Note that the compiler generates special code for intrinsic subprograms, and it is therefore not possible to substitute alternate versions of these
at load time.
"EXTERNAL SUBPROGRAMS REQUIRED", on the other hand, includes all those subprograms that must be supplied
from outside before the program Can execute. Typically, this consists of subprograms that the user must supply,
since almost all library functions are intrinsic. However, some nonintrinsic subprograms are automatically supplied
from the library. In addition, declaring an intrinsic function EXTERNAL causes it to become a basic external function, which is also supplied from the library. The user can also supply his own version of any library routine, and
this will be loaded instead of the one from the library.
Following these tables, a set of final statistics is printed.
column 1, indicating conditional compilation), the line
IGNORED:
NUMBER OF X CARDS
{
First, if there were any X cards in the program (X in
1
COMPILED:
n
is printed, where "COMPILED" is used if the X option was reguested on the !FORTRAN control card; otherwise the
number of cards "IGNORED" is printed.
The following two lines of statistics are printed only if there were any errors in the program.
NUMBER OF ERROR MESSAGES: n
NUMBER OF STATEMENTS DELETED: m
The count of error messages includes both WARNINGs and ERRORs, whether they follow an individual statement or
appear at the end of the program. Whether or not there were any errors, the following line is always printed.
HIGHEST ERROR SEVERITY:
0
4
{ 7
10
1
(NO ERRORS)
(NO MAJOR ERRORS)
(MAJOR ERRORS)
(MAJOR ERRORS)
Thus, if there are no errors, this message affirms that fact positively.
section, "Compiler Diagnostics".
Error severity is discussed in the following
The last item printed in the summary is a tabulation of the size of the program and its various sections, in decimal
and hexadecimal words. These sections are identified as follows:
10
DEC
WORDS
HEX
WORDS
GENERATED CODE:
CONSTANTS:
LOCAL VARIABLES:
TEMPS:
ddddd
ddddd
ddddd
ddddd
xxxxx
xxxxx
xxxxx
xxxxx
TOTAL PROGRAM:
ddddd
xxxxx
Compilation Summary
(PLUS external storage - see below)
"GENERATED CODE" includes calling and receiving sequences, as well as instructions. "TEMPS" includes TEMPS,
PTMPs (private temps), and dummies; "TOTAL PROGRAM" is the sum of the other four. Note that local variables
and temps are allocated in a different control section (CSECT) from the program. The variable data control section
is referred to in the summary and the object listing with a tag of V, instead of P. Within the V section, local variables are allocated first, followed by temps.
The hexadecimal sizes (xxxxx) are printed with preceding zeros, while the decimal sizes (ddddd) are not.
The actual amount of memory used by a program includes COMMON and global storage. However, since these
may be shared with other programs, they are not included in the program size. These sizes may be found at other
points in the summary. But to draw attention to them if they have been used, the) parenthetical note
(PLUS BLANK AND LABELED COMMON AND GLOBAL STORAGE)
or whatever portion of this note is applicable, is printed following the total program size, as shown in Figure 3.
Miscellaneous Listing Conventions
1.
If several decks are compiled at once, each compilation produces its source, object, and summary listings together, rather than producing N source listings, followed by N object listings, etc.
2.
If a source listing is printed, it is preceded by a page eject. The same holds true for the object listing and for
the summary.
3.
If no source listing is requested, the procedure is somewhat different. If a summary is to be printed, the source
listing consists only of the first and last lines of the program, along with erroneous lines and entry points.
Since this is typically a very small number of lines printed, no page eject is given, and the object listing or
summary begins just beneath the shortened source listing.
4.
If no listings whatsoever are requested, then no page eject is given. Thus, a sequence of compilations can be
run with no listings (i. e., ! FORTRAN NS) and without using any paper.
5.
All listings are produced on the LO (Listing Output) unit, which can, if desired, be assigned to devices other
than the line printer.
6.
The compiler never prints in column 1. Thus this column is free for carriage control information if, for example,
listings are being output to magnetic tape.
Compiler Diagnostics
SDS Sigms 5/7 FORTRAN IV emphasizes clarity and completeness of diagnostics. Almost all diagnostics appear in
the source listing immediately following the statement in error. A vertical bar (I) is printed under the character at
which the error occurred. On the following line, a message is printed to explain the error. For example:
6: X
= 3A + B
I
WARNING: OPERATOR MISSING.
IMPLICIT MULTIPLICATION ASSUMED.
Note that the error messages are offset to the left so that they stand out and can be found quickly by a SCan of the
listing. In addition, the summary indicates how many error messages have been printed.
Whenever possible, the compi ler tries to recover from errors and scan the rest of the statement for further errors.
Thus it is possible to have several diagnostics on one source line. In this case, a marker (I) is printed under each
point in error, and the error messages are printed so that they correspond to the markers from left to right. For
example:
8: 27 WRITE (2,5) «X(I), 1=1, 10)
I
I
I
WARNING: DOUBLY DEFINED LABEL. THIS LABEL IGNORED.
WARNING: NOT A FORMAT STATEMENT LABEL.
WARNING: MISSING RIGHT PARENTHESIS ASSUMED HERE.
Miscellaneous Listing Conventions/Compiler Diagnosti cs
11
Note in this example that when on error is due to something missing at the end of a statement, the marker comes out
just after the last nonblank character.
If more than one error is detected at the same character, several markers may be printed, one beneath the other.
In this case, the error messages correspond to the markers left to right across the first line, then left to right across
the second, etc. For example:
9: COMMON MASS (10, 10)
10: LOGICAL I
11: DATA (MASS(l), 1= 1,3) /2,4,6,8/
I
I
I
I
I
ERROR: BLANK COMMON AND DUMMIES MAY NOT BE INITIALIZED.
ERROR: ILLEGAL TYPE.
WARNING: CONSTANT NEVER USED.
WARNING: ARRAY HAS TOO FEW SUBSCRIPTS. MISSING ONES ASSUMED EQUAL TO 1.
WARNING: DO-CONTROL VARIABLE NEVER USED.
STATEMENT DELETED.
The compiler can recover from some errors and actually generate the statement. Such diognostics are headed
with the word WARNING. Other errors make it impossible to process the statement. These are identified as
ERRORs and cause the statement to be deleted. That is, campi lotion proceeds as if the statement hod never existed:
all vestiges of it (including statement numbers, explicit and implicit declarations, etc.) disappear. When this happens, the message
STATEMENT DELETED.
is printed following the error messages, as shown in the preceding example. The number of statements deleted is
also given in the summary.
When there are continuation lines on a statement with errors, all messages and their markers follow the line they,
apply to. The STATEMENT DELETED message, if applicable, comes out after the lost continuation line.
There are some errors that cannot be detected unti I the end of the program. Diagnostics for these are printed following the END statement and do not have markers associated with them. For example:
187: END
WARNING: UNDEFINED LABELS: 3, 47, 999
WARNING: EQUIVALENCE OF 'X' to 'Y' ON LINE 23 IGNORED.
'X' IS IN BLANK COMMON; 'Y' IS IN COMMON BLOCK /BETA/.
Note in the above example that a line number is referenced to aid in finding the EQUIVALENCE that caused the
error.
Statements with errors are unconditionally printed (even when LS has not been specifi ed). The some is true of
diagnostics that follow the program. Thus it is safe to run compilations without listings, knowing that any errors
will be documented.
There is no limit to the number of errors that can be detected in a program. Furthermore, the detection of errors
does not prevent the compiler from printing the listings that have been requested, or from generating object code
if so requested. Provision is mode at lood time for overriding the loading and execution of a program if it has errors,
but sometimes useful information can be gained even from a program with errors, expecially since the compiler often
recovers from errors in a sensible way. The compiler discontinues processing only in the case of hardware failure
or memory overflow.
A complete Iist of the compi ler's diagnostics is given in Table 1. Most of them are se If-explanatory, but a more
complete description is given where necessary.
Note that each error has a severity level associated with it.
12
The compiler acknowledges four levels of severity:
4
WARNING
A minor error, from which the compiler can recover in a manner that is likely to be what
the user had in mind.
7
WARNING
A major error, from which the compiler can recover by making some sort of assumption,
though it is not likely that the program will work correctly.
Compi ler Diagnostics
10
ERROR
A major error, causing the statement to be deleted.
15
ABORT ERROR
A catastrophic error, making it impossible to continue compilation. These are rare
and are mostly caused by hardware failures.
At the end of the summary, a message indicating the highest error severity obtained in the program is always printed
{unless, of course, the compilation was previously aborted).
Compiler Tables
All of the tables {known as lists) in the Sigma 5/7 FORTRAN IV compiler are of variable size; each can grow to as
large a size as needed, as long as there is working storage available. The lists are dynamically moved around in
memory to make room for each other. Although this sounds time-consuming, it generally occupies only a small percentage of compile time and offers several advantages.
One advantage is that it makes optimum use of working storage: no table can overflow unless all available memory
has been used. If, on the other hand, the compiler allocated a fixed number of words for statement labels, it would
then be unable to use that space for other purposes in a program with few labels. Conversely, a program with an
unusually Iarge number of labels might overflow the table even though there was plenty of other unused storage.
Another advantage is that both the input and output buffers are included among the dynamic lists in the compiler.
This means that any number of continuation cards can be handled without wasting buffer space for them when they
are not used. Furthermore, all intermediate files are kept in memory until they overflow. This means that the
scratch files (F:Xl and F:X2) are not used until they are needed. In a large machine with 1O-16K of working storage,
the scratch files will almost never be used. When they are used, their standard assignment is to RAD files, but this
assignment can be overridden with an !ASSIGN card.
The formula for working storage requirements is shown below. Note, however, that in addition to the tables used to
collect symbols, labels, constants, etc., a certain amount of space must be used for individual statement analysis.
The size of this area fluctuates rapidly according to the complexity of the statements, and is difficult to predict.
Sometimes, programs that overflow can be made to fit by moving complicated statements closer to the front of the
program. The formula is:
storage = 6S + 21 + 4R + 6K + 2L + 1C + 7B + 2E + 7A + 1N + W
where
S
number of symbols, i.e., scalar, array, subprogram, and dummy identifiers.
integer, Hollerith, hexadecimal, and logical constants.
R
real and double precision constants.
K
number of complex and double complex constants.
L
statement labels.
C
identifiers appearing in COMMON.
B
labeled COMMON blocks declared.
E
appearances of variables in EQUIVALENCE.
A
arrays dimensioned {this is in addition to their appearance in the symbol table, S, above).
N =
variables declared in NAME LIST.
W
locations of local working space, i. e., for statement analysis.
If working storage does overflow, the compiler prints a diagnostic to that effect and aborts the compilation.
Compiler Tables
13
Table 1. Error Messages (in alphabetic order)
Message
ADJUSTABLE DIMENSION ON NONDUMMY ARRAY.
Comments
10
ARRAY HAS TOO FEW SUBSCRIPTS. MISSING ONES ASSUMED EQUAL TO 1.
7
ARRAY HAS TOO MANY SUBSCRIPTS.
EXTRA ONES IGNORED.
7
ARRAY NOT DIMENSIONED.
10
ARRAY PREVIOUSLY DIMENSIONED.
NEW DIMENSIONS IGNORED.
7
ARRAY USED WITHOUT SUBSCRIPTS.
FIRST ELEMENT ASSUMED.
4
BLANK COMMON AND DUMMIES MAY
NOT BE INITIALIZED.
10
CHECKSUM ERROR OR EOF READ ON
SCRATCH FILE F:Xn. PROBABLE HARDWARE
FAILURE.
15
Some CDC compilers specifically allow this.
Our recovery is the same as theirs.
This usually occurs on a name that appears as
the first construct in a statement (e.g., to the
left of the equal sign), is followed by a left
parenthesis, and has not been dimensioned, but
cannot be a statement function either, because
there are executable statements ahead of it, or
because the name has appeared in an allocation
statement, such as COMMON.
Recovery is the same as that used by systems
that do not consider unsubscripted arrays an
error.
If n = 1, error is in Pass 2 reading intermediate
fiI e from Pass 1. If n = 2, error is in Pass 3
reading intermediate file from Pass 2.
7
For D or I in column I, declare the appropriate
variabl es in DOUBLE PRECISION or COMPLEX
statements. For B in Column I, use the
Boolean functions in the library.
COMPILER TOP OVER 65K.
15
This test is made in case any system generation
shou Id happen to relocate the compi ler above
65K. The compiler runs interpretively and the
INT (interpret) instruction only operates on a
16-bit address. The compi ler's working storage
may be above 65K, but not the compiler itself.
CONFLICTS WITH INNER DO-CONTROL
VARIABLE.
10
CONFLICTS WITH VARIABLE TYPE. DATA
GROUP DELETED.
7
CONSTANT NEVER USED.
4
DANGLING COMMA(S) IGNORED.
4
COLUMN 1 CHARACTER IGNORED. SEE
REFERENCE MANUAL.
DIMENSIONS TOO LARGE.
DO-CONTROL VARIABLE NEVER USED.
14
Severity
Compiler Tables
10
7
The rules for converting constants to correspond
to the type of the variable are essentially the
some as across the equal sign in on assignment
statement.
Table 1. Error Messages (cont.)
Message
Severity
DO-COUNT TOO LARGE. DATA GROUP
DELETED.
7
DO (OR REPEAT) on LINE _ UNCLOSED.
TERMINATION CODE INSERTED PRIOR TO
END.
7
DOUBLY DEFINED LABEL. THIS LABEL
IGNORED.
7
END STATEMENT PROVIDED COURTESY
OF SDS.
4
EXCESS RIGHT PARENTHESIS IGNORED.
4
EXTRA COMMA(S) IGNORED.
7
F IN COLUMN 1 TREATED AS EXTERNAL
STATEMENT.
4
HEX COUNT> 8. LAST 8 DIGITS USED.
7
HOLLERITH COUNT > 4. ONLY FOUR
CHARACTERS USED.
7
HOLLERITH STRING NOT TERMINATED.
10
ID CONFLICT WITH PREVIOUS USAGE.
THIS IDENTIFIER IGNORED.
7
IDENTIFIER CONFLICT WITH PREVIOUS
USAGE.
10
ILLEGAL DIMENSION.
10
ILLEGALLY NESTED LOOP ENDS HERE.
TERMINATION CODE GENERATED
ANYWAY.
7
ILLEGAL OPTION NAME{S} IGNORED.
o
Comments
Control card or end-of-file encountered before
END statement.
Hollerith constants of the nH form will use the
first four characters. Hollerith constants of the
nR form will use the last four characters.
End of statement reached before end of character string.
The upper bound of a dimension may not be less
than the lower bound.
Unrecognized options on the! FORTRAN control card wi II have no effect. The compiler
wi II skip to the next comma.
ILLEGAL REPLACEMENT.
10
ILLEGAL SYNTAX.
10
ILLEGAL TYPE.
10
INCORRECT FORMAT SYNTAX.
10
Often caused by an incorrect count in an nH
spec ifi cati on.
INEXPLICABLE ERROR AT nome + xxxxx.
PROBABLE HARDWARE FAILURE.
15
A compiler list contains meaningless data that
the comp iI er i tse If shou Id not have constructed.
This almost always indicates a hardware failure.
Compiler Tables
15
Table I. Error Messages (cont.)
Message
Severity
Comments
but it is not generally possible to determine
how the bad data got where it is.
INTEGER TOO LARGE. CONVERTED TO
FLOATING.
4
The constant may become single or double precision depending on the mode of the expression
in which it appears. The largest integer that
may be used is 2,147,483,647.
INTERPRETED AS . NOT..
4
The II III marker points to a II - , " (not sign),
which does not print on most printers.
LABEL HAS ALREADY APPEARE D.
7
MEMORY OVERFLOW IN PASS
16
I}
{;
15
MISSING COMMA ASSUMED BEFORE
THIS CHARACTER.
7
MISSING LEFT PARENTHESIS ASSUMED
BEFORE THIS CHARACTER.
4
MISSING RIGHT PARENTHESIS ASSUMED
HERE.
4
MISSING SLASH ASSUMED HERE.
7
MISSING ZERO ASSUMED AFTER THIS
PERIOD.
4
MORE THAN 131,072 CONSTANTS GENERATED. DATA GROUP DELETED.
7
MULTIPLE DUMMY MUST BE LAST.
10
MUST BE SCALAR VARIABLE.
10
Insufficient working storage. This should happen only in Pass I. If it happens in another
pass, it may be caused by hardware problems.
If it is consistent, it may be a software problem.
NO DIMENSIONS GIVEN. IDENTIFIER
IGNORED.
7
NO LEFT PARENTHESIS. THIS FUNCTION
WILL HAVE NO DUMMIES.
4
NOT A FORMAT STATEMENT LABEL.
7
NOT A HEX DIGIT. CONSTANT TERMINATED ON PRECEDING CHARACTER.
7
NUMBER OUT OF RANGE.
7
NUMBER TOO LARGE. SET TO MAXIMUM
POSSIBLE MAGNITUDE.
4
Maximum magnitude for both Real and Double
Precision is approximately 7.237 x 1075 ,
NUMBER TOO SMALL. SET TO ZERO.
7
The smallest Real or Double Precision magnitude that can be expressed is approximately
5.398 x 10- 79 .
Compiler Tables
Table 1. Error Messages (cont.)
Message
Severity
Comments
OPERATOR MISSING. IMPLICIT MULTIPLICATION ASSUMED.
4
OUTPUT RECORD TOO LARGE.
4
PARENTHESIS NESTING TOO GREAT.
7
FORMAT parenthesis nesting is limited to 10
levels.
PREVIOUSLY REFERENCED AS FORMAT.
7
Statement number has appeared in on I/O
statement.
REFLEXIVE DEFINITION.
10
RETURN IN MAIN PROGRAM TREATED AS
STOP.
4
STATEMENT HAS NO LABEL AND
CANNOT BE ACCESSED.
4
STATEMENT LABEL OUT OF RANGE.
7
STATEMENT STARTS IN COLUMN 6.
4
SUBSCRIPT NOT WITHIN ARRAY. DATA
GROUP DELETED.
7
THIS STATEMENT NOT PERMISSIBLE HERE.
10
THIS SUBPROGRAM WILL BE CALLED WITH
NO ARGUMENTS.
4
TYPE CONFLICT. OLD TYPE RETAINED.
7
UNDEFINED LABELS:
7
VARIABLE NOT UNDER DO-CONTROL.
10
WRONG NUMBER OF ARGUMENTS TO
INTRINSIC FUNCTION.
10
Statement function defined in terms of itself or
dummy array dimensioned in terms of itself.
Usually caused by BLOCK DATA or logical IF.
Followed by a Iist of statement numbers that are
not defined. This message usually appears at
the end of the program. It can also come out
at the beginning of an internal subprogram if
the preceding part of the program has local
labels that are not defined.
Allocation Error Messages
The various types of allocation error messages are discussed below. Such messages are printed at the end of the
source listing. As with all diagnostics, these messages are always printed regardless of whether the LS option has
been requested.
Previous Equivalence
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
CONTRADICTS PREVIOUS EQUIVALENCE.
Allocation Error Messages
17
The variables named have been equivalenced previously (either directly or indirectly) but not yet allocated (e.g.,
into local or COMMON storage).
Different Storage Areas
WARNING:
EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'xxx' IS IN COMMON BLOCK/blk/; 'yyy' IS IN BLANK COMMON.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'xxx' IS IN COMMON BLOCK/blk/; 'yyy' IS IN COMMON BLOCK/q/.
WARNING:
EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'xxx' IS IN BLANK COMMONi 'yyy' IS GLOBAL.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'xxx' IS IN BLANK COMMON; 'yyy' IS IN GLOBAL VARIABLE 'g'.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'xxx' IS GLOBALi 'yyy' IS GLOBAL.
The variables named have been allocated previously in different storage areas and, therefore, cannot be
equivalenced.
Previous Allacation
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
CONTRADICTS PREVIOUS ALLOCATION IN BLANK COMMON.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
CONTRADICTS PREVIOUS ALLOCATION IN COMMON BLOCK/blk/.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
CONTRADICTS PREVIOUS ALLOCATION IN GLOBAL VARIABLE 'ggg'.
The variables named have been allocated previously in the same storage area but in different locations than specified by the designated EQUIVALENCE.
Extension
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
EXTENDS BLANK COMMON DOWNWARD.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
EXTENDS COMMON BLOCK/blk/DOWNWARD.
WARNING: EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
EXTENDS GLOBAL VARIABLE 'ggg'.
18
A Ilocation Error Messages
WARNING:
EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
EXTENDS GLOBAL VARIABLE 'ggg' DOWNWARD.
An EQUIVALENCE statement may extend blank or labeled COMMON upward (beyond the last element) but not
downward (prior to the first element). It may not extend a GLOBAL variable in either direction.
EQUIVALENCE Item Subscript Count
WARNING: APPEARANCE OF 'xxx' IN EQUIVALENCE ON LINE nn IGNORED.
HAS p SUBSCRIPTSiSHOULD HAVE q OR 1 OR NONE.
WARNING: APPEARANCE OF 'xxx' IN EQUIVALENCE ON LINE nn IGNORED.
HAS p SUBSCRIPTS; SHOULD HAVE 1 OR NONE.
In these messages, both p and q wi II be greater than 1 and wi II be different from each other.
A variable in an EQUIVALENCE statement may have as many subscripts as it has dimensions, or it may have only
one subscript, or it may have no subscripts. With this error, the EQUIVALENCE set is taken as if the offending
item had not appeared.
Data in Blank COMMON
WARNING:
EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'vvv' IS IN A DATA STATEMENT AND CANNOT BE IN BLANK COMMON.
Variables in blank COMMON may not be initialized in DATA statements.
Doubleword Boundary Violation
WARNING:
EQUIVALENCE OF 'xxx' TO 'yyy' ON LINE nn IGNORED.
'vvv' AND 'www' MUST BOTH LIE ON DOUBLEWORD BOUNDARIES.
WARNING: THE
DOUBLE PRECISION}
COMPLEX
{
DOUBLE COMPLEX
VARIABLE 'xxx' IN
BLANK COMMON
}
{COMMON BLOCK/blk/
MUST
LIE ON A DOUBLEWORD BOUNDARY.
IT AND EVERYTHING BEYOND IT WILL BE SHIFTED UP BY ONE WORD.
DOUBLE PRECISION}
WARNING: THE
{COMPLEX
DOLIBLE COMPLEX
BLANK COMMON
}
{COMMON BLOCK/blk/
VARIABLE 'xxx' MUST LIE ON A DOUBLEWORD BOUNDARY.
WILL BE SHIFTED UP BY ONE WORD.
Allocation Error Messages
19
Double precision and complex variables must be allocated in even locations. If necessary, the compiler will change
the user's allocation requests to achieve this.
Overflow
WARNING:
LOCAL VARIABLE STORAGE EXCEEDS MAXIMUM MEMORY SIZE.
MAX SIZE USED INSTEAD.
WARNING:
BLANK COMMON EXCEEDS MAXIMUM MEMORY SIZE.
MAX SIZE USED INSTEAD.
WARNING:
COMMON BLOCK/blk/EXCEEDS MEMORY SIZE.
MAX SIZE USED INSTEAD.
WARNING:
EQUIVALENCE OF 'xxx' TO'yyy' ON LINE nn
CAUSES EQUIVALENCE SET TO EXCEED MAXIMUM MEMORY SIZE.
WARNING: MAXIMUM MEMORY SIZE EXCEEDEDj PROGRAM CANNOT BE LOADED.
When the compiler must address variables beyond maximum memory size, it does so modulo that size. However, the
size output in the obiect module is the full size, not the smoller truncated value. Thus the program will not be
loodable.
The last diagnostic shown above indicates that the total size of the generated program, local storage, blank COMMON, and all labeled COMMON and GLOBAL storage exceeds maximum memory size. This message appears
near the end of the summary listing, rather than at the end of the source listing. The abse.nce of this message does
not guarantee that the program will fit, since the compi ler cannot take into account other subprograms, library and
Monitor requirements, etc.
20
Allocation Error Messages
2. LIBRARY STRUCTURE
Library Initialization
In order to function correctly, the library must have certain conditions and triggers set before executing a FORTRAN
job. The library routines, along with the programs generated by the compiler, follow the usual rules of good programming practice, namely no initalization dependent on loading and no post-initialization. All necessary initialization is done executably in a routine named 9INITIAL. This routine must be called at the beginning of every execution. The compiler automatically generates this call on all main programs. If the user writes his own main
program in assembly language, he must do so also. t It is possible to restart execution of any FORTRAN object
program by going through 9INITIAL again, but this is also dependent on the characteristics of the Monitor being
used. In most batch environments, it is not really practical.
9INITIAL performs the following services:
1.
It types out the current time (on the OC device).
2.
It initializes some system triggers, such as the sense lights and the end-of-file exit.
3.
It sets up traps to process floating overflow, ignore fixed point overflow, and abort to the Monitor on other
illegal situations (such as unimplemented instructions or memory protection violations).
4.
It sets up the floating control indicators as follows:
FS
o
Do not trap on loss of significance.
FZ
o
Do not trap on floating underflow. The hardware will correctly set the result to zero and
reflect this in the condition codes.
FN
o
Do post-normalize all results. Unnormalized floating point numbers are not permitted anywhere in the system.
This status of the floating control is depended on throughout the system. If it has to be changed temporarily (such as in 9DTOI) it must be immediately restored. Otherwise, math routines may produce garbage,
and traps may occur that are not prov ided for.
Floating Overflow
The FORTRAN floating overflow trigger, BFLOVTRG, is set whenever a real or double precision overflow occurs
{this includes divide by zer~. The trigger is set in the trap handler in 9INITIAL, which also returns a maximum
value as the default result. This is done consistently throughout the system; that is, not just in the generated floating point instructions, but also in the math routines (via 9ERROR) and BCD input (in 9IEDIT).
Complex and double complex operations are also covered, since they are done in real and double precision parts.
The trigger is initially set to zero (false) and is decremented by one every time a floating overflow occurs. Thus
the machine language user can find out how many overflows have occurred. The FORTRAN library routine 9IFOVFL
is only concerned with whether there has been at least one. After making this test, 9IFOVFL always resets the trigger to zero.
Run-Time Diagnostics
The general form of run-time diagnostics is
FORTRAN RUN-TIME ERROR IN 'name' CALLED AT LOC x'loc'. (Heading)
Explanatory message.
(Text)
tThe call is with a BAL,6 instruction.
Library Structure
21
Errors in formatted input/output produce two additional Iines between the heading and the message. The first of
these shows either the FORMAT or the input record that is being scanned, and the second is a vertical bar that
marks the character position at which the error occurred. For example:
FORTRAN RUN-TIME ERROR IN '9BCDREAD' CALLED AT LOC X'OlC7D'.
2.4
2.6
2.B
I
3.0
3.2
ILLEGAL NUMERIC INPUT CHARACTER.
FIELD TERMINATED.
The name that is printed in the heading (e.g., 9BCDREAD) is usually the library routine in which the error was
detected. Sometimes, however, this routine is a secondary one and it is more informative to give the name of the
upper-level routine that called it. For example, an unassigned unit number does not print "7UNITADR', although
this is the routine that performs DCB searches for all input/output routines. Instead, the routine that called it is
printed out, such as '9REWIND' or '9BCDWRIT'. Furthermore, there are certain routines that are combined into one
assembly. In some of these cases, only the primary name will be printed out, regardless of which entry point was
used. Examples of this are 9DECODE/9ENCODE, 9SIN/9COS, and 9CSIN/9CCOS/9CSIHN/9CCOSH.
The location printed in the heading is usually the hexadecimal value of the link register used to call the routine
shown. (This is one word beyond the BAL ca II). However, there are exceptions to th is a Iso. When a standard
driver is called (i.e., the basic external version of an intrinsic math function), the name of the nonstandard evaluator is given (e.g., 9ALOG) but the location is that at which the standard driver (e.g., ALOG) was called.
Otherwise, the error message would only reveal that 9ALOG had been called from a location within ALOG, with
no indication of where the user called ALOG. Another case is input/output errors, which typically print the location of the most recent calion 9IODATA (to transfer data), but print the name of the routine that initiated the I/o
operation (e.g., 9BCDREAD) as an aid in identifying the kind of statement in process.
Most run-time errors have one of three severities:
4
Minor.
7
Major. Recovery is possible, by making some assumption, but this is unlikely to be what the user
intended.
15
Abort.
Recovery has a good chance of being what the user would want.
No sensible recovery is possible (or desirable).
There is one additional severity used in the math routines, namely 6.
routines is:
The distinction between 6 and 7 in these
6
Major.
A result exists, but it exceeds the numeric range of the machine (e.g., EXP(1000.)).
7
Major.
The result is undefined (e.g., AS IN (2.)).
The library is normally set up to abort on severities greater than or equal to 8, but to continue processing on all
others. However, the user may control both the abort severity level and the action to be taken when this level is
reached. He does this by calling the library routine ABORTSET, as follows:
CALL ABORTSET (Ioc)
or
CALL ABORTSET (toe, level)
where
loc
is a statement number (or ASSIGNed variable) to which control will be transferred (instead of aborting)
when an abort level error occurs. A value of zero (instead of a statement number) resets the system to
abort as usua I.
level
is an integer value from 1 to 15. The library will abort (or transfer to loc) on any run-time error
whose severity is greater than or equal to this value.
When called with only one argument, the abort level is unchanged. This routine enables the user to abort on any
error, for example, or to take control himself when a drastic error accurs and try to recover. This does not apply
to Monitor-detected errors, only to FORTRAN errors.
22
Run-Time Diagnostics
Table 2 shows the error messages produced by the math routines. There are often many routi nes that can produce
the same message. The names in parentheses are alternate entry points. For more detailed information on exact
error conditions, please refer to the SDS Sigma 5/7 Mathematical Routines Technical Manual (900906). The
"maximum" value referred to is approximately ±7. 237 x 10 75 for floating point and 2,147,483,647 for integer.
Table 3 gives all of the remaining error messages except those involving formatted input/output, and Table 4 contains the formatted I/o error messages. As indicated above, each of these is preceded by either the FORMAT or
input line with a marker at the erroneous character. The table, therefore, shows for each message whether the
FORMAT or the input line is printed.
Monitor Errors
Any error message at run time that does not begin with the heading
FORTRAN RUN-TIME ERROR IN 'name' CALLED AT LOC 'Ioc'.
is not a FORTRAN error message. It has either been output by the user's program or, more likely, is a Monitor error
message. For information on these, refer to the Sigma 5/7 Batch Processing Monitor Reference and Operations
manuals (90 09 54 and 90 11 98, respectively).
Most Monitor-detected errors fall into one of two categories, I/o error or illegal trap. Both cause the Monitor to
abort the job and skip to the next job. A variety of situations can cause these messages. A few of the more common are tabulated below.
I/O ERROR 46}
I/O ERROR 47
An !ASSIGN card on some unit (e.g., F:6) does not have enough information on it. This
usually happens on managed files, rather than on unlabeled DEVICE assignments. Although
it is difficult to determine just what additional information is needed, it is at least possible
to determine which unit number is involved, as described below.
I/o ERR OR 40 }
I/o ERROR 44
An attempt has been mode to read on output fi Ie (i. e., a unit that has been ASSIGNed
with "OUT" specified) or write an inputfile("IN" specified). This can also happen with
the FORTRAN standard unit numbers (101-l08), each of which is set up for either input or
output, but not both. (This can be changed with an ASSIGN card).
I/O ERROR 41 }
I/O ERROR 45
An irrecoverable read or write error has occured.
On all I/o ERRORs, it is possible to extract some useful information from a postmortem dump if a load map is available. The library cell 8UNITVAL contains the integer value of the unit number, while 8DCBADR points to the DCB
being used.
ILLEGAL TRAP
I.
This is caused by any of the following:
Stori ng into protected memory. Assuming that the trap has occurred within a FORTRAN language program,
this condition can be due to:
a.
Subscripts out of range.
b.
Referencing a dummy argument that doesn't correspond to anything, either because there were too
few arguments in the call, or because the user's program branched into the middle of a subprogram
without coming through a normal entry point.
c.
Reading into a Hollerith format in a program that was not compiled with the NMP option (see
Chapter I).
2.
Branching into protected memory. This is often caused by calling a missing subprogram. Such a subprogram will always appear as a PREF (unsatisified primary reference) on the load mop, but since this error
can be overridden, the call may actually be performed.
3.
Executing an unimplemented instruction, a privi leged (nonallowed) operation, or unrecognized CAL.
Since neither the object code nor the library contains any of these, this usally results from branching off
into unexpected places (such as location zero, which may occur on unsatisifed references).
Monitor Errors
23
4.
Push-down stack overflow or ~cimal arithmetic overflow. Although the FORTRAN system does not use
either decimal instructions or push-down stacks, when a floating overflow occurs, the monitor pushes
the registers onto the user's temp stacks. Therefore, the TSS value specified on the RUN card must be
large enough to accommodate this.
Library Routines
Table 5 lists all library routines by catalog number and name. See also the FORTRAN IV Library Technical
Manual, 90 10 36.
Table 2. Error Messages Produced by Math Routines
Message
24
Severity
Origin
ARGUMENT TOO LARGE. OVERFLOW;
RESULT MAXIMUM.
6
9CDEXP
9CEXP
9PWRCC
9PWRKK
MAGNITUDE OF ARGUMENT TOO LARGE
NO SIGNIFICANCE; RESULT ZERO.
6
9CDEXP
9CDSIN (9CDCOS, 9CDSINH, 9CDCOSH)
9CDTAN (9CDTANH)
9CEXP
9CSIN (9CCOS, 9CSINH, 9CCOSH)
9CTAN (9CTANH)
9DSIN (9DCOS)
9DTAN
9PWRCC
9PWRKK
9SIN (9COS)
9TAN
MAGNITUDE OF ARGUMENT TOO LARGE.
OVERFLOW; RESULT = MAXIMUM.
6
9CDSIN (9CDCOS, 9CDSINH, 9CDCOSH)
9CDSQRT (9CDABS)
9CSIN (9CCOS, 9CSINH, 9CCOSH)
9CSQRT (9CABS)
9DEXP
9DSINH (9DCOSH)
9EXP
9PWRDD
9PWRRR
9SlNH (9COSH)
MAGNITUDE OF ARGUMENT TOO LARGE.
OVERFLOW; RESULT = MAXIMUM.
7
9ASIN (9ACOS)
9DASIN (9DACOS)
NEGA TlVE ARGUMENT. NO SIGNIFICANCE;
RESULT ZERO.
7
9DSQRT
9SQRT
NEGATIVE TO NON-INTEGRAL POWER
OVERFLOW; RESULT = MAXIMUM.
7
9PWRDD
9PWRRR
SINGULARITY AT +OR- L OVERFLOW;
RESULT MAXIMUM.
7
9CATAN
9CDATAN
ZERO ARGUMENT. OVERFLOWi
RESULT MAXIMUM NEGATIVE.
7
9CDLOG
9CLOG
Library Routines
Table 2. Error Messages Produced by Math Routines (cant.)
Message
Severity
Origin
ZERO ARGUMENTS. NO SIGNIFICANCE;
RESULT =: ZERO.
4
9ATANI (9ATAN2)
9DATANI (9DATAN2)
ZERO OR NEGATIVE ARGUMENT. OVERFLOW; RESULT MAXIMUM NEGATIVE.
7
9ALOG
9ALOG10
9DLOG
9DLOGIO
ZERO TO NON-POSITIVE POWER. OVERFLOW; RESULT = MAXIMUM.
7
9PWRCC
9PWRCI
9PWRDD
9PWRDI
9PWRKI
9PWRKK
9PWRRI
9PWRRR
ZERO TO NON-POSITIVE POWER.
INTEGER OVERFLOW; RESULT MAXIMUM.
7
9PWRII
Table 3. General Error Messages
Message
Severity
Origin
Comments
CHECKSUM ERROR. PROBABLE HARDWARE FAILURE.
USED ANYWAY.
7
9BINREAD
An intermediate (binary) input record
has the correct format (control bytes)t
but the checksum does not match.
END-OF-FILE ON UNIT n.
4
9BCDREAD
9BINREAD
9BKSPACE
No EOFSET (or END =) provision has
been made to handle this end-of-file
(which may result from reading past the
last card in an input deck and encounteri ng a control card). A STOP statement is simulated.
FIRST ARG WAS NOT STATEMENT NUMBER.
4
EOFSET
The first argument to EOFSET must be
a statement number or an ASSIGNED
variable. Its first three digits are
checked for X'680' (a branch instruction).
9ASGOTO
ASSIGNED variables should begin with
X'680' (a branch instruction).
GO TO VARIABLE NOT
ASSIGNED; CONTAINS
xxxxxxxx
15
I/O UNIT n IS UNASSIGNED.
15
J
9BCDREAD
9BINREAD
9REWIND
9BKSPACE
9ENDFILE
9BCDWRIT
9BINWRIT
BUFFERIN
BUFFEROU
!
I
All unit numbers except 101-106 and
108 must be assigned with a control card
of the form
!ASSIGN F:n t etc.
Note that i"egal unit numbers outside
the range 0-65536 will be printed
modulo 2 16 , For example t -4 would be
65532.
Library Routines
25
Table 3.
Message
INPUT LIST ITEM IS PROTECTED (NOT A VARIABLE).
NEXT ITEM USED.
General Error Messages (cont.)
Severity
7
Origin
Comments
9BINREAD
A constant or expression appears in the
input list. Processing continues as
though it had not been present.
_......_.....•...
NEGATIVE CHARACTER
COUNT.
15
9DECODE (9ENCODE)
The first parameter in a DECODE or
ENCODE statement must be positive
or zero.
NO I/O IN PROGRESS.
15
9IODATA
9ENDIOL
An attempt has been made to transfer
list items (9IODATA) or terminate an
I/O list (9ENDIOL) but no I/O list has
been begun (via9BCDREAD, 9BINWRIT,
etc.) or the one that was begun has already been terminated. Either an I/O
list contains a call ta a function that
also does I/O, ar else a machine language user has misused these routines.
NUMBER OUT OF RANGE.
15
9IFSWICH
9SNSLITE (9IFSLITE)
Sense switch values must be 1-4. Sense
light values must be 0-24.
RECORD NOT SDS SINARY
FORMAT.
15
9BINREAD
An intermediate (binary) input record
has been read whose first byte (in the
first control word) is not X ']C' or X '3C'.
This may be a hardware error or it may
be trying to read a record that was not
written by a Sigma binary WRITE
statement.
SHEOF
See "FIRST ARG WAS NOT STATEMENT NUMBER. " above. SHEOF
also accepts zera.
SECOND ARG WAS NOT
STATEMENT NUMBER OR
ZERO.
4
TOO MUCH DATA
REQUESTED FROM
LOGICAL RECORD.
15
9BINREAD
A binary READ statement is trying ta
extract more words from a record than
were written into it.
UNDEFINED LABEL
REFERENCED.
15
9UNDEFLB
An undefined label has been referenced.
Check your compilation listing; all undefined labels are identified.
Tab Ie 4.
Message
Formatted I/o Error Messages
Format ar
Input Record
Severity
Comments
FORMAT PAREN NESTING
TOO DEEP.
Format
15
9BCDREAD
9DECODE
(9ENCODE)
9BCDWRIT
Parenthesis nesting is limited
to 10 levels.
I/o LIST ITEM WRONG
MODE. VALUE USED
ANYWAY.
Format
7
9BCDREAD
9DECODE
(9ENCODE)
9BCDWRIT
Numeric list item has been
used with logical (L) format
or vice versa.
•
26
Origin
Library Routines
Table 4. Formatted I/o Error Messages (cont.)
Message
ILLEGAL FORMAT
SYNTAX.
Format or
Input Record
Severity
Format
15
Origin
Comments
9BCDREAD
9DECODE
(9ENCODE)
9BCDWRIT
Most illegal FORMATs will be
detected at compile time. This
error can occur when
a.
a FORMAT has been read
into an array at run time.
b.
an I/O statement references an ASSI G Ned variable that has not been
ASSIGNed.
c.
a FORMAT has somehow
been destroyed.
ILLEGAL NUMERIC
INPUT CHARACTER.
FIELD TERMINATED.
Input Record
7
9BCDREAD
9DECODE
The character is treated like a
comma. The next field wi II
begin at the character following the illegal one.
INPUT EXPONENT UNDERFLOW. ZERO USED.
Input Record
4
9BCDREAD
9DECODE
The smallest value that can be
represented is ±5.398 x 10- 79 •
INPUT LIST ITEM IS PROTECTED (NOT A VARIABLE).
VALUE DISCARDED.
Format
7
9BCDREAD
9DECODE
A constant or expression that
appears in an input list can only
be used to provide a value for
N in a format.
INPUT VALUE OVERFLOW.
MAXIMUM USED.
Input Record
7
9BCDREAD
9DECODE
MISSING OR NEGATIVE
D IN FORMAT. ZERO
ASSUMED.
Format
4
9BCDREAD
9BCDWRIT
9DECODE
(9ENCODE)
The largest value than can be
represented is ±7. 237 x 1075 •
This value has been substituted.
- -......
The "d" in, for example, Fw.d
is either missing or has been replaced by an N whose value, at
run time, turns out to be
negative.
NEGATIVE COUNT IN
FORMAT.
Format
15
9BCDREAD
9BCDWRIT
9DECODE
(9ENCODE)
The repeat count on a specification may not be negative.
This most often occurs when an
N has been used.
NO FORMAT SPEC FOR
REMAINING DATA.
G22.15 FORMAT USED.
Format
4
9BCDREAD
9BCDWRIT
9DECODE
(9ENCODE)
Rescanning to the last parenthesized group does not produce
any format specifications capable of transmitting the items
that remain in the list. The G
format that is used instead will
work with all types of data,
especially on output.
OUTPUT EXPONENT
OVERFLOW. TREATED
MODULO 1000.
Format
4
9BCDWRIT
9DECODE
(9ENCODE)
P scale factor too large, causing the output exponent field to
exceed 999 and thus be
truncated.
SUPERFLUOUS NUMBER
IN FORMAT IGNORED.
Format
7
9BCDREAD
9BCDWRIT
9DECODE
(9ENCODE)
A repeat count (possibly l'.l,
possibly signed) precedes a
comma or right parenthesis.
\
I
~
•
Library Routines
27
Table 5.
28
Cat. No.
Name of Routine
Other Entries
705001
9ALOG
705002
9DLOG
705003
9EXP
705004
9DEXP
705005
705006
705007
705008
705009
705010
705011
705012
705013
705014
705015
705016
705017
705018
705019
705020
705021
705022
705023
705024
705025
705026
705027
9SIN
9DSIN
9ATANI
9DATANI
9SQRT
9DSQRT
9SINH
9DSINH
9TANH
9DTANH
9ASIN
9DASIN
9TAN
9DTAN
9ALOG10
9DLOGlO
9PWRII
9PWRRI
9PWRDI
9PWRCI
9PWRKI
9PWRRR
9PWRDD
7ALOG
7ALOGI
7ALOG2
7DLOG
7DLOGI
7DLOG2
7EXPI
7EXP2
7DEXPI
7DEXP2
9COS
9DCOS
9ATAN2
9DATAN2
705028
705029
9PWRCC
9PWRKK
705030
705031
705032
705033
705034
705035
705036
705037
705038
705039
705040
9CADD
9CMUL
9CDIV
9KADD
9KMUL
9KDIV
9CLOG
9CDLOG
9CEXP
9CDEXP
9CSIN
705041
9CDSIN
705042
705043
9CTAN
9CDTAN
705044
705045
9CATAN
9CDATAN
Library Routi nes
9COSH
9DCOSH
9ACOS
9DACOS
Library Routines
Size
Description of Routine
79
Real natural logarithm
116
59
Real exponential
87
Double precision exponential
90
133
91
121
38
63
78
81
60
68
26
65
70
110
19
21
37
35
35
67
74
57
57
40
41
9CSUB
9KSUB
7CLOG
7CDLOG
7CEXP
7CDEXP
9CCOS
9CSINH
9CCOSH
9CDCOS
9CDSINH
9CDCOSH
9CTANH
9CDTANH
Double precision natural logarithm
6
10
19
6
10
17
56
53
20
28
86
Real sine and cosine
Double precision sine and cosine
Real arctangent
Double precision arctangent
Real square root
Double precision square root
Real hyperbolic sine and cosine
Double precision hyperbolic sine and cosine
Real hyperbolic tangent
Double precision hyperbolic tangent
Real arcsine and arccosine
Double precision arcsine and arccosine
Real tangent
Double precision tangent
Real common logarithm
Double precision common logarithm
Integer raised to an integer power
Real raised to an integer power
Double precision raised to an integer power
Complex raised to an integer power
Double complex raised to an integer power
Real raised to a real power
Double precision raised to a double precision power
Complex raised to a complex power
Double complex raised to a double complex
power
Complex add and subtract
Complex multiply
Complex divide
Double complex add and subtract
Double complex multiply
Double complex divide
Complex natural logarithm
Double complex natural logarithm
Complex exponential
Double complex exponential
Complex sine, cosine, hyperbolic sine, and
hyperbolic cosine
112
Double complex sine, cosine, hyperbolic
sine, and hyperbolic cosine
52
59
Complex tangent and hyperbolic tangent
Double complex tangent and hyperbolic
tangent
Complex arctangent
Double complex arctangent
76
104
Table 5.
Library Routines (cant.)
Size
Cat. No.
Name of Routine
Other Entries
705046
9CSQRT
9CABS
88
705047
9CDSQRT
9CDABS
92
705048
9CASIN
9CACOS
9CDASIN
9CDACOS
91
705051
705052
8TO
7SIN
705053
705054
705055
9IFR
9IFD
9ITOD
9ITOR
7
705056
9DTOI
9RTOI
8
705057
705058
705059
705060
705061
705062
9DTOR
9KTOC
9SETUPO
9SETUPI
9SETUP2
9SETUPN
705063
705064
705065
705066
9SETUPV
91NITlAL
9ERROR
7ERROR
705067
9BCDREAD
705068
705069
9BCDWRIT
9BINREAD
705070
705071
705072
705073
705074
9DECODE
9INPUT
9IEDIT
9IOLUSA
9IODATA
705075
705076
705077
705078
705079
705080
705081
705082
705083
705084
9REWIND
9BKSPACE
9ENDFILE
7EOFABRT
9RDDISC
7UN ITA DR
9ASFORM
9ASGOTO
9IFSWICH
9SNSUTE
17
85
21
9SETUPM
7SET
7BUFOUT
7BUFOUTC
7ERRHEAD
7ERRINIT
7ERRMARK
7ERRTEXT
7PAC
7PHC
7PRC
7PRL
7PRQ
9READ
7BCDREAD
9PRINT
9BINWRIT
7BINREAD
9ENCODE
90EDIT
9DATA
9ENDIOL
7IODATUM
24
8
2
7
13
14
11
47
110
i 144
48
57
225
35
1407
35
132
14
38
14
33
9WRDISC
9IFSLITE
64
8
29
24
30
Description of Routine
Complex square root and absolute value
(real modulus)
Double complex square root and absolute
value (double precision modulus)
Complex arcsine and arccosine; double
complex arcsine and arccosine
FORTRAN library temp area
Special SIN/COS/EXP calculations used
by various complex functions
Real approximate equality test
Double precision approximate equal ity test
Integer to double precision and integer to
real conversions
Double precision to integer and real to
integer conversions
Double precision to real conversion
Double complex to complex conversion
Set up zero arguments
Set up one argument
Set up two arguments
Set up a fixed number of arguments or a
variable number with maximum
Set up a variable number of arguments
Run-time initialization
Math library error reporting
Run-time error reporting
BCD read
BCD write
Binary read and write
Memory-to-memory data conversion
Self-identified (NAME LIST) input
FORMAT scan
Transmit unsubscripted arrays in an I/o list
Transmit individual items in an I/o list
Rewind sequential files
Backspace one logical record
Write end-of-fi Ie
End -of -fi Ie abort
Read and write disc (random access)
Find I/o unit DCB address
Assigned FORMAT
Assigned GO TO
Test sense switch
Set and test sense lights
Library Routi nes
29
Table 5.
Cat. No.
Nome of Routine
705085
705086
705087
705088
705089
705090
705091
9IFOVFL
9UNDEFLB
9PAUSE
9STOP
7BINDEC
7GETMODE
8Tl
705092
8TINIT
705093
8TERROR
705094
8TEDIT
705101
705102
705103
705104
705105
ALOG
DLOG
EXP
DEXP
SIN
Library Routines
Size
Other Entries
Description of Routine
4
7STOP
8T2
8T3
8T4
8T5
8T6
8T7
8T8
8T9
8TlO
8TlI
8Tl2
8Tl3
8Tl4
8T15
8Tl6
8Tl7
SABORTEX
8ABRTSEV
8EOFEXIT
8ERREXIT
8FLOVTRG
8IOTRIG
8SENLITE
8IODLINK
8MSGBUF
8TALPHA
8TBETA
6BINBUF
6DATLINK
6DCBNAME
6EEFLAG
6EOFCALL
6EOFJADR
6EOFUADR
6EOFUTRG
6NRELMTS
6RECSIZE
8BCDBUF
8BUFORG
8DCBADR
8ENDIOL
8INPTERM
8IODADDR
8IODTYPE
8IOENLOC
8UNITNAM
8UNITVAL
13
20
26
13
12
I
Test for floating overflow
Undefined label abort
PAUSE
STOP (terminate execution)
Binary to decimal for messages
Argument mode calculation
Additional names for library temps
14
Temps for 9INITIAL
52
Temps for 7ERROR
151
5
5
5
5
5
I
30
Library Routi nes (cont.)
i
I
Temps for
I/o
Driver
Driver
Driver
Driver
Driver
9ALOG
9DLOG
9EXP
9DEXP
9SIN
for
for
for
for
for
Table 5,
Cat. No.
Name of Routine
705106
705107
705108
705109
705110
705111
705112
705113
705114
705115
705116
705117
705118
705119
705120
705121
705122
705123
705124
705124
705126
705127
705128
705129
705130
705131
705132
705133
705134
705135
705136
705137
705138
705139
705140
705141
705142
705143
705144
705145
705146
705147
705148
705149
705150
705151
705152
705153
705154
705155
705156
705157
705158
705159
705160
705161
705162
705163
DSIN
ATAN
DATAN
SQRT
DSQRT
SINH
DSINH
TANH
DTANH
ASIN
DASIN
TAN
DTAN
ALOG10
DLOG10
ACOS
ATAN2
COS
COSH
DACOS
DATAN2
DCOS
DCOSH
CCOS
CDCOS
CTANH
CDTANH
CACOS
CDASIN
CDACOS
CLOG
CDLOG
CEXP
CDEXP
CSIN
CDSIN
CTAN
CDTAN
CATAN
CDATAN
CSQRT
CDSQRT
CASIN
CSINH
CCOSH
CDSINH
CDCOSH
FLOAT
DFLOAT
INT
!DINT
SNGL
CSNGL
CABS
CDABS
ACOSF
ARCOS
ASINF
Library Routines (cont.)
Other Entries
Size
5
11
11
5
5
5
5
5
5
5
5
5
5
5
5
5
11
5
5
5
II
5
5
5
7
5
7
5
7
7
5
7
5
7
5
7
5
7
5
7
5
7
5
5
5
7
7
5
5
5
5
5
5
5
7
5
5
5
Description of Routine
Driver for 9DSIN
Driver for 9ATANI and 9ATAN2
Driver for 9DATANI and 9DATAN2
Driver for 9SQR T
Driver for 9DSQRT
Driver for 9SINH
Driver for 9DSIN H
Driver for 9TANH
Driver for 9DTANH
Driver for 9ASIN
Driver for 9DASIN
Driver for 9T AN
Driver for 9DTAN
Driver for 9ALOG 10
Driver for 9DLOG 10
Driver for 9ACOS
Driver for 9ATANI and 9ATAN2
Driver for 9COS
Driver for 9COSH
Driver for 9DACOS
Driver for 9DATANI and 9DATAN2
Driver for 9DCOS
Driver for 9DCOSH
Driver for 9CCOS
Driver for 9CDCOS
Driver for 9CTANH
Driver for 9CDTANH
Driver for 9CACOS
Driver for 9CDASIN
Driver for 9CDACOS
Driver for 9CLOG
Driver for 9CDLOG
Driver for 9CEXP
Driver for 9CDEXP
Driver for 9CSIN
Driver for 9CDSIN
Driver for 9CTAN
Driver for 9CDTAN
Driver for 9CA TAN
Driver for 9CDATAN
Driver for 9CSQRT
Driver for 9CDSQRT
Driver for 9CASIN
Driver for 9CSINH
Driver for 9CCOSH
Driver for 9CDSINH
Driver for 9CDCOSH
Driver for 9ITOR
Driver for 9ITOD
Driver for 9RTOI
Driver for 9DTOI
Driver for 9DTOR
Driver for 9KTOC
Dri ver for 9CABS
Driver for 9CDABS
Driver for 9ACOS
Driver for 9ACOS
Driver for 9ASIN
library Routi nes
31
Table 5.
32
Library Routines (cont.)
Other Entires
Size
Cat. No.
Name of Routine
705164
705165
705166
705167
705168
705169
705170
705171
705172
705173
705174
705175
705176
705177
705178
705179
705180
705181
705182
705183
705184
705185
705186
705187
705188
705189
705190
705191
705192
705193
705194
709195
705196
705197
ARSIN
ATANF
COSF
COSHF
DARCOS
DARSIN
EXPF
FLOATF
IFIX
LOG
LOGI0
SINF
SINHF
SQRTF
TANF
TANHF
ABS
AIMAG
AINT
AMAX
AMAXI
AMAXO
AMIN
AMINI
AMINO
AMOD
CDBLE
CDINT
CINT
CMPLX
CONJG
DABS
DBLE
DCMPLX
5
11
5
5
5
5
5
5
5
5
5
5
5
5
5
5
4
4
6
16
16
17
16
16
17
11
7
12
8
6
5
4
5
6
705198
705199
705200
705201
DCONJG
DDIM
DIM
DIMAG
6
9
8
5
705202
705203
705204
705205
705206
705207
705208
DINT
DMAX
DMAXI
DMIN
DMINI
DMOD
DREAL
8
19
19
19
19
12
4
705209
DSIGN
8
705210
705211
705212
705213
705214
705215
705216
705217
lABS
lAND
ICOMPL
!DIM
IEOR
IEXCLR
IF
[NOT
4
14
5
Library Routines
8
14
14
17
5
Description of Routine
Driver for 9ASIN
Driver for 9ATAN 1 and 9ATAN2
Driver for 9COS
Driver for 9COSH
Driver for 9DACOS
Driver for 9DASIN
Driver for 9EXP
Driver for 9ITOR
Driver for 9RTOI
Driver for 9ALOG
Driver for 9ALOG 10
Driver for 9SIN
Driver for 9SINH
Driver for 9SQRT
Driver for 9T AN
Driver for 9TANH
Real absolute value
Real imaginary part of complex
Real integral value
Real maximum value
Real maximum value
Real maximum value of integer arguments
Real minimum value
Real minimum value
Real minimum value of integer arguments
Real remainder (modulo)
Complex to double complex conversion
Double complex integral value
Complex integral value
Complex from two real values
Complex conjugate
Double precision absolute value
Real to double precision conversion
Double complex from two double precision
values
Double complex conjugate
Double precision positive difference
Real positive difference
Double precision imaginary part of double
complex
Double precision integral value
Double precision maximum value
Double precision maximum value
Double precision minimum value
Double precision minimum value
Double precision remainder (modulo)
Double precision real part of double
complex
Double precision first argument with sign of
second argument
Integer absolute value
Integer Boolean product (AND)
Integer l's complement (NOT)
Integer positive difference
Integer Boolean exclusive OR
Integer Boorean exclusive OR
Approximately equal or approximately zero
Integer l's compl ement (NOT)
Table 5.
Library Routines (conL)
Other Entries
Cat. No.
Name of Routine
Size
705218
705219
lOR
ISIGN
14
8
705220
705221
705222
705223
705224
705225
705226
705227
705228
705229
LOCF
MAX
MAXO
MAXI
MIN
MINO
MINI
MOD
REAL
SIGN
5
16
16
17
16
16
17
8
4
8
705230
705231
705232
ABSF
DIMF
SIGNF
4
8
8
705233
705234
705235
705236
705237
705238
705239
705240
705241
705242
705243
SSWTCH
SLITET
SLITE
OVERFL
DVCHK
EXIT
EOFSET
SETEOF
BUFFERIN
BUFFEROU
ABORTSET
17
17
5
8
8
9
43
41
52
43
21
Description of Routine
Integer Boolean sum (OR)
Integer first argument with sign of second
argument
Word address of argument
Integer maximum value
Integer maximum value
Integer maximum value of real arguments
Integer minimum value
Integer minimum value
Integer minimum value of real arguments
Integer remainder (modulo)
Real port of complex
Real first argument with sign of second
argument
Absolute value
Positive difference
Real first argument with sign of second
argument
Test sense switch
Test sense light
Set sense light
Test for floating overflow
Test for floating overflow
Exit to the Monitor
Set up end-of-fi Ie exit
Set up end-of-fj Ie exit
Direct input
Direct output
Set up abort exit and severity level
Library Routines
33
3. CALLING AND RECEIVING SEQUENCES
General Considerations
There are two kinds of calling/receiving sequences to be considered: standard and nonstandard. Standard calling
sequences are used for calling subroutines and functions that can be written in FORTRAN source language. They
must be able to handle various numbers and types of arguments. In general, the arguments that are passed are addresses rather than values. (Results of FUNCTIONs, however, are values, not addresses.)
Nonstandard calling sequences are used to call system routines, which must be coded in machine language and generally accept a fixed number of arguments (typically one) of a prescribed type. Arguments to nonstandard subroutines are usually values rather than addresses.
Mathematical Functions: Drivers and Evaluators
The compiler recognizes many function names as intrinsic functions. Some of these are generated in-line. Others
are performed with a special call. For example, when the compiler sees a call on the SQRT function it does not
generate a standard calling sequence to a routine called SQRT, but instead generates a nonstandard call to a routine
called 9SQRT. 9SQRT receives its argument in a register and is called in a one-word calling sequence instead of a
three-word sequence. 9SQRT can run fast, since its argument is where it ought to be and it does not have to decipher a complicated calling sequence. The object program calling 9SQRT is also shorter.
Since 9SQRT actually computes a square root, it is termed an "evaluator". Since it is called with a nonstandard
calling sequence, it is considered a nonstandard evaluator.
There is also a routine named SQRT that does no actual computation, but calls 9SQRT to do its work. SQRT has a
standard receiving sequence and is provided so that a user can declare the name SQRT to be EXTERNAL, then pass
the function name SQRT in an argument list. Such usage is relatively rare t , but in order to pass the name SQRT as
an argument, there must be a subroutine called SQRT with a standard receiving sequence. Therefore, the library
contains quite a few routines that are seldom called and do no real work. Since SQRT does no work other than call
9SQRT, the routine is called a "driver"; and since it has a standard receiving sequence, it is called a standard driver.
There is a standard driver for nearly every intrinsic function.
Some intrinsic functions (such as ABS) are so simple that the code for them is generated in-line. For such a function,
there is no external nonstandard evaluator. Nonetheless, the library must provide a function of that name with a
standard receiving sequence. Therefore the ABS routine must do its own work, and is thus called a standard evaluator instead of a standard driver. Most standard evaluators are quite simple. A few, however (such as AMAX, which
accepts a variable number of arguments), are rather involved. ATAN accepts either one or two arguments and calls
either 9ATANl or 9ATAN2 (nonstandard evaluators). There is no such thing as a nonstandard driver.
When a function name is intrinsic, it can generally accept arguments of various types. For example, SQRT can accept arguments that are integer, real, or double precision (but not logical), since the compiler can generate the
necessary code to convert the arguments.
However, when a function name is declared EXTERNAL and is no longer intrinsic, it becomes much more of a burden
to allow arguments of the wrong type because the function must then at execution time inspect the types of its arguments and convert them accordingly. This overhead would have to be paid, even though most of the arguments passed
are of the right type. However, Sigma 5/7 FORTRAN IV does not pay this overhead: standard drivers and evaluators
accept only arguments of the "correct" type. This does not mean that it is not possible to write a function or subroutine with a standard receiving sequence that accepts arguments of varying types. Enough information is passed in
the calling sequence so that such a routine can indeed be coded in machine language. It simply means that the
standard evaluators and drivers in the library are not coded this way. tt
Noming of System Routines
FORTRAN system subroutines must have names that cannot conflict with FORTRAN identifiers. A FORTRAN identifier begins with a letter; its other characters, if any, are letters and digits. Thus, a system subroutine name must be
anything other than such an identifier.
t But is allowed in USASI (formerly ASA) FORTRAN IV, as well as IBM FORTRAN IV.
ttNor are such standard subroutines os SLITET and EOFSET coded this way.
34
Calling and Receiving Sequences
In the Sigma 5/7 FORTRAN IV Library, the prefix digits 9, 8, 7, and 6 are used. Nearly all system-routine names
begin with the digit 9 (e.g., 9SQRT, 9SETUPN). Such names beginning with 9 are entry points. Names beginning
with the digit 8 (e.g., 8SENLITE) are system temps used to communicate between system routines; these are not
cal
but are loaded or stored.
The third class of system names is the group beginning with the digit 7. Like the names beginning with 9, these are
entry points, but nonstandard entry points. For example, the routine 9EXP (for raising e to the X power) has the nonstandard entry point 7EXP, which is called by 9SINH (hyperbolic sine). 7EXP does part of the work done by 9EXP,
and 9SINH needs the same piece of partial work done. Generally, the "7" entry points are important only to those
library routines that call them. The machine-language user will probably not want to call them (though he can if he
wishes), whereas he probably will want to call the 9-routi nes. The 7- names are not referenced in campi ler-generated
code; the 9-names are.
Names beginning with the digit 6 are temps, much like those beginning with 8. However, whereas the 8-temps communicate between routines, the 6-temps are local and are associated with only one routine. They are external only
for the purpose of re-entrance.
Standard Calling/Receiving Sequences
Standard Calling Sequences
Standard calling sequences are most easily defined by an example that shows FORTRAN source code and its associated
object code:
REAL Y(10,10), R
LOGICAL L
INTEGER K
CALL URN (Y, K, L, R)
LI,14
BAL,15
SNGL
INTG
LOGL
SNGL
4
URN
Y
K
L
R
ARG COUNT TO 14 (NA)
LINK THRU 15(LC)
The number of arguments (in this case four) is loaded into register 14; then the subroutine is called, linking through
register 15. The words that follow the BAL specify the arguments. The operation code portion of such a word indicates the arithmetic type of the argument (SNGL single precision real, etc,) and the address is the 17-biJ word
address of the argument. Note that even for doubleword arguments, the 17-bit word address is passed, not the 16·
bit doubleword address. No provision is made for passing addresses other than
addresses, and this scheme is
nat intended to handle byte or halfword quantities.
A call with no arguments is allowed and is performed in the following manner:
CALL LOP
LI,14
BAL,15
o
LOP
ARG COUNT TO 14 (NA)
LINK THRU 15(LC)
Sometimes an address passed as an argument must be computed at execution time, e, g., A(J), where A is an array,
It is considered bad for reentrancy to store such a computed address directly into the calling sequence, so an indirect bit is provided in all calling sequence words. For example:
INTEGER J
REAL A(20)
CALL QT (A(J»
J
LW,9
AI,9
STW,9
A-I
lTEMP
LI,14
BAL,15
SNGL
QT
* lTEMP
1
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
ADDRESS IN DIRECTLY THRU lTEMP
Standard Calling/Receiving Sequences
35
An additional bit is provided in the operation code portion of a call ing sequence word, to indicate that the argument is "protected" (Le., that it should not be stored into). This bit is set on arguments that are constants or nontrivial expressions. As far as the object listing is concerned, the fact that this bit is set is indicated by placing a
'Pi in the register field. For example:
CALL URN
(Y, J+K,
LW,9
AW,9
STW,9
J
LI,14
BAL, 15
SNGL
INTG, p
LOGL,P
SNGL, P
4
URN
Y
ITEMP
=. TRUE.
=-3.78
• TRUE., -3.78)
K
lTEMP
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
NOT INDIRECT BECAUSE I TEMP CONTAINS VALUE, NOT ADDRESS
The protected bit has no effect except in debug mode. A machine-language user who wishes to use protected bits
may define
P
EQU
8
before using P in the register field. t
Subprogram Names and Statement Labels as Arguments
So far, we have considered arguments that are
1.
scalar variables
2.
array elements
3.
array names
4.
constants (other than literal)
5.
nontrivial expressions
It has been shown that when an array name is written as an argument, the address of the first element of the array is
passed; thus, the generated code is the same as if the first element of the array had been written instead of the array nome. We have not yet considered arguments that are themselves dummies, nor have we dealt with
1•
subprogram names
2.
statement labels
When a subprogram name is passed as an argument, the address of the entry point of the subprogram is passed. For
example:
EXTERNAL URN
CALL QT (URN)
LI,14
1
BAL, 15
PZE, P
QT
URN
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
Notice that the calling sequence word has the protected bit set, since it is injudicious to store into a subprogram
entry point. Notice also that, since URN is a subroutine name rather than a function name, it is passed without
type (as indicated by the PZE op-code). If URN had been a function of, say, real type, the op-code would have
been SNGL, P instead of PZE, P.
tOr he may use SYSTEM FORTLIB to define such parameters for him.
36
Standard Calling/Receiving Sequences
See Chapter 4.
Statement labels are passed in a different way. When 23S is used as an argument, it is not the location of the label
23S that is passed but the location of a branch instruction (B) to that label. Thus, for example:
CALL QT (23S)
/--,
lG
LI,14
BAL,15
PZE,P
1
QT
lG
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
B
23S
BRANCH LEADING TO 23S
This is done so that statement labels passed as arguments will work the same way as variables to which labels have
been ASSIGNed. The statement ASSIGN 23 to K causes a B instruction leading to 23S to be stored in the variable
K. Thus, CALL QT (K) has the same effect as CALL QT (23S). This also makes it possible to write
SUBROUTINE QT (LBL)
INTEGER LBL t J
J == LBL
The effect on the variable J of the statement J == LBL is the same as ASSIGN 23 TO J.
gardless of whether QT was called with K or 23S as the argument.
This will work properly, re-
One anomaly is caused by this method of passing statement labels; this is in the LOCF function. For all other arguments, LOCF returns, as an integert the absolute word address of the argument. Thus t for a subprogram name as the
argument, LOCF returns the location of the entry pointi but, for a statement label, LOCF returns not the location of
the label but the location of a branch to that label.
Arguments That Are Themselves Dummies
When a subprogram argument is also a dummy, the effective address received by the current subprogram must be
passed on to the called one. In the case of dummy scalars and subprogram names, this can be handled quite conveniently with the indirect bit in the calling sequence. For example:
SUBROUTINE LOX (SCALAR,SPROG)
EXTERNAL SPROG
CALL YAZ (SCALAR, SPROG)
LI,14
BAL t 15
SNGL
PZE
2
YAZ
* SCALAR
*SPROG
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
As explained below in the section on "Receiving Sequences", the temps SCALAR and SPROG contain the addresses
of these dummies. In passing dummy array names and dummy array elements as arguments t it is usually necessary to
calculate an address:
SUBROUTINE LAT (ARRAY)
REAL ARRAY (1O)
CALL KAP (ARRAYtARRAY(J»
LI,9
AW,9
STW,9
LW,9
AW,9
STW,9
LI,14
BAL,15
SNGL
SNGL
1
ARRAY
lTEMP
J
ARRAY
2TEMP
2
KAP
*ITEMP
*2TEMP
ARG COUNT TO 14 {NA}
LINK THRU 15 (LC)
Standard Calling/Receiving Sequences
37
The temp ARRAY contains the address of ARRAY (0).
An element of a multiple dummy is rather awkward to pass as an argument:
SUBROUTINE ZAGREB (/MULDMY (N);)
INTEGER MULDMY, N, LADO
CALL SOLISTI (MULDMY(LADO»
LW,l
LW,1
BGEZ
LW,I
STW,I
LI,14
BAL, 15
INTG
IG
LADO
*MULDMY,I
1G
0, I
ITEMP
1
SOLISTI
*1TEMP
BRANCH IF ARG NOT INDIRECT
HANDLE INDIRECT
ARG COUNT TO 14 (NA)
LINK THRU 15 (LC)
Standard Receiving Sequences
Standard receiving sequences are quite similar to standard call ing sequences and are best defined by example:
SUBROUTINE URN (W, M, B, Q)
REAL W{lO, JO),Q
LOGICAL B
INTEGER M
URN
LI,5
BAL,6
SNGL
INTG
LOGL
SNGL
STW,15
LI,9
AWM,9
W
M
B
Q
IPTMP
4
9SETUPN
W
M
B
DUMMY COUNT TO 5 (ND)
LI NK THRU 6 (LR)
Q
1PTMP
-II
W
RES
RES
RES
RES
RES
SA VE EXIT LOC
OFFSET THE ARRAY W
TEMP
TEMP
TEMP
TEMP
TEMP
FOR
FOR
FOR
FOR
FOR
DUMMY W
DUMMY M
DUMMY B
DUMMY Q
EXIT LOC
The system subroutine 9SETUPN moves the argument addresses from the calling sequence into the temps (W, M, B, and
Q) provided for them in the receiving program. It also adds the argument count (register 14) to the link address (reg-
ister 15) so that a return from the subroutine URN will lead to the location just after the calling sequence in the
source program. A RETURN statement in the above subroutine would be generated as
B
*1PTMP
A RETURN statement in a FUNCTION subprogram would contain a load instruction before the branch, to pick up the
result of the function into the appropriate register. Aside from this difference, the entry and exit from SUBROUTINEs
and FUNCTIONs is exactly the same.
References to the dummy scalars M, S, and Q are made indirectly through the temps M, B, and Q. For example:
M
M/73
LW,9
DW,9
STW,9
38
*M
==73
*M
Standard Calling/Receiving Sequences
The address passed to URN for the array W is the address of W (1, 1). In addressing W, it is more convenient to
deal with the address of W(O, 0) than W( I, 1) so the code following the receiving sequence, namely
LI,9
AWM,9
-11
W
OFFSET THE ARRAY W
converts the received address of W( I, 1) to that of W(O, 0). The distance between the first element of an array (in
this case, W( I, 1» and the zero-th element (the element addressed when all subscripts are zero) is called the offset
(in this case -11).
Elements of the array Ware referenced through the temp W, indirect and indexed. For example:
W(J,K) == 0
LI,8
LI, 1
MW,I
AW,I
STW,8
0
10
K
J
*W,1
The "protected" bit may be used in receiving sequences as well as calling sequences. When the protected bit is
set on an argument in a calling sequence, it indicates that the argument should not be stored into •. When the protected bit is set on a dummy in a receiving sequence, it indicates that the dummy is stored into; hence the argument should not have its protected bit set. Currently the compiler never generates protected bits in receiving sequences.
In the nondebug mode, the subroutine 9SETUPN is not concerned with the protected bits in a calling/receiving sequence, nor is it concerned with the type bits. 9SETUPN does, however, take care of indirect bits in the calling
sequence.
A wrong number of arguments will never couse either 9SETUPN or the subroutine URN to return to the wrong place.
The number of dummies determines where 9SETUPN sholl return, and the number of arguments determines where URN
shall return. Suppose there are n arguments and m dummies. If there are too many arguments, then only the first m
of them are set UPi the others are ignored. If there are too few arguments, then only the first n dummies are set up.
The other dummies remain set to whatever they were on the previous call to URN. If there was no previous call on
URN, the results of referencing an un-set-up dummy are unpredictable. Such usage is illegal.
The register conventions for 9SETUPN are as follows:
o
1-4
5 (ND)
6 (LR)
7-9
10-13
14 (NA)
15 (LC)
Undisturbed
Destroyed by 9SETUPN
Dummy count
Link register for 9SETUPN
Undisturbed (may receive dummy addresses)
May be destroyed by 9SETUPN
Argument count
Link register for URN. 9SETUPN adds the contents of 14 to 15 before returning. This is to skip over
the arguments in the call ing program.
The fact that index register 7 is undisturbed by 9SETUPN can be useful. Typically, the argument addresses received
are stored into temps corresponding to the dummies. The machine-language programmer may decide not to receive
an argument address in a temp but receive it in register 7 instead. This makes it quite easy to code standard function drivers. For example:
SQRT
LI,5
BAL,6
SNGL
LW,8
LW,6
B
1
9SETUPN
7
0,7
15
9SQRT
DUMMY COUNT TO 5 (ND)
LINK THRU 6 (LR)
RECEIVE DUMMY ADDRESS IN 7
VALUE OF DUMMY TO 8 (AR)
MOVE LC INTO LL
SIMULATE DIRECT CALL ON 9SQRT
Standard Calling/Receiving Sequences
39
The instruction sequence
LW,6
B
15
9SQRT
above is preferable to the more obvious
BAl,6
B
9SQRT
*15
for two reasons:
1.
It is foster.
2.
It causes error messages printed by 9SQRT to cite the location from which SQRT was called in the user's pro~
gram, rather than the location from which 9SQRT was called in SQRT.
Register Conventions in Standard Subprograms
Once a standard subprogram has gone through the protocol of setting up its dummies, it can destroy the contents of
any registers it wishes other than register O. It should keep the contents of 15 for exiting purposes. Function results are returned in standard registers (see below).
Word Format in Calling and Receiving Sequences
The words used to specify arguments and dummies are arranged in the following way:
Type bits
t
.
,
Word Address
o
1 2 3 4 5 6 789
14 15
31
The operation code portion of the word contains six type bits (bits 2-7), which are allocated as follows:
7
6
5
4
3
2
Integer
Real
Double precision
Complex
Double complex
Logical
A calling sequence typically has one of these bits set, indicating the type of the argument. A receiving sequence
word typically has one or more of these bits set, indicating the types of arguments it will accept. When a statement
label is passed as an argument, none of the type bits are set; this means that it can be received by a dummy of any
type. The same is also true of a SUBROUTINE name (but not a FUNCTION name) passed as on argument. Usually,
a receiving sequence word has exactly one type bit set, but there is one case in which all the bits are set: a dummy
SUBROUTINE name. A dummy SUBROUTINE can accept as its argument the name of a SUBROUTINE or the name of
a FUNCTION of any type. Therefore, the receiving sequence word for a dummy SUBROUTINE has all six bits set.
There will also be one case in which a receiving sequence word will have no bits set: an asterisk in a dummy list,
which is intended to receive a statement label. This dummy will conflict with any argument except a statement
label or a SUBROUTINE name.
Bit 8 is called the "protected" bit. In a colling sequence word it indicates that the argument should not be
stored into; in a receiving sequence word it indicates that this dummy ~ stored into; hence the argument
should not be protected. The protected bit is part of the R field and is listed as such on the object code listing. For
calling/receiving sequences, the compiler will observe the following mnemonics on the object listing. t
tThese are also defined in SYSTEM FORTUB for use by assembly language routines. See Chapter 4.
40
Standard Calling/Receiving Sequences
Not Protected
PZE
INTG
SNGL
DOUB
CMPX
KMPX
LOGL
EVRY
000
010
020
040
080
100
200
3FO
Protected
FORTRAN
PZE, P
008
INTG,P 018
SNGL, P 028
DOUB, P 048
CMPX, P 088
KMPX, P 108
LOGL,P 208
EVRY, P 3F8
No type
Integer
Real
Double precision
Complex
Double complex
Logical
Every type
The menmonic KMPX is derived from the fact that throughout the system the one-character abbreviation for double
complex is "K". t This letter is used in some library routine names and in the compilation summary.
Bits 15-31 are the 17-bit word address of the argument (calling) or the dummy temp (receiving). Arguments may be
indirect, indicated by setting bit 0; dummies may not be indirect. Argument addresses are presumed to be memory
word addresses and should not be registers. A dummy temp address is typically a memory address but may also be
register 7, or 8, or 9. Bits 9-14 are not currently used for anything. They should be set to zero in both calling
and receiving sequences. Bit 1 is used to indicate a non-FORTRAN argument (e.g., for interface with COBOL)
and should otherwise be zero. tt
Standard Accumulators for Arithmetic
For a machine like Sigma 5 or 7, with 16 accumulators, it may seem odd to define "standard" accumulators in which
certain types of arithmetic are done. Yet there is good reason to do so. The question arises: in what register do
the results come back from functions? Since functions are, in general, compiled separately from the routines that
call them, it is necessary to have a convention on this subiect. It is generally best that function results come back
in a register where they can be used in further computation. Therefore, standard registers for arithmetic of each
type are defined as follows:
Integer
Real
Double precision
Complex
Double complex
Logical
9
8
8-9
8-9
8-11
9
(AI)
(AR)
(AD)
(AC)
(AK)
(AL)
Returning the Results of Functions
The result of a function of a particular type is returned in the standard accumulator for that type of arithmetic. In
generated code, the result is loaded into the appropriate register iust before returning. For SUBROUTINEs (as opposed to FUNCTIONs) no result is returned, and the contents of the standard accumulators are not guaranteed after
exit from a SUBROUTINE.
Although for most functions the condition codes will be correctly set to indicate how the result compares with zero,
the compi ler wi II not assume that the condition codes are correctly set at return time. The compi ler wi II generate
a "compare with zero" if necessary to test the result of a function.
This applies not only to functions with standard calling sequences but to intrinsic function evaluators as well.
The Argument Set-Up Routines 9SETUPN, 9SETUPO, 9SETUP1, 9SETUP2
A listing of 9SETUPN is shown in Appendix A. This routine is capable of setting up any number of arguments, including zero. The cases of zero, one, and two arguments, however, are quite common and there are three additional subroutines, 9SETUPO, 9SETUPI, and 9SETUP2 which specifically set up zero, one, or two arguments. They
tAs in Komplex.
ttCertain COBOL argument types are FORTRAN-compatible; e.g., COMPUTATIONAL-2 type corresponds to REAL
type (i.e., SNGL). For such arguments, COBOL does not set bit I.
Standard Calling/Receiving Sequences
41
do so significantly faster than 9SETUPN would. The calling sequence to these routines is similar to that for9SETUPN,
but since it would be redundant to pass the number of dummies to these routines, it is not passed. For example:
SUBROUTINE WELD (N49)
INTEGER N49
BAL,6
INTG
STW,15
9SETUPI
N49
"IPTMP
LINK THROUGH 6 (LR)
SAVE EXIT LOC
Receiving Sequences Involving Multiple Dummies
A multiple dummy is a construct capable of receiving a variable number of arguments. A multiple dummy is neither
a scalar nor an array, but it has some of the characteristics of an array. A dummy list in a SUBROUTINE or FUNCTION statement may contain, at most, one multiple dummy. There may be other dummies in the list and, if so, the
multiple dummy must come last:
SUBROUTINE UBANGI (DAVE, MARIDA,/MULDMY (NN)/)
DOUBLE PRECISION DAVE
INTEGER MAR IDA, NN
REAL MULDMY
LI,5
BAL,6
DOUB
INTG
SNGL
STW,15
STW,4
-3
9SETUPV
DAVE
MAR IDA
MULDMY
"IPTMP
NN
-DUMMY COUNT (INCLUDING MULTIPLE DUMMY) TO 5 (ND)
LINK THRU 6 (LR)
SAVE EXIT LOC
STORE MULTIPLE DUMMY ARG COUNT FROM 4 (NMD)
The scalar NN is not itself a dummy, although it appears in the dummy list. It simply receives the number of arguments that corresponds to MULDMY. If UBANGI were called with five arguments, N N would be set to 3. The
arguments corresponding to MULDMY are not moved into the receiving subprogram. Instead, into the temp
"MULDMY" is stored the address of the zero-th argument corresponding to MULDM Y. Thus, if UBANGI is called
with five arguments, then MULDMY points to the word in the calling sequence for the second argument (although
the third argument is the first one that corresponds to MULDMY).
The potential indirectness of DAVE and MARIDA is handled by 9SETUPV, but the potential indirectness of the other
arguments is handled at each reference to MULDMY.
MULDMY(J) = 5
LW,8
LW,I
LW,I
BGEZ
LW,l
lG STW,8
=5.0
J
*MULDMY,1
lG
0,1
0,1
BRANCH IF ARG NOT INDIRECT
HANDLE INDIRECT
This kind of receiving sequence is used in generated code and also in library functions such as MAX.
The Argument Set-Up Routine 9SETUPV
A listing of 9SETUPV is shown in Appendix A. This routine is used in receiving sequences that involve multiple dummies, Le., subprograms that can receive a variable number of arguments. Registers 14 (NA) and 15 (LC) are the
same as for 9SETUPN. In register 5 (ND) is passed minus the number of dummies (including the multiple dummy).
In register 4 (NMD) is returned the number of arguments that corresponds to the multiple dummy (this number may be
zero). The fixed dummies (i.e., those other than the multiple dummy) are handled the same way as those in
9SETUPN. Into the temp for the multiple dummy is stored the address of the zero-th call ing sequence word corresponding to the multiple dummy.
The type bits and protected bit in the receiving sequence for the multiple dummy apply to all the arguments that
correspond to the multiple dummy.
42
Standard Calling/Receiving Sequences
The Argument Set.Up Routine 9SETUPM
9SETUPV is sufficient to handle the requirements of code generated by the compiler, but is sometimes not sufficiently
flexible for machine-language library routines. Some library routines need to do three things that are impossible
with 9SEnJPV:
•
Allow the variable arguments to be of different types.
•
Allow some of them to be protected, but others not.
•
Set a maximum on the number of variable arguments.
Consider, for example, the library subroutine EOFSET, which can be called in three ways:
1.
With no arguments.
2.
With one argument, which is a variable of any type or a statement label (protected).
3.
With two arguments, in which case the second must be an integer variable (nonprotected).
For the benefit of such library routines, there is a third kind of 9SETUP routine: namely 9SETUPM. This is very
much like 9SETUPN except that it is passed two dummy counts instead of one; these are a maximum and a minimum
acceptable number of dummies. The receiving sequence contains a word for each dummy up to the maximum number, and each dummy may have different characteristics. There is nothing akin to a multiple dummy in a 9SETUPM
receiving sequence. 9SETUPM returns the number of calling arguments in register 14 (achieved by simply not altering the contents of register 14; the calling program has put it there).
In register 5 (where 9SEnJPN receives the number of dummies) 9SETUPM is passed the maximum number of arguments
(MXA), and in register 4 it is passed the minimum (MNA). Because of the standard error recovery (in the nondebug
mode) from the wrong number of arguments, 9SEnJPM can ignore register 4. It simply sets up as many as it can
(never more than register 5). Therefore, the nondebug 9SETUPM is identical to 9SETUPN, a fact that is indicated
in the listing of 9SETUPN in Appendix A.
Nonstandard Calling/Receiving Sequences
Mathematical Function Evaluators
Sigma 5/7 FORTRAN IV uses a set of nonstandard function evaluators whose names begin with the prefix "9". The
register conventions are as follows:
Register 0
Reserved for the address of a Stack Pointer Doubleword.
modify register O.
Library routines never
Registers I, 3, 5, 7
Preserved by all evaluators.
Registers 2, 4
May be destroyed by an evaluator.
Register 6
Library Iink register.
Register 8-15
Used for passing arguments and results. Certain of these registers are also available
for use by the evaluators, as detailed below.
Evaluators are called with a BAL,6 instruction.
Nearly all function evaluators have one argument and ane result (the only exceptions are 9ATAN2 and 9DATAN2).
Nearly all function evaluators have a result of the same type as the argument (the only exceptions: 9CABS and
9CDABS). Therefore, it is possible to document most evaluators in five groups, based on the type of the argument
result. (At the present time, there are no evaluators of integer or logical type.)
Real
8
9-11
12-15
Double precision
8-9
10-13
14-15
Argument and result
May be destroyed
Must be preserved
Argument and result
May be destroyed
Must be preserved
Nonstandard Calling/Receiving Sequences
43
Complex
8-9
10-13
14-15
Argument and result
May be destroyed
Must be preserved
Double complex
8-11
12-13
14-15
Argument and result
May be destroyed
Must be preserved
Integer or Logical
8
May be destroyed
Argument and result
May be destroyed
Must be preserved
9
10-11
12-15
t
tt
The exceptionaf routines are as follows:
9ATAN2
8
9
10-11
12-15
9DATAN2
8-9
10-11
12-13
14-15
9CABS
9CDABS
8
Result and argument P in ATAN(P,Q)
Argument Q in ATAN(P,Q); may be destroyed
May be destroyed
Must be preserved
Result and argument P in DATAN(P,Q)
Argument Q in DATAN(P, Q); may be destroyed
May be destroyed
Must be preserved
9
10-13
14-15
Result and real part of argument
Imaginary part of argument; may be destroyed
May be destroyed
Must be preserved
8-9
10-11
12-13
14-15
Result and real part of argument
Imaginary part of argument; may be destroyed
May be destroyed
Must preserved
Power Routines
Nine different routines are needed to implement the ** operator. Routines are provided for raising any number to a
power of its own type and for raising any number to an integer power. Register usage in the power routines is as
follows:
Register 0
Reserved for the address of a Stack Pointer Doubleword. library routines never modify
register O.
Register 1-5
Preserved.
Register 6
Link register. Power routines are called with a BAL,6 instruction.
Register 7
Preserved.
Registers 8-15
See the table below.
tReal part in 8, imaginary part in 9.
ttReal part in 8-9, imaginary part in 10-11.
44
Nonstandard Calling/Receiving Sequences
The power routines and their use of registers 8-15 are as follows:
f.
Routine
Base Type to Exponent Type
Result
and Bose
Exponent
May be
Destroyed
Must Be
Preserved
9PWRII
Integer to integer
9
11
8, 10-11
12-15
9PWRRR
Real to real
8
10
9-11
12-15
9PWRDD
Double to double
8-9
10-11
10-13
14-15
9PWRCC
Complex to complex
8-9
10-11
10-13
14-15
9PWRKK
Double complex to double complex
8-11
12-15
12-15
None
9PWRRI
Real to integer
8
9
9-11
12-15
9PWRDI
Double to integer
8-9
11
10-13
14-15
9PWRCI
Complex to integer
8-9
11
10-13
14-15
9PWRKI
Double complex to integer
8-11
13
12-13
14-15
Type Conversion Routines
Although twenty different arithmetic type conversions (such as real to integer) are defined, only six conversion routines are needed. The other conversions are performed by in-line code or by a combination of a conversion routine
and in-line code.
The register conventions for registers 0-7 are the some as those for the power routines (described above). The routines, the conversions performed, and the conventions for registers 8-15 are as shown below.
Routine
Conversion Performed
Argument
Result
May be
Destroyed
Must Be
Preserved
9ITOR
Integer to real
9
8
9
10-15
9ITOD
Integer to double
9
8-9
None
10-15
9RTOI
Real to integer
8
9
8
10-15
9DTOI
Double to integer
8-9
9
8
10-15
9DTOR
Double to real
8-9
8
9
10-15
9KTOC
Double complex to complex
8-11
8-9
10-12
13-15
In generated code, the conversions will be performed as follows:
To I
I
From I
D
To R
To
9ITOR
9ITOD
LI,9
From R
9RTOI
From D
9DTOI
9DTOR
From C
Error
Error
Error
From K
Error
Error
Error
To C
To K
0
I
9lTOD
LD,10
=O.ODO
0
LI,9
LD,1O
0
=O.ODO
9DTOR
LI,9
0
LD,10
=O.ODO
9ITOR
LI,9
0
LI,9
LI, 11
LW,10
LI,9
0
9
0
9KTOC
Nonstandard CallingJReceiving Sequences
45
Complex Arithmetic Routines
Addition, subtraction, and negation are performed in-line,while multiplication and division are handled by the following routines:
Routine
46
Result and
Left Operand
Right
Operand
May Be
Destroyed
Must be
Preserved
9CMUL
Complex multiply
8-9
10-11
10-11
12-15
9CDIV
Complex divide
8-9
10-11
10-11
12-15
9KMUL
Double complex multiply
8-11
12-15
12-15
None
9KDIV
Double complex divide
8-11
12-15
15-15
None
Nonstondard Calling/Receiving Sequences
4. INTERFACE WITH ASSEMBLY LANGUAGE ROUTINES
Use of Subprograms
To make a FORTRAN program use subprograms written in assembly language, it is only necessary to CALL them or
reference them as functions. For example
CALL ALPHA
X = BETA(Y)
The compiler doesn't know whether ALPHA and BETA are assembly language or FORTRAN language subprograms,
and it doesn't matter. If they are written in assembly language, they must follow a few conventions in order to
interface properly.
Chapter 3 described the call ing and receiving sequences used to enter and exit from subprograms and to pass arguments. The same sequences can be used when an assembly language program calls a FORTRAN program. Standard
names have been assigned to the registers and other parameters used in generated object code. (See "System
FORTLIB" below.) Although the listing of the object code produced by the compiler does not use these mnemonics,
it is recommended that assembly language users do so because (1) it is good practice to parameterize such things,
in case they should ever have to be changed; and (2) it creates a universal standard that users can employ to increase the ease with which others can read and understand those programs. Most of the Sigma 5/7 FORTRAN IV
library routines are written with these mnemonics, as are the examples in this chapter.
The general form of the standard calling sequence is
U,NA
BAL, LC
type, p
type, p
number of arguments
subprogram
argument 1
argument 2
type, p
argument NA
where "type" indicates integer, real, etc., and "p" indicates that the argument is protected (may not be stored into). If there is no "p", the argument can be stored into.
The standard receiving sequence for a fixed number of arguments is
U,ND
BAl, lR
mask, p
mask, p
number of dummies
9SETUPN
dummy temp 1
dummy temp 2
mask, p
dummy temp N D
where "mask" is a mask of the permissible argument types, and" pOI indicates that the argument must not be protected
(because it is stored into by the subprogram). For 0, 1, or 2 arguments, the routines 9SETUPO, 9SETUP1, and
9SETUP2 are smaller and faster and don't require ND to be set up.
The standard receiving sequence for a variable number of arguments with a maximum limit is
LI,MNA
U,MXA
BAL, LR
mask, p
mask, p
mini~um number of arguments permissible
maximum number of arguments permissible
9SETUPM
dummy temp 1
dummy temp 2
mask, p
dummy temp MXA
Interface with Assembly Language Routines
47
The receiving sequence for a variable number of arguments with no limit (a multiple dummy) is
LI, ND
BAL, LR
mask, p
mask, p
-(number of dummies including multiple dummy)
9SETUPV
dummy temp 1
dummy temp 2
mask, p
mask,p
dummy temp INDI -1
multiple dummy temp
After execution of a receiving sequence, the dummy temps contain the effective addresses of the arguments, which
may be referenced indirectly. A multiple dummy is always referenced both indirectly and indexed, as described in
Chapter 3.
Appendix C lists several library routines that illustrate the use of standard receiving sequences, as well as other
techniques such as returning the function results in standard registers.
Sharing
~ata
Between FORTRAN Programs and Assembly Language Programs
In addition to passing arguments, SDS Sigma 5/7 FORTRAN IV provides three ways of sharing data: blank COMMON, labeled COMMON, and GLOBAL. It is quite straightforward for assembly language programs to interface
with all three of these. In addition to using the same COMMON and GLOBAL areas as the FORTRAN programs,
assembly language programs can also define data areas within themselves for use by FORTRAN programs and/or other
assembly language programs.
Although they could be handled in other ways, GLOBAL variables are treated as though they were labeled COMMON blocks. Thus, for example, the statement
GLOBAL X, Y
is equivalent (in SDS FORTRAN IV) to
COMMON
/X/X,/Y/Y
as far as the object program is concerned.
Furthermore, blank COMMON is treated very much like a labeled COMMON block with the special name,
F4:COM. The only difference is that the loader may use blank COMMON for tables, so it is not permissible to
load data there (e. g., with a DATA statement). Thus the statement
COMMON A, B
is essentially the same as
COMMON/F4:COM/A, B
which cannot be written in FORTRAN but illustrates precisely what ~ done in assembly language.
COMMON blocks are handled in the SDS Standard Sigma 5/7 Binary Format by control sections called dummy sections. (This has nothing to do with dummy arguments.) The Meta-Symbol directive used to declare these is DSECT.
Since information is typically going to be stored into such areas, they should be declared with a DSECT 0 (no memory protection). The locations of particular variables within a COMMON section can be established with RES or
EQU declarations. For example, the statements
COMMON D1,A,X,J/BLK/Cl, P
DOUBLE PRECISION D1(3)
COMPLEX Cl
REAL X( 10,8)
EQUIVALENCE (X44, X(4,4»
can be simulated using the following declarations in Meta-Symbol:
F4:COM
D1
48
DSECT
RES
o
6
Sharing Data Between FORTRAN Programs and Assembly Language Programs
1
A
X
X44
J
RES
RES
EQU
RES
80
X+33
BLK
Cl
P
DSECT
RES
RES
0
2
1
1
It is up to the programmer to take dimension and type into account, since these are FORTRAN attributes that are
unknown to Meta-Symbol. Note, for example, that Dl and Cl above require two words per element. Obviously
the programmer must consider this also in operating on these quantities, since some are handled with fixed point
instructions, others with doubl eword floati ng-poi nt i nstructi ons, etc.
It is also important to assure that all double precision and complex quantities lie on doubleword boundaries. This is
true not only of variables, but also of constants. (Note that the FORTRAN compiler automatically allocates constants correctly, but in assembly language the user must do it himself.) The BOUND 8 directive is used for this purpose. This is illustrated in the following example of the code that could be written to have the same effect as the
FORTRAN statements shown:
DOUBLE PRECISION D 1, D2
Xl = X2 * 1. 234567
Dl == D2 * 1.234567890123456D3
LW,AR
FMS,AR
STW,AR
LD,AD
FML,AD
STD,AD
X2
=FS '1.234567'
Xl
D2
2DFLC
Dl
BOUND
DATA
8
.
2DFLC
Xl
X2
Dl
D2
RES
RES
BOUND
RES
RES
FL'l.234567890123456E3'
8
2
2
Note that one-word constants may be written as literals (and the assembler will allocate them), but doubleword
constants may not; the user must select some name for them and allocate them himself. The precision of floating
point constants is determined by the FS (Floating Short) or FL (Floating Long) preceding them, and not by the exponent, which must always be an "E" if present. (FORTRAN's 'D'-style exponent is not permitted.)
The DATA statement in FORTRAN can be easily simulated using the DATA directive in Meta-Symbol. Thus, an
assembly language program can define a set of values that are referred to by a FORTRAN program via labeled
COMMON or GLOBAL. For example, the following assembly language segment
X
DSECT
RES
0
I
COEF
DSECT
DATA
DATA
DATA
0
FS'1. 00000'
FS '1.25992'
FS'1.44225'
DATA
FS'4.64159'
might interface with a FORTRAN program containing:
GLOBALX, COEF(100)
X 0
D03, K == 1,100
3 X == X + COEF(K)
Sharing Data Between FORTRAN Programs and Assembly Language Programs
49
Here the FORTRAN might use data values set up by the Meta-Symbol program and also return a value (X) to the latter. Note that although
GLOBAL X
could also be written as
COMMON/X/X
the same is not true in Meta-Symbol. It would' constitute a double definition error to write
X
X
o
DSECT
RES
1
In such cases, however, the location of the variable is always the same as the beginning of the COMMON block,
so only the name on the DSECT is needed; it should be left off the RES or DATA directive.
Differences Between GLOBAL and EXTERNAL Declarations
It is important to understand the difference between the FORTRAN declarations GLOBAL and EXTERNAL. Both
inform the compiler that the symbols listed are to be referenced externally. However, GLOBAL is used for data
whi Ie EXTERNAL is used for entry points. Each corresponds to a directive in Meta-Symbol. GLOBAL (or COMMON) interfaces with directive DSECT, while EXTERNAL interfaces with DEF. Note that in FORTRAN many
declarations are superfluous because the compiler knows what they must be (by the definition of the language) and
supplies them implicitly. In assembly language, however, the user must specify what he wants to do. For example
the statements
SUBROUTINE ALPHA (M)
CALL BETA(T,24S)
RETURN
24 CONTINUE
might be coded in the following way:
ALPHA
BAL, LR
INTG
STW, LC
9SETUPl
M
1PTMP
U,NA
BAL,LC
SNGL
PZE, P
2
BETA
T
lG
1G
B
B
24S
EQU
*1 PTMP
24S
$
J
T
M
lPTMP
CSECT
RES
RES
RES
0
REF
DEF
BETA
ALPHA
1
1
1
Note that the DEFs and REFs must be explicitly declared, as must the variables, dummies, and temps. Chapter 3
explained the extra Branch instruction used in passing statement numbers as arguments. The only reason for the
local storage to be in a different control section from the main body of the program is that they probably require
different memory protection types (type 1 for instructions, type 0 for storage).
Chapter 3 described the use of dummy arguments, which must be referenced indirectly.
TRAN program
50
Differences Between GLOBAL and EXTERNAL Declarations
For example, the FOR-
FUNCTION F(X)
F=X** 2 +0.30103
RETURN
END
could be coded as
CSECT
SYSTEM
SYSTEM
F
X
BAL, LR
SNGL
LW,AR
FMS,AR
FAS,AR
B
1
SIG5F
FORTLIB
9SETUP1
X
*X
*X
=FS'O.30103'
*LC
CSECT
RES
0
1
REF
DEF
END
9SETUP1
F
In this example, SYSTEM SIG5F calls forth the standard instruction set for a Sigma 5 with floating point. Restricting this parameter to just the instruction repertoire needed serves as useful documentation of how generally applicable the program is. (In other words, don't just write SYSTEM SIG7FDP on every program when the more restrictive
command is more informative.)
SYSTEM FORTUB calls forth the definitions of the FORTRAN registers (e. g., LR, AR) and the call ing and receiving
sequence op-codes (e. g., SNGL), plus some other features not used in the above program. FORTLIB is described
later in th i s chapter.
The program does not save the return location (LC) in a temp because it performs no calls that would destroy it;
nor does it allocate a variable called F into which to store the function result. The result is simply computed and
left in the standard register. Note also that even if X were a double precision dummy, it would require only the
one word shown, since this word contains the address of the argument, not its value.
Programs such as this (called with standard colling sequences) are not required to save any registers (except register
0, which must never be altered). Therefore, the assembly language user who calls a FORTRAN program should not
expect any of the registers to be preserved.
Assel'l'lbly Language Main Programs
Most of the discussion so far has assumed that programs written in assembly language will be subprograms. It is also
possible, of course, to write the main program in Meta-Symbol and have it call FORTRAN programs and/or FORTRAN library routines. It is important that every main program begin with a call on 9INITIAL in order to assure
proper initialization of the FORTRAN library. Furthermore, it should have a transfer address on its END line
(whereas no subprogram should). For compatibility with compiler-generated code, the name 4MAIN can be defined on the first line of the program and then referenced as the transfer address. It should also be DEFed so that
it will appear on the load map. Example:
4MAIN
BAL, LL
9INlTIAL
REF
DEF
END
9INITIAL
4MAIN
4MAIN
Assembly Language Main Programs
51
Miscellaneous
Many questions concerning assembly language interface can be answered by examining the object code produced by
the compiler for a given set of statements. The obiect listing produced by Sigma 5/7 FORTRAN IV is designed to
be as readable as possible (by relating to the FORTRAN source language) and to be consistent with Sigma 5/7 MetaSymbol wherever possible. Occasionally the Meta-Symbol format would confl ict with FORTRAN, so the compiler
lists some constructs that cannot be used in Meta-Symbol. It is useful to know what these are, so that you will not
copy them from an object listing into an assembly language program.
1.
2.
3.
Most constants are listed in their FORTRAN form rather than in Meta-Symbol form. For integers and most hexadecimal constants, the form is the same. The others are different. 'The list below shows some examples of
FORTRAN constants and the corresponding syntax used by Meta-Symbol.
FORTRAN
Meta-Symbol
4.378
FSI4.378\
8.5D9
remote DATA FL'8.5E9', preceded by a BOUND 8
(1.2,-3.61)
remote DATA FS'1.2',FS'-3.61', preceded by a BOUND 8
2RXY
'XY'
2HXY
'XY
• TRUE.
-1
FORMA T statements are I isted as a sequence of TEXT I ines, each having four characters within quotes. If any
of the characters are themselves quotes, the resulting construct must be changed in order to assemble correctly.
In Meta-Symbol, a quote mark can be represented by two consecutive quote marks. It is generally more convenient anyway to write FORMATs with TEXTs containing more than four characters. Example:
FORTRAN
Meta-Symbol
TEXT
'('VA'
TEXT
TEXT
'L='F'
TEXT
'.3)'
'("VAL="F.3)'
Symbols can often be defined at more than one place in a FORTRAN object listing. The compiler doesn't care
because it knows which is which.
They are, in effect, two or more symbols with the same name. For example,
statement functions dummies can have the same name as other identifiersi the name of a FUNCTION is defined
not only as an entry point, but also as a scalar variable (in which is returned the value of the function); also,
the parameters P, C, E, PC, and PE appear in the register field of calling sequences, quite indifferent to the
fact that there may be identifiers referenced by these names also. For example,
PRINT 5, 27, P
LI,7
BAL,6
BAL, 6
INTG,P
BAL,6
SNGL
BAL,6
5S
9PRINT
9IODATA
=27
9IODATA
P
9ENDIOL
It is best to avoid using symbols with these names in assembly language programs that call SYSTEM FORTUB.
The user who is interfacing Meta-Symbol programs will very likely want to use the library routines available in
FORTRAN IV, and indeed i~ advised to do so. In addition to the mathematical function evaluators, there are a
number of other useful routines provided, particularly in the area of input/output. The FORTRAN formatted I/O
package constitutes a powerful tool that can relieve the programmer of having to do numeric conversions and code
his own I/O CALs. Of course, it does so at some expense in memory (about 2000 words), but for those who can
offord this, it can be very helpful. Note also that if the assembly language program is used with a FORTRAN program that does any input/output, the package will be there anyway. Table 5 lists the FORTRAN library subprograms.
52
Miscellaneous
For further information, see the SDS Sigma 5/7 FORTRAN IV Library Technical Manual (90 1524). Please refer
also to the section on SYSTEM FORTLIB, below.
Internal Data Formats
The following list gives the size and format of each of the six types of data used in the Sigma 5/7 FORTRAN IV
system:
1.
Integer - 1 word. Integers are right-justified, signed: fixed-point values. Left-justified (or fractional) representation is not used in FORTRAN. Although the Sigma 5/7 computer essentially treats all operations as fractional fixed point, it is always possible to get the desired integer results. On add and subtract, it makes no
difference; on multiply and divide in FORTRAN, these operations are always done in an odd-numbered register,
thus deal ing ,only with the low-order 32-bit part of the full 64-bit quantity created by the computer.tt
2.
Real -1 word. See below, under double precision.
3.
Double precision 2 words. The Sigma 5/1 has two modes of floating point, single precision (short) and double
precision (long). A single precision floating..point number consists of a sign bit (bit 0), a base-16 exponent
(bits 1-7) which is biased by 64, and a six-digit fraction (bits 8-31) which is hexadecimally normalized. A
double precision floating-point number consists of a single precision number followed by an additional eight
hexadecimal digits of fractional significance. A double precision number must always begin in an evennumbered location or register.
The negative of a floating-point number is its 2's complement. Thus the LCW (Load and Complement Word) instruction can be used to negate either integer or real values.
Floating-point numbers thus have the following format:
Fraction (F)
Extra
32
Frac~ional p,recisio~
63
The Sigma 5/1 Computer Reference Manuals contain a complete description of floating-point operations. See
also Chapter 2 of this manual.
4.
Complex - 2 words. A complex variable consists of two single precision floating-point numbers. The first
represents the real port and the second the imaginary part. Although the floating-long arithmetic operations
(such as FAL) cannot be used with complex numbers, the doubleword load and store commands may be so used.
Therefore, complex quantities must also begin at even-numbered locations or registers.
5.
Double complex -4 words. Same as complex, except that the real and imaginary parts are both double precision numbers. Double-complex quantities must begin at even-numbered locations.
6.
Logical I word. Only the sign bit (bit 0) is significant in logical operations. Any word that is negative
(bit 0 :::: I) is considered "true ", while any word that is positive or zero (bit 0 :::: 0) is considered "false". Note
that the compi ler generates the constants • TRUE. and. FALSE. as all ones and all zeros respectively, but this
is not necessary and is done only for aesthetic reasonSj when testing logical values, only the sign bit is examined.
SYS EM FORTLIB
s EM FORTLIB is a Meta-Symbol "system" (like SIG7FDP) that can be called forth by programmers writing assembly anguage program,s to interface with Sigma 5/7 FORTRAN IV. It defines (I) symbolic parameter values and (2)
F TRAN statement procs.
~
1____
/ tNegative numbers are in 2's complement form.
ttIn overflow cases, the left-most bit of the right-hand word becomes the sign of the result. In such cases, integer
multiplication is not necessarily associative.
SYSTEM FORTLIB/Internal Data Formats
53
Symbolic Parameter Values
Most of the FORTLIB parameters are register names. Throughout the FORTRAN Library, all registers are referenced
by names rather than values. This is done not only because it is good programming practice to parameterize. such
things (in case they should have to be changed), but also because it serves as a documentation aid. The nome used
for a register often indicates what the register is being used for. Thus the some register may have more than one
name. For example, when doing real (single precision) arithmetic, register 8 is called AR, but for complex operations it is AC (when accessing both 8 and 9 with a doubleword instruction) or ACO (when accessing just the real
port) •
Although the object code listed by the compiler uses absolute register values, it is recommended to calion SYSTEM
FORTLIB and use the parametric register values when writing assembly language programs.
Table 6 shows in alphabetical order the register names defined in SYSTEM FORTLIB.
Table 6. Register Names Defined in SYSTEM FORTLIB
Nome
Register
Description
AC
8
~ccumulator
ACO
8
~ccumulator for the first word (real value) of £omplex numbers.
ACl
9
~ccumulator for the second word (imaginary value) of £omplex numbers.
AD
8
~ccumulator for Q.ouble precision numbers (both ports).
ADO
8
~ccumulator for the first word {most significant part)of £ouble precision numbers.
ADl
9
Accumulator for the second word (least significant port) of Double precision
~mbers.
-
AI
9
-Accumulator for -Integer numbers.
AK
8
~ccumulator for double complex (~omplex) numbers.
AKO
8
Accumulator for the first word or real value of double complex numbers.
AKl
9
Accumulator for the second word (least significant port of real value) of double complex numbers.
AK2
10
Accumulator for the third word or imaginary value of double complex numbers.
AK3
11
Accumulator for the fourth word (least significant port of imaginary value) of
double complex numbers.
for £omplex numbers (both real and imaginary values).
AL
9
~ccumulator for !:.ogical values.
AR
8
Accumulator for Real numbers.
BL
3
t
!!.uffer !:.ocation (used by 7ERROR )
EL
6
~ntry
EN
5
~ntry t:!ame (used by 7ERROR )
ES
4
E.rror
t
!:.ocation (used by 7ERROR )
t
~everity
t
(used by 7ERROR )
t7ERROR - Run-time error handling routine in the FORTRAN IV library. This is normally used only by other
I ibrary routines, but may also be called by assembly language programs that want to put out error messages.
54
SYSTEM FORTLIB
Tabie 6.
Name
Register
Register Names Defined in SYSTEM FORTLIB (cont.)
Description
FP
7
Format Pointer
LC
15
!:.ink, ~alling.
LE
2
!:.ink,
LL
6
!:.ink, .!:ibrary.
LR
6
!:.ink,
MNA
4
~i~imum number of ~rguments. Used in calls to 9SETUPM. tt
MXA
5
Ma~imum
NA
14
~ror.
Used in standard calling sequences.
t
Used to call 7ERROR •
Used in almost all nonstandard calling sequences to system routines.
~eceiving. Used to call argument setup routines, such as 9SETUPN. tt
number of
~rguments.
Used in calls to 9SETUPM. tt
!::!urnber of Arguments.
NMD
4
!::!umber of ~ultiple Eummies.
ND
5
!::!umber of
Xl
1
Inde~ register
X2
2
Inde~ register ~
X3
3
Inde~ register ~
X4
4
Inde~
X5
5
Inde~ register ~
X6
6
Inde~ register ~
X7
7
Inde~
~ummies.
register
register
Returned by 9SETUPV.
tt
Used in calls on setup routines except 9SETUPM. tt
.!.-
i
?-
t7ERROR -Run-time error handling routine in the FORTRAN IV library. This is normally used only by other
I ibrary routines, but may also be called by assembly language programs that want to put out error messages.
tt9SETUPN, 9SETUPM, 9SETUPV -Argument setup routines used by standard receiving sequences.
The second group of parameters is used in calling and receiving sequences (see Chapter 3).
mnemonics may appear in the op-code field (bits 0-7):
Mnemonic
Effective Op-Code
The following
Description
PZE
X'OO'
"No-type" argument
INTG
X'Ol'
INTEGER argument
SNGL
X'02'
REAL argument
DOUB
X'04'
DOUBLE PRECISION argument
CMPX
X'08'
COMPLEX argument
KMPX
X'lO'
DOUBLE COMPLEX argument
LOGL
X'20'
LOGICAL argument
EVRY
X'3F'
Every type argument
SYSTEM FORTLIB
55
It is alsooccasionally necessary to pass additional information about arguments or dummies.
eters may appear in the register field (bits 8-11):
The following param-
Mnemonic
Value
Description
C
4
~ontinue bit, used only in I/o calting
sequences.
E
2
~nd I/O list bit, used only in I/o calling
sequences.
P
Protected bit, used in I/o and standard
calling sequences and sometimes in receiving sequences.
8
PC
12
PE
10
Protected and Continued.
-
-
Protected and End of I/O list.
-
The last group of parameters is used for indicating the severity of run-time errors. One of these values is placed in
register ES (4) before calling 7ERROR, the run-time error handler. Chapter 2 discusses the meaning of the various
levels of severity.
Name
Value of
Parameter
EI
4
Error severity level for minor errors
E2
7
Error severity level for major errors
E3
15
Error severity level for abort errors
Description
FORTRAN Sfofemenf Procedures
The FORTRAN statement procs are a group of Meta-Symbol procs for simulating FORTRAN statements in assembly
language. They allow the programmer to generate calls on the FORTRAN library without learning all the details of
their interface, but merely by writing simpler constructs that look much like FORTRAN statements. The most useful
of these is the READ/WRITE proc, which takes care of most of the complication of using the FORTRAN input/output
package.
The following is a description of the procs that are included. Each description identifies the FORTRAN library routine that may be used. The procs will REF any routines that they use.
READ/WRITE PROC
This proc handles both BCD and binary input/output statements.
READ
(unit, format), list
BCD read
WRITE
(unit, format), list
BCD write
PRINT
format t list
BCD print (write on 108)
READ
(unit), list
Binary read
WRITE
(unitl,list
Binary write
It may have any of the following forms:
where
unit
is the value of the I/o unit number.
This may be a parameter defined in a previous EQU or SET.
format
is the location of the text of a FORMAT. As described below
may actually be that of a Branch instruction that precedes the text.
list
56
is the set of values to be input or output, as described below.
SYSTEM FORTLlB
FORMAT PROC), this location
Each item in the list may be one of the following:
1.
The location of a value.
Fl
X
Y
For example:
WRITE
TEXT
DATA
DATA
(l08, F1), X, Y
'(2Fl0.4)'
FS'4.75'
FS'138.056'
The type of the value (integer, real, etc.) is determined by the parameter IMPTYPE (implicit type) in the
PROC definition. This value can be set by the user to whichever type is most commonly used, as follows:
IMPTYPE
IMPTYPE
IMPTYPE
IMPTYPE
IMPTYPE
IMPTYPE
EQU
EQU
EQU
EQU
EQU
EQU
1
2
3
for
for
for
for
for
for
4
5
6
integer
real
double precision
complex
double complex
logical
Note the use in the WRITE statement above of the SDS standard printer unit (108). The statement could also
have been written as
PRINT
Fl, X, Y
since PRINT automatically uses unit 108.
2.
A two-element list item to explicitly specify type.
The item has the farm:
(location, type)
where type is defined as above.
The item may, of course, have been defined as a list by a previous EQU.
For example:
CPX4
Jl
J
DB
CPX
F2
3.
EQU
EQU
READ
RES
BOUND
RES
RES
TEXT
CPX,4
J, 1
(105, F2), J 1, (DB, 3), CPX4
1
8
2
2
'(I,G.18,2G)'
A three-element list item, to transfer arrays of values. The item has the following form:
(location, type, n)
where ~ is the number of values (elements) in the array.
XA
Q
X
MM
EQU
EQU
WRITE
RES
RES
For example:
X, 2,10
1
(Q), XA, (MM, 1, 100)
10
100
In this example, the WRITE is in binary since there is only a unit value specified, no FORMAT.
Note that in Meta-Symbol, blanks may not be embedded within the operand field, and the comma preceding the
list must be present unless the list is empty. Also, quote characters within a FORMAT text string must be written as two adjacent quote characters.
I/o
The following subroutines may be required:
9BCDREAD, 9BCDWRIT, 9BINREAD, 9BINWRlT, 9IODATA, and 910LUSA.
SYSTEM FORTLIB
57
FORMAT PROC
To place a FORMAT between statements in a program, it must be preceded by a branch around itself, so that program flow will bypass the text string. The run-time FORMAT processor knows that the address it is given as the
location of a FORMAT may in fact be the location of a branch immediately preceding the FORMAT. The FORMAT
proc provides this branch automatically (and without the user having to define any new labels). Except for this, it
is exactly the same as the TEXT directive. Example:
READ
FORMAT
PRINT
FORMAT
ALPHA
F3
(105, ALPHA), X, Y
'(2F)'
F3, X, Y
'(3H X=G.6,3H Y=G.6)'
This proc does not call any library routines.
REWIND, BKSPACE, ENDFILE PROCS
These proc calls are written just like the corresponding FORTRAN statements:
REWIND
BKSPACE
ENDFILE
unit j ,unit , ••• ,unit
2
n
unit j ,unit , ... ,unit
2
n
unit j ,unit , ••. ,unit
2
n
where unit is the value of the I/O unit number. Normally this is a constant, but it can also be a parameter. However, if the unit value is expressed with a name instead of a number, its meaning is somewhat different for procs
than for FORTRAN. For example, the statement
REWIND
KSL
in FORTRAN means that KSL is a variable whose contents are the values of the unit number.
ever, it means that KSL ~ the value (not the location of the value),
In Meta-Symbol, how-
The following library routines may be called:
9REWIND, 9BKSPACE, 9ENDFILE
PAUSE, STOP PROCS
Form:
PAUSE
n
STOP
n
where n is the value to be output. Chapter 7 describes the action of the PAUSE and STOP statements.
The library routines that may be called are 9PAUSE and 9STOP.
INITIAL PROC
Form:
INITIAL
This proc merely generates a BAL, LL to 9INITIAL.
order to properly initialize the FORTRAN library.
58
SYSTEM FOIHLIB
This must be done at the beginning of every main program in
5. INPUTjOUTPUT
BCD Input/Output
All BCD input/output is performed on records from a to 132 EBCDIC characters in length, depending on the type of
device being used. All of the 256 character codes are legal. However, only a few of these can be printed as
graphics, as indicated in Tables 0-1 and 0-2. With the exceptions discussed below, the entire record is transmitted
without alteration by SDS FORTRAN IV.
Output
1.
Cards
A FORMAT statement may request any number of characters to be punched. If N < 80, the 80-N trai ling characters
are blanks (N is the number of characters requested). If N > 80, only the first 80 are punched; the other N-80
characters are lost. All 256 character codes may be punched.
2.
Printer.
Normally the printer is upspaced one line after printing. However, if the first character in the record is a 1 or 0,
it is replaced by a blank and special vertical format action is taken:
causes a page eject before printing.
a
causes one line to be ups paced befare printing. (This, combined with the normal upspace after
printing, effects a double space.)
Since the printer upspaces after printing rather than before, it is impractical to implement overprinting of the
previaus line (by specifying a + in column 1). Except for the format control cades, all of the character codes print
as shown in Appendix D. The record is not shifted left one position in any case.
3.
"Listing" Magnetic Tape
A "listing" magnetic tape is one that has been ASSIGNed with the "l" option. See "Vertical Carriage Control"
later in this chapter. The same conventions apply to these as were described for printers.
4.
Magnetic Tape
A magnetic tape record may cantain up to 132 characters. The FORMAT statement determines the number of characters that will be written, but this number will always be a multiple of 4. Thus given N characters, the number of
words output is
MIN(33, (N+3)/4)
5.
Sequential RAD File
Output to a sequential RAD file is treated exactly like output to magnetic tape.
6.
Typewriter
A record consists of up to 132 characters followed by a "new-line" control character (X'15'). The typewriter output routine scans for the last nonblank character and types only to that poi nt (i. e., trai ling blanks are not typed).
7.
Paper Tape
Paper tape output is handled in exactly the same way as typewriter output.
Input
1.
Cards
Eighty characters are read from each card. All 256 character codes are legal and na alteration of the record is
made.
input/Output
59
2.
Magnetic Tape
Records of any length may be read. However, any characters in excess of 132 are ignored. All 256 character
codes are legal. None of them is interpreted as an end-of-file.
3.
Paper Tape
A record is any number of characters followed by a new-I ine code (X '15'). If more than 132 characters occur before a new line, the excess characters are ignored until the new-line code appears. The new-line code is not Cansidered part of the data information in the record.
In addition to new-line, three other characters have special significance: Code deletes (X"FF") are ignored and
not entered into the buffer. EOM (X "08') causes all the preceding information in the record to be discarded and
input begins anew at that point, beginning at the start of the buffer again. The first character in the record must
not be X "ll' or the Moni tor wi II interpret the record as a binary record.
Although these special codes may appear in the middle of an output record as ordinary BCD characters (e.g., in
"AU format), they cannot be read back in that way.
-If a record consists of IEOD, this will be treated as an end-of-file condition, and no data will be transferred.
4.
Typewriter
Typewriter input is handled exactly like paper tape except for the treatment of XII1' (which has no significance)
and the delete code (X'FFI). Not only is the delete code itself ignored, but it causes the preceding character in
the record to be discarded and replaced by the following character. Thus it functions effectively as a backspace
key.
When an EOM (X '08') is encountered, the input routine automatically outputs a New Line character, resets to the
beginning of the buffer area, and prepares to accept the whole line (record) again.
5.
Sequential RAD File
A sequential RAD file behaves exactly like a magnetic tape except that, being a managed file, it cannot contain
multiple files. Requests to write end-of-files on the RAD are ignored and thus will not be detected on input.
Binary (Intermediate) Tape Format
This section defines the format used on binary (intermediate) tapes in Sigma 5/7 FORTRAN IV. These are the tapes
produced by statements like
WRITE(5) List
or
WRITE TAPE 5, List
Each WRITE statement, such as the above, produces one logical record. (Correspondingly, each READ statement
reads one logical record and each BACKSPACE statement backspaces one logical record.) A logical record may be
broken up into as many physical records as necessary. The number of data words in a physical record is a parameter,
but is currently set to 128 words. Each physical record has the following format;
Word
Byte
o
Contents
First control word
o
X'3C' == Not last physical record
X'lC' == Last physical record
2+3
Byte checksum
Number of data bytes in record + 8 (Le., includes control words)
l-N
Data words (may be none)
N+l
Second control word
o
Same as word 0, byte 0
X'BD' (special binary code)
2+3
60
Physical record number (starts at zero)
Binary (Intermedi ate) Tape Format
If the logical record is less than 11 words in length, fjller will be introduced after the data words and before the
last control word. This filler will be ignored by the read routine; the first control word specifies how much of the
record is actual data.
The checksum used is the sum (ignoring overflow) of all the bytes in the record, including the control words except
for the checksum byte. This does include the random words used as filler if too little data is being written.
FBCD Conversion
Table 7 shows the input conversion from old BCD (026) codes to EBCDIC (029) codes. On output, the conversion
works the other way. As an example, without FBCD, the card code 12 will be read as "&", rather than "+". With
FBCD, the internal hexadecimal representation will be converted from X'50' to X'4E', which is the proper code for
the plus sign. Conversely, the character value X'4E' to be output onto a file with FBCD conversion specified will
first be converted to X'50' so that it will come out as a plus sign in the old character set, instead of a less-than
sign ("<"),
Table 7.
FBCD Conversion Table
BCD
(026)
Card Code
Desired
Graphic
Unmodified
Graphic
0-4-8
(
0/0
6C
4D
12-4-8
)
<
4C
5D
#
7B
7E
&
50
4E
7C
7D
4E
4C
7E
6E
7D
7A
3-8
12
4-8
+
,
Unmodified
Hexadecimal
Converted
Hexadecimal
6-8
<
>
5-8
:
12-2-8
?
ri
4A
6F
12-0
?
None
CO
6F
12-6-8
+
,
Run-Time I/O Unit Assignments
When using only the standard FORTRAN unit numbers, such as 105 (READ cards) and 108 (PRINT), there is no need
for unit assignments by the user. These unit numbers are handled automatically by the system and are given the
followi ng assignments:
Unit number
Standard Assignment
101
(DEVICE,OC) , (IN)
102
(DEVICE,OC) , (OUT)
103
(DEVICE, PRJ , (IN)
104
(DEVICE, PP) , (OUT)
105
(DEViCE, SI) , (IN)
106
(DEVICE, BO) , (OUT)
108
(DEVICE, LO) , (OUT)
!ASSIGN commands are needed for nonstandard unit numbers or when standard unit numbers are being assigned to
other devices. Therefore, !ASSIGNs are always needed to use tapes or the RAD. A FORTRAN unit number appears on the !ASSIGN card preceded by the characters "F:". Thus, 5 becomes F:5 and 108 becomes F:108. The
examples below indicate the format of the !ASSIGN card. The !ASSIGN cards may appear anywhere before the
FBCD Conversion/Run-Time I/O Unit Assignments
61
!LOPE or !LOAD card, but it is good practice to put them all at the beginning of the job (Le., ahead of FORTRAN
compilations) so that they can be found easily in the job printout.
The maximum unit number that should be used in SDS Sigma 5/7 FORTRAN IV is 9999; the minimum is O.
Devices Other Than Topes or RAD
Although unit assignments can be made directly to a device, in general it is better to assign them instead to an
operational label (which, in turn, is associated by the system with some device). In this way, the machine operator has the option of substituting a different device during a particular run.
As an example, consider a compile-and-go FORTRAN job that reads data cards and prints results. During compilation, the compiler reads its source cards via M:SI (which is normally assigned to the operational label SI, which is
normally assigned to a card reader). It prints its listings via M:LO (which is normally the LO device, usually a
line printer). Suppose the FORTRAN object program reads from unit 5 and writes on unit 6. Then if F:5 is assigned
to SI, and F:6 to LO, the operator need only change the system assignments of SI and LO in order to read both the
source and data cards from a tope (which has previously hod a stock of jobs loaded into it) and write both the compiler listings and the program results on another tape (which will subsequently be listed). This would not be true if
the user had assigned F:5 and F:6 to CRA03 and LPA02, for example. There would be nothing the operator could do
about these assignments.
The following list indicates the recommended operational labels for each device. Note that they are simply the
same assignments that are made by the system for the standard FORTRAN units (shown above).
Device
Sample !ASSIGN Card
Card reader
!ASSIGN F:5, (DEVICE, SO, (IN)
Card punch
!ASSIGN F:8, (DEVICE, BO), (OUT)
Li ne printer
!ASSIGN F:6, (DEVICE, LO),(OUT)
Typewriter output
!ASSIGN F:108, (DEVICE,OC),(OUT)
Paper tape reader
!ASSIGN F:5, (DEVICE, PR),(IN)
Paper tape punch
!ASSIGN F:I06, (DEVICE,PP),(OUT)
It may be appropriate to assign unit numbers directly to devices in certain situations, such as when there is more
than one card reader on a system. This is always done when using unlabeled tapes, as described below.
Unlabeled Topes
It is always necessary to use unlabeled tape assignments when reading a tape from the "outside world", Le., one
that was not written as a labeled tape on the Sigma 5/7. The same is true when preparing tapes to be used
on other machines. Also, FORTRAN programs that do any kind of file manipulation (Le., those that use EOFSET
or END=) must use unlabeled tapes (see below). Some sample !ASSIGN cords for use with unlabeled tapes are
Scratch tape:
!ASSIGN F:l,(DEVICE,9T),(OUTIN).
Input tape:
!ASSIGN F:5, (DEVICE, 9T), (INSN, xxxx)
Output tape:
!ASSIGN F:6, (DEVICE, 9T), (OUTSN, xxxx)
Note that no particular tape unit is selected. In fact, if several scratch tapes are used, the assignments will all
look exactly alike. It is up to the Monitor to request the proper units and inform the operator when to mount the
tapes. However, note that for each job, there is a maximum number of scratch tapes the Monitor will allow the
user to assign. The default value is a system parameter that can be changed with an !LIMIT (SCRATCH,n) control
command. If this limit is exceeded, the job wi II be aborted.
In the above examples, INSN stands for "INput ~erial Number" (or reel number), and OUTSN stands for "~put
Serial Number".
"XXXx" is a reel identification number or name of up to four alphanumeric characters.
62
Run-Time
I/o
Unit Assignments
Seven track tapes require the same kind of assignment except that "7T" is substituted for "9T". Furthermore, if
the seven track tape is in BCD (presumably written on a second-generation machine), it is necessary to specify this
so that the tope will not be read in EBCDIC. To do this, include the FBCD (FORTRAN BCD) option on the !ASSIGN
cord. For example:
!ASSIGN F:5, (DEVICE, 7T), (INSN, 372), (FBC D), (BCD)
Labeled Tapes
As indicated above, labeled tapes are written in a special format controlled by the Monitor. They cannot be used
when interfacing with other computers. Nor can they be used by FORTRAN programs that do file manipulation
(i. e., those that use EOFSET or END=), since multiple fi les are not permissible on labeled topes or RAD files.
Lobe led topes are assigned in the some manner as unlabeled tapes, except that "(LABEL, nome)" is substituted for
"(DEVICE,9T)". In this specification, "name" may consist of up to 11 characters including alphanumerics and the
special characters
$
#
@
and
(break). Examples are given below.
!ASSIGN F:4, (LABEL, DUBROVN IK),( OUTIN)
lASSIGN F:5,(LABEL,MYDATA),(INSN, 1234)
!ASSIGN F:6,(LABEL,AB:CD#EF),( OUTSN, ABCD)
Severol different labeled files may appear on the same physical tape. They all have different lobel names, but the
INSN or OUTSN is the some for the whole tape. On input, the Batch Processing Monitor will search a whole tape
for a fi Ie if the tope is not pos itioned for that fi Ie.
RAD Files
Magnetic tape can be simulated on the RAD, using sequential files. Like labeled tapes, these are managed files
with the restrictions described above. However, they are a powerful tool for providing fast access to a number of
different files of data. Suppose, for example, that a FORTRAN program requires an array of coefficients for each
iob, but that the coefficients are different depending on the nature of the data coming in. The FORTRAN programmer can write out these files of coefficients, using a different unit number for each and assigning each unit nUf'Y'lber
to an individual file. For example:
!ASSIGN F: 1, (FILE, A)
!ASSIGN F:2,(FILE,B)
Then, when the production program is run, the different fi les can be selected by using different unit numbers.
example
For
DIMENSION COEFFICIENTS (500)
READ (105,3) NF
READ (NF) COEFFICIENTS
might be used (with the some !ASSIGN cards shown above) at run time to read in the value of NF, which determines
the fi Ie of coefficients to be read by the second READ statement. Of course, it is not necessary to use the same
unit numbers and !ASSIGN cards for reading as were used for writing. All that is necessary is that the FILE names
correspond correctly.
The nome of a FILE can be up to eleven alphanumeric characters (including
labeled tapes. The INSN, OUTSN, and OUTIN parameters are not needed.
SEQUEN (sequential file), since this is the default mode.
For more complete information on file management,
Reference Manua I (90 09 54).
$ # @ and ), the same as for
Nor is it necessary to specify
refer to the SDS Sigma 5/7 Batch Processing Monitor
Assi gnments to "NO"
It is also possible to assign output files so that the information is not written on any device but is simply discarded.
The primary use for this capability is to eliminate undesired output on a particular run without having to change
Run-Time I/O Unit Assignments
63
the rest of the job setup. For example, a program that both punches cords and prints out results could be run with
only the printed output by assigning the cord punch file to the operational label "NO":
!ASSIGN F: 106, (DEVICE, NO)
This can also be used at compile time to turn off listings, although it should be noted that the compiler is still creating the listings, so it is foster to turn off the listings with the control cord options provided for that purpose.
BCD (026)/EBCDIC (029) Conversion
The Monitor provides the facility for reading and writing data in the old BCD character set (used on the 026 key
punch and most second-generation computers). This is done with a unit assignment that includes the FBCD (FORTRAN BCD) option, as illustrated below.
!ASSIGN F: 105,(DEVICE, SI),(FBCD)
!ASSIGN F: 106, (DEVICE, BO), (FBCD)
!ASSIGN F:6, (DEVICE, 7T), (FBCD), (OUTSN, 9300), (BCD)
The old BCD character set is shown in Table 0-2. The character conversions performed by the FBCD option are
shown in Table 7. Note that these conversions are bidirectional. That is, a 12-6-8 punch (old BCD "<") is converted to X'4C' (EBCDIC "<") on input, and vice versa on output. Without the FBCD option, a 12-6-8 punch
would be read as X'4E' (EBCDIC "+"), while X'4C' would be output as a 12-4-8 punch (old BCD ")").
Vertical Carri'age Control
. As specified in the FORTRAN reference manual, characters 1 and 0 in column 1 of printed output couse special
vertical-format-control action, namely page eject for land double space for O. t When a FORTRAN unit is assigned to a line printer or to the LO (listing Output) operational label, this carriage control is performed automatically. For example, the FORTRAN PRINT unit, 108, always has carriage control unless it is assigned to some
nonlisting type of device.
If it is desired to write information on a tape, however, and later to list the tape, then the system must be instructed to do FORTRAN carriage control on that tape. Normally, the system will not alter any records going out to
tope (such as by blanking the first character), nor will any special carriage control be performed if that tope is
listed. To indicate that a tape is a listing tape, the L option is used on the !ASSIGN cord, as follows:
!ASSIGN F:6ADEVICE,9T, L), (OUTSN, 1968)
Unit Assignments Under Program Control
The usual way of associating a FORTRAN unit number with a particular device, file, or operational label, is via an
!ASSIGN control card, as described in the above sections. It is also possible, however, to change assignments
under program control by means of the M:OPEN monitor call in an assembly language program. In order to do this,
there must be a DCB (Data Control Block) for the unit number. This will always be true if the number is one of the
SDS FORTRAN standard unit numbers, or if the number has already appeared on on !ASSIGN cord. In this case,
the M;OPEN serves to
an assignment that is already in effect.
If a DCB does not already exist, the assembly language programmer may code one himself and reference it in the
M:OPEN call.Information on DCBs and the use of the M:OPEN call may be found in the Batch Processing Monitor Reference Manual.
bverprinting (+ in column 1) is not implemented.
64
Run-Time I/O Unit Assignments
6. JOB SETUP
Every Batch Monitor job begins with a !JOB card. Within a job, the other control cards determine what operations
will be performed. The Batch Processing Monitor Reference Manual contains more complete definitions of the various control commands. It will suffice here to give examples of typical job setups for FORTRAN runs.
The !FORTRAN command is used to call forth Sigma 5/7 FORTRAN IV. There are a number of options that may
appear on this card, as described in Chapter 1 ("Compiler Options"). A single !FORTRAN card can control the
compilation of several decks. It is also permissible to have a new! FORTRAN card for each deck. This is mandatory whenever
1.
The FORTRAN options need to be changed between decks, or
2.
The source decks are being read from a different device than the control cards.
Job Setup Examples
Example 1. Compile Only - With Source and Object Listings
!JOB 85021, DAVE, 1
!FORTRAN LS,LO
Any number of source decks
Example 2. Compile Only - High Speed Diagnostic Run[ Summary but no Listings
! JOB 65000, GMILLER, 1
!FORTRAN
Any number of source decks
Two loaders are currently in use with the Batch Monitor, (1) a one pass loader, called with c! LOPE (for Load One
Pass & Execute), and (2) a multipass loader called with !LOAD. LOPE has the advantage of being faster and'7maller
;nd pr;;ducing a more readable load map. It does not perform overlay loading, nor does it acknowledge the existence of protected memory. All programs are loaded as if they were CSECT O. For most purposes, these drawbacks
are not serious, and the gain in efficiency causes LOPE to be the more commonly used loader. A number of options
may be used with LOPE; some of these are shown below.
Example 3. Compile and Execute -With Source Listing (This is probably the most common FORTRAN job setup.)
!JOB 4033, GJONES, 1
! FORTRAN LS, GO
Any number of source decks
! LOPE (GO)[ (UN SAT [(F4LlB», (MAP)[ (LMN, name)
I RUN (LMN, name)
IPMD
!DATA
Data cards, if any
where "name" is up to 10 alphanumeric characters. The LOPE loader can also be used to load directly into memory[
i. e,/ without producing a load module that is then called by the! RUN card. This is shown in Example 4. It is
somewhat faster[ but it has two disadvantages.
Job Setup
65
1.
It does not allow the use of moni tor debug commands, such as ! PMD.
2.
It causes the Monitor to lump "user execution time" in with "processor execution time" on the job summary,
leaving "user execution time" as zero.
Example 4. Compile and Execute Without Load Module
!JOB 300000, GBEBAN, 1
! FORTRAN LS, GO
Any number of source decks
! LOPE (GO), (UN SAT , (F4L1B», (MAP), (EXEC)
Data cards, if any
Example 5. Compile from Source Decks that are on Magnetic Tape
!JOB 1984, GORWELL, 1
!ASSIGN M:SI, (DEVICE, 9T), (INSN, 123)
! FORTRAN LS, GO
! FORTRAN LS, GO
! FORTRAN LS, GO
Note that when the source input file (M:SI) is not the same as the control fi Ie (M:C), a separate ! FORTRAN card is
needed for each source deck.
Provision is made in the Monitor for reading the old BCD character set (as produced by the 026 key punch) instead
of EBCDIC. When this is done, however, the feature of consecutive compilations with a single !FORTRAN card is
not entirely effective. The first card of each deck other than the first will be read in EBCDIC. If this is a comment,
or has no characters that will be converted (see Table 7), there is no problem. It is safer, however, to precede each
deck with its own !FORTRAN card.
Example 6. Compile Old BCD (026) Source Cards
UOB 1234,ABC, 1
IASSIGN M:SI,(DEVICE, SI), (FBCD)
!FORTRAN LS,GO
One source deck
!FORTRAN LS,GO
One source deck
IFORTRAN LS,GO
One source deck
The same technique can be used to compile from 7-track magnetic tape written in the old BCD character set (presumably on a second generation machine). However, it is necessary also to specify BCD on the !ASSIGN card,
since binary is the default option.
Example 7. Compile from 7-Track Source Tape (in Old BCD Character Set)
!JOB 7T, TAPE, 1
!ASSIGN M:SI, (DEVICE, 7T), (IN SN, 9300), (FBCD), (BCD)
66
Job Setup
! FORTRAN LS, GO
! FORTRAN LS, GO
!FORTRAN LS, GO
Example 8. Compile from 7-Track Tape with All Possible Listings, in Automatic Double Precision Mode.
Also, produce a binary object deck for subsequent loading and simultaneously convert the source decks to EBCDIC
on a 9-track tape.
!JOB BTM6, POTTER-6630, 1
!ASSIGN M: SI, (DEVICE, IT), (I NSN, 930),(FBC D), (BCD)
!ASSIGN M: SO, (DEVICE, 9T), (OUTSN, SIG7)
!FORTRAN LS,LO,ADP,BO,SO
!FORTRAN LS, LO,ADP, BO, SO
!FORTRAN LS, LO,ADP, BO, SO
Notice, in the above example, that the BO deck will come out via the M:BO DCB, which is usually assigned to
the BO device, which is normally the card punch. Also, since the source input is from a different device than the
control input, there must be a separate! FORTRAN card for each deck to be compiled.
Example 9.
Compile and Load Along with Some Previously Produced Binary Decks
!JOB 213, DWIGHTD,l
!FORTRAN LS, GO
Any number of source decks
! LOPE (GO), (BI), (UN SAT, (F4LIB)), (MAP), (LMN; GRUNCH)
Any number of binary object decks
IRUN (LMN, GRUNCH)
!PMD
I DATA
Data cards, if any
Example 10. Load Binary Decks, without Forming Load Module
!JOB 2526, BDWY, 1
! LOPE (UNSAT, (F4LIB)), (MAP), (EXEC)
Any number of binary object decks
IEOD
!EOD
Data cards, if any
"~
As shown above, a sequence of binary decks may be terminated by another control card or by two! EODs. Also the
B1 option need not be specified, since it is assumed if no other input files are requested.
FORTRAN compilations and Meta-Symbol assemblies may be intermixed in a job, and both may be producing output
to be loaded. Note that the assembler requires the BA (Batch Assembly) opti on in order to do consecutive assembl ies.
Job Setup
67
Example T1. Compi Ie, Assemble, Load, and Execute
!JOB 1636, JOHNH, 1
I FORTRAN LS, GO
Any number of source decks
!METASYM SI,CI, LO, GO, BA
Any number of source and/or compressed decks
! LOPE (GO), (UN SAT, (F4LIB», (MAP), (LMN, WELD49)
I RUN (LMN, WELD49)
!PMD
I DATA
Data cards, if any
In the above example, the assemblies may consist of source decks or compressed decks or both, and the compressed
decks mayor may not have updates associated with them. Also, there mayor may not be IEODs between them.
The assembler stops when it encounters a control card or 0 double !EOD. All of this flexibility does not necessarily
hold true if the SI ond CI fi les are not both from the same device as the C fi Ie. For further informotion, please see
the section on Meta-Symbol Operotion0nthe Botch Processing Monitor Operotions Manual.
Binary object modules con be saved in managed RAD files for later loading as shown below.
Example 12. Compile andSove BinoryModules in RADFiles
!JOB 1000, WCFL, 1
!ASSIGN M:BO,(FILE,ALPHA),(SAVE)
! FORTRAN LS, BO
Any number of source decks
!ASSIGN M:BO,(FILE, BETA), (SAVE)
! FORTRAN LS, BO
Any number of source decks
Example 13. Compile ond Lood Along with Previously Saved ROMs (Relocotable Object Modules)
!JOB 1976, HALLEY, 1
! FORTRAN LS, GO
Any number of source decks
! LOPE (GO), (EF, (ALPHA) , (BETA», (UN SA T, (F4LIB», (MAP), (LMN, X)
! RUN (LMN, X)
!PMD
!DATA
Data cords, if any
The RAD con olso be used to maintain files of source programs.
Example 14. Sove Source Decks in
0
File and Perform Diagnostic Compile Run
!JOB 007, BOND, 1
!ASSIGN M:SO, (FILE, M), (SAVE)
!FORTRAN SO
Source decks
68
Job Setup
Example 15. Compile and Execute a New Source Deck Along with Some Previously Saved Source Decks and
Binary Modules Plus Some New Binary Decks
!JOB 901143, PUBNO, 1
!FORTRAN LS, GO
Source deck
!ASSIGN M:SI,(FILE,M)
!FORTRAN LS,GO
! FORTRAN LS, GO
I LOPE (GO), (EF, (ALPHA», (BI), (UN SAT , (F4LIB», (MAP), (EXEC)
Binary decks
IEOD
!EOD
Data cards, if any
Under certain ci rcumstances it is necessary to use ! BI Nand ! BCD control cards to indi cate the mode of data to be
read. This is true only when using BUFFER IN on the card reader and the cards to be read are not SDS standard
binary format t , because:
1.
The FORTRAN binary (intermediate) READ statement is designed for use with tapes and RAD.
there is no problem in determining mode.
On these devices,
2.
The FORTRAN BCD READ statement is meant to read BCD (EBCDIC) data, not binary data.
3.
On the card reader, a cord that is determined to be SDS binary format will be read in binary regardless of the
mode requested by the READ, and a card that is not this format wi II not be read in binary.
4.
Using BUFFER IN is the only way to read binary cards.
When this is done, an ! BIN card must precede the binary cards, and an ! BCD card must follow them to revert back
to "normal" EBCDIC mode.
Example 16. Compile and Execute Program That Reads Interspersed Binary and EBCDIC Data Cards
!JOB 186284, LIGHT, !
! FORTRAN LS, GO
Source decks
! LOPE (GO), (UN SAT, (F4LIB», (MAP), (LMN, BULB)
!RUN (LMN, BULB)
!DATA
EBCDIC data cards
!BIN
Bi nary data cords
!BCD
tA card is in SDS binary format if and only if column one contains both a 1 and 2 punch.
rows are irrelevant in this decision.
The other columns and
Job Setup
69
Example 17. Compile with No Memory Protection in Object Program
!JOB 1234, FIVE, 1
I FORTRAN LS, BO, NMP
Any number of source decks
As discussed under "Compiler Options", the NMP (No Memory Protection) option is used to compile either a FORTRA~ progr.am that is to be i.ncluded in a library (since library routines may have only one protection type); or one
:hat tnputs tnto on H (Hollenth) format field (since FORMATs are generated within the program in a CSECT 1). This
IS not necessary when using the LOPE loader, which does not differentiate between protection types; but it is necessary for the Botch Loader ( ! LOAD).
load Map
Figure 4 shows a sample load map produced by the LOPE loader. The various definition points are loaded in the
order they are encountered and are listed in the order they are loaded, i.e., in increasing order by memory
location.
The first column identifies the kind of item, namely
UDEF
=:
Unused Definition
DEF
Used Definition
DDEF
Double Definition
DSEC
Dummy Section, i. e., COMMON or GLOBAL
PREF
Unsatisfied (Primary) Reference (FORTRAN IV does not use secondary references)
The next column is the hexadecimal location of the definition, followed by the protection type in which it is located. In the case of LOPE, this is always O. Then the name of the definition is given.
The first program loaded is usually the mai n program, referred to as 4MAIN. Preceding this are Monitor tables,
including the TCB (Task Control Block) and the temp stack.
Next come the user's subprograms and COMMON areas followed by the required library routines, and then the
DCBs created by the loader. As discussed in the section on Calling and Receiving Sequences, the prefix 9 on a
library system routine indicates a primary entry point, 7 a secondary entry point, 8 a global temp, and 6 a local
temp.
Since the entries are in numerical order, the size of a program can be found by subtracting its origin from the origin
of the next program. However, note that
1.
The locations printed are those of the entry points named, and the entry point is not always at the origin of the
program. For all FORTRAN generated programs, subprograms (except internal), and COMMON areas, the
name is defined at the origin. For some library routines it is not. It is necessary to examine a listing of the
routin;- to find out whether or not it is.
2.
Many library routines have more than one entry point. For example, 9STOP also includes 7STOP. FORTRAN
programs may have multiple entry points also. All entry points are shown on the map (whethEilr or not they are
used) and there is no way to tell which ones are part of the same program. This again may be determined from
the appropriate listings.
The system DCBs, such as M:LO (the Listing Output device) and the FORTRAN standard DCBs, such as F: 105 (for
reading cards), appear on the map (Figure 4). However, the DCBs for nonstandard unit numbers (such as F:5) that
appear only on !ASSIGN cards are not listed in the map. Nonetheless, they are present in memory and may be
used by the FORTRAN I/o routines.
70
Load Map
CGe),(UNSATI(F.~IBI"'MA~),(~MN,STEVE:
lCOO 0
le6- 0
leta
le, ..
le,e
lCAE
0
~6WE$T L,ec:
4MA I N
0
';ICOM
BL.!C
AL.Ii'HA
AI,.8G
teFft 0
1CF!$ 0
7A\.e(J2
'AI,.6G
0
0
Ie" .. 0
leF'~ 0
1004 0
1030 0
1038 0
1038 0
1039 0
0
0
0
0
0
0
0
lHE 0
7A~eG
7A'-OGl
'SETUPl
9$ETUPM
9Se:TUPN
7SU
9INITIAL.
'ERReR
'READ
,aCDREAD
,acowRfT
lESO 0
'lEon
9fH;OlT
2400 0
2429 0
245~
2464
24A4
24AA
24Be:
24ce
0
0
0
0
0
0
24PA 0
24J:'F' 0
260_ 0
2510
2S2E
253i!
253;
253C
2540
2551
2554
2556
256A
0
0
0
0
0
0
0
0
0
0
256a 0
7SCOR~AO
'P~INT
90ATA
9HtOATA
9ENOI6L.
7E8,ASQr
7UNITAOR
9$Te~
7STeg
7BINOE:C
7GETMCOE
7ERRHEAO
7ERR!!R
7ERRTEXT
7ERRMA~K
1PRe:
1PRQ
7"AC
1!'He
7F1RI,.
1ERRINIT
7~u,eUTC
1eUPBUT
eTO
811
8T2
2560 0
256i 0
8n
!570 0
IT6
~e11
sn
8T!5
0
8T1
2572 0
2573 0
818
8rt
~;;;
g
:H~
2576 0
2,,, 0
81i2
8TU
!!578 0
8TH
aS7A 0
a57!! 0
8TU
2e7t 0
267C
2583
2584
e585
0
0
0
0
LIBRARY ROUTINES
7IeOATVM
i!56C 0
256' 0
•
..
MONITOR TABLES
USER MAIN PROGRAM
BLANK COMMON
LABELED COMMON BLOCK
USER SUBPROGRAM
E81!'Sn
10;6
1016
10E4
10ES
10E6
1El4+
1E1e
23e~ 0
23F'F' 0
..
..
LIBRARY TEMPS
sne
8T17
8TlNlT
8Ase~TEX
8A&RTSEV
8E~'~XtT
Figure 4. Sample Map Produced by LOPE Loader
Load Map
71
DEF
OEI"
2586 0
2!587 0
2588 0
DEF'
DEF
2589 0
oeF
OEF'
ot,
2551t: 0
DE"
otIP
DE,
UD~'
DEII'
O£F'
DEr.
OEF
PE"
OE,
OEF'
Dtr
DEP
DEI"
DEr:'
DEP
2l58A 0
2597 0
2!59~
0
25A~
0
8~"lOleL.
26~i
264~
0
0
2643 0
DE'
UOEI!'
OEr
OFF
Load Map
81BDADDR
81BOTYPE
81 Be:NL.BC
2645 0
80CSAOR
8UN1TNAM
8U'" lTVAL.
!646 0
2648 0
264' 0
26U 0
264C 0
26411"
2660
265l
2652
265~
0
0
0
0
265,.. 0
2666 0
2BOO 0
Drr
DE,
2B10 0
2840 0
Figure 4.
72
8eC09U~
8BUFBRG
2BAO 0
2570 0
OEF'
6Bl"leUp
2Ult 0
0
OEf
8JeO~lNi(
8TBEU
8!"\SG1'\ UF'
U400
2610 0
UOEP
O~F
8SEN~lTE
8TERRBR
8TAL,PHA
STEon
264[ 0
OEF'
eF~eIJTRG
8IURl:;
2SBi 0
256E 0
UOEP
on'
8ERREXIT
LIBRARY TEMPS
8IN~TERM
6DATI-INK
60CS"JAME
6NRE:I-MTS
6EEF'I.AG
6REC;SlZE
6EeF:CA~L.
6ESF'JAOR
6e:SFUAQR
6EBF'UTRG
H1GHf;ST LoBe
"110e
1"1105
~: ;~8
Mll-e
}
DeBs
Sample Map Produced by LOPE Loader (cont.)
7. OPERATIONAL CONSIDERATIONS
PAUSE, STOP, EXIT
The PAUSE n statement types out the following on the OC (Operator's Console) device:
*PAUSE* n
where n is the decimal representation of the integer used in the PAUSE statement (zero if none specified).
It then suspends execution and addresses the OC device for input.
The usual way to clear the PAUSE is to type in a
carriage return (new line). However, up to 80 characters may be typed before the carriage return to serve as comments on the typewriter log.
The STOP n statement prints out on the LO (Listing Output) device:
*STOP* n
and types on the OC device:
EXIT EXEC Ti me, date
where the time and date are synchronized by the operator with IT and !D key-ins at the beginning of a job stream.
Execution is then terminated and control returns to the Monitor.
CALL EXIT has exactly the same effect as STOP except that the message printed out on the LO device is
*EXIT*
Use of Sense Sw itches
The sense switches used do not actually exist on the Sigma 5/7 console but are simulated by the Monitor in order to
support the FORTRAN feature. Since much of the intent of the sense switches is lost, we do not recommend their use
as a good practice in a botch processing environment.
To change the setting of sense sense switches during a program, an operator key-in is used. For example,
!SWITCH 0000, (SET, 1,4)(RESET, 2)
where 0000 is the "system JDII that is typed out on the OC device ot the start of the job. In case there are several
jobs running at once, this part of the key-in identifies the job that is to have its sense switches changed. Note
thot the system does not stop processing to wait for completion of the key-in. Therefore, if the sense switch is being
changed for timing purposes, it may be desirable to discontinue processing with an !W key-in, change the sense
switches, and then continue again with on !S key-in.
Normally, all the sense switches will be off at the start of a job. They can be initialized on via the !SWITCH control card, which has the same format as the key-in above except that the system JD is not specified.
The sense switches are tested by means of the library routi ne 9IF SWIC H. The actual status of the switches is kept in
relative location 12 of the TCB, bits 26-31, from left to right.
Job Aborting
A FORTRAN compilation or execution can be aborted in any of four ways: by the FORTRAN compiler or library, by
the computer operator, by the Monitor, or by the loader.
Abort by FORTRAN Compiler or Library
When this happens, a FORTRAN error message will always be printed first. As described in Chapters 1 and 2, compiler error messages begin with
ERROR:
Operational Considerations
73
while library diagnostics contain the heading
FORTRAN RUN-TIME ERROR IN 'name' CALLED AT LOC X'xxxxx'.
The library will abort if the error message has a severity as great as the current abort severity (contained in
SABRTSEV). This severity level can be set up with the library routine ABORTSET (see Chapter 2), but has a default
value of S.
When either the compiler or the library aborts, it does so with a M:XXX call. This error exit causes the Monitor to
skip to the next !JOB or !FIN card, ignoring all intervening control cards except for postmortem dump requests.
Thus the whole job is essentially terminated at that point.
The Monitor will print out a termination message saying
JOB ABORTED BY
{~~~ESSOR}
AFTER xxxxx
where PROCESSOR refers to the compiler, USER to the library, and xxxxx is the hexadecimal location of the last
instruction executed before terminating. (This applies to the following two abort conditions as well),
Abort by Computer Operator
A job can be aborted from the operator's console by means of the two key-ins !X and! E. The!X key-in corresponds
to the M:XXX program exit and has the effect described above. The! E key-in corresponds to the M:ERR program
exit (not used by the FORTRAN system) and differs from !X in that succeeding control cards will be processed. The
Monitor printout will soy
JOB {ABORTED} BY OPERATOR AFTER xxxxx
ERRORED
Abort by the Monitor
There are a number of situations that can cause the Monitor to discontinue a job. Two of these, illegal traps and
are discussed in Chapter 2. The printout in this case is
I/o errors,
ABORTED}
JOB { ERRORED AFTER xxx xx
Abort by the Loader
The loader error messages are listed in the Monitor Reference Manual. Note that for the purposes of the ABORTED/
ERRORED printout, the loader is considered a processor, like the compiler.
In all cases when a job is aborted (or errored), pending I/o operations are completed before the abort is c:arried out.
Furthermore, if there are managed (labeled) files in use, all input files are closed and saved, all output fdes are
closed and released. Data (inclUding source programs) appearing in the control (C) file ahead of the next important
control card is ignored.
74
Job Aborting
APPENDIX A. ARGUMENT SETUP ROUTINES
5/7
..... 50S sIGMA
9 SET U P N
....
.....
.....
F~RTRAN
IV •
9SETUP~
1'4~te)
1;11,/68
1
SETS vP ANY 'IXED NUMBER 6. ARGUMENTS
IN A STANOA~D RECEIVING SEQUENCE •
FeR 0,1. eR 2 ARGS, IT IS FASTER T8 USE
9SETUPO, 9S~TUP1, SR 9SETUP2 •
CA~~ING SE~UEN~E
INDl
II
•
Ta 9SETUPNI
TVPE,P
TV!'!:,P
NUMBER 6F DUMMIES
9SETUPN
DUMMY TEMP 1
D\JMMY TEMP 2
•
TyPE,P
••
•NO
DUMMY
TEMP
eA~,~R
•
....
..
*'0506<'
II
SETS UP A VARfAB~E NUMBER e. ARGUMENTS,
BUT.wiT~ A MAXIMUM (AS WELL AS A
MINIMUM). eR, T8 PUT IT ANeTHER WAY, IT
SETS uP seME, BUT NeT NE~ESSARI~V A~L;
eF A FfXED NUMBER 8F DUMMIES,
.....
•
..
....
II
CA~~rNG
II
.....
.
35
•.
36
3'
...
38
....
39
410
U
•
42
•
....
.
...
....
..
.•.
•.
...
..
•
•.
..
43
44
415
46
411
48
49
50
51
52
53
541
55
56
5'1
58
59
60
61
62
63
641
65
66
6'
68
01 00000
SEQUENCE T8 ,SETUPMI
IMNA) •
(M)(A) •
BAL,LR
TYP!::,p
TYP!,:,F'
MINIMUM NR, 6F ARBS
MAXf~UM NR. eF ARBS
9SETUPM
DUMHY TEMP 1
OUMI1Y TE~P 2
TYPE,P
'"
DUMMY
TEMP MXA
.
l!
F'AGr
7 SET
SPEcrA~
ENTRy USED By 9SETUPV.
IN T~E CAL~rNG SEQUENCES s~aWN AB8VE. 1YPE IS A
MASK 6F T~E TYPES T~AT ARE PERMfSSABLr AND I' (WHICH
STANDS FeR PReTfCTEO) EQUALS 8 IF THE ARGUMF.NT ~ILL
BE STeREO IN,
eTHERwISE. NEITHER ftF THeSE THINGS
IS CHECKED IN NaN-DEBUG MeD~.
°
A~se, IT IS ASSU~ED T~AT THE Fel~6WtNG PARAMETERS
HAVE BEEN SET UP By T~E PReGRAM THAT CA~Le:O THE
SUBPRflGRA~ THAT IS USING THE SETUP R6UTINEI
INA)
ILCI
•
NUM~ER flF ARGU~(NTS
L6C er FIRST ARG WaRD
THESE RBUTINES THEN RETURN Te LaCATI6~ (LR)+(NOI,
AFTER SETTING UP GRUNCH T6 RETURN Te (LC!+(NA).
THESE RBuTtNES De NeT HANDLE REMeTe: CAL~tNG SEQUENCES.
(RReR REC6VERYI IF hU~BER e, CALLING ARBS AND
RECEIVING DUMMIES DISAGREE, 9SETUPN WI~L ~BT C8MPLAIN
BUT WILL BEHAVE RATIBNALLY, " Tge MANY ARGS ITBB FEW
DUMMIES" TH( FIRST N ARGS ARE \JSEO •. IF T66 FEW ARGS
(TeB MANY DUMMIES), T~E FfRST N OU~MIES ARE SET uP, T~E
eTHER DUM~tES RFMAIN.WHAT THEY WERE eN THE PREVI~US
CALL TB BRUNCH, 9SETUPN!S ABILITY T6 ACCEPT Tea.SHaRT
CALLING SEQUENCES ENABLES IT T6 W6RK AS ~SETUPM IN NO~.
DEBUG MaDE. THE ~INIHUM ACCEPTABLE NUMBER 6F AROS IS
PASSED IN REGISTER ~ AND IS IGNBRED AND PRESERVED.
SYSTEM
CSECT
SIBS
~
PRBCEOURE eNLY
Appendix A
75
PAGE
•..
R£ G! S TERS
..
00000001
Xl
ARtS
DMY
MNA
MXA
ttl 0
loR
NA
OOOOOOO~
00000001
00000001t
00000005
000000015
00000006
OOOOOOOE
OOOOOOOF
INDEX ,
ARGUM!NT
DUMMY
MINIMUM NUMBER S' ~RGUMENT$
MAXIMUM NUMBER ftr ARGUMENTS
~UMBiR sF DUMMIES
LINK, RECEIVING
NUMA£R
ARGUMENTS
LINK, CAL.I.ING
e'
I.e
••
•
•..
REGISTERS 1,2,3. AND 15 ARE ALTERED. 15 ~AS THE
C;ftNTENTS ftP lit ADDED TI!! IT AND BECftMtS T~i EXIT
l.eCAT!eN FeR THE SUBpReGRAM CGRUNCHI.
....
•..
91
92
,3
,It
01 00000
01 00000
3210000' A
01 00001
3110000E A
6820000A
oi 00002
3210000£ A
01 00003
6 800000A
01 0000 4
95
96
"9'98
100
101
102
103
101+
105
106
107
108
10'
110
111
112
01 00005
00006
00007
01 00008
01 00009
01 OOOOA
01 OOOOB
01 Ooooe
gl
01 00000
822200011'
6 8100008
3221+0000
B2320006
35260000
e01F'F'f'F,
68100005
30POOOO£;
U'
118
U9
9snUPN
7SET
....
....
FeR 9srTUPV •
~
. PH .. ,o .. e
PAGE
[QU
LW,Xl
c;w,Xl
el.E
I.W,X1
e
tiN N~N.DEBUG, 9SETUPM , 9SETUPN)
GET tNTe X1
THE NUMBER SF DUMMltS
eR THE NUMBER eF ARGUMENTS,
WHICHEVER !S LESS.
BRANC:~ !NTI!! I.eap
THIS PReCESSES THE ARGUMENTS/DUMM!ES BACKWARDS,
THAT IS, T~E ~AST eNE F'lltST.
lG1
LW,ARG
lGa
AGe
,ARG
I.W,ARG
I.W,Ol'ly *I.R,Xl
STW;ARG Q,I)MY
AI,X1
-1
eGEZ
101
1(13
BGE~
GET
"1.~,)(1
~w'L.e
..
CA~~ING
iF' NEGATIVE,
SEQVENeE weRO
PReCESS AS INDIRECT.
GET REC. SEQ. weRD (l.eC eF' DUMMY)
STaRE ARG weRO I~ DVM~Y TEMP
!F' T~ERE ~RE MeRE,
BACK UP AND (Ie PReCESS N£XT eNE.
lNCREMENT ~AI.L.!NG L.I~K ey iNA)
(Te SKIP ev£~ THE ARG WORDSI
SKIP eVER OUMMIES AND RETVRN
N~
-,"R,ND
B
•
15
t NG
!
..
WHERE I N ,
M •
R
1508 • 1~.6N + 9.31'1 • 0·91'1
24.6 • i_.6N • 3.3M + 0.9 A
e' ARGS SET UP
NUMA£R ell' INOiR~CTARGS
NUMBER ell' DUMMIES IN REG!STERS
NU~eER
(NeTEI IF' THIS TIMING CIo!ANGES, ALse CIoIANG[,S£,!,ul"V.I
E X T [ It N A I.
R E ,
S
NeNe:
E X T £ R N A I.
0 E F' S
SET
7SET
7SET
9S[TUPM
9SETUPM
SPECIAL ENTRY USED BY 9SETUPV
Z
DEF'
SET
OE'
5ET
*
1°
END
01 00001
t
01 00000
Appendix A
M
SAl. !JSETtN IANt> RETURN)
CAI.L. GRUN Io! (~ND RETURN)
9SETVPN
9SETUPN
..
139
14 0
T I
DEF'
SET
01 00000
134
76
..9SETUPM
....
.
•..
..
•.
•..
....
•..
-..
U6
138
A
,S[T MUST PRESERVE REGISTER
*
115
135
13 6
13 7
A
A
A
A
REGISTERS 7.S, AND 9 MAY BE USED AS DUMMY TEMPS •
THE eTHER REGISTERS ARE NeT GUARANTEED •
P~GE
114
120
121
122
123
121+
125
126
127
128
1!!9
,30
131
132
133
A
[8QA0006 A
113
PAR AM! T ! R I
~
U~
N ARGUMENTS
n05062
5ET UP ARGS WITH MIN. MAX
- SOS SIGMI. 51' reRTRIo.N IV • 9SETUP! 1'1IL.18)
1
2
-
3
-
•
II
---•
15
,
6
8
9
10
11
12
13
III
01 00000
00000002
00000003
00000006
0000000£
0000000"
115
16
17
18
19
20
21
-
00000
00001
oooo~
8220000' 10.
61110000:;
322110000 10.
00003
000011
00005
35260000 10.
30'0000£ 10.
01 00006
680COo01 10.
REa i
SlCi5
S T
ARB
OMY
L.R
NI.
•
•
II' A
:11
.RGUMENT
CUMMY
L.fN~, RECEIVING.
NUMBeR B' ICAL.LINGI Io.RGUMENTS
L.IN~, CAL.L.ING
111
PAGe:
L.W,.RCI
L.W,oMy
STWilo.RG
AW,\.c
•
01 00000
-\.e
CIo.L.L.INQ SEQUENCE weRD
IF' N!GATlVt,
PReCESS 10.8 INDIRECT.
GET REC, SEQ. WeRD (LeC e~ DUMMY)
STeRI!: Io.RG weRD .IN QU"IMV TEMP
INCREMENT clo.L.L.ING LIN~ 8Y.I~1o.1
IW~leM IS suppes[o.~e BE 1)
SKIP TME DUMMy Io.ND RETURN
~ET
1Gl
o,MHI
01\.1'1
o,OMY
N.
8
TIM
NG
BIo.L. 9SETUP! (AND RETURNI
CIo.L.L. BRUNCH (AND RETURN)
•
1'.9. '.3M • 0.91'1
211.6 • 3.3M + 0.91'1
WME:REI M , 1 I' 10.,.13 IS I',DIR!eT
R , 1 t~ DUMMY IS IN 10. REGISTER
R
e:
F' S
NeNr:
DE F' S
9SETUPl
9SETUPl
l.
•1('1
2
o~I)
••
--••
-•-
RAM II': T II': R S
REGISTERS 2,:;, AND.iS Io.RE AL.TERED, .15 H.S T~E ceNTENTS
eF' 111 Io.DD[D T8 IT AND BEC8 M[S T~E CIo.LLING RBUTINE'S
EX IT L.eCIo.TlI)N.
BGU
--
ER S
115
L.W,Io.R13
323C:OOOO 10.
eNL.Y
p~eCI!':OURE
6
--•
S!QU£N~E.
1
3
u:
-
01
0\
01
01
01
01
9 S t TU~ 1
SETS UP BNE Io.RGUM!NT IN A STIo.NOIo.RO RECEIVING
CA~L.ING SEQUENCE weRO MIo.Y Bt INOIRECT.
SYST!M
eSEeT
1
"05060
SET UI' 1 OUMi'ly
*'0~060
END
Appendix A
77
1
•
•
Z!
3
••
•
•••
•••
/t
~
6
7
,
8
10
11
12
13
111
15
16
•
SETS uP A VARIABI.E NVMBER8~ AR~UMENTS
IN A STANDARD RECEIVING SEQUENCE
IINV8~VING A MUI.T!PI.E DUMMYI.
CAI.LING StQUENCE T8 9SETuPVI
(NDI
•
•
•
•
•
•
!~
21
22
W~REI TYPE IS A MASK 8F THE TYPES THAT ARE
Pe;RMISSABI.E AND I' (WHICH STANDS reR pR8YECTED) eQUA~S
8 IF THE ARGUMENT WILl. BE STeRED INT8, 0 8THERWISE.
NEITHER 8r THESE THINGS IS CHECKED IN NBN.DEBUG MBDE,
••
••
2.
25
26
27
28
29
30
31
32
33
311
35
36
37
AI,.S8, IT I S ASSUMED THAT THE F8L.I.BWlNG PARAMETERS
HAVE BEEN SET UP By T~E pReGRAM THAT CAI.I.ED THE
SUBPR8GRAM THAT IS USING THE SETUP ReUTINEI
•
•
•
(NA'
II.C'
•
•
2
[RReR REceVERYI THERE CAN NEVER BE Te8 MANy ARGUMENTS.
THERE ARE Tee FEW ARGUMENTS IF THERe; ARE ~eT E~eUGH Te
SATISFY ALL THE FIXED DUMMIEs. IN THIS CASE 9SETUPV
WILl. NBT CBMPLAIN BUT WILl. BEHAVE ~AIRI.V RATI8NALl.v •
THE RETURN FeR BeTH 9SETUPV AND GRUNCH WII.L BE 18 THE
ceRRfeT "LACE. THE ARGUMENT C8UNT FeR THE ~UI.TJPI.E
DUMMY (REGISTER III WILl. BE A NEGATIVE NUMBER rE~LING
Hew MUCH TSB SHeRr THE CAI.LING SEQUENCE WAS \_2 MEAN~
Twe ARGUMENTS SHeRT). THE MUI.Ttp~E DUMMY p,8INT£R WII.~
pelNT BEveND THE CALLING SEQUENCE ANO SH8UI.D NeT BE
USED (JUST AS tT SH8Ul.DNIT BE USED iF THE NUMBER8P
ARGS FeR THE MULDMY 1$ ZEA8,. 8~ T~[ FIXED QUMMlES,
ONLY THE ~IRST (NA' WILl. BE SET UP, THE eTHER FIXED
DUMMIES REMAIN WHAT THEY WERE eN THE PAeVleus CALL
T8 GRUNCH.
•
•
•
•
•
••
•
•
1t1
•2
113
Itll
/tIS
It6
It7
-,50
1t8
•
•
•
•
51
52
•
53
511
•
55
01 00000
57
58
59
60
61
62
63
611
65
66
67
68
69
70
71
72
73
711
7!5
Appendix A
00000001
00000002
00000003
000000000000005
00000006
OOOOOOO[
OOOOOOOF
•
•
•
Xi
ARG
aMY
!10 M0
Nr:!
loR
1101.
I.C
•
•
•
•
NUMBER e~ ARGUMENTS
I.BC 8F FIRST ARG W8RD
THIS R8UTINE D8ES NeT HANDI.E REMeTE CAI.I.ING SEQUENCES,
•
•
39
110
•
•
ArTER SETTING uP THE MU~TI"I.E DUMMY" 9SETUPV BRANCHES
T8 7SET (AN ENTRY IN 9SETUPN, T8 SET UP THE FIXED
DUMMIES. 7SET RETURNS DIRe;CTI.Y T8 GRUNCH (THE
SUBPR8GRAM THAT CALLED ,SETUPV, AT l.eCATI8N (I.RI~'ND',
AFTER SETTING uP GRUNCH Te RETURN Te (I.C'*INA"
•
•
•
•
••
38
.NUMBER 8~ DUMMIES
IINCI.UDING MUloT. DMy.,
9SET\JPV
F!XFD DUMMV TEMP 1
~IX!D DUMMV TEMP 2
~!XED OUMMY T[MP eND.,
MU~TIPI.E DUMMY TEMP
TVP!,p
TVP!,p
•
•
23
•
BAI.,I.R
TVP!,p
TVPE,P
••
18
78
/t/1/68
9 SET U I' V
••
17
56
SDS
SYSTEM
CSECT
SIG5
1
PR8CEDURE
8N~V
3
PAGE
REG 1ST E R S
1
2
3
•5
6
111
15
AND
PAR A MET E R 9
INDEX 1
ARGUMENT
DUMMY
NUMBER eF MUI.TIPLE DUMMY ARGS
~UMBER 8F DUMMIES INEGATIVE'
LINI(, RECEIVING
NUMBER e~ ARGUMENTS
LINI(, CAI.LING
•
REGISTERS 1.5 AND 15 ARE ALTERED. II IS,SET T8.THE
NUMBER BF ARGS CBRRESpeNDING T8 THE.MU~TIPL! DUM~Y.
15 HAS THE ceNTENTS eF 111 ADDED T8 IT AND BFC8MES THE
EXIT ~eCATleN ~eR THE SUBPR8GRAM IGRUNCH"
•
,SET MUST NeT DESTRey REGI9TER II.
•
",."
"
80
81
82
n
811
115
.,
116
01. 00000
3A500005 A
01.
01.
01.
01
01.
01
01
32tOOO05
l!OI.FFFFF
32200001.
e02FFFFF
3020000F
B2320006
35260000
00001.
00002
00003
000011
00005
00006
0000"
A
A
A
A
A
A
A
811
!I'
'0
'1
92
'3
01. 00008
01 0000'
01. OOOOA
32110000l A
381100001. A
68000000 l(
,II
95
•
-
•
•
•••
•
""
911
99
'"
•9SEfUF'V
•
••
100
101
1.02
103
1.04
I. OS
1.06
..
'0Il
10'
110
H1
••
••
•.
••
10'
•
••
111
113
UII
US
U'
1.11
01 00000
,
•
PAO!
II
ftHH,DH(J
I.CW,NO
NO
'lO • 'CNUMBER 8F DUI'lMIESI
ISe RETURN FRe M ,SET WIL~ WeRK)
ND
I.W,xl
AI,Xl
-I.
I.W,ARG
XI.
AI,ARG
-1
AW,ARG
I.e
I.W,OMy _I,.R,XI.
STW,ARG O,OMY
I. W,NMD
SW,NMO
Xl • NUMB!R OF vIX£O DUMMIES
ARG • I._I.!!S T~AN TH! Lee eF THE
FIRST ARG WeRD THAT ceRRES.
peNos TO THE MVLTiP~1 DUMMY.
GET R!C, SEQ. weRQ,IL8e e MULOMYI
ST8R! 8'FSET ADDRESS IN OVMMY TEMP
ITHIS IS se THAT MOlll CAN BE
REFERENCED BY ~UTTING THE
YAI.UE 1 IN ~N INDEX REGISTER,)
NUMBER e F MVI.T!F'!.! oU~MiES i
NR, ARas. NR, FiXED DUMMIES
Ge SET UP THE FIXED DUMMIES
IceUNT IS IN X1I
NA
Xl
1SET
e
5
'AGr
T I MIN G
BAI. 9S£TUPV IANO REJURNI
CAI.I. GRUNC~ lAND RETURN I
,,
11"1' tll.6N • 3.3M • O.9 R
50" , 111.6N • 3,3M • O.,A
WHEI'IEI N , NUMBER 8F FIXED ARas S~T uP
M NUM!rR eF ANDtR!CT FiXeD ARGS
R If NU~BER e, VMMIE$ IN REGISTERS
"
INI!TEI THIS TIMING IS OEPrNOENT eN THAT 8. ,5ET.1
E )( T E RNA I.
I! I:
F S
REF
"£1
tXT r R N A I.
DE'
SET
!lSETUPY
9SETUPV
9SETUPN
"OISO'!
0 E ,.. S
SET UP VARIABLE NU~BER ef' ARGS
'705063
END
Appendix A
79
APPENDIX B. SAMPLE DIAGNOSTICS LISTINGS
11
SUBR~UTINE ERR~RS
21 C
31 C
S 0 S
.1 C
IOD,~I
5/7
S
51 C
61 C
D I A G N !! S T
I Y
CS
71 C
81 C
91 C
101 C
111 C
O. !!wENS 215/68
121 C
131
HI
151 C
161 c:
171 C
181 C
191 C
201
211
221
231
2111
251
UI
271 C
281 e
2" C
301
311
WARNIN~I
N!!
321
C !!
A I. I. !! CAT
SEE
, I. I C T S
~
E N 0
OI~ENSI!lN ~ASS1101 , NAMEI5,II1 , ~AXMIN(61 , K~J121 , KI.YSTI31
C!lMI'I!!N I.AST,M3A,<!lU~T'J!!!NJM,B'(PFK ITEST/~L,I~C~ES'JAX
[QUIYAI.ENCE I ~ASS , NAMEI.) I , I M] , ~]A , R8ARIN I
EQUIYAI.ENCE I 1'13 , NA~!(3) I , ( INCHES , M3A I ,
X
I ~ , NAMEI" , MASSI]) ) , « MAXMIN(5) , JAX I ,
X
C <LYST , K~J121 ) , ( KI.YSTI21 I <PF< ) I I KPFK , (HJ )
X
I K!lUNT , BASIE )
C II N , I. I ~ T S
EXTERNAL FN I 3N I XSC , FAB
OIMENSI!!N DEFIIO) I Q
,
IDENTIFIER ISN9REO·
OIMENSI~NS ~IYEN.
C!!MM!!N APP , X I
GRUNC~ I
:iN
I
WARNING1 10 C!!NFI.ICT WITH PREYI!!US USAGE. THIS IDENTIFIER IGN!lREO.
331
C!!MM!!N X
I
WARNINGI 10 CeN'I.ICT WITH PREYleUS USAGE. THIS IDENTIFIER IGN9REO.
3.1
351
JNTEGER RAOIUS
REAl. RADIUS I X , TB12
I
WARNINGI TYPE C!!NFI.ICT. !!1.0 TYPE RETAINED.
361
371
DIMENSleN OHell0)
l.eGICAI. DH8110,10l
I
WARNING' ARRAY PREV!!lUSLY OIHENSleNED. NEW OIHENSI!!NS IGNeREo.
38'
l.eGICAI. PHHIXI
I
ERRORI AOJUSTABI.E DIMENSI!!N !!N NeN-OJMMY ARRAY,
STATEMENT OEI.ETEO.
39' C
.01
ERReRI RErl.EXIYE OEFINITleN.
STATEMENT QEI.ETEO,
.11
SF2IX,2,XI • 3.7 • X -Q
I
tRR!lR' IDENTIFIER CeNFI.ICT WJT;; PREVlOUS USAGE.
STATEMENT DEl.rTED •
• 21
ReARIN (20,201 • G!I!!O!!L • GeNESy
I
tRReRI ARRAY N!lT DIMENSleN(D.
STATEKENT OE~ETED.
N !I T
X • 3A • (A.eleX.YI
,
,
S Y" T AX
WARNINGI !lPERAT!lR MtsSINI!. IMPLICIT ~UI.T1PI.ICATI!!N ASSU"IEO.
WARNINGI eIlERAT!lR MISSING. I"1PLICIT "UI.TU'LICATI!lN ASSU'1EO.
80
Appendix 8
I
X , lA-B) • 11.0 - ASSIX/l,; • B I 11, • A •• 21 .' T )
.'1
I
WARN'NGI MISSING RIGHT PARENTHESIS ASSUMEO HERE.
501
e&MM&N
OANG~!NG
WARNINGI
511
'21
le~~1
XA , XB , xe , XD , TB12 , ABe ,
C&MMAIS) !GN&REO.
WRITE I ;
I ABCIJI , J , 1 , ... ) , x , Y , A I
I TB12 , N
1 XA
1
WARNINGI EXTRA C&MMAIS) IGN&REO.
INTE~ER
531
~ISSING
WARNINGI
5... 1
,
A~G"'Cl0)
ARG3110)
ceMMA ASSUMED BEFoRt THIS CHARACTER.
X , ARRAY(3) • ARRAy!],2,""
I
• ARRAY
I
I
WARN'NGI ARRAY HAS Tee FEw SUBSCRIPTS. HISSI~G &~ES ASSUMED EQUA~ T& 1.
WARNING I ARRAY HAS Tee MANY SUBSCRIPTS. EXTRA &NES IGNBREO. ,
WARNINGI ARRAY USED wlTHeUT SUBSCRI~TS. ,IRST E~EMENT ASSUHEO.
X , ( ARRAY(J,K+11 • 65 .... 18.
551
13~&REO.
WARN'NGI EXCESS RIGHT PARENTHESIS
561
13 FeRHAT ( 316 , 12x
A. S ) • YI
I
2rtl.~
2(
I
6~ARVARO
,
A~ I
E16,9 I
I
WARNINGI HISSING RIGHT PARENTHESIS ASSUMED HERE.
6!S FeRHAT / lx , 31 ... , £1,.9 17 3HABC , 3PF10 .... , A3 I
571
!
tRReRI H&L~ERITH STRING NeT TERMINATEO.
STATEHENT OE~ETEO.
581
De
~3
HASS • 1 , 10
I
I
WARNINGI ARRAY USEO WITHBUT SUBseRI-TS,
ERReRI MUST BE SCA~AR VARIAS~E.
STATEMENT OE~ETEO.
~IRST E~EMENT
ASSUMED.
x
611
STATEMENT
DE~ETEO.
621 C
631 C
6411 C
651
661
.3
NT R I
x•
x,
~
SiC
AMAX1(Y,SI + AHeDIX,y)
AH&OIXl • AM&O/X,y,S)
I
I
[RReRI WReN a NUMBER SF ARGUMENTS Te INTRINSIC FUNCTIBN,
[RReRI WReNG NUMBER eF ARGUMENTS Te I~TRINSIC 'U~CTteN'
STAT~MENT DE~£TED.
X , AMAX11 8**2 , .... 0 • Y • R • T
I
611
I
A , ,.3$ I
ERReRI I~~~GA~ TYP~,
STATEMENT DE~ETEOt
681 C
6'1 C
701 C
fll
721
e
hi
IF
C
;31 C
S TAT E MEN T
OAT A
ceMPI~ER
THIS
sf;cTle~
OATA AIB,te,DO
I
I
REQUIRES DATA STATEME~T$ AT ,RDNT.
MAY BE "leVEl) IAFTI!;R AI.~eCATlI!N ceNF~IeTS"
~.1,'
I
I
rRReRI BI.AN~ ceMMeN AND OUMMIES MAY ~eT 9£
tRReR, B~AN~ eeMMeN AND DUMMIES MAY NeT 3E
$TATtMENT OE~ETEO.
7'1
INtTIA~llgl).
JNITIA~llEO.
OATA II AAIJI, J • 1,5 ), J • 1,5 ) I 25 •• 01 I
ERReRI CeNFl.rCTS WITH INNER
STATEMENT OE~ETEO.
781
ERReRS
I
De.ceNTRe~ VARIAB~E.
DATA AAI61/7.... 51 , IAAIJI, J •
I
l,61/6.3.1~1$'1
I
Appendix B
81
N~T
N~T
WARNINGI SU3SCRIPT
WARNINGI SU3SeRIPT
191
WITHIN ARRAY. DATA ~RBUP
WITHIN ARRAY. DATA GRBUP
C~/.C3.',1t1~',6.8~,.00'1
DATA CPXlll,
WARNINGI
OE~ETED.
DE~ETED.
I
NEVER USED.
C~~STANT
801 c:
811 C
a21 c:
831
5DSI9300,9001
DJ~ENSI~N
I
ERR~~I DIMENSI~NS T~~ ~ARGE.
STATEMENT
OE~ETED.
°I
II!! G~ T~
1161
~ABEL ~UT ~, RAN~[,
WARNINGI STATEMENT
DIMENsreN 8ETAIO,10)
811
I
ERReRI I~~E~A~ OrMENSleN.
STATEMENT OE~ETEO.
1181
x • AI 23.E611 • Y • 6.26E-611
l~
WARNINGI
WARNI"IGI
NU~BER
901 c:
911 c:
921
931
I NTRA• P
..!I xDe - 6 YI
I
WARNINGI
I.AeE~
9.1
HAS
I
SET Te ~AXI~U~
SMALL, SET Te lue.
NU~!ER T~e
891 C
I
~ARG~.
Tee
~
e GR
peSS!B~E
Rt
A~
~
MAGNITUDE,
AT I
~
"I S HI. S
• h 10
A~READY
WRITE 12,!I
I
APPEARED.
x, y,
ARRAYI3,11
WARNINGI
N~T
A FeRMAT STATEMENT
951
WARNINGI
WARNINGI
D~UB~Y oErlNED ~ABE~' THIS ~ABE~ IG~~REO.
I~LEGAL ~e~p TERMINATleN ST.TEMENT. TERM!NAT1B~ C~DE
~ABE~.
.. I' IX - YI 55,1,,1,
I
I
GENERATEO ANYWAY.
961 C
911 C
D~ 1" J8X • 1,10
WRITE (a,nl x
11 RnURN
9111
991
55
1001
I
PR!VIeUSLY REFERENCED
°
N•
I
WARNINGI STATEMENT HAS "Ie
1021
1031
10,1
WARNINGI
D~
AND CANNeT SE ACCESSED.
~AaEL
296 J8Y • 1,5
269 N , N • JBY
1.' ceNTlNUE
I
NESTED
I~~EGAL~Y
10!1
L~~P
ENDS HERE. TERMINATleN ceDE GENERATED ANYwAT.
SLeCK DATA
I
ERReRI THIS STATEMENT NeTSTATEMENT DE~ETED'
1061
PERMISSIa~E
I' IA .QT. 81
D~
HEQE,
•• I • 1,10
I
ERReRI THIS STATEMENT NeT PERMISSIBLE HERE.
STATEMENT DELETED.
1011
F~RMAT (1X. 5H A ~ , E12.6)
I
WARNIN31 STATEMENT HAS NB
~AaEL
A~D
CANN9T BE ACCESSED.
1081 C
1091
'c
UOI C
1111 C
1121 C
1131 C
lHI C
1151 C
1161 C
1171 C
1181 C
1191 C
82
Appendix B
PAR TIC U ~ A
~
L
¥
SUB T
~
E
ERR e R S
MAY CAUSE UNREC~VE~AB~E CBMPILE TIME E~R~RS.
IF 5e, THIS SEeT!6N SHBULD BE REM3VEO.
1201 C
1211
OI~ENSI~N ~(Ml
I
I
ERReR' RE'~EKIVE DEFINITI6~.
ERR~R' MUST aE SCA~AR VARIAS~E.
STATEMENT PE~ETEO.
OATA ( AA(JI, J .1,5,0 , 10.01
1221
WARN1N~1
I' It
1231
.~ T.
ERR~Rl
1241 C
1251 C
1261
DATA
GR~U. OE~ETEO.
01 END
I
N~T
TMlS STATEMENT
STATEMENT DE~ETED'
WARNIN~I
I
O~.C~UNT T~S ~ARGE'
PERMISSIBLE MERE,
END
De 296
I~R
~N
REPEAT)
LINE 102
UNeL~SEO.
TERMINATI~~
PRt~R T~
C6PE INSERTED
END.
WARNING' UNOE'INED LABELS I 0, 296
WARNINGI
E~UIVA~ENCE ~,
EKTENDS BLAN<
'M3' T~ '~AME' ~~
C6MM~N O~w~WARD.
LINE 23
IGN~RED.
WARNINGt
E~UIVALENCE ~,
'INCMES' Ta 'M3A' SN LINE 23 IG~SRED.
'INCHES' IS IN CSMM6N BLSC( IT[ST/I 'M3A' IS I~ BLA~K CSMM6N'
WARNINGI
E~uIVA~ENCE
CS~TRADICTS
WARNINGI
E~UIVALENCE SF 'NAME' T8 'MASS' ~N LINE 24 13NSREO.
CSNTRADICTS PREVISUS EQJIVALENCE.
sF 'N' T6 'MASS' 6N LINE 24 ISNSRED.
PREVISUS EQUIVALENCE.
WARNINGI E:luIVALENCt SF 'MAKMI"I' T6 'JAK' eN LINE 21t IG'IIeR[D.
EXTENDS COMMeN BLeC( ITESTI D6WNWARD.
WARNINGI
E~UIVALENCE eF '<PF(I TB '<HJ' sN LINE 25 IGNeR~D.
C6NTRADICTS PREVISUS ALL6CATISN IN BLANK CSMMSN'
WARNINGI
E~UIVALENCE
ap '<SUNT' T6 'sASIE' SN LI~E 26 IG~SREO.
'3ASIE' IS IN A DATA STATEMENT ANO CANNeT BE IN BLANK ceMMeN.
MEX
•...
NA'1E
Lec
WSRPS
...... .........
"'---"
R SCALR 00071 V
A
ASS
API'
AI'lRAY
BASIE
R
R
R
R
R
I.
R
!
ell
OHS
FN
GRUNCH
J
JBY
I(H,J
K,.'I<
MASS
"13
NAME
RADiUS
Tell!
)(B
XSC
r
I
I
I
t
I
U
S!'R60
SCALR
ARRAY
SCALR
SCALR
ARRAY
SPRSG
SCALR
SCALR
S"I. R
ARRAY
SCALR
ARRAY
SCALR
ARRAY
UNUSED
I
R SC~LR
R SC"I.R
SPRSG
HEK
LSC
~ABEL
.... -.-0
OEC
TYPE CLASS
UNClEI'
000511
INTRIN
00006 C
oooos V
0005(: V
0008" V
00067 V
ExTERN
00008 C
0007' V
00080 V
00003 C
00005 C
000117 V
00001 C
0001t2 V
1
25
1
1
10
1
1
1
2
1
10
1
20
OOOOlt I.
00001 \,
EXTERN
1
1
•
R SPRe3
JAX
JSBW'1
KLYST
I,.AST
MAX'1I'"
M3A
R!lAR!N
X
xc
Y
0006P
000811
6
85
MEK
-
lIIA~E
."" ..
HEX
Lec
EKTER~
----.,
0006a
00063
LASE!.
11
147
"EX
. Lec
-,,-.,
0008£
00097
TI':tE CL.ASS
"MOD
ARGIt
8
CPx
DEI'
ERReRS
:3"1
INCHES
JBX
,(
<~UNT
M
i'lL
III
R
LASE\.,
.... -.
13
269
00005 I.
'£XTE'I'4
00071> V
0000 .. C
0002E V
0005:> V
00000 P
SCALI!
I.
~
~
S:>~6G
HEx
Lec
000.9
00095
!,.A!lEL
-!'-'!-
10
10
1
20
10
EXTER~
00001
0008:
SCA~R
SCAL,R 00089
SC"LoR 00002
J'IJSEO.OO08P
t SCALoR 00000
! SCAI.R 0004A
J~JSED
XA
XD
. .....
S;>'!8G
I MIRAY
q SCALR
w ARRAY
~ ARRAY
SI>R'G
=I A,,'1"1'
" sc "I,. R
R
R S::,I,I,R
=I SC"LR
T
DE:::
"ORoS
I.e:;
.....
~6C
5
,
Q
L"3EL
0002 .. V
DEc
waRDS
-~- ...
10
I ARRAY 00075 V
R ARRAY 00001 v
10
00029 V
5
FiI ARRAY
UNUSED-OOOSE V DUMMY
R SCALi< 00000 V
1
SI"Re::; EKTe:.R~
SCALR 0008B V
1
SCALR 00002 L
1
SCALR 00003 C
1
ARRAY 00004 C
3
SCALR 00000 C
1
ARRAY 00056 v
6
SCALR 00001 C
1
UN;JSEO
SCALR
00001
{;
R
R SCA"R 00007 C
1
R SCALR 00002 L
1
R SCA!,.R 00072 v
1
I
Lec
fIt._.",
HEX
I.ec
"'"
-~"!
AA
AMAXI
ARG3
AY
BS
DO
ERR!lRS
FRB
HEK
LABEL
5
55
......
... R .ARRAY
TYPE CL.,ASS
~AME
1
V
1
V
1
C
1
V DUMMY
!,.
1
V
1
00073 V
00000 L
00003 I.
1
1
1
HEx
LflC
....
00064
~
1"
296
IN'Er
LeCAL VARtASI.ES ,,112 W6ROSII
00000
00QII2
00067
0007'
ERReRS
NA'1E
DHII
ARB ..
00001 ~Y
OOOH MASS
00011 A
00089 i(
00006
0004,1,
00012
0008A
AQRAY
N
Y
CII
000210 AA
00056 '1~l(MIN
ooon T
000813 I
00029
0005C
0007lt
0008C
B3
BAS IE
00001 Qe~RIN
00005 I(PPI(
00002 KSU'lT
00006 AI"P
J
JEll(
::)002<:
0005)
00075
0008;)
C;PK
Dr;F
ARS3
Jay
BLANI( <;e'1MeN 19 WaRDS) I
00000 LAST
00003 Je!lNUM
00008 BRUNC,",
00001 '13
00001t <I.YST
00001 M3A
0000" a
00003 (HJ
00007 )(
Appendix B
83
~ABE~EO eB~MeN B~eeK
ITESTI (3
WB~OS"
00000 Mi.
00001 INCHES
ooooe
00000 XA
00001 XB
00002 xC
",AX
00003 xo
ENTRY fllIlNTSI
00000 ERRBRS
INTRINSIe SUBPR!lGRAMS USEOI
ASS
EXTERNA~
SJ!PRIIGRAMS REQUIRED I
A"IAXl
AM80
NUMBER
8~
ERRBR MESSAGES I 63
NUMBER
8~
STATEMENTS
OE~ETEDI
17
WIGHEST ERReR SEVERITYI 7 II1A,.IIIR ERR8RSI
DEC
WIIRDS
GENERATEO ellOEI
eB"ISTANTSI
.....
,,,
7
HZ
~eCAL VARIAB~ES'
TEMPSI
TltTAI. PR!lGRAMI
84
Appendix B
.""
...
aU
10
MEl(
weROS
.OOOAit
....
00007
0008f.
OOOOA
.. ....
OOha
IP~US
BI.ANK ANO LABEI.ED C8MM8N)
00:305 Me
s
11 C
21 C
::> S
5 I 1
S
.., E
31 C
41 e
51 C
61
11
c s
~R~GRAM REC~"ERS ~ReM A~~ 8' THE ERR~RS l~ S~CTle~S 1.9.
REMAININl SECTle~S HAVE ~ATA~ ERRBRS, S~ T~E ~IB~AR'
ReUTfNE 'A3BRTS(T' IS JSeD TO ~EGAIN C'NTRe~ I~ THE PReGRA~,
RATMER THA~ ABeRTI~3. MeST r5~TRA~ S,5TE~S ,~ N~T MAVE THIS
rACI~!T'.
A~SB, T~EV ~A¥ ABeRt ON se~E BF tME EARCIER ERRORS.
Te DE1 6 NSTRATe e~ SJCH S'STE~SI THE VARI~JS SE~TIB~S e. THE
PRBGRAM CA~ 3E RJN tN~EPENJE~T~V BY INSE~TI~3 E~' STATEMENTS
AT THE P~ACES I~'!CATEO 3y ASTERIS~S.
THIS
c:
c:
T~E
81 C
!II C
10 1
I "
S ,.
c:
111 C
121 C
131 C
141 C
151
c***· •••••• ** ••••• * ••••••••••••••••• • ••••••••••••••••• ••••••••••••• * ••• *
161 c:
111 C
181 e
x~
1,1
201
211
221
0.0
'f •
Al.elOn
B•
1231t.
PRINT 1, y
1 reR'1ATI ~H Y f , G10.3 III
231 C.*.* ENO •••••••••••••••••••••••••••••••••••• ** •••••• **** •••••• *** •••••
241 C
251 r.:
261
.,
211
281
c:
e~'"
301
2
A • EX~(B)
PRINt 2, A
'BR~ATC
ItH A , , G10.3 II)
311 e* •• * END ••••• ** •••••• * •••••• * •• **.* ••••••••••••••••• *.** •••••••• ** ••••
321
e
331 I!
3ltl r.:
351
361
311
381
3"
401
;;
1111 e.***
~21
C
",3' C
HI C
",51
",61
1111
4181
"'"
~Ol
o. E
OBU3~E ~~ECIS!e~
E • a.ODO
.31
o ! E: ... I(
I< ,
PRINT 3, I)
FeRMAT I 4IH 0 •• G10.3 III
END
.·.··.·***f* •••• '**.**.··.··*** ••• ** ••••••• *** •••••••• *.**** ••
C""'''LE:X 1:, G
Cl • (0.0, .1001
e • CATANIGI
~RINT 1+, C
1+ F"~MATC 6H C • I , 310.3 , 1~, I 310.3 I 2W ) II)
c•••• END •••• ******* ••••• , •••• ** ••••• * ••• ** ••• * ••••••••••••••••••••••••
'$11 C
521 r.:
53 1
c
51t1
551
661
511
6
581 C****
'591 C
601 c:
611 r.:
621
631
6
61t1
651
66
661 c••••
611 r.:
681 r.:
691 e
101
7
111
721
11
731
141 C**.751 r.:
161 c
771
181
e
!l01
551
END ••••••• **.** ••••• ** ••••••••• *** ••••••• ** ••••• * ••••••••••
RI;:AI) "
)(, I(AI.!'~
~10,3 , Ait
71, ~, I(A~~H
reRMATC
PRINT
FORMATI F10,3 ,
*.*.,.
)
Ait I)
END **.*.**** ••• ** •••• *.*.*.*.*.*.***** ••••• * •••••••
*.*._.*•• *** ••
M , 11
!Ill
81t1
READ 61 x, " l.
FeRMAT! 3E141.3 )
"RINT 66, ~, V, ~
FO~MAT( 3E11+.3 II
~OGICAI. I.
A , 1:I~.2111
L I .'AI.Se;.
191
821
831
1. 41 11+2111£20
V , SI~(W)
PRINT '5, V
FeRMAT I 4IH v • , Gl0.3 I 1~1 I
END **** ••••••••••••• **.* ••••• * ••••••• *** •••• * ••• ***.**.***.* •••• *
W•
S " .1+.2'0
8
c••• *
~RINT 8, A, I.,
~eRMAT( .10.!
M, S
, 15 , 2.tO.) II)
END ******* ••••••••••••••• ** •• * ••• * •••• ** •••••••••••••• ****.*.****
Appendix 8
85
861 C
I" C
881 C
891 C
901
911
92'
'3t
'4t
951
'6!
911
981
'91
1001
1011
1021
1031
1041
1051
1061
1011
1081
1091
1101
DeUBI.E PRECIS!B~ F
1.5GrCAI. ,
)( , 23.6859
F • 681-.0971388
II' , .TRUE.
J , -531
PRINT 51, X, p, p, J
, FeRMAT! liM x , , FB ... I (7~, F.
) I (7~1 ~ ~
I ,
1
«7~1
J.
) I
c.*.* END •••• ** •••••• ** •••• *** ••• *** ••• * ••• * •••••••••••••••••••••••••••
PRINT 9'
99 ,eRMAT(I ... 1)
C
C
c:
CALI. ASCRTSET!10SI
ASSUN 10 Te I(
, 10
l(
lie Ttl ;(
10 Ce!l4TINUE
END ••• *a •••••••• _ •••••••••••• ____ •••••••••
c••••
_._*_ ............. * ••
~*
lUI C
1121 C
1131 C
1141
1151
1161
CALL ASBRTSETll10S)
RE"'IND 11
110 ceNTiNUE
12111
sell I
1261
CAI.I. A~CRTSET!120SI
;/RITEIl/12)
,eRMAT! 22 ... THIS IS A SC D REceRD. )
8ACKSPACE 1
READ 11 I J, I(
1!0 ceNTI NuE
1111 c-•••
U8 1 C
119' C
1201 e
1211
1221
12
1231
END •••••••••• _••••••••• -_ •••••• - ••••••• _••••••••• -- •••••••• - •••••
1211
c••••
[NO -.-•••••• _* ••••••••••••• * •••••••• *.********* ••••• *** ••• ***.***
12"
C
USI C
130 1 C
1311
1321
S331
l,lIl C
1351
1361
1311
CAI.l. AaeRTSETIO)
END 'II.E 1
BACI(SI"4CE 1
lIN CASE T~E aAC(SPACE DID~'T DETECr T~E Ee" TRY ~ REAOI
READ!ll )(
END ** •• ***.*.**.* ••• ** ••• ****** ••• ***** ••• *.*~**.* •• *.* •• •• *** •••
c·*·· ENO
~EX
NAME
TYPE CI.ASS
.•.•.
.-.A
\.5C
......... "'.'!I
R SCA~R 00003 OJ
R SCAI.R DOOO~ OJ
() SCAI.R 00004 1/
D SC:AI.R 00016 1/
,I SCAI.A OOOO!! 1/
1 SCA\.R 00013 "
R SPReG EXTERN
R SC;AI.A 00000 1/
a
()
F
I(
M
SIN
x
......
,1
71
.ooooc:
"....
Lec
00019
OOO.lI
.. ..,
~
1
1
2
2
1
1
1
\.A3EL
99
-.,,_ .
."
Aae~TSET
C
E
G
(ALPH
P
II
Y
l.e C
. e_._ .....
0001C
00093
000C5
"
9
11 0
Sp~e:;
r; SC.~"
I' SCA\,R
c: SCAI.R
1 SCAL"
\. SCAI."
R SCA\.R
R SCAl"
LABEl.
i.ec
• f!: • • •
2
8
....
...
HEX
~EX
!olE:)(
\.ABEL
DEC
oIeROS
jY"E :\.1155
".'111!'-
."'!' . . . . . .
EXTER~
000010.
00006
OOOOC
OO::lU
1/
0001~
1/
II
II
v
OC:;OF Ii
00001 II
101 EX
\..A6Ei.
..
0002E
OOOSll
00006
..tEl(
DEe
"eROS
10
120
lee
0003E
00001
OOOEE
2
2
ALBG
C. . TAN
EXP
2
oJ
1
10
S
1
1
1
..
Z
!.-AllE\..
IS
12
HEx
LBC
00053
00000
'< 5P'<'lG
: 5PR",;
'l 5PR~(;
I SCA'.R
~ SCAI"R
'l SCA;,,"1
~ SCAI"R
'l SCALI<
I..ASEl.
6
66
\,..6:
EXTE~"
EXTE~'4
::Xn'lN
OP019 1/
00012 1/
OOOH Ii
OOOOe: II
00010 Ii
HEX
L.3C
:')0062
00:,)6E
I.e CAl. I/ARIAB..,ES 126 "eROS),
00000
00008
00011
0001'
!lLANO(
X
I(
0000.... r;
00012 I.
I<A\.PH
J
c:e'll'1eN (0 ",eROS)
EXTERNAl. SJBPRBGRA'IS
ueRTSET
Al.eC;
REQ~I!<EOI
CATA'"
HIGHEST ERReR SEVE.RITYI o ('<B
86
Appendi x B
00t':13 A
OO~OE "
00C111 5
000:12 B
OOOOc 3
00013 'I
00001 Y
EX CI
~~"~RS)
sl"
00001t 0
OOOOF II
00016 F
OE~
"BROS
00006 E
00:')10 Z
00018 "
1
1
1
1
1
ilEt:
w8RDS
GENERATED e:eDEI
CONSTANTSI
l.eCAI. VARrABI.ESI
TEMPS:
TtlTAI.. ?FHI3RAM I
...
HEx
WBR,S
~-
255
12
26
000.,
oooee:
0001A
0
00000
-.-~.
293
0Ol?5
ASSllN ~:l,(DEVICE,'T)'(~uT,N)
LS?E (GO),(vNSAT,(F~1.1B)),(TSS,~O)'(.~N'DEM~)
1<1,1"1 (I.'1N,DE"~1
FBRTRAN RUI\I-TI'IE ERROR IN
ZERO 'R NEGATIVE AR3U'1ENT,
y
p
..
'9ALB~.
'CALLED AT 1.0: x'01~6AI.
OVER'L9~1 RESULT. '1 Axl'10'1 NEGATIVE,
7hE 76
FeRTRA~ RUN-TIME ERROR IN '9EX?
MAGNITUDE OJ ARGI,IHENT Toe ~AR3E,
,..
.72~E
'CALL~D AT Lee ~'01C7AI.
'VERF'l.e~1 RESUI.T , MAXIMJ'1.
76
FORTRAN RuN-TI~E ERReR IN '9?~R'! I CAI.LEO AT 1.0= x'OlC!C'.
ZERtl Ttl NBI\I_-eSITIVE pe~E~, eVER,CaW' RESJLT • MAXI'1UM,
o.
,7hE 76
F6RTRAN RUN.TI'1E ERReR IN '9CATAN ':A~LED AT ~ee: x'01:9c'.
SIN3U~ARITY AT +eR. I, eVERPLB~j RESJCT • ~AXI'1vM'
C ,(
76,
'72~E
,724E 76 )
FBRTR~N RU~.TIME
MAGNITuDE
v _ .000
e,
ERReR IN 19S1N
AR3UMENT TeB LAR3E,
I CAI.I.ED AT
~eC X'O~CB1"
RESJLT • ZERB.
~~ S!3NI~I:A~CEI
FeRTRAN RUN·TI~E ERReR IN '9BCD~EAD' CALLED AT LBC X'01CC2'.
3.86E+09
0,45E.99
6.73E.09
SECTION
~
INPUT
I
INPuT
VA~UE
aVERFLew.
.386E 10
~A~I'IUM
.7e~E
PBRTRAN RUNwTIME ERReR IN
54).2/AOCD
I
ILLEGAL NUMERIC IN?UT
USED,
76
.673E 10
CALI.ED AT Le C X'01C09 1 •
SECTIBN 7 INPUT
19BCD~EAD'
CHA~ACTE~.
FIE~D TER~!~ATEO,
5~3.200ABCD
CA~LED
FeRTRAN RUN-TIME (RReR IN '9BCDwR!T,
(P10.J,15,2~!0.JIII
I/~
I
5J.2~7
x~
M~OE'
VAI.JE USED
17.000
_11,290
I.IST ITE" wRaNG
23.6859,
o
F.,
p.,
AT
~eC
XI01CF'"
A~YftAY.
J.
FBRTRAN RUN_TI'1E ERReR IN '98CDWRIT' CAI.I.ED AT LaC X'01D12'.
(II~ x .,"8.11,17101,
F ' ) , f7H, P. I, (7H, J . ) )
Nt'! FBRMAT SprEC peR REMAININ:'i DATA,
322'15
I
I'~R'1AT
USED.
681~.09713880000
Appendix B
87
FeRTRAN RUN-TIME ERROR IN t'ASGSTA I CALLED AT LeC X1 0l035 1 •
GO TO VARIA3LE NOT ASSIGNED' Ce~TA!NS oOOOOOOA
FeRTRAN RUN.TIME ERROR IN "RtWIND
1/8 UNIT 11 is UNASSIGNEO.
I
CALLEO AT LeC X1 0l03AI.
F8RTRAN RUN-TlME ERR8R IN "BINREAO' CALLED AT LeC X'OIO'!"
R!ceRD NOT SOB !INARY F8R~AT.
FORTRAN RUN-TI~E ERROR IN
END-OF-FILE eN UNIT 1
88
Appendix B
"B($PA~E'
CALLED AT
L8~
X'OlD5".
APPENDIX C. SAMPLE LIBRARY LISTINGS
* SDS SIGMA
1
":;
..
..
.
'+
!::
C
7
8
9
Cl
IC
11
18
1\0
EGU
EGU
EGU
£CU
EGU
5
6
7
?7
28
e1 ccccc
Cl CCCCl
225,FFFE A
(:A6ccccr X
.
MAX
el
LW.III
E~cCCCCI="
8LEZ
L.W,X7
Cl.
ecce?
ceces
Cl CCCC6
38
3$
4C
C1 ccce7
Cl CCCCI!
C1 eccc9
41
42
43
C1
46
eCCCA
Cl cceer,
C1 CCCCC
Cl eceCD
Cl cccce
e1 CCCGF
2C4cccec A
B27kCCC 1 N
cS1CCCCA
3C7Ececc
31SEccec
1:>
BGEZ
A
A
E'GI
B
*
C1 OCCcc
"
eEF
I
SET
. SDS
.."
..
;;
:3
4
::
6
7
8
~
:::1 ceccc
11
112
.
lR
X7
AR
LC
(CCCCOC2
".
"SNGL
2C
24
.
..*
....
cceccoct':
occccoca
cccaecer
CCCCCCC1
18
19
21
22
23
-1
1G
"LC
8TO
9SETUPV
8TC
9SETUPV
~
L
#705051
,705063
0 E F S
MAX
MAx
MAX
STANDARD EVALUATBR
,705221
EI\D
5~
/"~
0,'17
EXT ERN
"
';4
14
1S
16
11
C,X7
0,)(7
3G
REF
REF
';:;
13
"lC
*8TC+l.NtoID
2G
REF S
51
52
GET 1ST ARGUMENT
ARE THERE MeRE ARGUMENTS
N6,RETURN
eBTAIN ARGUMENT ADDRESS
BRANCH IF N6T INDIRECT
INDIRECT
IS IT GREATER THAN THE PRECEDENT
NO. GET ANBTHER RNE
YES, GET THE I\EW MAXIMUM
ARE THERE MeRE ARGUMENTS
YES
N6, RETURN
o
*
'+5
5C
lC
,8TO
lbAl
A r.r;MD
(peOCCOF A
4e
8TC+1
daE
3G
MINUS NUMBER flF DUMMIES
SET UP 1 FIXFD AND r MULTIPLE DUMMY
ADDRESS OF 1ST ARG INTB TEMP
(Lec OF 1ST MULT- DMY_ ARG) • 1
9SFTUPV
!lTe
L.W.X7
C",AI
2G
£oil0rCOD
32SECCCC A
2C4FFFFF A
6:;2000C7
-2
A 1,1\!10
A.
47
55
5t
57
z
PHH
ll.ND
SAl,LR
II\TG
II\TG
3(;
45
INTEGER TvpE
PAGf
B2SCOCCC X
44
X'C1'
*
C1 eccC4
37
15
GEI'i#l,7,4,3d7
Cl eCCC3
33
NUMBER eF ARGUMENTS CORRESP6NDING
T6 THE MULTIPLE DUMMV
NUMBER eF DUMMIES
L1NKI RECEIVING
INDEX REGiSTER 7
ACCUMULATORI INTEGER
lINK. CALUNG
PEND
35
34
P A RAM E T E R S
9
CI\AME
PRBC
cicceocc X
ClcaceC1 N
32
A t-; D
RLCEIVING SEQUENCE MNEMONICS
LF
2e
31
~
*INTG
ecoccOCI
E v AL UAT 6 R
PR6CEDURE fiNLY
S T E R S
EGU
"
22
23
24
25
1
NMD
"
('I
2$
R r: G I
LR
X7
Al
LC
cccecce,
1$
2C
2/5/68
SIG!:
it
oCCceocs
cCCCCCC6
CCCCCCC7
cceCCCC3
17
3C
SYSTEM
CSECT
cccce
cccreoc,;
1'+
15
16
( S TAN 0 A R 0
,105221
TrllS RBUTINE RETURNS THE GREATEST ARGUMENTAkGUMF~TS AND RlSULT ARE INTEGER NUMBERS
*
12
13
F0RTRAN Iv • MAX (F4LIBl
5/7
MA X
SIGMA 0/7 F8RTRAN Iv - ASS (F4lIR)
E V AL UAT 6 R
TrlIS ROuTINE GIVES THE ABSO~UTE VALUE OF THE
A~GUME~T (ARGUMENT AND RESULT ARE B6TH REAL
SI~GLE PRECISION NUMBERS.)
SVSTE.M
CSECT
R
E GI S
EGU
EGU
EGU
tGU
SIGS
PROCEDURE ONLY
1
E R S
6
1
8
15
AND
P A R A ME T E R S
LINK, RECEIVING
INDEX 7
ACCUMULATOR, REA~
!.INK, CALLING
RlCEIVING SEQUENCE MNEMONICS
CNM',E
PG6C
LF
( S TAN DAR D
A R S
x'CE'
GEN.l,7,4,3d1
PEND
REAL (SINGLE) Type;
AFA(1),NAME,CF(21,AF(EI,AF(11
Append i x C
89
2E
2f;
27
2~
25
3C
31
3c
33
C1
C1
C1
C1
ceecc
ceCCl
cece2
ceCC3
6A6ceeee
cccceee7
3Lll'EeCCC
HCGCCCF
x
A
A
A
9AL.LR
SI\GL
LA",.AR
3f;
37
•
31]
35
'Ie
REF
SSETUPl
ExT ERN A L
DEI'
e
•
•
•
•
•
•
•
•
•
.•
4
!!
e
7
8
1C
11
1?
13
111
C1 CCCCC
22
23
•
•
•
(CCCCOC2
CCCCC003
cCCCCdC4
cCcccce4
CCCCCOC4
CCCCCOCS
cccccoe5
24
25
26
27
28
29
3C
31
3Z
3:;
34
3S
36
37
38
35
'Ie
41
1t2
1t3
SYSTEM
CSECT
E1
P
•"
•
INTG
EVRY
eeCCCC3F
LF
Ite
It7
EBFSET(L6C~UNITl.
SIG5
2/5/68
1
WHERE:
Eeu
EQU
Eeu
ECU
EGtU
EtlU
ECU
Eeu
EQU
EGU
EQU
Eeu
Eeu
EQU
PR6CEDURE BNLY
1
REG 1ST
.
CCCC~CCl
/tit
/t5
,705239
IF CALLED WITH N6 ARGUMENTS. RESETS SYSTEM T6
TERMINATE 6N EI\D-BF-FILE.
XII
cccccce'.
coeeCCCR
(F~LtBJ
BaTH ARGUMENTS ARE 6PTI6NAL. IF CALLED WITH BNLY BNE.
TRANSFER IS MADE BUT N6 UNIT NUMBER IS STeREO •
ES
MXA
X5
EN
LR
EL
RC
Rl
NA
LC
ccccceC6
oeCCCCC6
cceceOC8
cccccces
ceeoCOCE
cCCCCOCF
tv - E6FSET
L6C • STATEM£NT NUMBER 6R ASSIGNED VARIABLE Ta WHICH
A TRANSFER IS MADE aN ENO-BF-FILE.
UNIT- INTEGER VARIABLE INTa WHICH IS STBRED THE
LaGICAL UNIT NUMBER BN WHICH THE E6F BCCURRED •
LE
BL
MNA
CCC~COC5
~eRTRAN
CALL
*•
•
is
STANDARD EVALUATBR
,705180
E 6 F SET
•
1E
16
17
ABS
[I\D
.
9
#705060
DE F S
ASS
• SDS SIGMA 5/7
::
9SETUPI
ABS
SET
•
42
SET UP 1 DUMMY
ADDRESS INTB INDEX
ABSBLUTE VALUE INTB ACC.
RETURN
REF S
z
C1 cecco
41
9SETUPI
X7
a.x7
.LC
a
•
..•
.•
35
2C
21
*
ASS
•
3'1
15
2
PAGE
E R S
;:
3
4t
It
4
5
5
5
6
6
8
9
14
15
AND
PAR A MET E R S
LINK. ERR6R (FeR 7ERRBR)
BUFFER LeCATION (FBR 7ERR6Rl
MINIMUM NUMBER BF ARGUMENTS
INDEX "
ERRBR SEVERITy (FBR 7ERRBRl
MAXIMUM NUMBER BF ARGUMENTS
INDEX 5
ENTRY NAME (F6R 7ERRBR)
LINK, RECEIVING
ENTRY LBCATION (F6R 7ERR6R)
GENERAL REGISTER D
GENERAL REGISTER 1
NUMBER BF ARGUMENTS
LINK. CALLING
2
ECU
ECU
4
8
ERRBR SEVERITy - MINBR
PRBTECTED BIT
RECEIVING SEQUENCE MNEMONICS
CNAME
XI 03'
CKAME
X'3F'
PRBC
GEN.l.7,It,3,17
PEND
INTEGER TYPE
EVERY TYPE
AFA(1).NAi'\E,CF(2),AF(21.AF(il
3
48
'IS
5C
51
52
53
54
55
5l::
57
58
55
6C
61
62
63
C1
C1
C1
C1
C1
cccce
CCCCl
CCCC2
CCCC3
cceClt
22SCCCC2
224ccoce
6A6CCCCC
3FCCCCCC
Clecccee
C1
Cl
C1
el
C1
C1
el
ct
CccC'S
CCC06
CCCC7
cccca
ccccs
CCCCA
ccccn
ceecc
<'2scecec A
229FFFFF A
2lEcceCl A
6/t
90
Appendix C
A
•
EBFSET
A
X
X
x
l::910eCCC
69cCCCCS
22SCCOCC A
355cccce x
328CCC1E
•
PAGE
LI.MXA
L I. MNA
BAL.LR
EVRY
II\TG.P
9SETUPM
6EOFJADR
6EflFUADR
L1.RO
o
ilRl
CI.NA
BL
BG
-1
1
lEI'
lE 1
L
lEl
*
Ll' R1
SHhR1
2
C
o
6EAFUTRG
8HFRE
MAX NUMBER BF ARGUMENTS
MIN NUMBER BF ARGUMENTS
SET UP ARGUMENTS:
END-BF-FILE JUMP ADDRESS - ANY TYPE
END-BF'FILE UNIT ADDRESS INTEGER AKD STaRED INTe
IN CASE NB MGS
IN CASE Twa ARGS
H8W MANY ARGS
N8NE. RESET T6 TERMINATE
TW8. SET UNIT TRIG TRUE
eNE, SET uNIT TRI~ FALSE
TELLS WHETHER 2ND ARG PRESENT
ASSUMING AT LEAST aNE ARG, SET UP
Te BRANCH HERE eN EBF.
65
66
67
C1 CCCCD
C1 cecCE
C1 ccccr:
358ccacc X
35F(,ccce x
EBececer: A
STW,RO
SH.. LC
lE2
B
TELLS WHERE Te G6 eN EBF
SAVE CALL ADDRESS IN CASE ERRBR
RETURN
8EOFEXIT
6EOFCALL
"LC
,.
/~,
PAGE
68
6$
"
"
7C
71
n
7'!:
74
75
7f::
7'7
n
7S
80
At
C1
Cl
C1
C1
Cl
C1
C1
Cl
CCCIC
ceCll
CCC12
CCCl3
CCCl4
CCCl!:
CCCl6
CCC17
32f1CCOCC
68300C14
328CCCCC
B52eeoce
B240coce
325CCCIF
45'1CCCIE
6838ccoe
X
"
HERE
X
x
x
lE3
A
"
CJ
el
(1
Cl
(1
eC018
eCC19
CCCIA
eecu:!
(CCIC
CCClD
326ceccc
2ceccc2c
223CC088
224000C4
6Accccce
6!'OCCCCC
C1
e1
01
C1
Ct
C1
C1
Ct
Cl
Cl
C1
C1
C1
COC1E
COCtF
CCC2e
coon
CCC22
CCC2:;
(CC2'1
CCCe5
CCC2t
CC027
tOC?S
CCC29
CCC2A
68CCCC1C
FFrEOOCO A
C5CbC6E2 A
C5E3'1040 A
23(6C9[:9 A
E2E34(;Cl A
8,+
C1
8:
8f::
88
85
9C
91
92
9~
94
DID LAST CALL HAVE 2!ND ARG
N6
YES, GET INTEGER VALUE BF UNIT
STBRE IN LBCATI6N SPECIFIED
PICK UP SUPPBSED STA NUMBER
MASK THE BP-CBDE P6RTIBN
IS IT A BRANCH
YES, G6 TB L6e ADDRESSED
N6, ERRIIR
8U~HTVAL
,,6EOFUAOR
*6EBFJADR
BPCBDMSK
BHERE
O.X4
D~C7'tCE6
x
FIRST ARGUMENT WASN'T A BRANCH
*
*
LIIIIEL
L1,E-N
LboL
LI,ES
BAL.LE
B
N
N
A
x
X
"BHERE
B
BPCBDMSK DATA
ENTRY
H"XT
MESSAGE
TF.XTC
6EBFCALL
ENTRY
BA(MESSAGE)
£1
7ERRBR
7EflFABRT
L6C FRBM WHICH EBFSET wAS CA\.I.ED
'E6FSET'
ByTE ADDRESS flF MESSAGE
ERRIIR SEVERITy. MIN6R
CALI. ERR6R ROuTINE
IGN6RE E6FSET AND ABBRT
HERE
X' FFFECO.CO'
'EBFSET'
BRANCH T8 HERE TB PROCESS EBF
ep .. ceDE MASK, INCLUDING R + X
NAME 6F R8UTINE
'FIRST ARG .,AS NBT STATEMENT NUMBER-'
A
CIE2'+0[:5 A
D6E340E2 A
E:;OE3C5 A
D'IC5[:SE3 A
IIO[:5E'IO'l A
C2C5C'lllB A
95
96
PAGE
<;7
.
9!!
"
"
9$
lCC
lCt
lC2
103
le'l
105
l·C(;
107
lC8
lCS
110
111
112
113
114
6EBFUTRG
1E3
*
8"
83
87
8E6FEx IT HAS BEEN SET UP TB RETURN C6NTR6L HERE 6N EBF
LW,RO
BEZ
LIoI,RO
5TI.;.I<0
LIoI,X4
Lw,x5
CS,x4
BE
.
.*
C1 ceeec
E x T E R NAL
REF
REF
REF
REF
REF
REF
REF
REF
REF
DEF
SET
IE
EII:D
•
6EflFCALL
6E8FJADR
6EBF'UAOR
6E8FUTRG
7EAFABRT
8EeFExIT
8UN!TVAL
7ERRBR
9SETUPM
E X T E R t. A L
l
R E F S
EBFSET
EBFSET
D
7EBFABRT
111705078
7ERR6R
9SETUPM
111705066
111705066
E F S
SET UP END-8F-FII.EEXIT
111705239
Appendix C
91
APPENDIX O. SOS SIGMA FORTRAN IV CHARACTER SETS
The standard character set for use with SDS Sigma FORTRAN IV is the EBCDIC (Extended Binary-Coded-Decimal
Interchange Code), This character set is illustrated in Table D-l. For compatibility purposes, the Monitor can be
instructed t to recognize, instead, the character set that WaS in common use prior to 1965. This character set was
used on the SDS 92/900 Series/9300 computers, and the same set, or subsets of it, were also used on all IBM computers prior to System 360. This character set is illustrated in Table D-2.
Table D-l. SDS EBCDIC
(Extended Binary-Coded-Decimal Interchange Code)
Character
A
B
C
D
E
F
G
H
I
J
K
L
M
N
0
P
Q
R
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
EBCDIC
Card Code
12-1
12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9
0-2
0-3
0-4
0-5
0-6
0-7
0-8
0-9
0
1
2
3
4
5
6
7
8
9
9-Track
Magnetic Tape
Hexadecimal Code
Cl
C2
C3
C4
C5
C6
C7
C8
C9
DI
D2
D3
D4
D5
D6
D7
D8
D9
E2
E3
E4
E5
E6
E7
E8
E9
FO
Fl
F2
F3
F4
F5
F6
F7
F8
F9
Character
Blank
¢' (a)
EBCDIC
Card Cade
9-Track
Magnetic Tape
Hexadecimal Code
Blank
12-2-8
12-3-8
12-4-8
12-5-8
12-6-8
12-7-8
12
40
4A
4B
4C
4D
4E
4F
50
....., (a)
11-2-8
11-3-8
11-4-8
11-5-8
11-6-8
11-7 -8
-
11
5A
5B
5C
5D
5E
5F
60
<
(
+
I
&
! (a)
$
*
)
i
/
,
%
_ (a)
>
? (a)
:
#
I
.. (a)
0-1
0-3-8
0-4-8
0-5-8
0-6-8
0-7-8
61
6B
6C
6D
6E
6F
2-8
3-8
4-8
5-8
6-8
7-8
7A
7B
7C
7D
7E
7F
(a) This character is not inc luded in the SDS Standard 56-graphic character set, used by some line printers.
Note that the SDS Sigma 5/7 internal hexadecimal representation (in memory) of every character is the same as the
magnetic tape representation. However, it is recommended that the FORTRAN programmer not take advantage
of these numeric representations.
t See Chapter 5 of this manual.
92
Appendix D
Table 0-2. Old Character Set
(SOS 92/900/9300 and IBM 1400 and 7000 Series)
Character
0
1
2
3
4
5
6
7
8
9
Space
= or #
'or@
:
>
.J
Blank
/
S
T
U
V
W
X
Y
Z
*
,
( or 0/0
'Y'
\
ill-
Old
Card Code
0
1
2
3
4
5
6
7
8
9
2-8
3-8
4-8
5-8
6-8
7-8
Blank
0-1
0-2
0-3
0-4
0-5
0-6
0-7
0-8
0-9
0-2-8
0-3-8
0-4-8
0-5-8
0-6-8
0-7-8
7-Track
Magnetic Tape
Octal Code
12
01
02
03
04
05
06
07
10
11
12 (a)
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
Character
J
K
L
M
N
0
P
Q
R
!
$
*
]
;
[:,
+ or &
A
B
C
0
E
F
G
H
I
?
) or I1
[
<
*
Old
Card Code
7-Track
Magnetic Tape
Octal Code
11
11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9
11-0 (b)
11-3-8
11-4-8
11-5-8
11-6-8
11-7-8
40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57
12
12-1
12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
12-0 (b)
12-3-8
12-4-8
12-5-8
12-6-8
12-7-8
60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77
(a) This character does not exist on 7-track magnetic tapes; when read, it is interpreted as a zero.
(b) The card punches 11-2-8 and 12-2-8 are equivalent to 11-0 and 12-0 respectively.
Appendix 0
93
~
Suite 620
State National Bank Bldg.
200 W. Court Square
Huntsville, Alabama 35$)1
(205) 539-513t
505 W. OlivEt A~e
Suite 300
Sunnyvale, Calif. 94086
(408) 736-9193
Woft,d Savings Bldg.
Suite 401
1111 So. ColoradO .Blvd.
Den¥e~~o.80222
(303) 756-3683
Download