GY28 6638 1_Fort G_Pgm Log Man 1 Fort G Pgm

GY28-6638-1_FortG_PgmLogMan GY28-6638-1_FortG_PgmLogMan

User Manual: GY28-6638-1_FortG_PgmLogMan

Open the PDF directly: View PDF PDF.
Page Count: 307

DownloadGY28-6638-1_Fort G_Pgm Log Man GY28-6638-1 Fort G Pgm
Open PDF In BrowserView PDF
File No. S360-25(OS)
Order No. GY28-6638-1

Program Logic

IBM System/3S0 Operating System
FORTRAN IV (G) Compiler
Program Logic Manual
Program Number 3S0S-FO-520

This publication describes the internal logic of the
FORTRAN IV (G) compiler.
Program Logic Manuals are intended for use by IBM
customer engineers involved in program maintenance, and
by systems programmers involved in altering the program
design. Program logic information is not necessary for
program operation and use: therefore, distribution of
this manual is limited to persons with program maintenance or modification responsibilities.
The FORTRAN IV (G) compiler is a processing program
of the IBM Systeml360 operating system. It translates
one or more source modules written in the FORTRAN
language into an object module that can be processed
into an executable load module by the linkage editor.

order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

This
publication
provides
customer
engineers and other technical personnel
with information describing the internal
organization and operation of the FORTRAN
IV (G) compiler.
It is part of an inte~
grated library of IBU System/360 operating
System Program Logic Manuals. Other publications required for an understanding of
the FORTRAN IV CG) compiler are:

Concepts and

Facilitie~,

supervisor and Data Management
Instructions, Form C28-6647
Linkage Editor,
Form Y28=6'610

Macro-

Proq.!:!!!L_y>gic_~!!!!!!!,

This
publication
sections:

IBM §yst~m~J~Q~2~~!~!ng-2Y~tem:

Form C28-6535

consists

of

two

Principles of operation, Form A22-6821

Introduction to Control Program Loqic,
Program Logic Manual, Form Y28-6605

Any reference to a Programmer's Guide
in this publication applies to FORTRAN
IY-l§_!n~Jil_Programmer's Guide,
Form
C28-6817. The fORTRAN IV (G) Programmer's Guide, Form C28-6639, (to which
references may exist in this publication) has been replaced by the combined G and H Programmer's Guide.
Although not required, the following
publications are rE~lated to this publication and should be consulted:
IBM System/360 Operation system:
§.~g~nt ia!_~££~!!_J1~ihod~L-f!:Qg!.!.m
M!~!!,

Form Y28-6604

Logic

section
1
is an introduction that
describes the FORTRAN IV (G) compiler as a
whole, including its relationship to the
operating" system. The major components of
the compiler and relationships among them
are also described in this section.
Section 2 consists of a discussion of
compiler operation. Each component of the
compiler is described in sufficient detail
to enable the reader to understand its
operation, and to provide a frame
of
reference for the comments and coding supplied in the program listing. Common data
such as tables, blocks, and work areas is
discussed only to the extent required to
understand the logic of each component.
Flowcharts are included at the end of this
section.
Following Section 2, are appendixes that
contain reference material.
If
more
detailed
information
is
required, the reader should see the comments, remarks, and coding in the FORTRAN
IV (G) program listing.

Second Edition (May 1968)
This i~ a major revision of', and makes obsolet.e, the previous edition,
Form Y28-6638-0, and Technical Newsletters Y2B-6384, Y28-6386, Y28-6388,
and Y28-6820.
Changes to the text, and small illustrations, are
indicated by a vertical line to the left of the change; changed or added
illustrations are denoted by the symbol • to t.he left of the caption.

I

The specifications containe·d in this publication, as amended by TNL
Y28-6829, dated July 23, 1969, correspond to Release 18 and as further
amended by TNL GY28-6841, dated January 15, 1911, correspond to Release
20 of the IBM Systeml360 Operating System.
changes are periodically made to the specifications herein; any such
changes will be reported in subsequent
revisions
or
Technical
Newsletters.
Requests for coples of IBM publications should be made to your IBM
representative or t.O the IBM branch office serving your locality.

Address comments concerning the contents of this publication to IBM
corporation,
Programming Publications, 1211 Avenue of the Americas, New
York, N. Y. 10020.
"

copyright International :Business Machines corporation 196B, 1910

Technical Newsletter

File Number

S360-25

Re: Order No.

GY28-6638-1

This Newsletter No.
Date

GY28-6826

November 15, 1968

Previous Newsletter Nos. None

IBM System/360 Operating System
FORTRAN IV (G) Compiler
Program Logic Manual
This Technical Newsletter, a part of Release 17 of the IBM
System/360 Operating System, provides replacement pages for IBM
S stem/360 0 eratin System: FORTRAN IV (G) Compiler programLOt~C Manua , Form Y
T ese rep acement pages rema~n in
ef ect for subsequent releases unless specifically altered. Pages
to be replaced and/or added are listed below.
Pages
Cover, preface
19-20
27-32
35-38.1
39-40
45-46
'53-54
67-68 (67.1 added)
69-70.1
71-72
77-78

145-146.1
153-154.1
157-158
177-178
185-186
191-192
221-224.1
225-226 (225.1 added)
229-230.1
253-254

Changes to the text, and small changes to illustrations, are
indicated by a vertical line to the left of the change; changed or
added illustrations are denoted by the symbol • to the left of the
caption.
Summary of Amendments
New information about innermost DO loops with a possible extended
range has been added. The information includes descriptions of
two new routines, XTEND LABEL and EXTND TARGET LABEL, and changes
to existing routines and flowcharts involved in phase 1 processing.
There is also additional information about theONAMELIST table
entries and the GET POLISH routine, and a description of the
improvements made by the FORTRAN object.-time library in the pro.cessing of BACKSPACE statements.
File this cover letter at the back of 1:he publication to provide
a record of changes.

IBM Corporation, Programming Publications, 1271 Avenue of the Americas, New York, N.Y. 10020
PRINTED IN U. S. A.

Technical Newsletter

File Number
Re: Order No.
This Newsletter No.
Date
Previous Newsletter Nos.

IBM System/360 Operating System
FORTRAN IV (G) Compiler
Program Logic Manual
This Technical Newsletter, a part of Release 18 of the IBM
System/~60 Operating System, provides replacement pages for
IBM System/360 Operating System: FORTRAN IV (G) Compiler
ProgramLo~ic Manual, Form Y28-6638-1.
These replacement
pages rema1n in effect for subsequent releases unless specifically altered. Pages to be replaced and/or added are listed
below.
Pages
Cover, preface
7,8
13,14
17,18
35-36.1
43-44.1
45,46

49-52
55-58
75-76
113-114
167-1.70
175-176.1
209,210
255-257

Changes to the text, and small changes to illustrations, are
indicated by a vertical line to the left of the change; changed
or added illustrations are denoted by the symbol • to the left
of the caption.
Summary of Amendments
A description of the compiler statistics messages and the
phases and subroutines which generate them is added. Illustrations of the formats of the messages are included.
File this cover letter at the back of the publication to
provide a record of changes.

IBM Corporation, Programming Publications, 1271 Avenue of the Americas, New York, N.Y. 10020
PRINTED IN U. S. A.

8360-25
GY28-6638-1
GY28·6829
July 23, 1969
GY28-6826
GY28-6847

Technical Newsletter

File No.

S360-25(OS)

Re: Order No.

GY2 8-6 638-1

This Newsletter No.
Date:

GY 28 - 6847

January 15, 1971

Previous Newsletter Nos.

GY28-6826
GY28-6829

IBM System/360 Operating System
FORTRAN IV (G) Compiler
Program Logic Manual
e International Business Machines Corporation
replacement pages for the publication
S stem: FORTRAN IV (G) Com iler
er No. GY28-6638- •
The specifications contained in this publication correspond to
Release 20 of the IBM System/360 Operating System. Pages to be
replaced are listed below:
Page(s)
Cover-2

Summary of Amendment(s)
Release notice updated

7,8

List of

211-258

"Appendix F: Object-Time Library
Subprograms" has been replaced in
its entirety; new information has
been added, obsolete information
deleted, and existing information
expanded and clarified (replacement"
pages are 211-258.10)

263-272

Index updated

illustration~

updated

Changes to the text and small changes to illustrations are
indicated by a vertical line to the left of the change;
changed or added illustrations are denoted by the symbol •
to the left of the caption. File this cover letter at the
back of the publication to provide a record of changes.

IBM Corporlll;"', Progra';'ming Publicalions, 1271 Av,nu, of Ih, Am'Nclls, New York, N.Y. 10020
PIIINTED IN U. S. A.

CONTENTS

SECTION 1: INTRODUCTION TO THE COMPILER
Purpose of the Compiler
Machine Configuration
Compiler and System/360 Operating
System • • • • • • • • • • •
Compiler Design • • • • • •
Limitations of the Compiler
Compiler Implementation '. • • • • • • •
POP Language • • • • • • •
• •
Compiler Organization
• •
Control Phase: Invocation (IEYFORT)
Phase 1: Parse (IEYPAR)
•••
Phase 2: Allocate (IEYALL)
Phase 3: Unify (IEYUNF)
••
Phase 4: Gen (IEYGEN)
Phase 5: Exit (IEYEXT) •
•
Roll (IEYROL)
•••••
• •
Compiler Storage Configuration
••
Compiler Output • • • • • •
Object Module • • • • • • • •
•
Components of the Object Module
object Module General Register
Usage • • • • • • •
Source Module Listing
object Module Listing
Storage Maps • • • • • • • • •
• •
Error Messages • • • •
Common Error Messages • • • • •
Compiler Data Structures • • • • • • • •
Rolls ~nd Roll Controls
ROLL ADR Table • • • • •
BASE, BOTTOM, and TOP Tables • •
Special Rolls • • • •
• •
Central Items, Groups, and Group
Stats • • • • •
Other Variables
Answer Box • ..
• •
Multiple Precision Arithmetic
Scan Control
Flags • • • • •
Quotes • • •
•
Messages • •
• • • •
Compiler Arrangement and General
Register Usage • •
•
Pointers • • • • • • •
Drivers • • • • • • •
Operation Drivers
Control Drivers
• • • •

9
9
9

9
9
9
10
10
10
12
12
12
12
12
13
13
15
15
17
17
20
20
20
21
21
21
21
21
22
23
24
24
26
26
26
26
27
27
27
28
29
30
30
31

SECTION 2: COMPILER OPERATION
33
Invocation Phase (IEYFORT) •
33
IEYFORT, Chart 00
33
IEYPRNT, Chart 00A4
• • • •
33
PRNTHEAD, Chart 01A2 •
• • • • 34
IEYREAD, Chart 01A4
• 34
34
IEYPCH, Chart 02A3 •
PRNTMSG, Chart 03A1
34
IEYMOR, Chart 01D1 •
34
IEYNOCR
34
IEYRETN, Chart 03A2
35
OPTSCAN, Chart AA
• • 35
35
DDNAMES, Chart AB

HEADOPT, Chart AC
• • • •
•
TIMEDAT, Chart AD
• • • •
Output from IEYFORT • • • •
•
Phase 1 of the Compiler: Parse (IEYPAR)
Flow of Phase 1, Chart 04 • • • •
PRINT and READ SOURCE, Chart BA
STA INIT, Chart BB • •
LBL FIELD XLATE, Chart BC
•
STA XLATE, Chart BD
STA FINAL, Chart BE
•
ACTIVE END STA XLATE, Chart BF •
PROCESS POLISH, Chart BG •
Output from Phase 1 •• • • • • • • • •
Polish Notation
•
Source Listing • • •
• • • •
Phase 2 of the Compiler: Allocate
(IEYALL) • • • • • • • • • • • • •
•
Flow of Phase 2, Chart 05 • • • •
ALPHA LBL AND L SPROGS, Chart CA • •
ALPHA SCALAR ARRAY AND SPROG,
Chart CA •
• • • •
•
PREP EQUIV AND PRINT ERRORS, Chart
CB • • • •
•
BLOCK DATA PROG ALLOCATION, Chart
CC • • •
• • • •
•
PREP DMY DIM AND PRINT ERRORS,
Chart CD • • • • • • • • • • •
•
PROCESS DO LOOPS, Chart CE • •
•
PROCESS LBL AND LOCAL SPROGS,
Chart CF • • • • • • • • • • •
•
BUILD PROGRAM ESD, Chart CG
•
ENTRY,NAME ALLOCATION, Chart CH • •
COMMON ALLOCATION AND OUTPUT,
Chart CI • • • •
• • • •
•
EQUIV ALLOCATION PRINT ERRORS,
Chart CK • • • • • • • • • •
•
BASE AND BRANCH TABLE ALLOC, Chart
CL • • • • • • • • • • • •
•
SCALAR ALLOCATE, Chart CM
•
ARRAY ALLOCATE, Chart CN •
•
PASS 1 GLOBAL SPROG ALLOCATE,
Chart CO • • • • • • • • • • •
•
SPROG ARG ALLOCATION, Chart CP • • •
PREP NAMELIST, Chart CQ
•
LITERAL CONST ALLOCATION, Chart CR •
FORMAT ALLOCATION, Chart CS
•
EQUIV MAP, Chart CT • • • • • • • •
GLOBAL SPROG ALLOCATE, Chart CU • •
BUILD NAMELIST TABLE, Chart CV • • •
BUILD ADDITIONAL BASES, Chart cw • .
DEBUG ALLOCATE, Chart CX •
• •
Output From Phase 2 • • • • • • • • •
Error Messages Produced by Allocate
Unclosed DO Loops
• • • • • •
Storage Maps Produced by Allocate •
Subprogram List • • • • • • • • • •
Cards Produced by Allocate • • • • •
Phase 3 of the Compiler: Unify (IEYUNF)
Flow of Phase 3, Chart 07 • • • • • •
ARRAY REF ROLL ALLOTMENT, Chart DA •
CONVERT TO ADR CONST, Chart DB • • •
CONVERT TO INST FORMAT, Chart DC • •

35
35
35
36
37
37
38
38
38
39
39
39
39
39
42
44
45
45
45
45
46
46
46
46
46
46
47
47
47
47
47
48
48
48
48
48
48
48
48
49
49
49
49
49
50
51
51
51
52
52
52
52

DO NEST UNIFY, Chart DD
IEYROL MorjlJle
• • • • •
Phase 4 of the Compiler: Gen
(IEYGEN) • • • • • • • •
• • • •
Flow of Phase 4, Chart 08
ENTRY CODE GEN, Chart EA • •
PROLOGUE GEN, Chart EB •
EPILOGUE GEN, Chart EC •
• • • •
GET POLISH, Chart ED • •
• • • •
LBL PROCESS, Chart EF
STA GEN, Chart EG
STA GEN FINISH, Chart EH • •
Phase 5 of the Compiler: Exit (IEYEXTl •
Flow of Phase 5, Chart 09 • • • •
PUNCH TEMP AND CONST ROLL, Chart FA
PUNCH ADR CONST ROLL, Chart FB • • •
PUNCH CODE ROLL, Chart FC
PUNCH BASE ROLL, Chart FD
PUNCH BRANCH ROLL, Chart FE
PUNCH SPROG ARG ROLL, Chart FF •
PUNCH GLOBAL SPROG ROLL, Chart FG •
PUNCH USED LIBRARY ROLL, Chart FH •
PUNCH ADCON ROLL, Chart FI • •
ORDER AND PUNCH RLD ROLL, Chart FJ •
PUNCH END CARD, Chart FK
PUNCH NAMELIST MPY DATA, Chart FL •
output From Phase 5

53
53
53
53
54
54
54
54
54
54
55
55
55
55
56
56
56
56
56
57
57
57
57
57
57
57

•• 127
APPENDIX A: THE POP LANGUAGE
POP Instructions. • • • • •
• .127
Transmissive Instructions
• • 127
Arithmetic and Logical Instructions .130
Decision Making Instructions.
• .131
Jump Instructions • • • • • •
• .133
Roll Control Instructions • • • • • • 133
Code Producing Instructions
•• 134
Address Computation Instructions • • • 134
Indirect Addressing Instruction • • • 135
Labels. • • • •
• • • • • • 135
Global Labels • • • • •
• .135
Local Labels. • • • •
• .136
Assembly and Operation.
• .136
POP Interpreter
.136
Assembler Language References to POP
Subroutines • • • • • • •
• • • • 137
Global Jump Instructions • • • • • • • 137
Local Jump Instructions • • • • • • • 138
APPENDIX
RollO:
Roll 1:
Roll 2:
Roll 2:
Roll 3:
Roll 4:
Roll 4:
RollS:
Roll 7:
Roll 8:
Roll 9:
Roll 10:
~oll 11:
Roll 12:
Roll 13:
Roll 13:
Roll 14:
Roll 15:
Roll 15:

B: ROLLS USED IN THE COMPILER .140
LIB Roll
• • 140
SOURCE Roll.
• .140
IND VAR Roll • • • •
• .141
NONSTD SCRIPT Roll
• • 141
NEST SCRIPT Roll
• • 141
POLISH Roll. • • •
• .141
LOOP SCRIPT Roll • • • • • • • 142
LITERAL CONST Roll
• • 142
GLOBAL SPROG Roll.
• .142
FX CONST Roll.
• .143
FL CONST Roll
• • 143
DP CONST Roll
•• 143
COMPLEX CONST Roll
• • 143
DP COMPLEX CONST Roll • • • • • 143
TEMP NAME Roll
• • • • 143
STD SCRIPT Roll. •
• .144
TEMP Roll. • • • •
• .144
DO LOOPS OPEN Roll
• • 144
LOOPS OPEN Roll. •
• .144

Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll
Roll

1&:
16:
17:
17:
18:
18:
19:
20:
20:
21:
22:
23:
23:
24:
25:
26:
26:
27:
28:
29 :
30:
30:
31:
32:
33:
34:
35:
36:
36:
37:
37:
38:
39:
39 :
40:
40 :
41:
42:
42:
43:
44:
44:
45:
46:
47:
47:
48:
48:
49:
50:
51:
52:
52:
53:
54:
55:
56:
56:
57:
58:
59:
60:
60:
62:
62:

ERROR MESSAGE Roll
TEMP AND CONST Roll.
ERROR CHAR Roll. • • •
ADCON Roll
• • •
INIT Roll. • • •
•
DATA SAVE Roll • • • •
EQUIVALENCE TEMP (EQUIV

.144
.144
•
.145
•
.145
• • • • 145
•
.145
TEMP)
.145
EQUIVALENCE HOLD (EQUIV HOLD)
.145
.146
REG Roll • • • •
.146
BASE TABLE Roll • • • • •
.146
ARRAY Roll
• • • • •
.147
DMY DIMENSION Roll
.147
SPROG ARG Roll • • • • •
.147
ENTRY NAMES Roll • • • •
.148
GLOBAL DMY Roll • • • • •
ERROR Roll
• • • • • • • 148
.148
ERROR LBL Roll
.148
LOCAL DMY Ro11 • • • • •
.149
LOCAL SPROG Roll • • • •
EXPLICIT Roll • • • • • • • • • 149
.149
CALL LBL Roll • • •
.149
ERROR SYMBOL Roll • •
.149
NAMELIST NAMES Roll •
.150
NAMELIST ITEMS Roll •
.150
ARRAY DIMENSION Roll
.150
BRANCH TABLE Roll • •
.150
TEMP DATA NAME Roll •
.151
TEMP POLISH Roll
.151
FX AC Roll • • • •
.151
EQUIVALENCE Roll • • • •
.151
BYTE SCALAR Roll • • • •
.152
USED LIB FUNCTION Roll
.152
COMMON DATA Roll
.152
HALF WORD SCALAR Roll
.152
COMMON NAME Roll • • • •
.153
TEMP PNTR Roll
.153
IMPLICIT Roll • • • •
.153
EQUIVALENCE OFFSET Roll •
.153
FL AC Roll
• • • • •
.153
LBL Roll • • • • • • • •
.154
SCALAR Roll
• • • •
.154
HEX CONST Roll • • • • •
.154
DATA VAR Roll •
LITERAL TEMP (TEMP LITERAL)
• • • • • 155
.155
COMMON DATA TEMP Roll • •
.155
FULL WORD SCALAR Roll
.155
COMMON AREA Roll • • • •
.155
NAMELIST ALLOCATION Roll
.156
COMMON NAME TEMP Roll • •
.156
EQUIV ALLOCATION Roll • •
RLD Roll • • • • • • • • • • • 156
.156
COMMON ALLOCATION Roll
.156
LOOP CONTROL Roll •
FORMAT Roll • • •
• • • 157
.157
SCRIPT Roll • • •
.157
LOOP DATA Roll
PROGRAM SCRIPT Roll •
.158
.158
ARRAY PLEX Roll • •
.159
ARRAY REF Roll
ADR CONST Roll • • • • • • • • 159
.159
AT Roll • • • • • • • • •
.160
SUBCHK Roll • • •
NAMELIST MPY DATA Roll
.160
.160
GENERAL ALLOCATION Roll •
CODE Roll • • • • • _ • •
.160

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Roll 60: NAMELIST MPY DATA Roll
•
Roll 62: GENERAL ALLOCATION Roll • • •
Roll 62: CODE Roll • • • •
Roll 63: AFTER POLISH Roll • • • • • •
Work and Exit Rolls • • •
WORK Roll
•
EXIT Roll

.160
.160
.160
• 161
.161
.161
.161

APPENDIX C: POLISH NOTATION FORMATS • • 163
General Form. • • • •
• .163
Labeled Statements. •
• .163
Array References • • • • •
• • • 163
ENTRY Statement
.164
ASSIGN Statement.
• • • 164
Assigned GO TO Statement • • • • • • • • 164
Logical IF Statement.
• • • • • • • 164
RETURN Statement. • •
• .164
Arithmetic and Logical Assignment
Statement • • • • • • • • • • • • • • • 164
Unconditional GO TO Statement
.165
computed GO TO Statement • • • • • • • • 165
Arithmetic IF Statement
• • • 165
DO Statement. • • • • • •
.165
CONTINUE Statement. • • •
• .166
PAUSE and STOP Statements
• • 166
END Statement • • • • • • • • • •
.166
BLOCK DATA Statement. • • • •
• .166
DATA Statement and DATA in Explicit
Specification Statements • • • • • • • .166
I/O List • • • •
.167
Input Statements
• • • 167
FORMATTED READ •
• .167
NAMELIST READ
.168
UNFORMATTED READ •
• • • • • 168
READ Standard Unit •
.168
Output Statements
.168
FORMATTED WRITE
• .168
NAMELIST WRITE. , • •
.169
UNFORMATTED WRITE
• .169
PRINT • • • • • • •
.169
PUNCH • • • • • • •
.169
Direct Access Statements • • • • • • • • 169
READ, Direct Access
• .169
WRITE, Direct Access • • • • • • • • • 170
FIND • • • • • • • • • •
.170
DEFINE FILE
.170
END FILE Statement •
• .170
REWIND Statement • •
.171
BACKSPACE Statement
• • • • • • .171
Statement Function •
• • • • • 171
FUNCTION Statement •
• • • • • • • 171
Function (Statement or Subprogram)
Reference • • • • • •
• .171
Subroutine Statement •
• .171
.172
CALL Statement • • • •
.172
Debug Facility Statements
AT • • • •
• .172
TRACE ON •
• .172
TRACE OFF • • • • •
• .172
DISPLAY • • • •
• .173
APPENDIX D: OBJECT CODE PRODUCED BY
THE COMPILER.
• • • • • • • •
.175
Branches. • •
••• •
• • • • 175
Computed GO TO Statement.
• .175
DO Statement. • • • • • •
• • • 175
Statement Functions
• • 176
Subroutine and Function Subprograms • • 176

Input/Output Operations • • • • • • • • 177
Formatted Read and Write Statements .177
Second List Item, Formatted • • • • • 177
Second List Array, Formatted • • • • • 178
Final List Entry, Formatted • • • • • 178
Unformatted Read and Write Statements 178
Second List Item, Unformatted • • • • 178
Second List Array, Unformatted • • • • 178
Final List Entry, Unformatted • • • • 178
Backspace, Rewind, and Write Tapemark 178
STOP and PAUSE Statements
• • 179
NAMELIST READ and WRITE • • • • • • • 179
DEFINE FILE Statement
• • 179
FIND Statement. •
• .179
Direct Access READ and WRITE
Statements • • • •
• .179
FORMAT Statements
• .180
FORMAT Beginning and Ending
Parentheses
.180
Slashes • • • •
• .180
Internal Parentheses
• .180
Repetition of Individual FORMAT
specifications • • • • • • • • • • • 180
I,F,E, and D FORMAT Codes
• • 180
A FORMAT Code
• • • • • • 180
Literal Data. • • • • • •
• .180
X FORMAT Code
• • • 181
T FORMAT Code • • • • • • • • • • .181
Scale Factor-P • • • • • • • • • • • 181
G FORMAT Code • • • • •
.181
L FORMAT code • • • •
• .181
Z FORMAT Code
• • • •
• .181
Debug Facility. • •
• • • • • • • 181
DEBUG Statement • • • • • • •
• .181
Beginning of Input/Output
.181
End of Input/Output
• • • • • • 181
UNIT Option
• • • • • • • 181
TRACE Option. • •
• .182
SUBTRACE Option
• • • • • • • 182
INIT Option
• • • •
• .182
SUBCHK Option
• • 183
AT Statement. • • •
• • • • • • 183
TRACE ON Statement.
.183
TRACE OFF Statement
• • 183
DISPLAY Statement
• • 183

r.

.

APPENDIX E: MISCELLANEOUS REFERENCE
DATA • • • • • • • • • • • • •
• .185
Parse Label List. • • • • • • •
• .185
Supplementary Parse Label List.
• .185
Allocate Label List • • • • • • • • • • 193
Supplementary Allocate Label List • • • 193
Unify Label List • • • • • e • •
•
.196
Supplementary Unify Label List.
• .196
Gen Label List. • • • • • • •
• .198
Supplementary Gen Label List. •
• .198
Exit Label List • • • •
• • • • • 208
Supplementary Exit Label List
• • 208
APPENDIX F: OBJECT-TIME LIBRARY
SUBPROGRAMS
• • • •
•
Library Functions • • • • •
•
Composition of the Library •
•
System Generation Options
•
Module summaries • • • • •
•
Library Interrelationships
•
Initialization • • • • •
• • • • •
Input/Output operations
• • • • •

.212
.212
.212
.212
.213
.214
.215
.216

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Define File • ~ • • • • • • • • • • • 218
Sequential Read/Write Without Format .218
Initial Call • • • • • • • • • • • • 218
Second Call • • • •
• • • 219
Additional List Item Calls
.219
Final Call. • • • •
.219
System Block Modification and
Reference • • • • • • •
.219
Error Conditions. • • • • • •
.220
Sequential READ/WRITE With Format • • 221
Processing the Format Specification 221
Direct Access READ/WRITE Without
Format • • • • • • • • • • • • • • • • 224
initialization Branch • • • • • • • 224
Successive Entries for List Items .225
Final Branch • • • • • • • • • • • • 225
Error Conditions • • • • • • • • • • 226
Direct Access READ/WRITE With Format .226
FIND. •
• .226
READ And WRITE Using NAMELIST
.226
Read. • • • • •
• • • •
.226
Write • • • • • • • • • • • •
.227
Error Conditions. • • • • •
• .227
Stop and Pause (Write-to-Operator) • • 227
stop. •
• • • •
.227
Pause • • • • •
• • • • • • • 227
Backspace • • • •
• • • 227
Rewind. • •
• • • • • • • 228
End-File.
• • • •
.228
Error Handling
.228

Compiler-Directed Errors: IHCIBERH •• 228
Program Interrupts • • ~ •
• .229
Action for Interrupts 9, 11, 12,
13, and 15 • • • • • .. •
• .229
Action for Interrupt 6 •
• .229
Library-Detected Errors
•• 230
Without Extended Error Handling • • 230
With Extended Error Handling • ' • • • 231
Abnormal Termination Processing
.231
Codes 4 and 12 • • • ~ • • • • • • • 231
Codes 0 and 8 • • • ~ • • • •
.231
Extended Error Handling Facility • • • 232
Option Table--IHCUOPT • • • • • • • 232
Altering the Option Table--IHCFOPT .232
Error Monitor--IHCERRM • •
• .233
Extended Error Handling
Trackback--IHCETRCH
• • 233
Conversion. • • • • • •
• • • • • • 234
Mathematical and Service Routines • • • 234
Mathematical Routines . . . . . . . . . 234
Service Subroutines • ~ • • •
• .234
IHCFDVCH (Entry Name DVCHK)
• • 234
IHCFOVER (Entry Name OVERFL) • • • • 235
IHCFSLIT (Entry Names SLITE,
SLITET) • • • • • • • • •
• .235
IHCFEXIT (Entry Name EXIT)
• .235
IHCFDUMP (Entry Names DUMP and
PDUMP) •
• .235
I HCDaUG
• .236
Termination
• .239
GLOSSARY •
INDEX

. ....

• • 259
.263

Order No. GY28-6638-1. page revised 1/15/11 by TNL GY28-6847
ILLUSTRATIONS
FIGURES

Figure 1. Overall Operation of
the Compiler • • • • • • • • • • • •
Figure 2. Compiler Organization
Chart • • • • • • •
Figure 3. Compiler storage
Configuration
• • • • •
•
Figure 4. Compiler output
Figure 5. Object Module
Configuration • • • •
Figure 6. Example of Use of Save
Area
••••••••••
Figure 1. Roll Containing K
Bytes of Information
••••
Figure 8. Roll Containing L
Bytes of Reserved Information and
K Bytes of New Information
••••
Figure 9. Roll With a Group Size
of Twelve • • • • • • • • • • • • •
Figure 10. Roll with Variable
Group Size
••••••••••
Figure 11. First Group Stats
Table
•
Figure 12. Second Group Stats
Table
•••
•
Figure 13. Scan Control Variables
0

•

•

•

•

11
14
15
16
11
18
23
24
25
25
26
26
27

Figure 14. Quotes Used in the
Compiler.
27
Figure 15. Compiler Arrangement
with Registers
28
Figure 16. Calling Paths for
Library Routines
215
Figure 17. Control Flow for
Input/output Operations
•
217
Figure 18. IHCUATBL: The Data
Set Assignment • .
•
239
Figure 19. DSRN Default Value
Field of IHCUATBL Entry
240
Figure 20. Format of a Unit Block
for a Sequential Access Data Set • 240
Figure 21. Format of a Unit Block
for a Direct Access Data Set
242
Figure 22. General Form of the
Option Table (IHCUOPT)
.
242.1
Figure 23. Preface of the Option
Table (IHCUOPT).
•
• . • 242.2
Figure 24. Composition of an
Option Table Entry
•.
242.2
Figure 25. Original Values of
Option Table Entries
• 242.3

TABLES

Table 1. Internal configuration
of Operation Drivers • • • • • • • • 31
Table 2. Internal configuration
of" control Drivers (Part 1 of 2).
32
~dble
3. Rolls Used by Parse • • • 36
fable 4. Rolls Used by Allocate
44
T~ble
5. Rolls Used by Unify
52
Table 6. Rolls Used by Gen •
53
Table 7. Rolls Used by Exit
55
Table 8. POP Instruction
Cross-Reference List • • • • • • • • 139

Table 9. Routines Affected by
Extended Error Handling Option
212
Table 10. Format Code Translations
and Their Meanings • • . • • ••
222
Table 11. IHCFCVTH Subroutine
Directory
.•...•
••
. 234
Table 12. IHCDBUG Transfer Table. 236
Table 13. DCB Default Values
• 240
Table 14. IHCFCOMH/IHCECOMH
Transfer and Subroutine Table
• 242.3

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

CHARTS

Chart 00.
IEYFORT (Part 1 of 4)
Chart 01. IEYFORT (Part 2 of 4)
Chart 02. IEYFORT (Part 3 of 4)
Chart 03. IEYFORT (Part 4 of 4)
Chart AA. OPTSCAN
••• • • • •
Chart AB. DDNAMES.........
Chart AC. HE:ADOPT.......
Chart AD. TIMEDAT..
• •
Chart 04.1. PHASE 1 - PARSE (Part
1 of 2)
•••••
• • • •
Chart 04.2. PHASE 1 - PARSE (Part
2 of 2)
•••••
• • • • • • •
Chart BA. WRITE LISTING AND READ
SOURCE • • • • • • • • • • •
Chart BB. INITIALIZE FOR
PROCESSING STATEMENT • • • •
Chart BC1. PROCESS LABEL FIELD
(Part 1 of 2) • • • • • • • • • • •
Chart BC2. PROCESS LABEL FIELD
(Part 2 of 2) • • • • • • • • •
Chart BD. PROCESS STATEMENT • • • •
Chart BE. COMPLETE STATEMENT AND
MOVE POLISH
• • • • • • • • •
Chart BF. PROCESS END STATEMENT • •
Chart BG. PROCESS POLISH
• •
Chart 05. PHASE 2 - ALLOCATE
(Part 1 of 2)
• • • • • •
•
chart 06. PHASE 2 - ALLOCATE
(Part 2 of 2)
• • • • • •
•
Chart CA. MOVE BLD NAMES TO DATA
VAR ROLL • • • • • • • • • • •
•
Chart CB. PREPARE EQUIVALENCE DATA
chart CC. ALLOCATE BLOC~ DATA • • •
Chart CD. PREPROCESS DUMMY
DIMENSIONS • • • • • • • • • •
Chart CEo CHECK FOR UNCLOSED DO
LOOPS
• • • • • • • • • • •
Chart CF. CONSTRUCT BRANCH TABLE
ROLL • • • • • • • • • • • • • •
Chart CG. ALLOCATE HEADING AND
PUNCH ESD CARDS • • • • • • •
Chart CH. CHECK ASSIGNMENT OF
FUNCTION VALUE • • • • • • • • •
chart CI. COMMON ALLOCATION • • • •
Chart CK. EQUIVALENCE DATA
ALLOCATION • • • • • • • • • • •
chart CL. SAVE AREA, BASE AND
BRANCH TABLE ALLOCATION
chart CM. ALLOCATE SCALARS
Chart CN. ALLOCATE ARRAYS •
Chart CO. ADD BASES FOR
SUBPROGRAM ADDRESSES • • • •
chart CPo ALLOCATE SUBPROGRAM
ARGUMENT LI STS • • ., • • • • •
•
Chart CQ. PREPARE NAMELIST TABLES •
chart CR. ALLOCATE LITERAL
CONSTANTS • .. • • .. • • • • • •
•
Chart CS. ALLOCATE FORMATS
Chart CT. MAP EQUIVALENCE • • •
Chart CU. ALLOCATE SUBPROGRAM
ADDRESSES ... • • " • • • • •

59
60
61
62
63
64
65
66
67
68
68
69
10
10
71
12
13
74
15
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

Chart CV. BUILD AND PUNCH
NAMELIST TABLES • • • • •
• • 97
Chart CWo BUILD BASES • • •
• • 98
Chart CX. DEBUG ALLOCATE
• • 99
Chart 07. PHASE 3 - UNIFY.
• .100
Chart DA. BUILD ARRAY REF ROLL •• 101
Chart DB. MAKE ADDRESS CONSTANTS .102
Chart DC. CONSTRUCT INSTRUCTIONS .103
Chart DD. PROCESS NESTED LOOPS
.104
Chart 08. PHASE 4 - GEN • • • • • • 105
Chart EA. GENERATE ENTRY CODE • • • 106
Chart EB. PROLOGUE CODE GENERATION 107
Chart EC. EPILOGUE CODE GENERATION 108
Chart ED. MOVE POLISH NOTATION •• 109
Chart EF. PROCESS LABELS
•• 110
Chart EG. GENERATE STMT CODE • • • 111
Chart EH. COMPLETE OBJECT CODE •• 112
Chart 09. PHASE 5 - IEYEXT
•• 113
Chart FA. PUNCH CONSTANTS AND
TEMP STORAGE • • • • • • • • • • • • 114
Chart FB. PUNCH ADR CONST ROLL •• 115
Chart FC. PUNCH OBJECT CODE • • • • 116
Chart FD. PUNCH BASE TABLE
•• 117
Chart FE. PUNCH BRANCH TABLE • • • 118
Chart FF. PUNCH SUBPROGRAM
ARGUMENT LISTS • • • • • • • • • • • 119
Chart FG. PUNCH SUBPROGRAM
ADDRESSES
• • • • • • • • • • 120
Chart FH. COMPLETE ADDRESSES FROM
LIBRARY • • • • • • • • • • • • • • 121
Chart Fl. PUNCH ADDRESS CONSTANTS .122
Chart FJ. PUNCH RLD CARDS • • • • • 123
Chart FR. PUNCH END CARDS • • • • • 124
Chart FL. PUNCH NAMELIST TABLE
POINTERS.
• • • • • • • • • • 125
Chart GO. IHCFCOMH/IHCECOMH
(Part 1 of 4) • • • • • • • • • • • 243
Chart GO. IHCFCOMH/IHCECOMH
(Part 2 of 4) • • • • • • • • • • 243.1
Chart GO. IHCFCOMH/IHCECOMH
(Part 3 of 4) • • • • • • • • • • 243.2
Chart GO. IHCFCOMH/IHCECOMH
(Part 4 of 4) • • • • • • • • • • 243.3
Chart G1. IHCFIOSH/IHCEFIOS
(Part 1 of 2) • • • • • • • • • • • 244
Chart G1. IHCFIOSH/IHCEFIOS
(Part 2 of 2) • • • • • • • • • • 244.1
Chart G2. IHCDIOSE/IHCEDIOS
(Part 1 of 5) . . . . . . . . . . . . 245
Chart G2. IHCDIOSE/IHCEDIOS
(Part 2 of 5) • • • • • • • • • • 245.1
Chart G2. IHCDIOSE/IHCEDIOS
(Part 3 of 5) • • • • • • • • • • 245.2
Chart G2. IHCDIOSE/IHCEDIOS
(Part 4 of 5) • • • • • • • • • • 245.3
Chart G2. IHCDIOSE/IHCEDIOS
(Part 5 of 5) • • • • • • • • •
.246
Chart G3. IHCNAMEL • • • • • • • • 247
Chart G4. IHCFINTH/IHCEFNTH
(Part 1 of 3) • • • • • • • •
.248
Chart G4. IHCFINTH/IHCEFNTH
(Part 2 of 3) • • • • • • • • • • 248.1
D

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

....····.
·· ·· ·· ··

Chart G4.
IHCFINTH/IHCEFNTH
(Part 3 of 3)
Chart G5.
IHCADJST •
Chart G6.
IHCIBERH •
Chart G7.
IHCSTAE (Part 1 of
Chart G7.
IHCSTAE (Part 2 of
Chart G8.
IHCERRM (Part 1 of
Chart G8.
IHCERRM (Part 2 of
IHCFOPT (Part 1 of
Chart G9.
Chart G9.
IHCFOPT (Part 2 of

• 248.2
• 249
• 250
2)
• 251
2)
• 252
2)
• 253
2)
.254
3)
.255
3)
.256

Chart
Chart
Chart
Chart
Chart
Chart
Chart
Chart
Chart
Chart
Chart

G9.
G10.
Gll.
G12.
G13.
G14.
G15 •
G16.
G16.
G16.
G16.

· •• 257
258
·• 258.1
·
.
.
· · · . . · • 258.2

IHCFOPT (Part 3 of
IHCTRCH/IHCERTCH
IHCFDUMP •
IHCFEXIT
IHCFSLIT •
IHCFOVER •
IHCFDVCH •
IHCDBUG (Part 1 of
IHCDBUG (Part 2 of
IHCDBUG (Part 3 of
IHCDBUG (Part 4 of

· ··· ···
·· · ·

3)

·
·
4) ·
4)
4)

4)

• 258.3
• 258.4
• 258.5
• 258.6
.258.7
• 258.8
• 258.9

This section contains general information describing the purpose of the FORTRAN
IV (G) compiler, the minimum machine configuration required, the relationship of the
compiler to the operating system, compiler
design and implementation, and compiler
output.
The various rolls, 1 variables,
registers, pointers, and drivers used by
the compiler are also discussed.

PURPOSE OF THE COMPILER
The IBM System/360 Operating
System
FORTRAN IV (G) compiler is designed to
accept programs written in the FORTRAN IV
language as defined in the publication IBM
System/360:
FORTRAN IV Language,
Form
C28-6515.
The compiler produces error messages for
invalid
statements, and, optionally, a
listing of the source module, storage maps,
and an object module acceptable to the
System/360 Operating System linkage editor.

operating System. As a processing program,
the compiler communicates with the control
program for input/output and other services. A general description of the control program is given in the publication
IBM System/360 operati~g system: Introduction to Control Program Logic, Prog~~
Logic Manual.
A compilation, or a batch of compilations, is requested using the job statement
(JOB), the execute statement (EXEC), and
data definition statements (DO). Alternatively, cataloged procedures may be used.
A discussion of FORTRAN IV compilation and
the available cataloged procedures is given
in the publication IBM~~.§.L.oper~ting
System: FORTRAN IV (G) Programmer's Guide.
The compiler receives control initially
from the calling program (e. g., job sche-'
duler or another program that CALLs, LINKs
to, or ATTACHes the compiler). Once the
compiler receives control, it uses the QSAM
access method for all of its input/output
operations.
After compilation is completed, control is returned to the calling
program.

MACHINE CONFIGURATION
COMPILER DESIGN
The
minimum
system
configuration
required for the use of the IBM System/360
Operating System with the FORTRAN IV (G)
compiler is as follows:

• An IBM System/360 Model 40 computer
with a storage capacity of 128K bytes
and a standard
and
floating-point
instruction set.
• A device for operator communication,
such as an IBM 1052 Keyboard Printer.
• At least one direct-access device
vided for system residence.

The compiler will operate within a total
of 80K bytes of main storage. This figure
includes space for the compiler code, data
management access routines, and sufficient
working space to
meet
other
storage
requirements
stated
throughout
this
publication.
Any additional storage available is used
as additional roll storage.

pro-

COMPILER AND SYSTEM/360 OPERATING SYSTEM
The FORTRAN IV (G) compiler is a processing
program
of
the IBM System/360
1Most of the tables used by the compiler
are called rolls.
(Further explanation of
rolls
is
given
in "Rolls and Roll
Controls.")

LIMITAT~2-QF

THE COMPILER

The System/360 Operating System FORTRAN
IV (G) compiler and the object module it
produces can be executed on all System/360
models from Model 40 and above, under
control of the operating system control
program.
All input information must be
written in either BCD or EBCDIC representation. The compiler is designed to process
all properly written programs so that the
object code produced by the compiler is
compatible with the existing mathematical
library subroutines.
section 1:

Introduction to the Compiler

9

If ten source read errors occur during
the compilation, or if it is not possible
to use SYSPRINT~ the operation of the
compiler is terminated. The operation of
the compiler is also limited by the availability of main storage space. The compilation is terminated if:

The compiler is also designed so that
reloading of the compiler is unnecessary in
order to accomplish multiple compilations.

• The roll storage area is exceeded
• Any single roll exceeds 64K
thereby making it unaddressable
• The WORK or EXIT
allocated storage

roll

bytes,

exceeds

its

Note: If any of these conditions occur
during the first phase of the compilation,
the statement currently being processed may
be discarded; in this case, the compilation
continues with the next statement.

The primary control and processing routines (hereafter referred to as "POP routines" or "compiler routines") of the compiler are primarily written in machineindependent pseudo instructions called POP
instructions.
Interpretation of the pseudo instructions is accomplished by routines written
in the System/360 Operating System assembler language.
These routines (hereafter
referred to as "POP subroutines") are an
integral part of the compiler and perform
the operations specified by the POP
instructions, e.g., saving of backup information, maintaining data indicators, and general housekeeping.
Control of the compiler operation is
greatly affected by source language syntax
rules during the first phase of the compiler, Parse. During this phase, identifiers
and explicit declarations encountered in
parsing are placed in tables and a Polish
~ion
fo"rm of the program is produced:(For further information on Polish notation, see Appendix C,
"Polish Notation
Formats.")

10

The compiler quite frequently uses the
method of recursion in parsing, analysis,
and optimization. All optimizing and code
generating routines, which appear in later
phases, operate directly on the tables and
Polish notation produced by Parse.

POP LANGUAGE
The FORTRAN IV (G) compiler is written
in a combination of two languages:
the
System/360 Operating System assembler language, which is used where it is most
efficient, and the POP language.
The POP language is a mnemonic macro
programming language whose
instructions
include functions that are frequently performed by a compiler.
POP instructions are
written for assembly by the System/360
Operating System assembler, with the POP
instructions defined as macros.
Each POP
instruction is assembled as a pair of
address constants which together indicate
an instruction code and an operand.
A
statement or instruction written in the POP
language is called a POP. The POP instructions are described in Appendix A.

COMPILER ORGANIZATION
The system/360 Operating System FORTRAN
IV (G) compiler is composed of a control
phase, Invocation, and five
processing
phases (see Figure 1): Parse, Allocate,
Unify, Gen, and Exit. The operating system
names for these phases are,
respectively,
IEYFORT,
IEYPAR, IEYALL,
IEYUNF, IEYGEN,
and IEYEXT.
(The first level control and
second level processing compiler routines
used in each phase are shown in Figure 2.)
In addition, Move is a pre-assembled work
area, IEYROL.

IEYFORT

SYSIN----------->r---;~~~~~----1----->r---~~~~~~1---1----->r--i~;~~;~i~~-l-----> ~
Module
Il _____________
Program
Il _____________
Phase
lI _____________
JI
JI
JI

<9.

I
I IEYPAR
V

r-------------,

r-------------,

r--->ISource Module I
listing
1I
lI _____________
JI

I

I Parse
~-----------~
I
(Phase 1)
I
I
l------T------ J
I
r-------------,
I
l--->ISource Module I
diagnostics JI
I
lI _____________
V IEYALL
r-------------,
I Allocate
I

SYSPRINT

r------------ -,
r--->IStorage
Maps JI
I
l _____________

I
(Phase 2)
~-----------~
l------T------ J
I
I
l--->IESD and TXT
I IEYUNF
ICards
V
l _____________ JI

r-------------,

SYSPRINT

SYSPRINT

SYSPUNCH/SYSLIN

r-------------,

I Unify
I
I
(Phase 3)
I
l------T------ J

I
V

IEYGEN

r-------------,

I Gen
I
(Phase 4)
I
I
l------T------ J
I

r-------------,
r--->IObject Module I
listing
I
lI _____________
JI

V IEYEXT
I
r-------------,
r-------------,
I
IObject Module I
Exit
cards
I
I
(Phase 5)
I~-----------+--->ITXT
I
l _____________ J
l------T------ J

I

I
V IEYFORT

r-------------,

I
I

I
I

r-------------,

I
IESD, RLD, andl
l--->IEND
cards
l _____________
JI

SYSPRINT

SYSPUNCH/SYSLIN

SYSPUNCH/SYSLIN

Invocation I
Phase
I

l------I------

J

V

. *.

. * *.
. * . *Multiple* . *. NO
r-------------,
*. Compilations • *--------------> I Control
I
* • *.* . . *.* • *
I Program
I
l _____________ J
*

V

Figure

1.

YES

C9

Overall Operation of the Compiler

Section 1:

Introduction to the Compiler

11

Control Phase:

Invocation (IEYFORT)

The Invocation phase (IEYFORT) is loaded
upon invocation of the compiler and remains
in core storage throughout compilation.
It
is entered initially from the calling program,
from each module at the end of its
processing, and from Exit after compilation
is complete.
At the initial entry, the Invocation
phase initializes bits in IEYFORT1 from the
options specified by the programmer for the
compilation, opens data sets, and fetches
the modules IEYPAR, I EYALL, IEYUNF, IEYGEN,
and IEYEXT via a series of LOAD macro
instructions. These modules remain in core
storage for a series of main program and
subprogram compilations unless it is determined that additional space required for
tables is not available. When this occurs,
modules that precede the active one are
deleted, and compilation is resumed.
If
more space is required, modules that follow
the currently active one are deleted.
When a module completes processing, it
returns to IEYFORT, which ensures the presence of the next module and transfers to
it. During initialization for a subprogram,
IEYFORT ensures that all modules are
loaded.
The last entry is made from the Exit
phase at the completion of a compilation.
When the entry is made from Exit, the
Invocation phase checks for multiple compilations.
If
another
compilation
is
required, the compiler is reinitialized and
the main storage space allocated for the
expansion of rolls is assigned to the next
compilation~ otherwise, control is returned
to the calling program.

Parse accepts FORTRAN statements in card
format from SYSIN and scans these to produce error messages on the SYSPRINT data
set, a source module listing (optional),
and Polish notation for the program. The
Polish notation is maintained on internal
tables for use by subsequent phases.
In
addition, Parse produces the roll entries
defining the symbols used in the source
module.

Phase 2:

The ESD cards for the object module
itself, COMMON blocks and subprograms, and
TXT cards for NAMELIST tables, literal
constants and FORMAT statements are produced by Allocate on the SYSPUNCH and/or
SYSLIN
data sets.
Error messages for
COMMON and EQUIVALENCE statements, unclosed
DO loops and undefined labels are produced
on SYSPRINT; on the MAP option, maps of
data storage are also produced.

The Unify phase optimizes the usage of
general
registers
within DO loops by
operating on roll data which describes
array references. The optimization applies
to references which include subscripts of
the form ax+b, where a and b are positive
constants and x is an active induction
variable (that is, x is a DO-controlled
variable and the reference occurs within
the DO loop controlling it), and where the
array does not have any adjustable dimensions.
The addressing portion of
the
object ~struction for each such array
reference is constructed to minimize the
number of registers used for the reference
and the number of registers which must be
changed as each induction variable changes.

Phase 4:

Gen (IEYGEN)

Gen uses the Polish notation produced by
Parse and the memory allocation information
produced by Allocate. From this information, Gen produces the code, prologues, and
epilogues required for the object module.
In order to produce the object code, Gen
resolves
labeled
statement
references
(i.e., a branch target label) and subprogram entry references.

Allocate CIEYALL)

Allocate, which operates
immediately
after Parse, uses the roll entries produced
12

by Parse to perform the storage allocation
for the variables defined in the source
module.
The addressing information thus
produced is then left in main storage to be
used by the next phase.

The final output from Gen is a complete
form of the machine language code which is
internally maintained for writing by the
Exit phase.

Phase 5:

Exit (IEYEXT)

Exit, which is the last processing phase
of the compiler, produces the TXT cards for
the remaining portion of the object module,
the RLD cards (which contain the relocatable information), and the END card.
This
output is placed optionally on the SYSLIN
data set for linkage editor processing
and/or SYSPUNCH if a card deck has been
requested. Additionally, a listing of the
generated code may be written on the SYS-

PRINT data set in a format similar to
produced by an assembly program.

that

Roll contains static rolls and roll
information always required for compiler
operations.
These are described under the
heading "Rolls and Roll Controls" later in
this section.

Section 1:

Introduction to the Compiler

13

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829

r---------·-----·-----------------------------------------------------------------------,
r---PRINT AND READ SOURCE

I
I
I
r---START COMPILER
I PARSE----I
I
I
I

I
I
I
I
I
I

STA INIT
LBL FIELD XLATE
STA XLA TE
STA FINAL
REGISTER IBCOM
PROCESS POLISH
L---STA'rEMENT PROCESS-----I
ACTIVE END STA XLATE
L---STA FINAL END

r---PREP EQUIV AND PRINT ERRORS
BLOCK DATA PROG ALLOCATION
PREP DMY DIN AND PRINT ERRORS
PROCESS DO LOOPS
PROCESS LBL AND LOCAL SPROGS
BUILD PROGRAM ESD
ENTRY NAME ALLOCATION
COMMON ALLOCATION AND OUTPUT
BASE AND BRANCH TABLE ALLOC
EQUIV ALLOCATION PRINT ERRORS
FORMAT ALLOCATION
SCALAR ALLOCATE
ARRAY ALLOCATE
1ALLOCATE-----START ALLOCATE--------I
PASS 1 GLOBAL SPROG ALLOCATE
SPROG ARG ALLOCATION
PREP NAMELIST
LITERAL CONST ALLOCATION
EQUIV MAP
GLOBAL SPROG ALLOCATE
BUILD NAMELIST TABLE
ALPHA LBL AND L SPROG
BUILD ADDITIONAL BASES
ALPHA SCALAR ARRAY AND SPROG
LITERAL CONST ALLOCATION
CALCULATE BASE AND DISP
---DEBUG ALLOCATE
r---ARRAY REF ROLL ALLOTMENT
UNIFY--------STAltT UNIFY----------i
DO NEST UNIFY
1-I
CONVERT TO ADR CONST
I
L---CONVERT TO INST FORMAT

1
1
I
I
I

r----STAHT GEN

I
I

r---MOVE ZEROS TO T AND C
ENTRY CODE GEN
PROLOGUE GEN
L---EPILOGUE GEN

I
I

IGEN-----,

I
I
r--- GET POLISH
I
L----GEN PROCESS----------i
LBL PROCESS
I
I
STA GEN
I
L---STA GEN FINISH
I
r---PUNCH TEMP AND CONST ROLL
I
I
PUNCH ADR CONST ROLL
I
I
PUNCH CODE ROLL
I
I
PUNCH BASE ROLL
I
J
PUNCH BRANCH ROLL
I
I
PUNCH SPROG ARG ROLL
I EXIT----------EXIT PASS-------------I
PUNCH GLOBAL SPROG ROLL
I
I
PUNCH USED LIBRARY ROLL
I
I
PUNCH ADCON ROLL
I
I
ORDER AND PUNCH RLD ROLL
I
I
PUNCH END CARD
I
I
PRINT HEADING
I
I
PRINT A LINE
_
I IL-_________•___________________________________________________________________________
L---PRINT COMPILER STA~ISTICS
-Figure
14

2.

Compiler Organization Chart

r-------T----------T------------------,

I Load
I
I
I
IModule I
IContent or
I
I Name
I Components I Function
I
~-------+----------+------------------~
Invocation and
Low IEYFORT IEYFORT
Core
control
IEYFORTl

Option bits

IEYFORT2

Loads and deletes
other modules

IEYROL

Roll statistics
(bases, tops,
bottoms)
Group statistics
(displacement
group sizes)
WORK roll
EXIT roll

COMPILER STORAGE CONFIGURATION
Figure
tions, but
component
they exist
parts of
tion 2.

3 illustrates the relative posinot the relative sizes of the
parts of the FORTRAN compiler as
in main storage. The component
each phase are described in Sec-

COMPILER OUTPUT
The source module(s)
to be compiled
appear as input to the compiler on the
SYSIN data set. The SYSLIN, SYSPRINT, and
SYSPUNCH data sets are used (depending on
the options specified by the user) to
contain the output of the compilation.

Roll address table
IEYINT

POP Jump Table
POP machine
language subroutines

Roll Storage is Allocated from this

The output of the compiler is represented in EBCDIC form and consists of any
or all of the following:
Object Module (linkage editor input)
Source Module listing
Object Module listing

IEYPAR

IEYPAR

Parse phase
Quotes and
messages

Storage maps
Error messages (always produced)

I EYALL

I EYALL

Allocate phase

IEYUNF

IEYUNF

Unify phase

IEYGEN

IEYGEN

Generate phase

Relocatable card images for punching
High
CorelIEYEXT
IEYEXT
Exit phase
L _______ __________
__________________
J
~

Figure

3.

~

Compiler Storage Configuration

The overall data flow and the data sets
used for compilation are illustrated in
Figure 4. The type of output is determined
by compile time parameters.

Section 1:

Introduction to the Compiler

15

r---------------------------------------------------------------------------------------,
r----------------,
Error and
I

I
r---- For all-------------->I
I
compilations
I

Warning
I SYSPRINT
Messages
I
Il ________________
(if any)
JI

I
I
I
I
I

r----------------,

I
Object
I
Option---------->I
Module
I SYSPRINT
lI ________________
JI
listing

~----LIST

I
I
I

SYSIN

I

r---------,

I
I

l----T----J

I

I SourcE~
I Module

I
I

~----DECK

Option---------->I (ESD, TXT, RLD I SYSPUNCH
lEND)
Card Images JI
l ________________

~

I
,
V

r-------·--,

I FORTRAN,

'IV (G)

r----------------,
IObject Module
I

I
I

,
,

r----------------,

~->~

'Compiler'
l ________ J

I

,,
,,I
,,

IObject Module
I
Option---------->I (ESD, TXT, RLD, I SYSLIN
Card Images JI
llEND)
________________

~----LOAD

~----MAP

r----------------,
Storage
I

Option----------->I

,
,
,

,

SYSPRINT

Il ________________
Map
JI

r----------------,

,
Source
I
l----SOURCE Option-------->I
Module
I SYSPRINT
I ________________
L
Listing
JI

Figure

16

4.

Compiler Output

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
OBJECT MODULE
The configuration of the object module
produced by the FORTRAN IV (G) compiler is
shown in Figure 5.
Entry point--->

r---------------------,I

I Heading

~---------------------~
ISave area
I
~---------------------~
IBase table
I
~---------------------~
IBranch table
I
~---------------------~
ISubprogram argument I
Ilists
I
~---------------------~
ISubprogram addresses I

.---------------------~
IEQUIVALENCE variables I
~---------------------~
IScalar variables
I
~---------------------~
I Arrays
I
~---------------------~
INAMELIST tables
I

~---------------------~

ILiteral constants
I (except those used
lin DATA and PAUSE
I statements)

I

I

I
I

.---------------------~

IFORMAT statements

I

.---------------------~
ITemporary storage
land constants

I

I

.---------------------~
L _____________________ J
IProgram text

• Figure

5.

I

object Module Configuration

Components of the Object Module
The following paragraphs describe the
components of the object module produced by
the FORTRAN IV (G) compiler.
HEADING:
The
object
module
heading
inclUdes
all
initializing instructions
required prior to the execution of the body

of the object module.
Among ot'he:r functions,
these
instructions set general
register 13 (see "Object Module General
Register Usage") and perform various operations, depending on whether the program is
a main program or a subprogram and on
whether it calls subprograms.
(See "Code
Produced for
SUBROUTINE
and
FUNCTION
Subprograms.")
SAVE AREA:
The save area, at maximum 72
bytes-long, is reserved for information
saved by called subprograms.
Figure 6
shows an example of the use of this area in
program Y, which is called by program X,
and which calls program z.
The first byte of the fifth word in the
save area (Save Area of Y + 16) is set to
all ones by program Z before it returns to
program Y. Before the return is made,
all
general registers are restored to their
program Y values.
BAS~_TA~LE:
The base table is a list of
addresses from which the object module
loads a general register prior to accessing
data; the general register is then used as
a base in the data referencing instruction.

Because an interval of 4096 bytes of
storage can be referenced by means of the
mach.ine instruction D field, consecutive
values representing a single control section in this table differ from each other
by at least 4096 bytes.
Only one base
table entry is constructed for an array
which exceeds 4096 bytes in length; hence,
there is a possibility that an interval of
more than 4096 bytes exists between consecutive values for a single control section
in the table.
The addresses compiled into this table
are all relative, and are modified by the
linkage editor prior to object
module
execution.
Those entries constructed for
references to COMMON are modified by the
beginning address of the appropriate COMMON
block;
those
entries
constructed for
references to variables
and
constants
within the object module itself are modified by the beginning address of the appropriate object module.

Section 1:

Introduction to the compiler

17

Form Y28-6638-l
Page Revised 7/23/69 by TNL Y28-6829

r------------------------------·--------------------------------------------------------,
<---4 bytes---->
r----------------,
I Subprogram
I <---Stored by initial entry code.

I
I
I

Save Area of Ylepilogue address I
.----------------~
-+4 I Program X save I <---Stored by program y.
larea address
I
~----------------~
-+8 I Program Z save J <---Stored by program Z, if it calls subroutines·
larea address
I
.----------------~
+12 IRegister 14
I

.----------------iI

+16 JRegister 15

.----------------~
I

+20 IRegister 0

•----------------iI

I
I
I

Values on leaving program Y, stored by program Z•

I
I

.----------------~
+72 LIRegister
12
________________
JI
_________________ .______________________________________________________________________ J

Figure

6.

Example of Use of Save Area

BRANCH TABL~:
This table contains one
full word entry for each Q~ch tarqe~la~!
(a label referred to in a branch statement)
and
statement
function in the source
module. In addition, one entry occurs for
each label produced by the compiler in
generating the object module. These labels
refer to return points in DO loops and to
the statement following complete Logical IF
statements, and are called made labels.
In the object module code, any branch is
performed by loading general register 14
(see "Object
Module
General
Register
Usage") from this table, and using a BCR
instruction. The values placed in this
table by the compiler are relative addresses. Each value is modified by the
base address of the object module by the
linkage editor.

SUBPROGRAM ARGUMENT LISTS: This portion of
the object module contains the addresses of
the arguments for all subprograms called.
In calling a subprogram, the object module
uses general register 1 to transmit a
location in this table.
The subprogram
then acquires the addresses of its arguments from that location and from as many
subsequent locations as there are arguments. The sign bit of the word containing
the address of the last argument for each
subprogram is set to one.

18

SUBPROGRAM ADDRESSES: This list contains
o;e--entry--for-each FUNCTION or SUBROUTINE
subprogram referenced by the object module.
The entry will hold the address of that
subprogram when it is supplied by the
linkage editor. The compiler reserves the
correct amount of space for the list, based
on the number of subprograms referred to by
the source module.
EQUIVALENCE VARIABLES:
This area of the
object
module
contains
unsubscripted
variables and arrays, listed in EQUIVALENCE
sets which do not refer to COMMON.
2CALAB-_-Y~I~~~~2:
All non-subscripted
variables which are not in COMMON and are
not members of EQUIVALENCE sets appear in
this area of the object module.

ARRAYS:
All arrays which are not
in
COMMON, and are not members of EQUIVALENCE
sets appear in this area of the object
module.
NAMELIST TABLES:
For each NAMELIST name
and DISPLAY-statement in the source module,
a NAMELIST table is constructed by the
compiler and placed in this area of the
object module. Each table consists of one
entry for each scalar variable or array
listed following the NAMELIST name or in
the DISPLAY statement, and begins with four
words of the following form:

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826

---------T-------------------------------,

I

I

I

1

I
I

I
I

name field

I
I
I
I
I

I
2
J
I
~-------------------------------~
I
3
,
I
I
I
not used
I
4
I _______________________________ JI
Il _________

I

I
I
I
I
I
l
I
1

~

where the name field contains the NAMELIST
name,
right justified.
For the DISPLAY
statement, the name is DBGnn#, where nn is
the number of the DISPLAY statement within
the source program or subprogram.
Table entries for scalar
the following form:

I

~riables

have

j

---------T-------------------------------,
By tel
I
1

,

I
I
I

2

I
I

,

I

name field

,

,

~-------------------------------~

3
4

5

,

6

I
]
I
1

7

I

I

I
address field
I
~-------T-------T-------T-------~
I
I
'no.
I
I
Jtype
1mode
ldimens. ,length I
~-------+-------i-------i-------~
lindica-Ifirst dimension factor I
Itor
Ifield
I
~-------t-----------------------~
Inot
Isecond dimension factorl
lused
Ifield
I
~-------+-----------------------~
Inot
Ithird dimension factor I
lused
L
_______ i Ifield
_______________________ I
~

I
I
I

, _________________________________________
etc.
etc.
L
J,

where:

~-------------------------------~
I
address field
I

3

2

I
,
I

I
I

I
I
I

name field

1

J

1word
I
1
2
3
4
I
~--------- -------------------------------~
,

---------T----------------------~--------,

Byte I
I
!Word
I
1
2
3
4
I
~--------- -------------------------------~

I
By tel
J
I Word
I 1
2
3
4
J
~-------- -------------------------------~

name field
contains the name of the array,
justified.

I
~-----~-------T-·---------~-----~
IL _________
4
I _____
type 4I _______
mode'4 ________________
not used
JI
~~

right

address field
contains the relative address of the
beginning of the array within the
object module.

where:
name field
contains the name of the scalar variable, right justified.

mode field
contains the mode of the array elements, coded as for scalar variables,
above.

address field
contains the relative address of the
variable within the object module.
type field
contains zero
variable.

to

mode field
contains the mode
coded as follows:
2
3
4
5
6
7
8
9
A

indicate

a scalar

no.

i

dimens.
contains the number of dimensions in
the array; this value maybe 1-7.

leng1:h field
contains the length of the array
ment in bytes.
of

the

ele-

variable,

Logical, 1 byte
Logical, fullword
Integer, halfword
Integer, fullword
Real, double precision
Real, single precision
complex, double precision
Complex, single precision
Literal (not currently
compiler-generated)

NAMELIST table entries for arrays have
the following form:

indicator field
is set to zero if the array has been
defined to have variable dimensions;
otherwise, it is set to nonzero.
first dimension factor field
contains the total size of the array
in bytes.
second dimension factor field
contains the address of the second
multiplier for the array (n1*L, where
n1 is the size of the first dimension
in elements, and L is the number of
bytes per element).
section 1:

Introduction to the Compiler

19

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
third dimension factor field
contains the address of the third
multiplier for the array (nl*n2*L,
where nl is the size of the first
dimension in elements, n2 is the size
of the second dimension, and L is the
number of bytes per element).
A final entry for each NAMELIST table is
added after the last variable or array name
to signify the end of that particular list.
This entry is a fullword in length and
contains all zeros.
LITERAL CONSTANTS: This area contains a
Iist--of--the-iiteral constants used in the
source module., except for those specified
in DATA and PAUSE statements.
KOR~! __ ~!~!EM~!:!~~~:
The FORMAT statements
specified in the source module are contained in this area of the object module.
The statements are in an encoded form in
the order of their appearance in the source
module.
(See "Appendix 0: Code Produced
by the Compiler.") The information contains
all specifications of the statement but not
the word FORMAT.

TEMPORARY STORAG~ AND CONSTANTS: This area
always begins on a double precision boundary and contains,
in no specific order,
the constants required by the object module
code and the space for the storage of
-temporary results during computations.
Not
all of the source module constants necessarily appear in this area, since as many
constants as possible are used as immediate
data in the code produced. Some constants
may appear which are not present in the
source module, but which have been produced
by the compiler.
ERO§E~ __ !~~!:
If the object module contains statE!ment functions,
the code for
these statements begins the program text
and is preceded by an instruction that
branches around them to the first executable statement of
the
program.
(See
"Statement Funct.ions" in Appendix 0 for
fUrther explanation of this code.) Following the code for the statement fUnctions is
the code for the executable statements of
the source modulE!.

The
object
module produced by the
FORTRAN IV (G) compiler uses the System/360
general registers in the following way:
Register 0:

Register 2:

Used as an accumulator.

Register 3:

Used as an accumulator.

Registers 4 through 7: contain index
values as required for references to
array variables, where the subscripts
are linear functions of DO variables and
the array does
not
have
variable
dimensions.
Registers 8 and 9: Contain in1ex values
as required for references to array
variables, where the subscripts are of
the form x+c, where x is a non DOcontrolled variable and c is a constant.
Register 9: contains index values as
required
for
references
to
array
variables where the subscripts are nonlinear of the form I*J~ where I and J
are the variables.
Registers 10 through 12:
Contain base
addresses loaded from the base table.
Register 13:
Contains the beginning
address of the object module save area;
this value is loaded at the beginning of
program execution. Register 13 is also
used for access to the base table, since
the base table follows the save area in
main storage.
Register
14:
Contains
the return
address for subprograms and holds the
address of branch target instructions
during
the
execution
of
branch
instructions.
Register 1~:
Contains the entry point
address for subprograms as they are
called by the object module.

SOURCE MODULE LISTING
The optional source module listing is a
symbolic listing of the source module; it
contains indications of errors encountered
in the program during compilation.
The
error message resulting from an erroneous
statement does not necessarily cause termination of compiler processing nor tqe
discarding of tpe statement.
Recognizable
portions
of declaration statements are
retained, and diagnosis always proceeds
until the end of the program.

Used as an accumulator.
OBJECT MODULE LISTING

Register 1: Used as an accumulator and
to hold the beginning address of the
argument list in branches
to
subprograms.
20

The optional object module listing uses
the standard Systern/360 Operating System

assembler mnemonic operation codes and,
where possible, refers to the symbolic
variable names contained in the source
module. Labels used in the source module
are indicated at the appropriate places in
the object code listinq.

STORAGE MAPS
The optional storage map consists of six
independent listings of storage information. Each listing specifies the names and
locations of a particular class of variable. The listings are:

• The WORK roll exceeds the fixed storage
space assigned to it.
• The EXIT roll exceeds the fixed storage
space assigned to it.
• Any other roll, with the exception of
the AFTER POLISH roll and the CODE
roll, exceeds 64K bytes of storage.
In
this case, the capacity of the ADDRESS
field of a pointer to the roll is
exceeded and, therefore, the information on the roll is unaddressable. The
AFTER POLISH and
CODE
rolls
are
excepted, since pointers to these rolls
are not required.
The compilation terminates following the
printing of either of these messages.

• COMMON variables
• EQUIVALENCE variables
• Scalar variables
• Array variables
• NAMELIST tables
• FORMAT statements
A list of the subprograms called is also
produced.

ERROR MESSAGES
Errors are indicated by listing the
statement in its original form with the
erroneous phrases or characters undermarked
by the dollar sign character,
followed by
comments indicating the type of the error.
This method is described in more detail in
"Phase 1 of the Compiler: Parse (IEYPAR)."
Common Error Messages
The message NO CORE AVAILABLE is produced (through IEYFORT) by all phases of
the compiler when the program being compiled exhausts the main storage
space
available to the compiler. This message is
produced only when the PRESS MEMORY routine
cannot provide unused main storage space on
request from the compiler.
The message ROLL SIZE EXCEEDED is produced (through
the
Invocation
phase,
IEYFORT) by all phases of the compiler when
the size of any single roll or rolls is
greater than permitted. The following circumstances cause this
message
to
be
produced:

COMPILER DATA STRUCTURES
The POP language is designed to manipulate certain well-defined data structures.
Rolls, which are the tables primarily
used by the compiler, are automatically
handled by the POP instructions; that is,
when information is moved to and from
rolls, controls indicating the status of
the rolls are automatically updated.
Items (variables) with fixed structures
are used to maintain control values for
rolls, to hold input characters being processed, and to record Polish notation, etc.
These item structures are also handled
automatically by the POP instructions.
The arrangement of the parts of the
compiler is significant because of the
extensive use of relative addressing in the
compiler. General registers are used to
hold base addresses, to control some rolls,
and to assist in the interpretation of the
POP instructions.

ROLLS AND ROLL CONTROLS
Most of the tables employed by the
compiler are called rolls. This term describes a table which at any point in time
occupies
only
as much storage as is
required for the maximum amount of information it has held during the present compilation (exceptions to this rule are noted
later). Another distinctive feature of a
roll is that it is used so that the last
information placed on it is the first
information retrieved
it uses a "push
up' logic.
Section 1:

Introduction to the Compiler

21

with the exception of the WORK and EXIT
rolls,
the rolls of the compiler are maintained in an area called the £QJ-I storage
area.
The rolls in this area are both
and numbered. While the references
to rolls in this document and in the
compiler comments are primarily by name,
the names are converted to corresponding
numbers at assembly time and the rolls are
arranged in storage an~ referred to by
nUITlber.

named

If the roll storage area is considered
to be one block of continuous storage, the
rolls are placed in this area in ascending
sequence by roll number; that is, roll 0
hegins at the base address of the roll
storage area;
rolls 1, 2, 3, etc., follow
roll zero in sequence, with the roll whose
number is largest terminating the roll
storage area.
Initially, all rolls except roll 0 are
empty and occupy no space; this is accomplished by having the beginning and end of
all rolls located at the same place.
(Roll
0,
the LIB roll,
is a fixed-length roll
which contains all of its data initially.)
When information is to be placed on a roll
and no space is available due to a conflict
with the next roll, rolls greater in number
than the roll in question are moved down
(to higher addresses) to make the space
available. This is accomplished by physically moving the information on the rolls a
fixed number of storage locations and altering the controls to indicate the change.
Thus,
roll 0 never changes in size, location, or contents; all other rolls expand
to higher addresses as required.
When
information is removed from a roll,
the
space which had been occupied by that
information is left vacant;
therefore,
it
is not necessary to move rolls for each
addition of information.
with the exception of the area occupied
by rollO, the roll storage area actually
consists of any number of non-contiguous
blocks of 4096 bytes of storage. The space
required for roll 0 is not part of one of
these blockso Additional blocks of storage
are acquired by the compiler whenever current roll storage is exceeded.
If the
system is unable to fulfill a request for
roll storage, the PRESS MEMORY routine is
entered to find roll space that is no
longer in use.
If 32 or more bytes are
found, the compilation continues.
If fewer
than 32 bytes are found, the compilation of
the current program is terminated,
the
message NO CORE AVAILABLE is printed, and
space is freed.
If there are multiple
programs, the next one is compiled.
The following paragraphs describe the
controls and statistics maintained by the
compiler in order to control the storage
22

allocation for rolls and the functioning of
the "push up" logic.

ROLL ADR Table
The ROLL ADR table is a 1000-byte table
maintained in IEYROL.
Each entry in this
table holds the beginning address of a
block of storage which has been assigned to
the roll storage area. The first address
in the table is always the
beginning
address of roll O. The second address is
that of the first 4K-byte block of storage
and,
therefore,
the beginning address of
roll 1.
Initially, the
last
address
recorded on the table is the beginning
address of a block which holds the CODE and
AF'l'ER POLISH rolls, with the CO~ roll
begInning--at the first location in the
block.
As information is recorded on rolls
during the operation of the compiler, additional storage space may eventually be
required. Whenever storage is needed for a
roll which precedes the CODE roll,
an
additional 4K block is requested from the
system and its address is inserted into the
ROLL ADR table immediately before the entry
describing the CODE roll base. This insertion requires that any entries describing
the CODE and AFTER POLISH rolls be moved
down in the ROLL ADR table.
The information on all rolls following (greater in
number than) the roll requiring the space
is then moved down a fixed number of words.
The roll which immediately precedes the
CODE roll moves into the new block of
storage.
This
movement of the rolls
creates the desired space for the roll
requiring it.
The movement of rolls does
not respect roll boundaries; that is, it is
entirely possible that any roll or rolls
may bridge two blocks of storage.
When
additional
storage
space
is
required for the AFTER POLISH roll, a block
is requested from the system and its beginning address is added to the bottom of the
ROLL
ADR
table.
When the CODE roll
requires more space, a new block is added
in the same manner, the AFTER POLISH roll
is moved down into the new block, and the
vacated space is available to the CODE
roll.
The CODE and AFTER POLISH rolls are
handled separately because the amount of
information which can be expected to reside
on them makes it impractical to move them
frequently in order to satisfy storage
requirements for all other rolls. The CODE
roll is also somewhat unique in that it is
assigned a large amount of space before it
is used; that is, the AFTER POLISH roll

does not begin at the same location as does
the CODE roll.

BASE

4 bytes
(n) l_> r---------------l<-----unused

TOP

(n»)

I

~===============~)
~---------------~
~---------------~

BASE, BOTTOM, and TOP Tables

I
In order to permit dynamic allocation as
well as to permit the use of the "push up"
logic,
tables containing the
variables
BASE,
BOTTOM,
and TOP are maintained to
record the current status of each of the
rolls.
These variables indicate addresses
of rolls.
Information stored on rolls is
in
units
of
fullwords;
hence,
these
addresses are always multiples of four.
The length of each of the tables is determined by the number of rolls, and the roll
number is an index to the appropriate word
in each table for the roll.
Each of the variables occupies a fullword and has the following configuration:
1 1

o

1 2

1 2
9 0

3
1

r-------------T------------T--------------,
IEntry number I
I

I

I

I

lI _____________

linto the
I Displacement I
I ROLL ADR
I (12 bits)
I
I ____________
Table
I ______________ JI

~

I

•

I

l-------~-------J)

K bytes

BOTTOM(n)---->1l _______________ JI
Figure

7.

Roll
containing
Information

K

Bytes

of

When information is to be added to a
roll,
it is stored at the address pointed
to by BOTTOM,
plus four,
and BOTTOM is
increased by four.
When a word is to be
retrieved from a roll, it is read from the
address specified by BOTTOM,
and, under
most circumstances, BOTTOM is reduced by
four,
thus indicating that the ~ord is no
longer occupied by the roll.
This alteration of the value of BOTTOM is terwed
E~~~~~g.
If the information retrieved from
a roll is to remain on the roll as well as
at the destination, BOTTOM is not changed.
This operation is indicated by the use of
the word "keep" in the POP instructions
that perform it.

~

The entry number points to an entry in the
ROLL ADR table and, hence, to the beginning
address of a block of roll storage.
The
displacement is a byte count from the
beginning of the indicated storage block to
the location to which the variable (BASE,
BOTTOM, or TOP) refers.
It is significant to note that the
displacement field in these variables occupies twelve bits.
If the displacement
field is increased beyond its maximum value
(4095), the overflow increases the entry
number into the ROLL ADR table; this is the
desired result, since it simply causes the
variable to point to the next entry in the
table and effectively indicate the next
location in the roll storage area,
the
beginning of the next block.
The first status variable for each roll,
BASE,
indicates the beginning address of
that roll, minus four.
The second variable,
BOTTOM, indicates the address of the
most recently entered word on the roll.
If the roll is completely empty,
its
BOTTOM is equal to its BASE; otherwise,
BOTTOM always exceeds BASE by a multiple of
four.
Figure 7 illustrates a roll which
contains information.

The current length (in bytes) of a roll
is determined by subtracting its BASE from
its BOTTOM.
Note that this is true even
though the entry number field appears in
these variables,
since each increase in
entry number indicates 4096 bytes occupied
by the roll.
Thus, there is no limitation
on the size of a roll from this source.
For each roll, an additional status
variable, called TOP, is maintained.
TOP
enables the program to protect a portion of
the roll from destruction, while allowing
the use of the roll as though it were
empty.
Protecting a roll in this way is
called reserving the roll. The contents of
TOP (always greater than or equal to the
contents of BASE) indicate a false BASE for
the roll.
The area between BASE and TOP,
when TOP does not equal BASE,
cannot be
altered or removed from the roll. Ascending locations from TOP constitute the new,
empty roll.
Like BASE, TOP points to the word imwediately preceding the first word into which
information can be stored.
A value is
automatically stored in this unused word
when the roll is reserved; the value is the
previous value of TOP, minus the value of
BASE
and is called the reserve mark.
Storage of this value permits-more than-one
segment of the roll to be reserved.
Section 1:

Introduction to the Compiler

23

A single roll (roll n), then, containing
K bytes of information, (where K is always
a multiple of four) and having no reserved
status, has the following settings for its
status variables:
BOTTOM

=

BASE + K

=

TOP + K

Figure 7 also illustrates this roll.
If
the same roll contains L bytes reserved and
K additional bytes of information,
the
settings of its status variables are as
follows:
BOTTOM

=

TOP

+

K

=

BASE

+

L

+

K

+

4

This roll is shown in Figure 8. Note that
the relationships given above are valid
because of the structure of the BASE,
BOTTOM, and TOP variables.
4 bytes

r---------------,

BASE (n)----->I

in the sense that they employ the same push
up logic which is used for the other rolls;
however, they are not numbered, and their
controls are, therefore, not maintained in
the tables used for the other rolls.
The WORK roll is used as a temporary
storage area during the operations of the
compiler.
Because information is moved to
and from the roll frequently it is handled
separately from other rolls.
The EXIT roll warrants special treatment
because it is used frequently in maintaining exit and entrance addresses for compiler routines.
The bottom of the WORK roll is recorded
in general register 4, WRKADR; general
register 5, EXTADR, holds the address of
the bottom of the EXIT roll. These values
are absolute addresses rather than in the
format of the BOTTOM variable recorded for
other rolls.

1 <---unused

For a more detailed explanation of the
WORK and EXIT rolls, see Appendix B "Rolls
Used by the Compiler.n

r~~~~~~~~~~~~~~~ll
~---------------~
1
•
1
1

•

I,

r-------~--- ----j)

L bytes

~---------------~

1

1

~---------------i

TOP (n)------>I

1 <---previous

~---------------

I

I

I

1

1
1
I

1
I
1

1

1

1

I

TOP-BASE

~---------------i
~---------------i

K bytes

~---------------i
~---------------i

~---------------i

BOTTOM (n)--->IL ____• __________ _ I
Figure

8.

Roll Containing L Bytes of Reserved Information and K Bytes
of New Information

Special Rolls
The WORK roll and the EXIT roll are
special rolls in that they are not maintained in the roll storage area, but rather
appear in IEYROL with a fixed amount of
storage allocated to each. They are rolls
24

CENTRAL ITEMS: The items SYMBOL 1, SYMBOL
2, SYMBOL 3, DATA 0, DATA 1, DATA 2, DATA 3
and DATA 4, two bytes each in length, and
DATA 5, eight bytes in length, contain
variable names and constants. These items
are called central due to the nature and
frequency
of
their use.
They occupy
storage in the order listed, with DATA 1
aligned to a doubleword boundary.
In general,
SYMBOL 1,
2, and 3 hold
variable names; DATA 1 and 2 are used to
hold real constants, DATA 3 and 4 to hold
integer constants, DATA 1, 2, 3 and 4 to
hold double precision and complex constants, and DATA 1, 2. 3, 4 and 5 to hold
double-precision complex constants.
GROUPS:
While the basic unit of inforwation stored on rolls is a fullword,
many
rolls contain logically connected information which requires more than a singleword
of storage.
Such a collection of inforwation is called a group and always occupies
a multiple of four bytes.
A word of a
group of more than one word is someti~es
called a rung of the group.
Regardless of the size of the group on a
given roll,
the item BOTTOM for the roll
always points to the last word on the roll.
Figure 9 shows a roll with a group size of
twelve.

4 bytes

r---------------,,
I
1st

group \'

r~~~~~~~~~~~~~~1

• GROUP STATS:
Since the size of the group
varies from roll to roll, this characteristic of each roll must be tabulated in
order to provide proper manipulation of the
roll.
In addition, the groups on a roll
are frequently searched against the values
held in the central items (SYMBOL 1, 2,
3,
etc.,).
Additional characteristics of the
roll must be tabulated in order to provide
for this function.
Four variables tabulated in the group stats
tables
are
required
to maintain this information.
(See Section 2 "IEYROL Module.")

<__ {BASE (n)
,TOP

(n)

I~~~~~~~~~~~~~~~~1

~---------------~

I

2nd

g rou p

I

~---------------~

I

3rd

I

l' ~~~~~~~~~~~~~~~~1

group

~---------------~

Il _______________ JI <-- BOTTOM (n)
Figure

9.

Roll
With
Twelve

a

Group

Size

of

For some rolls, the size of the group is
not fixed.
In these cases a construct
called a "plex" is used. The first word of
each plex holds the number of words in the
plex, exclusive of itself; the remainder
holds the information needed in the group.
~-------------~

TOP

(n)J

~-------------~
3
I
~-------------~,

I

t-------------11
t-------------1\
~-------------~
4
I

group
information

,

I

~-------------~

I

I

I

,

~-------------~

plex

The first group stats table contains a
i-word entry for each roll. The entry is
divided into two halfword values.
The
first of these is the displacement in bytes
from SYMBOL 1 for a group search; that is,
the number of bytes to the right of the
beginning of SYMBOL 1 from which a comparative search with the group on the roll
should begin. This value is zero for rolls
which contain variable names
 1

81

0

I

~-----------~------------~

)
1
I

I
I
I

~-----------T------------~

0I
0I
~-----------~------------~

ARRAY roll---> 1

I
1
I

I
I
I

Most of the arithmetic performed in the
compiler
is fullword arithmetic.
When
double-precision arithmetic is required,
the variables MPAC 1 and MPAC 2, four bytes
each in length, are used as a doubleprecision register.
These variables are
maintained in main storage.

Scan Control

L
___________ ____________ J
t-----------T------------~
~

Figure 11.

First Group Stats Table
4

bytes

r-----------T------------,

~-----------+------------~
t-----------i------------~

1
1
I

I
I
I

~-----------T------------~

DP CaNST roll--->1

81

81

~-----------~------------~

1
1
I

1
l
I

~-----------T------------~

ARRAY roll--->I

61

1
I
I

L
___________ ____________ J
~-----------T------------~
~

Figure 12.
26

Second Group Stats Table

The variable CRRNT CHAR holds the source
statement character which is
currently
being inspected; the variable is four bytes
long.
The position (scan arrow) of the
current character within the input statement (its column number, where a continuous
column count is maintained over each statement)
is held in the low-order bit positions of the fullword variable CRRNT CHAR
CNT.

20)

~-----------~------------~

I
I
I

Several
variables
are used in the
character scanning performed by the first
processing phase of the compiler, Parse.
Their names,
and terms associated with
their
values,
are frequently used in
describing the POP instructions.

Non-blank

characters are called "active
except when literal or IBM
card code information is being scanned.
The variable LAST CHAR CNT, which occupies
one word of storage, holds the column
number of the active character previous to
the one in CRRNT CHAR.
ch~racters,"

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826

1

Column number:

tions which refer to quotes are assembled
with address fields which are relative to
this location.

1234567890

DO 50 I = 1, 4
A(I) = B(I)**2
DO 50 J=l, 5
50 C(J+l) = A(n

Figure 14 shows sOme of the quotes used
by the compiler and how they "are arranged
in storage.
4 bytes

r------------------------------,
02N
D I

QUOTE BASE I 00

~------------------------------i

I 00

08

I

M

I

t------------------------------i
lEN
S
I I
t------------------------------i
ION
b
b I

In the processing of the source module
which contains the above statements, statement 50 is currently being parsed.
The
current character from the input buffer is
J.
The settings of the scan
control
variables are shown in Figure 13.

~------------------------------i
1 00
07
M
P I
.-------------~----------------i
I L
I
C
I I

t------------------------------i

r-----------------------------------------,

I T
b
b
b I
.---------------~--------------i
I 00
07
L
0 I

CRRNT CHAR

I~------------------------------i
G
I
C
A I

IL _________________________________________
(EBCDIC)
J JI

t-------~----------------------i

r-----------------------------------------,
I
9 I

I

CRRNT CHAR CNT
(scan arrow)

r-----------------------------------------,

I

IL______________________________ JI
I
I

Figure 14.

Quotes are sequences of characters preceded by a halfword character count; they
are compared with the input data to determine a statement type during the Parse
phase.
These
constants
are
grouped
together at the end of phase 1.
The
location labeled QUOTE BASE is the beginning location of the first quote; ins truc-

b

t------------------------------i
I
I

Scan Control Variables

QUotes

b

~------------------------------i
I R
MAT I

LAST CHAR CNT

Several flags are used in the compiler.
These i-word variables have two possible
values:
on, represented by nonzero, and
off, represented by zero. The name of the
flag indicates the significance of the "on"
setting in all cases.

b

I
I
I
I
.----------------~-------------i
I 00
06
F
0 I

IL_________________________________________
1
8 JI
Figure 13.

L

.------------------------------i
I
I

L _________________________________________ J

Quotes Used in the Compiler

Messages
The messages used in the compiler, which
are also grouped together at the end of
Phase 1, are the error messages required by
Parse for the source module listing.
The
first byte of each message holds the condition code for the error described by the
message. The second byte of the message is
the number of bytes in the remainder of the
message. The message follows this halfword
of information.
The location labeled MESSAGE BASE is the
beginning location of the first message;
instructions which refer to messages are
assembled with address fields relative to
this location.
Section 1:

Introduction to the Compiler

27

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
COMPILER ARRANGEMENT AND GENERAL REGISTER
USAGE
Figure 15 shows the arrangement of the
compiler in main storage with the Parse
phase shown in d'etail. General registers
that hold base locations within the compiler are shown pointing to the locations they
indicate. Note that the labels CBASE and
PROGRAM BASE 2 appear in each phase of the
compiler; the general registers CONSTR and
PGB2 contain the locations of those labels
in the operating phase.

General register 2, PGB2, holds the
beginning address of the g!Qba~IDE_£~bl~,
a table containing the addresses of compiler routines which are the targets of jump
instructions.
(See Appendix A for further
discussion of this table and the way in
which it is used.) The global jump table
appears in each phase of the compiler and
is labeled PROGRAM BASE 2; thus, the value
held in general register 2 is changed at
the beginning of each
phase
of
the
compiler.

r------------T------------------T--------------------------------------------,
Register , Label
I Contents
I

I

~------------~------------------~--------------------------------------------~
I
Invocation Phase
I
~------------T----·--------------T--------------------------------------------~
1 POPPGB---> I pOP TABLE
I POP Jump Table
I
I
I
~--------------------------------------------~
I
1 POP SETUP
I POP Machine Language Subroutines
I
I
I
~--------------------------------------------~
I
I
I Data for POP Subroutines
I
~------------+----.--------------+--------------------------------------------~
I ROLLBR--->I ROLL BASE
I Roll Statistics (Bases, Tops, Bottoms)
I
I
I
~--------------------------------------------~
I
I
I Group Stats (Displacements, Group Sizes) I
I
I
~--------------------------------------------~
I
I
I WORK Roll
I
I
I
~--------------------------------------------~
I
,
I EXIT Roll
I
I
I
~--------------------------------------------~
I
I
I ROLL ADR Table
I
I
I
~--------------------------------------------~
I
I
I Roll Storage
I

low
storage

I
I
I Roll Storage*
I
~------------+------------------+--------------------------------------------~
I CONSTR--->I CBASE
I Parse Data Items
I
I
I
.--~-----------------------------------------~
I
I
I Parse Routines
I
I
I
~--------------------------------------------~
I PGB2----->I PROGRAM BASE 2 I Parse Global Jump Table
I

I

J

I
I
I
I
I

I.--------------------------------------------~
Parse Routines containing assembler
J
I
language branch targets
I

1I
I

J

I
I
I

QUOTE BASE
MESSAGE BASE

~--------------------------------------------~
Quotes
I
.----------------~---------------------------~
I Messages
I

I

~------------L----.--------------L--------------------

I

________________________

~

PHASE 2: Allocate
I
~----------------------------------------------------------------------------~
I
PHASE 3: Unify
I
.----------------------------------------------------------------------------~
I
PHASE 4: Gen
I
.----------------------------------------------------------------------------~
I
PHASE 5: Exit
I

~-----------------------------------------------------------------------------~
I*Roll storage is allocated in 4K-byte blocks, beginning from the higher end]
I of storage contiguous with Parse.
Additional blocks are obtained, asl
I needed, from preceding (lower) 4K-byte blocks of storage.
I
L ________.__________ •___________________________________________________________ J
• Figure 15.
28

Compiler Arrangement with Registers

high
storage

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
Compiler routines which contain assembler language instructions and are either
branched to by other assembler language
instructions or which themselves perform
internal branches, follow the global jump
table. General register 2 is used as a
base register for references to both the
global jump table and these
routines.
Figure 15 shows this register in Parse.
General register 3, called POPADR in the
compiler code, is used in the sequencing of
the POP operations. It holds the address
of the current POP, and is incremented by 2
as each POP is interpreted.

POINTERS
Information defining a source module
variable (its name, dimensions, etc.)
is
recorded by the compiler when the name of
the variable appears in an Explicit specification
or
DIMENSION statementD
For
variables which are not explicitly defined,
this information is recorded when the first
use of the variable is encountered.
All
constants are recorded when they are first
used in the source module.

General register 4, called WRKADR, holds
the address of the current bottom of the
WORK roll.

All references to a given variable or
constant are indicated by a pointer'to the
location at which the information defining
that variable or constant is stored. ~he
use of the pointer eliminates redundancy
and saves compiler space.

General register 5, called EXTADR, holds
the address of the current bottom of the
EXIT roll.

,The pointer is
following format:

General register 6, called POPXIT, holds
the return location for POP subroutines.
When POPs are being interpreted by POP
SETUP, the return is to POP SETUP; when
machine language instructions branch to the
POPs, it is to the next instruction.

a

I byte

I byte

i-word value in the

2 bytes

r---------T----------~--------------------,
L _________
TAG
~ __________
OPERATOR ~ ____________________
ADDRESS
J

I

I

I

I

where:
General register 7, called ADDR, holds
the address portion of the current POP
instruction (eight bits); it is also used
in the deFoding of the operation code
portion of POP instructions.
General register 8~ called POPPGB, holds
the beginning address of the machine language code for the POP instructions and the
POP jump table.
Figure 15 shows this
register, which is used as a base for
references/to these areas.
General register 9, called CONSTR, holds
the beginning address of the data referred
to by the compiler routines. This area
precedes the routines themselves, and is
labeled CBASE, as indicated in Figure 15.
This register is, therefore, used as a base
register for references to data as well as
for references to the routines in the
compiler; its value is changed at the
•
beginning of each phase.
General register 10, ROLLBR, holds the
beginning address of the roll area; that
is, the beginning address of the base table
(see Figure 15).
The
value
in this
register remains constant throughout the
operation of the compiler.
General
register
11, RETURN, holds
return addresses for the POP subroutines.
The remaining general registers are used
temporarily for various purposes in the
compiler.

TAG
is a l-byte item whose value is represented in two parts: MODE, occupying
the upper four bits, indicates whether
the variable or constant is integer"
real, complex or logical; SIZE, indica ted in the lower four bits" s pecifies the length of the variable or
constant (in bytes) minus one.
(See
Figure 15.1).

r-------T-------------T-------T-----------,
I MODE
I Value I SIZE
I

I Value

t-------t-------------t-------t-----------~
0
I Integer
I
0
I 1 byte
I
)
1
I Real
I
1
I 2 bytes I
2
I complex
I
3
I 4 bytes I
I
3
I Logical
I
7
I 8 bytes I
I
]
4
I Literal/
I
F
I 16 bytes I
I
I
I
I Hexadecimal I

I

L _______ ~-------------~-------~-----------J

Figure 15.1

TAG Field MODE and SIZE Values

OPERATOR
is a l-byte item which contains the
roll number of the roll on which the
group defining the constant or variable is stored.
ADDRESS
is a 2-byte item which holds the
relative address (in bytes) of the
group which contains the information
for the constant or variable; the
address is relative to the rop of the
roll.
Section 1:

Introduction to the Compiler

29

The pointer contains all the information
required to detennine an absolute location
in the roll storage area. The roll number
(from the OPERATOR field) is first used as
an index into the TOP table. The ADDRESS
field of the pointer is then added to the
TOP, and the result is handled as follows:
1.

2.

Its entry number field
(bits
12
through 19) is used as an index into
the ROLL ADR table.
field
(bits
20
Its displacement
through 31) is added to the base
address found in the ROLL ADR table.
The result of step 2 is the address
indicat.ed by the pointer.

Using a pointer whose OPERATOR
field
cont:ains the value 2 and whose
ADDRESS field contains the value 4, and the
following tables:
~ple:

TOP

r----T----"T------,

ROLL ADR

o I
I
I
I
r---f----f------i

o

1

1

I
2 I

I
I 2

I
I 20

I
I

~---~----~-----~

I
I
I
I

I
,
I
,

r---------------,I
I
~---------------~

I
2 I

I
1000 I

~---------------i

I
I
I
I

I
1
I
I

the location 1024 is determined. Note that
for larger values in the pointer and in
TOP, the entry number field of TOP can be
mo~ified by the addition
of ADDRESS.
In
th1s case the result of the addition holds
2 and 24 in the entry number and displacement fields, respectively.

. Since re~ati!e addresses are recorded in
po;nters, 1t 1S not necessary to alter a
pOl.nter when the roll pOinted to is moved.
No~e
also that the relative address in the
pOl.nt 7r ~ay exceed 4096 bytes with no
compll.~a~10n.of the addressing scheme.
The
only 1l.ml.tat10n on the size of a roll comes
a?out because of the size of the ADDRESS
f1eld of the pointer:
16 bits permit
values
less
than
64K
bytes
to be
represented.

30

For the purposes of object code generation, the mode and size of the constant or
variable is available to influence the type
of operations which can be employed, e.g.,
integer
or
floating,
fullword, or
doubleword.

DRIVERS
In the generation of Polish notation
from the
source language
statements,
"drivers" are also used.
These "drivers"
are values that are one word long and have
the same format as the pointer.
The two
types of drivers used by the compiler are
discussed in the following paragraphs.

Operation Drivers
One type of driver is the operation
driver, which indicates arithmetic or logicar-operations to be performed.
The
fields of the driver are:
TAG
is a 1-byte item whose value is represented in two parts: MODE, occupying
the upper four bits, indicates the
mode of the operation, e.g., integer,
floating-point, complex or logical;
SIZE, indicated in the lower four
bits, specifies the length of the
result of the operation (in bytes)
minus one.
OPERATOR
is a 1-byte item containing a value
which indicates the operation to be
performed, e.g. 6 addition, subtraction, etc.
The values for OPERATOR
are larger than the number of any
roll, and hence, also serve to distinguish a driver from a pointer •
ADDRESS
is a 2-byte item
which indicates the
of the operation
driver; its values
ten.

containing a value
"forcing strength"
specified by the
range from zero to

The forcing strengths associated with
the operation drivers are given in Table 1.

Table

1.

Internal Configuration of Operation Drivers

r--------------T----T--------T------------,
I
I
I AD!2RE §2
J

I
I

1

I

1 (Forcing
~ !~~:t I QE~gATQg I Stren'gth)

J

I Dr!.y~!:
I
.--------------+----+--------+------------~
ISprog2
I 00 I
40
I 00 00
]
~--------------+----+--------+------------~
1Power
I 00 I
42
J 00 01
I

•lUnary
--------------+----+--------+------------1
Minus
I 00
43
I 00 02
I

Control Drivers
The other type of driver used in the
generation of Polish notation is called the
control driver.
It is used to indicate the
type-ol-the-statement for which code is to
be written.
The control driver may also
designate some other control function such
as an I/O list, an array reference, or an
error linkage •

J

~--------------+----+--------+------------~
I Multiply
I 00 I
44
I 00 03
]
.--------------+----+--------t------------~
I Divide
I 00 I
45
I 00 03
I
~--------------+----+--------+------------~
I Add
I 00 I
46
I 00 04
1
.--------------+----+--------+------------~
I Subtract
I 00 I
41
I 00 04
~
~--------------+----+--------+------------~
I GT
I 00 I
48
I 00 05
1
.--------------+----+--------+------------~
IGE
I 00 I
49
I 00 05
I
t--------------+----+--------+------------~
I LT
1 00 I
4A
I 00 05
I
.--------------+----+--------+------------~
I LE
I 00 I
4B
I 00 05
J
~--------------+----+--------+------------~
I EQ
! 00 I
4C
I 00 05
1
.--------------+----+--------+------------~
lNE
I 00 I
4D
I 00 05
I
~--------------+----+--------+------------~
I NOT
I 00 I
4E
I 00 06
J
~--------------+----+--------+------------i
lAND
I 00 I
4F
I 00 01
I
~--------------+----+--------+------------~
lOR
I 00 I
50
I 00 08
I
.--------------+----+--------+------------~
IPlus and Belowl
I
I
I
lPhony3
1 00]
3F
I 00 09
J
.--------------+----+--------+------------~
I EOE4
I 00 I
3F
I 00 OA
I
~--------------L----~--------~------------i
I:tThe MODE and SIZE settings are placed inl
I the driver when it is used.
I
12 Indicates a function reference.
J
13 Used to designate the beginning of ani
J expression.
I
~4Means "end of expression"
and is usedl
JI
1L_________________________________________
for that purpose.

The fields of the control driver differ
from those of the operation driver in that
zero is contained in the TAG field, 255 in
the OPERATOR field (thedisting~ishing mark
for control drivers), and a unique value in
the
ADDRESS field.
The value in the
ADDRESS field is an entry number into a
table of branches to routines that process
each statement type or control function; it
is used in this way during the operations
of Gen.
The formats of the operation
drivers and control drivers are given in
Appendix E.

Table 1 lists the operation drivers and
the values contained in each field.
The
control drivers are given in Table 2.
The
ADDRESS field is the only field given
because the TAG and OPERATOR fields are
constant. All values are represented in
hexadecimal.

section 1:

Introduction to the Compiler

31

Form Y28-6638-1
Paqe Revised 11/15/68 by TNL Y28-6826
-Table

2.

Internal Configuration of Control Drivers (Part 1 of 2)

r----------------------------T------------,
I
I

I
I
I

QE!Y~E

I
I

~QQ~~~~

I
I

~----------------------------+------------~
AFDS
I
8
I
~----------------------------+------------~
I ARRAY
I
23C
I
~----------------------------+------------~
I ASSIGN
I
20
I
~----------------------------+------------i
I ASSIGNED GOTO
I
lC
I
~----------------------------+------------i
I ASSIGNMENT
I
4
~
r----------------------------+------------~
I AT
I
68
I
~----------------------------+------------1
I BSREF
I
34
I
~----------------------------+------------~
I CALL
I
2C
I
~----------------------------+------------i
I CGOTO
I
18
I
~----------------~-----------+------------~
I CONTINUE
I
28
I
~----------------------------+------------i
I DATA
I
3C
I

I

.----------------------------+------------i
I DEFINE FILE
I
44
I
.----------------------------+------------1
I DIRECT 10
I
200
I
.----------------------------+------------~
I DISPLAY ID
I
74
I

.----------------------------+------------1
J
DO
l
10
]

.----------------------------+------------~
I DUMMY
I
68
I

.----------------------------+------------~

I END
I
C
I
r----------------------------+------------~
I END=
I
20C
I
~----------------------------+------------4
I ERROR LINK 1
I
54
1
r----------------------------+------------~
I ERROR LINK 2
I
58
I
.----------------------------+..,..-----------~

I

I

I

ERROR LINK 3
5C
L _____________________________
.1. ____________
J

32

-Table

2.

Internal Configuration of
trol Drivers (Part 2 of 2)

Con-

r----------------------------T------------,
I
I
I

I
I

QE!yer

I
I

~Qg~§§

I
I

.----------------------------+------------~
I ERR=
I
210
I
.----------------------------f------------~
I EXP and ARG
I
480
I
.----------------------------+-------~----~
I FIND
I
4C
I
t----------------------------f------------~
I FORl'flAT
I
208
I
~----------------------------+------------~
I FORMAT STA
I
30
I
r----------------------------+------------~
I
14
I
I GOTO
t----------------------------+------------~
I IF
I
24
I
t----------------------------+------------~
I
218
I
I IOL DO CLOSE
r----------------------------+------------~
I IOL DO DATA
I
21C
I

r----------------------------f------------i
I 10 LIST
I
214
I

t----------------------------+------------~
I
60
I

1 LOGICAL IF

r----------------------------f------------i
I NAMELIST
I
204
I

r----------------------------+------------~
I PAUSE
I
38
I
t----------------------------+------------~
I READ WRITE
I
48
I
r-------~--------------------t------------~
I RETURN
I
50
I
t----------------------------+------------~
I STANDARD PRINT UNIT
I
234
I
r----------------------------+------------~
I STANDARD PUNCH UNIT
I
238
I

r----------------------------t------------i
I STANDARD READ UNIT
I
230
I

~----------------------------+------------~
, STOP
I
64
I

r----------------------------f------------i
I SUBPROGRAM
I
40
I

.----------------------------t------------~

I

TRACE OFF
I
70
I
~----------------------------f------------i
I ____________________________
TRACE ON
I ____________
6C
L
.1.
JI

SECTION 2:

This section describes in detail the
Invocation phase and the five processing
phases of the compiler and their operation.
The I~YROL module is also described.

INVOCATION PHASE (IEYFORT)
The Invocation phase is the compiler
control phase and is the first and last
phase of the compiler.
(The logic of the
phase is illustrated in Chart 00.) If the
compiler is invoked in an EXEC statement,
control is received from the operating
system control program. However, control
may be received from other programs through
use of one of the system macro instructions: ~AL~, LINK, or ATTACH.
IEYFORT performs compiler initialization, expansion of roll storage assignment,
input/output request processing, and compiler termination.
The following paragraphs describe these operations in greater
detail.

IEYFORT, CHART 00
IEYFORT is the basic control routine of
the Invocation phase.
Its operation is
invoked by the operating system or by
another program through either the CALL,
LINK, or ATTACH macro instructions.
The
execution of IEYFORT includes scanning the
specified compiler options, setting the
ddnames for designated data sets, initializing heading information, and acquiring
time and date information from the system.
IEYFORT sets pointers and indicators to
the options" data sets, and heading information specified for use by the compiler.
The options are given 1n 40 or fewer
characters, and are preceded in storage by
a binary count of the option information.
This character count immediately precedes
the
first location which contains the
option data. The options themselves are
represented in EBCDIC.
On entry to IEYFORT, general register 1
contains the address of a group of three or
fewer pointers. Pointer 1 of the group
holds the beginning address of an area in
storage that contains the execute options
specified by the programmer (set in the
OPTSCAN routine).

COMPILER OPERATION

Pointer 2 contains the address of the
list of DD names to be used by the compiler
(set in the DDNAMES routine).
Pointer 3 contains the address of the
heading information.
Heading data
may
designate such information as the continuation of pages, and the titles of pages.
If the FORTRAN compiler is invoked by
the control program (i.e., called by the
system), pointers 2 and 3 are not used.
However, if the compiler is invoked by some
other source, all pointers may be used.
The latter condition is determined through
an interrogation of the high order bit of a
pointer. If this bit is set, the remaining
pointers are nonexistent.
Nevertheless,
pointers 1 and 3 may exist while pointer 2
is nonexistent; in this case, pointer 2
contains all zeros.
During the operation of IEYF0RT, the
SYSIN and SYSPRINT data sets are always
opened
through use of the OPEN macro
instruction. The SYSLIN and SYSPUNCH data
sets are also opened depending upon the
specification of the LOAD and DECK options.
The block sizes of these data sets are set
to 80, 120, 80 and 80, respectively. These
data sets may be blocked or unblocked
(RECFM=F, FB, or FBA) depending upon the
DCB specification in the DD statements.
IEYFORT concludes the compiler initialization process with a branch to the first
processing phase of the compiler, Parse
(IEYPAR) •
From this point in the operation of the
compiler, each processing phase calls the
next phase to be executed. However, the
Invocation phase is re-entered periodically
when the compiler performs such input/
output operations as printing, punching, or
reading.
The last entry to the Invocation
phase is at the completion of the compiler
operation.

IEYPRNT is the routine that is called by
the compiler when any request for printing
is issued. The routine sets and checks the
print controls such as setting the line
count, advancing the line count, checking
the lines used, and controlling the spacing
before and after the printing of each line.
These control items are set, checked, and
inserted into the SYSPRINT control format,
Section 2:

Compiler Operation

33

and the parameter information and print
addresses are initialized for SYSPRINT.
If there is an error during the printing
operation, EREXITPR sets the error code
resulting from the print error. Any error
occurring during an input/output operation
results in a termination
of
compiler
operation.

PRNTHEAD is called by IEYPRNT after it
has been determined that the next print
operation begins on a new page. The program name and the new page number placed
into the heading format and any parameter
information and
origin
addr'esses
are
inserted int.o the SYSPRINT format.
If an
optional heading is specified by the programmer, it is inserted into the print line
format.
A PUT macro instruction is issued
to print the designated line, and all print
controls are advanced for the next print
operation.

IEYREAD, Chart 01A4
IEYREAD is called by the compiler at the
time that a read operation is indicated.
It reads input in card format from SYSIN
using the GET macro instruction. IEYREAD
can handle concatenated data sets.
If an error occurs during the read
operation, the routine EREXITIN is called.
This routine
checks
the
error
code
generated and prints the appropriate error
message.

PRNTMSG, Chart 03Al
PRNTMSG is called when any type of
message is to be printed. The print area
is initialized with blanks and the origin
and displacement controls are set. The
message is printed in two segments; each
segment is inserted into the print area
after the complete message length is determined and the length and origin of each
segment has been calculated.
Once the
entire message has been inserted, the carriage control for printing is set and
control is transferred to the system to
print the message.
IEYMOR, Chart 01Dl
IEYMOR is called when additional roll
storage area is needed for compiler operation. This routine may be entered from any
of the processing phases of the compiler.
The GETMAIN maCro instruction is issued by
this routine and transfers control to the
system for the allocation of one 4K-byte
block of contiguous storage. The system
returns to IEYMOR with the absolute address
of the beginning of the storage block in
general register 1.
Once the requested
storage space has been obtained, IEYMOR
returns to the invoking phase.
If the
system is unable to allocate the requested
storage, inactive modules of the compiler
are deleted. Those preceding the currently
active module are deleted first; then those
following it are deleted, if necessar}p.
Should additional space be needed after all
inactive
modules are deleted, compiler
operations are terminated.
When IEYMOR returns to the invoking
phase with the absolute address of the
storage block in general register 1, the
invoking phase then stores the contents of
register 1 in the ROLL ADR table.
The ROLL ADR table is used by the
compiler to record the addresses of the
different blocks of storage that have been
allocated for additional roll capacity.
The contents of the table are later used in
IEYRETN for releasing of the same storage
blocks.

When a punch
output
operation
is
requested by the compiler, control is transferred to the IEYPCH routine. The LOAD
and DECK options are checked to determine
what output to perform.

IEYNOCR

Any errors' detected during output result
in a transfer of control to the EREXITPC,
for SYSPUNCH, or EREXITLN, for SYSLIN,
routine.
The routine sets a flag so that
no further output is placed on the affected
file.

IEYNOCR
is
called by PRESS MEMORY
(IEYPAR) whenever it is unable to obtain at
least 32 bytes of unused storage.
IEYNOCR
prints
the message NO CORE AVAILABLE,
branches to a subroutine that checks to see
if there are any source language cards to
be disregarded, and then exits to IEYRETN.

34

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
IEYR~TN,-fh~~1-Ql~~

The
compiler
termination
routine
(IEYRETN) is invoked by Exit (IEYEXT) or by
one of the input/output routines after the
detection of an error.
The routine first obtains the error
condition code returned by the compiler and
tests this value against any previous value
received during the compilation. The compiler communications area for the ·error
code is set to the highest code received
and a program name of "Main" is set in the
event of multiple compilations. The routine then checks general register 1 for the
address of the ROLL ADR table. Each entry
of the ROLL ADR table indicates the beginning of a 4K-byte block of roll storage
that must be released. A FREEMAIN macro
instruction is issued for each block of
storag~ indicated in the table until a zero
entry is encountered (this denotes the end
of the ROLL ADR table).

The presence of more than one source
module in the input stream is checked by
interrogating the end-of-file indication
and the first card following this notation.
If another compilation is indicated, the
line, card, and page count control items
are reinitialized and all save registers
used by the Invocation phase are restored.
The number of diagnostic messages generated
for the compilation is added to a total
count for the multiple compilation and the
diagnostic error count is reset to zero.
The first processing phase of the compiler,
Parse (IEYPAR), is called and the operation
of the compiler proceeds as described in
the previous paragraphs and those pertaining to the processing phases.
If another compilation is not indicated,
a check is made to determine if there was a
multiple compilation. If there was a multiple compilation, an indication of the
total
number
of
diagnostic
messages
generated for all of the compilations is
printed. Also, routine IEYFINAL closes the
data set files used by the compiler (by
means of the CLOSE macro instruction). The
terminal error condition code is obtained
and set for the return to the invoking
program,
and
all saved registers are
restored before the return is made.
Routine IEYFINAL also receives control
from other compiler routines when an input/
output error is detected.

OPTSCAN determines the existence of the
parameters specifying the compiler options.
If options are specified, the validity of
each option is checked against the parameter table and the pointer to these options
is set once the options have been validated. The program name is noted depending
upon the presence or absence of the NAME
parameter.
However, if these options are
not specified, the first pointer of the
group of three supplied to the compiler by
the system contains zero.

DDNAMES scans the entries made for the
names of the data sets to be used by the
compiler.
The entries corre~ponding to
SYSN, SYSIN, SYSPRINT, and SYSPUNCH are
checked; if an alternate name has been
provided, it is inserted into the DCB area.

HEADOPT determines the existence of the
op,tional heading information.
If
such
information exists,
its length is determined, it is centered for printing, and
then is inserted into the Printmsg Table,
with pointer 3 being set.

TIMEDAT serves only to obtain the time
and date information from the system and to
insert the data into the heading line.

OUTPUT FROM IEYFORT
The following paragraphs describe the
error messages produced during the operation of the Invocation phase. These messages denote the progress of the compilation,
and
denote the condition which
results in the termination of the compiler.
IEY028I NO CORE AVAILABLE
TERMINATED

COMPILATION

The system was unable to provide a
4K-byte block of additional roll
storage
and
PRESS
MEMORY was
entered. It, too, was unable to
obtain space.
The condition code
is 16.
Section 2:

Compiler Operation

35

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
Multiple Compilations

IEY0291 DECK OUTPUT DELETED

following message appears at
the end of a multiple compilation
to indicate the total number of
errors that occurred. The message
will not appear if the compiler is
terminated because of an error condition or if the compilation consisted of only one main or one
subprogram.
Th~

The DECK option has been specified,
and an error 6ccurred during the
process of punching the designated
output. No error condition code is
generated for this error.
IEY0301 LINK EDI'l' OUTPUT DELETED

*STATISTICS*
STEP

The LOAD 'option has been specified,
and an error occurred during the
process
of generating the load
module. The condition code is 16.

NO

DIAGNOSTICS

THIS

or
*STATISTICS*
STEP

nnn

DIAGNOSTICS THIS

IEY0311 ROLL SIZE EXCEEDED
where:
This message is produced when:
(1)
The: WORK or EXIT roll has exceeded
the storage capacity assigned; or
( 2) Anot.her roll used by the compiler has exceeded 64K bytes of
storage, thus making it unaddressable.
(This condition applies to
all rolls except the AFTER POLISH
and CODE rolls.)
The condition
code is 16.
IEY032I NULL PROGRAM
This message is produced when an
end-of-data set is encountered on
the input data set prior to any
valid source statement. The condition code is o.
IEY0341 I/O ERROR (COMPILATION
xxx ••• xxx

TERMINATED]

This message is produced when an
input/output error is detected during compilation.
If the
error
occurred on SYSPUNCH, compilation
is continued and the COMPILATION
TERMINATED portion of the message
is not printed. The condition code
is 8. If the error occurred on
SYSIN, SYSPRINT, or SYSLIN, compilation is terminated.
The condition code is 16. xxx ••• xxx is the
character string formatted by the
SYNADAF macro instruction. For an
interpretation of this information,
see the publication IBM System/3~Q
~ratin9
System:
Supervisor and
Dat.a Management Macro- Instructio!!§,
Form C28-6647.
IEY035I UNABLE TO OPEN

ddnam~

Thi.s message is produced when the
required
ddname data definition
card is missing or the ddname is
misspelled.
36

nnn

is the total number of diagnostic
messages for the multiple compilation
expressed as a decimal integer.

PHASE 1 OF Ttl,E

COMPIL~g_:_E[!RSL.L!.~~I~~g!.

The first processing phase
of
the
FORTRAN IV (G) compiler, Parse, accepts
FORTRAN statements in card format as input
and translates them. Specification statements are translated to entries on rolls
Which define the symbols of the program.
Active statements are translated to Polish
notation.
The Polish notation and roll
entries produced by Parse are its Er~m~r~
QutP~t.
In addition, Parse writes out all
erroneous statements and the associated
error messages.
Parse produces a full
source module listing when the
SOURCE
option is specified.
The following descript~on of Parse consists of two parts. The first part, "Flow
of Phase 1," describes the overall logic of
the phase by means of both narrative and
flowcharts.
The second part, "Output from Phase 1,"
describes the Polish notation produced by
Parse. The construction of this output,
from which subsequent phases produce object
code, is the primary function performed by
Parse.
See Appendix C for the Polish
format for each statement type.
The source listing format and the error
messages produced by
Parse
are
also
discussed.
The
rolls manipulated by Parse are
listed in Table 3 and are mentioned in the
following description of the phase. At the
first mention of a roll,
its nature is
briefly described. See Appendix B for a
complete description of a format of a roll.

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y2B-6829
Table

3.

Rolls Used by Parse

r-------------------T---------------------,
Roll
Roll
No.

o

No.

Roll Name

Lib----

Source
Ind Var
4 Polish
5 Literal Const
Hex Const
6
7
Global
B Fx Const
9
FI Const
10 Dp Const
11 Complex Const
12 Dp Complex
Const
13 Temp Name
14 Temp
14 Error Temp
15 DO Loops Open
16 Error Message
17 Error Char
1B Init
19 Xtend Lbl
20 Xtend Target
Lbl
22 Array
24 Entry Names
25 Global Dmy
26 Error
L ___________________
27 Local Dmy

-28
29
30
31
32
33
35
36
37
38

1
2

39
40
41
42

43
44
45
46
53
54
55
56
59
60
63
~

Roll Name
Local-sprog
Explicit
Call Lbl
Namelist Names
Namelist Items
Array Dimension
Temp Data Name
Temp Polish
Equivalence
Used Lib
Function
Common Data
Cornmon Name
Implicit
Equivalence
Offset
Lbl
Scalar
Data Var
Literal Temp
Format
Script
Loop Data
Program Script
AT
Subchk
After Polish

____________________ _

Section 2:

Compiler Operation

36.1

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
FLOW OF PHASE 1, CHART 04
START COMPILER initializes the operation
of Parse, setting flags from the user
options, reading and writing
out
(on
option) any initial comment cards in the
source module, and leaving the first card
of the first statement in an input area.
This routine concludes with the transfer of
control to STATEMENT PROCESS.
STATEMENT PROCESS (G0631) controls the
operation of Parse.
The first routine
called by STATEMENT PROCESS is PRINT AND
READ SOURCE. On return from that routine,
the previous source statement and its error
messages have been written out (as defined
by user options), and the statement to be
processed (including any comment cards)
plus the first card of the next statement
will be on the SOURCE roll.
(This roll
holds the source statements, one character
per byte.) STATEMENT PROCE:SS then calls
STA INIT to initialize for the processing
of the statement and LBL FIELD XLATE to
process the label field of the statement.
On return from LBL FIELD XLATE, if an
error has been detected in the label field
or in column 6, STATEMENT PROCESS restarts.
Otherwise, STA XLATE and STA FINAL are
called to complete the translation of the
source
statement.
On return from STA
FINAL, if the last statement of'the source
module has not been scanned, STATEMENT
PROCESS restarts.
When the last card of a source module
has been scanned, STATEMENT PROCESS determines whether it was an END card; if not,
it writes a message. The routine then sets
a flag to indicate that no further card
images should be read, and calls PRINT AND
READ SOURCE to write out the last statement
for the source listing (depending on whether the SOURCE option was specified or was
indicated as the default condition at system generation time).
When no END card appears, two tests are
made:
(1) If the last statement was an
Arithmetic IF statement, the Polish notation must be moved to the AFTER POLISH
roll;
(2) If the last statement-Was-ofia
type which does not continue in sequence to
the next statement (e.g." GO TO, RETURN),
no code is required to terminate the object
module, and the Polish notation for an END
statement is constructed. on the POLISH
roll.
If the NEXT STA LBL FLAG is-off;
indicating that the last statement was not
of this type, the Polish notation for a
STOP or RETURN statement is constructed on
the POLISH roll, depending on whether the
source module is a main program or a
subprogram.

After the Polish notation for the STOP
or RETURN has been constructed on the
POLISH roll, the Polish notation for the
END statement is then constructed.
Parse keeps track of all inner DO loops
that may possibly have an extended range.
Parse tags the LABEL roll entries for those
labels within the DO loops that are possible
re-entry points from an extended
range. These tags indicate the points at
which general registers 4 through 7 must be
restored.
The appropriate LOOP DATA roll
groups are also tagged to indicate to the
Gen phase which of the inner DO loops may
possibly have an extended range. Gen then
produces object code to save registers 4
through 7.
After processing the last statement of
the source module, a pointer to the LOOP
DATA roll is placed on the SCRIPT roll, -the
IND"VAR:-roll is released;---and;---r¥ the
source--module was a main program, the
routine REGISTER IBCOM (G0707) is called to
record IBCOM as a required subprogram. For
all
source
modules,
the
information
required for Allocate is then moved to the
appropriate area, and the Parse phase is
terminated.

PRINT and READ SOURCE, Chart BA
PRINT AND READ
three functions:

SOURCE

CG0837) serves

1.

It writes out the previous source
statement and its error messages as
indicated by user options.

2.

It reads the new source statement to
be processed, including any comment
cards, as well as the first card of
the statement following the one to be
processed.

3.

It performs an initial classification
of the statement to be processed.

The statement to be written out is found
on the SOURCE roll. One line at a time is
removed from this roll and placed in a
120-byte output area from which it is
written out. The new statement being read
into the SOURCE roll is placed in an
80-byte input area and replaces the statement being written out as space on the
SOURCE roll becomes available.
Any blank
card images in the source module are eliminated before they reach the SOURCE roll.
Comment cards are placed on the SOURCE roll
exactly as they appear in the
source
module.
The last card image placed on the
SOURCE roll is the first card of the source
statement following tne one about to be
Section 2:

Compiler Operation

37

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
processed; therefore, any comment cards
that appear between two statements are
processed with the statement which precedes
them.
When an END card has been read, no
further reading is performed.
The initial classification of the statement that occurs during the operation of
this
routine determines, at most, two
characteristics about the statement to be
processed:
(1) If it is a statement of the
assignment type, i.e., either an arithmetic
or logical assignment statement or a statement function, or (2) If it is a Logical IF
statement, whether the statement "S"(the
consequence of the Logical IF) is
an
assignment statement. Two flags are set to
indicate the results of this ciassification
for later routines.
At the conclusion of this routine, all
of the previous source statements and their
errors have been removed from the SOURCE
roll and are written out. In addition, all
of the statements to be processed (up to
and including the first card of the statement following it) have been placed on the
SOURCE roll~

.STA INIT, Chart BB
STA INIT (G0632)
initializes for the
Parse processing of a source statement. It
sets the CRRNT CHAR CNT and the LAST CHAR
CNT to 1, and places the character from
column 1 of the source card in the variable
CRRNT CHAR.
It then determines, from a count made
during input of the statement, the number
of card images in the statement; multiplying this value by 80, STA INIT sets up a
variable (LAST SOURCE CHAR) to indicate the
character number of the last character in
the statement.
The routine finally releases the TEMP
NAME
roll and sets several flags
variables to constant initial values before
returning to STATEMENT PROCESS.

-and

LBL FIELD XLATE (G0635) first saves the
address of the current WORK and EXIT roll
bottoms. It then inspects the first six
colUmns of the first card of a statement.
It determines whether a label appears, and
records the label if it does.
If any
errors are detected in the label field ur
in column 6 of 1:he source card, LBL FIELD
XLATE records these errors for later print38

STATEMENT
PROCESS
ing and returns to
(through SYNTAX FAIL) with the ANSWER BOX
set to false.
Pointers to all labels within DO loops
are placed on the XT~~Q_~~~_foll~ Labels
that are jump targets (other than jumps
within the DO loop) are tagged to indicate
to Gen at which points to restore general
registers 4 through 7.
If the statement being processed is the
statement following an Arithmetic IF statement, LBL FIELD XLATE moves the Polish
notation for the Arithmetic IF statement to
the AFTER POLISH roll after adding a pointer to the label of the present statement to
it.

Under the control of STA XLATE (G0636)
the source module statement on the SOURCE
roll is processed and the Polish n9tation
for that statement is produced on the
POLISH roll, which holds Polish notation
for source statements, one statement at a
time.
Errors occurring in the statement
are recorded for writing on the source
module listing.

The addresses of the bottoms of the WORK
and EXIT rolls are saved. Then, if the
statement is of the assignment type (the
first flag set by PRINT AND READ SOURCE is
on), STA XLATE ensures that a BLOCK DATA
subprogram is not being compiled and falls
through to ASSIGNMENT STA XLATE (G0637).
If a BLOCK DATA subprogram is being compiled, STA XLATE returns after recording an
invalid statement error message.
If the
statement is not of the assignment type, a
branch is made to LITERAL TEST (G0640),
which determines the nature of the statement from its first word(s), and branches
to the appropriate routine for p~ocessing
the statement. The names of ·the statement
processing routines indicate their functions; for example, DO statements
are
translated by DO STA XLATE, while Computed
GO TO statements are translated by CGOTO
STA XLATE.

With the exception of LOGICAL IF STA
XLATE, the statement processing routines
terminate their operation through STA XLA'l'E
EXIT.
LOGICAL IF STA XLATE moves the
second flag set by PRINT AND READ SOURCE
(which indicates whether the statement "S"
is an assignment statement) into the first
flag,
and calls STA XLATE as a subroutine

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
for the translation of the statement "S."
When all of the Logical IF statement,
including "S," has been translated, LOGICAL
IF STA XLATE also terminates through STA
XLATE EXIT.

STA XLATE
EXIT
(G0723)
determines
whether errors in the statement are of a

severity level which warrants discarding
the statement.
If such errors exist, and
the statement is active (as opposed to a
specification statement), the Polish notation produced for the statement is removed
and replaced by an invalid statement driver
before
a return is made to STATEMENT
PROCESS. otherwise, the Polish notation is
left intact, and a return is made to
STATEMENT PROCESS.

section 2:

Compiler Operation

38.1

Form Y28 ... 6638-1
Page Rev~sed 11/15/68 by TNL

Y28~6826

§'IL£:ll!ALL_£h2.tl;~~

STA FINAL (G0633) inGreases the statement number by one for the state@ent just
processed.
It then dete+~ines whethe~ any
Polish notation has been produced on' the
POLISH roll; if no Polisn notation is
present, STA FINAL returns to STATE~ENT
PROCESS.
If the statement produced Polien notation of a type which may not close a DO
loop, STA FINAL bypasses the check for the
close of a DO loop. Otherwise, STA FINAL
determines whether the label (if there is
one) of the statement corresponds to the
label of the terminal statement of a DO
loop. If so, the label pointer (or pointers"
if the statement terminat~$ seve:t;al
DO loops) is removed from the ~~QQ~2-Q£lH
roll, which holds pointers to DO loop
t:erminal
statements until the terminal
statements are found.
When the statement is the target at a DO
loop, extended range checking is continued.
DO loops which have no transfers out 9£ the
loop are eliminated as extended range candidates. In addition, the nest level count
is reduced by one and the' informat.ion
concerning the array references in the
closed loop is moved from the SCRIP1 roll
to the PROGRAM SCRIPT roll.
STA FINAL then places the label pOinter
(if it is required) on the Polish notation
for the statement, and, at STA FINA~ END,
adds the statement number to the Polish.
Except when the statement just processed
was an Arithmetic IF statement, STA FINAL
END terminates its operation by moving the
Polish notation for the statement to the
AFTER POLISH roll.
In the case of the
Arithmetic IF, the Polish notation is not
moved until the label of the next statement
has been processed by LaL fIELD XLATE.
When the polish notation has been moved,
STA FINAL returns to STATEMENT PROCESS.

ACTIVE END STA XLATE (G0642) is invoked
by STATEMENT PROCESS when the END card nas
been omitted.anq the last statement in the
source module has been read. If toe last
statement was not a branch, toe :r;Qutine
determines whetheJ;!' a subpragra,m oX"· a main
program is being terminated. If it is a
subprogram,
the Polish notation for a
RETU~N is Gonstructed;
if it i$ a main
program, the Polish notat3ron fo~a STOP
statement is constructed.
I~
th~
l~st
statement
was
a branch, thi16 rQ'U~ine
returns without doing anything.

PROCESS POLISH (G0844) moves a count of
the number of words in the Polish notation
for a statement, and the Polish .notation
· for that statement, to the AFrER POLISH
rolL.

OUTPUT FROM PHASE 1
The output from Parse is the Polish
notation and roll entries produced for
source module active statements, the roll
entries produced for source module specification statements, and the source module
listing (on option SOURCE) and error messages.
The following paragraphs describe
the Polish notation and the source and
error
listings.
See
Appendix B for
descriptions of roll formats.

Polish Notation
The primary output from Phase 1 of the
compiler is the Polish notation for the
source module active statements.
This
representation of the statements is produced one statement at a time on the POLISH
roll~At the end of the processing of each
· statement, the Polish notation is transferred to the AFTER POLISH roll, where it
is held until it is required by later
phases of the compiler.
The format of the Polish notation differs from one type of statement to another.
The following paragraphs describe the general rules for the construction ot Polish
nota'tion for expressions.
The specific
formats of the Polish notation produced for
the various FORTRAN statements are given in
Appendix C.
Polish notation is a method Qf writing
arithmetic expressions whereby the tradi· tional sequence of "operand 1 " "operation"
"operand 2 " is altered toa functional notation of "operation" "operand 2 "
"operand1 . "
Use of this notation has the advantage of
eliminating the need for
brackets
of
various levels to indicate the order of
operations, since any "operand" may itself
be a sequence of the form "operation"
"operand" "operand," to any
level
of
nesting.
Assuming
expressions'
which
do not
include any terms enclosed in parentheses,
the following procedure is used to construct
the
Polish
notation
for
an
expression:
Section 2:

Compiler Operation

39

1.

At the beginning of the expression, an
artificial driver is placed on the
WORK roll; this driver is the Plus and
Below Phony driver, and has a lower
forcing strength
than
any arithmetic or logical operator.
(Forcing
strengths are given in Table 1.)

2.

As each variable name or constant in
the
expression
is encountered, a
pointer to the defining group
is
placed on the POLISH roll.

3.

When an operator is encountered, the
corresponding driver is constructed
and it is compared with the last
driver on the WORK roll:
a.

b.

If the current driver has a higher
forcing strength than the driver
on the bottom of the WORK roll
(the "previous" driver, for the
purposes of this discussion)" the
current driver is added to the
WORK roll and the analysis of the
expression continues.
If the current driver has a forcing strength which is lower than
or equal to the forcing strength
of the previous driver, then:
(1) If the previous driver is the
Plus and Below Phony driver,
the current driver replaces
the previous driver on the
WORK roll (this situation can
only occur when the current
driver is an EOE driver, indicating the end of the expression) and the analysis of the
expression is terminated.
(2) If the previous driver is not
the Plus and Below Phony driver~
the previous driver is
removed from the WORK roll and
placed on the POLISH roll, an~
the comparison of the current
driver against the previous
driver is repeated (that is,
using the same current driver,
this procedure is
repeated
from 3).

The sequence of operations which occurs
when the analysis of an expression is
terminated removes the EOE driver from the
WORK roll.
EX~Ele-±:
The expression A
the Polish notation

+

B

produces

where:
A
represents a pointer to the defining
group for the variable A
+
represents the Add driver. This notation is produced from the top down; when it
is read from the bottom up, the sequence
described above for Polish notation is
satisfied.

operations
this Polish

Explanation:
The
following
occur in the production of
notation:

driver

is

1.

The Plus and Below Phony
placed on the WORK roll.

2.

A pointer to A is placed on the POLISH
roll.

3.

An Add driver is constructed and compared with the Plus and Below Phony
driver on the bottom of the WORK roll;
the Add driver has a higher forcing
strength and is therefore added to the
WORK roll (according to rule
3a
"
above) •

4.

A pointer to B is placed on the POLISH
roll.

5.

An EOE (end of expression) driver is
constructed and compared with the Add
driver on the bottom of the WORK roll;
the EOE driver has a lower forcing
strength, and the Add driver is therefore removed from the WORK roll and
added to the POLISH roll (rule 3b2).

6.

The EOE driver is compared with the
Plus and Below Phony driver on the
bottom of the WORK roll; the EOE
driver has a lower forcing strength,
and therefore (according to rule 3bl)
replaces the Plus and Below Phony
driver on the WORK rollo

1.

The analysis of the expression is
terminated and the EOE driver
is
removed
from the WORK roll.
The
Polish notation for the expression is
on the POLISH roll.

The expression
ExamEle 2:
produces the Polish notation

A

+

B

/ C

A
B
C
/
+

A
B

+

40

which, read from the bottom up, is + / C
A.

B

Explanation:
occur in the
notation:

The
following operations
production of this Polish

1.

The Plus and Below Phony driver is
placed on the WORK roll.

2.

A pointer to A is placed on the POLISH
roll.

3.

An Add driver is constructed and compared with the Plus and Below Phony
driver; the Add driver has the higher
forcing strength and is placed on the
WORK roll.

4.

A pointer to B is placed on the POLISH
roll.

5.

A Divide driver is constructed and
compared with the Add driver; the
Divide driver has the higher forcing
strength and is placed on the WORK
roll.

6.

A pointer to C is placed on the POLISH
roll.

7.

An EOE driver is constructed and compared with the Divide driver; since
the EOE driver has the lower forcing
strength, the Divide driver is moved
to the POLISH roll.

8.

The EOE driver is compared with the
Add driver; since the EOE driver has
the lower forcing strength, the Add
driver is moved to the POLISH roll.

9.

The EOE driver is compared with the
Plus and Below Phony driver; since the
EOE driver has the lower
forcing
strength,
it replaces the Plus and
Below Phony driver on the WORK roll,
and the analysis of the expression
terminates with the removal of one
group from the WORK roll.

Example 3:
The expression
produces the Polish notation

A

/

B

- C

A
B

which, read from the bottom up, is - C /

B

A.

1.

A pointer to A is placed on the POLISH
roll.

3.

A Divide driver is constructed and
compared with the Plus and Below Phony
driver; the Divide driver has the
higher forcing strength and is added
to the WORK roll.

4.

A pointer to B is placed on the POLISH
roll.

5.

A Subtract driver is constructed and
compared with the Divide driver; the
Subtract driver has a lower forcing
strength, therefore the Divide driver
is moved to the POLISH roll.

6.

The Subtract driver is compared with
the Plus and Below Phony driver; the
Subtract driver has the higher forcing
strength and is added to the WORK
roll.

7.

A pointer to C is placed on the
roll.

8.

An EOE driver is constructed and compared with the Subtract driver; since
the EOE driver has a lower forcing
strength, the Subtract driver is moved
to the POLISH roll.

9.

The EOE driver is compared with the
Plus and Below Phony driver; the EOE
driver replaces the Plus and Below
Phony driver on the WORK roll and the
analysis of the expression is terminated.

POL~SH

Recursion is used in the translation of
an expression when a left parenthesis is
found; therefore, the term enclosed in the
parentheses is handled
as a
separate
expression.
The following three examples
illustrate the resulting Polish notation
when
more
complicated expressions are
transformed:
EXE!:£22!2!!
1. A-B*(C+D)
2. (A-B)/(C*D)
3. X/Z/(X-C)+C**X

Polish Notation

~BA----

/*DC-BA
+**Xc/-cx/zx

The following should be noted with
spect to the exponentiation operation:

/
C

Explanation:
occur in the
notation:

2.

The
following operations
production of this Polish

The Plus and Below Phony driver is
placed on the WORK roll.

re-

• Exponentiations on the same level are
scanned right to left.
Thus,
the
expression A**B**C**D is equivalent to
the expression A**(B**(C**D».
• Two groups are added to the POLISH roll
to indicate each exponentiation operation.
The first of these is the Power
driver; the second is a pointer to the
group on the global subprogram roll
(GLOBAL SPROG roll) which defines the
Section 2:

Compiler Operation

41

required exponentiation routine. Thus,
the expression A ** B produces the
following Polish notation:
Pointer to A
Pointer to B
Power driver
Pointer to exponentiation routine
The concept of Polish
no·tation
is
extended in the FORTRAN IV (G) compiler to
include not only the representation of
arithmetic expressions, but also the representation of all parts of the active statements of the FORTRAN language. The particular notation produced for each type of
statement is described in Appendix C. Once
an entire source statement has been produced on the POLISH roll, phase 1 copies
this roll to the AFTER POLISH roll and the
processing of the next statement begins
with the POLISH roll empty.

is catastrophic, at least to part of the
statement being scanned.
The second technique is a
jump to an error recording
routine,
such as ALLOCATION FAIL or SUBSCRIPTS FAIL, which records the error and
jumps to FAIL.
The third technique is the
use of one of the instructions, such as
IEYCSF or IEYQSF, which automatically jump
to SYNTAX FAIL if the required condition is
not met.
SYNTAX FAIL also exits through
FAIL.

If the statement being processed is
active and errors have been detected in it,
FAIL removes any Polish notation which has
been produced for the statement from the
POLISH roll, replacing it wit.h an error
indicator.
FAIL then restores WORK and
EXIT roll controls to their condition at
the last time they were saved and returns
accordingly.

Source Listin'J
The secondary output from Parse is the
source module listing. If a source listing
is requested by the user (by means of the
option SOURCE),
source module cards are
listed exactly as they appear on the input
data set with error messages added on
separate lines of the listing.
If no
source module listing is requested, Parse
writes only erroneous statements and their
error messages.

Some translation routines modify the
action of the FAIL routine through the use
of the IEYJPE instruction so that FAIL
returns immediately to the location following the IEYJPE instruction.
The translation routine can then resume the processing
of the statement from that point.

The follo'lllring paragraphs describe the
error recording methods used in phase 1,
the format of the source listing and the
error messages generated.

FORMAT OF THE SOURCE MODULE LISTING: Error
information for a source module card containing errors appears on the listing lines
immediately following that card. For each
error encountered, a $ sign is printed
beneath the active character preceding the
one which was being inspected when the
error was detected.
The only exception
would be in the case of a SYNTAX error.
In
such a case,
the $ sign undermarks the
character being inspected when the error is
detected.
The listing line which follows
the printed card contains only the $ sign
markers.

ERROR RECORDING: As a rule, Parse attempts
to continue processing source statements in
which errors are fou.nd. However,
certain
errors are catastrophic and cause Parse to
terminate processing at the point in the
statement where the error occurred.
Statements which cannot be
compiled
properly are replaced by a call to the
FORTRAN error routine IHCIBERH.
Throughout Parse,
three techniques of
error recording are used.
The first of
these is used when the error is not catastrophic. This method records the character position in the statement at which
the error was detected (by means of IEYLCE,
IEYLCT, or IEYLCF instructions> and the
number of the error type on the ERROR roll;
after recording this information,
Parse
continues to scan the statement.
The second and third techniques of error
recording are used 'when the error detected
42

The next line of the listing describes
the marked errors.
The errors are numbered
within the card (counting from one for the
first error marked); the number is followed
by a right parenthesis, the error number,
and the type of the error.
Three errors
are described on each line, for as many
lines as are required to list all the
marked errors on the source card.

The following is an illustration of the
printed output from phase 1:

DIMENSION.ARY(200), BRY(200) CRY(5,10,10)
$
1) IEY004I COMMA

IF (AA + BB) 15, 20, 250000
$

1)

IEY010I SIZE
ARY(J) = BRY
$
$
1) IEY002I LABEL
2) IEY012I'SUBSCRIPT
GTO 30
$

1)

IEY0131 SYNTAX

ERROR TYPES: The types of errors detected
and reported by Parse are described in the
following paragraphs. For each error type,
the entire message which appears on the
source output is given; the condition code
and a description of the causes of this
error follows the message.
IEY0011 ILLEGAL TYPE:
~his
message is
associated with the source module statement
when the type of a variable is not correct
for its usage. Examples of situations in
which this message would be given are:
(1)
~he variable in an Assigned GO TO statement
is not an integer variable;
(2) In an
assignment statement, the variable on the
left of the equal sign is of logical type
and the expression on the right side is
not. The condition code is 8.

!§~QQ7.!_!Q_£Q~f~!£!:
The name of a variable or subprogram is used improperly, in
. the sense that a previous statement or a
previous portion of the present statement
has established a type for the name, and
the present usage is in conflict with that
type. Examples of such situations are:
(1) The name listed in a CALL statement is
the name of a variable, not a subprogram;
(2) A single name appears more than once in
the dummy list of a statement function; (3)
A name listed in an EXTERNAL statement has
already been defined in another context.
The condition code is 8.
!~~QQ~! __ ~~~Q£~!!Q~:
Storage assignments
specified by a source module statement
cannot be performed due to an inconsistency
between the present usage of a variable
name and some prior usage of that name, or
due to an improper usage of a name when it
first occurs
in
the
source
module.
Examples of the situations causing the
error are:
(1) A name listed in a COMMON
block has been listed in another COMMON
block: 2) A variable listed in an EQUIVALENCE statement is followed by more than
seven subscripts. The condition code is 8.

IEY009I ORDER: The statements of a source
module are used in an improper sequence.
This message is produced,
for example,
when:
(1) An IMPLICIT statement appears as
anything other than the first or second
statement of the source module:
(2) An
ENTRY statement appears within a DO loop.
The condition code is 8.

able;-CO~MON-block;-NAMELIS~,

IEY0101 SIZE: A number used in the source
module does not conform to the legal values
for its use. Examples are:
(1) The size
specification in an Explicit specification
statement is not one of the acceptable
values: (2) A label which is used in a
statement exceeds the legal sIze for a
statement label: (3) An integer constant is
too large. The condition code is 8.

4.

IEYOll1 UNDIMENSIONED:
A variable name
Indicates-an-arraY-7I;e., subscripts follow
the name), and the variable has not been
dimensioned. The condition code is 8.

IEY0021 LABEL: This message appears with a
statement which should be labeled and is
not. Examples of such statements are:
(1)
A FOR~mT statement; (2) The statement following a GO TO statement.
The condition
code for the error is o.
IEY0031

NAME

LENGTH:

The name of a varior subprogram
exceeds six characters in length.
If two
variable names appear in an expression
without a separating operation symbol, this
message is produced. The condition code is
IEY004I COMMA:
A comma is supposed to
appear in a statement and it does not. The
condition code is O.
IEY005I ILLEGAL LABEL:
The usage of a
label is invalid for example, if an attempt
is made to branch to the label of a FORMAT
statement, ILLEGAL LABEL is produced. The
condition code is 8.
IEY006I DUPLICATE LABEL: A la.bel appearing
in the label field of a statement is
already defined (has appeared in the label
field of a previous statement). The condition code is 8.

IEY012I SUBSCRIPT:
The number of subscrIpts--used--In- an array reference is
either too large or too small for the
array. The condition code is 8.
IEY013I SYNTAX: The statement or part of a
statement to which it refers does not
conform to FORTRAN IV syntax. If a statement cannot be identified, this error message is used.
Other cases in which it
appears are:
(1) A non-digit appears in
the label field;
(2) Fewer than three
labels follow the expression in an Arithmetic IF statement. The condition code is
8.

Section 2:

Co~piler

Operation

43

Form Y28-6630-1
Page Revised 7/23/69 by TNL Y28-6829
IEY014I CONVERT: In a DATA statement or in
an Explicit specification statement containing data values, the mode of the constant is different from the mode of the
variable with which it is associated.
The
compiler
converts the constant to the
correct mode~ Therefore, this message is
simply a notification to the programmer
that the conversion is performed.
The
condition code is o.
The source module
IEY0151 NO END ~ARD:
The
does not contain an END statement.
condition code is o.
IEY0161 ILLEGAL STA.:
The statement to
which it is attached is invalid in the
context
in
which
it has been used.
Examples of situations in whi~h this message appears are:
(1) The statement S in a
Logical IF statement (the result of the
true condition) is a specification statement, a DO stabement, etc.; 2) An ENTRY
statement appears in the source module and
the source module is not a subprogram. The
condition code is 8.
IEY0171 ILL:EGAL STA.
WRN
A RETURN I
statement appears in any source module
other than a SUBROUTINE subprogram. The
condition code is o.
IEYOl8I NUMBER ARG:
A reference to a
library subprogram appears with the incorrect number of arguments
specified.
The condition code is 4.
IEY0271 CONTINUATION CARDS DELETED: More
than 19 continuation lines were read for 1
statement.
All
subsequent
lines are
skipped until the beginning of the next
statement is encountered.
The condition
code is 8.
IEY0331 COMMENTS DELETED:
More than 30
comment lines were read between the initial
lines of 2 consecutive statements. The
31st comment line and all subsequent comment lines are skipped until the beginning
of the next statement is
encountered.
(There is no restriction en the number of
comment lines preceding the first statement.) The condition code is o.
IEY036I ILLEGAL LABEL WRN: The label on
thIS-nonexecutable-statement has no valid
use beyond visual identification, and may
produce errors in the object module if the
same label is the target of a branch-type
statement.
(Only branches to executable
statements are valid.)
This message is
produced, for example, when an END statement is labeled. The message is issued as
a warning only. The condition code is 4.
44

IEY037I PREVIOUSLY DIMENSIONED

WRN.:

The

array--flagged--has-~een-prevIously dimen-

sioned. The dimensions that were given
first are used. Examples of this error are
(1) a DIMENSION statement defining an array
with a subsequent COMMON statement defining
the same array with new dimensions, or (2)
array dimensions specified in a Type statement and also. in a subsequent DIMENSION
and/or COMMON statement.
The condition
code is 4.
IEY038I SIZE WRN.:
A variable has data
initializing values that exceed the size of
the scalar,
the array, or the array element. Examples of this error are (1)
the
specification REAL A/'ABCDE'/ where A has
not been previously dimensioned (i.e., A is
a scalar), or (2) the specification
DATA A(l)/7H ABCDEFG/ where A has been
previously dimensioned. The condition code
is 4.

PHASE 2 OF THE COMPILER:

ALLOCATE (IEYALL)

Phase 2 of the compiler performs the
assignment of storage for the variables
defined in the source module. The results
of the allocatiQn operations are entered on
tables which are left in storage for the
next phase.
In addition, Allocate writes
(on option) the object module ESD cards,
the TXT cards for NAMELIST tables, literal
constants, and FORMAT statements, and produces
error messages and storage maps
(optionally) on the SYSPRINT data set.

The following paragraphs describe the
operations of Allocate in two parts. The
first part, "Flow of Phase 2," describes
the overall logic of the phase by ffieans of
narrative and floweharts~

The second part, "Output from Phase 2,"
describes the error messages and memory
maps which are produced on the source
module listing during the operation of the
phase, as well as the ESO and TXT cards
produced.
It also describes the types of
error detection performed during Allocate.

Rolls manipulated by Allocate are listed
in Table 4, and are briefly described in
context.
Detailed descriptions of roll
structures are given in Appendix B.

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829

Table

4.

Rolls Used by Allocate

r-------------------T--------------------,
IRoil
IRoIl
INo.

Roll Name
INo.
Roll Name
Source
1 39 Halfword
I 5 Literal Const
I
Scalar
I 7 Global Sprog
I 40 Common Name
I 14 Temp
1 41 Implicit
I 15 Do Loops Open I 42 Equivalence
Offset
1 18 Init
t
I 19 Equiv Temp
I 43 Lbl
I 20 Equiv Hold
I 44 Scalar
I 21 Base Table
I 45 Data Var
I 22 Array
I 47 Common Data
'Iemp
I 23 Dmy Dimension I
I 24 Entry Names
I 48 Namelist
Allocation
1 25 Global Dmy
I
I 26 Error Lbl
1 48 Common Area
I 27 Local Dmy
49 Common Name
Temp
J 28
Local Sprog
50 Equiv
I 29 Explicit
Allocation
I 30 Error Symbol
52 Common
I 31 Namelist Names
Allocation
I 32 Namelist Items
53 Format
I 34 Branch Table
60 Subchk
I 37 Equivalence
68 General
I 31 Byte Scalar
Allocation
I 38 Used Lib
I
Function
I _______________
39 Common Data ____ ____________________ J1
L

1 1

~

~

section 2:

Compiler Operation

44.1

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6S29
FLOW OF PHASE 2, CHART 05
START ALLOCATION (G0359) controls the
operation of the Allocate phase. The primary function of this routine is to call
the subordinate routines which actually
perform the operations of the phase.
The operation of Allocate is divided
into three parts: the first part performs
initialization; the second part (called
pass 1) makes an estimate of the number of
base table entries required to accommodate
the data in the object module; the third
part actually assigns storage locations for
the object module components, leaving indications of the assignment in main storage
for use by subsequent phases.
The first part of Allocate's operation
is performed by calling the routines ALPHA
LBL AND L SPROG, PREP EQUIV AND PRINT
ERRORS, BLOCK DATA PROG ALLOCATION, PREP
DMY DIM AND PRINT ERRORS, PROCESS DO LOOPS,
PROCESS IBL AND LOCAL SPROGS, BUILD PROGRAM
ESD,
ENTRY
NAME
ALLOCA~ION,
COMMON
ALLOCATION AND OUTPUT, and EQUIV ALLOCATION
FRINT ERRORS.
After return from EQUIV ALLOCATION PRINT
ERRORS, START ALLOCATION initializes for
and begins pass 1.
The variable PROGRAM
BREAK, which is used to maintain the relative address being assigned to an object
module component, is restored after being
destroyed during the allocation of COMMON
and EQUIVALENCE.. The groups in the BASE
~ABL~-f0ll .
PRINT
PAGE
.'
• PAGE HEADING

o.

•
•

••••••••••••••••.

••••

t

•

I

• NO

.J...
• E4 •
. . . . . ..

•
ADVANCE
•
:LINE COUNT ONE :

·. . ·. T......·.
o. o·

F4

.. ..

." *.
MAX

... .0

.. ....

' . LINES USED

:.~~.: :.:~. :->
1
:~~;~;::::;;;~:
:.. ::~;::::::...:

•
SCAN
: REP~~~~NTS

IEYF22

••

IEYF25
: •••• E4 ••••••••• :

NO

• ••••••••••••
... .......

:.::.:

:.::. :->1

SYSTEM
OPEN FOR
SYSPUNCH

•

••

••••

.' •

*.

.'.

••••

t.

i'
"
:
:
:
······F3· . ·········

••
+.
••
DDNAMES ' . NO
'.
SPECIFIED •

YES

•
•
:

: .::':

' . DECK
OPTIONS
*0
.
.* •

••

*. *0 ... .."

SAVE
LINE COUNT
ORIGIN

.

*->

IEYF05

•
•
•

.. '"

•
•
:

··:::···1·······
.

.:~~:~~!~.-.-~~~:
····E2··········

•

'---1

04

... E3

*oo

: •••• C4 ••••••••• :

*.

.*

SYSTEM
OPEN FOR
SYSLIN

·......T....·.
...

.INITIALIZE SAVE'
:
REGISTERS
:

. . . . . . . r......
1 ....
······03·.·.·.·····
*0

'INITIALIZE BASE.
:
REGISTERS
:

F2

.

. . ·. T....·.

YES

SCAN
COMPILER
OPTIONS

:

: •••• B4 ••••••••• :

.'. •

' . LOAD OPTION •

: ...... 02 ••••••••• :

•
•
•

C3

IEYPRNT

.......1'......

·

SYSTEM OPEN •
FOR SYSIN AND
•
SYSPRINT
•

. * .'

•
ENABLE
•
• INTBRRUPTS BY •

·

:

.·····83···········

: •••• B2 ••••••••• :

I

• •••• A4 ••••••••••

•
INITIALIZE
•
• TIME AND DATE •
•
INFORMATION •

:

•
INITIALI ZE
• AND SET SAVE
:
REGISTERS

IEYPRNT

IEYFOl

IEYFORT

'f"..

.... G4

.. ..

.....

YES.

...

•• ---->* 05 •

.'. ••

... ..

...

: •••• Gs ••••••••• :

.

NO . ' CARRIAGE •• YES
•
ADVANCE
•
---*.
CONTROL=O
•• -------->.LINE COUNT ONE •

0*

...

'"

'.;::...............::::::::i........

H4

. '. *0

••

•'
MAX
' . YES'
•
' . LINES USED •• ---->. 05 •

·0

*.

....

... 0"

••
• •••

• NO

::::::---->1
: •••• J4 ••••••••• :

•
STORE LINE
•
•
COUNT INTO
•
: SYSPRT FORMAT :

......·T·. . .
·····K"··········

•
SET.
• ••• KS •••••••••
• PARAMETERS AND •
•
RETURN
•
• PRINT ADDRESSES.-------->. TO COMPILER •

:.. ~::~.::::::..:

.................

Section 2:

Compiler Operation

59

IEYFORT (Part 2 of 4)

Chart 01.
ERLXITPR

·

..... "'. AI+- .................. ..

EREXITPR

.

PRNTHEAD

IEYREAD

··

• •••• A2 ••••••••••
•

. .

PRNTr!£AD

•

.... **

V

·····81··········

...
SET
•
EHrlOR CODE
.KESULTI NG FROM
:
PRINT ERROR

•
...
...
:

••••••••••• ** ••••

L>:~i;
. ·... .

IEYMOk

·····el·········.
:

IEYNOR

:

••••••• * •••••••

: •••• D1 ••••••••• :
• ISSUE GET~~IN •
.FOR 4K 3YTE:C; OF.<-•
STORAGE
•

.................

j

. · .,.,.
...

...

.

E1

---+. SUCCESSFUL

.

•

j

+

•

•
DELETE
•
• INACTIVE-MODULE·
+
•

·..................

j

.·

......

.."

.

·..................... ........
1

•
rtETURN WITH
•
•
POSITIVE
•
• CONDITION CODE •

...

·····Jl······· ...
..................
•
...
•
•

·

·

.

1

: •••• C2 •••• ++ ••• :

: •• +*C3 ••••••••• :
•
ACNA"lCE
..
:LINE COUNT TWO :

CONVERT
•
PAGE COUNT TO •
DECIMAL
:

1
·++···D2··········
.
·
.

·..................
....

PRHLJ05
: •••• D3 •••• * •••• :
•
•
•

: •••• E2 ••••••••• :

·

+
'SET PARMETER"
• AtlO ADDRESSES
INTO SYSPRT
•

•
•
•
•

.'"

..j

•••••••••••••• ***

•

•
:

····F4 .... • .. •••••
RETURN
•
TO COMPILER
:

• ••• *** •••••• **

·· ...--1
·
.
·
.
*.**

.. ····G4····· ...... ••

..
SAVE CARD
..
• ORIGIN OR ~OF •
•
NOTATION
•

...

•••••••• *** ••.••••

··1...
.+ ••

•

"'.

.. .. .. ..
I n,

·····J2·······
. ··••
•
OBTAIN
•
OFFSET AND
• CONTROL BLOCK •
:
INFORMATION
:

.................

.....1.
1:<3

•• .... *E4···· .. • .. •••
•
RESTORE
..
.SAVE REGISTERS *

....

:

...

.....

•

E4 ..

• **.

.

• ..... c5 . . . . . . . . . . .

•
•
•
•

. . . ·T. . ·.

•••••• D5 ........ + .... .
SYSTEM GET
ROUTINE,
• OBTAINS EOF •

***.****.*** •

****.******.*.***

.. G4

••
•• NO
•
•
...
OPTIONAL
•• ---->. 03 •
... HEADING ••
••

:

·
.
·:"::":->1
..
·
.
·.
..

•• **

LINE COUNT TO •
TWO
•

c5

...

OBTJI.IN CARD
•
OIHGIN AND
..
RESET FLAG.

j

·.............. ..
RETURN

..

: •••• D4 .......... :
•
•
•

••• +.F3.** •••••••
..

:

'1;"

j

•••••• *.* •••• * •••

SET

.

••••••••••••••• ++

1
·····F2······+···
·
.
· 1 ...

••

·....
.
.... :--1

• ***

.. · · · · E 3 · · · · · · · · ....
•
SLT
..
•
CARRIAGE
•
CON'!',WL TO
..
• SKIPP1NG LINE •

SET PROGRAM
•
•
NAi1E INTO
•
:HEADING FOR..'lAT :
•••••••••••••••• +

.
112

•

j

1

•

•

.................

• • • • • • • • • • • ++++ ••

•
•

SET LINe
COUNT AI-JD
ORIGIN

..

.
C4

j..

.

••
•• NO
.SET PARAMJ:;TERS
•• FIRST CARD
•• -------->. AND ADDRESSES
••
READ..
..
FOR SYSIN
'.
••
•
FORMAT

R"DO""

:·::·:->1

.SET PAGt: COUNT •
...
• INTO HEADING
•
FORMAT

.

.. ••• .. B4·· .... ••••••
..
SET BASE
•
AND SAVE
•
•
REGISTERS
•
•
•• + •• + •••• + ••• +++

•
•
:

-----------t

•
RETURN
•
wITH
• NON-POSITIVE
.CONDITION CODE

PRINT ClEADING

.+*.+ •• + •• * ••

"'

•••••••••••• * •• *.

..:+

······Hl···· . ·· ....
·..........................

60

..

COU:~T

1'0

...

•

···*·G2*·***··*·+

<;1

••
WER~
*. YES
+. A~Y DELETED •• --....

ADVANCE
PRINT PAGE

NO

........ Fl· .................. ..

.

•

j

83 :

: •••• 82 ••••••••• :

........................... "' ......

j

YES

j

:

..

····A4· .. ••••• .. •
IEYREAD
•
••• ++ ••••••• +++

E5

...j

••

--..
1 .....
: .::.:
1.
.•

~o

.•

*.

".

CONCATENATED ."
".DATA SE.1S ••

*.

. .

. ..

YES

... ···F5*···· .. • ... ••
.. SET SWITCh B •
•
FOR
•
..
• CONCATENATE!)
•
DATA SETS=O

..

********** ••• * •••

.....1.
:

..*.

C5 :

IEYFORT (part 3 of 4)

chart 02.

*

**** :1
*...

: A4
IEYPCH

EREXITIN

·.................

·

****A3*******··

...... ·At.· .. • .. ••••

•

EREXITIN

•

IEYPCH

vI

.

e* •• **A4*·**·*.**.*

·
·

••••• e 1
•

V

••• ***.*.******

.

OBTAIN
SYSIN ERROR
COUNT

*

**** ••••• *** ••• **

.

•*

..

• •• *.C2*********-

*. ••

*..*
* •• *

.*

..•

..•

YES
SET
.*------->.TERMINAL ERROR.
..
CODE
..

•*
.*

..

j"0

I
V

C3

...

*.

*. *.

o, •• ':OAD OPT! O~ ••

*.

*.*.*.*.**** •••••

v

SET FLAG
TO TURN OFF
SYSPCH

•e* •••••••• ** •••••*

I

.*

*,

*

NO

v

*
*

o,o,.o,

..

I

RETURN
TO COMP I LER

e •• _ •• e*_ ••••••

I

* ••
*
• YES

······CS··**_···_·..
V

V

****C4****.*ee •

..

SET
ERROR CODE
VALUE

*

_••• ***. * .....

.
..

....

.

•••••••••••• ** •••

..

.*.**02 ••• ******-

.

.

.SET UP BAD CARD.
.AND ABORT COMPo,
•
MESSAGES
•

V

••••• E 1****.*** ••
• PRNTMSG

03A 1.

*-*-*-*-*-*-*-*-*
PRINT
ERROR

:•••• :~~~~:~ ••• *:

I

.*

I

V

*-*-*-*-*-*-*-*-*
PRINT
MESSAGES

.

•• * ••••••••••••••

.....I

*.

*.

.....Fl··········
*
•

*
•

·03 •
.. *A~.

i

I
.....
.... C;*
.
v

*

.*

*****05·····*····•

*•

o,.•• 1YES

SET FLAG TO
..
.. TURN OFF LOAD *
LINKAGE
*
*

.*

*.** •••••• * •••••••

v
(::)

I

·.*.·ES··········
..
.

v
*··.*E3***··****·

V

o,SET
•
PARAMETERS **
* AND ADDRESSES •
*
FOR SYSPCH
*

..
SET ERROR
*
• CODE FOR LINK.
:
EDIT OUTPUT
..

...-.... ..........I
_

_

• ••• *.*.*.**.****

I

V

**
*

V

******F3·**·*·*****
SYSTEM
PUT ROUTINE
INSERTS
PARAMETER

SET
*TERMINAL ERROR *
*
CODE
•

........•..••....
•
*

Io.

* •• *

v

V

V

*•

NO

•·
••• E2*·········
.PRNTMSG
03A1 •
•

03
LOAD

••
FILE
•• TERMINATED

• •••••• **** ••••••

II

I

.* •

***.*

G3 •

v

SETUP B A D .
CARD IMAGE
MESSAGE

·01

•

I

EREXINOS

••••• 01 •••• ** •• **

·

*._ .. __ .......... *.*

..

v

*.

••
•• ERROR CODE 0

*.

I

V

**.**85·** ** •• *e.
*
..

:SAVE REGISTERS:

*** •• **** •• ***.*.

I

•••

V

.. ** ... *84"" .*e* **.*
*
•*
*
RESTORE

INITIALIZE
•
BASE AND SAVE •
REG I STERS
•

v

Cl

IEYF70

•

·

EREX I TPC

•• e . . . . . . . . . . . . .

• • I

V

•
•

··.·AS···· .. ····

:. :: . :->1

*****83***·*****-

*

*

•• ** ••• *.* •••

I

***

EREXITPC

SYSTEM
• PUT ROUTINE.
INSERT FILE
• PARAMETERS

1

I
.* •••••

*

B4

*
-

..

..:~~~;~~;~o,.

·· ... I
***.
* G3 o,->

****

V

IEYF60

•*

.*

.*.

G3

*•

*•

*.

NO

". DECK OPTION . * 1

*. *.

* •• *
-

.*
.*

v

YES

**_o,
..

*

.. .*** "

I

v

.o,.

•*

H3

DECK

 * A4

...................
..

*

•
*

*

section 2:

compiler Operation

61

Chart 03.

IEYFOR'r (Part 4 of 4)
" A3 "..
" * ..... "
..

PRNTMESG

*

I EYRTN

**"·AI"''''''·*-'''··
PRNTMSG

.. -*-*_ ... ** ..... *

**

"

IEYRETN

"
"

INITIALIZE
PRINT BUFFER
WI TH BLANKS

:

...

**
*

INITIALIZE
BASE AND SAVE
REGISTERS
"

B3

.".

".

*.

* •• *

v

"
"
"
"

SET UP
PRINT BUFFER
ORIGIN AND
DISPLACEMENT

"

"
OBTAIN
"
"
COMPILER
"
"COMMUNICATIONS"
..
ORIGIN
..

"
*****************

****-************

I

I

I

V

*****01**********

"

..
****"'********"'_'J ...

"
"

"

GET MESSAGE
LENGTH AND
ORIGIN

*****El**********

""
**
PLACE
*IST MSG SEGMENT"
"
IN PRINT
"
BUFFER
*
*

.... ** ............. **.****

I
I
I

V

***"'*F 1 *** ... **.* ..
*
"
"
"

GET
*
LENGTH AND
"
ORIGIN OF 2ND"
MSG SEGMENT
"

* ••• ** ••• *** .........

""
"
:

"

•• * ••••••••••••••

I

v

:****Hl •••• * •••
"
"
"

:.".*E2*********:
"TEST LAST ERROR"
"
CODE VS
"
PREVIOUS
"
SETTING
"
"

"
SET
"
•
FINAL ERROR
"
"COOE TO HIGHEST"
.VALUE RETURNED "

"
"
"

···. ··Jl····. ·. ····

·····G2·*
. . ·· . .
"
"
"
"
"

INSERT 'MAIN'
FOR PROGRAM
NAME OF NEXT
PGM

•....
....... *-_........... ..
"

:

H2 : ,

••••

.".
H2

••••• *** ...... ..

.~.*

.

E4 :

• * ANOTHER "'. *. NO
*.COMPILATION.* ' ' ' ,
*. * •• * .v

i'" :-: ":

.....................
I

J

...

4·"··ES··*******
RETURN

..

I

v

_ •••

:

H2

:

......

:** •• G4* ••v ***."":

*.
".

"ISSUE FREEMAIN •
"FOR RELEASE OF
"
STORAGE
:

NO

.*

*

i'" (::::

* •• *

.* ••••••••• ** ••••

v

ISSUE
CLOSE FOR
SYSPUNCH

:~~:;~~~;-.-~~:::
FREE STORAGE
USED BY

"

... ·· . . ·K2··········.

····KJ" .••••.•.

..

......•........

IEYPAR

"
"

..

.*

H4

....vI *.

"
..

A4

.
..
"

..
..

"

NO

.... ..
I
v

F4

..

..

H5

.."

I

*•

*. •• ... ...
"

..... "

:.**.HS ••v * •••••• :

."
ENO OF
". YES
". STORAGE TO
• "--,
It. RELEASE
."
I

"-->,,

* •• *~!~~~~~~.* •••

"

..

""

..... *J3.·········

:------->:

"

NO

I

*.

I

"
RESTORE""
:SAVE REGISTERS

".

.,,'''--1

V

V

"
"

*.

.OBT A I N ADORESS "
OF BLOCK TO
"
"
RELEA5E

.".................."

V

u

I

...

....... H3··········
""

I
I

I

........ if ..
.. F4 * - )

v

."
".

I

I

OECK

*.

I
I

H5 :

: ........ F4 .. ** ........ :

v

.".

G3

."

*.

" RE-INITIALIZE "
"LINE, CARD AND"
"
PAGE COUNT
"

RETURN

..........

". ".SPECIFIED."
OPTION
''',

v

IE'(R60

SYSTEM PUT
ROUTINE WRITE
"
MESSAGE
"

. ····K 1***··**··..

G3 :
...
..

I
:->1
..... **
...

*.

* ••
*
.. VE5

v

••••

:

• ••••••••• ** ......

V

*..*

G3

IEYFNL05

"
",
"
"

v
: ...... J2 ••• * ••••• :

I

62

··**"

J

••••
:

RELEASE
STORAGE

*.

I

* ••
*
.. YES

E4

.. "*"""

V

v

••

"ISSUE FREEMAIN ..
.. FOR OATA S[T
"
•
STORAGE.

v

"
"
..*****.****.-•••

* •••• **** ••••••••

I

E4 : ,

."
*.

PRINT DATA
SET STATUS
ME SSAGE

:

I

V

····*05**···*·**..
..

03A5"

:":~~,,;!~~~!~!,,,,:

NO

I

I
I
I

I
I

FREE STORAGE
"--,
USED BY SYSIN"
I

:

..

..
TO.
"

.***.** •••• *** .....

*-*-*-*_*_*_4_*_*

"
"

v
. ............ F3.......................

V

COMPUTE
"SIZE OF AREA
"
BE FREED

I

.*
".

""

V

IEYR50.".

*.

V

**·**(5**··******

"

**.*

*.

I

v

"FREEf'OOL

I

***··F2*······***

"

SET
CARRIAGE
CONTROL

.*

*.

I
I
I

:

*:

."

E3

I

..**.04 .... ******.

03A5"

"

LOAD DATA
SET BUFFER
AODRE.SS

..** ••• _••••••••••

".~:SLlN lJUTP~!'''1

** •• *** .. ***** .. ***

V

PLACE 2ND
"
SEGMENT I N "
PRINT BUFFER
:

*....

v

.".

..

ISSUE CLOSE
"
FOR SYSIN AND"
SYSPRINT
"

"
"

I

I

I

V

·****Gl*********·

""

:"""*~!;~!~""""":
I

v

*·**·B5·****~**·*

.. ****C4*****· .. ·**

FREE STORAGE
USED BY

I

I

:

**** .. ****.***
I
.****. I

IEYFNLIO

*-*-*-*-*-*-*-*-4

"
"

C4

FREEPOOL

*""",," :,,::,,:->1

I

*FREEPOOL

GET CONDITION ..
CODE RETURNED "
BY COMPILER
"

I

: G3:

*****03."."'......

..

V

I
v

v

V

:

PRINT DATA
SET STATUS
MESSAGE

""*"

• *** ..............

*****02*********·

"
"

.*

ISSUE
CLOSE FOR
SYSL I N

.. ·***AS********· ..
"

.... *** .. B4 ** ....... * ** ......

V

*****C2**********

FREE POOL

*. NO

v

...

I
I
*····C3*···*4
•• **..
"

I

I

...

I

YES

I

V

." .*.

DECK

I

"

*****Cl**********

A4

* ••• ~~6~~~D . *' *--1
it.
.'
I
* ••
*
v
.. YES
••••

."
LOAD
". NO
".
OPTION
."--,
".SPECIFIED."
I

****.*** ••• ** ...... *.

I

...

I

*****82*****"*"'*·

**
*

.*

1
v

V

"

V

** ..... ****** ......... .

I

V

""

"

"*--,
" Iv

.. ··**A3* ....... •• .. • .. •

I

I

A4

"

" RE-INITIALIZE "
BASE ANO
•
"
"SAVE REGISTERS"
" FOR COMPILER
"
* TERMINATION "

.**** .... *** .. * .....

*****81**********

I

IEYFINAL

****A2+********

***.

"..

•
SET ERROR
•
"COOE FOR RETURN"
..
TO CALLER
"

I
v

..

.................
"

.." ".".
"
H2 "

"

I

I

······Js·········.
V

RETUilN

OPTS CAN

Chart AA.

I

PRS20

..

****A2*********
OPTSCAN

V

*****A3**********

*

*

*

*
*

* SET INDICATOR *
*IN POINTER FOR *
COMPILER
*

***************

*

*****************

I

I

v
PRS22

V

83

*****82**********

*
*
..
GET
..
*PARAMETER LIST *
*
LENGTH
*

.*

*.

.

,

*.

*
*

****

.. E3

ANY

*.

**
..

•• *.

.*

02

.*

v
.*.
*.

*. * ••
*

-.

*

*
*

: E3
****
OPTSIO

*CENERATED NAME *
OR PGM NAME
*

*

..

*****************

I

V

*****F3**********

.*

.*

*.

*•

*

************.*.**

*

v

.***

..

..
*

03 ..

****

*.

*

.*.v *.

PARAM

...

IN TABLE

* •• *
...

*
..
.. A3 ..

v

*..

... *.

YES.*
,

.*

..J2

I
I

.*

." .*.
WAS

OPTS20

*.

*. YES

****

...

NAME OPTION .*------->*
*.
GIVEN
.*
*

••• *
* NO

****G4*********
RETURN

***************

I

C3 *
...

*

I

V

*****H3***'*******

*

*

*

INSERT SYSTEM *
NAME
*

**

*

*

**** '* ** .. ***** .... **

I
I

I

PREPARE
+ CONVERT
LINECNT

....I

...

************.*.*.

*****Jl**********
it

TABLE

.*

G3

*..*

v

NO

L I NECNT
". NO
..
PARAME TERS
*
SPECIFIED
... ------->*SPECIFIED WITH *

PRS30

*

I

*.

-*--*H2--.-"'-._....
COMPARE
...

I
I
V

J

:->1

v

*.

* •• *

I

v

I

*

..

* YES

II

I
V
*****E3**********
*
OBTAIN
*
*
SYSTEM
*

~

*..*
* •• *

I

I

•* •

PARAM

I

*

*
*
************.****

...
...

I

I

* **** ..

*

...

.*

*

I

*****************

NO

•*
PROGRAM
*. YES
*.
NAME
.*,
*.SPECIFIED.*

*.

II

<

I

•"
*.

NO

V

v

HI .*.'. *. *.

I

*******:j"""""""*

*.

...

*****************

*
ADVANCE
*
*PARAMETER SCAN *
POINTER
*

.*

*

SET FLAG

I

SAVE
NAME FOR
*
MULTIPLE
.. COMPILATIONS

G2

*

...

*

RESET
SCAN CONTROL
FLAGS

..*

*.-

8

PROS SOT

.*

• * - - - -___ > it

"'****03**********

*.

I :....".1.......:

.*

*..*

*****85* ** ** ** * **. YES

* •• *

** ..... *

*****************

I
II

*.

I

:*::* :-> I

I :* I GNORE
O~~~ ~OC~~~~ :
ANY OVER*
1

....

LINECNT=
*. QUOTE

it

AREA

PRSOUT

I :....".1.......:
*

.-.

.*

*****************

I*.~~MMA PRESE~!.*

II

.*------>*.

V

*

* •• *
... YES

I

.*

YES

PRS25

OPTIONS
.*
*.SPECIFIED.*

v

*..*

.*

84

.*

NO

:*~: . :-> I
~::::~~~i:i~::~"~

I

•*

NAME= OUOTE

*.

* •• YES
*

I
NO.*

*.

.. **"*..

v
.*.
*•

PRS23

....

.*

*.

****4************

C2

.-.

I

v

*.
.*
...

.

*

*** .. J 3*" ** * ** .. *
flETURN

*

NO

v

.. **** *
03 *
*
*

*

Section 2:

Compiler Operation

63

Chart AB.

DDNAMES

.--:.::.:l
"

·· . ·A2·***·····
DDNAMES

*

v

..
INSERT
"ENTRY INTO DCB
:
FOR SYSIN

•

... *******.****.

I

I

v

1

I

... ****.**********

POINTER TO
SIXTH ENTRY

I
I

.

v

*if*"*C2**********

.*

"
DB TA IN
..
"LENGTH OF DATA.
..
SET NAMES

*.

*
1·* . . . . . ***.

...

*.

".

...
... .. -

II

DOES

.... ...
"

NO

-,,-*---------..1'

. ..

YES

.

ADVANCE LIST
POINTER TO
F uiST ENTRY

" .

I

1

V

• ... ···E4***** ... ****

I
I
.·I···E]····. •·· .

"
RETURN"

I

V

..*MOVE

"

POINTER TO"
SEVENTH ENTRY :

:

"............. ***** ••••"

I

•*

I
I

*.

I

...

I
I

*.

..
"
:

:....
"::* :->1

•• H2·· .. ••• .. •••
...·'·
..
..
MOVE
POINTER TO
FIFTH ENTRY

V

• ·**.H4·· ••

...................

:

..

I

_. -

,,_

DOES

...

EX 1ST

*. NO

.4

It.

.*

* ••
" YES

....I ..
V

A4

...

..

RETURN

"
..
:

··.** .

• •••••••• ***.**

v

64

YES

DDNMOUT

..

• " - - > , , H4

..

"

....

...

..
..

.....

... ***************

I

"

.....
I

.*

NO

. * - - > * H4

"
INSERT
"ENTRY INTO DCB
:
FOR SYSPCH

V

"..

*.

.*

V

..

.................

*.

.. .*.

I

INSERT
"ENTRY INTO DCB
:
FOR SYSLIN

ENTRY

*.

DOES

•". . .··.G4· ••• ••· ... "•

··***G2**······**

""

.. _

."

"

v

.*

I.

V

F4

ENTRY EXIST

I

•*

YES

"ENTRY INTO DCB ..
"
FOR SYSPRT
"

I

J2

"

"..**···04."********
....
INSERT

I

..

..

....

I

...... E2*.** ....... **
..

..

. " - - > * H4

I

I
!

.

*. NO

.*

V

.... *.

••.• ':IST EXIST

*.

...

ENTRY EXIST

"

-" -*.
02

it.

DOES

v

~.

I
....
v

C4

1

...

··*.*·.

1

•••
"• •• **B4"
MOVE

I

..
.** ......

..
"
:

- •• **.************

I

I

..

..

···**A4******"··'"
..

:

Chart AC.

HEADOPT
****A2*********

*

HEADOPT

**

************·It**

I

I

V

*****B2**********
** OBTAIN LENGTH **
*
* OF HEADING
*
OPTION
*
*****************

I

v

.*. *.
C2

****C3*********
.*
*. NO
*
*
*.HEADING LIST .*-------->*
RETURN
*
*. EXIST .*
*
*
*..*
***************
*. .*
* YES
I

I
V

*****02**********

**

SET UP
* CENTERING OF
* PAGE HEADING

**
*
*

******************
I

I

V

*****E2**********

*
*FORCE
119 CHAR **
LIMIT FOR
*
OPTIO"lAL
HEADING
*****************

I
I

V

*****F2**********
*
SET
*
*HEADING ORIGIN *
*AND LENGTH INTO*
*PRINT MSG TABLE*

*
*
*****************

I
II
I

V

****G2*********
*
**
RETURN
***************

Section 2:

Compiler Operation

65

Chart AD.

TlMEDAT
**iI'*A2*********

*
*
TIMEDAT
*
*
* *************** *
I

V

*****82**********
*
SET UP
*
*
UNIT
*
* SPECIFICATION *
*FOR TIME OF DAY*

*
*
*****************

V

*****C2**********
*
GET
*
* TIME AND DATE *
* FROM SYSTEM *
* SUPERVISOR
*

*
*
*****************

I

V

****~D2**********

**
INSERT
*
TIME INTO
* HEADING LINE

**
*
*

*
*
*****************

V

*****E2**********
**
INSERT
**
*DATE INTO LINE *

*

*

*
*
*****************

I
V
****F2*********
*
*
RETURN
*
*

* *************** *

66

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
• Chart 04.1.

PHASE t - PARSE (Part 1 of 2)
G0630

·.··A2········*
**
IEYPAR
**
• **.* •••• ***.*** *

** ••

* B4 *
• ••• **

1

START
COMPILER

***·*B4·*·*******
.STA FINAL- BEA2.
*-*-*-*- *-.-*-*-*
*COMPLT POLISH. *
*CLOSE DO LOOPS.*
• MOVE POLISH. •
.***************.

.

*

•

•• ****.**.*.*****

1

·*****C2*.··*.****·
READ ONE
CARD INTO
• INPUT AREA •

THIS IS THE FIRST
CARD OF THE FIRST
STATEMENT. INITIAL
COMMENTS ARE WRITTEN
OUT IN THIS OPERATION.

* •••• ****.***

* -*-*-*-*-*,-*-*.
PRINT OLD STMT
* AND ERRORS *
READ NEW
* •• ** •• ******

1

GO'"

* ** ··F2*· *. *. *.* *
* STA INIT-BBA2 *
*-* -*-*-* -* -. -.-*
* INITIALIZE
•
•
FOI\ NEW
**
•
STATE~£NT
************.****

Gom
1
* * * **G2 * ** * * * * ***

*LBL XLATE BCA2*
• -.-*-*-.-*-*-.-*
* PROCESS LABEL *
*
*
FIELD AND
COL 6
*
*
* *. ** ** ••• *.*.* * *

j
.*.

H2
•.
• * LABEL *.
YES. *
OR
*.• *
COL 6
•• ERRORS ••

-_..
!

.. ..

•

•• *.

-_..
!
*.*.* *
E2

*

*.. *
v

. *.

*.

YES

. *.

...r*.. .. ..
•.

)*

*• F4 **
.**.
AT COMPLETION OF
PRINT AND READ

~~U~~~6E~§~6 I~

ON SOURCE ROLL.

.*

.1 NO

C5
*.
.• . * LAST * . *. NO
*.STMT AN ARITH.*--••
IF
••

•. •.. *. *

[*

•.

.***

* ..
*. *
* YES

j

GO""

*****DS******.··*
.PROC POL
BGA2*

.-._.-.-.-.-.-.-.

• COPY POLISH •
• ROLL TO AFTER •
• POLISH ROLL •
••••• ****.**** •••

.*

NO

1<----------

****·E4····**·***
*•
RECORD
**
• 'NO END CARD' *
• ERROR MESSAGE *

*

•

*::::··*1******·*·

** F4 **->
***** *
·***·F4*.*******·

••
*

SET INDICATOR **
FOR READ
*
•
COMPLETE
*

·········1········.
···**G4··**···.**
.PRT/RD SRC-BAA2*
• -*-*-.-*-.-.-*- •
*PRINT OLD STMT •
• AND ERRORS. •
* READ NEW STMT •

·*......1*·······

....
• •

•
•• •BS
••• •

* .. *

****..
* E2 *

..

D4
*.
LAST *. ••
--*. STMT FLAG = • *
• (END CARD). •

1

";~;;~5*;~~!~~;**

1
. * . *.

YES.. . *

*• E2 .->
*
***.* *

G0631

1

:*::*:

C4
•• LAST •.
NO.. STMT OF ••
SOURCE MODULE .•
*. PROCESSED.·

*

1

STATEMEN'l'
PROCESS

BS
••
YES..
WAS
••
--* • THERE AN END ••
*. CARD
•*

* .*** *

* •• * ·D2 **.* ** ***.
* TURN ON FLAGS *
* INDICATING
*
*FIRST STMT AND *
• PREVIOUS PRINT *
COMPLETE
*
•
**.** ••••• ****.**
****

• B5 •

!

G0633

··**·B2······*·**

•*
PROGRAM
•*
·INITIALIZATION *

·

··....
......
.. ...! ..

· .

1* NO

--.. .... ....
1 *..•
:.:;.:
1.
# 063003

•••

ES
*.
YES..
LAST
••
STATEMENT A ••
•. BRANCH .•

....

*

NO

•

G0642

**··*FS*········*
.ACT END ST BFA2.

.-*-.-*-.-.-.-.-.
*
BUILD
•
.RETURN OR STOP •
•
POLISH
•
**** ••••• ** •••• *.

1

00""

*·*·*G5·····*·*·*
.STA FN END BED~ •
.-.-*-*-.-*-.-.-.
.COMPLETE POLISH.
* WITH STMT CNT •
AND MOVE
*
•

;::::;::1*·····*·*

·.....
·
·

.
.

# 063004
..···HS.*****.···
*
PLACE
*
• END DRIVER ON *
*
POLISH
•

Go.::······1········

*

G0636

.-.-.-*-.-.-.-.-.

•• ··*JS.······.·*
.STA FN END BED5.
• COMPLETE POLISH.
* WITH STMT CNT •
•
AND MOVE
•
* •• * ••• * •••••••••

*··**J2··***··***
*STA XLATE- BDA1*
*-.-*-*-*-*-*-*-.
*
PROCESS
*
ENTIRE
•
•
STATEMENT
*
*
* ••• * •• *.*.******

!

*•

1

•• ***
.oli.2.

****
B4 **

• B2·

• *

***** *

•

section 2:

Compiler operation

67

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
• Chart 04.2.

PHASE 1 - PARSE (Part 2 of 2)

•••••

• •••• •
• B3 •
••••• •

·01102·
• B2.

•••

.. J... ..
.. .. .. ..
B2

11

.
.
..................

631U ••• B3.t •••••••

••
XTEND
•• YES
• CLEAR RESli:RVE •
•• LBL ROLL
••-------->.MARK FROM XTEND •
• • RESERVED ••
•
LBL ROLL
•

: . ; : . :->1. NO
~

••••• •

063118
.·.··C2· •• •••••••
•
REMOVE
•
• GROUP
FROM
.XTEND
LBL
ROLL •

•

•
.<---------------•••••••••••••••••••

1

#063188
• •••• 011 ••••••••••
•
SET LOOP
•
••
XTEND
•• YES
• DATE POINTER •
••
LBL ROLL
•• -------------------------------··-->.ON SCRIPT ROLL,.
••
EMPTY • •
•
RELEASE
•
••
••
• IND VAR ROLL •
••

02

•••

••

••

'0 0:0

········1········

1
....
.. ..
E2

•••

••

~063119

.. . .
--1 .... ..
.. ..
....
E3

•••

••

Ell

••
END
•• YES
••
TEMP
•• YES
•• OF DO LOOP •• -------->.. ROLL EMPTY
••

•.

..... Fl..........
•

!
•
•

GR~~O~~OM
WORK ROLL

.•

.*

or

F2 ..

•

•• GROUP ••

•

•• POINT. •

:<• ______~~.:.• • RE-ENTRY
~~~~iEL~S . : .
••

'01··~ES

·······:1::······
! C2.:
.
••••

*.

# 063180

..... G2..........

*.

*..*

••

*.

.*

i

NO

.....F3..........
• TAG GROUP AS

•
:EXT~gB~BBkfNGE :
• CANDIDATE ON •
.LOOP DATA ROLL •

• ••

••

PGM A
•• YES
SUBPROGRAM •• ------->

. . . * .•

or

::::::

PII ..

••
••
•:•
gk~K
•:
•• PROGRAM ••
••••

.!~~____ >

········t·········

··l··~o

. .•.. G3..........

. •... GII •.....•...•

•
• •
TAG T H O S E . .
.SET SYMBOL AND
•
PUT
•
• LABELS ON LBL •
.ROLL WHICH MAY •
.MODE FOR IBCOM
• GROUP ON TEMP •
•
ROLL.
•
BE RE-ENTRY •
• ROUTINE CALL
• •
POINTS·.
•

•
•
•
•

........
j .

······::I:::·····

········1·········

........

• C2 •
.
.

..... H3..........

. .... HII ........•.

••••

••

••

• • MOVE I BCOM
• CLEAR TEMP ROLL.
• POINTER TO
•
• • AFTER POLISH
• •
ROLL
•

......··1········
•• ••••
B3 ••

.
••••.

••

•
•
•

.......·1· :~~~~~~~--------.

#063001

·.JII ..••· .... ·•
•...
•
INITIALIZE
•
• FOR OPERATION •
•
OF ALLOCATE •
•••••••••••••••••••

1

•••• 1<11 •••••••••

• I EYALL
•
•
••••••••••••••••••

Section 2:

Compiler Operation

67.1

Chart BA.

WRITE LISTING AND READ SOURCE
G0837

****A2*********

"
PRINT
"
"AND READ SOURCE"

" ***.Jt********"'** ~

"

:

I

v
:***'''62 it ...... *** ...
"
"
"

I

v
"'*****64***********

**:

TURN
OFF NO PRINT
FLAG

INITIALIZE
" FOR NEW STMT. "
READ ONE CARD
" AND PRES CAN "
STMT

"

"
********
...... ** ... ****"

.----J

v

•*

.:~~

C2

V

*083703

".

*.

.*
.*
*.

ell.

." •

*.

*•

*.
.*

NO

".MORE TO READ ."

*.

':::i::;:+'lYES

* •• *

.*

j'"

•*

.". * •
02

*83703

*.

* •• *

V

******04***********

*.

"

."
SOURCE
". YESV
".
L"(STING
."
".REQUESTED."

.*

WAIT FOR LAST "
READ COMPLETE
*AND READ ONE "

****~!~~*****

,--_J

i"
V

*****E2**********
""

ON

TURN
I~O PRINT
FLAG

"

****** ... ********* "...

I'

v
:****F2*********:

183707
"
"
"

INITIALIZE
STATEMENT CD
COUNT

"
"
"

"****** .. **********"

l·m,,:l.
.*

PRINT A CARD

G2

*.

*.

."""

*****G3**********
...
*

."
PRINT
". YES
" MOVE 1 CD TO
"
".
OF STMT
."------->"SOURCE ROLL AND"
".COMPLETE ."
"
SET CONTROL
"

*****************

v
******H2***********

.*.

j"

PRINT ONE
"
CARD AND ITS
ERROR MSGS
"

*************

,__J

...

*

*..*
*. .*

"

!

•"

•*

H3

*•

END

*•

". YES

*.
".".S~~6~~~~T·"·"I<
* •• *
.*

"

I

"

"

NO

v
****

"

84 "

......

11083704

V

"""***J4*******"'**

"
"
"
"
"

TURN OFF
FLAGS
INDICATING NO
MORE READ AND
NO MORE PRINT

"
"
"
"
"

*****************

v
... ****K4********* *
RETURN

68

INIT
READ A CARD

****'*********

I

.".

"

64 :

****

READ A CARD

Chart BB.

INITIALIZE FOR PROCESSING STATEMENT
G0632
****A2*********

**
STA INIT
**
* *************** *

I

V

*****82**********
** INITIALIZE **
CHARACTER
*
*
*
COUNTS
*

*
*
*****************

V

*****C2**********
*
*SET
CRRNT CHAR **
*TO FIRST SOURCE*
*
CHARACTER
*

*
*
*****************

I

V

*****02**********
*
SET
*
*COUNT OF SOURCE*
*STMT CHARACTERS*
*TO NO. CARDS X *
*
80
*
*****************

V

*****E2**********

*
*
** CLEAR FLAGS **
*
*
*
*
*****************

V

****F2*********

**
RETURN
**
* *************** *

Section 2:

compiler Operation

69

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
• chart BC1.

PROCESS LABEL FIELD (Part 1 of 2)
G0635
•••• A2.· •••••••

•• LBL
•

. ····1......

STATUS CONTROL

•

FIELD XLATE.

•

••••• B2·· ••••••••
• SAVE ADDRESS •
•
OF CURRENT
•
• BOTTOM OF WORK •
• ROLL AND EXIT •
•
ROLL
•

········1········
••••• C2.· ••••••••
• SET STMT LABEL •
• POINTER TO 0 •
•
AND SKIP TO •
• FIRST NON-BLANK.
•
CHARACTER
•

········1········

.. ,.. ..
., ,.
1"$
02

*063503

••

••
CHAR
•• NO
••• C;0~::INL~SS •••• ---••
•,

DIGIT.
CONVERSION

....
.".
03

•••

••

.....

•• MUST THIS •• NO
ST~IB~tVE , . ' .-------~

---->.'.,

,.

. , ,.

·BC2·

rES

..~l·

..... £2..........
. .... E3 ......... .
• INITIALIZE.• •• LABEL MISSING ••
•
FOR DIGIT.
CONVERSION.

•

••

•

MESSAGE TO

•

• •• ERROR ROLL ••
;:;;:;::1·········
········1········
••••• •
•.BC2·
••••

*063501
,.

,..,
.
... ,. . .---·-.,.------------1
F2

,.,

• C2.
••

.,

., NO

.,~~R

A DIGI:.,
,
,

• YES

1

CONVERT ONE DIGIT

•••••G2..........
•
CONVERT.
• ONE DIGIT TO •
• BINARY, SKIP TO.
.NEXT NON-BLANK •
CHARACTER.
•

(SYNTAX FAIL)
• •••• G3 ••••••••••
•
SYNTAX
•
• MESSAGE TO
•
•
ERROR ROLL.
•
• RESTORE WORK •
.AND EXIT ROLLS •

·······:1:·······

········1·········

,H2. ..,,

.·.·H3
..••..... •
RETURN

... ... ,. '.---1 ·...............

,•
CHAR
•• YES
• , .,COUNT
THANLESS
6 ,.

,

NO

•
•

(EXIT FALSE)

••

:.;;.:

••••••
1
·····J2••• ·······
REGISTER LABEL

:ToM£~ ~EfLAND:

:

•

ttE2kT10f~ER :
POINTER
•

········1········
K2

,

.,

.,

., ,.
·'l';ES

•••••
:BH:
•••

70

•••• ·K3 ••••••••••

.

Ii!Wr~!f~~N
.------->: EiRR~R.'1gLro

•• , . LABEL •••• NO
. ' •• UNDEFINED ,*'

:

.:
:

········1········
•:B~~:
••••
•••

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
• Chart BC2.

PROCESS LABEL FIELD (Part 2 of 2)

••••••
A2.
••

• BC2 •

•

!
•.···.A2··· •••• ••••

11063502

•

.....

MARK

•

•
LABEL AS
•
DEFINED
•
•
••••••• BC2·······

•

r

• BC2·
• C2·

•••

•

.*.

•

. •.

B2
••
••••
••
IN A
•• YES
•
DO LOOP
••
••
••

....
'. ..

B3
'.
. ' INNER ••
DO
•• NO
CLOS20 FLAG •• -------..
ON
••
• •

••

-------->..

• NO

....
... '
• YES

------------------>l<------------~-----------I
1
...
II 063501t

.'.
C2
••
••
••
NO ••
LAST
••
---'.STMT AN ARITH..
••
IF
••
••••

C3

.
-

•.. '

i YES

••••• D2..........
• PUT POINTER TO •

PROCESS POLISH

!MO~I~o~~~LTO !

......:

• AFTER POLISH

'.

AS

••
0

••
.'
•

·.ROLL . '

'0 .'

.1.Y'"

• •••• 03..........
• TAG GROUP ON •
:
'RE-ENTRY POINT'

<__.. _!XT~D~~I~£~L

•

---~:::::~~llt
NON-ACTIVE END
FLAG INDICATES
PREVIOUS STMT
ALWA YS BRANCHES
WHEN IT IS ON.
USED IN TEXT FOR
GENERATION OF
CODE FOR END STMT.

Cit

.'

NO . ' LAB L ON
<-----..--•.
XTEN TARG
••
LBL

•.. '

rYES

.········1········.

>.

1063581.'.

••

. ' IS
'.
LABEL
• •
PR2VIOUS
••
•• TARGET . '
••••

NO . '

<--'.

• •••• BIt ••••••••••
•
•
•
PUT LABEL
•
ON
•
• XT2ND LBL ROLL •

:...............:

Olt
'.
. ' GROUP',.
. : ' ~~~~¥gL~ .:.!~
'.RE-ENTRY

'.!?j1.;'

o'

• •••• 05 ••••••••••
• TAG GROUP ON •

_____ >:XTf~Dp5:~I~~L
:
'RE-ENTRY POINT'

:...............:

11063505
".
••••• E2..........
• •••• EIt ••••••••••
.SET NON-ACTIVE •
• •
'END FLAG TO NXT'
• REMOVE GROUP •
:A~~AC~kRF~~T : - - - - - - - - - -..-----..--------··-----:XTEND n~~ LBL

:<---------------:.•••.~~~•••••• :

•.:

:.~I~.~~~.f~~:

1..
....
F2

••

••

..

...rEO

COUNT
••
6
••

'

G2

0

'.

CHAR

' . NO

o·

•
•• -------->.

....F3···.·····•
RETURN
(EXIT TRUE)
• ••••••••••••••

•

0'.
....
'.
.. .-------->..····G3·.·.·..··.

.'
•

.

'.

CHAR A ZERO

•• YES
0

•

R2TURN
(EXIT TRUE)

•
•

•••••••••••••••

••••
' .. '
• NO

1
•
........
1'.......:•

(SYNTAX FAIL'
·····H2··········
• SYNTAX MSG TO •
• ERROR. ROLL. •

:A~S~~ ~8~fs

·····J2··········
•
........
1"......•
•
•
•
•

SCAN
TO NEXT
NON-BLANK
CHARACTER

•
•
•
•

:

···.K2······.··

:

(EX~T~SE)

•••••••••••••••• •
Section 2:

Compiler Operation

70.1

Chart BD.

PROCESS STATEMENT

G0636

*
*

*

·***AI"**"***·* *
STA XLATE

***************

*****A2**********

..*

...

...

...

.*

A3

.*. *.

*.

SAVE
*
.* ASSIGN- *. NO
*------->* LOCATIONS OF *------->*.
MENT TYPE . * 1
*
* WORK AND EXIT *
*.STATEMENT.*

*..
..
..... *

i

*****************

.*.

YES

V

*****B2**********
*****61*********.

*

*

RETURN

***************

:

* <-------*
*
*

...

~~E~~~L

STATEMENT
MESSAGE

:

83
YES •• -*

vr---o

C2

.*. *.

*-..

_----'i

j"0

I
V

:

CONSTRUCT
*
POLISH FOR
*
VARIABLE
EXPRESSION:

*****************

I
STA XLATE EXIT

SCAN STMT

:

LI TERAL TEST

* TO DETERMINE
*
TYPE

...
*****************

I

NO

V

V

*****02**********

V

*****84**********

*..*
* •• *

...

*****C4**********

*

****Cl*********
.*
*.
*ASSIGNMENT STA *
.*
*. YES
*
XLATE
*------->*.STMT F U N C T I O N . * ,
*
*
*..*
**************~
*_ ... _ .... _*

*

:

*<-------*. BLOCK DATA .*
*
*. ROUTINE .*

*****************

G0637

....

IN

ARITH FUNC
DEF STA
XLATE

THIS OPERATION
IS PERFORMED BY
THE STA XL.ATE
ROUTINES

UPDATE ROLLS *

*.

i

*.....
. .**

.*

...

****E4*********
RETURN

...

*

EXIT

*
*

EXIT

***************

YES

.*. * •
V

F3

.*

*.

• * ACTIVE *. *.

*.

STATEMENT

**.
.**
••

.*

NO
*
• * - - - >*

...

****F4*********
RETURN

***************

...

* YES
I

I

V

"'****G3**********

** REMOVE POLISH *
*
* AND REPLACE *
:WITH ERROR LINK:

*****************

I

V

*****H3**********
*

RETURN

*

* *************** *

EXIT

Section 2:

Compiler Operation

71

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
COMPLETE STATEMENT AND MOVE POLISH

-Chart BE.
GOb33

**·*A1******"'**

··......

** STA FINAL **
* *************** *

• B4 •

••• *

· t .
·
.

1

1\ 063302

*****B1******"'***
I NCREMENl'
•*
*STATEMENT COUNT*

**

·····B4*···*·····
• MOVE GROUP
•
• BACK TO DO
•
.LOOPS OPEN ROLL.

.

·

*
••••••••
*••• *•••••

...1
.. ..
...r"
*.

Cl

.* .•
•• ANY

•. •.

..

.*
.•

---::::::::1········

•.

.. ..
.. .... .. ....

1\ 063303

•••
C4
••
••
THIS
•• NO
•• STMT LABELED •• ---------------->

·**·C2··***·*·· *
RETURN
•
• ** •••• * •• * ••••• •

*. *.

POLISH
.*
••

Dl

NO·
•• -------->.

THIS FLAG ON INDICATES
ONE OF THE STATEMENTS
WHICH MAY NOT TERMINATE
00 LOOPS

•. ••

..

*. . *

.•

••• "'* *

..

..

.••

El
•.
.• DATA ON •. NO
• • THE DO LOOPS . *-------------------------------~-----------------------*.OPEN ROLL ••

*.

.. ..

.*

r~

•
•

•

PUT POINl'ER •
LABEL ON
POLISH.

TO

....
....

·
.
•••••••••••••••••••

i

1<:::----

YES

#063~~~ •• H2 •••••••• *.

..*.*H3*** •••• * ••
•
REMOVE··
•
• GROUP OEFINING •
•
CLEAR
•
• DO VARIABLE •
• XTENO TARGET •
• FROM INO VAR •
•
LBL ROLL
•
•
ROLL
• •
•

.................

1

••••• J2 ••••••• *..
.RESERVE PROGRAM.
: S~~~~Ts~~1*:

R~~~i~E~~t~E :
•••••••••••••••••

:

1

·····K2·······.··
.MOVE NEXT GROUP.
• FROM SCRIPT •
• ROLL TO LOOP •

:O~I~ iUiRco~~:
.................

l ......
......
->. E1 •

72

PUT STM'l'
NUMBER ON
POLISH

•
•
•

...____________________J

1

NOTE
THE TEST COMPARES
STA LBL PNTR
.WITH THE GROUP
FROM THE ROLL

•
•

. ••
E4
..
. •• Y E S . ····E5········· •
•• .
THIS
STMT
•• AN ARITHMETIC •• -------->.
RETURN
•
••
IF.·
•
............. . •

•••
• *.
•••
1\063377
Gl
••
G2
*.
G3
*.
*****G4****** ••• *
.•••
.*..
.•
*.
•
*
••
THIS
*. YES
••
INNER
•• NO
••
ANY
*. NO
*
CLEAR
*
•• STMT TARGE'I' • *------.-->*. DO CLOSED •• --.------>* • TRANSFERS OUT •• -------->*XTEND LBL ROLL *
•. OF LOOP ••
•• FLAG
••
•• OF LOOP ••
•
•
••
••
•• ON .*
•
.
.
•
•
•
SEE
•. .•
•. .•
* .. *
•••••••••••••••••
NOTE

: B4 :
*...

.

G0634
• •••• 05 ••••••••••

.

·····F4··········
.MOVE POLISH F O R . .
• STMT TO AFTER .------->.
• POLISH ROLL • •

.

.I:

STA FINAL END

1'0

• ····Fl·······'**·
* MOVE ONE
•
*
*
• G~OUP OFF THE •
*
ROLL
•
••• * •• * •••••••• *.

·

YES

•. ... *............• •. ...............•.

:.::.:->1. NO
1\ Ob330l

·

1· . .
.-------->.

• ••• *04..........

YES
* . JUMP FLAG ON •• ------ ----------------------.---------------------------->

*.

•·BE
•••••
·D5 •
••
•

.................
1

.063378

• •••• J3 •••••••

_____ •

•

:C~E~N~HGogN· • <_______________ _

:

*••••••••••••• • •

····F5·········
•
RETURN
•
••••••••••••••• •

Chart BF.

PROCESS END STATEMENT
G0642

****A2*********

*

*
ACTIVE END
STA XLATE
***************

I
I

I

V

•*

B2

.*. * •

*.

.*
LAST
*. YES
*
*. STATEMENT A .*-------->*

*. BRANCH
*.

*. .*

*

I

.*

.*

****B3*********

RETURN

*

*

***************

NO

v

.*

.*. *.
C2

*****C3**********

*.

*

.*SUBPROGRAM *. NO
*
*.
BEING
• *--------> *
*.COMPILED .*
*

*.

I

* •• *

.*

YES

BUILD
STOP POLISH

*

*
*

*

*******************
I

*****02**********
v
*
*
****03*********
*
PLACE
*
*
*
* RETURN DRIVER *-------->*
RETURN
*
ON POLISH
*
*
***************
*****************

Section 2:

Compiler Operation

73

Chart BG.

PROCESS POLISH
G0844
i·***A2*********
PROCESS
**
*
POLISH
*
***************

*

II

V

*****B2**********
**
** GET NUMBER
* OF WORDS ON *
* POLISH ROLL *

*
*****************

I,

V

*****C2**********
**
PLACE
**
*COUNT ON AFTER *
* POLISH ROLL *
******************

I
I

V

*****02**********
** COPY POLISH **
* ROLL TO AFTER *
* POLISH ROLL *

*
*
*****************

I

V

*****E2**********

*
*
**RELEASE POLISH **
*

ROLL

*

*
*****************

I
v

****F2*********
**
RETURN
**

* ~************** *

74

Form Y28-6638-1
Page Revised 7/23/69 by TNl Y28-6829
• Chart 05.

PHASE 2 - ALLOCATE (Part 1 of 2)

G0359

THE ROUTINES
CALLED IN PASS
1 DETERMINE
THE NUMBER OF
BASE TABLE
ENTRIES

~RUUID

OBJECT MODULE

~U',JSPER-

FORMING SOME
INITIAL
ALLOCATION

Section 2:

Compiler Operation

75

Form Y28-6638-1
Page Revised 1/23/6~~ by TNL Y28-6829
• Chart 06.

PHASE 2 -

ALLOCATE (Part 2 of 2)

----------t
·····BII ••••••••••

:REL~~~A~gLLS, :
DOUBLE~ORD

•
•
•

•
•
•

. · . ·T··. ·.
BOUNDARY FOR
BASES

••••• CII.··· •••• • •

• CALCULATE BASE •
• AND DISPLACEMNT.
• FOR TEMP AND •
• CONST ROLLS
•

•

•

...::......1"......
.-.-.-.-.-.-.-.-.
........1........
••• ··011 ••••••••••

• BLD AD

BS-C~A2

•

BUILD 3 BASES.
FOR TEMP AND
•
•
CONST AREA

•
•
•

•••• ·EII ••••••••••

•

•
PREPARE FOR
• UNIFY PRASE

•
••
•
•

••
........
1"......

·••••••••••••••••.•
• • •• FII •••••••••

•

76

IEYUNF

•

RELEASE
ROLLS

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
• Chart CA.

MOVE BLD NAMES TO DATA VAR ROLL

GOSII3

•
•
•

....A3··.······

••• ·A1····.· •••
ALPHA
•
LBL AND L
•
SPROGS
•

. . . 1··. .

•
ALPHA
• SCALAR ARRAY
•
AND SPROG

.......1'......

••••• Bl ••••••••••
• RELEASE DATA •
: g~Rp~~k~ERS~ :
• NEW GROUP ON •

........1'.......
• •••• C3 ••• • ••••••

••••• C1·· •• • •• • ••

•
•

•
•
•

:• TO LBL
~~IN¥kR
:
ROLL. •

;:~::;~:l·········

••••• •
•••
••

••

D1
••
••
ENTIRE
••

~S

ALPHA L SPROG
• •••• 02 ••••••••••
• SAVE DATA VAR •
.ROLL POINTER AS.

•· •. H~C~~~~D
.• '·-------->:•
••
••
.•... E1..........

•
•

Pg~~U!k~
FUNCTIONS

:•

········1········

'"1"=0

•
•

•

••••• D3 ••••••••••

.A/D VAR RL-CAFII.
.-.-.-.-.-.-.-.-.
•
MOVE
•
• SCALAR NAMES TO.
.DATA VAR ROLLS •

········1········

.•....E3····.··...•

•

•
•
········1········

•
•

········1········

········1········

••••• •

••••
•• •Gil
••••• ••

••••• •

SET UP
POINTER TO
SCALAR ROLL

. .... E2 ......... .
••

••
••

• MOVE NEXT LABEL.
•
SET UP
•
T.O
•
• POINTER ROLL
• DATA VAR ROLL • •

• 01 •

••

·. ·. ·1. ·. .

•
•

••••• •
• •

·r·

• BII •

••••• B3 ••••••••••
•
SAVE
•
• DATA VAR ROLL •
•
• POINTER AS
• POINTER TO
•
•
SCALARS
•

:.~~,t.¥I'.lSit;:

• SAVE POINTER
• TO LABELS.

•
•
•

·.·.·BII···· ••••••
.A/D VAR RL-CAFII.
.MOVE SUBPROGRAM.
•
NAMES TO
•
• DATA VAR ROLL •

.-.-.-.-.-.-.-.-.
········l········
• ••• ·CII·· ••••••••
• SAVE DATA VAR •
.ROLL POINTER AS.
• POINTER TO
•
• USED LIBRARY •
•
NAMES
•

········1········
·····DII ••••••••••
.SET UP POINTER •
• TO USED LIB •
• FUNCTION ROLL •

•

•••••••••••••••••••

!

•• ••••
•
Gil •

••••• •

• SAVE DATA VAR •
.ROLL POINTER TO.
ARRAYS
•
•

F3··········•
•. ....SET
UP
•
PO:::NTER TO
•
ARRAY ROLL
•
•
•
········1········

•
•
•

•

• •• ·FII.· •••••••
•
ALPHA TO
•
• DATA VAR ROLL •

::~~:;::'I.......
•

•

••••• •

.-.-.-.-.-.-.-.-.
••••• G3 ••••••••••

• A/O VAR RL-CAFII.

•• ARRAYMOVE
NAMES TO ••
• DATA VAR ROLL •

........1'.......
•.•.·J3.·•.•.••..•
•
• SET UP POINTER •
TO GLOBAL
•
•
• SPROG ROLL
•

V

....
....

r

········1········
••••• H3· •••••••••
• SAVE DATA VAR •
• ROLL POINTER AS.
• POINTER TO
•
•
GLOBAL
•
•
• SUBPROGRAM

...

Gil
••
••••
• •••G5 •••••••• •
•• ENTIRE
•• Y E S .
•
••
ROLL
•• -------->.
RETURN
•
..PROCESSED.·
•
•

...............

• ••• ·HII ••••••••••
• MOVE NEXT NAME •
•
(8 BYTES)
•
•• DATA TO
VAR ROLL ••

········1········•

•

•• ••••
••
••G4
••• •

•
•
········1········
•• ••••
•
BII •
•••••
•

Section 2:

Compiler Operation

77

Chart CB.

PREPARE EQUIVALENCE DATA

G0362

.*....

* .. *~~~~ *~~~;~*** ...
*
*

AND PRINT
ERRORS

*************......

A2

.*. *.

* .....

... ****A3****ir ... *** ...

NO

* - - - - > ... EQUIVA LENCE . " - - - > *
*
*.
DATA
.*
*

**.
.*
••
* *YES

... ****.
:

RETURN

***************

I

:->1

82

****

v

*****82**********
•
CALCULATE
...
OFFSET FOR
*
EQUIVALENCE
... VARIABLE AND

*
...
...
...

:****~~~~~~*****:

I

.". *. *.
V

.*

C2

*****C3**********

...

...

•*
BAD
*. Y E S "
...
DEFINITION
.*--->*RECORD NAME AS ...
*.
.*
...
ERROR
...
*..*
...
.... • *
*****************

*.

I

.. NO

I
I
1<-----------'-

.*. * •
V

•*
....

•*

*.

02

ALL

*•

DATA
PROCESSED

*.

.*
* •• *

I
...

.*-1

*.

.*

NO

:

YES

...

v

**** ...
B2

:

V

:****E2*********:
...

*

SET UP
HEADING FOR
ERROR LIST

...

*****************

I

V

******F2***********
PRINT LIST OF
.. EQUIVALENCE
...
... DEF
ERRORS ..

*************

I
V

...
*

78

****G2*********
RETURN

*
*

PRINT
ERROR SYMBOL

Chart CC.

ALLOCATE BLOCK DATA

G0361

..... Al..........

.·***A2*·********
:~~_:~~!~~!:~!:~:

•
BLOCK DATA
.------->. ALLOC ALL COM •
• PROG ALLOCATION.
.STRG.PRNT ERRS ••
•••••••••••••••
.MAPS PNCH ESDS *

.............. * •••

I

V

*·****82*····*····*
PUNCH
REMAINING
• ESDS IF ANY •

* ••• ***.*.***

I

V

****·C2**********

:~~~~~:-:~~-~~:~:

.ALLOC SCALARS. •
• ADD REQUIRED •
BASES
•
•

*******.*********

I

V

····*02*···*****·
.ARRAY ALL CNA2*
*-*-*-*-*-*-*-*-*

.ALLOCATE ARRAYS.
•
AND
•
•
REQ. BASES
•
···*···*i·**·***·

I
**···E2·····
.
*
v

·****

FLIP
EQUIVALENCE
ROLL

******.*** ••• ****

• •:->\I
: F2

•• *.

v

'36102

•••

• *F~NFO *. *.
:****F3*.* ••• ***:
.* GROUP ON *. YES
•
RECORD
*
•• EQUIVALENCE .*------->. NAME + ERROR
*. ROLL..
•
TYPE

...__ it • • • __ * __ "'_._._...

••
**.
.**
* NO

...I

I

. .
V

.***

V

*36101

•* • *

G2

BECAUSE
ALL EQUIV
DATA MUST
BE IN COMMON

••

:

F2 :

*•

*. YES'"
..
*.DATA ON ,ROLL .*-->* F2 *
*.
.*
......

*.

MORE

.*
* ••
*
• NO

I

V

····**J2****·····**
PRINT
BLOCK DATA
ERRORS

* •••• * •••• ***

I

V

*****•
·06
.. 84.
• •
•

RELEASE
ROLLS

Section 2:

Compiler Operation

79

Chart CD.

PREPROCESS DUMMY DIMENSIONS
G0.365
•
•
"

··."'A2**"******

PREP DMY 0 1 M .
AND PRINT
"
ERRORS
•

•••• ** .... **** •••

I
I

1
V

** .... *82 ... ••• ... *** ... •

"

INITIALIZE
POINTER TO
APPRO ROLL

*..

I
I

• *.**.
:

CHECK
DIMENSION

DMY

:->1
.... **

v

...

*.

•••

...

C2

G0367
....

ALL
ARRAYS

*.

*. ...
"

YES

....

.*---->*.

...

ANY
GLOBAL

... *.

02
NEXT

•

I

:

••

...
*.

DUMMY

"D!~ENSIO~;."
-. ...
...

03

NO

.*--,

I

."
". OF

•*
••

•*

E2

*.

ARRAY

*.

*.INCOMMON

*..*

. .

"

I

ANY"

"

PNTR TO ARRAY"
ON ERROR ROLL *

I

AS

"
"
"

" 03 "

••

E4

..•

"

PREPARE
"
.TO PROCESS NEXT"
ARRAY

..

... **-***_.** ••• ***"

I

....
I
v

"
"-

C2

."
-

"

-* -**- "

._.*

"

""*.

#36704

.*

.....
" 03 "
...
..

*-> I
•
I

A

I
I

v

E4

.".

*.

ANY

.-MORE

#36705

*.

ARRAYS-.

".WITH DMY

*. IN THIS
•• LIST .*
... •• *
"

YES

I

.*

E5

.".

YES

*•

MORE

"NXT ARRAY-MUST"
*aE DMY I N SAME "
"LIST OR IN COM-"

:.:~~.~~~*~~~~~*:

I

I
v

"

" E4.""

*•

- •

DUMMY."

LISTS

*..*

* •• *
"

NO

*"L,,*

V

***
•• F4*-**"**"..
• CHECK DMY DIM"

"

NO

.*

."---->". *.
.*

DIM

****

V

*** •••
..
*

ITEMS ROLL

,,*L,,*

"'·*·"G2**·*·*****

80

IF

U4** ••

RECORD MARKER
ON NAMEL J S r

*->1
"I

*36602

It

DMY

..

** •• * .. *******,*...

*.** ••• **** •••• **
I
* I
it

...

*

NO

RECORD
ARRAY NAME
ERROR

G2

"

WITH DMY DIM

I

n

"

."--->"..
.*

YES

"

********.• ********
I
.. **** ..
I

NO

CLASSIFY NXT

*.

..

---->"
:

I
I

..

v

it • • • •

••

• ..... E3* ....... ·... ***

"****F2**********"
"
"

*. YES

* •• *

......

* •• *

~

#36703

*.

V

A DUMMY OR

"

*.

END
A DUMMY

•••• LIST ••••

.. G2 ..

.".

RETURN

** ..... *-* _.

.*...

\I

.".
03

v

YES

****C5*********

.

"
---"
->"

YES

:-> I

... - . ' .

••

ERRORS

"j

*36702

."ARRAY HAVE

PR I NT

Io..*
... •• -

NO

V

.

.... NO
.... - - - - >

*. OUMMIES .*

*

•*

"

·*****C4**********.

... .

. . . . ..

"..

I
I

G0418

•••
C3

...

•• PROCESSED..

....

C4

"

C2

#036601

.. --

"

..

C4 "

*

.*

Chart CE.

CHECK FOR UNCLOSED DO LOOPS
G0371
"****A2*********
PROCESS
*
DO LOOPS
***************

I
I
I

V

*****B2**********

**

**
FLIP THE
* DO LOOPS OPEN *
ROLL
*
*
*****************
****
:

C2

I
:->1

* **** * V
#037101
.*.
#037102
C2
*.
*****C3**********
.* DATA *.
*
*
.* ON THE
*.
NO
*SET UP HEADING *
*.DO LOOPS OPEN.*-------->* FOR DO LOOPS
*.
ROLL.*
*
ERROR LIST
*
*. . *
*

*
*
*****************

YES

I
I

V

I

V

*****D2**********

******D3***********

**
MOVE BAD
**
*LABEL TO ERROR *
*
*
LBL ROLL

PRINT
*
DO ERROR LIST

*

******************

v
.*.

I

E2
*.
.* UNDE- *.
.*FINED MARK *. YES
*. ON LBL ROLL . * 1

*.

* •• *
*

I

.*

PRINT ERROR LBL
ROLL

*************

I
II

*.

*

V

****E3*********
RETURN
**
* *************** *

**

.*

v

NO

****

**
*

I

C2

**
*

V

*****F2**********

** SET UNCLOSED *
*
*DO MARK IN LBL *
ROLL GROUP
*
*

*

*

*****************

I

v

**

*

C2

**

*

Section 2:

Compiler Operation

81

Chart CF.

CONSTRUCT BRANCH TABLE ROLL

G0372
.... **A2 ..... ·.. • ...... • .. •
"PROCESS LBL AND'
:
LOCAL SPROG
"

.. ***** ... ** ... * .......

.. **** "

I

.. 84 ...

I

V

"
"

FLIP
THE LBL ROLL

..

C2

**.....

"* •• *.* .. *.********

J

I

:->1

••
....

I

v

1037201

.*

V

.".
C2

".

DATA

••

ON THE LBL

•

"SET UP HEADING"
.. FOR UNDEFINED"
"
LABELS
..

*----,

I

.... • *
..

·····C4····*·····
"
"

*. NO

".".ROLL . " . "

v

YES

.......

"" Bil .."
" **** "

I

I

V

V

** ........ 02 ... **** .. ***u

"
"

•• ** •·.. 04·· .... ** *.*.*

..

MOVE
LABEL TO WORK
ROLL

*

..
..
..

"***********.*****..
"

"

V

.*

".

••

.".

*.

LABEL
DEFINED

*..*

*****E3**.*"*.***

..

..

YES
" SET FIRST 1/2 *
.*------->".. GROUP
BYTE OF LABEL"
TO ZERO ...
...
..
************-****

".
....

*. ••
"

.

_037202

*.

NO

V

"
"THE
"

FLIP
LOCAL
ROLL

"

I

"I
"->1
" ...... " IV

I

"

V

Fil

*037207

.".

*.

*..*
I
I

.. **** "
"

"

.*

G3

.". ••

*.

*.

* •• *
..

H3

I
"
,,->II

*037203

V

""

..

.*

.*

..

."1
NO

..
:

"

.***

..

K3

..

.. I

V

"MAKE NEW BRANCH"
..
TABLE ROLL
..
"
ENTRY AND
RETURN PTR
"
TO IT
"

••• * ... ** •••• *.****

*****.****** .... **

I

I

I

I

V

V

·····J4·······
.. ··"
..

.... • .... J3 .... • .... • .. •• ..
•
REPLACE
"
..
LABEL GROUP
"
'W I TH PO I NTER TO.
" BRANCH TABLE
"

..
PUT POINTER
"
"ON COMMON DATA"
..
TEMP ROLL
..

·............. __.........."

..

4 ••••••

V

I

..

..

**** .......

MOVE

"

"
:: GROU~O~~ TEMP : ,

....

*• ................ **"

vI

:

82

**** •••• **

I
.......
.. "

:*::":-> I

-

C2 :

I

V

···*GS·****··*·

*".*"*"*"""""*"

**·**H4*****·****

*

..•

..

I
I
I

*

"MAKE NEW BRANCH"
..
TABLE ROLL
ENTRY AND
RETURN PTR
"
TO IT
"

*037205
V
••• ... ·K3* ..

I1
****....

MOVE N E X T " "
•
GROUP TO
"RETURN"

"...

·****H3***** ..........

,,-""

I

1
1

CENTRAL AREA

v

YES

..

..
ROLL
•
****.*** ••••• ****

II
*.

COpy THE

"COMMON DATA

."------->""THE
TEMP ROLL TO
"
LOCAL SPROG"

YES

V
• • • • • G4 • • • •

•"
JUMP
".
".TARGET LABEL

THE TAG
FIELD OF THE
POINTER STILL
INDICATES THE
TYPE OF LABEL

..

NO

* •• *
"

..

*****FS***** •• ***

."
ON THE
".
". LOCAL SPROG
ROLL.*

:~~:~:*~~~*~~~~*:

K3

*03720B

F4
*.
.* DATA *.

CLEAR
it
FIRST BYTE OF it
LABEL
..
GROUP-MOVE TO ..

"

"
SPROG"
..

" * ...... * •••• ****
••

""'***F2**********
"
"
"
"

PRINT ERROR LBL
ROLL

I
I
I
····*E4**······· .."

I

E2

PRI NT
UNDEFINED
LABEL LIST

**.**********

I

II
•*

..

COpy
TEMP ROLL TO
LBL ROLL

"
"

"

:

V

*****84**·*******

.. *.**************

.. **......

I

*037206

.•

*****82*"*******'»

"

"

"

F4

..

"

Chart CG.

ALLOCATE HEADING AND PUNCH ESD CARDS
G0374

*

·***A2···******
BUILD
*
PROGRAM ESD

:

••••••••••••• **
*

:

*

84 :

****

I

V

V

*****84*********-

·****B2**********

*

*

*

*

SET
*
UP FOR LD ESD :

•
:

INITIALIZE

*
*
*****************

*
***.*.***********

1

V

******C4***********
•

PUNCH
PROGRAM NAME
AS LD ESD

*************

•*

02

v
.*.
*.

*****03*********.

DATA * . .
*
SET UP
*
• * ON ENTRY *. NO
* PROGRAMMER
*
*.
NAMES
.*------->*SPECIFIED NAME *
*. ROLL.*
*
IN CENTRAL
*

*..*
* •• *
* YES

11037401

...

..

I

*************.***

**~***

I

V

*****E2**********

*.FL I P

THE ENTRY *
*
*NAMES ROLL AND *
*MOVE ONE GROUP *
*
•
OFF
*****************

*
*

G2

*
...

·

.*.**ES**********

..

..

*****************

1

V

******FS*****~·***4

*

PUNCH ANY
REMAINING ESD
CARDS
•

*************

I

1

I

.
**
*
*

*037406

*.

*****************

I

V

*****G4**********

*
ADD
•
BLANKS TO
*
•
• NAME. ADD ENTRY.
• CODE TO PROG
*
*
BREAK
*

V

*

·***GS*********
RETURN

•

*

*****************

1
V
******H4***********

1
V
*****H2**********
PUT PROGRAM
NAME IN PUNCH
BUFFER

.*. *.
v

E4

...
COpy
..
.* DATA LEFT *. NO
•
COMMON NAME
••
ON ENTRY
.*------->* TEMP ROLL TO
*
*.
NAMES
.*
*ENTRY NAME ROLL*
.*

V

*****************

*

****

*037405

* MOVE GROUP TO *
CENTRAL AND
COMMON NAME
TEMP ROLL

* PUT J SYMBOL *
*IN FIRST BLANK *
:
OF NAME
:

*

I

:->1

i'"

*****G2**********

**

E4

*****F4**********

*****************

V

:

* •• *

•
SAVE
*
.GROUP ON COMMON*
*NAME TEMP ROLL.* ADD BLANKS TO NAME
*

(::::-,1

:*****~~;:~*****:
.*****

*..*

1
V
*****F2**********

1037402

1
V
*****04*********-

•
ADD
•
•
LENGTH OF
• INITIAL PRDG
•
.CODE TO PROGRAM*

PUNCH ESD

*****************

*

PUT
ESD IN
BUFFER-PUNCH
IF COMPLETE

****~~~~*****

*

I

V

•

1
V
******J2***********

*

PUNCH PROGRAM
NAME
*

*
*

****
E4

*
*

*

PUNCH REMAINING
ESD

*************

I

V

* **** •
* B4 *
*
*

Section 2:

Compiler Operation

83

chart CH.

CHECK ASSIGNMENT OF FUNCTION VALUE
GO 376

"

• ... ·A2***··**··
FNTRY

NAME

**:;;~;:!!~~ ••.

....
"

I

I
I
I
v

.*

82

... *.

."
".A

.*.

."

...

SOURCE
".
SUBPROGRAM

......
"

...
*.A

~037603

.*

C2

... ".

NO

"

... ."---->"..
•*

• ... ·33 ..·• ...... •• ... •
RETURN

....

YES"

... .*---->....
."

··.·C3·

V

1 •••••••

..

"

"

.****.** •• * ••••• *

I

I
V

I

•

'SET UP HEAD I NG
" FOR FUNCTION
..
ERROR LIST

4-

,,->1

I

" IV
E2

V

··***·E4**· .. •·.. ·****

".
-It •

.. "
DA TA ON
... NO
"..
THE' E>lTRY
• "----.
"NAMES ROLL."

*.

... ... . ...

*

PRINT
FUNCTION
ERROR LIST

YES

I
I
I

I

""
" 84 ..
""

I
.....
F2··········*
*

I

V

V

"

"MOVE NEXT GROUP"
* TO THE COMMON ..
"NAME TEMP ROLL ..

......................"
"

..

"

G3

••• *F4·*·******
RETURN

*..

..

I

G2:

.".

*.

I

#037602
:I.

... ...

V

• • • • • G3 • • • • •' .......

...

..

• "
SCALAR
".
".
WITH SAME
".
NAME."

YES

.*

..

" S E T MOOE
OF SCALAR IN
..
POINTER

.*------>"

.."

................ .

"

I

NO

I
I
I

I

V

··*·····..

• ••• ·H2· ..
.. REGISTER NAME
• OF ENTRY FOR
..
ERROR LIST

"

*
•

......... .........
"

I

·····H3· . ••······
V

*

PUT POINTER
*ON COMMON NAME
TEMP ROLL
"

I

I

V

..

ADO

..

"
SCALAR ROLL
"
*GROUP FOR ENTRY'
" NAME - DEF I NE *

"
.................

....

* G3 ..
* * ••• *

..

"
..

..

II

II

·····J2··········

*"

.." *.* *.* ........... .

I
I

84

"
"

• •• **** •••• **** ..."

.".

•*

*

I

*037601

.*

··*·

• •• ·*D4**·.,.** ..

.... *.** ••• * ••••"
E2

SYMBOL ON
EOU I VALENCE
ROLL

V

~OLL

~...

** •• *C4 **.* *. *** ..
*
*
" PUT A MARKER
"
"
..

RETURN

FLIP
..
ENTRY NAMES"

,."."

I

V

I

*.

I
·····02·
.
*~·*··*·
"
*~

*

I

NO

..
"rHL
..

*

•

: •• ~:~;;*~~;;.**:

StJl:3ROUTINE

.... *

1:34

··.··04*·······**
*
COpy THE
*
*
COMMON
*
"NAME TEMP ROLL *
* TO THE ENTRY •

YES

." .*.

....

V

•• •• ·J3 •••• **· •••

*

*
ADD SCALAR
"
*TO EQUIVALENCE"
*
ROLL

..
.... ******.**.** ••

I
......
V

•

..

*

~2

*

...

*

ALL
TO

ENTRY NAMES
A FUNCTION
ARE
EQUIVALENCED

PRINT
ERROR SYMBOL
ROLL

chart CI.

COMMON ALLOCATION
G0377

"

****A2*********
COMMON
"
ALLOCATION

***:~~*~~!~~!****

""
"

I

I

v

"

.".

.*

C2

*.

: ....... *~~;i~ ** .. **:

I

V

#037709

..

CLEAR

I

v

""
MOVE NEXT
"NAME TO COMMON "
AREA ROLL
"
"

"

.*********** ••• **

:"::":-J
.*

•*

"

v

[2

*.

END OF

£'3

.*

*. YES

"I
V

.*

....
E3

*.

MORE

*.

.*

* •• *

...

......
* •• *

.. NO

ALREADY ON
COMMON
ALLOCATION
ROLL INDICATES
THIS

.*

*.

•*

F2

I
I

*.
*.

NEXT

.*

*. NO

IN

". ANOTHER ."
".BLOCK."

.*--,

I

I

F3
...
NEXT

LAST

".::LOCAT~~."

I

I

I

1
V
···**G2*.****.***

1

I
" I
I
1<----'
I

RECORD
"NAME AS COMMON "
"
ERROR
"

I

#037703

V

*****H2***."·*.·*"

"
ALLOCATE
"
STORAGE FOR
" VARIABLE, RE" CORD ON GEN'L

" NAME AND DATA "
" TO TEMP ROLL
"

"
"
.*.****.*****.***

I

.

"
"
"

::~;~~:!! ~~ ~~;;:

..
..

"

E2

"
"

..

V

"..
"

E3

"
"
..

.... *. *G3*" ** ...... **
"" COPY BLOCK ""

***.

I

"
"
..

****
E2

.*.

*.

...

......J.:::.....

I

III

PRINT
HEADING FuR

v

I
V

I

*037702

..

.*---,

.. NO

E4

*. *. ......
:

*•

NAME

.... *

""

B4

." NAME SAME ". YES
-.AS

I

*·*·~ES

""

:
"

....v

." .

VARIABLE

I
v
*.*.

.. YES

.*

*. NO
". ,,~AP OPT ION." . " ,

*. NO

". ". DA~~O~~R ." • ,,---->". ,,~Lg~K Rci~~E~ ... " ,

*.

*** *.

PUNCH
[50 CARD fOR
*
BLDCK

:---,

***.

*037705

*.

V

.. *****04**"" ·JHI
.."

RETURN

:

"I

I

#037711

V

****0.J*********

""

"
"
*
"

* ••• *************

I
I

**** *02 .*.***.* **

.".

" ALLOCATE ALL
"
EQUIVALENCE
*DATA REFERRING
"
TO COMMON
*
BLOCK

..

*****************

I

**..

*****(4*********·

*****C3**********

*.

* ••
*
" YES

..

"

ALL BLGCK "
"NAMES AND DATA "
"BACK FROM TEMP "

."
ANY
*. NO
" CONTROLS AND
". BLOCK I~AMES ."---->"
ROLLS FOR
". ON ROLL ."
"
ALLOCATION
*..*
..
OF COMMON

#037701

V

*****a4.********-

"
"COpy

""

INITIALIZE
FOR COMMON
ALLOCATION

""
"

I

*037706

.... ** *82 ** **.* ** ......

B4

"...

"

":::"~:,,:~:::,, * I
I
I
I
I
1<-----'
I
V

*****G4 •••• ***** •
* COPY GEN'L
"
"
ALLOCATION
"
"ROLL TO COMMON *
"
ALLOCATION
"
*
ROLL

********** ••• *.**

I

V

.... * ....... H4" * ...... " ..........
P~INT

MAP

••••• ***.***.

I

I
I

V

******J4** •••••• • ••
PRI NT
ERRORS FOR
BLOCK

I
1

I

····K4 ••• **····
V

"
COMMON
"
"ALLOCATION AND *
"
OUTPUT
"

•••••••••• * ••••

Section 2:

RETURN TO
PROCESS NEXT
COMMON BLOCK

Compiler operation

85

Chart CK.

EQUIVALENCE DATA ALLOCATION
G0381

*****A3**·*·****·

****A2******...
.,
..

...

EQUIV."
ALLOCATION
PRINT ERROR
"

**********.****

CLEAR

*

...

OBJECT
MODULE
LOCATION

,,---->*.,

..

...
COUNTER
****************.

..

.. 84

..

.. _**

"

:

" <___________--'
:1

132

.. ***

G0382
EQUIV
ALLOCATION

.*
'.

.*

v

B2

.".

*.

DATA

ON

* •• *
...

*. NO

."

"
:

I

.***
C5

":

"

:

.-. .. *

v

INTEGRATE

.*

.".

.*

02

*.

*.

DATA
" . NO
".10 PROCESS ON.*--,

."'_*

._ •• ROLL

,

* ••
*
.. YES

v
* ....

I

it

PRESENCE ON
GENL ALLOC
ROLL INDICATES
THIS

..

.*. *.

.4

•"

*.

ENTRY".

.*.

*.

I

!

II

YES

.*"."'FJ*· •• ******

•••• * ••• *.*.* ••• *

"I
****** ••• ****.*.*

:pm
..

1<

**:

I NCREMENT
if
TgRg~~ NEXT:

••• ,.** ••

**.........
I

V

"

"

"

***.

I
:** •• G3*** ••• ***:

*38902

V

PRUNE
:ENTRY FROM

"
WORK:

..

. ..

if

"
INCREMENT
..
ifPRnJECT MOOULE ..
: PROGRAM BREAK :

*************.*.*

I
I
I

I

..
ALLOCATE""
"
"RECORD"
" ABSOLUTE ADDR ..
.. RECORD ON GEN "
"NAME FOR ERROR ..
"
ALLOC R O L L :
:
LIST

86

I

I

*****F2****·***··

** ••

** ........ * ••• *
I

V

* ...... F4 .. **** .. ****

..

""COPY
..
"

INFO GENL if
ALLOC ROLL TO ..
SOURCE ROLL
..

**********.**.*.*

I

I

I

V

**·*·G4****"'*· *.*

"
MAKE FINAL
"
"ALLOC AND MOVE "
.. INFO TO EQUIV •
"ALLOC ROLL FROM"
"
GEN ALL DC
"

..................

I

I

V

.

..

02 ..

."
"

I

"

NO

."1

*..*
* •• *

I

V

I

I
I
I

·*·**E4**********

~~~SEN!.,

i
I

.. NO

:**~*G2 •••

I

PRINT
EaUIV
ERRORS

V

".

.* CONFLICT

*..*
* •• *

I'

* .. ****05·" _.*** .. **.

v

I

.*_.

YES

.,,---->".:!HI

V

\

I

I
I
II

I

"
E3

". " . A;~~~~~ED.*

#038503

I

I

it

.. 84 ...

V

E2

******** .. **** .. ***"

I

D2

*038501

..... *cs* * .. *. ** **.

.. SAVE LOCATION ..
.. CNTR AS FIRST ..
.. ADDRESS AFTER"
"
EaUIV DATA
"

I
I

" "I
:->1

****

V

"
"

02 ..

..:

..

V

I

"
***********.*
.....

"

C~ "

I
I
I

I

V

FL I P
EQUI VALENCE
ROLL AND
INITIALIZE

"
""

I

*****C2********"*
"

.... *

:.*!*~~~;*!~~~**:

I

v

YES

V

" ALLOCATE ALL
"
*
SETS WITH
"
"NAMES LISTED ON"
*GEN ALLOC.ROLL "

EQUIVALENCE . " - - ,
".
ROLL."
I

".

I

*····84*****·····

G03B4

*.

"..
"

.. ***

"

82 :

V

"..
"

*·**ES**·"** ** **
RETURN

**** *** ** ** ****

..

Chart CL.

SAVE AREA, BASE AND BRANCH TABLE ALLOCATION
G0437

•• **A2····****-

"
BASE AND
.. BRANCH TABLE
"
ALLOCATION

"

.............. **

**···62··· . . ·****·
V

"SAVE BASE TBL. ..
"
PTR AND
"
" 0 I SPL AC EMENT
.. FOR START OF
..
SAVE AREA

•••••••••• **** •••

I

:*•••C2***.*.*.*:
V

"
INCREASE
" PROGRAM BREAK
* BY SAVE AREA
SIZE
*

"
..
*
*

THIS VARIABLE
IS USED
TO HOLD OBJECT
MODULE ADDRESSES
BEING ALLOC.

.. **** ••••••• *****

I

V

····*02*******···

* SAVE BASE TBL *
*PTR AND DISPLA-*
* CEMENT FOR
*
* START OF BASE *
TABLE
*
*

••••••• *** ..... ***

I

V

: • • • • E2 ••• "* •••• :

*
INCREASE
*
* PROGRAM BREAK *
.. BY BASE TABLE ..
*
SIZE
*

•••••••• * ••• ****.

I

V
: ..... F2 • • • • • • • • • :

*
CONSTRUCT
*
* REQUIRED BASE"
* TABLE ENTRIES *

*
*
.................

BUILD
ADDITIONAL
BASES

I

·**··G2··········
V

* SAVE BASE TBL
*PTR 0 I SPLACEMT
" FOR START OF
: BRANCH TABLE

*
*
*
*

........... *** ••• *

I

·.···H2*·········
V

*INCREASE PROG.
*
BREAK BY
* SIZE BRANCH
"TABLE AND MAKE
* LABEL ENTRIES

"
*
*
*
*

••• * •••••••••••••

I

V

: ....... 2 • • • • • • • • • :

*
CONSTRUCT
*
* REQUIRED BASE *
.. TABLE ENTRIES *

*
*
.................

BUILD
ADDITIONAL
BASES

I

V

• • • • • K2 • • • • • • • • • •

*

RETURN

*

Section 2:

compiler Operation

87

Chart CM.

ALLOCATE SCALARS

..
..
...

A3

*j....

"...

..

:

!

G039:"."AI................

...

: . . . . . A2 • • " ........... :

.....

:SCALAR

ALLOCATE:---->:

.*.

'039701
•••
."A3
". ".

...

.*

• .. A4

*. NO

ALL

.*

: - - - > " . ".P~g~~~~~D ..... - - - - > ... ~~NNY

INITIALIZE

.................

*.

.....................

• .. A5

*.

.....
.
* •• *

YES

I

"SEE NOTE

2

if
..

..

02 :

: •••• c •• **** .....

: •••• C3 ........... :

NAM:,,'*

..

t * ..
.. ....
:

..... .
BY

I

I
*039706

" . if.

*. NO
.*
SCALA~ ... " - - - - > ... ~~LL

YES

A

..

I

:<-,

.*.

.....*
* •• *

...

*. .. 411*YES

J2

.. ........ .. I

*:

NO

I
"
****

..

02

*

..

SEE NOTE

:****cs******-**:

* ALLOCATE FULL"
* ALLOCATE HALF"
..
ALLOCATE
*
" WORD SCALARS- * - - - - - > i f WORD SCALARS- i f - - - - > * BYTE SCALARS- "
:RECORD AND MAP :
:RECORD AND MAP :
:RECORD AND NAP :

..

"

... 02 ..

"

"

I

I

······02*·········.

11039707

•
..
"

V

V

"

SET
MODE OF NEXT
SCALAR

I
I

V

*.

E2

.*

."
".COMPLEX

".

i

.*

F2

I

*039704

SEE

NOTE

• •• **E3* •• *** ••••

*.

..

..

" . YES
..
MODE •• - - - - > "

ALLOCATE
STORAGE AND
..
RECORD. PRINT ..
MAP
...

**.
.**
••

."

*.

NOTE 2IF DURING PASS I .
NO NAP IS PRINTED
AND ALLOCATION 15
NOT RECORDED FOR
COMMON AND EQUIVALENCE SCALARS.
INFO 15 PICKED UP
FROM OTHER ROLLS

2

A"
I"
I
•••••••••••••••••

I

NO

.~SEE

NOTE

*•

I

J

"...

....I ..

"

"

V

K2

..

• "
DOUBLE
" . YES
".
PRECISION
."-".
MODE
."

*.

........ .*
•

NO

I

V

G2

•*

• "
•• ~~ORT

.".

*.

1039703

• •••• C3 ••••••••••

*.

..

...

.

..

" . YES
" MOVE GROUP TO "
INTEG:~ •• - - - - > :
S~:t~RW~~~L : ,

*...
* •• *

I

I

•••••••••••••••••

v

~ ::"~

NO

..

v
....

11039702

.i t .*..
*. it.
... ...
*. ••
H2

..• ••••
.
"I
*.
•••••••••••••••••
v
H3 ••••••••••

••
" . YES
if
MOVE GROUP
".SHORT LOGICAL."-------> .. TO BYTE SCALAR

· ......

*,

....

ROLL

NO

V

.. "'OVE GROUP TO
..
FULL WORD
SCALAR ROLL

.
..
"
•

'. . I

:.::.:->1
,039705

v

~····K2···*······

u

"
PREPARE
..
uTD PROCESS "'EXT"
D
SCALAR
"

U

D
~

............... .
II
..

......
V

"
:

88

A3

:

..

...
" . : : .......

.J2

1039708

..

it

...->
·····J2··········
"
..•

RETURN

.... **********It*

."SEE NOTE
NOTE 1THESE QUEST IONS
SEPARATE BAND
16 BYTE
VARIABLES

****05··****** *

......

..

..

2

Chart CN.

ALLOCATE ARRAYS
G0401
•

••• *A2*· ... ••• ... ••
ARRAY
ALLOCATE

•

*.*.*.*.* •••• **

I

·
·

.
.

V

* ••• *82*********·
INITIALIZE

•• *** •• *.*.******

:"::"
:-> I
*.*.
V

lI040101

.*

*.

•••

.*

C2

*.

ALL
ARRAYS

*. YES

•• PROCESSED.·

*.

i

* •• *

·*.···C3*··"****···"
"
---->:

#40104

*.

.*---->

.*

..

PRINT
ANY PARTIAL
LINE

..·*C4 ..

·····*** "

RETURN

*.* .. *.******** ..

NO

V

.". * •

02
NEXT
• " ARRAY IN
". YES
". COMMON EQU I v •• " - - ,
".~~ DUMM!"..

•*

*•

I

* •• *
..

NO

""

I

"

v
* .. *.
H2

""
"

V

*****E2**********

"

"

ALLOCATE
"
STORAGE AND
"
"RECORD LOCATION"

" *** •••• *.*.***"
•••

I
V

*****F2*··*******

"
•
"
"

·

ENTER
•
INFO IN ARRAY •
MAP. PRINT
"
COMPLETE LINE.

••• ***********.*."

1

....
" *G2*·········"
V

" CALCULATE AND "
"RECORD BASE PTR"
"AND DISPLMT IN •
..
CENTRAL
"

***.* ••••••••••••

:,,::"
:->I
*.*.
V

'040102

•••

•*

•*
".
*.

H2

*•

PASS

1

*.

*•

.*
* ••
*
.. NO

*. YES
.* . " ,
v

••• *

"
"
..

I

K2

"..
"

····.*J2····**·**·
V

"" REPLACE GROUP ""•
ON ROLL
..
"
"
••••••••••••
** •••"

::::::->1
....
" ·K2*·········"

*040103

v

"
PREPARE
"
"TO PROCESS NEXT",
"
ARRAY
•

"** •• * •••••••

**... ....
"
"
"

v

:

C2 :

Section 2:

compiler Operation

89

Chart

co.

ADD BASES FOR SUBPROGRAM ADDRESSES
G0402
****A2*********
* PASS 1 GLOBAL *
*SPROG ALLOCATE *

* *************** *

I
II

V

*****B2**********

**
*

ALIGN TO
FULL WORD
BOUNDARY

**
*
*

*
*
*****************

I

V

*****C2**********
*DETERMINE BASE *
*
*
PTR AND
* DISPLACEMENT *
*FOR PRESENT LOC*

*******************

I
I

V

*****02**********
*
COMPUTE
*
*
LENGTH OF
*
* OBJECT MODULE *
*SUBPROGRAM ADR *

*
*
*****************

I
V

*****E2**********
*COMPUTE LENGTH *
OF OBJECT
*
MODULE
*
*
* SUBPROGRAM
*
ADDR
*
*
*****************

I
V

****F2*********
*
RETURN
**
***************

90

BUILD
ADDITIONAL
BASES

chart CP.

ALLOCATE SUBPROGRAM ARGUMENT LISTS
GO~~2

*
*

****A2*********
SPROG ARG.
*
ALLOCATION
*

* *************** *

v
.*.

B2
*•
•*
*.
****B3*********
.*
ZERO
*. YES
*
*
*. ARGUMENTS • *---------> *
RETURN
*

*.

*..*

.*

* •• *

*

*

***************

*

NO

I
V

*****C2**********
**
** ALIGN TO A
*
FULL WORD
*
BOUNDARY
*
*

*******************

V

*****02**********
* DETERMINE AND *
* SAVE BASE PTR *
* AND DISPLACE- *
*MENT FOR START *
* OF ARGUMENTS *
*****************

V

*****E2**********
*
INCREASE
*
* PROGRAM BREAK *
* BY SIZE OF
*
*ARGUMENT LISTS *

*
*
*****************

V

*****F2**********
** CONSTRUCT **
* REQUIRED BASE *
* TABLE ENTRIES *

*******************

V

****G2*********
**
**
RETURN

* *************** *

Section 2:

Compiler Operation

91

chart CQ.

PREPARE NAMELIST TABLES
G0443

·.·.·A2*········.

.. ..

PREP

"

NAMELIST
•••••••••
* ...... •

I

I
I

·.•·.·82···. ······
V

"

.*

• FLIP NAMELIST ..
•
NAMES AND
•
• NAMEL I ST t TEMS ..

••

: •••• *~~~i~ ••••• :
C2

••••

*.

B4

•

B4

...vI

••

*.

* •• *

....

1044307

*.

• •••• C3 • • • • • • • • ....

.....
"
COpy THE
."
DATA
•• NO
"COMMON DATA
-• • ON THE NAMES • " - - - > , , TEMP ROLL TO
".
ROLL..
"NAMELIST NAMES

** .
. **
••

"
"
..
..

...
ROLL
•
•••••••••••••••••

C4

.".

.". ···02···. ······.
ALLIGN TO
FULL WORD
BOUNDARY

I

.

V

···*OJ···· .. *·** ..

..

RETURN

"

:

*

I

V

"
..
•
..

...................
I
"I
:->1
v

41044306

*.

• ••• *H3 . . . . . . . . . . ..

....

...

NO

MOVE

MARKER

"SYMBOL TO
NAMELIST
"
ALLOCATION

..

."---->"

:****.~~~;* ••

*. * •• *.*
"

J2

.~

....

YES

I

****·J3···*·····*"*
V

" •

DEFINED

".

... ...
..

"

YES
." . " ,

••

"
INCREASE
if
.. PROGRA,.. BREAK
.. BY ENTRY SIZE"

I

v

NO

....... ..

,

..

I

""

I

84

·.···K2··········
"..

..
..

"

"

REGISTER"
.. VARIABLE AS A *--,
"
SCALAR

••••••• * ••••••

: •••• ~~*:~~~ •••• :

..

V

"I

*....

._.v

"
..
"

92

**.:

I

• * ALREADY "'. *.

• • 
****

NO

**.**04 ... ** ...... ***

I

ENTRY

************ ...... ***

V

:.*.!;~~.~~~; ••• :

"
INCREASE
" PROGRAM BREAK
"BY 16 PUT ZERO
"
ON WORK

...

" *.** ..

V

"OETERMINE BASE
"
POINTER AND
"DISPLACEMENT
"
FOR PRESENT

• •• *"'cs********·*

* •• *

~** ...... ** ........

"
MOVE
if
"NAMEL I ST NAMES ..
• ROLL GROUP TO "
"
"
COMMON DATA

H2

05 :
11044304

*.

v

I
·····E2··········

:

:

I

iII· • • • • • __ . . . . . . . . . ...

..

v
... * ........

*..*
*

·

YES

."
*.
"
DETERMINE
"
••
". YES
..
NUMBER OF
"
".
AN ARRAY
•• ------->*DIMENSIONS FOR *
*.
."
" SIZE OF TABLE"

I

.. YES

+

'.1

*.

.*

v

v

C2

.*

I

:->1

*044301

*.

A SCALAR

... NO

........ I
:

....

"

B4

"..

"

(2

"

..*

**** "
H2 :

chart CR.

ALLOCATE LITERAL CONSTANTS
G0444

****A2*********
*L I TERAL CONS T.
ALLOCA TI ON
:

*
:

* **** •

***************

:

I

I

·

I

.

V

V

******84***.******·

*·***82*********·

* INITIALIZE
•
.PTRS TO LITERAL.
*
CONST ROLL
*

MOVE LITERAL
.TO OUTPUT AREA •
PUNCH I F CARD
*
CORRE.CT
*

*****************

.**.*********

I

.**.**
:

C2

****

#044401
THE PRESENT
POINTER IS
COMPARED TO
A POINTER TO
A NEW GROUP

84 :

•*
".

:->1v
C2

I

.*. ••

.*

V

..• ***
*C4 ** ** ** *** ..
PUT BASE PTR
•

*.

*

ALL
*. YES
CONSTANTS
.*,
* .PROCESSED. *

*.

i

... • *

. ..

AND
•
.DISPLACEMENT ON*
• LITERAL CONST

*

:* •• **~~;;.****.:

v

NO

I

(::":

V

*

V

:

.* .... *D2 * ... *** ****
*

•
*
*

COMPUTE AND
SAVE PTR FOR
NEXT GROUP ON

*
*

I

*
•
•

.*

I

****

* •• *

V

THROW
AWAY OLD
POINTERS

......

*..*

****

:** •• E4***** ••• *:

lI044404

PAUSE ••
••
OR DATA
•• YES.
*
•• STMT LITERAL •• - - > * C2 •

*

E4

*

.*. * •

*.

:

*
*

V

E2

•

C2

•

:*.***~~;;******:

•*

.... **

•••••• **** •••••••

NO

I

...I
V

V

*.
*. *. Y E S "
.* .*
..
*.
PASS 1
• *------->*
RETURN
*.
.*
..
*..*
•••••••••• ****.
* •••

:****F2 ••• ******:

F4

•

INCREASE
*
* PROGRAM BREAK *
*BY NO. BYTES IN.

: •••••:;;! •••••• :

··**FS*··.·····

j"0

I
V

·····GZ···*······
• DETERMINE BASE
•
PTR AND
* DISPLACEMENT
*
FOR PRESENT
*
LOCATION

V

·*·*·*G4 ••••••• * •••

*

PUNCI-t
ANY PART IAL
CARD

*

PUNCH
REMAINING
TXT CARD

*.*.***********.*

...I

I

V

•*
•

.*

H2

PASS

..... *.

*.
1

....

V

*.

.*.*.

*

*--,

I

* •• *

.. YES

I
I

lI044402

····H4·***··.· . *
*

NO

RETURN

.
•

••••••••••••• **

v

••••

:

*

•

B4

:

V

·····J2··········
.THROW
*
PTR
AND
•
• THIS

AWAY BASE01 SPLMT
•
PTRS TO
LITERAL

·.................
I
....
V

. .
*

•

*

C2 •

Section 2:

Compiler Operation

93

chart cs.

ALLOCATE FORMATS
G0445

.

**"'«A2*******"·
FORMAT
ALLOCATION

.

........... ***** ....

I

I

v

144502

... ** *84"""""""'" * ..
*
**
NOTE

:****82****.****:
SET
POINTER TO
FORMAT ROLL

BUILD FORMATS

,-->*

ADO I T I ONAL
:BASES REQUIRED

*.* ..... * .. * •••• ***

************4****

I

"""*",,
:

C2

H446~;""
•*

:->1

.~.

C2

".

*.

.*

.-.
C3".

II

I

~

*•

V

••• **C4 . . . . . . . . . . .

.

•"
DATA
". NO
.*
PASS
". YES
". TO PROCESS
... ------->*. 1 OPEHATION .*

*.

*..*

.*

*.

* •• *
"

I

*..*
* •• *

.. """" ,,->
" I

YES

"

..

..

1044501

·**** .....

*.

..

************* .. ***

03

*.

*.

-,., YES
.- ' ' ' ,
••

v

Til OUTPUT
AREA PUNCH
XF CARD
COMPLETE

.... .ft**_ •• " •• _

.CALCULATE BASE ..
..
AND
• DISPLACEMENT
* FOR FORMAT

"••• ** ........ ** •••••..

I

I

:** •• G3.** ......... :
V

..
REBUILD
..
FORMAT ROLL
:WITH BASE PNTR

I

V

.. *.... * ..
C2 "

"

V

·····*H3····· .. ••··•
..

PRINT FORMAT
MAP. IF
OPTION
SPECIFIED

..............

..

..

..

94

..
:

•••••• * ••••••••••

I

"

PUNCH ANY
DATA LEFT ON
..
tXT CARD

• .. ***.05* ** .**'* * * '*.
PRINT MAP
LINE.
REMAINING

------->

I
I

I

V

..

*************

V

**** MOVE
·*<;2 ******** ... FORMAT

"

.*------->

* ••• "'F3**********

i~ : : :

.44602

• ..

NO

......................"

I

... ....

**· .... ·04 .. **** .. • ........
".

•
OBTAIN
..
.. NUMBER OF WORDS"
•
FOR FORMAT
..

V

1

H044503

I
II

V

:***!~*:~~~:!.**:

•*

..

V

:****E3*********:

INCREASE
"
IPROGRAM
..
BREAK BY
"
"NUMBER OF BYTES"

.*
*. 4..PASS

.

I

I

..

".

V
.*.
••

• ..
- ••
*
.. YES

V

*****E2** ********

.". *.
!="2

...... *** .... *.......

NO

.* FORMAT
*. TO PROCESS

..
..

.*

RETURN

03

" ... ** *

V

• ... • ... *02 ..... • ...
..
COMPUTE AND
" SAVE POINTER
..
TO NEXT
FORMAT
..
GROUP

..
:

....I ..
....
V

03

..

*

*

****E5*********
RETURN

•

Chart CT.

MAP EQUIVALENCE
G0441

... ****A2*.******* ..
"

EOUIV
MAP

"

* •••• ***** ..... **

I

V

.*

•*

82

.". * •
ANY

*.

". EOUIVALENCE

*.

....

*.

DATA.*

* •• *

...

NO'"

."------->"...

****83*********

...

RETURN

"

..*******.*.***

" YES

I

V

******C2***********

PRINT
HEADING FOR
EOUIV MAP

I

V

... ····02****·· ... •••

"DETERMINE DELTA"
"FOR EOUI VALENCE"
" ADDRESSES DCB ..
" TO BASE TABLE ..
"
SIZE
..

••• ****.*****.-.*

I

V

..

..

·*·**E2**·****···

FLIP THE
..
EOUIV
..
:ALLDCATION POLL:

**.**************

" .:->1I
:

F2

*.**

*044101

v

....

'044102

•
COpy
•
COMMON NAME
• TEMP ROLL TO
•
EOUIV ALLO•
CATION ROLL

."
EQUIV
". NO
". ALLOCATION ."

*.

*.

ROLL

* •• *

.*

.*

•
•
•
•
•

••••••••• ** ••••••

.. YES

I .

I

V

V

DATA 1 HOLDS
THE ADDRESS
OF THE
VARIABLE

V

···**F3***·······

F2
••
• -DATA ON--.

··.·*G2··········
..
..

..
.·····G3··········

.................

.*** ••••• *** •••••

..
..
..

MOVE NEXT
GROUP TO
CENTRAL.
INCREASE
ADDRESS

.UPDATE PROGRAM.
:
BREAK
:

..

I

I

V

V

·····*H3····***····

: •• **H2*** ••• ***:
.. ENTER INFO IN •
• MAP. PRINT IF •
: LINE COMPLETE :

..

•••••• * •• * ••••• **

I

····*J2··········
V

·

PRINT
PARTIAL LINE
OF MAP

.............

I

V

····J3*········

.DETERM INE BASE •
•
POINTER AND
• DISPLACEMENT •
: FOR VARIABLE :

.................

RETURN

.

•••••••••••• * ••

I

V

·····K2*·········

..
PUT GROUP
.. FOR VARIABLE
ON COMMON
•
NAMES
•
TEMP ROLL

•
•
.,
•
•

.................

. ...
V

.. ••F2** •

•

****

section 2:

compiler Operation

95

Chart

cu.

ALLOCATE SUBPROGRAM ADDRESSES
G040:S

"•

U·· . A2··· . . •• . •• .
GLOBAL SPROG

.. u • • :;;~;~!~

••••

..

I

I
. ·.··82·**·······
V

it

..

•
•
•

·

FL I P THE
GLOBAL SPROG
ROLL

•

.
•

•••••• ******** ......

•..... " I
:

C2

..'.....

*040301

.*

:-> I
v

C2

.".

*.

*040303

**.**C3*.........

*.

..

COPY COMMON

**.··C4**·*******

.....

..

,"
DATA ON
*. NO
"DATA TEMP"
"FLIP
. , THE GLOBAL
• ,,---->..
ROLL TO
. - - - - > . THE USED LIB
it.
SPROG
."
.. GLOBAL SPROG
"
"ROLL
•• ROLL .*
...
ROLL
...

* •• *
..

I

.....................

***************_ ...

I

YES

:...... ** :->1
it

I

"

04

v
*11.**02*.* ... * .. * .. 4

•••

04

•
•
MOVE NEXT
"CROUP OFF ROLL
•
TO CENTRAL

v

lI040304

."

i

V

V
•••

, it.

....

."

*. ....

*.

*****E3*"'*·******

*.
...

DUMMY

.... -...
"

I

.*

..

..

YES'"

...

. " - - - - > " I N S E R T ZERO TAG"
..
VALUE
...

.*

*.

E4

*.

I

it

"
"
"

SPROG ALLOCATE
AND OUTPUT

: •• *~~~;~ .~;~*.*:
I

I

V

....

.*

.*****1:5***********
.. • NO
'''/

I

*****F4**********

"

I
I
I
I
I

MARK GROUP
FOR INLINE
FUNCTION

if

PUNCH
PARTI AL ESD
CARD

*************

I

.....

I

V

"

I

j3 :

V

.*.*.**********

if
H3

V

·····H3 .

*
if

II
V

·** .... • ... • ..•
ALLOCATE

"
STO~AGE FOR
if
"
ifAODRlSS RECORD."
"
P~INT LIST
if

: ... *~~~;~*;;~ •• *:

... *.*..,,->1

I
I

"

•

J3

I
I

if

·····J3 ...... ··· .....
V

..•

puT

GROU~

..if

"ON COMMON DA T A ..
•
TEMP ROLL
if

if
..
if

96

"

RETURN

if

"

I

V

***·**FS***********

if

...

•

"

.. ****GS*********

I
I
I

C2

H3

••• *** ••• * .. ***.*.

:

**** •••••••••••••

•

..

....

PUT GROUP
•
.ON COMMON DA T A •
•
TEMP ROLL
•

if

****

....

V

······G2··*··**···.
....

• •• **********

v

YES

I

V

·

.. PRINT PARTIAL if
LINE OF SPROG
..
LIST IF
..
REQUESTED

.*

1

I

1<
I

I
I

*.

* •• *

!

"
ALLOCATE
"
STORAGE FOR
"ADDRESS RECORD
• (PRINT LIST)

*****************

YES

I NL I NE
FUNCTION

..

·•·· . F2*···· . ···•

*040302

• ..
If.

NO

I
I
V

*040308

• ... ***05**********

".

* •• *

I

it.

#040307

*
COPY COMMON
..
.*
DATA ON
*. NO
"DATA TEMP
•• THE USED LIB • * - - - - > *
ROLL TO
••
ROLL."
•
USED LIB
".."
.. FUNCTION ROLL ..

if

•
"

I
E2

*.

.......

....
04

if

•
"

SPROG ALLOCA TE
AND OUTPUT

.

Chart

cv.

BUILD AND PUNCH NAMELIST TABLES
G0405

.* ..... A2 ** -_ ••• _..

*

BUILD
NAMEL I ST

*

*****!:~;~*****

**
*

I
II

*.

*.

l::J2

#40506
-.

DATA ON

*. *.

NAMELIST
NAMES
-.ROLL .*

......
*

.*

•

NO"

****EJ3********-

*-------> *

.. __ ititititit • •

MOVE FIRST 4
WORDS OF
I TEM ENTRY
TO CODE ROLL
AND PUNCH

"

*._."'_

*
"

*

FL I P
*NAMELIST NAMES
* AND NAMELIST
* ALLOCATION

ROLLS

*
*
*

...

THE LATTER
HOLDS THE
ITEMS FROM
THE NAMEL I ST
LIST

..

.... -- -* .............. * *-

*

v

PRINT HEADING
FOR NAMFLIST
MAP IF

.J.

:*****~~;~* ** **.:

I

*

I

v

#040501

.*

.*
*.

...

I

*->1

E2

*

** * *04 **** *** ***

•
*
MOVE ALL
*
DIMENSION
*
"FACTORS TO CODE*

*

**~;~~~;!;~**
*

£2

• *.

*

#040505

...

L>ATA
LEFT ON
NAMEL 1ST
NAMES
•• ROLL

... * ...
I

...

I

I

v

-* **** *****

•• _it ••

v
.*.
*.

.* VARIABLE AN *..*---,
NO
*. ARRAY.*
I
...
.*
I
* •• *
v
.. YES
***'*
I
*
*
I
* J2 •
I
*
*

I
*

C4

")I..

I

*02

•

I

V

*--

*

")1.** ** ** ** ** ** *** *

I

-_ ... **C2"" -- _. *--*

**

V

~****B4**********

...

RETURN

YES

..

**
*

I

• *.
.*

84

I

v

.*

*.*.

*.

.*

:

-*-*-E3---** •• _-"

*

*. NO
*
• *------->*

.*

*
..

COpy COMMON
DATA TEMP
ROLL
TO NAMELIST
NAMES ROLL

v
****

*

J2

:

H4

*'*
*

*

-*-_ . _-.*. __ . _._-

YES

I
I

I

v

V

............
*F 2"'''''''''''''''''''''''''
ENTER NAME +

******F3***********

*

LOC IN MAP
LINE PRINT
IF LINE
COMPLETE

*

--*----------

_. *-*-*------

I

I
I
I

I
I

v

*_ .... ** ** ....

.......... *G2
* PUT BASE AND
* DISPLACEMENT
* OF NAMELIST
* TABLE ON COM* MON DATA TEMP

PUNCH A NO PR I NT
REMAINING
INFO IF
REQUESTED

V

*

*
*

****G3*********
RETURN

* --_ •• *.******** *

_._--*-*-----_._.*

*'*
*

I

I

****

I

V

V

*****H2**********

·****H4**********

*

*

*
*
*

MOVE NAMEL 1ST
NAME AND 2
WORDS OF 0 TO
CODE ROLL AND

: ........... ~~!~~!

.. *.-.
*
*

*
*
*
*

•
•.UPDATE

-*._ . . :

.***

v

• **** *

V

#040502

:

J2
...
• -DATA ON-.
•• NAMELIST
NO
*. ALLOCATION
.*--,
ROLL
••
I

THE NO
ANSWFR INDICATES EITHER
NO DATA OR
A MARKER

*.

*.

*.

...

I

.itv __

* ••
.. *
YES

I
v
-_it•
*

...

*

84

*

*

II

I
II
.*.

*

*

* ** ** ** ** ** ** ** **

*->

J2

*

PRGGRAM
BREAK

*
*
•

H4

****

E2

:

****

*
*
*

...

*

section 2:

Compiler Operation

97

Chart

cw.

BUILD BASES
G0438
*
*
*

****A2*********
BUILD
*
ADDITIONAL
*
BASES
*
***************
****

I

*
*
* B2 *->\
* **** *

V

*****B2**********
**
OBTAIN
**
*PRESENT PROGRAM*
*
LOCATION
*

*
*
*****************

I

v

.*. * •
C2

•*
*.
****C3*********
.* MAX FOR *. YES
*
RETURN
*
*. LAST BASE • * - - - - > *
*
*.
.*
...
*
*.
.*
***************
*. • *
* NO

I

V

*****02**********
**
INCREMENT
**
*BASE ALLOCATION*

*

*

*
*
*****************

V

*****E2**********
*
*
REGISTER
NEW BASE
*
ALLOCATION
*
*****************

I

v

****

** B2 **
* **** *

98

Chart

cx.

DEBUG ALLOCATE
G0545

****A2*********
"

DEBUG
ALLOCATE

"
"

" "I
:->,

:

82

****
•*
•"
".ON

*.

82

.v".

*.

*****63*****."'.* •
...
...

*.

DATA
". NO
"INVERT
"
INIT ROLL ."------->*THE SUBCHK ROLL"

*. * •• * .'"
"

.*

...

...

*

...

*****************

YES

I

"to""""

I

:

C3

****

V

*****C2**********
"
MOVE
* VARIABLE NAME
*OFF OF ROLL TO
" CENTRAL AREA

*
*
"
*

.*

*.

"
"
*****.***********

•*

*.

:-> I
C3

v
.".
*•

" ....
' . .**
"

I
.".

02

V

I

*****************

I

I
I
:****E2*~*******: I

V

INIT

•"

~gLl~ ~~EL

•*

E3

.". * •

MATCHING

*•

".

NO

"G~~g~y O~o~tO~!L " ,

1

:.....~:!~:.....:

I

I
I

*. * •• *.*
* YES

I

I

II

V

.*

.*. *.
F2

V

ARRAY
·.ROLL

* •• *
*

I

*****F3**********

*.

." MATCHING
".
GROUP ON

*.

"
SET
"
"THE SUBCHK BIT "
" IN TH~ GLOBAL *
:DMY ROLL GROUP:

". NO
.*-,

.*

.-

YES

"**"" **"

1

V

*
"

SET THE INIT
BIT IN THE
ARRAY ROLL
GROUP

•*

*

*.

G3

*.ROLL

.*

.-

NO
.",

I

I

v

*
:

****

"

C3 :

V

*****H3******·***

*.

.* MATCHING
*. NO
"GROUP ON GLDBAL",
".DMY ROLL ."

"' •• *

*. ".

.. YES

V

.". *.

.".v * •

ARRAY

1<-----'
I

*.

1

* •• *

I

H2

i:-" -"-"-"-"-"_.

." MATCHING
".
GROUP ON

*****************

.*

I

I

*****G2**********

"*

***************

YES

"
MOVE
"
" VARIABLE NAME"
*OFF OF ROLL TO "
: CENTRAL AREA
"

* ••
*
* YES

SET THE

...

*****03*********-

*•

.*

-.ROLL

*

RETURN

1

*.

• " MATCHING
". NO
".
GROUP ON
.*-,
*. SCALAR.*

:

****C4*********

I

V

.*

*.

DATA
*. NO
*
ON SUBCHK
• ,,-------> *
ROLL.*
ft-

.*

... YES

I
I

I

v

****
"*

:

B2

""SET THE SUBCHK "*
* BIT IN THE
*
"
ARRAY ROLL
*
:*****~~~~~*** •• :

II

:

V

***.

"

V

*****J2**********

:

*

C3 :

"

SET
"
"TH~ INIT BIT
IN"
"THE GLOBAL DMY "
ROLL GROUP
"
"

*****************

I

V

""
"

****
B2

""
"

section 2:

Compiler Operation

99

Chart 07.

PHASE 3 - UNIFY
*

..

****
A4

GOIII

•
t-lELEASE
.PROGRAM SCR I PT
ROLL
"

I
I
.·.·.82········ . ·

I

.. ** .. *84 * .. ** .... *** ..

"

:~~~.~~~*~~::~~!~:

SET UP
"
POINTER TO
:ARRAY REF ROLL

"
ALLOCATE
"
"GROUPS FOR ROLL"

.. ***** •••••••••"
....
.....

C2

:

..

Coli

****
• •••• C3· . . . . . . • ......

DATA ON
It.
PROGRAM
". SCR I PT
".ROLL

* •• *

j

.*

.COPY AREA FROM •
". YES
" RESERVE START"
. " - - - > * T O SCRIPT ROLL"
."
• RESERVED AREA "

.*

".

..

*.

...

!

:->1

C4

V

****

"
RESERVE
"PROGRAM SCR I PT
ROLL
"

"

i

"

CZ "

...

...

V

*****04**********

*

= ..•

*SET REG RUNG
*4 AND INCREASE
:
POINTER

•
"
"

I

II

GO liZ

V

V

*****E4**********

:~~~!~~~~~!=~~!~:

MOVE NEXT
GROUP FROM
SCRIPT ROLL

..
CONSTRUCT
INSTRUCTION
"
.. FORM. FOR REGZ

....................
.*. *.

I

I

V

*****F4**********

*•

*

"•

•*
END
*. YES
*.OF ROLL DATA . " - - ,

*. *.

* •• *

*
*
"

*****************

1
V

F2

"
:

*.*.******.***.* •

······E2····· . ·•··"

.*

..

* •• *

:*::":->1
"

****C5*********

.*

NO

"
.....................

.""..

GOtt3

*.

*..*

.** .....

.". ···02······

."v .*.

."
PO INTER
". YES
"CONVERT TO
".OUTSIDE ROLL . " - - - - - > "
ADDR CONST

................. .

NO

,
111106

I

.. **** ..

."

"
:

.... *** .. ** •••• ** ... **

1
v
" *.

."

"

"
•
"

V

V

:*::":->

I

V

·

UNIFY

....... * •• ** ••••

GOl4S

"

•• .. ··A4····******

****A2***··****
START

"

..

"

I

.,,'"

•

•• *.***.*** .... *.**"

v

""
:
"**"

" 1'10

I

*

I NCREASE REG
RUNG BY 4

I

I

A4 :

GOltZ

V

V

* •• * *G4*'* **.* •• * ...

····
* . . G2·**·······*

"CNVT/FORMT-DCAZ*

*-*-*-*-*-*-*-*-*

*
REPLACE
"
"GROUP ON SCR IPT"
*
ROLL
*

*CONSTRUCT INST *
"
FORMAT FOR
*
REGISTER Z
•

*.* •• ** ** ** ** *.* ....
I

I

I

GOIIS

V

V

.. U·.H2··· ..

····**

"

*-#-*-*-*-*-*-*-*
"

PROCESS
NEST OP
LOOPS

"
*

• • IJ • • • • • • • • • • • • • •

1

V

•*

J2

.*. *.

*.

• •••• J3 ••••••••••

..

..

• * LOOP TEMP *. NO
" SET REO LOOP
"
*.CNTS REO LOOP."------->*TEMP CNT = LOOP"
*.TEMP CNT ."
*
TEMP CNT
*

*. .... * .*
..

YES

....
....
I

:

100

E2

....I
*.*.
V

V

*

*
:

"

: C4 :

*00 NEST UN.DDAZ*

*

*.**

*"

*

EZ

"

"

*

OBA2

*****.** ... **-**.

"

Chart DA.

BUILD ARRAY REF ROLL
G0145

•
•

•••• A2 ••••• • •• •

ARRAY REF
ROLL
ALLOTMENT

*******.*******

X

*****B2*****····*

•
GET
*
BEGINNING
* ADDRESS OF
*
*ARRAY REF ROLL.

X

·.*··C2·*·**·****

**

GET ADDRESS
* OF PARSE SAVE
AREA

*

X

**

*
•

.".

D3
*.
.*NO. OF it.
***"04"********
*
.*
ENTRIES *. YES
*
*
* ••••.••• X*. EQUAL ZERO
.* •••••••• X*
RETURN
...
*.
.*
*
...
*..*
***************
* .. *
* NO

*****02**********

" GET NUMBER
" OF ARRAY REF
* ROLL ENTRIES

"" E2 *...
*
.
*
* . x•••••••••••••••••••••••••
1fl45~i**
X
*"**"E2"**"*"""**

**
"* LOAD GROUP
*INDICATED WITH"
"INITIAL ZEROS "
** .. ***************

x

".*"*F2"""**"**.*

F3

.*.

*.

ALL *.
* ••• F4 •• ** ••• **
INDEX TO
•• ENTRIES •• YES
•
NEXT ENTRY
* •••••••• X*.
PROCESSED .* •••••••• x.
RETURN
*
• POI~T ON ROLL.
••
.•
•*

*..*

*********** ••••

. .
*

*

E2

*

*

Section 2z

compiler Operation

101

Chart DB.

MAKE ADDRESS CONSTANTS
"

..

"

A4

...

I

"

* ... ** A2** ** ** ** ..
CONVERT TO
ADR CONST

""FOR
"

IN DA TA

"

34

"

• *GRP

UP POINTER"
FOR LOOP
"
CONTROL ROLL

".

ROLL

*.

"

..

I

.*

... • *

"
.
F4 ..

V

"****C3**********
...
..

...

FOR

GEN

...

.*

*****C4.*·"-·******

""SET

"•

"

"

POINTER TO
NEW GROUP ON
CONS T RGLL

* ADR

*

................. -....*

"

I

NO

I

*****02*********·
INCREASE
POINTER

IEYGEN

"

I

"

·

*****04****·*·**·

V

.****03*********.

"

"

I

I

V

"

"

" PLACE BASE AS •
"NEW GRP ON ADR "
CONST ROLL
•
"

"

*****************

I
I

I

I

V

*****E2**********

"··**E4**·*···**·

I

V

"INCREAS[ PTt-! ilV.
" TEMP LOC FOR
"
.LOCPS BY 4 ANu ..
•
PUT ON ADR
*

"

"

"
MOVE
"BASE INFO TO

"

WO~

"

"

..

"
•

•*

.". ".

#11304

*•

"
•
"
:

I
i

.... *

YES
."----

REGISTER
i~.

•

"i'~O

*

II

I

I

j

I

.... *

NO

J: ORD ". *.

I
lI011302

"

I

"

*.**

....
Alt

PRUNE WO

. ..

NO

v

:

V

:***.J3** ............ :

EQUAL TO
*. Y E S "
OR LARGER
• ,,---->*
*. THAN 0 .*
..

... .'"

.
:

*..
•

I

"
..*
'I.
.*

."
••

C2

>1

.•H'·:·....

*.

I

.iI

.*
*. YES
".TAG FIELD = 0 . " - - - - - - - >

V
.".

···**

.. v_...
*..
*

I

• * ·;}GENERAL ••••

.*

V

REPLACE t3ASE
WITH TEMP PTR
ON LOOP
ceNTROL ROLL

I

V

"

:

•• *.
C2

•
•
"
"

........ -........... .

II

G2-*-..

*.

*-> I
•
I
I

NO

1

".

"I

.****F4.** ••

• " REFER TO
". YES
".
TEMP AND
."----------.
".
CONST
."
".ROLL ."
"

~

I

F4

•

v

F2

CON~T

.** •• * •• **** •• ~**

I

102

..

"

:

•

v
****

."

I

•"
POINTER
". YES
"SET UP OATA
"
".OUTSIDE ROLL . " - - - - > " A N D INITIALIZE"

"

NO

I

... * .. *
v
lIo 1130 1
.".
C2
*.
.*
....

*.

I
I

."

II

"I

*.

YES

.*---,

••

.... *

,,->\

"

...

"".ATCHES ••

•• ON ADR CCNST

"
.****************
C2

3

... ." . ...

V

*****82*********·

"""*",,

"
"
•
•

*********.*.*****

I
I

"

"

dASE ([VEN
CODE

01 SPLACEMENT)

"

I

""SET

V

*****A4******···*
"

* ... ** ... ***** ....... *

"
"

I

lI011103

G0113

THE WORD
DOES NOT
CONTAIN AN
AREA CODE
AND DISPLACEMENT
INDICATING A
NEED FOR A
TEMPORARY
LOCATION

Chart DC.

CONSTRUCT INSTRUCTIONS
GO 112
*
*

****A2 ******** *
CONVERT TO
*
INST FORMAT *

* *************** *

I

V

*****82**********
*
GET
*
* REG RUN OFF *
*ARRAY REF ROLL *
* FROM POINTER *

*
*
*****************

I

V

.*. * •
C2

•*
*.
****C3*********
.* GENERAL *. NO
*
*
*. REG. NOTED • *--------> *
RETURN
*
*.
.*
*
*
*..*
***************
*. * • YES
*

I
V

*****02**********
**
MASK
**
*REG. RUNG VALUE*

*
*
******************

I

V

*****E2**********
*
PLACE
*
* VALUE IN R2 *
* POSITION FOR *
* INSERTION ON *
*
ROLL
*
*****************

I

V

•*

.*. * •
F2

•*
*.*.

*.

RI
g~

* •• *

*•

*. R2
.*.*~

•*

*11 RI

i

v
: *::*:

* **** *
V

*****G2**********
**
SHIFT
**
* VALUE TO RI *
*
POSITION
*

*******************
****

I

: H2 :->1
* **** *
V
*****H2**********
**INSERT VALUE IN**
* ZERO RUNG OF *
*ARRAY REF ROLL *

*******************
I

V

****J2*********

**
RETURN
**
* *************** *

Section 2:

Compiler Operation

103

Chart DD.

PROCESS NESTED LOOPS

..
..

...

.

..

A3

..

1

I

GO 115

V

........ A3·.. ·••• ***4.*

·.. ..................

*"'.*A2**·*·4 •••

..

•

1
1
1
1

..
•
*

1
1
1
1

*
*->1
• 1

BZ

*

RESERVE
NEST SCRIPT
ROLL

DO NEST UNIFY"

I

1

. ····83· . **.* ••••..

V

V

. ·····82··········*
*

"..

"INITIALIZE LOOP*
.. TEMP CNT AND
•
NEXT LEVEL
"

COpy

SCRIPT

..

'ROLL ONTO NE~T
•
SCPIPT ROLL

..
..

• .......... ******.*

0

••••••••••••• ** ••
1
1

!
I

V

...... fI

*c 2"""" .......... ..

•

..

C3

*

PLACE IND.
·VAfI. CO[FF. OF
*
NEST IN WO

."1('

*

••

*
..........
......... .•

*.

!

CONVERT
ARRAY OFFSETS

•

.*

..

ALLOCAT!ON

•

*

"COEFF. ON NEST"
*
SCR r PT
•

VAR.

..

!
I
I1

V

··· .... 03·····**· ....

.. PLACE INITIAL'
"HEG. COUNT AND •

IND.

..

*** ... ** .... **** .......

NO

**
•

* .... *.* ••• *. * ......

..

V

·

***··04· .. •• .. ••• ..
RE

TUI~N

• ............... ** .. .

I
I1

I1

....V -II.

·....."

1

·····E2······ . ·***
V

*
*
*
*
..

*..*

*SET OUTER l.OOP
YES
·It
CONTROLS AND
• "---->"
DETERMINE
..
SCRIPT

*.

1
1
1
1
1

V

·

.. .. ·**C4**·****·.·
".

..

·····02··········

*

...
=1

LEVEL

* •• *

I

•*

• *.

NEST

•

COMPARF
•
NEST LEVEL OF ..
LOOP WiTH
..
PREVIOUS NEST.
LEVEL
*

U2

w-

..................
I
"
•

F2 *->1

*

1

•

*

V1

#011502

.*

•*

F2

.*.

•-I.

..

*•

IS

*.

NL2

••

l.ESS

... ... ... ...

NO

NL 1

*

..

.*-->*

·

..

HZ

..

** •••

• •• fI
...

THAN

**----.

F4

*
•
*

•

....

1
1

V

.

F4····. *·· ... **

PUT POINTER
TO ARRAY.
OFFSET IN WO

*
••••••••
** .•• *.* ••*

YES

1
1

!1

...

•••
G2

*.

...

• '
NL2
'.
NOT EQUAL
•• TO NL 1

*.

... ...
•

*
*

... ........ G3* ..' ........... ..

...

...

' . YES
• PLACE IND VAR •
. " - - - - > * O F INNER NESTED.
•
LOOP IN wo
0

..
*
....... * ........... .

NO

0->1

.. •••• ..

1

·

V

.

.... *li2······ .....

#011503

SET
NEST l.EVEl.
INDICATOR

!

v

PLACE NEST
..
LEVEL ON
·PROGRAM SCRIPT

•
*

"····H4·····*···*
*
SET
*
AVAILABLE
*REGISTER COUNT
*
FOR SCRIPT
*
EXPRESSION

·····J2··········*

•
PLACE NEST
•
l.EVEL ON
..
.PROGRAM SCRIPT.

: •• * •• ~~;; •••••• :

..

....

V

·"··*J3··········
*
*
•
PUT IND
"VAR COEFFICIENT"
"
IN WI
*

!
....
F4

..
•

...................

I
I

..

V

J4

.* •

*.

...

.

• •••• JS* • • • ** ••••

..

.*
MORE
*. YES
*SET NEST LEVEL ..
*.NESTED LOOPS . * - - - - > * T O PROCESS NEXT"
-.

*.

.. * .-.*
I

••

-

LOOP

I

NO

.** •

*..
*

* F2
..

•

..

................. ** ••

V

V

•..
..

•

1

1
1

..

104

"

I

1

A3

V

"

1

..

• •• ** ••••••••••••
1
1

.. ••• .. H3·· . . . . . . . . .

I

.

DETERMINE
SCR I PT
ALLOCATION

1
1

V

I
....

V

I
!

: .... **~~~'; •••••• :

1

v

·····G4····.·.··
"
...

!1

1
1

0

HZ

...

I

#011504

V

•*

*

*

..

*

.... *
F2

..

..

*

Chart 08.

PHASE 4 - GEN

· .
•

*

*

···*A2*···*****

:

IEYGEN

*

•

:

I
I

v
*** ... *82"" ** .... ****

******.*.*****.*.

·

I

*

G0515
"

*

I

I

G0496

I

1<

STA GEN-EGA2

"

CODE IS
PRODUCED
ON THE CODE
ROLL

I

V

*****04**********

:~~~.~;~::~-;~:~:

:~~~;~~-~:~:;~!::

*

" GEN CODE FOR
"DO CLOSE RESET
TEMP PNTRS
•

*

*

•
"

:*~~~;~~~~*~~~~*:

*****************

I

****

I

v

.

"
• F2 •
" **** "

v
*****E2**********

.EPILOG GEN-ECA2*

*-*-*-*-*-*-*-*-*
PRODUCE
REQUIRED

•
•

.*.**********.*.*

*****************

V

*

*

V

"GEN OBJECT CODE"
"FOR STMT IF END.
" 5TMT TERM PHS "

... ** **02 ****** ** **
PRODUCE ALL
REQUI RED

*

*-*-*-*-*-*-*-*-*

•

I

G050B

*

I

*****C4**********

*** ...... ** ........ ** ****

*

. . . .*****85*********-...
*

V

G0504

*

** ......
"
* C4 *---,

FOR HEADING
AND ALL ENTR.

*

V

..

** .... *C2 ***** .. ****
::~~*:~-~:~:;~:~:
- PRODUCE CODE
*

*

•

*MOVE NEXT GROUP.
*
INDICATE
• "FROM POLISH
*------->*
STATEMENT
* ROLL TO WORK
.NUMBER ON CODE
ROLL
•
ROLL
•

........ ** .. ** **** ** **

G0499

REMOVE AND
PROCESS
LABEL

*****84**********

-

INITIALIZE

V

--*_ ... _-*_._---I
I

*

I

STAfn GEN

*

*****A4··********
:~~~.~~~L;-;~:~:

***********.***

·

•

I

G0493

G0491

A4

****

•
*

:*;~!;~~~;*;~~;*:

*
*
*

I
I

* I
-->1

F2

*

G0712

V

.. ** ... *F 2 * ............. **.*

POLISH
NOTATION
IS ON AFTER
POLISH ROLL

:~;~*~~~!:~-;~:~:

GEN PROCESS

MOVE POL ISH
FOR STMT TO
POLISH ROLL

-

•

... ** .. ** .... * ** ** ** ....
I

I

v

*** **G2**'" ***.* ... -

•
MOVE
•
STMT NUMBER
•
•
• FROM POLISH TO •
STORAGE
•
•

***** **.* **** *. **

I
I

·

.

V

*****H2***·***···

*MOVE NEXT GROUP.
•
FROM POLISH
•
• ROLL TO WORK

: ••••• ~~~;.*.***:

I

•*

•*
.••

J2

.•.v * •

*•

*.

NO

*.LABEL POINTER'*I

*.

* •• *
..

• ..

YES

I
··......
v

•

A4

.*

. .
v
*.*
..

:

C4

:

*

Section 2:

Compiler Operation

105

Chart EA.

GENERATE ENTRY CODE
G0499

"

****A2 *** ...... *** ...
ENTRY
CODE GEN

* •••

.*.* ... *** .. ******

"

1

I
I
1

•*

82

:

....v *.

V

*.***83*'11-.******-

....

...

..

."

SOURCE
". NO
" P U T MAIN
..
SUBPROGRAM ."-------->*PROGRAM HEADING"
".
."
* ON CODe ROLL
..

*..*
* •• *

V

SET UP

I

SET UP
SAVE AREA
LOCATION AT
CURRENT LOC

..

....

02

*.

-.

.. .....
"

1

*****E2*~********

" BUILD A LABEL "
"
" RECORD INIT.
" PGM LOC BUILD"
" CODE TO EXIT
"
..
FOR LABEL
..

1

I
I
1

1<

#049902

"

"I

04 *->1
" ......... * V1

"

I
··**··· "

.049903

"

.*

*.

." •

.*

D4

*.

ALL
GROUPS

*.

*. YES
*
• *-------> *

*.PROCESSED.·

.....*
...... *
•

I1
I

·

V

*** ... *E4"'''''''''''''* ****

..

•
REDUCE
.COUNT OF GROUPS.
..
TO PROCESS
*

I

V

"*

INSERT
"PROGRAM NAME
..
CODE

"

"
IN"
..

..

...... ********** .......

"
.,

:***;~~;*~~~; ... *:

I

"
PUT CODE
.. FOR ENTRY ON
CODE ROLL
"

..

.......... * ......... **

I
I1

• ..... ·*H2*** ..... •• .. • ...

"

GE!IIERATE
ADDRESS
"
CONSTANT
.. FOR PROLOGUE
..
+EPILOGUE

"

..

...... ** ••• ** ... ** ....

I
V

..

...... ·*J2*··***··· ..

BUILO SAVE
..
..
AREA AD CON
..
: CODE FOR EXIT:

........'.*** ••• *****

I

..
"
.... ...... ****.*** •••
I

*.·"*H4*****"··**

.. BUILD INITIAL
.. PROGRAM ENTRY
•
AD CON CODE

.

.. B4 .,

..
..
..

I

V

....**.*J4 ............ • .. "•
..

GENERATE
PROLOGUE
+EPILOGUE
ADCO"lS

•

"

........ *** ........ **

I
. ..... ..
V

V

., .* .. * .,

106

..**··*G4····**····..

V

V

.

I
1

PUT CODE
FOR INITIAL
SUBPROGRAM
ENTRY ON

..

*.*.****.********

V

V

GENERATE

·

I

I
*****G2*******···
"

.

V

*** ...'F4" ••• *4 * .......
•
INSERT
*
.. ENTRY NAME IN •
CODE
*
"

..

..

.. 04

..

..

****D5***·*"'*·~

RETURN

*******.*******

NO

1

I

*·"***F2**********

..

NO

********j********

I

..

..

I
I

i NO
I
I

RETURN

..... * ••• *******

"
REDuCE
..
"COUNT OF GROUPS"
..
TO PROCESS
..

I

*. * •• *.*

****85********-

...*.**(4*****.***·..

****03· ...

RETURN

*. Y E S "

*..*

V

"

*.

*****.***********
1

I

."NO. GROUPS *. YES
".
ON ENTRY
• "--,
".NAMES = I."
1

....

ALL

I

• * .. **************

V

.".

V

V

*****C3*********·

..
"
.. INITIALIZE A
"
"POINTER TO THE"
.,
ENTRY NAMES
"
..
ROLL
"

84

GROUPS
• *-------> *
".PROCESSED."
..

**************.*.
1

YES

*****C2**********

I
.".

.*

".

.*

...

I

#049901

:

1
1

~.A

"

"

84

*

Chart EB.

PROLOGUE CODE GENERATION
GOS04

.. ****A2********* ..
:

PROLOGUE GEN

"

* .... *** ••• ******

""
"

I

v

V

*****B4*********·
" PUT LOCATION "
OF CLOSE OF
"
PROLOGUE IN
ENTRY NAMES "

:***.B2*********:
"

INITIALIZE
POINTER TO
ENTRY NAMES

***~~ .. ;*~~~~~***:

:*****~~ii***.**:

I

I

*OS402
v
:****C4.********:

V

*****C2*********·

"INITIALIZE CNT "
"OF GROUPS TO BE"
" PROCESSED ON "
ENTRY NAMES
"

"

:*::":->1
****

OS0401

.".

*.

I

v

"

" D2 "

*.

.... *GR~b~s "' .... YES
".

*._.***._ .. *._.**

....-

v

02

:****C5*********:

UPDATE"
"CLEAR"
POINTER TO
"------->,, BASE REGISTER •
ENTRY NAMES "
"TABLE"

•• ****~~~;***.*.*

******~~ .. ;*******

*

"
"

134 "

PROCESSED

*..*

.*

.. ****03********* ...
...

"

RETURN

• ,,---->"

* •• *

"

***************

" NO

1

V

*****E2**********
*****E3**********
..
"..
BUILD A
"
"LABEL"
.. REDUCE COUNT "
"OF GROUPS TO BE"---->"INSTRUCTION FOR"
"
PROCESSEO"
"PROLOGUE"

"

*****************

:,,::,,:,
"

1

v
*****F2**********
"CONSTRUCT CODE "
"
FOR LOADING "
.. ARGUMENTS. IF "
ANY
..
"

"*****************"

.".
v

.*

F3

*.

*•

•"
DEBUG
". NO
"UNIT SPECIFIED."--,

".

*- ••.•

a-

."

I

I

I

" YES

I

1

V

*****G2**********
.. CONTRUCT CODE "
"FOR COMPUTATION"
OF DUMMY
"
..
"DIMENSIONS. IF "
ANY
"
..
*****************

I

I

*****G3*~********
... BUILD DEBUG "
.. LINKAGE. UNIT"
" CODE AND UNIT"
"
NO. IN CODE
"

:·····:~l~······:

I

II

I

v

V

*****H2**********
"
CONSTRUCT
"
CODE FOR
CLOSE OF
PROLOGUE

I

lIS0414

.".

.*

H3

".

*•

• " SUbTRAC~
". NO
".
SPECIFIED

*.

*.

* •• *

.*

.*

..

."-->"...

"
F2 ..

'

..

" YES

I

v

""
"

****
B4

""
"

1

V

*****J3**********
"
BUILD
..
" DEBUG LINKAGE "
" AND SUI3TRACE "
" START CODE ON ..
CODE ROLL
"
..

******** •••• ** •••

I

v

****

"" F2 ""
" ***. "

Section 2:

Compiler Operation

101

Chart EC.

EPILOGUE CODE GENERATION
GOS08

·

****AZ··· ••

•

·*.* .

EPILOGUE GEN

*.

82

• *S~BPROGRA~· •• YES

'.

#050803

• •••• 83 ........... .

:

OBTAIN NO.

ENTERING TO .* •••••••• X* OF GROUPS TO
' . PROCESS .*
PROCESS

.... • .NO
...

·· ..
.... . .*.

...

• C3 •• X.

*** ••

X

C2.···.· ......

"
SE T
..
•
LABEL
"
*INSTRUCTION FOR.
• MAIN PROGRAM
..
ENTRY
•

..............•..
X

······02.···.·· .. ·

.BUI LD CODE FGR .."
..
CLOSE OF
•
EPILOGUE OF
•
MA I ~j PROG

.................
X

.·
... E2····.···.·
*
•
BUILD
•
• MAIN PROLOGUE'
•
CODE
•

X

•• •• F2··· ....... .

RETURN

H050eOl

*.

C3

....

• •••• C4 . . . . . . . . . . .

.... .. ... . ..
• NO

X

·.··.·03········ ..."

X

•• ... 04.·· ..... **

.SET BASE TABLE"
.AS REQUIRED FOR*
EP I LOGUE
•
•

RETURN

x

...... E 3 ••••••••••
"BUILD INSTRUCT"
•
FOR DUMMY
•
"ARGUMENT VALUE •
..
TRANSFER
"

F3

.".

••

*050802

• ••• *F4 . . . . . . . . . . .

•• ENTRY..
•
DEFINED
". NO
•
PRUNE
"
"
•
'.
AS SCALAR
•••••••••• X.LAST ENTRY FROM ••••• X. Gl ..
'.
• ..
•
WORK RO LL
*
•
*

*•

.. G 1 •

*.

*.
..
..
ALL
". YES
..
PRUNE
•
GROUPS
.* ......•. X.LAST ENTRY FROM.
*.PROCESSED.'
•
WORK ROLL
•

.*

...

....

..

.. YES

·.. ..... ..
"

X

fi 50804

Gl

..

. ' ·SUBTRACE·· •• NO
•
SPECIFIED
••, •••• X.

•

INSTRUCTION
AND CL EAR
ACCUMULA TOR

"* ...

x

.. ····G4* •••••••• *

:BUILD CODE FOR:
CLOSE OF
..
EP I LOGUE OF

: ••• *~~~~~~~** •• :

·····Hl···X .. ··, .. ·
BUILD DEBUG
LINKAGE A~W.

~~ST~~§~S

•

: .•.. x:

IRETURN)
•
•..••.....•.....•

108

•
(;4

·····G3··········
BUILlJ LOAD

G4

*05084;*

••••

•

G4 :

•

Gl •

"

"

X

••••• H4*** ••••• ••

..

..

.***

"DECREASE NUMBER•
•
• OF GROUPS TO
. . . . . X. C3 •
•
PROCESS
•
•
•

• ... *

Chart ED.

MOVE POLISH NOTATION
G0712

**

****A2*********
GET POLISH

**

* *************** *

I
V

*****62**********

*
*SET
UP POINTER **
*TO AFTER POLISH*
*
ROLL
*
******************

V

*****C2**********

*

COPY.POLISH
FOR STMT TO
POLISH ROLL

**

*
*
*****************

I
I

V

*****02**********

*
*UPOATE

*
*

*
CONTROLS*
FOR AFTER
*
POLISH ROLL
*

*
*
*****************

I
V

*

****E2 *******·11*
RETURN

*

***************

Section 2:

Compiler Operation

109

Chart EF.

PROCESS LABELS
G0493

.. ****A2*********
..
"

LBL PROCESS

****** ... **** ... *.*

"

I

..

"

I

83

,

"4-

..

V

V

*****82*********·

··***83*****···*·

""

"MAKE LABEL FOR
"DEBUG CODE-PUT
"BRANCH ON CODE
ROLL
•

"

STORE POINTER "
"TO LABEL IN STA*
"
LBL BOX
"

"
"
"
"

"......... ** •• ********

"..

I

II

I

I

.*
".

.*

*.

*.

...

*.

."

NO

• "--,

II

"f"

*.

TABLE

I

...

...

*.

SPECIFIED

......
I

*..*

... ,,---->
*.

NO

•

YES

........ **D4 .. • ** ****.*
"
PUT DEt:luG
*
* LI~KAGE FOR *
.. TRACE ON CODE *
*
ROLL
•

.

.......... * ......... ..

I

I

V

*PUT POINTER TO ..
* MADE LABEL ON *
.. AT ROLL-WORD
*
3 OF GROUP
*

*

.*.

TRACE

I

****·E3.*****"***

II'

C4

.*

I

..
..
..
"
*

*****************

I

~.::~:;;:;;;::"~

"

.*

V

V

..
MAKE LABEL
"FOR NEXT INST* RUCTION - PUT
" LABEL CODE ON
CODE ROLL
"

*

*

·*··"'03****"***"·

JlUMP TARGET

".

il49305

I
I

v

..

I

V

.". *.

..

V

"PUT POINTER TO ..
" MADE LABEL ON "
"
" AT ROLL-WORD
2 OF GROUP
it
..

02

C4

"

*****C3********"*

I

***.

..

V

... •• .. E4** .... ••• .. • ..
PUT BINARY
LABEL ON
CODE ROLL

•• *****.*********

I

I

1<

I

I

v

t04930 1

"*
PUT LABEL
* CODE ON CODE
..
ROLL

..* CLEAR WORD 1
..
OF AT ROLL
GROUP

"

"

•• ** ........ ** .... .
I

I

I

v

. . . . <11

"... J2 *
" • «.** ..

I
I

v

H2

• *.

• +

•*
". *.

*•

...

DATA
ROLL
ON
AT

to.

* •• *

I

..

.*.....
...
.. J2 *->

..

**.*

*

V
.".

t49302

....

.*

J2

*STMT.

*.

*.

NO

v

***.

YES

*.

AT

...

....

*... C4

*
..

..

4-

FIRST W0RD
OF AT RCLL
CROUP IS
COMPARCD WITH
STA L8L BOX

NO

FOR T H I S . " ,
LABEL
.*

...

...
..

.*

v
.*.*
..

"

:

C4

:

""

..... .
83

v

.***

YES

I

110

'*,

*.

••
.4-

"

4-

I

v
.... - .. *F 3*"'.*" *** **

** ***F 2 ** ..... ** *** *

V

"

••• .. F4· .. •••••••
RETURN

*

·***cs·******··
4-

*

...

RETURN

** .. ** ....... *.****

Chart EG.

GENERATE STMT CODE
G0544

G0515

****A2*********
*
*
STA GEN
*
*

*
*

****A4*********
TERMINATE
*
PHASE

* ***************

* *************** *

I

I

I

v
.*.

V

B2
*.
.* STMT *.
.* FUNCTION *. YES
*. MADE LABEL .*---.
*. PTR = 0 .*
*.
.*

*****84**********

**
**
PREPARE
*FOR EXIT PHASE *

*

*

*

*
*
*****************

*. .*

II

NO

I

V

*****

v
.*.
C2
*•

*09 *

* A2*

* *

• * STMT * •
• * FUNCTION *. YESV
*. DRIVER ON .*
*. WORK
.*
*.
.*

TO PHASE 5EXIT

*. .*

j""

V

*****D2**********
*
BUILD
*
*
CODE FOR
*
*
STATEMENT
*
* FUNCTION MADE *
*
LABEL
*
*****************

<_____...J

#051502

V

*
*
*
*

GENERATE
CODE FOR
STATEMENT

*****E2**********

*
*
*
*
*
*
*****************

THE JUMP TO
APPROPRIATE
CODE GENERATION
THE CONTROL
DRIVER IN WO
AND THE STA
RUN TABLE.

V

****F2*********

*
*
RETURN
*
*
* *************** *

Section 2:

Compiler Operation

111

Chart EH.

COMPLETE OBJECT CODE
G0496

..

.... **A2** .. *** ......
STA GEN
..
FI NI SH
*
it ....

********* .....

I
1
I
*
* 1
.. B2 *->1
..
* 1
........

v

# 049603

....
82

...

... DATA
*•
•*
ON DO
... NO
•• LOOPS OPEN
.*---.
*.
ROLL.*
it.

.... ....

*

I

• ...

v

YES

........

1

*
...*

I
Iv

E3

..*
..

C2 .... • ............ ..
.............
....
..
MOVE

.

"GROUP OFF ROLL ..

..

.****** ••
02

*********

II

....v

...

• it

#049601
• ........ 03 ............

*.

* .... ..
it

... POINTER = ... N O .
..
".LABEL OF THIS •• --------> .. REPLACE OROUP ..
...
STMT."
..
ON ROLL
..

..**4.*.***********

.... * • . * ....
.. YES

I

.......

II

:..

v

# 049602

I

......... E2....................

E3
........

1
I

:->
II
..
1

V

...

.. ........ E3 .................. ..
*
*

._***************

***** ••• *********

...

..
CONSTRUCT"
"00 CLOSING CODE"
.. ON CODE ROLL

I1

..
RESET TEMP
.. POINTERS AND
.. ACCUMULATORS

I

1
I

.. ...
v

•

..

II

B2 •

V
........ F3 ..............

* ..

.. ... _•• *** ... * ...._..... *
..

112

RETURN

.

Form Y28-o638-1

Page kevised 7/23/69 by TNL Y28-6829
• Chart 09.

PHASE 5 - IEYEXT

G0381

··.................

~~;;;------!

.-.-.-.-.-.-.-..-.
• •••• BSE
A3 •• ••••••••
.PCH
RL-FOA2 •

• ···A2·········

•

EXIT PASS

·•••

1

•

• PCB OBJ MOD •
:BAS~L6A¥~~b REC:

G.,~~······l········

.

.•••

·····B2··········

•

INITIALIZE

-----------!

••
• •• BR
B3 ••••
•••••••
.PCH
RL-FEA2
.PCB OBJ MODULE •

-.-.-.-.-.-.-.-.

•

:REC~~DT~~E1NFO:

•••••••••••••••••

········1········

.-.-.-.-.-.-.-.-.

.

G"02

1

• LISTS RECORD
RLD INFO
•

G""

.-.-.-.-.-.-.-.-.

G•• : : · · · · . .

•
•

r·······

.-.-.-.-.-.-.-.-.

·····F3.·.·······
.PCB LIB RL-FBA2 •

.. .. ........

• COMPL SUBPRGR •
• ADDRESSES AND •
• RECORD RLO
•

G.,::······I········

.-.-.-.-.-.-.-.-.

•••• ·G3··········
.PC8 ADCON-FIA2 •

•• ····G2···········
• PRINT HEADING •
• FOR LISTING •

• PCS ADR CONST •
.ANO RECORD RLO •
•
INFO
•

•••••••••••••
G••

.-.-.-.-.-.-.-.-.

••••• 82··.·······
• PC8 CD RL-.... •

~:····"r·······

.
:~""·T"""

·····S3 ••••• •••••

.PCS RLD RL-FJA2 •
.-.-.-.-.-.-.-.•
•
•
•

• PC8 ALL OBJECT.
:pggDI ~g ~S :

• PUNCS OBJECT
.MOD RLD CARDS

......1'21' .......
G• •

........t:::::____
•pli

.

.-.-.-.-.-.-.-.-•

F2
••
•• OBJECT ••
• • LISTING •• NO
•• REQUESTED
•• ---

·····J2··········
• RECORD STORAGE •
•• 0 RE~RBD
FOR ••
NO OLE
COMiILil •
•
• STATISTICS

1<----------

• PCB SUBPRGR
• ADDR AND RCD
RLO INFO
•

········i········

1<----------

•

••••• E3.·········
.PCB GBL SP-FGA2 •

• PCB RLD CARDS •
• FOR TEMP AND •
•
• CONST AREA

.....

.

••••••••••••••••••

••••• E2··········
• PCB ADCON-FBA2 •

r~

····C4·········
CHART 03
•
A2:
...............

.··.·03
•••••
.PCH SP••••••
ARG-FFA2

-.-.-.-.-.-.-.-.

.•.

•
:

.-.-.-.-.-.-.-..PCB SUBPRGR ARG.

• PCB TEMP STGE •
• AND CONSTANT •
•
AREA
•

G.,::······l········

•

TO INVOCATION
PHASE

• YES

·····02·.········
• PCH TMP/CN-FAA2.

.RELEASE ROLLS

••

•• SUBPROGRAM •• NO
•• ARGUMENT
•• _--

G.,::······l········

·.•.......1".......•

.•.1

.. ..
.. .. .. .. ....
C3

••••• C2.·········
• PCB NMLMPY-FLA2.
.PCH NMLIST TBL •
: wo~g¥N~~~~G,
:

•••• • •• B4 •••••• ••••••

.-.-.-.-.-.-.-.-.

•••••J3 ••••••• • ••
.PC8 END CD-FKA2 •
• PORCS OBJECT •
.NODOLE END CARD.

•••••••••••••••••••

L_______,____ _

Section 2:

Compiler Operation

113

Chart FA.

PUNCH CONSTANTS AND TEMP STORAGE

G0382
***fIA2*********
* PUNCH TEMP
*
*AND CONST ROLL *

* ***n**********~* *

V

****nB2**********
**

INITIALIZE
**
*
LOCATION
*
*COUNTER AND TXT*
CARD
*
*
********.* ••••• **

V

·.*··C2*·********

** INITIALIZE
**
*POINTER TO TEMP*
*ANO CONST ROLL *
*
TOP
*
*.**-*.*.********

:·::*:->1
• •• *,* *

'038201

..

02

V
•••

*.

-.

··* •• *03*·*········

••
ROLL
*. YES
*. IPROCESSEO ••
*.
.*

..

...
j"a

----> * *

* •••

v

*····E2····*·····

*

••
INCREMENT
*
POINTER
•*
••••••• * •••••• *.*

••
••

V

• •••• F2··········
.MOVE NEXT GROUP.
• FROM ROLL TO •
• BUFFER. PUNCH •
IF CARD
•
•
•
COMPLETE
•

•••••••••••••••••

I

v

• •••• •

02 •
•• ••••
•

114

PUNCH
*
ANY PARTIAL
CARD
•

..*.......

*••

V

**
•

*···E3.* •• •• •••
RETURN

•• * ••••••••••••

•*

it

PUNCH PARTIAL
TXT CARD

Chart FB.

PUNCH ADR CONST ROLL
G0383

**
*

****A2*********

**
PUNCH ADR
CONST ROLL
*
***************

V

*****B2**********
* DETERMINE BE- *
*GINNING ADR OF *
* TEMPORARY STG *
AND CONST
*
*
AREA
*
*
*****************
:*::*:->1

* **** * V
*038301
C2
*•
•*
*.
****C3*********
.*
DATA
*. NO
*
*
*.ON ADR CONST .*-------->*
RETURN
*

.*.

*.

i

*..*

.*

*. . *

*

***************

*

YES

V

*****02**********
*
INITIALIZE
*
*
LOCATION
*
* COUNTER FROM *
* POINTER AND *
* BEGINNING ADR *
*****************

V

*****E2**********
* PLACE AREA
*
CODE FROM
*
*
*
ADR CONST
*
*
ROLL ON
*
RLD ROLL
*
*****************

V

*****F2**********

**

SET LOC CTR **
*INTO RUNG 1 OF *
RLD ROLL
*
*

*
*
*****************

V

*****G2**********
* PUT LOCATION *
*
FROM ADR
CONST ROLL
IN OUTPUT
*
AREA
*
*****************

WO TO TXT CARD

V

******H2***********
* PUNCH PARTIAL *
CARD

PUNCH PART I AL
TXT CARD

*
*************

I

v
****

** C2 **
* **** *

Section 2:

Compiler Operation

115

Chart FC.

PUNCH OBJECT CODE

****A2*********

"
"

*

PUNCH
CODE ROLL

**.*****I *.*****

"
"

"...

I
I
I

"

I

**··.82····*·····
INITIALIZE
LOCATION
COUNTER +
CODE ROLL
POINTER

"

84

I

... ." .*. ...
C2

**· ..

··C3· . •••·•• .

PUNCH ANY
."oATA STILL ". NO
"
TO BE
.*---->
REMAINING
·.PROCESSED."PART I AL CARD

... ...
"

• ..

.-1.*** .. * ...

YES

I
I
I

C4

."

"

*.* •

*.

.****cs**********

I

* •• *

·*·"oJ*****····
RETURN

,,*~"*

""""*"D4"~***""""""

"

"

:

MOVE I NSTR TO "
OUTPUT AREA
"PUNCH IF FULL"

******** ... ****

I

I

I
... *.

-.*. "
"
v

v

...

A

" C2 "

• •••• E3* ......·*****
••

YES"

"

"

..

•• ". S~~~~~~NT." • "---->:STORE ~;';MIN S T A : ,

*.

* •• *
..

...

..

..

I

.........................

v

NO

••

..

if.

"

" C2 "

F2

.*

"

... *.

". *.

A

-.PROGRAM

...

... ... . ..

*.

•

"
*** .·F4*****· ... ***

...·• ..... F3.· ..... • .. •·....
YES

..

I:::IREAK.*---->

.*

PUNCH ANY
REMAINING
"PART I AL CARD

"REINITIALIZE
"
"LOCATION COUNTR*
---->"
TO 1 ST FULL
"---,

"

I

*

."

." .

.. ...... .

"

•"
". A CONSTANT
...

"

"

I
I

.

". YES
"MOVE TO OUTPUT"
• ,,------>
AR[A PUNCH IF

...

·CARD COMPLETE-

I

NO

v

.... *

"
:

"

C2 :

\

v

H2

." . ...

*.****H3********.* •

• "

".
MOVE DATA TO
AN
". YES
"OUTPUT AREA
*. INSTRUCTION •• - - - - >
PUNCH IF
".."
COMPLETE
."

".

... "...NO."

I

I

"
:

I

v

.*.*

"

C2 :

v

...

..

...

J2

." .*.

...

**···*J3tt .... ** .......
....

YES

-.LIST FLAG ON . * - - - - >

......
"

I
v
"
"

..

116

84

v

""

I
v

G2

I

:W~Rgo~~iE~R~~MP:
*********.*******

"

NO

."

..

LIST

CODE

I

v

NO

"...

..
"•
"

**.*
84

"..
"

..
*
"
"
"

*****************

NO

I

I

V

NEXT
INSTRUCTION

E2

J

...

***.****.********

A
".
" DEFINE LABEL
.*
LABEL
". YES
" O N BRANCH
". INSTRUCTION . " - - - - - - - > " TABLE ROLL 1=
".
."
" NECESSARY PUT
".."
" IN LIST AREA

I

V

.*

...

"

v

.* •

**

"

****.02**"··****GET

...

...

LNO

*->1

*.

...

*..*
* •• *

*

" Iv

*.

*****85**********

." CONSTANT
*. YES
"
STORE
". DEFINITION
• *----->"
LOCATION
".
."
"COUNTER

I

.. .......
"

.". *.

.·ADDRESS·.

"

*** ••••• ** •••• ***

.. C2

.*.*I

"..
"

v

V

"

84

****

"

C2 "

"

"

C2 :

Chart FD.

PUNCH BASE TABLE
G0399

****A2*********
PUNCH
*
BASE ROLL

***************

I
II
I

V

*****B2**********
**

INITIALIZE
BASE TABLE
LOCATION
COUNTER

**~**************

I

I

V

*****C2**********
**
INITIALIZE
**
*POINTER TO BASE*
*
TABLE ROLL
*

*
*
*****************

I

I
V

*****02**********
SWEEP BASE
aRANCH ROLL

*
INITIALIZE
**
*TXT CARD OUFFER*

*

******************
I
I

****

**
*

*
E2 *->
*

G0400

•*

I
I

v
.*.
E2

*•

******E3***********

*•

•*
ALL
*. YES
*
*.
ROLL
.*-------->
*.PROCESSEO.*

....

PUNCH
ANY PARTIAL
CARD

.... .... .*
* NO
I

I

I

V

*****F2**********
*
INCREMENT
*
*POINTER TO ROLL*

*

*

*************

*

*
*
*****************

.

I

V

****F 3********'1-

*
*
RETURN
*
* .************** *

I
I
I

V

*****G2**********

**
RECORD ESO
•*
* + LOC COUNTER *
ON RLO ROLL
*
*
*****************

I
I
I

V

"****H2**********

**

MOVE GROUP TO **
*BUFFER PUNCH IF*
* CARD COMPLETE *

*
*
*****************
I

I
v
**
*

****
E2

**
*

Section 2:

Compiler Operation

117

chart FE.

PUNCH BRANCH TABLE
G0400

****A2********·
PUNCH
*
BRANCH ROLL

•

********** •••• *

I

I
I
I

V

*·.·*S2**********
**
INITIALIZE
* BRANCH TABLE
* LOC COUNTER

**
*

*
********.*.*.*.**

I
V

·****C2**********

*

INITIALIZE
**
POINTER TO
*
• BRANCH TABLE
*
•_ ••••••
ROLL
*
*********.

I
I

V

**·**D2··*****·**
iI

SWEEP BASE
BRANCH ROLL

•

INITIALIZE
*
ilTXT CARD SUFFER*

iI

•*

*

*
*****************
****
:

E2

* ***.

#040001

I
:->1
*
E2

.*.V

******E3***********

.*
ALL
*. YES
*
*.
ROLL
.*-------->
*.PROCESSED..

*. • *
* NO

*************

II

I

I
I

I

II

V

*****F2**********
**

INCREMENT
**
*POINTER TO ROLL*
*****************

I

I
V

*****G2**********

*

**
RECORD ESD
*AND LOC COUNTER*
*
ON RLD ROLL
*

*
*
**-**************

V

*****H2**********
*
MOVE
*
*
GROUP TO
*
* BUFFER, PUNCH *
IF CARD
*
*
*
COMPLETE
*
*****************

I
v

*** ...

** E2 **

* **** *

118

PUNCH
ANY PARTIAL
CARD

V

*

****F3*********
RETURN
***************

*
*

Chart FF.

PUNCH SUBPROGRAM ARGUMENT LISTS
G0402

****A2*********
"
"

PUNCH
SPROG ARG
ROLL

"

***************

I

v

**.-

** ...... *62 ** ** ....
"INITIALIZE LOC."
" COUNTER. TXT
"
CARD OUTPUT
"
AREA AND

*****~~!~!~~*****

I

"*""",,
:

C2

****

:->\

#40201

.*
".

.*

C2

v
.*.

".

******C3***********

*.

ALL
*.
ROLL
•
".PRDCESSED."

*.

* •• *
"

I

YES

,,---->

...

• ...

PUNCH ANY
REMAINING
"PART I AL CARD

PUNCH
PARTIAL
TXT CARD

"

*************

NO

I

I

V

*****02*********-

"

V

"

.****03*********.

"
INCREMENT
"
:POINTER TO ROLL:

"

RETURN

I

v

E2

.". *.

*****E3**********

."
".
."
".
". ". GROUP=O .* .

"
YES

"---->:

*.."

"

* •• *

MOVE GROUP
TO TXT

O~0~~~ ~~EA

"
:,

":

I

*

I
v

CARD COMPLETE"

**********.******

.. NO

****

"

C2 :

V

40203

.... F2

." •

*_._

:****F3*********:

."
TEMP
".
".
AND CONST
•
". POINTER ."

*.

..... *
"

1040204

YES

"
COMPUTE
APPROPRIATE
"LOCATION

,,----> "

.*

"

*****************

NO

I

I

V

: ...... **G 2"'" ** ** **

*:

COMPUTE
APPROPRIATE
LOCATION

**** *** *. ** *.*.**

I
1<------1

V

*****H2**********

"
"

:RECORD RLD

""

INFO:

"

***.*.***********

I
V

: ..... **J2 ** ... ***

***:

INSURE
'MINUS' TAG
MARK

I
V

:****K2**** •••

**:

"
MOVE
"DATA TO OUTPUT

"
,,-,

I

.. *._.-.• -._--...
...

ARE A

...

"

:

v
****

"

C2 :

Section 2:

compiler Operation

119

Chart FG.

PUNCH SUBPROGRAM ADDRESSES
GOilO]

.... **A2· ... ••• ....

PUNCH
GLOBAL SPRQG

•

·*

..... *.~~~~*.*.*.*
I
I
I
I
I

"..

..

"
I

I

•• .. **1-32·** ..

··**··

I

.*·*·*rl4··*·*·*··""

1040302

FLIP TH,
GLOBAL SPROG
ROLL

"
"

"

84

"

V

"

.* ••

V

"
STORE
"LOCATION ON
..

"
RLD.

ROLL

..

"••• * .............. .
I

I
. ".
C2

.*
if.

...

ON

*.

... ...

V

*** ..··C4· ............. .

*.

*---->*
..
." ...

DATA
THF ROLL

"

I

#040304
".

NO

• .. ··C3* .. ••••• .. •

•

RETURN

"

"
MOVE
TO OUTPUT
"AREA. PUNCH IF
" CARD COMPLETE

" °
"

. _ ..... if . . . . . . . .

YES

I

I

v

V

TURN

OFF

.*

..

MOVE
NUMBER

LSD
TO RLD

~~

*

... • *

I~OLL

!
!
II

YES

I

__"________J

V

···.·F2*·········"
"
"

"
................
*.* ........"

G2

•* •

...

!I.SUUPROG.

...

...

YlS

FLAG.*--,

ON

".

I
I

."

...
"

I

v

NO

I
I

..

"

V

.

...... *H2· .. • . . . . . . . . ..
S TORL
LOCATION IN
LOC. COllNH"R

".................................
I
I

II

:* ....

I

V
J2 • • • • • • • • • :

INITIALIZE
OUTPUT ARlA.
TlIRN ON

: .~;I~~~~~ ;.~~:~ .. :

!

......
V

"..
"

84

"

"

"

It

RETURN

"

...

PUNCH
PARTIAL
CARD

"

.. 1{. . . . . . . . . . . . . . . . . . . . . . . . . . ..

DETERMINC
LOCATION OF
"5UI3PGM ADORE <;5

ANY

.·It

****ES*****"***

"
"
..

"

120

NO

V

·"···[2···*······
"
"

"
..
"

*** **·05*** * .. ** ** .....

*.

I

#040301

"
"
"

*.

• ..

..

I
1 < - - - - - - - - - " - - ""

.

*.

DATA

*.

I

*".

." .

II.

...................
I

...

.*

D4

*. ON THE nOLL .*------->

SUBPROGRAM
"FLAG. MOVE WORD"
..
OFF
..

"
..

*** .. .."

I

I
I
·····02··*·······
"
"
..

•
"
"
"

84

.
.
..

*

chart FH.

COMPLETE ADDRESSES FROM LIBRARY
G0404

*

****A2*********
PUNCH USED
LIBRARY

*
*

***.**~~~;*.****.

• **** *

*
*

I

B4

****

*
*

I

V

V

*****82****** ****

**
FLIP
* THE USED LIB
*
ROLL

*****84*********-

*

*

**

*
STORE
*
*LOCATION ON RLD*
:
ROLL
:

*****************

.*

•*
*.

C2

.*. *.

I

V

*.

*. N O "

*. DATA ON THE .*------->"
ROLL.*

..

*..*
..... *

****C3*********
RETURN

..* ** .. *C4MOVE
** ** *******

•
0 TO OUTPUT
•
"AREA. PUNCH IF *
* CARD COMPLETE *

..

*****.*********

I

**
*

I
v

*

E2

****
.*

**->1
• 1

*.

*.

ROLL

....* I

I

*->1
* 1

*

... ...
... ... ... .
*.

*.

...

..

..*****E3*********.
*
MOVE NEXT

.*
ESD
*. YES
*.= 0 (IGNORE) .*------->.
•

*.

.*

.*

****** 05* * * **** *** ...

.*

..

WORD OFF +
DESTROY

*

****
E2

I

****

**
*

I1

V

... ****E5********* ...
RETURN

*--,

*

PUNCH
ANY PARTIAL
CARD

YES

V

V

E2

.*. *.
V

D4

.*
*. NO
...
*. DATA ON THE .*------->

1
...

I

04

#40404

** .. **02"" *** .. ****
*
TURN OFF
*
"
SUBPROGRAM
"
"FLAG. MOVE WORD*
*
OFF ROLL
*

.****.

*

*

*****************

* YES

1

1

v

NO

I1

*

*
*

1

04

*
*

*

1

#40402

V

* .... **F 2.* ** * •••• *
*
•
MOVE
*

*

• ESD NUMBER TO *
•
RLD ROU
*

.* ••••• ** •• ******
1
1

I
I

V

........ *G2"''''''''''' ** ....
*

*

DETERMINE
LOCATION OF
FUNCTION
ADDRESS

*

•

......... ***** ••••
1
1
1

I

.' .*.
H2
V

...

.. .

•*
*. YES
*.SUBPROGR FLAG.*--,
'.
ON
.'
1
'.
.'
1
.... *
v
• NO
•

I

..

04

*

I

*

..

*

V

*****J2**********

*

•

*
STORE
"
*LOCATION IN LOC'
*
COUNTER
*

I

I
***··K2··········
•
INITIALlzr
•
V

• OUTPUT AREA.
•
TURN ON
*----,
:SUBPROGRA,.. FLAG:
v

I

..

... **............

* **** •
..

*

84

..

...... .. •

Section 2:

Compiler Operation

121

Chart FI.

PUNCH ADDRESS CONSTANTS
G0405

****A2*********
**
*

*
PUNCH
ADCON ROLL
*
***************
1

**
*

****

I1

*

B2 *->1

*

.*

•*

v1

B2

.*.

*•

*.

*.

NO

*

*.DATA ON ROLL .*-------->*

j"S

V

*****C2**********

**
SET AREA
*CODE FROM LAST *
*
* WORD ON ROLL
**

*
******.****.*****

I

V

*****02**********
*
SET ADDRESS
*
WHERE CONST
*
*
*IS TO BE LOADED*
*FROM NEXT WORD *
ON ROLL
*
*
*****************

I

I
1

V

* •• ***E2********~**
MOVE INFO
TO OUTPUT
AREA AND PUNCH*

*************

II
V

*****F2**********
SET
UP RLO ROLL
ENTRY

**
*
*

*****************

!

v
****

*
*
* B2 *
* **** *

122

RETURN

***************

*. .*

*

****~3**·******

...

*

Chart FJ.

PUNCH RLD CARDS

G0565

*
*

--·*A1--**·····
ORDER AND
*

*****A2**********

*********.*****

...
********** •• *****

PUNCH RLD
ROLL

..

*
SORT
*------->* RLD CARDS ON
*
*
ROLL

..

THE SORT PUTS
ENTRIES WITH LIKE
ESD NUMBERS TOGETHER,
ADR. CONST AND
TEMP AND CONST ROLLS
ARE USED AS TEMP
STORAGE

*..
*

I

#41615

.*

ON

*

** ****C5*** ****** ....

1

*.

**

*.

*. .... * .*
* YES

.-

.*.

I
I

*PLACE PREVIOUS *
* VALUE IN CARD *
* MARKED FOR NO *
* CONTINUATION *

PUNCH
REMAINING
DATA

.*

.. YES

.*.* •• :

L->:

E4

E4

V

*•

.-

V

*** .. *05*"" ** .... * ...

: .... :~~ .. ~~~!!; ...... :

ESD NO = *. NO
*. TO PREVIOUS ' * ,

* •• *

J

I
II

I

#41b04

*03*" ** .. ***** ..

!

v
.*.
E2
*.

,

I

I
\ <________

ROLL

*.

1

I

*.*.***.*.**.

.*. NO
..
*.MORE DATA ON . * - - - - - - >

*.

1
1

PUNCH A'I RLD
*
CARD

v

.*

.*---,

.......
* NO

I

I

*.

*. YES

V

*****C2*********-

02

...

.*
"....

V

.-

*.

CARD

*.

I

*
SET
*
*
LAST LOAD
C2 *-->* ADDRESS FROM
*
*
RLD GROUP

•*

...

.* •
tiS

•• ROOM

*****************

I
.*.

-**I

**
*

I

#41603

*SET ESD NUMBER *
PUNCH RLD *
*
*FROM AREA CODE *
ROLL
* B2 *-->*
AND PUT IN
*
*
*
*
RLD CARD
*
IMAGE
*

*
*
*

85

V

V

*****B2*********-

#41601

.***

:

..

v
- .. *85 :

**** ..

** -·-*E3--·_·---*
RETURN

.-

.*.

->*.ROOM ON CARD

--._

r

*--- *
I

*

:

.I

* •• *

E4 :

.....

*.

..~.

*.

.*
YES

.*--,

_•. -

NO

I

V

******F4*****·******
*

PUNCH AN RLD
CARD

******i******

-·w.

I I

I V
I ****
1*
*

I:

I

**--

E5
*.
ROOM

* •• *

..

..--

NO

II

H2 :

****

,

I

V

I
I
:*****F5**********.
I
I
I

t

.. SAVE NEW ESD
..
NO.

*

******.*~**.** •••

1< _ _ _ 1

I

1

\

I

.41602

*.

YES .*FOR NEw LSD-.
r--*' NO. ON CARD .*

I

V

V

*****C4**********
*PLACE PREVIOUS *

******GS**.***'***.

.. VALUE IN CARD ..
..
MARKEu FOR
*
.. CONTINUATION

:**:~~*~~~:!;****

*

PUNCH A'I RLD
CARL>

I

1

I

I

.*.*

V

V

* C2 *•
..

*

•

Section 2:

..

..

•

.*.*

.
*

C2 ..

Compiler Operation

123

Chart FK.

PUNCH END CARDS
G0424

****A2*********

*

PUNCH
END CARD

I

II
I

I
v
*****82**********

*

*
*SET
UP END CARD*

*

*

*
*****************
I

I

I
I
v
******C2***********

* PUNCH END CARD

*

-II

****** ...... ****
I

II
I
I
I

V

****D2*********

*

RETURN

*

*************** *

124

Chart FL.

PUNCH NAMELIST TABLE POINTERS
G0564

****A2*********

"
PUNCH
" NAMELIST MPY
"
DATA

.**************

"
"
"

""

B4

""

" **** "

I

1

v

.". " .
B2

V

*·****84*******·***

_.-·OATA ON*-"_ NO
".NAMELIST MPY
".DATA ROLL."

.****83*********.

.*------->"
"

*..*
* •• *

RETURN
"

*************.*

j'"

PUNCH THE TXT
CARD
"
*********.***

I

v

V

:****cz.********:

:****C4*********:

"CALCULATE NEXT
"
ADORESS IN
TEMPORARY
"
" STORAGE AREA

INCREASE
"
TEMPORARY
"
"STORAGE POINTER"

"
"
"
"

"***.*.***********"

*****.***********

I

::::::-,1

""
"

v

#056401

*****02*********-

" MOVE LOCATION"
"
Of' POINTER
"
" FROM NAMELIST "
MPY DATA
"
"

*~**

"
"

02 "

:*****~~~'*******:

I

v

E2

.*

".

.".

Jo •

.-

*.

*.

****E3*********
NO'"

ANYTHING
• ,,-------> "
". MOVED
."
"

*..*
.... *

RETURN

...

***************

" YES

I

v
:****F2*********:
"INITIALIZE TXT"
" CARD TO LOAD "
"
LOCATION

:***!~~!;!!~~***:

I

v

*****G2**********

"
SET
"
" UP RLD ENTRY
"
FOR WORD IN "
:NAMEL I ST TABLE :

.*.**.*******.***

1

v

:****H2******.**:
"MOVE MULTIPLIER"
"
TO TEMP AND "
CONST ROLL
:

**** •••• ** •••••••

I

···**J2**····
.••."
"
V

"
MOVE
"
"POINTER TO TXT"
:
CARD IMAGE
:

*.*** •• *.** ••• ***

I

V

""
"

** ...

"
"

B4 "

Section 2:

compiler Operation

125

APPENDIX A:

This appendix deals with the POp· language, the language in which the FORTRAN IV
(G) compiler is written. The parts of the
appendix describe this language in the
following way:

THE POP LANGUAGE

The mnemonic codes for the POP instructions are of the form IEYxxx.
In the
following discussion, the characters lEY
are omitted from the mnemonics in the
interest of ease of reading, and only the
xxx portion of the code appears.

• The
fi£st
part describes the POP
instructions, which are grouped according to their functions.
TRANSMISSIVE INSTRUCTIONS
• The second part describes the labels
used in the routines of the compiler.
• The third part discusses the assembly
and operation of the compiler, as it is
affected by th~ use of the POP language.
This part ends with a crossreference list giving the mnemonic for
each instruction, the hexadecimal code
which represents it, and the instruction group in which it is described.

The instructions described in. this section are primarily involved in
moving
information from place to place in storage.
APH G:

Assign and Prune Half
The upper halfword of (WO) --> the
lower halfword of G, where G is a
storage address; the upper halfword
of G remains unaltered; the BOTTOM
of the WORK roll is reduced by
four, thus pruning WOe

POP INSTRUCTIONS
ARK G:
For the purpose of describing their
operation, the POP instructions have been
divided into groups according to the primary function which they perform. Where a
particular POP instruction pertains to more
than one group, it is described in the
group which discusses its most important
functions.

(WO) --> P + (G), where P is the
address defined by the pointer in
Wi and G is a storage address; the
BOTTOM of the WORK roll is reduced
by four, thus pruning the value
assigned and keeping the pointer.
ARP G:

2.

3.

Parentheses are used to indicate "the
contents of;" thus (G) stands for the
contents of storage address G, where
all addresses are fullword addresses.
The arrow is used to indicate transmission in the direction of the arrow;
(G) + 1 --> G reads: the contents of
storage address G, plus
one, are
transmitted to storage address G.

ASK G:

Assign to Storage and Keep
(WO) --> G, where G is a storage
address; the BOTTOM of the WORK
roll is unchanged.

ASP G:

Assign to Storage and Prune
CWO) --> G, where G is a storage
address; the BOTTOM of the WORK
roll is reduced by four, thus pruning the current WOe

Wn
(n=1,2,3, ••• )
refers
to
the
BOTTOM, BOTTOM-l, ••• etc., words on
the WORK roll.

It should be noted that in many cases
the address field, G, of the instruction
contains a value other than a storage
address (for instance, a roll name).
In
most of these cases, the symbolic reference
which is used is defined in the program by
means of an EQU card.

Assign Relative to Pointer
(WO) --> P + (G), where P is the
address defined by the pointer in
Wi and G is a storage address; the
BOTTOM of the WORK roll is reduced
by eight, thus pruning the current
WO and Wi.

In the descriptions of the instructions,
the following notational conventions are
employed:
1.

Assign Relative to Pointer and Keep

BOP G:

Build on Polish
The control driver G is built on
the POLISH roll, where the G field
of the instruction is the lower
eight bits of the ADDRESS portion
Appendix A:

The POP Language

127

of the desired driver.
(The TAG
field of the pointer contains zero,
and the OPERATOR field contains
255.)
CAR G:

EAW G:

ECW G:

EOP G:

ETA G:

Copy Plex On
plex pointed to by the pointer
G
is -the number of the target roll,
except for the first word of the
plex (which holds the number of
words in 'the plex, excl usi ve of
itself).
The BOTTOM of the WORK
roll is reduced by four, thus pruning the pointer.
The BOTTOM of
roll G is increased by four for
each word moved; the BOTTOM of the
original roll is unchanged.

FET G:

in Wo is copied to roll G, where

FLP G:

FRK G:

Fetch

Flip

Fetch Relative to Pointer and Keep

FRP G:

Fetch Relative to Pointer
(P +
(G»
--> wa, where P is the
address defined by the pointer in
wa and G is a storage address; the
BOTTOM of
the
WORK
roll
is
unchanged; thus, the pointer is
destroyed.
Fetch Half

Extract Address
The ADDRESS portion of (G) --> WO,
where G is a storage address; the

128

Extract Tag

(P + (G» --> wa, where P is the
address defined by the pointer in
wa and G is a storage address; the
BOTTOM
of
the
WORK
roll is
increased by
four; thus,
the
pointer remains in Wi.

FTH G:
EAD G:

Extract Operator

Invert the order of roll G, where G
is a roll number, word for word.

Copy Relative to Pointer
Copy roll S to roll G, where G is a
roll number, beginning with the
group indicated by the pointer in
WO, to the BOTTOM of the roll. The
roll number S is also provided by
the pointe:r:' in WO. The BOTTOM of
roll S is decreased by the number
of bytes moved. The BOTTOM of roll
G is increased by the number of
bytes moved.
The BOTTOM of the
WORK roll is unchanged: thus, the
pointer remains.

Effective Constant Address to Work

(G) --> wa, where G is a storage
address; the BOTTOM of the WORK
roll is increased by four.

The

CRP G:

Effective Address to Work

TAG portion of (G) --> TAG portion
of wa, where G is
a
storage
address: the BOTTOM of the WORK
roll is increased by four.

The number of words on roll G -->
WO, where G is a roll number: the
BOTTOM of
the
WORK
roll
is
increased by four.
CPO G:

is

The OPERATOR portion of (G) --> WO
(right adjusted), where G is a
storage address; the BOTTOM of the
WORK roll is increased by four.

Clear and Add

Count

roll

G --> WO, where G is a storage
address which refers to a constant
under a constant base. The BOTTOM
of the WORK roll is increased by
four.

Clear WO: (G) --> WO, where G is a
storage address; the BOTTOM of the
WORK roll is unchanged.
CNT G:

WORK

G --> WO, where G is a storage
address; the BOTTOM of the WORK
roll is increased by four.

Copy and Release
copy roll G, where G is a roll
number, to roll T, and release roll
G (i.e., restore it to its condition before the last reserve): the
number T is found in WO: the BOTTOM
of the WORK roll is reduced by
four.
If roll G is in the reserved
state
when this instruction is
executed, the instruction sets its
BOTTOM to (TOP) minus four: if the
roll is not reserved, BOTTOM is set
to (BASE).,

CLA G:

BOTTOM
of
the
increased by four.

The lower halfword of (G) --> upper
halfword of wa, where G is
a
storage address; the lower half-

word of WO is set to zero; the
BOTTOM
of
the
WORK
roll is
increased by four.
lAD G:

The count of errors of the
associated with the message 1S increased by one, and the
MAX STA ERROR NUMBER is updated as
required. If (ANSWER BOX) = false,
the instruction does nothing.
severi~y

Insert Address
The ADDRESS portion of (G) --> the
ADDRESS portion of the pointer in
WO, where G is a storage address;
the BOTTOM of the WORK roll is
unchanged.

lOP G:

error.

LGP G:

Loads the group specified by the
pointer in WO into SYMBOL 1, 2, and
3, DATA 0, 1, 2, 3, 4, and 5.
The
number G is the number of bytes to
be loaded; if G=O, the entire group
is loaded. The BOTTOM of the WORK
roll
is
unchanged; hence, the
pOinter remains in WOe

Insert Operator
G --> OPERATOR
portion
of
the
pointer in WO, where the G field of
the
instruction is the desired
OPERATOR value; the BOTTOM of the
WORK roll is unchanged.

ITA G:

Insert Tag
TAG portion of (G) --> TAG portion
of the pointer in WO, where G is a
storage address; the BOTTOM of the
WORK roll is unchanged.

ITM G:

LSS G:

MOC G:

Last Character Error

Last Character Error if False
If (ANSWER BOX) = false, the last
character count and the address
G --> ERROR roll, where G is the
address of the message for the
error. The count of errors of the
severity associated with the message is increased by one, and the
MAX STA ERROR NUMBER is updated as
required. If (ANSWER BOX) = true,
the instruction does nothing.

MON G:

Move on
(WO) --> roll G, where G is the
roll number; the BOTTOM of roll G
is increased by four; the BOTTOM of
the WORK roll is decreased by four.

NOG G: Number of Groups
The number of groups on roll G -->
WO, where G is the roll number; the
BOTTOM
of
the
WORK
roll is
increased by four.

LCT G: Last Character Error if True
If (ANSWER BOX) = true, the last
character count and the address
G --> ERROR roll, where G is the
address of the message for the

Move on Code
G halfwords, where G is an even
number, are to be moved from the
WORK roll to the CODE roll. A word
containing a special value in the
first two bytes and the number of
words transferred in the last two
bytes are first placed on the CODE
roll. G/2 words of infoIwation are
then moved from the WORK roll to
the CODE roll; the BOTTOM of the
CODE roll is increased by four for
each word placed on the roll; the
BOTTOM of the WORK roll is reduced
by four for each word moved from
the roll.
A location counter is
increased by the number of bytes of
object code placed on the roll.

The last character count and the
address G --> ERROR roll, where G
is the address of the message for
the error. The count of errors of
the severity associated with the
message is increased by one, and
the MAX STA ERROR NUMBER (which
indicates
the
highest severity
level of errors for the present
statement) is updated as required.
LeF G:

Load Symbol from Storage
Loads the (G and G+4), where G is a
storage address, into SYMBOL 1,
2,
and 3, and DATA O.

Insert Tag Mode
Mode portion of the TAG field of
(G) --> mode portion of the TAG
field of the pointer in WO, where G
is a storage address; the BOTTOM of
the WORK roll is unchanged.

LeE G:

Load Group from Pointer

NOZ G:

Nonzero
A nonzero value --> G, where G is a
storage address.
Appendix A:

The POP Language

129

PGO G:

ZER G: Zero

Place Group On
A group from SYMBOL 1, 2, and 3 and
DATA 0, 1, 2, 3, 4, and 5 --> roll
G, where' G is the roll number, by
group status; the BOTTOM of roll G
is increased by group size.

PGP G:

Place Group from Pointer
The group in SYMBOL 1, 2, 3, DATA
0, 1, 2, 3, 4, and 5 is placed on a
roll according to the pointer in
WOe
The number G is the number of
bytes to be moved; if G=O, an
entire g:coup is moved; the BOTTOM
of the WORK roll is unchanged.

PLD G:

o --> G,
address.

ADD G:

2,

Add

Add Four to Storage
(G) + 4 --> G, where G is a storage
address.

Pointer to New Group
AND G:

DIM G:

DIV G:

Divide
(WO) / (G) --> G, where G is a
storage address; the remainder, if
any, from the division is lost; a
true answer is returned if there is
no remainder; the BOTTOM of the
WORK roll is unchanged; hence, the
initial
contents
of
WO
are
destroyed.

lOR G:

Inclusive Or
The inclusive OR of (WO) and (G),
where G is a storage location, is
formed, and the result is placed in
WOe The BOTTOM of the WORK roll is
unchanged; hence, the initial contents of WO are destroyed.

(MPAC 1 and MPAC 2) --> G and G+4,
where G is a storage address. This
instruction performs a doubleword
store.

Interchanges
CWO) and (G), where G
is a storage address; the BOTTOM of
the WORK roll is unchanged.

Diminish
(G) - 1 --> G, where G is a storage
address.

Precision Store

Switch

And
(G) AND (WO) --> WO; that is, a
logical product is formed between
(G) and (WO), and the result is
placed in WOe
The BOTTOM of the
WORK roll is unchanged; hence, the
initial
contents
of
Wo
are
destroyed.

Place on Code
The data located at storage address
G+4 and following is to be moved to
the CODE roll. The number of halfwords to be moved is stored in
loca'tion G and is an even number.
A word containing a special value
in the first two bytes and the
number of words of data in the last
two bytes'iS first placed on the
CODE roll. The indicated data is
then moved to the CODE roll, and
the BOTTOM of the CODE roll is
increased by four for each word
placed on the roll.
A location
counter is increased by the number
of bytes of object code placed on
the roll.

130

storage

(G) + (WO) --> WO, where G is a
storage address; the BOTTOM of the
WORK roll is unchanged; hence, the
initial
contents
of
Wo
are
destroyed.

Builds a pointer to the first byte
of t,he next group to be added to
roll G, where G is the roll number,
and places the pointer in WO; the
BOTTOM of
the
WORK
roll
is
increased by four.

SWT G:

a

The following instructions are primarily
designed to perform arithmetic and logical
manipulations.

~>

PST G:

is

ARITHMETIC AND LOGICAL INSTRUCTIONS

AFS G:

POC G:

G

Precision Load
(G and G+Ll) --> MPAC 1 and MPAC
where G i c· a storage address.

PNG G:

where

LLS G:

Logical Left Shift
CWO) are shifted left G places; the
result is left in WO; bits shifted
out at the left are lost,
and
vacated bit positions on the right
are filled with zeros.

LRS G:

(WO) are shifted right G places;
the result is left in WO; bits
shifted out at the right are lost,
and vacated bit positions on the
left are filled with zeros.
MPY G:

MOA G:

QSA G:

Subtract
(WO) - (G) --> WO, where G is a
storage address; the BOTTOM of the
WORK roll is unchanged; hence,
the
initial
contents
of
WO
are
destroyed.

TLY G:

SAD G:

SBP G:

These instructions inspect certain conditions and return either a true or false
answer in the ANSWER BOX.
Some of the
instructions also transmit stored information from place to place.
character Scan with Answer
If G = (CRRNT CHAR), the scan arrow
is advanced and a true answer is
returned; otherwise, the scan arrow
is not advanced and a false answer
is returned.
LGA G:

Load Group with Answer
The group from the BOTTOM of roll
G, where G is the roll number and
roll G has been flipped, is loaded
into SYMBOL 1, 2, 3, DATA 0, 1, 2,
3, 4, and 5 (as many words as
necessary); if the roll is empty or
if the group is a marker symbol, a

Search by Stats from Pointer
Search the roll specified by the
pointer in WO, beginning with the
group following the one specified
by the pointer for a group which is
equal to the group in the central
items SYMBOL 1, 2, 3, etc., according
to the group stats values
stored at locations G+4 and G+8
(these values are in the same order
as
those
in
the group stats
tables). The roll number multiplied by four is stored at location
G. If a match is found, return a
true answer, replace the pointer in
WO with a pointer to the matching
group, and continue in sequence.
If no match is found, return a
false answer, prune the pointer in
WO, and continue in sequence. This
instruction is used to continue a
search of a roll accordin9 to group
stats values other than those normally used for the roll.

DECISION MAKING INSTRUCTIONS

CSA G:

Set on Address
If G
ADDRESS portion of the
pOinter in WO, return a true answer; otherwise, return
a
false
answer.

Tally
(G) + 1 --> G, where G is a storage
address.

Quote Scan with Answer
If the quotation mark (s,equence of
characters) beginning a·t storage
address G (the first byte in the
quotation mark is the number of
bytes 1n the quotation mark) is
equal to the quotation mark starting at the scan arrow, advance the
scan arrow to the next
active
character following the quotation
mark, and return a true answer;
otherwise, do not advance the scan
arrow and return a false answer.

Product Sign and Prune
The exclusive OR of (WO) and (G),
where G is a storage location,
replace the contents of G; the
BOTTOM of the WORK roll is reduced
by four, thus pruning WOe

SUB G:

Move off with Answer
If roll G, where G is the roll
number, is empty, a false answer is
returned. Otherwise, the BOTTOM of
roll G is reduced by four, pruning
the word moved; the BOT'rOM of the
WORK roll is increased by four;
a
true answer is returned.

Multiply
(G) * (WO) --> WO, where G is a
storage address; the BOTTOM of the
WORK roll is unchanged; hence, the
initial
contents
of
WOare
destroyed.

PSP G:

false answer is returned; otherwise, a true answer is returned;
the BOTTOM of roll G is reduced by
group size.

Logical Right Shift

SBS G:

search by Stats
If the roll, whose number multiplied by four is in storage at
location G, is empty, return a
Appendix A:

The POP Language

131

false ans'wer.
Otherwise, search
that roll against the central items
SYMBOL 1, 2, and 3 and DATA 0, 1,
2, 3, 4, and 5, as defined by the
group stats values stored at locations G+4 and G+8 (these values are
in the same order as those in the
group stats tables); if a match is
found,
place a pointer to the
matching group in WO, increase the
BOTTOM of the WORK roll, and return
a true answer; if no match is
found, return a false answer. This
instruction is used to search a
roll
according
to group stats
values other than those normally
used for that roll.
SCE G:

*

SNZ G:

SOP G:

SPM G:

If the mode portion of the TAG
field of the (G) = the mode portion
of the TAG field of the pointer in
Pl, where G is a storage addess,
return a true answer; otherwise,
return a false answer.
SPT G:

Set on Polish Tag
If the TAG field of the (G)
the
TAG field of the pointer in Pl,
where G is a storage
address,
return a true answer; otherwise,
return a false answer.
Search
If roll G, where G is the roll
number, is empty, return a false
answer; otherwise, search roll G
against the central items SYMBOL 1,
2, and 3 and DATA 0, 1, 2, 3, 4,
and 5, as defined by the roll
statistics; if a match is found,
place a pointer to the matching
group in WO, increase the BOTTOM of
the WORK roll, and return a true
answer; if no match is
found,
return a false answer.

SRD G:

Set if Remaining Data
If roll G, where G is the roll
number, is not empty, return a true
answer: otherwise, return a false
answer.

Set if Less or Equal
STA G:
If (WO) S (G), where G is a storage
address, a t:rue answer is returned;
otherwise, a
false
answer
is
returned. The comparison made considers the two values to be signed
quantities.

132

Set on Polish Mode

Search from Pointer
Search the roll specified by the
pointer in WO, beginning with the
group following the one specified
by the pointer in WO, for a group
which is equal to the group in
SYMBOl. 1, 2, 3, DATA 0, 1 ••• , etc.,
by roll statistics.
If a match is
found,
ret:urn
a
true answer,
replace the pointer in WO with a
pointer to the matching group, and
jump to G, where G must be a local
address.
If no match is found,
return a false answer, prune the
pointer in Wo (reduce the BOTTOM of
the WORK roll by four), and continue in sequence.

SLE G:

Set on Operator
If G
OPERATOR portion of the
pointer in WO, return a true answer;
otherwise,
return a false
answer.

SRA G:
SFP G:

Set if Nonzero
If (G) * 0, where G is a storage
address, return a true
answer;
otherwise, return a false answer.

Set on Character Key
If (CRRNT CHAR) displays any of the
character keys of G, where G is a
character code whose bit settings
describe a group of characters,
return a true answer; otherwise, a
false answer is returned; in neither case is the scan arrow advanced.

Set if Not Equal
If (WO)
(G), where G is a storage
address, a true answer is returned;
otherwise, a
false
answer
is
returned.

Set i.f Character Equal
If G = .(CRRNT CHAR), return a true
answer; otherwise, return a false
answer; in neither case is the scan
arrow advanced.

SCK G:

SNE G:

Set on Tag
If the TAG portion of (G) = the TAG
portion of the pointer in WO, where
G is a storage address, return a
true answer; otherwise, return a
false answer.

STM G:

The JPE FLAG is set to nonzero, and
a jump is taken to G, which may
only be a local address.

set on Tag Mode
If the mode portion of the TAG
field of the (G) = the mode portion
of the TAG field of the pointer in
WO, where G is a storage address,
return a true answer; otherwise,
return a false answer.

JRD G:

This instruction
manipulates
a
pOinter in WOe
If the ADDRESS
field of that pointer is equal to 0
(pointing to the word preceding the
beginning of a reserved area), the
ADDRESS field is increased to four.
If the ADDRESS field of the pointer
is equal to any legitimate value
within the roll, it is increased by
group size. If the ADDRESS field
of the pointer indicates a location
beyond the BOTTOM of the roll, the
pointer is pruned (the BOTTOM of
the WORK roll is reduced by four),
and a jump is made to the location
G, which must be a global address.

JUMP INSTRUCTIONS

The following instructions cause the
normal sequential operation of the POP
instructions to be altered, either unconditionally or conditionally.
See the sections WLabels W and wAssembly and operation n
in this Appendix for further discussion of
jump instructions.
CSF G:

Character Scan or Fail
JSB G:
(CRRNT CHAR), advance the
scan arrow to the next
active
character;
otherwise,
jump
to
SYNTAX FAIL.
I~

JAF G:

Jump if Answer False

Return information is placed on the
EXIT roll; jump to G, which is a
global address.
JUN G:

Quote Scan or Fail

Jump if Answer True
If the quotation mark (sequence of
characters) beginning at storage
address G (the value of the first
byte in the quotation mark is the
number of bytes in the quotation
mark) is equal to the quotation
mark starting at the scan arrow,
advance the scan arrow to the first
active character beyond the quotation mark; otherwise, jump to SYNTAX FAIL.

If (ANSWER BOX) = true, jump to G,
where G is either a global or a
local address; otherwise, continue
in sequence. One of two operation
codes is produced for this instruction depending on whether G is a
global or a local label.
Jump on Work
If (WO) = 0, decrease the BOTTOM of
the WORK roll by four and jump to
G, where G is either a global or a
local address; otherwise, reduce
word 0 by one, --> WO, and continue
in sequence. One of two operation
codes is produced for this instruction, depending on whether G is a
global or a local label.
JPE G:

Jump Unconditional
Jump to G, which is either a global
One of two
or a local address.
operation codes is produced for
depending on
this
instruction,
whether G is a global or a local
label.

QSF G:

JOW G:

Jump to Subroutine

G

If (ANSWER BOX) = false, jump to G,
where G is either a global or a
local address; otherwise, continue
in sequence. One of two operation
codes is produced for this instruction depending on whether G is a
global or local label.
JAT G:

Jump Roll Down

XIT

Exit
Exit from the interpreter; the code
which
follows
is
written
in
assembler language.

Jump and Prepare for Error
ROLL CONTROL INSTRUCTIONS
The following values are saved in
storage: the location of the next
instruction,
the last character
count, the BOTTOM of the EXIT roll,
and the BOTTOM of the WORK roll.

These instructions are concerned with
the control of the rolls used in the
compiler.
Appendix A:

The POP Language

133

POW G:

Prune off Work

BIM G:

Reduce the BOTTOM of the WORK Koll
by four times G, where G is an
integer, thus pruning G words
off
the WORK roll.

REL G:

The instruction indicated by G,
where G is an instruction number
which indicates the class of the
instruction only.
For---example,
LOAD INSTR as opposed to LE INSTR
is built on the CODE roll, where WO
contains a pointer to the second
operand.
A pointer to the accumulator which holds the fiTst operand
is contained in the variable CRRNT
ACC.
The
instruction mode is
determined by inspecting the TAG
fields of the pointers; the BOTTOM
of the CODE roll is increased by
eight; the BOTTOM of the WORK roll
is reduced by four, thus pruning
the pointer. A location counter is
lncreased by one for each byte of
the generated instruction.

Release
Restore roll G, where G is the roll
number, to the condition preceding
the last reserve; this sets BOTTOM
to (TOP) reduced by four if the
roll is reserved, or to (BASE) if
the roll is not reserved; TOP is
set to the value it had before the
reserve.

RSV G:

Reserve
Reserve roll G, where G is the roll
number, by storing (TOP)
(BASE)
on the roll, increasing BOTTOM by
four, and setting TOP to (BOTTOM);
this protects the area between BASE
and
TOP,
and allows ascending
addresses from TOP to be used as a
new, empty roll.

CODE PRODUCING INSTRUCTIONS
These POP instructions construct object
module code on the CODE roll. Each object
module instruction constructed results in
the placing of a 2-word group on the CODE
roll.
The instruction generated, in binary, is left justified in this group.
In
the case of halfword instructions, the
remainder of the first word is filled with
zero.
The second word contains a pointer
to the instruction operand, except in the
case of 6-byte instructions when the last
two bytes of the group contain the value
zero.
BID G:

Build Instruction Double
The instruction indicated by
G,
where G is an instruction number
which indicates the exact instruction to be generated, is built
on
the CODE roll, where WO contains a
pointer to the first operand and WI
contains a pointer to the
second
operand. The BOTTOM of the
CODE
roll is increased by eight.
The
BOTTOM of the WORK roll is reduced
by eight; thus, both pointers
are
pruned.
A location counter is increased by one for each byte of the
instruction.

134

Build Instruction by Mode

BIN G:

Build Instruction
The instruction indicated by G,
where G is an instruction number
which indicates the exact instruction to be built, is constructed on
the CODE roll. The WORK roll holds
from zero to three words of information required for producing the
instruction.
For
instructions
requiring no
operands,
nothing
appears on the WORK roll.
For
instructions requiring one operand,
a pointer to that operand appears
in WOe
For two operand instructions, a pointer to the
first
operand appears 1n WO and a pointer
to the second operand is in Wi.
For input/output instructions, Wi
holds a constant whic~ becomes part
of the instruction. For storageto-storage move instructions, W2
holds the length.
The BOT'rOM of
the CODE roll is increased by eight
to reflect the addition of the
group. The BOTTOM of the WORK roll
is reduced by four for each word of
information found on that roll;
thus, all
the
information
is
pruned.
A location counter is
increased by one for each byte of
the instruction.

ADDRESS COMPUTATION INSTRUCTIONS
The POP
instructions whose G fields
require storage addresses may
be used to
refer to WORK roll groups, provided the
storage address of the desired group is
first computed.
This computation must be
performed at execution time,
since the
location of WO, for example, varies as the
program is operated. The instructions in
this category perform these computations and
jump to the appropriate POP, which then operates using the computed address.

WOP G:

W1P G:

WO POP

LABELS

compute the address of the current
WO and jump to the POP indicated by
G, where G is a POP instruction
which normally accepts a storage
address in its G field.

In the POP language, storage locations
containing instructions or data may be
named with two types of labels, global
labels and local labels. Global labels are
unique within each phase of the compiler
(but not from one phase to another); these
labels may be referred to from any point in
the phase. Local labels are also unique
within each phase (but not between phases);
however, these labels may be referred to
only within the global area (that is, the
area between two consecutive global labels)
in which they are defined.

Wi POP
compute the address of the current
Wi and jump to the POP indicated by
G, where G is a POP instruction
which normally accepts a storage
address in its G field.

GLOBAL LABELS
W2P G:

W2 POP
compute the address of the current
W2 and jump to the POP indicated by
G, where G is a POP instruction
which normally accepts a storage
address in its G field.

W3P G:

W3 POP
compute the address of the current
W3 and jump to the POP indicated by
G, where G is a POP instruction
which normally accepts a storage
address in its G field.

W4P G:

W4 POP
compute the address of the current
W4 and jump to the POP indicated by
G, where G is a POP instruction
which normally accepts a storage
address in its G field.

The global labels which appear on a
System/360 assembler listing of the compiler are distinguished from local labels in
that the global labels do not begin with a
pound sign. Most of the global labels are
of the form Gdddd, where each d is a
decimal digit and the 4-digit value dddd is
unique for the global label.
Labels of
this form are generally assigned in ascending sequence to the compiler routines. All
remaining global labels are limited to a
length of seven characters.
In contrast, the routine and data names
used
throughout
this
publication are
limited only to a length of 30 characters.
A comment card containing the long name
used here precedes the card on which each
global label is defined. In addition, the
longer name appears as a comment on any
card containing a POP instruction which
refers to the global label.
Example:
G0336
STA GEN FINISH
G0336 IEYMOA G0494 MOA DO LOOPS OPEN ROLL

INDIRECT ADDRESSING INSTRUCTION
Indirect addressing is provided for POP
instructions whose address fields normally
require storage addresses by means of the
following instruction.
IND G:

Indirect
The address
contained
in
the
storage address INDIRECT BOX is
transmitted to the POP indicated by
G, where G is a POP instruction
which requires a storage address in
its G field, and a jump is made to
that POP. The POP "G" operates in
its normal fashion, using the transmitted address.

Explanation: The second card shown defines
the global label G0336. The first card, a
comment card, indicates the longer name of
the routine, STA GEN FINISH.
The second
card, contains a reference to the label
G0494; the longer form of this label is DO
LOOPS
OPEN ROLL, as indicated by the
comment.
Occasionally, several comment cards with
identical address fields appear in sequence
on the listing. This occurs when more than
one long label has been applied to a single
instruction or data value. The long labels
are indicated in the comments fields of the
cards.
Appendix A:

The POP Language

135

Example:

•
•

ACTEST

AC TEST

ACTEST

TESTAC

ACTEST IEYSOP G0504 SOP FL AC OP MARK

Explanation,: The three cards shown define
the global label ACTEST. One long form of
this label is AC TEST, as indicated by the
comment on the first card. The second card
indicates that the name TESTAC has also
been applied to this location, and that it
also corresponds to ACTEST.

LOCAL LABELS
All local labels consist of a pound sign
followed by six decimal digits. If the
preceding global label is of the form
Gdddd,
the first four digits are identical
to those in the global name. The remaining
two digits of the local label do not follow
any particular sequence; they are, however,
unique in the global area.
The local label is defined by
its
appearance in the name field of a card
containing a POP or assembler language
instruction.
Example:

•

G0268

G0268
PROCESS SCALAR ROLL
IEYSRD G0432 SRD SCALAR ROLL

#026811 IEYJOW #026821
#026802 IEYITA G0359 ITA CED TAG MARK
Explanation:
The global label G0268 is
defined by the second card in the sequence
shown.
The next two cards define, respectively, the local labels
#026811
and
#026802.
III addition, the third card in
the sequence contains a reference to the
local label #026821, which is presumably
defined elsewhere within the global area
shown here.

ASSEMBLY AND OPERATION
The compi.ler is assembled with each POP
instruction defined as a macro.
Unless
"Quick Link" output has been designated to
the macro by means of
the
assembler
instruction SETC 'QLK', the resulting code
136

consists of two i-byte address constants
per POP instruction.
This 16-bit value
represents an 8-bit numeric operation code
and an 8-bit operand or relative address.
The definition of the 8-bit operand or
relative address varies according to the
POP instruction used. Roll numbers appear
in this field for instructions requiring
them.
For instructions which refer to
storage locations relative to CBASE (see
"Compiler Arrangement and General Register
Usage") or to other base addresses,
the
word number relative to the appropriate
base is used. The format for jump instructions is discussed
in
the
following
paragraphs.
When Quick Link is specified, machine
language instructions are generated for the
following POP instruction.
(See "Assembler
Language References to POP Subroutines.")

POP INTERPRETER
The assembled POP code is interpreted by
a short machine language routine,
POP
SETUP, which appears with the POP subroutines at the beginning of the compiler.
POP SETUP inspects each pair of address
constants in sequence, and, using the 8-bit
operation code as an index into the POP
jump table, a table which correlates operation codes for the POPs with the addresses
of the POP subroutines, transfers control
to the appropriate POP subroutine.
Thus, on encountering the hexadecimal
value 081A, POP SETUP indexes into the POP
jump table (labeled POPTABLE) at the eighth
byte, counting from zero. The value found
at this location is 0158 (hexadecimal);
this is the address, relative to the base
of the POP jump table, of the POP subroutine for the POP numbered 08
(IEYSUB).
When this value is added to the beginning
address of the POP jump table, the absolute
address of IEYSUB is produced, and POP
SETUP performs a branch to that location.
IEYSUB then operates, using the relative
address lA (which it finds in general
register 7, ADDR), and returns via POPXIT,
register 6; in this case the return is to
POP SETUP, which then continues with the
next POP in sequence. The register POPADR
is used to keep track of the location of
the POP being executed.
This sequential operation can be interrupted by means of POP jump
(branch)
instructions, which cause an instruction
other than the next in sequence to be
operated next.
The XIT POP insr~'~~iop

also alters the sequence by causing the
interpreter to release control, performing
a branch to the assembler language instruction following the XIT.
This device is
employed to introduce assembler language
coding into the compiler routines when this
is more efficient than the use of POPs.
Assembler language sequences sometimes terminate with a branch to POP SETUP, so that
it may resume the
execution
of
POP
instructions.

Thus, the instruction IEYJUN G0192J is
assembled as 5002, for example, where the
global jump table begins:

r--------,

G0075J I
G0111J I

G0192J I

ADDR, ONE-CBASE (0, 0)
POPXIT,FETQ
function

of

the

B02 I

~--------~

I
I
I

In some of the routines of the compiler,
the operation of POP SETUP is bypassed ry
assembler language instructions which make
direct reference to the POP subroutines.
In these sequences, a pair of machine
language instructions performs the function
of a single POP instruction. For example,
the instructions

accomplish the
instruction

752 I

~--------~

ASSEMBLER LANGUAGE REFERENCES TO POP
SUBROUTINES

LA
BAL

5AO I

~--------~

POP

I
I
I

On encountering this instruction, POP SETUP
loads its address field (02), multiplied by
fOUI: (08), into the register ADDR. It then
jumps to the POP subroutine for IEYJUN.
The IEYJUN subroutine uses ADDR as an
index into JUMP TABLE, finding the value
B02. This value is placed in the register
TMP and a branch is made to the location
defined by the sum of the contents of TMP
and the contents of CONSTR, which holds the
location CBASE.
Thus, if the location
CBASE is lOBO, the location branched to is
1BB2, the location of the routine labeled
G0192, and the instruction at that location
is operated next.

IEYFET ONE
but bypass the operation of POP SETUP. The
IEYFET routine,
(referred to by its label
FETQ) returns, via POPXIT, to the next
instruction.
Note that the first instruction of the pair sets ADDR to the correct
value for the operand of the IEYFET operation; this would be done by POP SETUP if it
interpreted IEYFET ONE.

I

since the POP subroutines for global
jumps branch directly to the target location, the instruction at that location must
be a machine language instruction rather
than a POP.
Moreover, all jump target
rout.ines which contain local jumps must
reset POPADR to reflect the new location.
Thus, routines which are jump targets and
which are written in POPs begin with the
instruction
BALR

POPADR, POPPGB

GLOBAL JUMP INSTRUCTIONS
The labels referred to in POP global
jump instructions, jump instructions which
branch to global labels, always end with
the character J. These global labels refer
to the global jump table, a table whose
fullword entries contain
the
relative
addresses of global labels which are the
targets of branches.
Each phase of the
compiler has a global jump table. The
table is labeled JUMP TABLE.

which sets POPADR to the location of the
first POP instruction in the routine and
branches to POP BASE, the address of which
is held in POPPGB.
At POP BASE, the
contents of POPADR are saved in LOCAL JUMP
BASE, POPXIT is set to the beginning location of POP SETUP, and POP SETUP begins
operating.
For the sake of brevity, this
instruction is coded as
BALR

A,B

in some routines.
References in POP global jump instructions
to
the
global jump table are
assembled as relative word addresses in
that table.
Each entry in the table contains the address, relative in bytes to
CBASE, of the label whose spelling is
identical to that of the global jump table
entry except that it does not include the
terminal J.

Routines in which the POP instructions
have been replaced by pairs of assembler
language instructions and which contain
local jumps begin with the instruction
BALR
or
BALR.

A,O
POPADR, 0
Appendix A:

The POP Language

131

instead of the instruction given above,
since the branch to POP SETUP is not
desired.
Because global jump targets begin with
this machine language code, it is not
possible for POP instructions to continue
in sequence into new global routines. When
this operation is intended, an IEYXIT or an
IEYJUN instruction terminates the first
routine.

I LOCAL

JUMP INSTRUCTIONS

POP
local
jump
instructions,
jump
instructions which transfer control out of
the normal sequence to local labels~ must
occur in the same global area as the one in
which the local label referred to
is
defined.
The address portions of POP local jump
instructions are assembled to contain the
distance in halfwords from the beginning of
the global area plus two to the indicated
local label.
This value is a relative
halfword address for the target, where the
base used is the location of the first POP
instruction in the global area.

Decimal
Location Label
100
G0245
102

120

140

138

Explanation:
The local jump instruction
illustrated at location 140 is assembled so
that its address field contains the location of the label #024503 (120), relative
in halfwords to the beginning location of
the global area plus two (102). Thus, the
address field of the IEYJUN instruction
contains the value 09.

Symbolic
Instruction
BALR
A,B
IEYCLA G0566

#024503 IEYLGA G0338

IEYJUN #024503

Hexadecimal
Instruction
062A

When the POP local jump instruction is
interpreted, the contents of the location
LOCAL JUMP BASE are added to the address
field of the POP instruction to produce the
absolute address of the jump target. LOCAL
JUMP BASE is set to the beginning address
of the global area plus two as a result of
the BALR instruction which begins the global routine; this function is performed at
POP BASE, as described in "Global Jump
Instructions."

When local jumps are performed directly
in machine language, the relative addressing described above is also used; in this
case, however, the base address is in the
register POPADR as a result of the BALR
instruction heading the routine.

9A12

5809

POP instruction mnemonics are listed
Table 8.

in

Table

8.

POP Instruction Cross-Reference List

r-------------------------------------------T-----'--------------------------------------,
Instruction Group
Hex
Instruction GrouE
Hex
Mne:,monic
~e!!!2ni£
Arithmetic/Logical
Arithmetic/Logical
Arithmetic/Logical
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Code Producing
Code Producing
Code Producing
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Decision Making
Jump
Arithmetic/Logical
Arithmetic/Logical
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Indirect Addressing
Transmissive
Arithmetic/Logical
Transmissive
Transmissive
Jump (global)
Jump (local)
JAT
Jump (global)
Jump (local)
JOW
Jump (global)
Jump (local)
JPE
Jump
JRD
Jump
JSB
Jump
JUN
Jump (global)
Jump (local)
LCE
Transmissive
LCF
AA
Transmissive
LCT
___________________________________________
A8
Transmissive
i
ADD
AFS
AND
APR
ARK
ARP
ASK
ASP
BID
BIM
BIN
BOP
CAR
CLA
CNT
CPO
CRP
CSA
CSF
DIM
DIV
EAD
EAW
ECW
EOP
ETA
FET
FLP
FRK
FRP
FTH
lAD
IND
lOP
lOR
ITA
ITM
JAF

04
BC
B4
A4
86
OE
12
14
7E
7C
7A
60
1A
06
1C
B2
62
24
26
8E
B8
2E
18
18
30
32
34
46
84
10
AE
36
D2
38
8A
3A
AO
4A
56
48
54
4E
SA
52
82
50
4C
58
00

LGA
LGP
I.LS
LRS
LSS
MOA
MOC
MON
MPY
NOG
NOZ
PGO
PGP
PLD
PNG
POC
POW
PSP
PST
QSA
QSF
REL
RSV
SAD
SBP
SBS
SCE
SCK
SFP
SLE
SNE
SNZ
SOP
SPM
SPT
SRA
SRD
STA
STM
SUB
SWT
TLY

wop

W1P
W2P
W3P
W4P
XIT
ZER

9A
80
98
B6
BO
5C
9E
5E
OA
1E
3E
22
9C
90
20
94
16
92
8C
2A
2C
64
66
6A
BA
96
28
6E
A6
70
74
72
6C
A2
AC
76
78
68
3C
08
OC
42
C8
CA
CC
CE
DO
44
40

Decision Making
Transmissive
Arithmetic/Logical
Arithmetic/Logical
Transmissive
Decision Making
Transmissive
Transmissive
Arithmetic/Logical
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Transmissive
Roll Control
Arithmetic/Logical
Transmissive
Decision Making
Jump
Roll Control
Roll Control
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Decision Making
Arithmetic/Logical
Transmissive
Arithmetic/Logical
Address Computation
Address Computation
Address Computation
Address Computation
Address Computation
Jump
Transmissive

___________________________________________

Appendix A:

The POP Language

139

APPENDIX B '.

ROLLS USED IN THE COMPILER

This appendix describes each of the
rolls used in the compiler, giving the
group size, the structure and content of
the information in the group, and the roll
number.
Each roll is described as it
appears in each of the phases of the
compiler.
This information is useful in
observing the actions taken by the various
phases, since a significant portion of the
work performed by the compiler is the
construction and manipulation of information on rolls.

10) indicates either in-line (including
which generation routine must be used) or
that a call is to be generated (when the
flag is equal to zero).
This roll is used and then destroyed by
Allocate.

ROLL
The rolls are ordered in this appendix
as they are in storage, by roll number. In
some cases, a single, number is assigned to
several rolls.
In these cases, the rolls
with identical
numbers
are
presented
chronologically, and the overlay of one
roll on another indicates that the previous
roll is no longer required when the new
roll is used. The group stats values for
rolls with the same number are always
identical.
The roll number is the entry number in
the roll statistics tables for the appropriate set of statistics; that is, the roll
number multiplied by four is the relative
address of the correct entry in the group
stats, BASE, BOTTOM, and TOP tables.

1:

SOURCE ROLL

This roll holds source module statements
while they are being processed during the
operations of Parse. The roll is not used
by any later phase of the compiler.
Source statements appear on this roll
one card column per byte. Thus, each card
of a source statement occupies 20 groups on
the roll. The group size is four bytes.
The sta tement
A(I,J)=B(I,J)*2+C(I,J).*2
would
as:

therefore

appear on the SOURCE roll

4 bytes

ROLL

0:

r---------T----------T----------T---------,
I
bib
I
bib
I

LIB ROLl!

~---------t----------t----------t---------~

This roll contains one group for every
name by which a library subprogram can be
referred to in the source module. The roll
is
contained
in
IEYROL
and remains
unchanged in size and in content throughout
compilation.
The group size for the LIB roll
twelve bytes. Each group has the form:

is

r-----------·------·-----------------------,

I <---------------subprogram--------------- I
~-------------------T----------T---------i

I
~--------T-----------t----------.L--------- i
TAG
I ____________
flag
I ____________________
no. arguments
lI _________
J..
J..
JI
TAG

I

0

The TAG appearinq in the'seventh byte of
the group provides the mode and size of the
FUNCTION value, if the subpro<;ram is a
FUNCTION.
The TAG in byte 9 indicates the
mode and size of the arguments to the
subprogram.
For FUNCTIONs, the flag (byte
140

bib

I

I

I

A

I

J

I

(

I

I)

I

~---------t----------t----------t---------i

I

,

~---------t----------t----------t---------i

I

I

B

I

(

I

I

I,

I

I

I

I

J

I

)

I

*

I

+

I

C

I

(

I

~---------t----------t----------t---------i

~---------t----------t----------t---------i
2

~---------t----------t----------t---------i

I

4 bytes

I-------name---------> I

I

I

I

,

I

J

I)

I

~---------t----------t----------t---------i
I·
I
*
I
2
I
b
I
~---------t----------f----------t---------i

I

bib

I

bib

I

~---------.L----------~---------~--------i

I
I
I

I
I
I

~---------T----------T----------T---------i

Il_________
bi
.L__________
b
I

~

_________
bib

I

.L _________ J

where b stands for the character blank, and
a total of 20 words is occupied by the
statement.

ROLL

2:

IND VAR ROLL

This roll holds a pointer to the induction variable (the DO variable) used in
each DO loop.
The pointer specifies the
appropriate group on the SCALAR roll. Each
pointer is placed on the roll by Parse as
the DO loop is encountered in the source
module.
When the loop is closed, the
pointer is deleted.
The roll is not used in subsequent
phases of the compiler. The group size for
the IND VAR roll is four bytes.

ROLL

2:

NONSTD SCRIPT ROLL

This roll exists only in Unify; the
information held on it is taken from the
SCRIPT roll. The group size for the NONSTD
SCRIPT roll is variable, with a minimum of
20 bytes. Each group on the roll describes
an array reference.

constant subscripts. The remaining words
hold the induction variable coefficient
used in this reference for each loop in the
nest, beginning with nest level one (the
outermost loop) and ending with the highest
nest level at this array reference.

ROLL

3:

NEST SCRIPT ROLL

•

~lis

roll contains 'information concerning array references in nested DO loops.
The information for this roll is taken from
the SCRIPT roll as each nest of loops is
encountered, one nest at a time. The roll
exists only in Unify. The group size of
the NEST SCRIP'l' roll is variable with a
~n~mum
of 20 bytes.
The format of the
NEST SCRIPT roll is as follows:
4 bytes

r---·-----T--------------------------------,

I traits

I

frequency

I pointer to ARRAY REF roll

The format
group is:

of

the

NONSTD SCRIPT roll

I

~---------------------------------------~

Ipointer to the ARRAY roll
I
~-----------------------------------------1
I offset
I
4 bytes

r--------T--------------------------------,
Itraits I
frequency
I
~-------~--------------------------------~
Ipointer to ARRAY REF roll
I
~-----------------------------------------~
Ipointer to the ARRAY roll
I
~-----------------------------------------~
I offset
I
~-----------------------------------------~
linduction variable coefficient
I
~----------------------------------------~

I
I
I

I

~--------~-------------------------------1

I
I
I

~-----------------------------------------~
L_________________________________________
JI
linduction
variable coefficient

where the first byte of the first word
contains the trait, which indicates either
joined or not joined; the value of this
item is always zero (not joined) for this
roll. The joined value indicates that the
subscript described must appear in a general register at the time of the reference.
The remaining three bytes of the first word
indicate the number of times this subscript
expression is used.
The next two words contain pointers to
rolls holding information on the array and
the array reference to which this group
refers.
The fourth word holds the array
offset; this value accounts for element
size and includes all modification due to

~------------------------------------------~

linduction variable coefficient

I

~-----------------------------------------~

I
I
I

I
I
I

~-----------------------------------------1
L-________________________________________
JI
linduction
variable coefficient

where the first byte of the first word
indicates
joined
or not jOined.
The
remaining three bytes of the first word
indicate the number of times that this
subscript expression is used. The next two
words of the group contain pointers to
rolls which hold information on the array
and the array reference to which this entry
refe:rs. The fourth word holds the actual
adjusted offset for this array reference.
The last words of the group contain the
coefficients of induction variables used in
the array reference, beginning with the
nest level one variable and ending with the
highest nest level.

ROLL

4:

POLISH ROLL

This roll is used to hold the Polish
notation generated by Parse, one statement
at a time.
(The Polish notation is moved
to the AFTER POLISH roll at the end of each
statement.)
Therefore, the roll contains
Appendix B:

Rolls Used in the Compiler

141

pointers, drivers, and an occasional constant.
The terms PO and Pi are used to
refer to the bottom and next-to-bottom
groups on the POLISH roll, respectively.
In Gen, the Polish notation is moved
back onto the POLISH roll from the AFTER
POLISH roll,
one statement at a time. It
is used in the production of object code.
The group size for the POLISH roll is
four bytes.
The format of the Polish
notation which appears on this roll is
described completely in Appendix C.
The POLISH roll is not used in the other
phases of the compiler and no information
is left on it through these phases.

This roll contains information on array
references
encountered
in
the source
module. The group size for the LOOP SCRIPT
roll is variable; the minimum is 20 bytes.
Its format is:

4 bytes

r-----------------------------------------,
I
n
I
~-----------------------------------------~

I

I

k

~----------T---------T---------T----------1
I
C1
I
C2
I
C3
I
c
I
~----------~--------~--------~----------~

I
I
I

I
I
I

~----------T---------T---------T----------1

c
LI __________

I

~

________

,

~

_________

I __________ JI

~

where n is the number of words in the plex,
exclusive of the word which holds n,
k is
the number of bytes in the literal constant, and c (the k character) may fall in
any byte of the last word of the plex.
If
the literal constant appeared in a source
module DATA or PAUSE statement, the high
order bit of the second word of the plex
(k) is set to one; otherwise, it is zero.
Entries are made on the LITERAL CONST
roll only during Parse. It is used to hold
the literal constants throughout the compiler; its format,
therefore, does not
vary.

4 bytes

r--------T--------------------------------,

Itraits

I

frequency

I

~--------~--------------------------------~

Ipointer to the ARRAY REF roll

I

~-----------------------------------------~

Ipointer to the ARRAY roll

~-----------------------------------------~

loffset

I

~-----------------------------------------~

linduction variable coefficient

I

~-----------------------------------------~

I
I
I

ROLL

7:

GLOBAL SPROG ROLL

I

I
I
I

~-----------------------------------------~

linduction
variable coefficient
L __________________________________________
JI
All items are the same as described for the
NEST SCRIPT roll (roll 3).
The LOOP SCRIPT roll exists only in
Unify.
It is used by this phase to further
separate subscripts into two categories:
standard, those which must appear in general registers at the time of reference, and
nonstandard ..

In Parse this roll holds the names of
all SUBROUTINEs and non-library FUNCTIONs
referred to in the source module.
It also
holds the names of all subprograms listed
in EXTERNAL statements in
the
source
module, including library subprograms.
In
addition,
the compiler itself generates
calls to the library exponentiation routines; the names of these routines are
entered on the GLOBAL SPROG roll.
The group size for the GLOBAL SPROG roll
is eight bytes. All groups placed on the
GLOBAL SPROG roll by Parse have the following format:
4 bytes

r-----------------------------------------,
I <--------------subprogram----------------I
~--------------------T----------T---------~

I-------name-------->I
TAG
I _________
0
L
____________________
_________
JI
~

ROLL

5:

LITERAL CONST ROLL

This roll holds literal constants, which
are stored as plexes. The group size for
the LITERAL CONST roll is variable. Each
plex has the form:
142

~

The TAG appearing in the seventh byte of
the group indicates the mode and size of
the FUNCTION value for FUNCTIONs; it has no
meaning for SUBROUTINEs.
In Allocate, the information on the roll
is altered to:

4 bytes

r--------------------T--------------------,
I
ESD number
I
displacement
I
~--------------------~--------------------~

Il _________________________________________
base table pointer
JI

The ESD number is the one assigned to the
sUbprogram.
The displacement and the base
table pointer, taken together, indicate the
location assigned by Allocate to hold the
address of the subprogram. The specified
BASE TABLE roll group holds an address; the
displacement is the distance in bytes from
that address to the location at which the
address of the subprogram will be stored in
the object module.

ROLL 10:

This roll holds the double-precision
(a-byte) real constants used in the source
module or defined by the compiler.
The constants are recorded in binary
(dolmle-precision floating point format),
one constant per group. The group size for
the OP CONST roll is eight bytes.
The OP CONST roll is present in this
format through all phases of the compiler.

ROLL 11:
In Gen, the GLOBAL SPROG roll is used in
the construction of object code, but it is
not altered.
In Exit, the roll is used in the production of RLD cards, but is not altered.

ROLL

8:

FX CONST ROLL

This roll holds the fullword integer
constants which are used in the source
module or generated by the compiler. The
constants are held on the roll in binary,
one constant per group. The group size for
the FX CONST roll is four bytes.
The format of the FX CONST roll is
identical for all phases of the compiler.
The roll remains in the roll area for all
phases, even though it is not actually used
in Allocate and Unify.

ROLL

9:

FL CONST ROLL

This roll holds the single-precision
real (floating point) constants used in the
source module or generated by the compiler.
constants are recorded on the roll in
binary (floating point format), each constant occupying one group. The group size
for the FL CONST roll is four bytes.
The FL CONST roll remains in the roll
area
for all phases of the compiler,
although it is not actually used in Allocate or Unify. The format of this roll is
identical for all phases.

OP CONST ROLL

COMPLEX CONST ROLL

This roll holds the complex constants of
standard siz·e (eight bytes) used in the
source module or generated by the compiler.
Each complex constant is stored on the roll
as a pair of 4-byte binary floating-point
numbers, the first represents the real part
of the constant and the second represents
the imaginary part.
The COMPLEX CONST roll exists in the
format described above for all phases of
the compiler.
The group size is eight
bytes.

ROLL 12:

OP COMPLEX CONST ROLL

This roll holds the complex constants of
optional size (16 bytes) which are used in
the source module or generated by the
compiler. Each constant is stored as a
pair of double-precision binary floating
pOint values. The first value represents
the real part of the constant; the second
value represents the imaginary part.
The
group size for the OP COMPLEX CONST roll is
16 bytes.
The OP COMPLEX CONST roll exists in this
format for all phases of the compiler.

ROLL 13:

TEMP NAME ROLL

This roll is used as temporary storage
for names which are to be placed on the
ARRAY or EQUIVALENCE roll. The group size
for the TEMP NAME roll is eight bytes. The
format of the group is:
Appendix B:

Rolls Used in the Compiler

143

4 bytes

r-----------------------------------------,

I<-----------------name-------------------I

This roll is not used after Allocate.
The group size for the DO LOOPS OPEN roll
is f our bytes.

l----------·------·-----T----------T---------~

1-------------------->
1______
TAG .___ J.1_________
0
L _________ .___________ .L
JI
ROLL 15:
The TAG appearing in the seventh byte of
the group indicates, in the format of the
TAG field of a pointer, the mode and size
of the variable.
The TEMP NAME roll is used only during
Parse and Allocate; it does not appear in
any later phase of the compiler.

ROLL 13:

STD SCRIPI' ROLL

The information on this roll pertains to
array references for which the subscript
expression must appear in a general register ( joined) •

LOOPS OPEN ROLL

This roll contains the increment and
terminal values of the induction variable
used in a DO loop and transfer data for the
reiteration of the loop.
Gen creates the roll by establishing an
entry each time a DO loop is encountered.
The information is used in generating the
object code.
As a loop is closed, the
bottom group from the LOOPS OPEN roll is
pruned.
The group size is four bytes. Four
groups are placed in the roll at one time.
The configuration of a LOOPS OPEN roll
group is as follows:
4 bytes

The roll exists only in Unify and the
information contained therein is taken from
the SCRIP']? roll.
Its structure and contents are identical to those of the NONSTD
SCRIPI' roll (roll 2) with the exception
that the traits on this roll always indicate jOined.
The group size is variable
with a minimum of 20 bytes.

ROLL 14:

r------------------------------·----------,

I pointer to n3 (increment)

I pointer to n 2 (terminal value)
I LOOP DATA pointer

I

~----------------------------------------~

IL_________________________________________
pointer to return point made label
JI

TEMP ROLL

This roll is used as temporary storage
in Parse and is not used in any later phase
of the compiler.
The group size for the
TEMP roll is four bytes.
This roll is used as temporary storage
for error information in Parse and is not
used in the other phases of the compiler.
The group size for the ERROR TEMP roll is
four bytes.

ERROR MESSAGE ROLL

This roll is used only in Parse. It is
used during the printing of the error
messages for a single card of the source
module.
Each group holds the beginning
address of an error message required for
the card.
It is used in conjunction with
the ERROR CHAR roll, whose corresponding
group holds the column number in the card
with which the error is associated.
The
group size for the ERROR MESSAGE roll is
four bytes.

DO LOOPS OPEN ROLL
ROLL 16:

In Parse, as DO statements ,are encountered. pointers to the target labels of the
DO statements are placed on this roll.
When the target statement itself is encountered, the pointez' is removed.
In Allocate, the roll may contain some
pointers left from Parse; if any are present, they indicate unclosed DO loops; the
roll is checked by Allocate and any information on it is removed.
144

I

.-----------------------------------------~

ROLL 16:

ROLL 15:

I

~----------------------------------------~

TEMP AND CONST ROLL

This roll is produced in Gen and is used
in Gen and Exit. It holds all constants
required for the object module and zeros
for
all
temporary
storage
locations
required in the object module.
Binary constants are moved to this roll
by Gen from the various CONST rolls.
This
roll becomes the object module's temporary

Form) Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
storage and constant area. The group size
for the TEMP AND CONST roll is four bytes.

ROLL 18:

ROLL 17:

This roll is used only in Gen, where it
holds the Polish notation for portions of
DATA statements or Explicit specification
statements which refer to control sections
different from the control section presently in process. The roll is a temporary
storage
location for this inform~tion,
since data values are written out for one
control section at a time. The group size
is four bytes.

ERROR CHAR ROLL

This roll is used only during Parse, and
is not used in any subsequent phase of the
compiler.
While a single source module card and
its error messages are being prepared for
output, this roll holds the colUmn number
with which an error message is to be
associated. The address of the error message is held in the corresponding group on
the ERROR MESSAGE roll. The group size for
the ERROR CHAR roll is four bytes.

DATA SAVE ROLL

ROLL 19:

XTEND LABEL (XTEND LBL) ROLL

This roll is used only by Parse.
It
holds the pointers to the LABEL roll for
all labels defined within the-innermost DO
loops that are possible extended range
candidates. The group size of the ~~~~Q
~1 roll is four bytes.
Each group holds
a pointer to the LABEL roll. The format of
the group on the roll is:
1 byte

3 bytes

r--------T--------------------------------,
I TAG
ILABEL roll pointer
I
This roll is used only in Exit, and is
not used in previous phases of the compiler. It holds address constants, the locations at which they are to be stored, and
relocation information. The group size is
16 bytes.
The first word of the group
holds an area code, indicating the control
section in which the constant exists. The
second word of the group holds the address
into which the constant is to be placed;
the third holds the constant.
The last
word of the group indicates the relocation
factor (ESD number) to be used for the
constant.

L ________

~

________________________________ J

If the label is a possible re-entry point
from the extended range of a DO loop, the
TAG byte contains a X·05'. otherwise, the
TAG byte contains a X'OO'.

ROLL 19:
ROLL

EQUIVALENCE TEMP (EQUIV TEMP)

This roll is used to hold EQUIVALENCE
roll data temporarily in Allocate, and is
not used in any other
phase
of
the
compiler.
The group
size
for
the
EQUIVALENCE TEMP or EQUIV TEMP roll is
twelve bytes.
The format of the group on
the roll is:
4 bytes

The group size for the INIT roll is
eight bytes. The roll is initialized in
Parse, and used and destroyed in Allocate.
Each group on the roll holds the name of a
scalar variable or array listed in the INIT
option of a DEBUG statement in the source
module. The format of the group is:
4 bytes

r-----------------------------------------,
I<------------variable name---------------J
~--------------------T--------------------~
L ____________________ L ____________________
JJ
,--------~---------->J
0

r-----------------------------------------,
I<~--------------variable-----------------I
r--------------------T--------------------~
I-------name-------->I
0
I
.--------------------~--------------------~
JI
IL_________________________________________
offset
The offset is the relative address of the
beginning
of
the variable within the
EQUIVALENCE group (set) of which it is a
member. This roll holds this information
during
the
allocation of
storage for
EQUIVALENCE variables.
Appendix B:

Rolls Used in the Compiler

145

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
ROLL 20: XTEND TARGET LABEL (XTEND TARG
LBL) ROLL
This roll is 'Used only by Parse.
The
group size of -the XTEND TARGET LABEL roll
is four bytes. Each group holds a pointer
to the LABEL roll for each label that
appears in any transfer statement (e.g., GO
TO, Arithmetic IF statements) within a DO
loop.
These groups indicate transfers out
of an innermost DO loop and a possible
extended range. The format of the group is
the same. as Roll 19, XTEND LABEL roll.
1 byte

3 bytes

r--------T--------------------------------,
I TAG
I LABEL roll pointer
I
L ________ .L _________________________________ J

If the TJ~G by1:e contains a x' 40", this
indicates that the target
label
also
appears in a transfer statement outside the
DO loop and may be a possible re-entry
point (if the label is defined within the
loop).
otherwise, the TAG byte contains a

4 bytes

Ir-----------T-----------------------------,
traits
I
frequency
I
I~-----------~-----------------------------~
ARRAY REF pointer
I

f---------------------------,--------------i
JI
IL ________________________________________
LOOP CONTROL pointer

The frequency indicates how many times
within a loop the register is used.
The
registers are symbolic registers that are
converted to real registers and/or temporary storage locations. The pointer to
the ARRAY REF roll is actually a thread
which
indicates
each place that this
register is required in the loop. The last
word, the pointer to the LOOP CONrROL roll,
designates where the register in question
was initialized.
(The particular information is contained in the second word of the
entry on the LOOP CONTROL roll.)

X'OO'.

ROLL 21:

EOL!:! 20 LJ.2UIVAI,ENCE HOLD (EQOIV HOLD)
Eill::!!:!

This roll is constructed by Allocate"
and remains in the roll area for all
remaining phases of the compiler. The BASE
TABLE roll becomes the object module base
table"
which holds the base addresses used
in referring to data in the object module.

This roll is used to hold EQUIVALENCE
roll data temporarily in Allocate, and is
not used in any other phase of the compiler.
The group size for the EQUIVALENCE
HOLD roll is twelve bytes. The format of
the group on the roll is:
4 bytes

r-----------------------------------------,
I <---------------variable-----------------I

~--------------------T--------------------1

I-------name-------->I
0
I
~--------------------L--------------------i
IL __________ ,_______________________________
offset
JI
The offset is the relative address of the
beginning of the
variable
within the
EQUIVALENCE group (set) of which it is a
member. This roll holds this information
during
the allocation
of storage for
EQUIVALENCE variables.

The group size for this roll is eight
bytes. One group at a time is added to
this roll by Allocate.
The first word
holds the area code which indicates the
relocation factor by which the base table
entry must be modified at object time; each
unique area code also defines an object
module control section.
The second word
holds a relative address within the control
section defined by the area code; this is
the value which is in the corresponding
base table entry prior to modification by
the linkage editor.
The entire BASE TABLE
structed by Allocate.

ROLL 22:
ROLL 20:

REG

ROL~

This roll contains information concerning
general registers required in the
execution of DO loops in the object module.
The group size of the REG roll is twelve
bytes. The roll is used only in Unify.
Each group has thE~ following format:
146

BASE TABLE ROL!!

roll

is

con-

ARRAY ROLL

This roll is used thrOUghout the compiler to hold the required information describing
arrays defined in the source
module.
In Parse, the name and dimension information is added to the roll for each array
definition encountered. The group size for
the ARRAY roll is 20 bytes. The format of
the group is:

Form Y28-6638-1
Page Revised 11/15/68 bv TNL Y28-6826
4 bytes

r-----------------------------------------,
name----------------I
.-------------------T----------T----------1
1------------------>1 TAG
1
0
I
~<--------------array

~-------------------~----------~----------i
ARRAY DIMENSION pointer
I
~-----------------------------------------~
1
number of elements
I

I

.-----------------------------------------i
I
array offset
I
L_________________________________________ J

The TAG appearing in the seventh byte of
the group indicates, in the format of the
TAG field of a pointer, the mode and size
of the array variable. The pOinter in the
third word of the group points to the
beginning of the plex
on
the
ARRAY
DIMENSION roll, which describes the dimensions of the array. The number of elements
in the array is a constant, unless the
array has dummy dimensions; in the latter
case, Parse puts a dummy pointer to a
temporary location in this word of the
group.
The array offset is the summation of the
multipliers for the array subscripts.
If

the array dimensions are nl, n2, ••• n7, then
the multipliers are 1, nl, nl*n2" nl*n2 *n3,
••• nl*n2*n3*n4*n5*n6, where the size of the
element of the array is not considered.
This value, after it is multiplied by the
element size~ is used as a subtractive
offset for array references. The offset is
placed on the roll as a constant unless the
array has dummy dimensions; in the latter
case, a dummy pointer to a temporary location is placed in the last word of the
group.
In Allocate, the first two words of the
ARRAY roll group are replaced with the
following:
4 bytes

r---------T----------T--------------------,
t TAG
IDBG/CEAD 1
displacement
I
~---------~----------~--------------------~
IL_________________________________________
base table pointer
JI

The TAG is unchanged, except in location,
from Parse. The DBG/CEAD flag is logically

~ppendix

B:

Rolls Used in the Compiler

146.1

split into two hexadecimal values.
The
first of these indicates debug references
to the variable; its value is 1 for INIT, 2
for SUBCHK, 0 for neither, and 3 for both.
The second hexadecimal value is nonzero if
the array is in COMMON, a member of an
EQUIVALENCE set, used as an argument to a
subprogram, or a dummy; it is zero otherwise.
The displacement and the base table
pointer, taken together,
indicate
the
beginning address of the array. The base
table pointer specifies the BASE TABLE roll
group to be used in references to the
array; the displacement is the distance in
bytes from the address held in that group
to the location at which the array begins.
If the array is a dummy, the base table
pointer is replaced by a pointer to the
GLOBAL DMY roll group defining the array,
and the displacement is zero.

roll is constructed by Gen and holds pointers to the arguments to subprograms in the
order in which they are presented in the
subprogram reference. These pointers may,
therefore, point to the SCALAR, ARRAY,
GLOBAL SPROG, or TEMP AND CONST rolls (the
last roll
holds arguments
which are
expressions or constants). The value zero
is placed on this roll for arguments whose
addresses are computed and stored in the
object module argument list area.
The TAG fields of the pointers on this
roll contain the value zero except for the
TAG field of the last pointer for a single
subprogram reference; this field contains
the value 80.
The contents of the SPROG ARG roll are
punched by Exit. The group size for the
SPROG ARG roll is four bytes.

The third, fourth, and fifth words of
the ARRAY roll group are not modified by
Allocate.
ROLL 24:
The
ARRAY
roll remains in storage
throughout the compiler, and it is consuIted, but not modified, by the phases
following Allocate.

ROLL 23:

DMY DIMENSION ROLL

This roll is used first in Allocate,
where
it holds pointers to the array
definition and the entry statement with
which dummy array dimensions are associated. The group size of the DMY DIMENSION roll is four bytes. Two groups are
added to the roll at a time to accommodate
this information: the format is:

ENTRY NAMES ROLL

In Parse, this roll holds all ENTRY
names defined in the source subprogram, and
pointers to the locations on the GLOBAL DMY
roll at which the definitions of the dummy
arguments corresponding to the ENTRY begin.
The group size for the ENTRY NAMES roll is
16 bytes. The format of the group is:
4 bytes

r-----------------------------------------,
I<--------------ENTRY name----------------I
~--------------------T--------------------~
0
I

1--------------------> 1

~--------------------~-------------------~
dummy pOinter
I

1

~------------------------------------------~

1L_________________________________________
0
JI

4 bytes

r-----------------------------------------,
I
ARRAY pointer
I
~----------------------------------------~
I _________________________________________
ENTRY NAMES pointer
L
J1

The dummy arguments corresponding to the
ENTRY are listed on the GLOBAL DMY roll in
the order in which they are presented in
the ENTRY statement.

In Gen, the DMY DIMENSION roll is used
in the generation of temporary locations
for the dummy dimensions. This operation
is performed when code is being produced
for the prologue with which the dummy
dimension is associated.

In Allocate, the ENTRY NAMES roll is
used in the check to determine that scalars
with the same names as all ENTRYs have been
set. A pointer to the scalar is placed in
the fourth word of the group by this phase.

The DMY DIMENSION roll is not
later phases of the compiler.

ROLL 23:

used

by

SPROG ARG ROLL

This roll becomes the subprogram argument list area of the object module.
The

In Gen, during the production of the
initialization code (the object
module
heading), the first word of the group is
replaced by a pointer to the ADCON roll
indicating the location of the prologue,
and the second word is replaced by a
pOinter to the ADCON roll indicating the
location of the epilogue. During the production of code for the prologue, the first
pointer (the first word of the group) is
replaced by a pointer to the ADCON roll
Appendix B:

Rolls Used in the compiler

147

which indicates
ENTRY.

the

entry

point for the

This roll is not required after the
phase.

The GLOBAL DMY roll is used but
fied in Gen and Exit.

Gen
ROLL 26:

ROLL 25:

unmodi-

ERROR ROLL

GLOBAL DMY ROLL

In Parse, each group on the roll contains the name of a dummy listed in a dummy
argument list for the principle entry or
for an ENTRY statement in a source subprogram. A flag also appears in each group
which indicates whether the dummy is a
"call by name" or a "call by value" dummy.
The group size is eight bytes. The format
of the group in Parse is:
·4 bytes

r-----------------------------------------,
I<--------------durnrny name----------------I
~-------~-------------T--------------------.,

1------------------->1
l __________ . __________

1

flag

_L ____________________ J

This roll is used only in Parse and
holds the location within the statement of
an error, and the address of the error
message for all errors encountered within a
single statement.
As the statement is
written on the source listing, the information in the ERROR roll groups is removed,
leaving the roll empty for the proceSSing
of the next statement.
The group size is four bytes.
Two
groups are added to this roll at a time:
(1) the column number of the error, counting from one at the beginning of the source
statement and increasing by one for every
card column in the statement, and (2) the
address of the message associated with the
particular error encountered.

where the dummy name occupies the first six
bytes of the group.
ROLL 26:

ERROR LBL ROLL

Label dun~ies, indicated by asterisks in
the source module, are not listed on this
roll.
With this exception, however, the
dummy lists from t.he source subprogram are
entered on this roll as they appear in the
source statements. The end of each dummy
list is signaled by a marker symbol on the
roll. Since each of the dummy lists is
represented on the roll, the name of a
single dummy may appear more than once.

This roll is used only in Allocat~,
where it holds labels which are referred to
in the source module, but which are undefined.
These labels are held on this roll
prior to being written out as undefined
labels or unclosed DO loops. The group
size for the ERROR LBL roll is four bytes.

In Alloca"te, the information
group is replaced by:

ROLL 27:

in

each
LOCAL DMY ROLL

4 bytes

r--------T----------T--------------------,

1

TAG

1

DBG/flag

1

displacement

1

~---------L-_------.---L--------------------.,

1l _________________________________________
base table pointer
J1
where the base table pointer indicates the
group on the BASE TABLE roll to be used for
references to the dummy, and the displacement (in the third and fourth bytes) indicates the distance in bytes from
the
address stored in that BASE TABLE roll
group to the location of the dummy.
The
"flag"
occupies the second hexadecimal
character of the second byte
and
is
unchanged from Parse, indicating call by
name if it is on.
The first hexadecimal
value
in
that
byte
indicates debug
references to the variable; its value is 1
for INIT, 2 for SUBCHR, 0 for neither, and
3 for both. The TAG indicates the mode and
size of the dummy.
148

This roll holds the names of the dummy
arguments to a statement function while the
statement function is being processed by
Parse. The group size is eight bytes. The
format of the group is:
4 bytes

r-----------------------------------------,
I<--------------dummy name----------------I
~--------------------T--------------------.,

L-___________________ -L- ___________________
J1
1------------------->1
0

The information is removed from the roll
when the processing of the statement function is complete.
This roll does not appear in any subsequent phase of the compiler;
however,
pointers to it appear in the Polish notation produced by Parse and these pOinters
are, therefore, processed by Gen.

ROLL 28:

LOCAL SPROG ROLL

In Parse, the roll holds the names of
all statement functions as they are encountered in the source module. The group size
for the LOCAL SPROG roll is eight bytes.
The format of the group is:

a group.
Pointers are added to the roll
when the labels are found as arguments in
CALL statements.
The group size for the
CALL LBL is eight bytes.

gOLL 30:

ERROR SYMBOL ROLL

4 bytes

r-----------------------------------------,

1<------------stmt. function--------------I
~-------------------T----------T----------~
I-------name------->I
TAG
0
l ___________________ i __________
i1__________
JI
The TAG appearing in the seventh byte of
the group indicates, in the format of the
TAG field of a pointer, the mode and size
of the function value.

This roll is used only in Allocate,
where it holds any symbol which is in
error, in preparation for printing.
The
group size for the ERROR SYMBOL roll is
eight bytes.
The symbol 1
TAG
0
l ___________________ i __________
i1__________
JI
where the TAG (seventh byte) indicates the
mode and size of the variable.
Groups are entered on this roll by
Parse; the roll is consulted by Allocate,
but not altered.

ROLL 30:

CALL LBL ROLL

This roll is used only in Parse, where
it holds pointers to the LBL roll groups
defining labels which are passed as arguments in source module CALL statements.
The pOinters are held on this roll only
temporarily, and are packed two pointers to

NAMELIST NAMES ROLL

4 bytes

r-----------------------------------------,
I<---------------NAMELIST-----------------I
~--------------------T--------------------~

I-------name-------->I

0

I

~--------~-----------~-------------------~

1l _________________________________________
pointer to NAMELIST items
J1
where the pointer indicates the first variable in the list associated with the NAMELIST name. In Allocate, the content of the
group on the NAMELIST NAMES roll is changed
to reflect the placement of the corresponding NAMELIST table in the object module.
The format of the first two words of the
modified group is:
4 bytes

r--------------------T--------------------,
I
0
1
displacement
I
~--------------------~-------------------~
1l _________________________________________
base table pointer
JI

where the base table pointer indicates the
group on the BASE TABLE roll to be used for
references to the NAMELIST table, and the
displacement (bytes 3 and 4) indicates the
distance in bytes from the address in that
BASE TABLE roll group to the location of
the beginning of the NAMELIST table.
This roll is used, but not modified, in
Gen and Exit.
Appendix B:

Rolls Used in the Compiler

149

ROLL 32:

NAMELIST ITEMS ROLL

This roll holds the variable
names
listed in the narnelists defined by the
source module.
'rhe group size for the
NAMELIST ITEMS roll is eight bytes. Information is placed on the roll by Parse in
the following form:
IJ

pointer to the dummy dimension variable on
the SCALAR roll, and all affected mUltipliers are pointers to temporary locations
(on the TEMP AND CONST roll)~ The mUltipliers for an array with dimensions n1, n2,
n3, ••• ,
n7
are
1,
n1,
n1*n2, ••• ,
n1*n2*n3*n4*n5*n6.
The ARRAY DIMENSION roll is present, but
not modified in Unify, Gen, and Exit.

bytes

r-----------------------------------------,

I<---------------variable-----------------I
~--------------------T--------------------i

I-------narne--------->
0
L____________________ I ____________________
JI

ROLL 34:

A marker symbol separates namelists on
roll.

This roll becomes the object module
branch table.
During Allocate, where the
roll is first used, the size of the roll is
determined, and some groups are actually
placed on it.
These groups contain the
value zero, and each group refers to a
source module label.

~

The roll is used in this
Allocate and is destroyed.
It
appear in later phases.

ROLL 33:

the

format by
does not

ARRAY 'DIMENSION ROLL

This roll is used to hold dimension
information for the arrays defined in the
source module.
The group size for the
ARRAY DIMENSION roll is variable.
The
information is placed on the roll by Parse
in the form of a plex, as follows:
4 bytes
n

I

~-----------------------------------------i

I

dimension

I

~-----------------------------------------i

I

multiplier

I

~-------------------------·-----------------i

I

dimension

I

~-----------------------------------------i

I

multiplier

I

~-----------------------------------------i

I
I
I

I
I
I

~-----------------------------------------i

I

dimension

I

~----------------------------------------i

I _________________________________________
multiplier
L
JI
where n is the number of words in the plex,
exclusive of itself.
As many dimensions
and corresponding multipliers appear as
there are dimensions declared for
the
array.
Unless the array is a dummy and has
dummy dimensions, each dimension and multiplier is a constant. When dummy dimensions
do appear in the array definition, the
corresponding dimension on this roll is a
150

In Gen, the information for the BRANCH
TABLE roll groups is supplied as each
labeled statement is processed. The group
size for the BRANCH TABLE roll is eight
bytes. The format of the group is:
4 bytes

r-----------------------------------------,
I
area code
I
~-----------------------------------------i

I

relative address
L _________________________________________
JI

r-------------------------------------------,

I

BRANCH TABLE ROLL

where the area code provides the reference
for linkage editor modification of the
corresponding branch table word, and the
relative address is the relative location
of the label in the control section (area)
in which it appears.
Branch table (and,
hence, BRANCH TABLE roll) entries are provided for all branch target labels, statement functions,
and made labels (labels
constructed by the compiler to refer to
return points in DO loops and to the
statements following Logical IF
statements) •
The roll is retained in the Gen format
until it is written out by Exit.

ROLL 35:

TEMP DATA NAME ROLL

This roll is used only in Parse, where
it holds pointers and size information for
variables listed in DATA statements or in
Explicit
specification statements which
specify initial values.
Information is
held on this roll while the statement is
being processed.

The group size for the TEMP DATA NAME
roll is four bytes. Four groups are added
to the TEMP DATA NAME roll for each variable listed in the statement being scanned.
They are in the following sequence:
4 bytes

r-----------------------------------------,
I
element size (bytes)
I
~-----------------------------------------~

I

pointer to variable
I
~-----------------------------------------~
I
number elements set
I
~-----------------------------------------~
Il _________________________________________
element number
JI
The third group specifies the number of
elements of the variable being set by the
DATA statement or the Explicit specification statement. If a full array is set,
this is the number of elements in the
array; if a specific array element is set,
this word contains the value one.
The fourth group indicates the first
element number being set. If a full array
is being set,
this word holds the value
zero; otherwise, it holds the
element
number.

ROLL 36:

tains a pOinter to the value which is held
in the corresponding general register at
the present pOint in the object module; as
the contents of the general registers are
changed, the pointers are changed.
The
pointers are used primarily to indicate
that the general register is in use and the
mode of the value in it. They are used for
optimizing only in the case of the general
registers which are loaded from the base
table and the general registers used for
indexing.
If the general register corresponding to a specific group is not in use,
the group holds the value zero.

ROLL 37:

EQUIVALENCE ROLL

In Parse, this roll holds the names of
all
variables listed in source module
EQUIVALENCE statements. One group is used
for each variable name listed in the source
statement,
and
EQUIVALENCE
sets
are
separated from each other by a marker
symbol. The group size for the EQUIVALENCE
roll is twelve bytes. The format of the
group is:

TEMP POLISH ROLL
4 bytes

This roll is used only in Parse, where
it holds the Polish notation for a single
DATA group during the scanning of that
group. In an Explicit specification statement, a DATA group is defined to be a
single variable and the associated constants; in a DATA statement, a DATA group
is the set of variables listed between a
pair of slash characters and the constants
associated with that set.
This roll is used because any error
encountered in a DATA group will cause the
Polish notation for the entire group to be
canceled.
In an Explicit specification
statement, the type information on the
variable is retained when the data is bad;
if, however, the type information is bad,
the data is also lost. The group size is
four bytes.

ROLL 36:

r-----------------------------------------,
I <---------------variable-----------------I

~--------------------T--------------------~
I---name------------>I
0
I
~.--------------------'---------------------~

lI _________________________________________
JI
EQUIVALENCE OFFSET pointer

The pointer to the EQUIVALENCE OFFSET roll
points to the first word of a plex on that
roll which holds the subscript information
supplied in the EQUIVALENCE statement. If
no subscript was used on the variable in
the EQUIVALENCE statement, the value zero
appears in the third word of the group on
the EQUIVALENCE roll.
The roll is used and destroyed in Allocate, during the assignment of storage for
EQUIVALENCE variables.

FX AC ROLL
ROLL 37:

This roll is used in Gen only and is a
fixed length roll of 16 groups. The groups
refer to the 16 general registers in order.
The group size for the FX AC roll is
four bytes.
Each group on the roll con-

BYTE SCALAR ROLL

This roll is used only in Allocate,
where it holds (temporarily) the names of
1-byte scalar variables.
The group size
for the BYTE SCALAR roll is eight bytes.
The format of the group is:
Appendix B:

Rolls Used in the Compiler

151

4 bytes

r-----------------------------------------,
I<-------------scalar name----------------I
~--------------------T----------T---------~
1------------------->1
TAG
1
0
J1

L__.__________________ . L__________. L _________

where the TAG field indicates the mode
size of the variable.

ROLL 38:

USED LIB FUNCTION

and

ROL~

ROLL 39:

COMMON DATA ROLL

This roll holds the names of all COMMON
variables as defined in source module COMMON statements. A marker symbol separates
COMMON blocks on this roll.
All information is placed on this roll in Parse.
The group size is eight bytes. The
first six bytes of each group hold the
nameof the COMMON variable; the remaining
two bytes are set to zero, as follows:
4 bytes

In Parse, the roll holds the names and
other information for all library FUNCTIONs
which are actually referenced in the source
module. The group size for the USED LIB
FUNCTION roll is twelve bytes. The information is placed on the roll in the following format:
4 bytes

r-----------------------------------------,
1<----------------FUNCTION-------·--------- 1
~-------------------T----------T----------~
I-------name--------> I
TAG
1
0
1
~---------T---------+----------..L----------~
1TAG
1 flag
I
no. arguments
J1

L_________ . L_________ . L _____________________

The TAG appearing in byte 7 indicates the
mode and size of the function value. The
TAG appearin1
0
In Allocate, the information on this
roll 1S used and destroyed. The roll is
not used in later phases.

ROLL 39:

HALF WORD SCALAR ROLL

The roll is used only in Allocate, where
it holds (temporarily) the names of halfword scalar variables defined in the source
module.
The group size for the HALF WORD
SCALAR roll is eight bytes. The format of
the group is:
4 bytes

r----------------------------------------,
I<-------------scalar name----------------I
~-------------------T----------T----------~

1------------------>1
TAG
0
L
___________________i -_________
i 1__________
J1
where the TAG indicates the mode and size
of the variable.

4 bytes

r---------T----------T--------------------,
1 TAG
1
0
1
displacement
1
~-----_---..L----------..L--------------------~

1
L_________________________________________
base table pointer
J1

where the base table pointer indicates the
group on the BASE TABLE roll to be used in
referring to the address of the subprogram.
The displacement is the distance in bytes
from the contents of the base table entry
to the location at which the address of the
subprogram will be stored. The TAG byte is
unchanged, except in location, from Parse.
The USED LIB FUNCTION roll is consulted
by Gen in the cons"truction of object code,
but it is not modified. It is also present, but not modified, in Exit.
152

ROLL 40:

COMMON NAME ROLL

In Parse, this roll holds the name of
each COMMON block, and a pointer to the
location on the COMMON DATA roll at which
the specification of the variables in that
block begins.
The group size for the
COMMON NAME roll is twelve bytes. The
format of the group is:
4 bytes

r-----------------------------------------,
I<--------------block name----------------I
~--------------------T--------------------~
1------------------->1
0
1
~--------------------i--------------------~
J1
1L_________________________________________
COMMON DATA pointer

\ The pointer points to the first variable in
the list of names which follows the block
name in the COMMON statement~ since a
single COMMON block may be mentioned more
than once in source module COMMON statements, the same COMMON name may appear more
than once on this roll. The information is
placed on this roll as COMMON statements
are processed by Parse.
In Allocate, the roll is rearranged and
the last word of each group is replaced by
the size of the COMMON block in bytes,
after duplicate COMMON names have been
eliminated.
The size is written out by
Allocate and the roll is destroyed.
ROLL 40:

TEMP PNTR ROLL

The group size for the TEMP PNTR roll is
four bytes. This roll is used only in Gen,
and holds pointers to those groups on the
TEMP AND CONST roll that represent object
module temporary storage locations.
The
information recorded on this roll is maintained so that temporary storage created
for one statement can be reused by subsequent statements.

ROLL 41:

4 bytes

r-----------------------------------------,
I
n
I
I---.--------------------------------------~

I

subscript 1

I

I

subscript 2

I

I------------------------------------------i
I-------.-----------------------------------~

I
I
I

i------------------------------------------iI

I

L _________________________________________
J
subscript n

where n is the number of words in the plex
excl usi ve of itself and"
therefore"
also
the number of subscripts. Each subscript
is recorded as an integer constant.
The connection between a plex on this
roll
and the corresponding EQUIVALENCE
variable is made by a pointer which appears
on the EQUIVALENCE roll and points to the
first word of the appropriate plex on this
roll.
In Allocate, the EQUIVALENCE OFFSET roll
is used .in the allocation of storage for
EQUIVALENCE variables.
It is destroyed
dur.1.ng this phase" and does not appear in
the later phases of the compiler.

IMPLICIT ROLL
ROLL 42:

This roll is used only in Parse and
Allocate, where it holds the information
supplied by the source module IMPLICIT
statement. The group size for the IMPLICIT
!roll is four bytes. Its format is:
1 byte

1 byte

1 byte

1 byte

r----------T---------T---------T----------,
I letter
I
0
I TAG
I
0
JI
L __________ _________ _________ __________
~

~

~

This information is placed on the roll by
Parse. The TAG field in the third byte of
the group indicates, in the format of the
TAG field of a pointer, the mode and siz~
assigned to the letter by means of the
IMPLICIT statement.
The IMPLICIT roll is used
and destroyed.

by

FL AC ROLL

This roll is used in Gen only, and is a
fixed length roll of four groups.
The
groups refer to the four floating-point
registers, in order.
The group size for the FL AC roll is
four bytes.
Each group on the roll contains a pointer to the value which is held
in the register at the present point in the
object program~ as the contents of the
registers change; the pointers are changed.
These pointers are used primarily to indicate that the register is in use and the
mode of the value in it. If the register
is not in use, the corresponding group on
this roll contains zero.

Allocate,
ROLL 43:

ROLL 42:

I
I
I

EQUIVALENCE OFFSET ROLL

This roll is constructed during the
operation of Parse and holds the subscripts
from EQUIVALENCE variables in the form of
plexes. The group size for the EQUIVAL~NCE
OFFSET roll is variable. Each plex has the
form:

LBL ROLL

This roll holds all labels used and/or
defined in the source module.
Each label
is entered on the roll by Parse when it is
first encountered, whether in the label
field or within a statement.
The group size for the LBL roll is four
bytes. In Parse, the format of the LBL
roll group is:
Appendix B:

Rolls Used in the Compiler

153

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
1 byte

3 bytes

r---------T-------------------------------,
I TAG
I
binary label
I
L ________ --'-_. ______________________________ J

where the first byte is treated as the TAG
field of a pointer, and the remaining three
bytes contai.n the label, converted to a
binary integer.
In the TAG field, the mode portion (the
first four bits) is used to
indicate
whether the label has been defined; the
remainder of the TAG field is used to
indicate whether the label is the target of
a jump, the label of a FORMAT, or neither.
The leftmost four bits of the
are used as follows:
8

Label i.s defined

o

Label i.s undefined

TAG

byte

The rightmost four bits of the TAG byte
indicate the· following:

In Parse, the names of all unsubscripted
variables which are not dummy arguments to
statement functions are listed on the roll
in the order of their appearance in active
(non-specification)
statements
in
the
source module. Variables which are defined
in specification statements, but which are
never used in the source module, are not
entered on the roll. The group size for
the SCALAR roll is eight bytes. The format
of the group is:
4 bytes

r-----------------------------------------,
I<-------------scalar name----------------I

~--------------------T----------T---------~

L____________________ __________
J1
1------------------->1
TAG
I_________
0
~

~

The TAG field appearing in the seventh byte
of the group indicates the mode and size of
the variable in the format of the TAG field
of a pointer.

1

This is the label of the target
of a jump (GO TO) statement.

In Allocate, the information left on the
SCALAR roll by Parse is replaced by information indicating the storage assigned for
the variable. The resulting format of the
group is:

3

This is the
statement.

label of a FORMAT

r---------T----------T--------------------,
I TAG
IDBG/CEAD I
displacement
I

5

This label is a possible reentry point within an innermost
DO loop that may have a possible
extended range.
(Parse inserts
the hexadecimal 5 to indicate to
Gen that the label is a possible
re-entry point; the Gen phase
then restores those registers
that
were
saved before the
extended range was entered.>

JI
JL _________________________________________
base table pointer

4 bytes

o

= None of the above conditions.

In Allocate, the lower three bytes of
each LBL roll group defining a jump target
label are replaced by the lower three bytes
of a pointer to the BRANCH TABLE roll
group, which will hold the location of the
label at object time. Each group defining
a FORMAT statement label is replaced (lower
three bytes only) with a pointer to the
FORMAT roll group which holds the base
pointer and displacement for the FORMAT.
Groups defining the targets of unclosed DO
loops are cleared to zero.
In Gen, the LBL roll is used to find the
pOinters to the BRANCH TABLE and FORMAT
rolls, but it is not altered.
154

~---------~----------~--------------------~

The TAG field appearing in the first byte
is unchanged, except in location, from the
TAG field held in the SCALAR roll group
during Parse.
The DBG/CEAD flag (in the
second byte) is logically split into two
hexadecimal values.
The first of these
indicates debug references to the variable;
the value is 1 for a scalar referred to in
the INIT option; otherwise, the value is
zero.
The second hexadecimal value is
nonzero if the variable is in COMMON, a
member of an EQUIVALENCE set, or an argument to a subprogram or a global dummy;
otherwise, it is zero. The displacement in
bytes 3 and 4, and the base table pointer
in the second word, function together to
indicate the stora.ge location assigned for
the variable. The base table pointer specifies a BASE TABLE roll group; the displacement is the distance in bytes from the
location contained in that group to the
location of the scalar variable.
If the
scalar is a call by name dummy, the base
table pointer is replaced by a pointer to
the GLOBAL DMY roll group defining it, and
the displacement is zero.

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
The SCALAR roll is checked, but
fied, during Unify, Gen, and Exit.

This roll
stants
used
statements.

modi-

occupy fewer than 16 characters are rightadjusted in the group with leading zeros.

holds the hexadecimal conin
source
module
DATA

In Parse, this roll holds the names of
variables listed in DATA statements and
variables for which data values are provided in Explicit specification statements.
The names are entered on the roll when they
a~e found in these statements.
rhe group
size for this roll is eight bytes. The
groups have the following form:

The format of the roll is identical for
all phases of the compiler. The group size
is 16 bytes.
Two hexadecimal characters
are packed to a byte, and constants which

Appendix B:

Rolls Used in the Compiler

154.1

4 bytes

r-----------------------------------------,
\<------------variable name---------------\
~-------------------T--------------------~
1------------------->1
0
L ____________________ ____________________
J\
~

This information is used to ensure that
no data values are provided in the source
module for dummy variables. The information is left on the roll throughout Parse,
but is cleared before Allocate operates.
In Allocate, binary labels and the names
of statement functions, scalar variables,
arrays, global
subprograms,
and
used
library functions are placed on the roll in
order.
The group size for this roll is
four bytes. Each label entered on the roll
occupies one word; the names occupy two
words each and are left-justified, leaving
the last two bytes of each name group
unused.
The encoded information is placed on
this roll by Allocate as its operations
modify the rolls on which the information
was originally recorded by Parse.
Thus,
all the labels appear first, in the order
of their appearance on the LBL roll, etc.
The information is used by the Exit phase
in producing the object module listing (if
the LIST option is specified by the us~r).

ROLL 47:

FULL WORD SCALAR ROLL

This roll is used only in Allocate,
where it holds the names of all fullword
scalar variables defined by the source
module.
The group size is eight bytes.
The format of the group on the roll is:
4 bytes

r-----------------------------------------,
I<-------------scalar name----------------I
~--------------------T----------T---------~
1------------------->1
TAG
1_________
0
L ____________________
_________
J1
~

~

where the TAG indicates the mode and size
of the variable. This information is held
on this roll only temporarily during the
assignment of storage for scalar variables.

ROLL 48:

COMMON AREA ROLL

This roll is used only in Allocate,
where it holds COMMON block names and sizes
temporarily during the allocation of COMMON
storage.
The group size for the COMMON
AREA roll is twelve bytes. The format of
the group on the roll is:
4 bytes

ROLL 46:

LITERAL TEMP (TEMP LITERAL) ROLL

r-----------------------------------------,
I<--------------block name----------------I
~--·------------------T--------------------i

1------------------->1
This roll is used only in Parse, where
it
holds literal constants temporarily
while they are being scanned.
The group
size for the LITERAL TEMP or TEMP LITERAL
roll is four bytes. Literal constants are
placed on the roll one character per byte,
or four characters per group.

ROLL 47:

COMMON DATA TEMP ROLL

This roll holds the information from the
COMMON DATA roll temporarily during the
operation of Allocate, which is the only
phase in which this roll is used.
The
qroup size for the COMMON DATA TEMP roll is
eight bytes.
The format of the group is
identical to that of the COMMON DATA roll,
namely:
4 bytes

r-----------------------------------------,
I<--------------variable------------------\
~-------------------T--------------------~

I-------name-------->\
0
L
____________________ ____________________
J1
~

0

~--.------------------.:l-.-----------------

1

--i

1L-________________________________________
block size (bytes)
J1

ROLL 48:

NAMELIST ALLOCATION ROLL

This roll is used only in Allocate,
where it holds information regarding NAMELIST items temporarily during the allocation of storage for the NAMELIST tables.
The group size for this roll is twelve
byt.es. The format of the group is:
4 bytes

r-----------------------------------------,
I<------------variable name---------------I
r-·------------------T--------------------i

1--·-----------------> 1

0

1

~--.------------------~-------------------~

1L__________________________________________
pointer
JI
where the pointer indicates the
group
defining the variable on either the SCALAR
or ARRAY roll.
Appendix B:

Rolls Used in the Compiler

155

ROLL 49:

4 bytes

COMMON NAME TEMP ROLL

r------------------------------T----------,
I
area code
1 ESD #
1

This roll is used only in Allocate,
where it holds the information from the
COMMON NAME roll temporarily.
The group
size for the COMMON NAME TEMP roll is
twelve bytes. The format of the group is
therefore identical to that of the COMMON
NAME roll:
4 bytes

r----------·-------------------------------,

I<--------------block name----------------I
~--------------------T--------------------~
1------------------->1
0
1
I----------------.----~--------------------~

1

COMMON DATA pointer

1

l ______________ ._________________________ J

~------------------------------~---------i

address
lI _________________________________________
JI
where the area code indicates the control
section in which the variable or constant
is contained. The ESD number governs the
modification of the location by the linkage
editor, and the address is the location
requiring modification.
Information is placed on this roll by
both Allocate and Exit, and the RLD cards
are written from the information by Exit.
The entries made on the RLD roll by Allocate concern the NAMELIST
tables;
all
remaining entries are made by Exit.

where the COMMON DATA pointer pOints to the
list of variables in the COMMON block.
ROLL 52:
ROLL 50:

COMMON ALLOCATION ROLL

EQUIV AI.LOCATION ROLL

This roll is used only during Allocate,
and is not. used in any other phase of the
compiler. When the allocation of storage
for EQUIVALENCE variables has been completed, the information which has been
produced on the GENERAL ALLOCATION roll is
moved to this roll. The group size for the
EQUIV ALLOCA'TION roll is twelve bytes. The
format of the group is, therefore, identical to tha·t on the GENERAL ALLOCATION
roll:
4 bytes

.-----------------------------------------,

I<---------------variable-----------------I

I-----------------------T------------------ --~
I-------name--------> I
displacement
I

This roll is used only in Allocate and
is not used in any other phase of the
compiler.
When the allocation of COMMON
storage has been completed, the information
which has been produced on the GENERAL
ALLOCATION roll is moved to this roll. The
group size for the COMMON ALLOCATION roll
is twelve bytes. The format of the group
is, therefore, identical to that on the
GENERAL ALLOCATION roll:
4 bytes

r-----------------------------------------,
I<---------------variable-----------------I
~--------------------T--------------------i

I-------name-------->I

displacement

I

~--------------------~-------------------i

I

base table pointer
lI _________________________________________
J

~--------------------~-------------------~

I _________________________________________
base table pointer
L
JI
where the base table pointer indicates the
group on the BASE TABLE roll which will be
used for references to the variable. The
displacement is the distance in bytes from
the location indicated in the BASE TABLE
roll group to the location of the variable.

where the base table pointer indicates the
group on the BASE TABLE roll which will be
used for references to the variable.
The displacement is the distance in
bytes from the location indicated in the
BASE TABLE roll group to the location of
the variable.

ROLL 52:
ROLL 51:

This roll is used only in Allocate and
Exit; it is not used in Parse. In both
Allocate and Exit, the roll holds the
information requir·ed for the production of
RLD cards. The group size for the RLD roll
is eight bytes. The group format is:
156

LOOP CONTROL ROLL

RLD ROLL
This roll is created by Unify and is
used by Gen. The information contained on
the roll indicates the control of a loop.
The group size for the LOOP CONTROL roll
is twelve bytes.
The format of the LOOP
CONTROL roll group in Unify and Gen is:

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
4 bytes

r-----------T-----------------------------,
I traits
I
coefficient
]
t-----------L-----------------------------~
I register (this loop)
I

t-----------------------------------------~

JI
1L _________________________________________
base or register (outer loop)

where the first byte of the first word
(traits) indicates whether the coefficient
is initiated by a direct load.
The remaining three bytes is the coefficient, which
is the multiplier for the induction variable.
The second four bytes is the register where the coefficient is required. The
base is the source of initialization of the
register; it can be either a constant,
register, or an address.

This roll is first used in Parse, where
the FORMAT statements are placed on it.
See Appendix D for the description of the
encoding of the FORMAT statement.
Each group of the FORMAT roll is in the
form of a plex (the group size is given in
word 0).
The configuration of a FORMAT
group in Parse is:

which, taken together, indicate the beginning location of the FORMAT statement.
These groups are packed to the BASE of the
roll;
that is,
this information for the
first FORMAT appears in the first two words
on the roll, the information for the second
FORMAT appears in words 3 and 4, etc.
The LBL roll group which defines the
label of the FORMAT statement holds a
pointer to the displacement recorded for
the statement on this roll.
The FORMAT roll is retained in this form
for the remainder of the compilation.

This roll is created by Parse as each
appropriate array reference is encountered.
The array reference indicated includes subscripts
(one or more)
which
use
the
~nstruction
variable in a linear fashion.
Unify uses the contents of the roll.
The group size of the SCRIPT roll is 16
bytes,
plus an additional 4 bytes for each
DO loop that is open at the point of the
array reference represented by the entry.
The group format of the SCRIPT roll in
Parse and Unify is as described for the
NONSTD SCRIPT roll.

4 bytes

r-----------------------------------------,

]
size of the group
I
~-----------------------------------------~
I
pointer to the LBL roll
]
~-----------------------------------------~
J
number of bytes in the FORMAT
I
t-----------------------------------------~

J
I
I
I
L
I_________________________________________ J1

Word Q contains a value which indicates the
number of words in the group on the roll.
The pointer to the LBL roll points to the
label of the corresponding FORMAT statement. 'I'he next word gives the number of
bytes of storage occupied by this particular FORMAT statement.
The ellipses denote
that the encoded FORMAT follows this control informatiDn.
In Allocate, the FORMATs are replaced by
the following:
4 bytes

r--------------------T--------------------,
0
I
displacement
I

I

t--------------------L--------------------~
J~
~L _________________________________________
base table pointer

RO~L

55:

LOOP DATA ROLL

This roll contains the initializing and
terminating data, and indicates the induction variable and the nesting level of the
particular loop from which this entry was
created.
The roll is created in Parse at the time
that the loop is epcountered.
rhe group
size of the LOOP DATA roll is 20 bytes.
The group format of the roll in Parse is:
4 bytes

r---------T-------------------------------,
i
TAG
I
nest level
I
~-_-------i-------------------------------~

1

pointer to induction variable

I

tLt-----------------------------------------~
pointer to n 1 (initial value>
__________________________________________
JI
where the TAG byte contains a X'80' when an
inner DO loop contains a possible extended
range.
The X'80' is placed there by Parse
and tested by Gen.
The Gen phase then
produces object code to save general registers 4 through 7 at the beginning of this
DO loop so that the registers are not
Appendix B:

Rolls Used in the Compiler

157

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
altered in the extended range. The next
three bytes indicate the nest level of the
loop.
The second word is a pointer to the
SCALAR roll group which describes
the
induction variable. The third word of the
group points to the initializing value for
the inductio:n variable, which may be represented on ·the FX CONST roll or the SCALAR
roll.
During the operation of the Unify phase.,
the roll is completed with pointers to the
LOOP CONTRO:L roll. During Unify, the LOOP
CONTROL roll is also created; therefore,
insertion of the pointers is done while the
loop control data is being established.

4 bytes

r----------T-----------------------·------,
I traits I
frequency
I
I.----------~-----------------------~------~
ARRAY REF pointer
I
.----------------------------------~------i
J
ARRAY pointer
I

.-----------------------------------------i
I
ARRAY offset pointer
.-----------------------------------------i
I
induction variable coefficient
I
~

.-----------------------------------------~
J
induction variable coefficient
I

(nest level = 2)
I
.-----------------------------------------~
J

I

I
I
I
I
.-----------------------------------------i
i
induction variable coefficient
I
JI
IL_________________________________________
(nest level = n)
J

The following illustration shows the
configuration of the LOOP DATA roll as it
is used in Unify:

See the NONSTD
description.

SCRIPT

roll

for further

4 bytes

r-----------------------------------------,
I
nest level
I

t----------------·------------------------iI

1 SCALAR pointer (induction variable)

.-----------------------------------------i
] FX CONST pointer or SCALAR pointer
J
~-----------------------------------------i
] LOOP CONTROL pointer (start init.)
I

t-----------------------------------------i

JI
JL _________________________________________
LOOP CONTROL pointer (end init.)

This roll is used only in Gen, where it
handles subscripts (array references) which
are not handled by Unify. The group size
for the ARRAY PLEX roll is twelve bytes.
The format of the group on the roll is:
4 bytes

The last two words (eight bytes) of the
group are inserted by unify. These pointers point to the first and last LOOP
CONTROL roll groups concerned with this
loop.

This roll is a duplicate of the SCRIPT
roll. The contents of the SCRIPT roll are
transferred to the PROGRAM SCRIPT roll in
Parse as each loop is closed. Each loop is
represented by a reserved block on the
roll.
The group size of the PROGRAM SCRIPT
roll is 16 bytes, plus an additional 4
bytes for each nest level up to and including the one containing the reference represented by the entry.
The format of the
PROGRAM SCRIPT roll group in Parse and
Unify is as follows:
158

Ir-----------------------------------------,
pointer to array
I
~-----------------------------------------~
J
pointer to index
I

.-----------------------------------------i
I
displacement
t
L_________________________________________ J

The pointer in the first word of the group
points to the ARRAY REF roll when the
~ubscript used contains DO dependent linear
subscripts (which are handled by Unify) and
non-linear
variables.
Otherwise,
the
pointer refers to the ARRAY roll.
The second word of the group holds a
pointer to the index value to be used in
the subscripted array reference.
This
pointer points to general register 9 on the
FX AC roll if the index value has been
loaded into that register, if the index
value has been stored in a temporary location, the pointer indicates the proper
location on the TEMP AND CONST roll1 if the
index value
is a fixed
constant, the
pointer indicates the proper group on the
FX CONST roll.
When the information in
this word has been used to construct the
proper instruction for the array reference,
the word is cleared to zero.

The displacement,
in the third word of
the group, appears only when the first word
of the group holds a pointer to the ARRAY
roll.
otherwise,
the displacement is on
the ARRAY REF roll in the group indicated
by the pointer in the first word, and this
word contains the value zero.
This value
is the displacement value to be used in the
instruction
generated
for
the
array
reference.

o

1 1
1 2

1 1
5 6

1 2
9 0

3
1

r---------------T----T----T---------------,

lop code
IR1 IR2 I
offset
I
~---------------~---~---~--------------~
I
0 or TEMP 1\.ND CONST roll
I
I
pointer
I
~-----------------------------------------i
I
0 or TEMP ~,ND CONST roll
I
I
pointer
I

.-----------------------------------------~

I

lIARRAY
_________________________________________
J
pointer

ROLL 57:

ROLL 58:

ARRAY REF ROLL

Pointers to this roll are inserted into
the Polish notation by Parse. At the time
that these pointers are established, the
ARRAY REF roll is empty. The pointer is
inserted into the Polish notation when an
array
reference
includes linear loopcontrolled subscripts.
The roll is initially created by Unify
and completed by Gen. The group size of
the ARRAY REF roll is 16 bytes. The format
of the ARRAY REF roll group as it appears
in Unify is as follows:

o

1 1

1 1

1 2

5 6

1 2
9 0

3
1

r---------------T----T----T---------------,

I
IR1
IR~
I
offset
I
~--------------~----~----~---------------~
I
pOinter to register (R 1 ) or to the
I
I
TEMP AND CONST roll
I
~----------------------------------------~
I
pointer to register (R~) or to the
I
I
TEMP AND CONST roll
I
~----------------------------------------~
pOinter to the ARRAY roll
lI _________________________________________
JI

This roll contains relocatable
tion that is to be used by Exit.

informa-

Unify creates the roll which contains a
pointer to the TEMP AND CONST roll and an
area code and. displacement. The pointer
indicates an entry on the TEMP AND CONST
roll which must be relocated according to
the area code.
The displacement is the
value
to be placed in that temporary
storage and 'constant area location.
The group size of the ADR CONST roll is
eight bytes.
The format of the ADR CONST
roll group in Unify is:
4 bytes

r--------------------T--------------------,
I
area code
I
displacement
I
.--------------------~-------------------i
I ________________________________________
TEMP AND CONST pointer
l_.
JI
These groups are constructed by Unify to
provide additional base table values for
indexing.

ROLL 59:
The first word of the group contains thf
low 20 bits of an instruction which i~
being formatted by the compiler. R1 and R2
are the two register fields to be filled
with the numbers of the registers to be
used for the array reference. Word 2 of
the group contains the pointer indicating
the register to be assigned for R1 • Word 3
of the group indicates the register R2 •
When R1 and R~ have been assigned, the
second and third words are set to zero.

ADR CONST ROLL

AT ROLL

This roll is constructed in Parse and
used in Gen.
It is not used in the
remaining phases. The group size for this
roll is twelve bytes. The format of the
group is:
4 bytes

r-----------------------------------------,
AT label pointer
I

I

~---------------------------------------i
I
debug label pointer
I
.------------------------------------------~

Gen completes the entry by adding the
operation code to the instruction that is
being built.
The format of an ARRAY REF
roll group in Gen is:

return label pointer
lI __________________________________________
JI
All three of the pointers in the group
point to the LBL roll. The first points to
the label indicated in the source module AT
Appendix B:

Rolls Used in the Compiler

159

statement.
The second points to the made
label supplied by the compiler for the code
it has written to perform the debugging
operations.
The third label pointer indicates the made label supplied for the point
in the code to which the debug
code
returns; that is, the code which follows
the branch to the debugging code.

ROLL 62:

GENERAL ALLOCATION ROLL

This ~oll is used only during Allocate,
and is not used in any other phase of the
compiler. During the various allocation
operations performed by this phase, the
roll holds the information which ultimately
resides on the remaining ALLOCATION rolls.
The group size for the GENERAL ALLOCATION
roll is twelve bytes. The format of the
group is:
4 bytes

ROLL 60:

SUBCHK ROLL

This roll is initialized in Parse and
used in Allocate.
It does not appear in
later phases. The group size for this roll
is eight bytes._ The format of the group
is:
t~ bytes

r------------------------------------------,

I <-------------variable name--------------I

~---------------------T-------------------~

1-------------------->
L ____________________ I ____________________
0
JI
~

Each group holds the name of an array
listed in the SUBCHK option of a source
module DEBUG statement.

ROLL 60:

NAMELIST MPY DATA ROLL

This roll is set up during the construction of the NAMELIST tables in Allocate.
In Exit, the roll is used to complete the
information in the NAMELIST tables. The
roll is not used in the other phases of the
compiler. The group size for the NAMELIST
MPY DATA roll is eight bytes. The format
of the group on this roll is:

r-----------------------------------------,
I<---------------variable-----------------I
~-------------------T---------------------~

I-------name------->I

displacement

I

~-------------------i---------------------1

I_________________________________________
base table pointer
L
JI
where the base table pointer indicates the
group on the BASE TABLE roll which will be
used for references to the variable.
The displacement is the distance in
bytes from the location indicated in the
BASE TABLE roll group to the location of
the variable.
During the allocation of COMMON, the
third word of each group holds a relative
address until all of a COMMON block has
been allocated, when the relative address
is replaced by the pointer as indicated
above.
During the allocation of EQUIVALENCE variables, relative addresses within
the EQUIVALENCE variables are used and then
replaced by pointers as for COMMON.

ROLL 62:

CODE ROLL

This
roll
holds
the
object code
generated by the compiler, in binary. This
roll is first used in Gen, where the object
code for the entire source module is built
up on the roll.

4 bytes

r-----------·------·-----------------------,

I

multiplier constant
I
~-----------------------------------------~
JI
IL_________________________________________
address

The multiplier constant refers to an
array dimension for an array mentioned in a
NAMELIST list. The address is the location
in a NAMELIST table at which a pointer to
the multiplier constant must appear.
In
Exit, the constant is placed in the temporary storage and constant area of the
object module, and a TXT card is punched to
load its address into the location specified in the second word of the group.
160

The group size for the CODE roll is
eight bytes.
Two types of groups are
placed on the roll during the operations of
Gen.
The first type of group is added to
the roll by the instructions IEYBIN, IEYBIM
and IEYBID. In this type of group, the
binary instruction is left-justified in the
eight bytes. When the instruction occupiesonly two bytes, the first word is completed with zeros.
When the instruction
occupies two or four bytes, the second word
of the group holds a pointer to the defining group for the operand of the instruction.
When the instruction is a 6-byte
instruction, the last two bytes of the
group contain zero, and no pointer to the

operand appears. A unique value is placed
on the CODE roll by these instructions to
indicate the beginning of a new control
section.
The second type of group entered on the
CODE roll appears as a result of the
operation of one of the instructions IEYPOC
and IEYMOC.
These groups do not observe
the a-byte group size of the roll, but
rather begin with a word containing a
special value in the upper two bytes; this
value indicates an unusual group.
The
lower two bytes of this word contain the
number of words in the following information. This word is followed by the binary
instructions.
The object module code is written out
from this roll by the Exit phase of the
compiler.

WORK ROLL
The WORK roll is often used to hold
intermediate values.
The group size for
this roll is four bytes. The name WO is
applied to the bottom of the WORK roll (the
last meaningful word), W1 refers to the
next-to-bottom group on the WORK roll, etc.
In the POP instructions these names are
used liberally, and must be interpreted
with care. Loading a value into Wo is
storage
into the next available word,
(WRKADR) + 4, lIDless specifically otherwise
indicated, while storage from WO to another
location involves access to the contents of
the last word on the roll,
(WRKADR).
WRKADR is normally incremented following a
load operation and decremented following a
store.

EXIT ROLL
ROLL 63:

AFTER POLISH ROLL

This
roll is constructed in Parse,
remains untouched until Gen, and is destrayed in that phase.
The AFTER POLISH roll holds the Polish
notation produced by Parse. The Polish for
one statement is moved off of the POLISH
roll and added to this roll when it is
completed; thus, at the end of Parse, the
Polish
notation for the entire source
module is on this roll.
In Gen, the Polish notation is returned
to the POLISH roll from the AFTER POLISH
roll for the production of object code. At
the conclusion of the Gen phase, the roll
is empty and is no longer required by the
compiler. The group size for this roll is
four bytes.

WORK AND EXIT ROLLS
Because of the nature and frequency of
their use, the WORK roll and the EXIT roll
are assigned permanent storage locations in
IEYROL, which is distinct from the storage
area reserved for all other rolls.
As a
result, these rolls may never be reserved
and are manipulated differently by the POP
instructions.
The group stats and the
items BASE and TOP are not maintained for
these rolls.
The only control item maintained for these rolls corresponds to the
item BOTTOM, and is carried in the general
register WRKADR (register 4) for the WORK
roll and EXTADR (register 5) for the EXIT
roll.

The EXIT roll holds exit addresses for
subroutines and, thereby, provides for the
recursion used throughout the compiler.
The ANSWER BOX is also recorded on the EXIT
roll. The group size for the EXIT roll is
twelve bytes. The first byte is the ANSWER
BOX.. The remaining information on the roll
is recorded when a subroutine jump is
performed in the compiler code; it is used
to return to 1:he instruction following the
jump when the subroutine has completed its
operation.
The values placed on the EXIT roll
differ, depending on the way in which the
subroutine jwnp is performed. As a result
of ,the interpretation of the IEY.JSB POP
ins'truction, 1:he last three bytes of the
first word contain the location of the
IEYJSB plus two (the location of the POP
instruction following the
IEYJSB,
the
return point); the second word of the group
holds an address within the IEYJSB subroutine; the third word contains the location
of the global label for the routine from
which the subroutine jump was made plus two
(the value of LOCAL JUMP BASE in that
routine).
As an example of how a subroutine jump
is accomplished by means of machine language instructions, the following instructions are used:
L

TMP,G0052J

BAL

ADDR,JSB STORE IN EXIT

to replace the POP instruction
IEYJSB
Appendix B:

G0052J
Rolls Used in the Compiler

161

In this case, no value is placed in the
last three bytes of the first word; the
second word holds the address of
the
instruction following the BAL; the third
word holds the location of the global label
immediately preceding the BAL plus two (the
value of POPADR when the jump is taken,
which is also the value of LOCAL JUMP BASE,

162

the base address to be used for local jumps
in the routine from which the subroutine
jump was made>.
On return from a
subroutine,
these
values are used to restore POPADR and LOCAL
JUMP BASE and they are pruned from the EXIT
roll.

APPENDIX C:

This appendix shows the format of the
Polish notation which is generated by the
compiler for each type of statement in the
FORTRAN IV (G) language.

GENERAL FORM
The format of the
Polish
notation
depends on the statement type, but always
terminates with the control driver which
indicates the type of statement:

~------------------------------~

r------------------------------'\
•
I Polish
•
•

ARRAY REFERENCES
The Polish notation
for
an
array
reference whose subscripts are all linear
functions of DO variables consists simply
of a pointer to the appropriate group on
the ARRAY REF roll.
The Polish notation
generated for all other references to an
array element is:
4 bytes

r-----------------------------,I
larray driver
~-----------------------------~

4 bytes

I
I
I

POLISH NOTATION FORMATS

for
I statement

I

~~~~~~=~~~~~=============~!POliSh
I

•

I subscript 1

I

•

I

I

~-----------------------------~
~-----------------------------~
I multiplier
I

~------------------------------~

~-.----------------------------~

~------------------------------~

~------------------------- _ _ _ _ _ ~I

Icontrol driver

Istatement
number
L
______________________________
JI
The statement number is an integer whose
value is increased by one for each statement processed. This value is used only
within the compiler.

for

largument driver

I

r==============~=:============1{=~~~~i~~r2

~-----------------------------i~

~-----------------------------~
I multiplier
I
~-.----------------------------~

LABELED STATEMENTS

largument driver

I

~-·---------------------------i

For labeled statements, a pointer to the
label is inserted between the control driver and the statement number:
4 bytes

r------------------------------'\
•
I

~------------------------------~

I
I

•

I

•

I Polish for
I statement

~-----------------------------~

~-----------------------------~ ..
Icontrol driver
I
~------------------------------~
I label
I
~------------------------------~

Ipointer to statement label

I

~------------------------------~

I

number
lIstatement
______________________________
J

The label information is not included in
the following descriptions of the Polish
notation for individual statement types.

I
I

I
I

t:::::::::::::~::::::::::::::j!:~;!~~i~~r7

~----------------------------~.

I multiplier
I
~-----------------------------~
largument driver
I
~-----------------------------i
lIdummy
_____________________________
array pointer
JI

The pointer to the array may indicate
either (1) the ARRAY roll, when none of the
subscripts used in the array reference
are
linear functions of DO variables, or
(2)
the ARRAY REF roll, when some, but
not
all, of the subscripts are linear functions
of DO variables. The subscripts for which
Polish notation appears are those which are
Appendix C:

Polish Notation Formats

163

not linear functions of DO variables. Only
the required number of subscripts appear.

LOGICAL IF STATEMENT

The multiplier following each subscript
is the multiplier for the corresponding
array dimension. This value is an integer
unless the array is a dummy including dummy
dimensions which affect this array dimension; in this case, the multiplier is
represented by a pointer to the TEMP AND
CONST roll.

The Polish
statement is:

notation generated for this

4 bytes
r------------------------------'~

~------------------------------~
I
•
I Polish for
I
•
, logical

~~------------:---------------J\expression

t==============================~!~'

ENTRY STATEMENT

I

The Polish notation
ENTRY statement is:

generated for the

•

I Polish for

l--------------:---------------J

~------------------------------i

I

Ilogical IF driver

If·

bytes

r-----------------------------------------,
Ipointer to ENTRY name
,

~~~tement

~------------------------------~

Istatement
number
L______________________________
JI

~-----------------------------------------~

IENTRY driver

,

~----------------------------------------~

Istatement
number
L
_________________________________________
J,
RETURN STATEMENT
The pointer points to
roll ..

the

ENTRY

NAMES
The following Polish notation
duced for the RETURN statement:

is

pro-

4 bytes

r-----------------------------------------,,
,pointer to I

ASSIGN STATEMENT
The Polish notation
ASSIGN statement is:

generated for the

~-----------------------------------------~
IRETURN driver
I
~-----------------------------------------~

Istatement
number
L
_________________________________________
JI

4 bytes

r-----------------------------------------,,
Ipointer to label
~----------------------------------------i

Ipointer to variable

The pointer to I does not appear if the
statement is of the form RETURN.

I

~-----------------------------------------~

IASSIGN driver

,

~-----------------------------------------~

ARITHMETIC AND LOGICAL ASSIGNMENT STATEMENT

Istatement
number
L
_________________________________________
JI
The Polish notation
statement is:
ASSIGNED GO TO STATEMENT
The Polish notation generated
statement is:

for

this

4 bytes

r------------------------------,
lpointer to variable to be set I
for

this

4 bytes

r----------------------------------------,I

Ipointer to variable

~----------------------------------------i

lassigned GO TO driver
I
~-----------------------------------------i
,statement
number
L
__________________________________________
JI

164

produced

~--------------------------~---+

t--------------~---------------1i Polish

for

I

•

I~' right side

I

•

I

~------------------------------i

~-----------------------------i
,assignment driver
I
~------------------------------i
Istatement
number
L______________________________
JI

The Polish notation for the right side
of the assignment statement is in the
proper form for an expression, and includes
array references where they appear in the
source statement. The variable to be set
may also be an array element; in this case,
the pointer to the variable to be set is
replaced by the Polish notation for an
array reference.

notation

The following Polish
duced for this statement:

notation is pro-

4 bytes

r------------------------------, ,

t--------------~---------------1JpOliSh

for

I

.

I~expression

I

·

1\

~------------------------------~
~------------------------------i

~~~~:=:-~~-~:-----------------~lbranch
lpointer to x2
I points

UNCONDITIONAL GO TO STATEMENT
The Polish
statement is:

ARITHMETIC IF STATEMENT

produced for this

~------------------------------~

I

lpointer to x3

~------------------------------~.

Ipointer to label next stmt.

I

~------------------------------~

4 bytes

r-----------------------------------------,I
Ipointer to label
~----------------------------------------~
IGO TO driver
I
~-----------------------------------------~
Istatement
number
L
_________________________________________
JI

I

IIF driver

r------------------------------~

I

Istatement
number
L
______________________________
J

The label of the next statement is
inserted following the IF driver because
the next statement may be one of the branch
points referenced; if it is, code will be
generated to fall through to that statement
in the appropriate case(s).

COMPUTED GO TO STATEMENT
DO STATEMENT
The following Polish notation
duced for this statement:

is

proThe following is the Polish notation
produced for the statement DO x i = ml, m2,
m3:

4 bytes

r------------------------------,I
Ipointer to xl

4 bytes

r-----------------------------------------,I
lpointer to M2 (test value)

~-----------------------------i
Ipointer to x2
I
~-----------------------------i
I
I branch
I
I points

Ipointer to LOOP DATA roll

I

~------------------------------------------i

I

~------------------------------~
lpointer to xn
I
~------------------------------~
Inumber of branch points
I
~------------------------------i
Ipointer to variable
I
~-----------------------------~
Icomputed GO TO driver
I
~------------------------------i
LIstatement
______________________________
JI
,number

r-----------------------------------------iI

Ipointer to M3 (increment)

~-----------------------------------------i

I
I

lpointer to LBL roll

~-----------------------------------------i

I

IDO driver

~-----------------------------------------~

I

Istatement number
L--_______________________________________
J

The pointer to m3 appears, even
increment value is implied.

Appendix C:

if

the

Polish Notation Formats

165

DATA STATEMENT AND DATA IN EXPLICIT
SPECIFICATION STATEMENTS

CONTINUE STATEMENT
The Polish
statement is:

notation

produced for this

4 bytes

r-----------------------------------------,I
ICONTINUE driver
~----------.-------------------------------~

,statement
number
L
_________________________________________
JI

For each statement (DATA or Explicit
specification) in which data values for
variables are specified, a Polish record is
produced. This record ends with a DATA
driver and a statement number. For each
variable initialized by the statement, the
following appears:

PAUSE AND STOP STATEMENTS
4 bytes

The Polish notation produced
statements is:

for

these

r-----------------------------------------,I
lpointer to variable
~-----------------------------------------~

IL________________________________________
offset
JI

4 bytes

r---------------·--------------------------,

I

,pointer to constant

~----------------------------------------~

IPAUSE or STOP driver

I

~-----------------.------------------------~

Istatement number

I

The offset is the element number at which
initialization begins; if it does
not
apply, this word contains the value zero.

L _________________________________________ J

For both the PAUSE statement and the
STOP statement, the constant appears on the
LITERAL CONST roll, regardless of
its
nature in the source statement.
If no
constant appears in the statement, the
pointer to the constant points to the
literal constant zero.

This information is followed by the pair
of groups

END STATEMENT

r---------------------------------·--------,

4 bytes

Irepetition count

The Polish notation
END statement is:
iJ

generated

for

the

bytes

r----------------------------------------,I
lEND driver

I

~----------------------------------------~

Ipointer
to constant
L
_________________________________________
JI

or, when the constant is literal, the three
groups

~-----------------------------------------~

,statement
number
L ____________
._____________________________ JI

4 bytes

r-----------------------------------------,
Irepetition count
I
~-----------------------------------------~
Ipointer to constant
I
~-----------------------------------------~
Inumber of elements
L-________________________________________
JI

BLOCK DATA STATEMENT
The Polish notation
BLOCK DATA statement is:

generated for the

4 bytes

r-----------------------------------------,

'BLOCK DATA driver
I
~----------------------------------------~
Istatement number
L-________________________________________
JI

166

where the last group indicates the number
of elements of an array to be filled by the
literal constant.
For array initialization, one or more of the "constant" groups
may appear.

Form Y28-6638-1
Page Revised 1/23/69 by TNL Y28-6829
I/O LIST

4 bytes

r------------------------------,I

Ipointer to a (data set)
The Polish notation for an I/O List
contains pointers to the variableS in the
list, Polish notation for array references
where they appear, and pointers and drivers
to indicate implied DO loops.

.------------------------------~

I

IFORMAT driver

.------------------------------~
Ipointer to FORMAT

I

.------------------------------~

I

IEND= driver

The I/O list
«C(I),I=1,10),A,B)
for
example, results
Polish notation:

in

the

following

4 bytes

,----------------------------------------,
Ipointer to Ha (test value)
I
r----------------------------------------i
Jpointer to H3 (increment)
I
.-----------------------------------------i
Ipointer to LOOP DATA roll
I
.-----------------------------------------i
limplied DO driver
I
r----------------------------------------i
Jpointer to'C
I
.-----------------------------------------i
11 (number of subscripts)
J
r------~--------------------------------~I

Ipointer to I (subscript)

r----------------------------------------iI
.-----------------------------------------i
larray driver
I
.-----------------------------------------i
IIOL DO Close driver
I
.-----------------------------------------i
lpointer to A
I
largument driver

r----------------------------------------~
L
________________________________________
JI
lpointer
to B
The area between, and including, the
implied DO driver and the array driver is
an array reference, as it would appear
wherever C(I) was referred to in source
module statements.

INPUT STATEMENTS
The following paragraphs discuss the
Polish notation produced for all forms of
the READ statement except direct access.

FORMATTED READ
For the form READ (a,b) list, the formatted READ, the Polish notation generated
is:

.------------------------------i
Ipointer to END label
I
.------------------------------i
IERR= driver
I
.------------------------------i
Ipointer to ERR label
I
.------------------------------i

t~~:~~~=~~::::~:::::::::::::::~lpOlish
L-------------~---------------J
t------------------------------i

for

I/O list

Icode word

,

I

,

.------------------------------i
IIBCOH entry, formatted READ
,
t------------------------------i
,pointer to IBCOH
I
.------------------------------i
IREAD/WRITE flag. zero= WRITE, ,
nonzero= READ

.------------------------------i
IREAD WRITE driver
I
.------------------------------i
L _____________________________
lstatement
number
I
J

The pointer to the FORMAT points either
to the label of the FORMAT statement or to
the array in which the FORMAT is stored.
The END= and ERR= drivers and the pointers
following them appear only if the END and
ERR options are used in the statement;
either one or both may appear, and in any
order with respect to each other.
If no
I/O list appears in the statement, the
Polish for the I/O list is omitted, but the
IOL driver appears nonetheless.
The code word contains zero in its
high-order three bytes, and,
in its loworder byte, a unique code specifying the
operation and unit for the input/output
statement.
This code word distinguishes
among the various READ statements and is
inserted in the code produced for them.
Input/output operations are performed by
the RUNTIME routines.
IBCOM is a transfer
routine in RUNTIME through which all input/
output except NAMELIST is performed.
The
IBCOH entry for formatted READ indicates an
entry point to this routine.
(See Appendix
D for further discussion of IBCOM.) The
pointer to ISCOM points to the routine on
the GLOBAL SPROG roll.
Appendix C:

Polish Notation Formats

161

Form Y2B-663B-1
Page Revised 7/23/69 by TNL Y28-6829
NAMELIST READ

4 bytes

r------------------------------,
Ipointer to a (data set)
I

For the' form READ (a, x), the NAMELIST
READ, the following changes are made to the
Polish notation given above:

~------------------------------i

IFORMAT driver
I
~------------------------------~
Ipointer to FORMAT
I

1.

The FORMAT driver
NAMELIST driver.

a

~------------------------------i
IEND= driver
I

2.

The pointer to the FORMAT 1s replaced
by a pointer to the NAMELIST.

3.

The code word value is changed.

1pointer to END label
I
~------------------------------i
IERR= driver
I
~------------------------------~
Ipointer to ERR label
I

4.

The IBCOM entry is replaoed by the
value
zero,
since NAMELIST input/
output is not handled through IBCOM.

is

replaced

by

5.

The pointer to IBCOM is replaced by a
pointer to the NAMELIST READ routine.

6.

No I/O list may appear.

UNFORMATTED READ

~------------------------------~

~------------------------------i
IIOL driver

t

II

r::::::::::::::~::::::::::::::: ~~~i~~s! or

.------------------------------i~
.------------------------------~
Icode word

I

.------------------------------~
JIBCOM entry, formatted WRITE

For the form READ (a) list,
the unforIt'atted READ I' the following changes are made
to the Polish notation given above:
1.

The FORMAT driver is removed.

2.

The

3.

The IBCOM ent.ry,
formatted READ,
is
replaced by the IBCOM entry, unformatted READ.

pointer to the FORMAT is removed.

READ STANDARD UNIT
For the form READ b, list, the standard
unit READ statement, the following changes
are made to the Polish notation given
above:
1.

No END: or ERR= drivers may appear,
nor may the corresponding pointers to
labels.

2.

The code word value is changed.

OUTPUT STATEMENTS
The fcllowing paragraphs discuss the
Polish notation produced for all forms of
the WRITE statement except direct access,
and for the PRINT and PUNCH statements.
PORMATTED WRITE
For the form WRtTE
formatted
WRITE,
the
generated is:
168

(a,b) list, the
Polish notation

I

.------------------------------i
Ipointer to IBCOM
I

.------------------------------~
IREAD/WRITE flag, zero= WRITE, I
I

nonzero= READ

I

.------------------------------i
IREAD WRITE driver
I
.------------------------------i
L _____________________________
Jstatement
number
I
J

The pointer to the FORMAT points either
to the label of the FORMAT statement or to
the array in which the, FORMAT is stored.
The END= and the ERR= drivers and the
pointers following them appear only if the
END and ERR options are used in the statement; either one or both may appear, and in
any order relative to each other.
If no
I/O list appears in the statement, the
Polish for the I/O list is omitted, but the
IOL driver appears nonetheless.
The code word contains zero in its
high-order three bytes, and, in its loworder byte, a unique code specifying the
operation and unit for the input/output
statement. This code word distinguishes
among the various output statements and is
inserted in the code produced for them.
Input/output operations are performed by
the RUNTIME routines.
IBCOM is the initial
entry of a transfer vector in IHCFCOMH
through which all input/output except NAMELIST is performed.
(IBCFCOMH is further
discussed in Appendix F.) The pointer to

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
IBCOM points
SPROG roll.

to the routine on the GLOBAL

NAMELIST WRITE

1.

No END= or ERR= drivers may appear,
nor may the corresponding pOinters to
labels.

2.

The code word value is changed.

For the form WRITE (a, x), the NAMELIST
WRITE,
the following changes are made to
the Polish notation given above:
1.

The FORMAT 4river
NAMELIST driver.

is

replaced

by

a

2.

The pointer to the FORMAT is replaced
by a pointer to the NAMELIST.

3.

The code word value is changed.

4.

The IBCOM entry is replaced by the
value
zero,
since NAMELIST input/
output is not handled through IBCOM.

5.

The pointer to IBCOM is replaced by a
pointer to the NAMELIST WRITE routine.

6.

No I/O list may appear.

UNFORMATTED WRITE
For the form WRITE (a) list, the unformatted WRITE, the following changes are
made to the Polish notation given above:
1.

The FORMAT driver is removed.

2.

The

3.

The IBCOM entry, formatted WRITE, is
replaced by the IBCCM entry, unformatted WRITE.

The following paragraphs discuss the
Polish notation produced for the direct
access input/output statements.

READ, DIRECT ACCESS
For the forms READ (a'b,b) list and READ
(a'r) list, the following Polish notation
is generated:
4 bytes

r------------------------------,
lpointer to a (data set)
I
.------------------------------~

Idirect 10 driver
I
~------------------------------~,

r--------------~---------------I(~Olish

I------------------------------~~
.------------------------------~

lexpression driver
pointer to the FORMAT is removed.

PRINT
The Polish notation generated for the
form PRINT b,
list is identical to that
given for the formatted WRITE statement,
with the following changes:
1.

2.

No END= or ERR= drivers may appear,
nor may the corresponding pointers to
labels.
The code word value is changed.

PUNCH
The Polish notation for the statement
PUNCH b, list is as given for the formatted
WRITE with the following changes:

for

I

~------------------------------~
Ipointer to b
I
.------------------------------~

I
.------------------------------~
lpointer to ERR label
I
IERR= driver

.------------------------------~

~~~:~~~~~~::::~:::::::::::::::~!POliSh

for

I I/O list
I
.------------------------------~
.------------------------------~
Icode word
I
I

•

1

•

r------------------------------~

I
.------------------------------~
Ipointer to IBCOM
I
~------------------------------~
JREAD/WRITE flag, zero= WRITE, I
I nonzero= READ
I
.------------------------------~
IREAD WRITE driver
I
IIBCOM entry, READ

.------------------------------~
L
______________________________
JI
Istatement
number

Appendix C:

Polish Notation Formats

169

The END= and ERR= drivers and the pointers following them appear only if the END
and ERR options are used in the source
statement~
either one or both may appear,
and in any order with respect to each
other.
If b does not appear in the source
statement (the second form),
the corresponding pointer does not appear in the
Polish not:ation.,
If the I/O list does not
appear in the source statement, the Polish
notation for the I/O list is omitted from
the Polish, but the IOL driver appears
nonetheless.
The code word contains zero in its
high-order three bytes, and, in its loworder byte, a unique code specifying the
operation and unit for the input/output
statement. This code word distinguishes
the direct access statements from other
input/output statements and is inserted in
the code produced for them.

4 bytes

r---------------------------,
Ipointer to a1
I
.---------------------------~
Ipointer to m1
I
.---------------------------~
Ipointer to 11
I

.---------------------------i
IE, L, or U
I
.---------------------------i
Ipointer to v1
I
.---------------------------i
lpointer to a2
I
.---------------------------i
I
I
I

I
I

I
I

I
I

Ipointer to an

I

I

I

I

file 1 data

file 2 data

.---------------------------i
Ipointer to v2
I
.---------------------------i
.
I
I
.---------------------------~

.---------------------------i
I
I

WRITE, DIRECT ACCESS
The Polish notation produced for the
forms WRITE (a'r,b) list and WRITE (a'r)
list is identical to that produced for the
corresponding forms of the READ, direct
access
s'tatement
with
the
following
exceptions:
1.

The IBCOM e:ntry, READ is replaced by
the appropriate IBCOM entry, WRITE.

2.

The value of the code word is changed.

file n data

I
I
.---------------------------~
Ipointer to vn
I

.---------------------------i
IDEFINE FILE driver
I
.---------------------------i
Istatement number
I
l ___________________________ ~

where the fourth word of each set of file
data holds the BCD character E, L, or U in
the
high-order byte and zeros in the
remaining bytes.

FIND
The Polish notation produced for this
statement is identical to that for an
unformatted direct access READ statement
given above, with the exception that the
code word is changed to indicate the FIND
statement.

The Polish
FILE is:

notation

produced

for

END

4 bytes

r-----------------------------------------,
Ipointer to a (data set)
I
.-----------------------------------------i
IIBCOM entry for END FILE
I
.-----------------------------------------i
Ipointer to IBCOM
I

DEFINE FILE
The form of this statement is:

.-----------------------------------------~
I BSREF driver
I

DEFINE FILE a1 (ml,11,f1,v1),a2
Cm2,12,f2,v2), ••• ,an(mn,1n,fn,vn)

.-----------------------------------------i
Istatement number
I
L_________________________________________ J

The Polish notation produced for it

170

is:

4 bytes

REWIND STATEMENT

r------------------------------,
\ subprogram driver
,

The Polish notation produced for the
REWIND statement is identical to that for
the END FILE statement with the exception
that the IBCOM entry for END FILE is
replaced by the IBCOM entry for REWIND.

~------------------------------~
Ipointer to function name
,
~------------------------------~
Inumber of arguments
I
~------------------------------~
,expression driver
,
~------------------------------~
\

,

BACKSPACE STATEMENT

~------------------------------~

The Polish notation produced for the
BACKSPACE
statement is identical to that
for the END FILE statement, except that the
IBCOM entry for END FILE is replaced by the
IBCOM entry for BACKSPACE.

1

, Polish for

,

,

,

\ argument 1

~------------------------------~
lexpression driver
,
~------------------------------~

,

I

~------------------------------~
I
I Polish for
\
I argument 2

,

The Polish notation
statement function is:

generated

for

a

~------------------------------~

4 bytes

I
I
,

r------------------------------,I
Ipointer to function name
~------------------------------~

I
I
I

~------------------------------~

I

\

,

I
I

, Polish for
\ right side

I
,
,

~------------------------------~

,

I

t------------------------------~
Jexpression driver
I

,

~------------------------------~
\
\
~------------------------------~
Istatement function driver
,
~------------------------------~
number
lIstatement
______________________________
J\

I

~------------------------------~

, Polish for
I argument n
I

~------------------------------~
\expression driver
I'
~------------------------------~
Ipointer
to function name
l ______________________________
J,

This Polish notation is part of the
Polish notation for the expression in which
the function reference occurs.

FUNCTION STATEMENT
The Polish notation
FUNCTION statement is:

produced

for

the

4 bytes

r-----------------------------------------,I
Ipointer to ENTRY name
~-----------------------------------------~

\FUNCTION driver
I
~-----------------------------------------~
,statement
number
l _________________________________________
JI

SUBROUTINE STATEMENT
The Polish notation
SUBROUTINE statement is:

generated for the

4 bytes

where the pOinter points to the ENTRY NAMES
roll.

r-----------------------------------------,,
,pointer to ENTRY name
~-----------------------------------------~

I

ISUBROUTINE driver

.-----------------------------------------i
Istatement number
,

FUNCTION (STATEMENT OR SUBPROGRAM)

g~FEB~NC~-------------------------

The Polish notation generated
reference to a function is:

l - ________________________________________ J

for

a

where the pointer points to the ENTRY NAMES
roll.
Appendix C:

Polish Notation Formats

171

CALL STATEMENT
The Polish notation for the CALL
ment is:

state-

4 byt.es

r------------------------------,
'subprogram: driver
,
~-----------------------------~
Ipointer to subprogram name
,
~-----------------------------~
'number of arguments
,
~----------------------------.-~

'expression driver
,
~-----------------------------~

,

,

representation of them appears in
the
polish notation for the arguments. All
label arguments are grouped together at the
bottom of the Polish as indicated.
If no
label argUments exi.st, the section from the
"pointer to xl" to and including the "computed GO TO driver" does not appear.

DEBUG FACILITY STATEMENTS
The following paragraphs describe the
Polish notation produced for the statements
of the debug facility.

~----------·--------------------1

,
,

, Polish for
, argument 1

,

~-----------------------------1
'expression driver
,

AT

~---------·--------------------1

The Polish notation generated for the AT
statement is:

~---------------~--------------~
,
, Polish for
,
, argument 2

r-----------------------------------------,
,
painter to AT group
,

,
,

,

,

4 bytes

~------------------------------------------i

I

~------------------------------~

,

'expression driver

~-----------------------------------------i

,,
,
,

,

,,,
,

~--------------------------------1

~----------------·-------------1
~-----------·------·-------------1

,

,
,

I

statement number

L __________________________________________ J

The painter paints to the AT roll group
which contains the information relating to
the AT statement rE!presented by the Polish
notation.

, Polish for
I argument n

,

~-----------·------·-------------1

lexpression driver
,
~-----------------------------~
,pointer to subprogram name
,
~----------------·-------------1

Ipointer to xl
I
~------------------------------~
,pointer to x2
I
~------------------------------i
,
, label
,
I arguments

,

,

AT driver

i

TRACE ON
The Polish notation
TRACE ON statement is:

generated

for

the

4 bytes

r-----------------------------------------,
,
TRACE ON driver
,
~-----------------------------------------i
,L_________________________________________
statement number
J,

~-----------·-------------------i

,pointer to xn
I
~-----------------------------~
'number of label arguments
I
~-----------------------------_f
'computed GO TO driver
,

TRACE OFF

~----------"------·-------------1

The Polish nota"tion
TRACE OFF statement is:

'CALL driver

,

generated for the

~-----------------·-------------i

,statement
number
L
______________________________
J,

4 bytes

r-----------------------------------------,
TRACE OFF driver
,

,
Label arquments are not counted in the
"number of arguments" which appears as the
third word of the Polish notation, and no

172

~-----------------------------------------i
, _________________________________________
statement number
L
J,

DISPLAY
The Polish notation
DISPLAY statement is:

generated

for

the

4 bytes

r-----------------------------------------,
I
painter to NAMELIST WRITE
I
~-----------------------------------------~

I

0

I

where the pointer to NAMELIST WRITE points
to this routine on the GLOBAL SPRaG roll;
the value zero is placed on the roll for
conformity with other NAMELIST input/output
statements; the NAMELIST pointer points to
a group constructed for the DISPLAY statement on the NA~iliLIST NAMES roll.

~-----------------------------------------~
I
NAMELIST pointer
I
~-----------------------------------------~
I
DISPLAY driver
I
~-----------------------------------------~
I _________________________________________
statement number
L
JI

Appendix C:

Polish Notation Formats

173

••

.......................

~.i"""""""""""." """"""~I"""""""""""""""""""I""""""

This appendix describes the code produced by the FORTRAN IV (G) compiler for
various types of source module statements.
The use of a DO loop in a FORTRAN
program can be described by the follOWing
example:
BRANCHES

DO 5 I = ml,m2,m3

All branch instructions in the object
module consist of a load from the branch
table, followed by a BCR instructio~, either conditional or unconditional, which uses
the branch table value as its target.
The production of this code depends on
the operation of Allocate,
which replaces
all jump target labels on the LBL roll with
pointers to entries in the object module
branch table. Using this information,
Gen
can write the load and branch instructions
even though the address of the target may
not yet be known.

5 CONTINUE

When the DO statement is processed during phase 4, the following takes place:
1.

The code

When Gen encounters a labeled statement
which is a jump target, it sets the appropriate entry in the branch table to the
address of the first instruction it produces for that statement.

A

L
ST

RO,ml
RO, I

is generated, where
constructed by Gen.
2.

the

label A is

The address of the instruction labeled
A is placed in the branch table.

The following code is generated for the
Computed Go To statement:

BH
L

15,variable
15,2
14,0
15,15
4n+22(0,14)
1 .. 4n(0, 0)
15,1
4n+22(0,14)
1,18(15,14)

BR

1

L

SLL
BALR
LTR
BNH
LA
CR

3.

An entry is made on the DO LOOPS OPEN
roll which contains pointers to m2,
m3, the label A, I, and the label 5.

On receiving the Polish notation for the
CONTINUE statement in the example, phase 4
produces the following code:
L

L
L
L

n address constants

BXLE

where variable is the Computed Go To variable, n is the number of branch points, and
4n 1S the length of the list of n address
constants.

RO,I
Rl, branch table
R2,m3
R3,m2
RO,R2,0(Rl)

where the load from the branch table sets
R1 to the address of the created label A.
When this code has been completed, phase 4
removes the bottom entry from the DO LOOPS
OPEN roll.

Appendix D: Object Code Produced by the compiler

175

F'orm Y28-6638-1
Page Revised 7/23/69 by TNL Y2S-6829
STATEMEN'l'

li'UNCTIQ~§

The following code is generated at the
beginning of each statement function:
STM
STM
LR
LR
LR
B

2,3,18(15)
6,12,26(15)
7,14
9,1
6,15
54 (0,15)

nine-word buffer

The buff,er is followed by the code for
the statement function itself, including
the code to load the return value.
The
following
code
closes
the
statement
function:
LR
LM
LM
BR

14,7
2,3,18(6)
6,12,26(6)
14

X(0,15)
ALl (length of Ident)
CLn(Ident)
14,12,12(13)
2,3,32(1S)
15,28(0,15)
20(0,15)
(ADDRESS MAIN ENTRY)
(ADDRESS PROLOGUE'
(ADDRESS EPILOGUE)

B

DC
DC
STM
LM
L
B
DC

DC
DC

The save code for the ENTRYs to the
subprogram is follolNed by a PROLOGUE, which
transfers arguments to the subprogram, and
an EPILOGUE, which returns arguments to the
calling routine for the main entry to the
subprogram
and for each ENTRY to the
subprogram.
The following code is produced
RETURN statement:
SR
L
ER

for

the

15,15
14,0(0,13)
14

which branches to the appropriate EPILOGUE.
The following code is produced for the
RETURN I statement:
15,I
15,2
14,0(0,13)
14

L

SLL
SUBROUTINE AND FUNCTION SUBPROGRAMS

L

BR
The following code is generated to save
required information at the main entry to
each SUBROUTINE and FUNCTICN subprogram:
B

DC
DC
STM
LM
LR
L

ST
STM
BR
DC
DC
DC

X(0,15)
AL1(length of Ident)
CLn(Ident)
14,12,12(13)
2,3,40(15)
4,13
13,36(0,15)
1.3,8(0,4)
3,4,0(13)

which also
EPILOGUE.

branches

to

the

appropriate

The PROLOGUE code generated for each
entry point to the subprogram moves arguments as required and branches to the
entry.
The followinq code is generated to
move each call by name argumen't:
L
ST

2,n(0,1)
2,global dmy

2

where n is the argument number (the arguments for each entry point are numbered
from one) multiplied by four.

(ADDRESS SAVE AREA)
(ADDRESSPRCLOGUE)
(ADDRESS EPILOGUE)

The following code is generated to move
each call by value argument: .

This code is followed by the following
code for saving required info~ation for
each of the ENTRYs to the subprogram (the
sequence of code appears once for each
ENTRY, in the order of the ENTRYs):

L
MVC

2,n(0,1)
global dmy(x),0(2)

where n is the argument number multiplied
by four, and x is the size of the dummy.
Code to calculate dummy dimensions follows the code to move arguments.

176

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
The following code is generated
close of all PROLOGUEs:
BALR
L

BR
DC

at

2,0
3,6(0,2)

the

The EPILOGUE code generated for each
entry point to a sUbprogram moves arguments
back to the calling routine and returns to
it, as dictated by the RETURN or RETURN I
statement.

3

(ADDRESS OF CODE ENTRY POINT)

Appendix DI Object Code Produced by the Compiler

176.1

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
The
are:

first instructions in each EPILOGUE

FORMATTED READ AND WRITE STATEMENTS
The

1,4(0,13)
1,.24 (0,1)

L

L

CNOP
L

The following code is generated
return each call by value argument:

to

BAL
DC
DC
DC
DC

where n is the argument number multiplied
by four and x is the size of the dummy.

where:

L
MVC

2,n(0,1)
0(x,2),global dmy

For FUNCTION subprograms, the
instruction is generated:
Lx

following

O,entry name

where x is the instruction mode.
If the
FUNCTION is complex, two load instp.lctions
are required.
The following code is generated for the
closing of each EPILOGUE:
L
L
LM
MVI
BR

code

produced for these statements

is:

13,4(0,13)
14,12(0,13)
2,12,28(13)
12(13),255
14

0,,4
15,=V(IBCOM#)
14,N(15)
XLO.4'PI',XLO.4'UI',AL3(UNIT)
AL1(FI),AL3(FORMAT)
AL4(EOFADD)
"optional"
AL4(ERRADD)
"optional"

PI = 0 if neither EOF nor ERR
specified
= 1 if EOF only is specified
2 if ERR only is specified
EOF
and
ERR
3 if
both
specified

is

are

UI

o if unit is an integer constant
1 if unit is a variable name
4 if unit is the standard system
unit

FI

X'OO' if FORMAT is a statement
label
X'Ol' if FORMAT is an array name

N

o for READ
4 for WRITE

UI = 4 is used for debug and for READ h,
list, PRINT b, list and PUNCH b, list.

SECOND LIST ITEM, FORMATTED
The following paragraphs describe the
code produced for the FORTRAN input/output
statements. The generated instructions set
up necessary parameters and branch into the
IBCOM# transfer table. This table has the
following format:
IBCOM#
+4
+8
+12
+16
+20
+24
+28
+32
+36
+40
+44
+48
+52
+56
+60
+64
+68

Main entry, formatted READ
Main entry, formatted WRITE
Second list item, formatted
Second list array, formatted
Final entry, end of I/O list
Main entry, unformatted READ
Main entry, unformatted WRITE
Second list item, unformatted
Second list array., unformatted
Final entry~ end of I/O list
Backspace tape
Rewind tape
Write tapemark
STOP
PAUSE
IBERR execution error monitor
IBFINT interruption processor
IBEXIT job termination

The code produced is:
L
BAL
DC

15,=V(IBCOM#)
14,8(15)
XL1'L',LXO.4'T'.XLO.4'X'
XLO.4~B',XL1.4·D·

where:
L = the size in bytes of the item
T = 2 for a logical 1-byte item
= 3 fora logical fullword item
4 for a halfword integer item
= 5 for a fullword integer item
= 6 for a double-precision real item
= 7 for a single-precision real item
complex
8 for a double-precision
item
9 for a single-precision complex
item
A for a literal item (not currently
compiler-generated)

Anpendix D: Object Code Produced by the compiler

177

X, B, and D are, respectively, the
index,
base,
and displacement which
specify the item address.

SECOND LIST ITEM, UNFORMATTED
The code produced is:
15,=VCIBCOM#)
14,28(15)

L

BAL
DC

SECOND LIST ARRAY, FORMATTED

XL1'L·fXLO.4·0',XLO.4~X',

XLO.4'B',XL1.4'D'
where:

The code produced is:
L

BAL
DC
DC

15,=V(IBCOM#)
14,12(15)
LX1'SPAN',AL3(ADDRESS)
XL1'L',XLO.4'T',XL2.4'ELEMENTS'

L = the size in bytes of the item
X,
Band D are,
respectively,
the
index,
base,
and displacement which
specify ~he address of the item.

where:
SPAN (not used)
ADDRESS = the beginning location
array
the
size
element

L

in

bytes

of

of

the

the
array

T = the values given for items
ELEMENTS = the number of elements in
array

the

SECOND LIST ARRAY, UNFORMATTED
The code produced is:
L
BAL
DC
DC

15,=VCIBCOM#)
14,32(L)
XL1'SPAN',AL3(ADDRESS)
XL1'L',A:L3{ELEMENTS)

where SPAN, ADDRESS, L, and ELEMENTS have
the meanings described in second
list
array, formatted.
FINAL LIST ENTRY. FORMATTED
FINAL LIST ENTRY, UNFORMATTED
The code produced is:
L

BAL

15,=V(IBCOM#)
14,16(15)

The code produced is:
L
BAL

15,=V(IBCOM#)
14,36(15)

UNFORMATTED READ .AND WRITE STATEMENTS
BACKSPACE, REWIND, AND WRITE TAPEMARK
The

code

produced for these statements

is:
The code produced is:
CNOP
L

BAL
DC
DC
DC

0,4
15,=V(IBCOM#)
14,N(15)
XLO.4'PI',XLO.4'UI,AL3(UNIT)
AL4(EOFADD)
"optional"
AL4 (ERRADD)
"optional"

CNOP
L

BAL
DC

0,4
15,=V(IBCOM#)
14,N(15)
XL1' FLAG II , .AL3 (UNIT)

where:
where:
FLAG
PI, UI, UNIT, EOFADD and ERR ADD have the
same values as those given in the formatted READ/WRI'rE definition.
N
N

178

20 for READ
24 for WRI'rE

o if unit is an integer
any other bit pattern if unit is
a variablE?
40 for BACKSPACE
44 for RE~UND
48 for write tapemark

The following
generated:

STOP AND PAUSE STATEMENTS
The

code

produced for these statements

is:
15,=V(IBCOM#)
14,N(15)
ALl (LENGTH)
C'TEXT'

L

BAL
DC
DC
where:

LENGTH is the number
'TEXT' message

of

bytes

in

DC
DC
DC

X'a 1 ',AL3(m1)
c' f 1. • ,AL3 (r 1.)
x·OO',AL3(v1.)

DC
DC
DC

X'an',AL3(mn)
C'f n ' ,AL3 (rn)
X'SO',AL3(vn )

list

is

also

the

TEXT is an alphameric number or message
(TEXT
'Q0404040FO' if the STOP or
PAUSE message is blank).
N

parameter

The third DC in the group is changed to
DC

X'01',AL3(vi)

if the associated variable is a halfword
variable. In the last group, it becomes
X'Sl',AL3(vn) in this case.

52 for STOP
56 for PAUSE

NAMELIST READ AND WRITE
The code produced is:*

FIND STATEMENT

0,4
15, =V (FWRNL#)
14,0 (15)
XLO.4'PI',XLO.4'UI',AL3(UNIT)
AL4 (NAMELIST)
AL4 (EOFADD)
AL4 (ERRADD)

CNOP
L

BAL
DC
DC
DC
DC

The code produced is:
CNOP

0,4
15, =V(IBCOM#}
14,20 (15)
XLO.4'PI',XLO.4'UI',AL3(UNIT)
XL1' VI' , AL3 (r)

L
BAI.

DC
DC

where:
PI, UI, and UNIT are as described for
formatted READ and WRITE
* The "L
15,:V(FWRNL#}" shown is
write;
the code produced for read
"L
l5,+V(FRDNL#}."

for
is

PI

C

UI

o if the unit is a constant
1 if the unit is a variable name

VI

00 if
the
record
number
constant
01 if the record number is a
able name

DEFINE FILE STATEMENT
The form of the parameters specified
the statement is:

in

The following code is generated in the
object module prologue:
R1 ,LIST
L,=V(DIOCS#)
R2 ,L

LA
L

BALR

L

15
14

vari-

DIRECT ACCESS READ AND WRITE STATEMENTS
The code produced for

these

statements

is:
L

1

a

Note that 20 is the IBCOM entry point
for an unformatted READ.

CNOP

where:

is

BAL
DC
DC
DC
DC

0.4
15,=V(IBCOM#)
14, N(15)
XLO.4'PI',XLO.4'UI'AL3CUNIT)
AL1(FI),AL3CFORMAT)
ALl (VI) ,AL3 (r)
AL4(ERRADD) "may only appear for
READ"

Appendix D: Object code Produced by the Compiler

179

Internal

where:
PI

UI

FI

8 if ERR is not specified
A if ERR is specified, which is
only possible for READ
integer
an
o if the unit is
constant
1 if the unit is a variable name
00

if

the

FORMAT

is a statement

labE~l

01 if the FORMAT is an array name
VI

00 if r (1:he record number)
constant
01 if r is a variable name

is

Parentheses used to enclose groups of
FORMAT specifications within the FORMAT
statement are represented by the codes 04
and 1C for the lef1: and right parenthesis,
respectively. The code for the left parenthesis is always f()llowed by the 1-byte
val ue of the repE~ti tion count which preceded the parenthesi.s in the source module
statement.
A val \le of one is inserted if
no repetition count appeared.

a
Repetition of Indivi.dual FORMAT
Specifications

The entry points which may appear (N)
are 0, 4, 20, or 24.
If 20 or 24 appears
(indicating an unformatted operation), the
second DC does not appear.

FORMAT STATEMENTS
FORMAT statements are stored after
eral constants in the object module.

Parenthese=~

Whenever the source module FORMAT statement contains a field specification of the
form aIw, aFw.d, aEw.d,
aDw.d,
or aAw,
where the repetition count fta W is present,
the hexadecimal code 06 is produced to
indicate the field repetition.
This code
is followed by the 1-byte value of fta ft •

lit-

The FORMAT specifications are recoded
from their source module form so that each
unit of information in the FORMAT statement
occupies one byte of storage. Each integer
which
appears in the FORMAT statement
(i.e., a scale factor, field width,
number
of fractional digits, repetition count) is
converted to a 1-byte binary value.
Decimal points used to separate field width from
the number of fractional digits in the
source module FORMAT statement are dropped;
all
other characters appearing in the
source module stabement are represented by
1-byte hexadecimal codes.
The following
sections describe the encoding scheme which
is used.

I,F,E, and D FORMAT Codes
The I and F FORMA'T codes are represented
by the hexadecimal values 10 and OA, respectively.
The I code is followed by the
1-byte field width value;
the F code is
followed by two bytes, the first containing
the field width (w) and the second containing the number of fractional digits (d).
E and D FORMAT codes are represented by
the hexadecimal values OC and OE , respectively.
This value is always followed by
two bytes which represent the field width
and the number of
fractional
digits,
respectively.

A FORMAT Code
FORMAT Beginning and Ending Parentheses
The beginning and ending parentheses of
the FORMAT statement are represented by the
hexadecimal codes 02 and 22, respectively.

The A FORMAT COdE~ is represented by the
hexadecimal value 14.
This representation
is always followed by the i-byte value of
w, the number of characters of data.

Literal Data
Slashes
The slashes appearing in ,the FORMAT
statement are represented by the hexadecimal code 1E.
180

The H FORMAT code and the quotation
marks used to enclose literal data are both
represented by the hexadecimal value lA.
This code is followed by the character
count (w in the case of the H specifica-

tion, the number of characters enclosed in
quotation marks in the case of the use of
quotation marks). The literal data follows
the character count.

The specification wX results in the
production of the hexadecimal code 18 for
the Xi this is followed by the i-byte value
of w.

The T FORMAT code is represented by the
value 12. The print position, w, is represented by a i-byte binary value.

DEBUG FACILITY
The following paragraphs describe the
code produced for the FORTRAN Debug Facility statements. The generated instructions
set up parameters and branch into the
DEBUG# transfer table.
The object-time
routines which support the Debug Facility
are described in Appendix E.

DEBUG STATEMENT
When the source module includes a DEBUG
statement, debug calls are generated before
and after each sequence of calls to IBCOM
for source module input/output statements.
Additional debug calls are generated to
satisfy the options listed in the DEBUG
statement.

Beginning of Input/Output

The P scale factor in the source module
FORMAT statement is represented by the
hexadecimal value 08.
This code is followed by the value of the scale factor,
if
it was positiv~.
If the scale factor was
negative, 128~ 1S added to it before it is
stored following the P representation.

The following code appears before the
first call to IBCOM for an input or outp~t
operation:
CNOP
BAL

15,=V(DEBUG#)
0,4
14,44(0,15)

End of

Input/Outp~~

L

G FORMAT Code
The G FORMAT Code is represented by the
hexadecimal value 20. This value is always
followed by two bytes which represent the
field width and the number of significant
digits, respectively.

The following code appears after the
last call to IBCOM for an input or output
operation:
L

CNOP
BAL

L

15,=V(DEBUG#)
0,4
14,48(0,15)

FORMAT Code
UNIT Option

The L FORMAT code is represented by the
hexadecimal value 16. This value is followed by the i-byte field width.

Z FORMAT Code

When
the
DEBUG statement does not
include the UNIT option, the object-time
debug routine automatically writes debug
output on SYSOUT. When UNIT is specified,
the following code is generated at the
beginning of the object module:
I.

The Z FORMAT code is represented by the
hexadecimal value 24. This value is followed by the i-byte field width.

CNOP
BAL

DC

15,=VCDEBUG#)
0,4
14,12(0,15)
F'DSRN'

Appendix D: Object Code Produced by the Compiler

181

where DSRN is the data set reference number
to be used for all subsequent debug output.

subprogram call.
Three calls may occur,
depending on the type of variable (scalar
or array) and the me'thod of assignment.

TRACE option

INIT SCALAR VARIABLE: The following code
is produced after each assignment of value
to a scalar variable covered by the INIT
option:

When the TRACE option is specified in
the source module DEBUG statement, the
TRACE call is inserted immediately before
the code for every labeled statement. The
code is:

CNOP

L

CNOP
BAL
DC

15,=VCDEBUG#)
0,4
14,0(0,15)
F'LABEL'

where LABEL is the label of
statement.

L

BAL

DC
DC

15,=V(DEBUG#)
0,4
14,16(0,15)
CL6' NAME ' , CL2 il
XL1'L' ;XLO.4'~r' ,XLO.4'X' iXLO.4'B',
XL1. 4' D'

where:
the

NAME is the name of the
was set.

following

L is the
bytes.
SUBTRACE Opti..sm..

BAL

15,=VCDEBUG#)
0,4
14,4(0,15)

At the time of the call, register 13
contains the address of the SAVE AREA, the
fifth word of which contains the address of
the subprogram identification.
Bytes 6
through 11 of the subprogram identification
are the subprogram name.
immediately
The call is:
L

CNOP
BAL

15,=V(DEBUG#)
0,4
14,8(0,15)

variable in

X, B, and D are, respectively, the
index, base, and displacement which locate the item.
INIT ARRAY ITEM:
The following code is
produced after each assignment of value to
an array element:
L

The debug call is made
before the RETURN statement.

SUBTgAC~ RE!~RN:

the

2 for a logical 1-byte item
3 for a logical fullword item
4 for a half~,ord integer item
5 for a full~,ord integer item
6 for a double-precision real item
7 for a single-precision real item
8 for a double-precision complex
item
9
for a single-precision complex
item
A for a literal item (not currently
compiler generated)

SUBTRACE EN'I'RY: 'l'he debug call is made at
the begInning-of the object module.
The
call is:
CNOP

of

which

T is the type code for the variable:

When the SUBTRACE option is listed in
the source DEBUG statement, two sequences
of code are produced: one at the entry to
the object module, and one prior to each
RETURN.

L

length

va,r iable

CNOP
BAL

DC
DC
DC

15,=V(DEBUG#)
0,4
14,20(0,15)
CL6' NAME' ; CL2'
XL1'L',XLO.4'T',XLO.4'X',XLO.4'B',
XL1.4'D'
XL1'TAG',AL3(ADDRESS)

where:
ADDRESS IS THE LOCATION OF THE FIRST
array element if TAG = 0, or ADDRESS is a
pointer to the location of the first
array element if TAG =t- 0.
When the INIT option is given in the
source module DEBUG statement, a debug call
is produced for ,every assignment to a
variable, or to a listed variable if a list
is provided. The call immediately follows
each
assignment,
including those which
occur as a result of a READ statement or a
182

NAME, L, T, X, B, and D are as described
for a scalar variable.
INIT FULL ARRAY:
The following code is
produced when a full array is set by means
of an input statement specifying the array

name or when the array name appears as an
argument to a subprogram:
L

CNOP
BAL
DC
DC
DC
DC

15,=V(DEBUG#)
0,4
14,24(0,15)
CL6'NAME',CL2'
A (ADDRESS)
XL1'L',XLO.4'T',XL2.4'00000'
A (ELEMENTS)

where:
ADDRESS is the
array e;t.ement.

location

of

the

first

ELEMENTS is a pointer to a word containing the number of elements in the array.

immediately preceded by the operation of
the statements following the AT.
As a
result of the AT statement,
an unconditional branch to the location of the first
statement following the AT is inserted
before the first instruction generated for
the statement labeled L. This branch precedes any TRACE or SUBTRACE calls which may
be written for statement L.
The branch, like all branches performed
in the object module, consists of a load
from the branch table, followed by a BCR
instruction.
The
branch
table entry
referred to is one constructed for a label
which the compiler provides for the statement following the AT.

NAME, L, and T are as described for a
scalar variable.
TRACE ON STATEMENT
The debug call produced for the TRACE ON
statement appears at the location of the
TRACE ON statement itself; the call is:
A debug call is produced for
each
reference to an array element when the
SUBCHK option appears without a list of
array names; when the list is given, only
references to the listed arrays produce
debug calls. The debug call appears before
the reference to the array, and is:
L

CNOP
BAL
DC
DC
DC

15,=V(DEBUG#)
0,4
14,28(0,15)
CL6' NAME' , CL2'
XL1'TAG',AL3(ADDRESS)
AL4(ELEMENTS)

L

CNOP
BAL

15,=V(DEBUG#)
0,4
14,32(0,15)

TRACE OFF STATEMENT
The debug call produced for the TRACE
OFF statement appears at the location of
the TRACE OFF statement itself; the call
is:
L

where:

CNOP
BAL

15,=V(DEBUG#)
0,4
14,36(0,15)

NAME is the array name.
ADDRESS is the location of the first
array element if TAG = 0, or ADDRESS is
a pointer to the location of the first
array element if TAG
0.

DISPLAY STATEMENT

ELEMENTS is a pointer to a word containing the number of elements in the array.

L

*

The code for the DISPLAY statement is:
CNOP
BAL
DC
DC

15,=V(DEBUG#)
0,4
14,40 (0, 15)
A (NAMELIST)
A (FWRNL#)

AT STATEMENT
The AT statement specifies the label, L,
of a statement whose operation should be

where NAMELIST is the address of the NAMELIST table generated from the DISPLAY list
by the compiler. This code appears at the
location of the DISPLAY statement itself.

Appendix D: Object Code Produced by the Compiler

183

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
APPENDIX E:

The information provided in this appendix has its primary use in connection with
a listing of the compiler. The label lists
indicate the chart on which a specific
label can be found, or, for routines which
are not flowcharted,
they
provide
a
description of the routine.

MISCELLANEOUS REFERENCE

Routine
Label t!am~ __
G0639 ASSIGNMENT
VAR CHECK

DAT~

Comments
Checks--the mode of assignment variable and
the expression for conflict in type specification.

PARSE LABEL LIST
G0640 LITERAL
TEST

Determines the statement
type and transfers to
the indicated statement
processing routine.

G0641 END STA
XLATE

Determines the nature of
the
statement
and
transfers to the appropriate translation routine
for
non-END;
translates END.

G0643 DO STA
XLATE

Constructs
the
Polish
notation for the
DO
statement. Locates the
innermost DO statement
in a nest of DO's, and
sets up extended range
checking.

G0644 DO STA
CONTROL
XLATE

Interprets
the
loop
control
specification
in the DO statement and
constructs the Polish
notation
for
these
controls.

G0645 DIMENSION
STA XLATE

Determines the validity
of the specifications
in the DIMENSION statement
and
constructs
roll entries.

G0646 GOTO STA
XLATE

Determines the type of
GO TO statement,
and
constructs the Polish
notation for a GO TO
statement.

G0647 CGOTO STA

Constructs
the
Polish
notation for a Computed
GO TO statement.

The labels enumerated in the following
list are used in the flowcharts provided
for the illustration of the major routines
used in Parse.
Label
G0630
G0631
G0837
Gp632
G0635
G0636
G0633
G0642
G0844

Chart
ID

~

04
BA
BB
BC
BD
BE
BF
BG

Routine Name
START-COMPILER
STATEMENT PROCESS
PRINT AND READ SOURCE
STA INIT
LBL FIELD XLATE
STA XLATE
STA FINAL
ACTIVE END STA XLATE
PROCESS POLISH

SUPPLEMENTARY PARSE LABEL LIST
The routines described in this section
are listed by G number labels which are
presented in ascending order.
These routines are those used in the operation of
Parse which are not shown in the section of
flowcharts for the phase.
Routine
~b~! t!~ __
G0287 REASSIGN
MEMORY

Comments
Obtains additional core
storage, if possible,
for a specific roll by
pushing up the rolls
that precede the requesting roll in the
block of storage. If
this is not possible,
it requests more core
storage and, if none is
available, enters PRESS
MEMORY.

G0637 ASSIGNMENT
STA XLATE

Constructs
the
Polish
notation for an assignment statement.

G06.48 ASSIGNED
GOTO STA
XLATE

PolisIi
Constructs
the
As~
notation for an
signed GO TO statement.

G0638 ARITH FUN
DEF STA
XLATE

Polish
Constructs
the
notation for an arithmetic function definition statement.

G0649 ASSIGN STA
XLATE

the construcControls
of the Polish
tions
notation for an ASSIGN
statement.

Appendix E: Miscellaneous Reference Data

185

Routine
Label

!::i~~~

__ _

(;0650 IF STA.

£Q!!!m~I!!::.§'

Constructs
the
notation
for
statement.

?olish
an IF

G0651 LOGICAL IF
STA XLATE

Constructs
the
notation for a
IF statement.

Polish
logical

G0652 IMPLICIT
STA XLATE

Checks
the
IMPLICIT
statement and controls
the construction of the
roll entries for the
statement.

G0653 REGIS'I'ER
RANGE

Controls
character entries for an IMPLICIT
statement.

G0654 REGISTER
IMPLICIT
CHAR

Places the characters in
the IMPLICIT statement
on the IMPLICIT roll.

G0655 SCAN FOR
TYPE Q'r
AND SIZE

XLATE

Routine
Label Name
Comments
80664 PACKHCODE Interprets the specification for the H format
code.
G0665 PACK FO~~AT Controls the registering
QUOTE
of the contents of a
literal quote specified
in a FORMAT statement.
G0666 REWIND STA
XLATE

Constructs
the
notation for a
:statement.

G0667 BACKSPACE
STA XLATE

Constructs
the
Polish
notation
for
a
BACKSPACE statement.

G0668 END FILE
STA XLATE

Polish
Constructs
the
notation
for an END
l~ILE statement.

Determines the mode and
size of the variables
in specifica~ion statements.

G0669 END FILE
END

Completes
the
notation
for
output control
ments.

G0656 CONTINUE
STA XLATE

Constructs
the
Polish
notation for a continue
statement.

G0670 BLOCK DATA
STA XLA'I'E

Validates the use of the
BLOCK DATA statement.

GO 6 57

Constructs
the
Polish
notation for a
CALL
statement.

G0671 STOP STA
XLATE

Sets up the Polish notation
for
the
STOP
8tatement.

G0672 STOP CODE
ENTRY

Sets

G0673 PAUSE STA
XLATE

Validates the use of the
FORMAT
statement and
controls the construction
of
the Polish
notation for the statement.

Controls the
tion
of
statement.

G0674 PAUSE STOP
COMMON

Builds the FORMAT roll
from the
information
obtained from the processing of the statement.

Checks
the form of the
specified statement and
controls the construction
of
the Polish
notation
for
the
statement.

G0675 PAUSE STOP
END

Registers the constructed
Polish notation on the
POLISH roll.

G0661 FORMAT
LIST SCAN

Checks
the form of the
literal content of the
FORMAT statement.

G0676 INIT
LITERAL
FOR STOP
PAUSE

Controls the interpretation
of the message
specified in the PAUSE
statement.

G0662 FORMAT
BASIC SCAN

Interprets
the
FORMAT
list and constructs the
Polish notation for the
list.

G0677 NAMELIST
STA XLATE

Constructs
the
roll
entries
for
the
NAro"...ELIST statement.

G0663 ISCAN TEST

Checks the size of the
inteter
constant
or
variable specified.

G0678 COMMON STA
XLATE

Constructs
the
roll
entries for the COMMON
specification.

CALL S~rA
XLATE

G0658 EXTERNAL
STA XLATE

G0659 FORMAT STA
XLATE

G0660 FORMAT STA
END

186

validates the use of the
EXTERNAL statement and
constructs
roll
entries.

Polish
REWIND

Polish
input/
state-

up the Polish notafor
the
STOP
statement.

t~ion

interpretathe
PAUSE

Routine
Label Name
G0679 TEST ID
ARRAY OR
SCALAR

Comments
Validates the identification of the array or
scalar used in COMMON.

G0680 DOUBLE PRE
STA XLATE

Checks the use of the
DOUBLE PRECISION statement and controls the
interpretation of the
statement.

G0681 TYPE STA
XLATE

Interprets and constructs
the roll entries for
the type specification
statement.

G0682 SCAN FOR
SIZE

Checks the size specification for the variables in type statements.

G0683 TYPE
Checks the identification
SEARCH TEST
of the variables in the
AND REG
type
specification
in statement for previous definition
and
defines if correct.

Routine
Label Name
G0692 TEST ORDER

Comments
Checks the order in which
the SUBROUTINE or FUNCTION statement appears
in the source module.

G0693 DMY SEQ
SCAN

Checks the designation of
the dummy variables for
call by name or call by
value.

G0694 GLOBAL DMY
SCAN AND
TEST

Checks the identification
of the global dummy for
a possible conflict in
definition.

G0695 DEFINE
FILE STA
XLATE

Constructs
the
Polish
notation for the DEFINE
FILE statement.

G0696 DATA STA
XLATE

Constructs
the
Polish
roll
notation
and
entries for the DATA
statement.

G0697 DATA CONST
XLATE

Interprets the
specified in
statement.

constants
the DATA
sets up
elements
the DATA

G0684 ENTRY STA
XLATE

Constructs
Polish
the
notation
and
roll
entries for an ENTRY
statement.

G0698 INIT DATA
VAR GROUP

Determines and
the number of
specified in
statement.

G0685 FUNCTION
STA XLATE
G0686 TYPED
FUNCTION
STA XLATE
G0687 FUNCTION
ENTRY STA
XLATE
XLATE

These routines
control
the construction of the
polish notation for a
FUNCTION subprogram by
invoking the routines
which
interpret
the
contents of the statement.

G0699 DATA CONST
ANALYSIS

Validates the specification of the constants
used
in
the
DATA
statement.

G0700 DATA VAR
TEST AND
SIZE

G0688 SUBROUTINE
STA XLATE
G0689 SUBROUTINE
ENTRY STA
XLATE

These
routines control
the construction of the
Polish notation for a
SUBROUTINE
subprogram
by invoking the routine
which
interprets the
contents of the statement.

Checks the definition of
the variables specified
in the DATA statement
for usage conflict, and
registers the variables
if
no
conflict
is
found.

G0690 SUBPROGRAM
END

Common
closing routine
for
ENTRY,
FUNCTION,
and SUBROUTINE statements.

G0691 SPROG NAME
SCAN AND
REG

Checks the identification
of the SUBROUTINE or
FUNCTION subprogram for
conflicts
in definition.

G0701 MOVE TO
Moves
information
for
TEMP
DATA statement to TEMP
POLISH ROLL
POLISH roll from WORK
roll.
G0702 READ STA
XLATE

Checks the type of READ
statement and controls
the interpretation of
the statement.

G0704 READ WRITE
STA XLATE

Interprets the elements
of the READ or WRITE
statement
and
constructs
the
Polish
notation
for
the
statement.

G0705 END QT
XLATE

Constructs
notation
quote.

the
Polish
for the END=

Appendix E: Miscellaneous Reference Data

187

Routine
Label Name __
G0706 ERR QT
XLATE

Conunents
Constructs
the
Polish
notation for the ERR =
quote
in
the
READ
statement.

G0707 REGISTER
I BCOM

Inserts a roll entry
a call to IBCOM.

G0708 REGISTER
ERROR LINK

Sets the roll entry for
the generation of error
linkage.

G0709 READ B STA
XLATE
G0710 PUNCH STA
XLATE
G0711 PRINT STA
XLATE

Initialize for the construction of the Polish
notation for the indicated statement.

G0712 F2 10
XLATE

Constructs
the
Polish
notation for the indicated
input/output
statement and
interprets FORMAT designations associated with
the input/output statement.

Routine
Label Name
G0723 STA XLATE
EXIT

Comments
ieplaces the Polish notation for a statement
with error linkage if
indicated.

for

G0713 IOL LIST
XLATE

Interprets and constructs
the Polish notation for
the
list
associated
with
the
indicated
input/output statement.

G0714 FIND STA
XLATE

Constructs
the
Polish
notation for the FIND
statement.

G0715 RETURN STA
XLATE

Constructs
the
Polish
notation for the RETURN
statement.

G0716 EQUIVALENCE Constructs the roll enSTA XIATE
tries for the EQUIVALENCE statement

G0724 ILLEGAL
These
routines set up
STA FAIL
diagnostic messages for
G0725 ORDER FAIL
the type of error indiG0726 ALLOCATION
cated by the routine
name.
FAIL
G0727 ILLEGAL
NUMBER
FAIL
G0728 SUBSCRIPT
FAIL
G0729 10 CONFLICT
FAIL
G0730 TYPE
CONFLICT
FAIL
G0731 VAR SCAN

Checks
definition
of
variables in the source
module;
defines
as
scalar if undefined.

G0732 ARRAY SCAN

Constructs
the
Polish
notation
and
roll
entries for array references.

G0733 SUBSCRIPT
ANALYSIS

Determines the nature of
an array reference for
purposes of subscript
optimization.

G0734 SCRIPT ITEM Determines
whether
a
ANALYSIS
subscript expression is
a linear function of a
DO variable, and sets
ANSWER BOX.

G0717 DIMENSION
SEQ
XLATE

Constructs the roll entries for the dimensions designated for an
array.

G0735 NOTE LINEAR Registers a linear subSCRIPT
script
expression on
SCRIPT roll.

G0718 TEMP MAKER

Increments
temporary
used for
sions.

G0736 RESTORE
NONLINEAR
SCRIPT

Builds the Polish notation for a nonlinear
subscript expression on
Polish roll.

G0719 SPECIFICATION
STA EXIT
G0720 JUMP END
G0721 ACTIVE END
G0722 HEAD STA
EXIT

Set flags and return.

G0737 MOVE ON
EXIT FALSE

Moves one group from WORK
roll to POLISH roll,
sets ANSWER
BOX
to
false, and returns.

G0738 SCRIPT
SCALAR
ANALYSIS

De'termines
whether
a
:scalar used in a subscript is a DO variable
and sets ANSWER BOX.

188

pointer for
locations
dummy dimen-

Routine
Label Name
G0739 SCRIPT
CONST
ANALYSIS

Comments
Separates constant used
in a subscript expression as either induction variable coefficient
additive
or
constant.

Routine
Label Name
Comments
G0752 OP CHECK
The current and previous
AND DEPOSIT
operations are set up
according to a preceand a
Polish
dence,
connotation
is
structed.

G0740 DEFINE
SCRIPT
GROUP

Creates
new group containing zeros on the
SCRIPT roll.

G0753 GEN AND REG Determines the nature of
an exponentiation, and
EXPON SPROG
records
the required
subprogram
on
the
GLOBAL SPROG roll.

G0741 REGISTER
SCRIPT
GROUP

Defines a subscript expression on the SCRIPT
roll by setting
the
traits,
displacement,
and array reference.

G0744 TERM SCAN

Initializes the constructionof Polish notation
for a new term in an
expression.

G0745 ELEMENT OP
SEQ SCAN

Constructs
the
Polish
notation for a term in
an
arithmetic
expression.

G0754 REG COMPLEX Determines the nature of
an operation involving
SPROG
complex variables· and
registers the appropriate routine
on
the
GLOBAL SPROG roll.
G0755 A MODE PICK Checks and sets mode of
AND CHECK
operator by inspecting
the first of a pair of
operands.
G0756 MODE PICK

Actually
places
field in driver.

mode

G0746 UNAPPENDED
SPROG ARG

Exits
from
expression
scanning on finding an
array
or
subprogram
name not followed by a
left parenthesis; ensures
reference
is
correct.

G0757 B MODE PICK With second operand and
AND CHECK
driver set by A MODE
PICK AND CHECK, resets
driver mode; if complex
raised to
a
power,
ensures
power
is
integer.

G0747 FUNCTION
ELEMENT

Determines
whether
a
function call
in an
expression
is to
a
statement function,
a
library function, or a
global
subprogram;
calls
SPROG ARG SEQ
SCAN to scan arguments.

G0758 MODE CHECK

G0748 CONST
ELEMENT

Scanning expression,
if
compiler
finds
nonletter, non-left parenthesis, it goes here;
determines if really a
constant.

Determines whether modes
of operands are valid
in relational and logical operations.

G0759 NUMERIC EXP Determines that an operaCHECK
tion or an expression
is numeric, as opposed
to
logical,
for
compatibility.
G0760 NUMERIC EXP Uses NUMERIC EXP CHECK,
SHECK AND
then prunes bottom of
PRUNE
POLISH roll.

G0749 SCALAR
ELEMENT

Ensures that
registered.

is

G0761 SPROG ARG
SEQ SCAN

Constructs
the
Polish
notation for the argument
list designated
for a subprogram.

G0750 ELEMENT
MOVE

Moves pOinter to POLISH
roll for any element in
expression.

G0762 ARG TEST
AND PRUNE

G0751 OP SCAN
CHECK
DEPOSIT

Determines the operation
indicated in an expression,
sets
up
the
appropriate driver, and
falls
through to OP
CHECK AND DEPOSIT.

Tests the number and type
of arguments to library
routine; moves
label
arguments to CALL LBL
roll.

G0763 TEST FOR
ALTERABLE

Determines
whether
a
scalar has been passed
as
a
subprogram
argument.

scalar

Appendix E: Miscellaneous Reference Data

189

Routine
Label !:!am~ __
G0764 10 SCAN
NO USE

Conunents
Sets---a- flag tested in
MODE SET so that loworder bits of roll are
not altered when variable is defined; statement
does
not
use
variable.

G0765 10 CLASSI~l Goes to 10 CLASSIFY after
NO USE
setting flag to indicate variable has not
been
used
and mode
should not be set.
G0766 10 SCAN

compiles name from source
in central area
and
goes to 10 CLASSIFY.

G0767 10 CLASSIFY Determines the classification of a name
scalar, array, subprogram, etc., and leaves
pointer in WO; exits
false
if
name
not
defined.
G0768 REGISTER
SCALAR

Records
new
SCALAR roll.

G0769 REGISTER
GLOBAL
SPROG
REGIS'rER
RUNTIME GS

Determines
if name is
already a defined subprogram;
if not reon GLOBAL
cords
it
SPROG roll.

G0770 REGISTER
GLOBAL
SPROG ROLL

Records name
SPROG roll.

G0771 MODE SET

Determines the mode of
the indicated variable,
logical, integer, complex, etc., and inserts
code in pointer in WOo

name

on

on

comments
Records new integer constant if not previosuly
defined.

G0777 CONST
ANALYSIS

Determines the type of a
constant and jumps to
proper conversion routine.

G0778 CPLX CONST
ANALYSIS

converts
constant.

complex

a

G0779 CHECK CONST Checks for unary minus
SIGN
sign on constant.
G0780 SCAN CONST
SIGN

Scans first character of
a constant for a sign;
sets up driver if unary
minus.

G0782 HEXADECIMAL Converts a
CONST SCAN
constant.

hexadecimal

G0783 REGISTER
HEX CONST

Records new constant on
HEX CONST roll if not
previously defined.

G0784 LBL ARG
SCAN

Checks
validity of a
label argument to
a
subprogram and records
label as jump target.

G0785 SCAN
HOLLERITH
ARGUMENT

Scans an IBM card code
argument
to
a subprogram, and records as
literal constant.

G0786 LITERAL
CONST SCAN

Distinguishes
literal
constants from logical:
converts and records.

G0787 LITERAL
CONST SCAN
PAUSE

Palcks a literal constant.

G0788 REGISTER
LITERAL
CONST

R€!cords literal constant
on LITERAL CONST roll
if not previously defined.

G0789 INIT PACK
LITERAL

Initializes
sion
of
constant.

G0790 PACK
LITERAL
COMPLETE

Moves
literal constant
'Onto TEMP LITERAL roll
.if packed.

G0791 PACK
LITERAL
CONST

Converts a literal con:stant
from
source
:input.

G0792 LOOK FOR
ONE QUOTE

Ch.~cks

GLOBAL

G0772 CONST SCAN

Controls the translation
and
recording
of
constants.

G0773 REGISTER
COMPLEX
CONST

Records
complex
and
double-precision
complex constants not previously
defined
on
appropriate roll.

G0774 REGISTER
FL CONST

Records
singleand
double-precision
real
constants on appropriate roll when not previously defined.

G0775 REGISTER
WORK CONST

Records constant in Wo as
new integer constant if
not defined.

190

Routine
Label NaI.!!!LG0776 REGISTER
FX CONST

for
a

converliteral

for a quotation
mark not followed by a
second quotation mark;
sets ANSWER BOX.

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
Routine
Label Name
G0793 PACK TWO
FROM WORK
G0794 PACK ONE
FROM WORK

Comments
Packs low-order byte from
last one or two groups
on
WORK
roll
onto
LITERAL TEMP roll.

G0795 PACK CRRNT
CHAR

Packs current character
onto LITERAL TEl'-1P roll.

G0796 PACK CHAR

General routine to actually place a byte in a
word which"
when complete, is placed on the
LITERAL TEMP roll.

G0797 SYMBOL SCAN Assembles identifier from
input in SYMBOL 1,
2,
and 3, and returr.s.

Routine
Label Name
G0806 NEXT--CLOSING
SLASH

Comments
scans-source input until
second of the next pair
of slashes not enclosed
in parentheses.

G0807 NEXT ZERO
Scans source input until
next comma or slash not
COMMA SLASH
enclosed in parentheses
OR CRP
or a
closing
right
parenthesis.
G0808 NEXT ZERO
R PAREN

Scans source input until
next zero level right
parenth'esis.

G0809 COMMA TEST

Advances scan arrow and
returns ANSWER BOX true
if next active character is a comma; if it
is a letter, sets up
missing comma message,
does not advance, and
returns true; if it is
neither~ returns false.

G0798 LOGICAL
CONST SCAN

Scans logical constants
from source input and
records as integers.

G0799 JUMP LBL
SCAN AND
MOVE

Scans label, defines it
as
jump target
and
pointer on POLISH roll.
Locates transfers from
innermost DO loops that
are possible extended
range candidates. Also
checks
for
possible
re-entry
points into
innermost DO loops, and
tags such points.

G0810 INTEGER
TERM
SCAN AND
MOVE

Scans integer constant or
variable,
defines
on
appropriate roll, puts
pointer on POLISH roll.

G0811 INTEGER
CONST SCAN
AND MOVE

Scans integer constant;
defines
on FX CONST
roll if required; puts
pOinter on POLISH roll.

G0800 FORMAT LBL
SCAN

Scans a label, registers
it if necessary, and
ensures that it is a
FORMAT label if already
defined.

G0812 INTEGER VAR Scans integer variable;
SCAN AND
defines on roll if reMOVE
quired; puts pointer on
POLISH roll.

G0801 FORMAT LBL
TEST

Tests that pointer in wO
indicates format label
(vs.
jump
target
label); if not,
there
is an error.

G0813 INTEGER
TEST

Determines
whether
a
pointed to variable or
constant is an integer.

G0802 LBL SCAN

Scans referenced label,
defines on LBL roll if
required"
produces error messages,
leaves
pointer in WO.

G0814 SIGNED
INTEGER
SCAN

Scans and converts signed
integer constant; defines on FX CONST roll
if required.

G0803 REGISTER
LBL

Records label on LBL roll
if
not
previously
defined; leaves pointer
in WOe

G0815 INTEGER
SCAN

Scans
and converts an
unsigned integer constant and register on
FX
CONST
roll
if
required.

G0816 DP CONST
MAKER

Builds a double-precision
constant
from source
input.

G08l7 DP ADJUST
CONST

Used in converting floating
point
numbers;
adjusts
for E or D
field.

G0804 NEXT ZERO
Scans source
input to
LEVEL COMMA
next
comma
not in
NEXT ZERO
parentheses or to close
COMMA
off a pair of parenOR R PAREN
theses.
G0805 NEXT ZERO
COMMA
OR CS

Scans source input until
next comma
or slash
not in parentheses.

Appendix E: Miscellaneous Reference Data

191

Form Y28-6638-1
Page Revised 11/15/68 by TNL Y28-6826
Routine
Label NamL_
G0818 CONVERT TO
FLOA..T

Comments
Converts integer constant
to floating pOint.

Routine
Label Name
GOS39 TEST-POR
ERROR
MESSAGE

G0820 CLEAR TWO
AND EXIT
TRUE
G0821 CLEAR ONE
AND EXIT
TRUE

Remove the specified number of groups from the
WORK roll, set ANSWER
BOX to true, and return.

G0840 PRINT
MESSAGES

Prints
line
messages.

of

G0841 TEST AND
ZERO PRINT
BUFFER

Clears output
printer.

area

G0823 EXIT TRUE
EXIT TRUE
ML

Sets ANSWER BOX
and returns.

G0842 INIT READ
A CARD

G0824 CLEAR ONE
AND EXIT
FALSE

Removes one group from
WORK roll, sets ANSWER
true,
and
BOX
to
returns.

Scans source input for
assignment
statement
(flag 1) or Logical IF
with
assignment
for
consequence (flag 2).

G0843 READ A
CARD

Puts
card onto SOURCE
roll and re-enters INIT
READ A CARD at proper
point.

G0845 SKIP TO
NEXT CHAR
MASK

Scans
input
to
next
source character not of
a class of characters
specified as input to
routine.

COmm~!!~~

Determines whether error
messages
are
to be
printed; if so, prints
dollar sign markers.
error
for

to true

G0825 EXIT FALSE

Sets ANSWER BOX to false
and returns.

G0826 CLEAR TWO
AND EXIT
G0827 CLEAR ONE
AND EXIT

Remove specified number
of groups from
WORK
roll and return.

GOB29 EXIT
Returns.
EXIT ML
EXIT ON ROLL

G0846 REENTRY
Entry point used to conSKIP TO NEXT tinue masking operation
CHAR MASK
on a new card.

G0832 SYNTAX FAIL Records syntax error message and goes to FAIL.
ML
ILLEGAL
SYNTAX FAIL
SYNTAX FAIL

G0847 NEXT CHAR
NEXT
CHARACTER
G0848 NEXT CHAR

Advance scan
next active

arrow to
character.

ML

G0833 FAIL

If JPE flag off, restores
WORK
and
EXIT roll
addresses
from
last
status control, housekeeps Polish notation
through STA XLATE EXIT,
and returns with ANSWER
BOX set to false; if
the flag is on, values
are restored for JPE
and exit is to
the
location following last
JPE POP instruction.

G0834 STATUS
CONTROL

Saves
and

G0835 DIGIT CONV
SCAN

Converts
integer
from
decimal to binary, and
leaves in DATA area.

G0836 CONV ONE
DIGIT

Converts decimal digit to
binary, and leaves in
DATA area.

G0838 PRINT A
CARD

Controls
printing
listing
source
error messages.

192

NEXT CHARACTER
ML

G0849 BCD TO
EBCDIC

Converts CRRNT CHAR
BCD to EBCDIC.

G0850 DIGIT CONV
INITIAL

Initializes for the conversion
of a number
from decimal to binary
(resets digit counts,
clears DATA area, etc.)

G0851 MAPTl TO
TMPl

Converts value in format
of TOP or BOTTOM, a
virtual address,
to a
true address.

Gl034 BUILD LOOP
DATA GROUP

Constructs group
DATA roll.

Gl035 DATA TERM
ANALYSIS

Checks for and sets ~lag
if it finds unary m1nus
in DATA statement.

Gl037 CONST
REGISTER
EXIT

Common exit routine for
constant recording routines; leaves pointer
to constant in WOe

addresses of WORK
EXIT roll bottoms.

ofand

from

on LOOP

Routine
Label Name
G1038 T AND F
CONST SCAN

Chart
Comments
Scans for logical
stants T and F in
statements.

conDATA

G1039 EXIT ANSWER General routine used by
set
all EXITs which
ANSWER
BOX to store
value in ANSWER BOX and
return.
Gl040 DEBUG STA
XLATE

Translates
mente

G1041 AT STA
XLATE

Constructs AT roll entry
from AT statement.

G1042 TRACE STA
XLATE

Constructs Polish notation for TRACE statemente

DEBUG

Gl044 IEYSKP
SKIP TO
NEXT
PROGRAM

Calls IEYFORT to skip to
end of present source
module when roll storage is exhausted.

Gl070 PRESS
MEMORY

Called by REASSIGN MEMORY
to obtain
additional
core storage from roll
space that is no longer
in use. If it obtains
32 or more bytes, exit
is back to
REASSIGN
MEMORY.
Otherwise,
exit is to IEYNOCR in
IEYFORT
to print NO
CORE AVAILABLE message.

The labels enumerated in the following
list are used in the flowcharts provided
for the illustration of the major routines
used by Allocate.
Chart
ID

"05CA
CA

G0362

CB

G0361
G0365

cc

G0371
G0372

CE
CF

G0374

CG

CD

_!!L_

G0381

CK

G043?

CL

G0397
G0401
G0402

CM
CN
CO

G0442
G0443
G0444
G0445
G0441
G0403
G0405
G0438
G0545

CP
CQ
CR
CS
CT
CU
CV
CW
CX

CH
CI

state-

G1043 DISPLAY STA Constructs Polish notaXLATE
tion and roll entries
for DISPLAY statement.

Label
G0359
G0451

Label
G0376
G037?

Routine Name
START ALLOCATION
ALPHA LBL AND L SPROGS
ALPHA
SCALAR ARRAY AND
SPROG
PREP
EQUIV
AND
PRINT
ERRORS
BLOCK DATA PROG ALLOCATION
PREP DMY DIM AND PRINT
ERRORS
PROCESS DO LOOPS
PROCESS LBL
AND
LOCAL
SPROGS
BUILD PROGRAM ESD

Routine Name

ENTRY~AME~LLOCATION

COMMON
ALLOCATION
AND
OUTPUT
PRINT
EQUIV
ALLOCATION
ERRORS
BRANCH TABLE
BASE
AND
ALLOC
SCALAR ALLOCATE
ARRA Y ALLOCATE
GLOBAL
SPROG
PASS
1
ALLOCATE
SPROG ARG ALLOCATION
PREP NAMELIST
LITERAL CONST ALLOCATION
FORMAT ALLOCATION
EQUIV MAP
GLOBAL SPROG ALLOCATE
BUILD NAMELIST TABLE
BUILD ADDITIONAL BASES
DEBUG ALLOCATE

SUPPLEMENTARY ALLOCATE LABEL LIST
The routines described in this section
are listed by G number labels which are
presented in ascending order. These routines are those used in the operation of
Allocate which are not shown in the section
of flowcharts for the phase.
Routine
Label Name
G0363 PREPROCESS
EQUIV

I G0364

REGISTER
ERRORS
SYMBOL

Comments
Checks the data contained
on the EQUIVALENCE roll
and
computes
the
required addresses.
Checks the ERROR SYMBOL
roll for the presence
of
error
just
the
All duplidetected.
cate entries are pruned
from the roll and all
new entries placed on
the roll.

G0366 CHECK DMY
DIMENSION

The dummy dimension is
checked for definition
as a global dummy variable, or in COMMON.

G036? GLOBAL DMY
TEST

Sets a pointer to the
dummy array
on
the
ENTRY roll; a pointer
to the ARRAY roll 1S
also set for each dummy
array.

G0368 DMY DIM
TEST AND
REG

The DMY DIMENSION roll is
rebuilt with the information
obtained from
the COMMON DATA TEMP,
TEMP,
and GLOBAL DMY
rolls.

Appendix E: Miscellaneous Reference Data

193

Routine
Label Name_
G0369 DMY DIM
TEST

G0370 DMY
CLASSIFY

Comments
The dimension
data is
checked for having been
previously defined on
the NAMELIST ITEMS and
COMMON DATA rolls.
Classifies a dummy, defining it as scalar if
undefined: if it is an
array sets call by name
tag.

G0373 REGISTER
BRANCH
TABLE

Places
work containing
zero
on
the BRANCH
TABLE roll.

G0375 PUNCH
REMAINING
ESD BUFFER
PUNCH
REMAINING
CARD

Punches a card.

G0378 SEARCH
ROLL BY
MAGNITUDE

GENERAL ALLOCATION
The
roll
is searched to
check if the largest
equivalenced area has
been allocated.

G0379 PRINT
COMMON
ERRORS

Sets up for, and prints,
COMMON allocation errors.

G0380 PRINT
COMMON
HEADING

COMMON storage map heading is printed.

G0382 EQUIV
ALLOCATION

Builds
the
EQUIV
ALLOCATION roll
from
the
boundary
calculated:
records
the
absolute
address assigned to the
variables.

G0383 FLP AND
PROCESS
EQUIV

Inverts the contents of
the EQUIVALENCE roll.

G0384 PROCESS
EQUIV

Constructs
complete
EQUIVALENCE sets on the
the GENERAL ALLOCATION
roll using information
on
the
EQUIVALENCE
roll.

G0385 INTEGRATE

194

Assigns locations relative to the first variable
listed for all
variables in an EQUIVALENCE set if not already allocated.

Routine
Label Name __
G0386 TEST FOR
BOUNDARY

Comments
fjets
and
checks
the
smallest
equivalenced
area and highest boundary required for allocation of the variables
indicated: resets program break according to
requirement.

G0387 CSECT EQUIV controls the allocation
of
EQUIVALENCE
sets
ALLOCATION
equal to or
greater
than 3K bytes into a
new control section.
G0388 PRINT CSECT Sets up and formats the
printing of the storage
EQUIV MAP
map
for
EQUIVALENCE
sets equal to or greater than 3K bytes.
G0389 BUILD
COMMON
ALL ROLL

Calculates the base and
displacement for EQUIVALENCE sets equal to or
greater than 3K bytes
and
registers
these
sets
on
the COMMON
ALLOCATION roll.

G0391 SEARCH FOR
LARGE
ARRAYS

Determines the size of
arrays not defined as
EQUIVALENCE or COMMON.
Obtains the arrays that
are equal to or greater
than 3K bytes.

G0392 BUILD A
NEW CSECT

SE~ts

G0393 PRINT A
ARRAY
CSECT MAP

SE!ts the information for
the printing of the map
for arrays equal to or
greater than 3K bytes.

G0394 CONV TEMP3
TO HEX

Converts the contents of
the temporary register
to hexadecimal.

G0395 GLOBAL DMY
ALLOCATE

Assigns storage for global
dummy
variables:
expands the contents of
the BASE TABLE roll, as
required.

G0396 TEST FOR
CALL BY

De'termines
whether
indicated variable
called
by
name
called by value.

NAME

the program name and
obtains a new control
section for the allocation of
arrays
and
EQUIVALENCE sets.

the
was
or

Routine
Label Name _
G0398 ALLOCATE
SCALAR
BOUNDARY

Sets
up allocation of
scalars
according to
the
size
of
the
variable.

G0399 ALLOCATE
SCALAR

Formats the allocation of
scalars not defined as
global dummies in COMMON or in EQUIVALENCE
sets.
Initializes for
the
printing of the
scalar map and calculates
the
base and
displacement.

G0400 CED SEARCH

G0404 ALLOCATE
SPROG

Determines if the variable is defined as a
global dummy, in COMMON
or in an EQUIVALENCE
set. If it is, it sets
the ANSWER BOX = true.
Sets the type of the ESD
cards that are to be
punched and initializes
for the allocation of
subprogram addresses.

G0406 ADJUST AND Sets the format for the
OUTPUT NAME
punching
of
the
NAMELIS~
name,
and
adjusts for storage.
G0407 PUNCH NAME
LIST AND
FIELD

Sets the format for the
punching of the address
allocated
for
each
NAMELIST according to
storage required.

G0408 OUTPUT MODE Sets the format for the
WORD
punching of the mode of
the NAMELIST variable.
G0409 ADVANCE
PROG BREAK
AND PUNCH

Increases the item PROGRAM BREAK according to
the storage allocation
required
for
the
variables indicated.

G04i0 PUNCH
LITERAL

Obtains the
number of
bytes and the address
of the roll indicated
for punching of literal
constants.

G04ii MOVE TO
PUNCH BUFF

Moves the indicated data
to
the
appropriate
punch buffer.

G04i2 PUNCH TXT
CARD

Punches
the
indicated
TXT card after setting
up
the
address and
buffer information.

Routine
Label Name
G04i3 PUNCH
REMAINING
TXT CARD

G04i4 PUNCH ESD
G0415 PUNCH LD
ESD

Comments
Punches
the
remaining
card indicated, after
the area from
which
data was being taken
has been punched.
Punches the indicated ESD
cards for the program
area indicated.

G0416 PRINT ERROR Prints the contents of
LBL ROLL
this roll which contains the errors noted
during operation.
G0417 CONVERT LBL Converts the label of an
erroneous statement to
BCD for printing.
G0418 PRINT ERROR Prints the contents of
SYMBOL
the ERROR SYMBOL roll.
G0420 PRINT
SCALAR OR
ARRAY MAP

Prints the indicated map.

G042i PRINT INIT
MAP
G0422 TEST AND
PRINT MAP

Checks the existence of
processing of a storage
map.
Initiates
the
printing of the
indicated map if one is not
already being printed.

G0423 PRINT MAP
HEADING

Prints the heading of the
indicated storage map
for
the
variables
designated.

G0424 PRINT
FORMAT MAP

Prints
map
statements.

G0425 PRINT
HEADING
MESSAGE

Prints the
dicated
messages.

G0426 PRINT MAP
PRINT MAP

Prints the variables associated with the storage map heading from
the rolls indicated.

ML

of

FORMAT

heading infor
error

Print the remaining inG0431 PRINT
REMAINING
formation in the print
BUFFER
buffer after the data
G0432 PRINT ERROR
has been obtained from
REMAINING
the indicated storage
BUFFER
area.
G0433 ALLOCATE
FULL WORD
MEMORY

Initializes
for
allocation of a
word of storage.

G0434 ALLOCATE
MEMORY
GOLn5 ALLOCATE
BY TYPE

Allocate storage according to the type of the
variable
indicated;
full word, halfword, or
byte.

Appendix E: Miscellaneous Reference Data

the
full

195

Routine
Label ~~me __
GO 4 36 CALCUL.ATE
SIZE AND
BOUNDARY
G0439 CALCULATE
BASE AND
DISP

Comments
Determines the size and
the boundary required
for the variable indicated.
Determines the base table
entry and displacement
for
variable
being
allocated, constructing
a new base table entry
if necessary.

G0440 REGISTER
BASE

Constructs
a new
TABLE roll group.

G0446 BUILD
FORMATS

The base and displacement
for FORMAT statements
are calculated and the
PROGRAM BREAK increased
as required.

G0447 INCREMENT
PNTR

Routine
Label Nalli!LG0460 CLEAR TWO
AND EXIT
FALSE

£Qjmments
Prunes two groups from
·the
WORK
roll,
and
exits
with
a false
answer in ANSWER BOX.

G0461 CLEAR ONE
AND EXIT
FALSE

Prlllnes one group from the
WORK roll, and exits
with a false answer in
l\NSWER BOX.

G0462 EXIT FALSE

Se1:s ANSWER BOX to false,
and exits.

G0464 CLEAR FOUR
AND EXIT

Prunes four
WORK
1:he
exits.

groups from
roll, and

G0465 CLEAR THREE Prunes three
t:he WORK
AND EXIT
E~xi ts.

groups from
and
roll,

BASE

Increases
the
address
field of the pointer to
the indicated roll so
that the pointer pOints
to the next group on
the roll.

G0448 ID CLASSIFY Variables are checked for
a previous classification as a global dummy,
a scalar, an
array,
global
sprog,
used
library function, or a
local sprog.

G0466 CLEAR TWO
AND EXIT

Prunes two groups from
t.he
WORK
roll, and
exits.

G0467 CLEAR ONE
AND EXIT

Prunes one group from the
WORK roll, and exits.

G0468 EXIT

obtains return
address
from the EXIT roll, and
that
transfers
to
address.

UNIFY LABEL LIST
G0449 REGISTER
SCALAR

Builds new group onto the
SCALAR roll.
The labels enumera'ted in the following
list are used in the flowcharts provided
for the illustration lOf the major routines
used by Unify.

G0450 MODE SET

Sets
the mode of the
variable to fixed or
floating, explicit or
implicit, or not used.

G0455 CLEAR THREE Prunes three groups from
AND EXrr
the WORK
roll,
and
TRUE
exits with a true answer in ANSWER BOX.
G0456 CLEAR T~-10
AND EXr['
TRUE

Prunes two groups from
the
WORK roll,
and
a
exits
with
true
answer in ANSWER BOX.

G0457 CLEAR ONE
AND EXIT
TRUE

Prunes one group from the
WORK roll, and exits
with a true answer in
ANSWER BOX.

G0458 EXIT TRUE
EXIT TRUE
ML

Set ANSWER
and exit.

Chart
Label
GOlll

07

Routine Name
STARTlrnIFY

G0145

DA

ARRAY

GOl13

DB

CONVERT TO ADR CONST

GOll2

DC

CONVERT TO INST FORMAT

GOl15

DD

DO

--.!!L-

REF ROLL ALLOTMENT

N:r~ST

UNIFY

SUPPLEMENTARY UNIFY LJl,BEL LIST

196

BOX

to true

The routines described in this section
are listed by G numbe'r labels which are
presented in ascending order. These routines are those used in the operation of
Unify which are not shown in the section of
flowcharts for the phase.

Routine
Labe! Name
GOl14 CALL GEN

Comments
Transfers
to
phase of the

the Gen
compiler.

Routine
Label Name
G0126 STANDARD
EXPS UNIFY

Comments
Processes STD SCRIPT roll
when
NONSTD
roll
entries have all been
processed or have never
existed. Moves entries
to next outermost loop.

GOl16 NOTE ARRAY
ALLOCATION
DATA

Processes
SCRIPT
roll
block to reflect storage allocation.

GOl17 LEVEL ONE
UNIFY

Sets variables for the
processing of a single
loop or the outer loop
of a nest of loops.

G0127 CONVERT
NONSTD
SCRIPT TO
STD

Picks a NONSTD roll entry
with a
m1n1murn displacement and processes
it as if it were a
standard script.

Controls the processing
of script data associated
with
current
innermost loop.

G0128 SIGN ALLOC
DISPLACEMENT

Utility routine to spread
the sign of negative
displacements.

G0129 DELTA GE
4087 UNIFY

Processes paired STD or
NONSTD
roll
entries
with DELTA greater than
4087 bytes.
Generates
second
register
and
LOOP CONTROL entries.

G0130 DELTA LE
4087 UNIFY

Processes paired STD or
NONSTD
roll
entries
with DELTA less than
4087 bytes.
DELTA is
placed in each ARRAY
REF entry in the chain.

G0131 ESTABLISH
REG
STRUCTURE

controls
formation
of
LOOP CONTROL and REG
roll groups for SCRIPT
pointer in WO.

G0132 EST. REG
GROUP

Forms REG roll entry for
SCRIPT pointer in WOe

G0133 ESTABLISH
LOOP
CONTROL

Entry to establish loop
control which sets up
stamps
for impending
LOOP CONTROL group.

G0134 EST. LOOP
CONTROL

Forms LOOP CONTROL group
for SCRIPT entry in Wl.

G0135 FORM OUTER
SCRIPT

Processes paired STD or
NONSTD
roll
entries
with
best
match in
inner
coefficients.
Forms SCRIPT entry for
next
outermost
loop
with coefficient differences in coefficient
slots.

GOl19 SWEEP
SCRIPT
EXP NOTE

Compares the area code
and the outer coefficient
of
all other
entries on the
NEST
SCRIPT roll to the bottom entry on the roll.

G0120 ZERO COEF
UNIFY

SWeeps the script entries
for the innermost loop,
determining whether the
outer coefficient
is
zero and that the inner
coefficients are also
the same.
Depending
upon the condition, the
loops are re-registered
on
the
LOOP SCRIPT
roll.

G0121 NOTE SCRIPT Establishes the nature of
EXP
the script entries as
standard
or
nonstandard.
G0122 ESTABLISH
STD SCRIPT
EXP

Forms the LOOP CONTROL
and REG roll entries
for each STD
SCRIPT
pointer found in WO,
also registering
the
STD SCRIPT LOOP CONTROL
rung.

G0123 NOTE HI
FREQ STD

Checks the frequency used
fora particular standard script expression,
and sets the frequency
count.

G0124 SCRIPI' EXP
UNIFY

Controls the processing
of
innermost
LOOP
SCRIPT
roll
entries
with matching area code
and outer coefficients;
also links each NONSTD
roll entry with each
STD roll entry, comparing
the
induction
coefficients.

G0136 NOTE SECOND Runs
the
ARRAY
REF
REG THREAD
thread,
removing. each
link to provide for the
second register.

Appendix E: Miscellaneous Reference Data

197

Routine
Label Name _
G0137 UPDATE
FREQS

G0138 REG SCRIPT
EXP

Comments
Sums the frequencies of
the STD or NONSTD pair
to indicate increased
usage.
Registers
the STD
or
NONSTD in WO on the STD
or NONSTD roll.

G0139 PRUNE
SCRIPT REL
TO PNTR

Utility routine to remove
SCRIPT groups.

G0140 NOTE ARRAY
REF DELTA

Adjusts the information
indicated
from
the
SCRIPT allocation according to the displacement to the
associated ARRAY REF roll
entries.

G0141 REALIZE
REGISTERS
SWEEP

G0142 NOTE HI
FREQ REG

G0143 ASSIGN
TEMPS FOR
REGS

Sweeps the REG roll, ass1gning available registers to the registers
and temps, according to
the frequency of use of
the registers in the
REG roll.
Utility
routine
which
notes
the
REG roll
group indicating
the
highest
frequency of
use.
Places next temp into the
ARRAY REF run and adjusts the LOOP CONTROL
stamps to reflect temp
usage.

chart
ID

Routine Name
ST.1\RT GEN

Label
<;0491

-os

G0499

EA

ENTRY CODE GEN

G0504

EB

PROLOGUE GEN

G0508

EC

EPILOGUE GEN

G0712

ED

GE'r POLISH

G0493

EF

LBI. PROCESS

G0515

EG

ST1\ GEN

G0496

EH

STA GEN FINISH

SUPPLEMENTARY GEN LlillEL LIST
The routines described in this section
are listed by G number labels which are
presented in ascending order.
These routines are those used in the operation of
Gen but not shown in the section pertaining
to the phase.
Routine
Label Name _
G0494 CLINCH

Comments
Clears the base
table.

register

G0497 ZERO THE
ACS

Clears the accumulators
to be used.

G0498 MOVE ZEROS
TO T AND C

Fills
the
indicated
number of groups on the
TEMP
AND CONST roll
with zeros.

G0500 INSERT PROG Puts
name
of
source
NAME IN
module on CODE roll.
CODE
GOSOl MAIN
PROGRAM
ENTRY

Builds instructions for
·the entry into the main
program.

G0144 CONVERT REG Performs
the
actual
rO USAGE
transfer of REG or TEMP
roll entries into the
ARRAY REF threads.

GOS02 PRO AND EPI De1termines
the address
ADCON GEN
constant for prologues
and epilogues for the
instruction
that
is
created.

GEN LABEL LIST

G0503 ADCON MAKER Builds ADtON roll group
GEN
and
places
adcon
instruction
on
CODE
roll.

The labels contained in the following
list are illustrated in the flowcharts
provided with the description of the Gen
phase of the compiler.

198

G0505 LOAD DMYS
GEN

Builds the code to load
1:he
dummy
arguments
specified
in
a
subprogram ..

Routine
Label Name
G0506 BUILD DMY
ARRAY DIM

G0507 CALCULATE
DMY DIM

Comments
Determines
the
dummy
array dimensions spec1fied in the arguments
for the subprogram.
Calculates
the
dummy
array dimensions specified as arguments to a
subprogram, and builds
the
appropriate
instructions.

G0509 RESTORE DMY Restores the dummy arguGEN
ments for value transfer at the end of a
subprogram.
G0510 TEST CALL
BY NAME

Determines whether
the
arguments to a subprogram were designated as
call by name values.

G0511 BUILD A
MOVE DMY
GROUP
G0512 BUILD A
STORE DMY
ADD
G0513 INCREMENT
DMY PNTR
G0514 BUILD A
LOAD TWO

These
routines
build
the instructions that
transmit the indicated
values transferred by
the dummy azguments to
subprogram.

G0516 ASSIGNMENT
STA GEN

Controls the construction
of
the code for an
assignment statement.

G0517 AFDS s'rA
GEN

Controls and constructs
the instructions for an
arithmetic
fUnction
definition statement.

G0518 AFDS INIT

Initializes the construction of the code for an
arithmetic
function
definition statement by
constructing the label
and jump instructions.

G0519 ASSIGN STA
GEN

Constructs
the
code for
an
statement.

G0520 IF STA GEN

Constructs
the
object
code
for
an
IF
statement.

G0521 LOGICAL IF
STA GEN

object
ASSIGN

the
object
Constructs
code for a Logical IF
statement.

Routine
Label Name
G0522 BUILD JUMP
INST

G0523 GO TO STA
GEN
G0524 ASSIGN GO
TO STA GEN
G0525 GO TO JUMP
GEN

Comments
Constructs a branch instruction, with input
indicating
type
and
branch point.
These
routines control
and
construct
the
object code required to
execute the indicated
type of GO TO statement.

These routines construct
G0526 CGOTO STA
the object code for a
GEN
G0527 CGOTO FOR
GO TO statement that is
CALL RETURN
the subprogram return.
GEN
G0528 CONTINUE
STA GEN

Returns.

G0529 BLOCK DATA
GEN

Sets up the rolls and
data used in the construction of the object
code for the BLOCK DATA
statement.

G0530 STA INIT

Stores
the
statement
number
and
leaves
statement drives in WOe

G0531 DATA STA
GEN

Determines the use
mode
of
the
variables
and
structs the object
based
on
information.

G0532 ALIGN DATA

Adjusts
the
data for
instruction format.

G0533 INIT FOR
VAR

Obtains the base, size,
displacement, and area
code of the indicated
variable and
adjusts
the instruction format
for
the
variable
according to the information obtained.

G0534 MOVE DATA

Sets up the beginning of
the
data
for
card
format.

G0535 MOVE TO
CARD IMAGE

Obtains the location of
the indicated data for
transfer to instruction
format.

Appendix E: Miscellaneous Reference Data

and
data
concode
this

199

Routine
Label Name _
Comments
G0536 MOVE TO
Controls the insertion of
CARD REPEAT
the data into the card
format and the punching
of the appropriate TXT
card.

Routine
Label Name __
G0556 10 STA GEN

ConUllents
Determines the type of
input/output statement
that is indicated and
transfers to the routines that process that
particular
type
of
statement.

G0537 PUNCH A TXT Write a TXT card from
CARD
data whose location is
G0538 PUNCH A TXT
provided.
CARD ML
G0539 PUNCH TXT
ENTRY 2

G0557 INIT 10
LINK GEN

Initiates and sets data
for the generation of
the input/output linkage.

G0542 CALCU:LATE
VAR SIZE

G0558 UNIT 10
ARG

Determines the
logical
unit number
of
the
input/output device.

G0559 DIRECT 10
ARG

Sets up controls for the
construction
of
the
object code for directaccess
input/output
statements.

G0560 FORMAT 10
ARG

Sets up data pertaining
to the FORMAT for the
construction
of
the
object
code
of
an
input/output statement
under format control.

G0561 10 INITIAL
ENTRY GEN

Sets up code for the call
to
IBCOM to control
execution of the indicated
input/output
statement.

G0562 BUILD UNIT
ARG

Constructs argument passed for unit number in
input/output linkages.

G0563 BUILD A
LINK ARG

Constructs
the
object
code for the arguments
designated
in
the
input/output
statements.

G0564 BUILD
FORMAT ARG

Constructs
the
object
code for the designated
format control of an
input/output statement.

G0565 GRNTEE 10
LINK ADD

Constructs
code for
linkage.

G0566 IOL DO
CLOSE GEN

Ge'nerates object code for
closing of implied DO
in I/O list.

G0567 10 LIST
GEN RUN

Determines whether I/O
list is DO implied.

Determines
size of
a
variable from TAG field
of pointer in WOe

G0543 END STA GEN Builds code for AT if
required and branches
to TERMINATE PHASE.
G0547 BSREF STA
GEN

controls the construction
of the object code for
a BACKSPACE, REWIND, or
END FILE statement.

G0548 STOP PAUSE
STA GEN

Constructs
the
object
code
for a STOP or
PAUSE statement.

G0549 LOAD IBCOM

Builds an instruction for
a call to the IBCOM
routine.

G0550 RETURN STA
GEN

Builds the object code
for a RETURN statement.

G0551 ENTRY STA
GEN
SPROG
STA GEN

Constructs the label instruction for an ENTRY
statement or the entry
into a subprogram.

G0552 DEFINE FILE Constructs
the
object
STA GEN
code instructions for
the
DEFINE
FILE
statement.
G0553 GRNTEE A
TEMP

G0554 ILLEGAL
AFDS STA
GEN

Ensures that the constant
from
DEFINE FILE is
registered on the TEMP
AND CONST roll.
Generates an error link
for a statement function which was invalid.

G0555 ILLEGAL STA Constructs a no-operation
GEN ENTRY
instruction
and
an
error link
for
the
statement in error.

200

the
object
input/output

Routine
Label Name
G0568 IOL DO
OPEN GEN

Comments
Sets up the data for the
generation of instructions for input/output
DO loop.

Routine
Label Name
G0581 LOOPS OPEN
GEN

Comments
Obtains the DO control
data and controls the
construction
of
the
appropriate
instructions.

G0569 IOL ARRAY
GEN

Generates
linkage
for
secondary array entry
to IBCOM.

G0582 INIZ LOOP
GEN

G0570 10 LIST
PNTR GEN
IOL PNTR
GEN

Determines the type of
the I/O list, and controls the construction
of the object code for
the list.

Determines the nature of
the indicated DO loop
after
determining
whether a loop exists.

G0583 INIZ GIVEN
COEFF GEN

G0571 10 LIST
ARRAY PNTR
GEN

Sets
up the data and
determines the type of
array list.

Constructs
the
object
code for the initialization of the indicated
induction
variable
coefficient.

G0584 DO CLOSE
SBR

G0572 BUILD
ELEMENTS
ARG

Builds an argument for
input/output
linkage
for a single element in
an I/O list.

Constructs
the
object
code for the close of a
DO loop after setting
up
controls for the
increment and terminal
values
of
the loop
iteration.

G0585 FIND COEFF
INSTANCE

Determines the existence
of the indicated nature
of a loop through comparison of the designated
traits
and
coefficient.

G0586 NOTE TEMP
REQ

G0573 10 LIST DMY Builds the object code
ARRAY
for a dummy array I/O
list.
G0574 GLOBAL DMY
TEST

Determines
whether the
variable in
question
has
been defined in
usage
as
a
global
dummy.

G0575 10 STA END
10 STA END
GEN

Generates call for end of
I/O list.

Determines
whether
a
register
has
been
assigned for the script
expression in question
or whether a temporary
storage is required.

G0576 BUILD 10
LINK

Controls construction of
the object code to terminate an input/output
operation.

the
load of
G0587 INITIALIZE Generates
BY LOAD GEN
registers to be used
throughout a DO loop.

G0577 LOAD
ADDRESS
I BCOM

Inserts the absolute call
to the system input/
output routine, IBCOM.

G0588 GRNTEE TEMP Builds a store instrucSTORED GEN
tion for the temporary
storage used by
the
script expression.

G0578 INIT IBCOM
PNTR AND
ENTRY

Initializes for processing
of
input/output
statements by storing
code word and
IBCOM
pointer
from
POLISH
roll.

G0589 GRNTEE
SOURCE REG
LOADED

GO 579 CALCULATE
LENGTH AND
TYPE

Determines the length and
type of variables designated
in
input/
output statements.

Determines the area and
location for the register to be used by the
script expression, and
generates
the
load
instruction
for
the
indicated
temporary
storage.

G0590 INCR GIVEN
COEFF GEN

Determines the nature and
use of the loop increment
and builds the
appropriate
instructions for the execution
of the increment.

G0580 DO STA GEN

Determines the nature of
the DO statement, sets
up the data for the
code of the statement.

Appendix E: Miscellaneous Reference Data

201

Routine
Label Name __
G060? CALL STA
GEN

Comments
Calls the routines which
build the object code
for the CALL statement.

G0608 FLP AND
PREP VAR

Flips POLISH
roll and
moves first variable to
WORK roll.

G0609 EXP GEN
BY MODE

Controls the determining
the
of the mode of
indicated expression.

Routine
Label Name
G0623 DRIVER GEN

comments
If an array driver, goes
to SCRIPT PREP; if not,
exits false indicating
end of an expression.

G0624 AND GEN

Generates code for an AND
operation.

G0625 AND FINISH
GEN

l~ctually

builds an AND
operation on CODE roll.

G0626 OR GEN
G0610 EXP GEN AND Generates code for expression on bottom of
GRNTEE AC
POLISH roll and ensures
that result is in a
register.

Generates code for an OR
operation.

G062? OR FINISH
GEN

}~ctually

G0611 GRNTEE EXP

Guarantees that the mode
of the expression is
positive.

G0628 PREPARE FOR S:ets up the data, for the
LOGICAL GEN
statement containing a
logical operation.

G0612 EXP GEN

Obtains
the expression
for GEN processing.

G061) GEN RUN

Determines the operation
mode of the entity in
question.

builds
an OR
operation on CODE roll.

G0629 EQ GEN

Generates code for an EQ
relational operation.

G0630 NE GEN

Generate~

G0631 LT GEN

Generates code for an LT
relational operation.

G0614 NOT GEN
Inverts sign
indicator
UNARY MINUS
for variable on bottom
GEN
of WORK roll.

G0632 GT GEN

Generates code for a GT
relational operation.

G0615 DIV GEN

Controls production
of
object code for divide
operation.

G0633 GE GEN

G1enerates code for a GE
relational operation.

G0634 LE GEN
G0616 INTEGER
DIV GEN

Generates code for
ger divide.

inte-

Generates code for an LE
relationa~ operation.

G061? SUB GEN

Generates code for
tract operation.

sub-

G0635 RELATIONAL
GEN

G0618 ADD GEN

Generates code
operation.

Builds the object code
instructions based on
the relational condition specified in the
logical operation.

G0619 MPY GEN

Controls production
of
object code for multiply operation.

for

add

code for an NE
relational operation.

G0636 P}{EPARE FOR Converts and adjusts data
RELATIONAL
for construction of the
object code of a relational comparison.

G0620 INTEGER MPY Generates code for inteGEN
ger multiply.
G0621 INTEGER MPY Common end for multiply
DIV END
and divide generation
routines;
records
register usage.

G0637 POWER GEN

G0622 SUM OR PROD Guarantees that one of
GRNTEE
the two elements
on
WORK
roll
is in a
register and that mode
of operator is correct.

G0638 POWER AND
Sets up the
data for
COMPLEX MPY
operations
involving
DIV GEN
multiplication or division of exponentiated
or complex variables.

202

Builds
linkage
roll.

exponentiation
on the CODE

Routine
Label Name
G0639 INTEGER
POWER GEN

G0640 SPROG GEN

G0641 SPROG GEN
SUB

comments
Builds the
appropriate
load
and
mUltiply
instructions for exponentiation depending on
the
mode
of
the
operation.
Determines the nature of
the operand of a CALL
statement
or
of
a
subprogram.
Generates the code for a
subprogram call including
argument
calculations.

G0642 SPROG END
GEN

Constructs
the
object
code for the return or
close of a subprogram.

G0643 SPROG ARG
SEQ GEN

controls the interpretation of the sequence of
arguments designated to
a subprogram.

G0644 REG SPROG
ARG

Controls
the
register
assignment
to
subprogram arguments
as
they are encountered in
sequence.

G0645 GRNTEE ADR
GEN

G0646 TEST CONST
ARG
G0641 TEST AND
STORE REGS

GUarantees
that
the
subprogram
arguments
are assigned and builds
the indicated load and
store instructions.
Determines mode of a constant
subprogram
argument.
Tests to determine if any
register
used as an
accumulator
contains
data; if so, generates
code to store the contents in a temporary
location.

G0648 GRNTEE AC
GEN

Stores the contents of
WO in an accumulator if
not already designated.

G0649 GRNTEE NEW
AC GEN
G0650 PICK A NEW
AC
G0651 PICK FL
AC
G0652 PICK A
COMPLEX AC

These routines
determine the accumulator to
be used in an indicated
operation
depending
upon the mode of the
variable in question.

Routine
Label Name
G'O'653 CLEAR A
PAIR
G0654 PICK A
PAIR
G0655 PICK A
PAIR END

Comments
These routines determine
and clear a pair
of
fixed or floating accumulators depending on
the type of the register in WOe
These
routines are used in
integer,
multiply,
divide,
and
complex
operations.

G0656 TEST FOR
BEST PAIR

Determines the two optimal accumulators to be
used for the operation
indicated.

G0651 GRNTEE
POSITIVE
GEN

of the
Sets the mode
accumulator
indicates
not
to positive
if
set,
and
already
generates
appropriate
code.

G0658 COMP FX
CONST
G0659 COMP FL
CONST
G0660 COMP DP
CONST

Set the mode of the indicated constant.

G0661 COMP
COMPLEX
CONST

Sets the
mode of the
indicated constant.

G0662 CORRECT FOR complements the value
SIGN DATA 1
DATAl.

in

G0663 INCLINE
FUNCTION
GEN

Sets up table for the
generation of code for
in-line functions.

G0664 CONVERSION
FUNCTION
GEN

Generates code to perform
an in-line mode conversion.

G0665 ABS
These routines generate
FUNCTION
the
object
code instructions for the inGEN
G0666 MOD
line function indicated
FUNCTION
by the name of the rouGEN
tine.
G0661 INT FUNCTION GEN
G0668 AIMAG FUNCTION GEN
G0669 CMPLEX
FUNCTION
GEN
G0610 TWO ARG
INLINE
COMMON
G0611 CONJG FUNCTION GEN

Appenqix E: Miscellaneous Reference Data

203

Routine
Label Name _
G0672 SIGN FUNCT
GEN
G0673 DIM FUNCT
GEN
G0674 GRNI'EE
BOTH MODES

£Q!!!ments
(see Label G0665)

Sets the mode of the data
in Wo and Wi to positive if not
already
set.

Routine
Label Name
G'O"6'82 TEST DP
CONST

Conunents
Exits false if pointer in
Wo is not to a doubleprecision
constant;
otherwise, loads constant into central area
and exits true.

G0683 COMPLEX
CONVERSION

Determines
the mode of
the variable in Wi and
transfers to the appropriate conversion routine depending on the
mode of WOe

Determines the mode and
nature of the two components of the complex
variable or constant.

G0684 DP COMPLEX
CONVERSION

Determines the mode and
registers the indicated
double-precision
complex
variable
or
constant.

G0676 LOGICAIr
CONVERSION

Places the logical variable contained in Wo
into an accumulator.

G068S COMPLEX
AC TEST

Sets up FL AC roll for
proper pointers to a
value
converted
to
complex.

G0677 FX
CONVERSION

Places the variables contained in WO and Wi in
an accumulator if the
mode is 1*2; otherwise,
a conversion to floating point is made.

G0686 AC END AND Used during conversion,
CONV RETEST
to set up AC roll,
and
to
determine whether
conversion is complete.

G0678 FL
CONVERSION

Tests the contents of Wo
and Wi for
floating
variables or constants.
If the contents are not
floating variables or
constants, i t
determines the nature of the
data,
registers
the
variable or constant,
and assigns an accumulator for the
operation,)

G067S GRNTEE
MODE Wl

G0679 CONVERT TO
COMPLEX
END

Generates code to clear
the imaginary register
and
loads
the real
register in real
to
complex conversion.

G0680 TEST A FL
CONST

l~xi ts

G0681 DP
CONVERSION

204

false if pointer in
WO is not to a floating
constant: otherwise, it
loads the constant into
central area and exits
true.

Determines the nature of
the
double-precision
variable
or constant
indicated,
converts
into the indicated format, assigns an accumulator, depending on the
mode of the variable.

G0687 CONVERT
RETEST

Sets up WORK roll so that
Wi
GRNTEE MODE
can
determine
whether
a
conversion is complete.

G0688 REGISTER
WORK CONST

Records constant in Wo as
an integer constant.

G0689 REGISTER FX Register
the
constant
from DATA area on the
CONST
G0690 REGISTER FL
indicated roll if not
CONST
already defined; constant is compiler genG069i REGISTER DP
CONST
erated.
G0692 REGISTER
COMPLEX CONST
G0693 REGISTER DO
COMPLEX CONST
G0695 FLOAT A FX

Converts a floating constant or generates code
to convert a floating
variable to fixed mode.

G0696 FIX A FL

Converts
a fixed mode
constant or generates
code to convert a fixed
variable
to floating
mode.

G0697 FLOAT AND
FIX COMMON

Common exit for routines
which write code
to
float or fix variables.

G0708 TEST AC
AC TEST

Determines
whether the
mode of the indicated
accumulator is fixed or
floating.

Routine
Label Name
G0709 AC END

Comments
Determines whether one or
two accumulators
are
being used.

G0710 GRNTEE AC
ZERO

Assures that the accumulator being used in the
operation is register
zero.

G0711 SPOIL STO
REG

Clears appropriate entry
on AC
roll
for
a
register which has been
stored.

G0713 CLEAR THREE Remove indicated number
AND EXIT
of groups from
WORK
TRUE
roll, set ANSWER BOX to
G0714 CLEAR TWO
true, and return.
AND EXIT
TRUE
G0715 CLEAR ONE
AND EXIT
TRUE
G0716 EXIT TRUE
EXIT TRUE

Sets ANSWER BOX
and returns.

G0718 CLEAR THREE Remove indicated number
AND EXIT
of
groups
from WORK
FALSE
roll, set ANSWER BOX to
G0719 CLEAR TWO
false, and return.
AND EXIT
FALSE
G0720 CLEAR ONE
AND EXIT
FALSE

Bui~ADCON

roll and
returns a pointer to
the start of a group on
the roll.

G0731 CHECK JUMP
LBL

Determines whether pointer in Wo refers to a
jump target label.

G0732 MADE LBL
MAKER

Creates entry on BRANCH
TABLE
roll for made
label,
and
returns
pointer
to
group
created.

G0733 SCRIPT PREP Sets up the data for
calculation
of
indicated script
pression.

the
the
ex-

G0734 CALCULATE
SCRIPT

Determines the mode
and
operation of the variables contained in the
script expression.

G0735 TEST END
SCRIPT

Determines the end of the
script expression.

G0736 CALCULATE
OFFSET AND
SIZE

Determines the size of
each element contained
within an expression,
and
the displacement
pertaining
to
each
array.

G0737 GRNTEE REG

Place the index values
for arrays in register
9 if not already set.

Sets ANSWER BOX to false
and returns.

9

G0738 TEST AND
STORE REG 9
G0739 BUILD A
SHIFT 9

Builds a shift register 9
instruction
for subscripting; shift length
is determined by array
element size.

G0744 BID INIT
G0745 BIM INIT
G0746 BIM BID
INIT
G0747

Initializes data for the
contsruction of the instruction designated by
the BID, BIN, or BIM
POP instructions.

G0748 EXIT FULL

Used on entry to BIN when
BIN
fills
the EXIT
roll.

ML

G0723 CLEAR THREE Remove indicated number
EXIT
of groups from
WORK
CLEAR THREE
roll and return.
AND EXIT
G0724 CLEAR TWO
EXIT
CLEAR TWO
AND EXIT
G0725 CLEAR ONE
EXIT
CLEAR ONE
AND EXIT
G0727 EXIT
EXIT ML

Comments

to true

ML

G0721 EXIT FALSE
EXIT FALSE

Routine
Label Na~
G0730 ADCON MADE
LBL MAKER

Returns.

G0728 EXIT ANSWER Sets ANSWER BOX and exits
ML
for EXIT routines which
set ANSWER BOX.

BID
BIDPOP

This is the
assembler
language routine which
constructs the instruction designated by the
BIDPOP instruction.

Appendix E: Miscellaneous Reference Data

205

Routine
Label Name_
G0750 BIN
BINPQP

G0751 NOTE A
CSECT

Comments
This is the
assembler
language routine which
constructs the instruction designated by the
BINPOP instruction.
This routine obtains the
Control
section
in
which
the
current
instruction being generated is to be placed.

G0752 BIM
BIMPOP

This is the
assembler
language routine which
constructs the instruction designated by the
BIMPOP instruction.

G0753 RX FORMAT

General routine used to
build
all
RX
type
instructions.

G0754 RR FORMAT

This routine implements
the RR format designation for the instruction being generated.

G0755 ADDRESS
MAKER

Used to build all base,
displacement, and index
type addresses.

G0756 BUILD A
BASE REG

Determines the base location within a particular control section at
which the object code
instructions begin.

G0757 SCALAR
OPERAND
ARRAY
OPERAND
GLOBAl.
SPROG
OPERAND
USED F'UNCTION LIB
OPERAND
NAMEs LIST
OPERAND
FORlJ'AT LBL
OPERAND
GLOBAL DMY
OPERAND

Builds address for the
specified type of operand.

G0758 DMY LBL
COMMON

Generates address
FOMAT references.

Oments
Builds address for reference
to
subprogram
argument list.

G0761 BRANCH
TABLE
OPERAND

Builds address for references to made labels.

G0762 BRANCH
TABLE
COMMON

Used by LBL and BRANCH
TABLE OPERAND routines
to contstruct address.

G0763 BRANCH
SPROG
COMMON

Used by LBL, BRANCH TABLE
and SPROG ARG OPERAND
to construct address.

G0764 T AND C
OPERAND

Constructs
address for
references to temporary
storage or constants.

G0765 T AND C
COMMON

Used for T AND C OPERAND
and pointers to constant rolls.

G0766 T AND C B
COMMON

exit
for
all
Common
temporary
branch and
constant operand
and
routines.

G0767 LOCAL DMY
OPERAND

Determines the base location for the indicated
operand and builds the
code data from
this
information.

G0768 FX CONST
OPERAND

Determines the size of
the
fixed
constant
operand and constructs
the instruction depending upon this information.

single-precision
G0769 FX FL CONST Moves
constant
pointed
to
SEARCH AND
TEMP AND CONST roll if
REG
FL CONST
not already on roll.
OPERAND
G0770 FX FL CONST Performs part of move of
COMMON
constant to TEMP AND
CONST roll.
for

G0759 LBL OPERAND Builds address for referLOCAL SPROG
ences to labels and
OPERAND
statement functions.

206

Routine
Label !!~!!!~ __
G0760 SPROG ARG
OPERAND

G0771 SEARCH AND
REG SP
CONST
SEARCH AND
REG FX
CONST
SEARCH AND
REG FL
CONST

Searches TEMP AND CONST
roll, registers
constant if not already
there,
and
returns
pointer to TEMP
AND
CaNST roll group.

Routine
Label Name
G0772

REGSP

CONST

Comments
Registers
single-precision constant on TEMP
AND CONST roll.

G0773 DP FL CONST Construct
address
for
OPERAND
references to doubleCOMPLEX
precision
real
and
CONST
single-precision
comOPERAND
plex constants.
G0774 SEARCH AND Ensures that a doubleREG DP CONST precision
real
or
SEARCH AND
single-precision
comREG COMPLEX
plex constant is on the
CONST
TEMP AND XONST roll and
returns a pointer to
it.
G0775 REG DP
CONST

Registers a new doubleprecision constant on
the TEMP
AND
CONST
roll.

G0776 DP COMPLEX
CONST
OPERAND

Constructs address
for
reference to a doubleprecision complex constant.

G0777 SEARCH AND
REG DP
COMPLEX
CONST

G0778 REG DP
COMPLEX
CONST

Ensures that a doubleprecision complex constant is on the TEMP
AND CONST
roll
and
returns a pointer to
it.
Registers a new doubleprecision complex constant on the TEMP AND
CONST roll.

G0779 TEST DOUBLE Determines if the address
WORD
designated to the variBOUNDARY
able or constant in Wo
begins on a doubleword
boundary.
G0780 ARRAY REF
OPERAND

G0781 LOAD REG
FROM TEMP

G0782 ARRAY PLEX
OPERAND

Handles array reference
pointers
to
obtain
scripted
arrays
addresses.
Generates a load of a
base register from a
temporary storage location.
Handles building addresses when array plex is
the indicated operand.

G0783 SRCH AND ST Stores register 9 in a
X9 FROM
temporary register if
ARRAY PLEX
needed for generation
of array plex addresses.

Routine
Label Name
G0784 STORE IN
TEMP

Comments
Generates code to store
that register in a temporary location if Wo
is
a
pointer to a
register.

G0785 STORE AND
RETURN
TEMP

Uses a temporary location
in checking temporary
pointers for the indicated constants.

G0786 SEARCH
TEMP ROLL

Beginning with a pointer
to the TEMP PNTR roll
in WO, searches for an
available temporary already defined. Returns
true, with pointer to
TEMP AND CaNST roll if
found;
otherwise, returns false.

G0787 OPERAND RUN Selects processing routine
for
present
operand from pointer.
G0930 SPOIL STO
Determines whether pointVAR
ed to variable is being
SPOIL STORE
used in subscript which
VAR
is now
contained in
register 8 or 9; if so,
spoils that register.
G0931 SPOIL STORE Determines
whether
a
VAR NON
stored variable which
READ 10
has not appeared in a
READ should be stored.
G0932 CLEAR ONE
AND SPOIL
CEAD

Determines if pointed to
variable
is
COMMON,
EQUIVALENCE, alterable,
or .dummy; if so, spoils
any register containing
a subscript which uses
any CEAD variable; and
prunes one group from
WORK.

G0933 SPOIL CEAD

Same as CLEAR ONE AND
SPOIL CEAD except it
does
not prune WORK
roll.

G0934 TEST A CEAD Tests to determine
if
variable pOinted to by
wo is COMMON, EQUIVALENCE,
alterable, or

dummy.
G0935 NO ARG
SPROG END
GEN

Entry point for generating a subprogram call
without arguments.

Appendix E: Miscellaneous Reference Data

207

Routine
Labe! Name _
Comments
G0937 SIMPLE
BuildS---ARRAY PLEX roll
SCRIPT PREP
for subscripts handled
in registers 8 and 9.

Routine
Label Names
G0953 BIN
VARIABLE

G0938 CLEAR 3
EXIT BIN
G0939 CLEAR 1
EXIT BIN

Exits from BIN, BIM and
BID
POP
subroutines
which remove the indicated number of groups
from WORK.

G0954 RETURN
SCALAR OR
ARRAY PNTR

Returns
pointer
to a
SCALAR or ARRAY roll
group from less direct
reference ..

G0940 EXIT BIN

Exits from BIN, BIM, and
BID POP subroutines.

G0955 DEBUG INIT
GEN

Generates DEBUG linkage
for INIT variables.

G0941 SUBCHK GEN

Builds code for SUBCHK
entry if required.

G0942 SIMPLE
SCRIPT
OPERAND

Generates the code
to
compute
a
subscript
value to be held in
register 8 or 9.

G0943 TEST FOR
HIT

Determines whether register 8 or 9 already
contains the
present
subscript.

Comments
Puts name of
CODE roll.

variable on

NAME

G0956 DEBUG SHORT Generates DEBUG linkage
LIST INIT
for INIT of a full arGEN
ray.
G0957 DEBUG DMY
INIT GEN

Generates DEBUG linkage
for INIT of a dummy
variable.

G0958 DISPLAY STA Generates DEBUG
GEN
for
a
statement ..
G0959 DEBUG INIT
ARG GEN

linkage
DISPLAY

Generates
DEBUG
calls
after a CALL statement.

G0944 LOAD
SIMPLE X
REG

Generates code to set up
register 8 or 9.

G0945 PICK A NEW
SIMPLE X
REG

Determines whether register 8 or 9 will be used
for
subscript
which
must be loaded.

The labels enumerated in the following
list are used in the flowcharts provided
for the illustration of the major routines
used by Exit.

G0946 CALC ELEM
SIZE AND
SHIFT

Calculates array element
size and the length of
shift necessary to multiply by that value.

G0947 AT STA GEN

Generates the object code
for an AT statement.

G0948 TRACE ON
STA GEN

Generates DEBUG linkage
for
a
TRACE
ON
statement.

G0949 TRACE OFF
STA GEN

Generates DEBUG linkage
for
a
TRACE
OFF
statement.

Label
G0381
G0382
G0383
G0384
G0399
G0400
G0402
G0403
G0404
G0405
G0416
G0424
G0564

EXIT LABEL LIST

G0950 DEBUG
Generates initial linkage
INITIAL
to DEBUG.
LINKAGE GEN
G0951 DEBUG VAR
ADR GEN

Generates
address
for
INIT
or
SUBCHK
variable.

G0952 DEBUG
ELEMENTS
GEN

Generates number of elements for DEBUG linkage.

208

Chart
ID

-09
FA
FB
FC
FD
FE
FF
FG
FH
FI
FJ
FK
FL

Routine Name
EXIT PASS
PUNCH TEMP AND CONST ROLL
PUNCH ADR CONST ROLL
PUNCH CODE ROLL
PUNCH BASE ROLL
PUNCH BRANCH ROLL
PUNCH SPROG ARG RO~L
PUNCH GLOBAL SPROG ROLL
PUNCH USED LIBRARY ROLL
PUNCH ADCON ROLL
PUNCH RLD ROLL
PUNCH END CARD
PUNCH NAMELIST MPY DATA

SUPPLEMENTARY EXIT LABEL LIST
The routines described in this section
are listed by G number labels which are
presented in ascending order. These routines are those used in the operation of
Exit which are not shown in the section of
flowcharts for the phase.

Routine
Label Na~ __
G0385 SWEEP CODE
ROLL
SWEEP CODE
ROLL ML

Comments
DetermInes the nature of
a word on the CODE roll
and processes it according to type.

G0386 PUNCH INST
PUNCH INST
ML

Determines the type of
instruction
to
be
punched (one, two, or
three halfwords).

G0388 PUNCH TWO
HALFWORDS

Sets up a two halfword
instruction format.

G0389 PUNCH ONE
HALFWORD

Sets up a one halfword
instruction format.

G0390 PUNCH
THREE
HALFWORDS

sets up a three halfword
instruction format.

G0391 PUNCH CODE

Punches
the
indicated
instruction
in
the
indicated format.

Routine
comments
~~!!!~ __ _
Transfers the indicated
<;0409 MOVE CODE
code to the output area
TO TX'l' CARD
to be punched.
Label

format
G0410 INITIALIZE Initializes the
for the punching of the
TXT CARD
G0411 INITIALIZE
TX'l' cards.
TXT CARD ML
G0412 PUNCH
PARTIAL
TEXT CARD

Punches any part of a 'IX'l'
card.

G0413 PUNCH A
CARD ML

Punches
card.

G0414 PUNCH AN
ESD CARD

Sets the format
punching
of
card.

G0417 DEPOSIT
LAST ESD
NO. ON
RLD CARD

Obtains and deposits the
last ESD number on the
indicated RLD card for
punching.

G01418 DB SECOND
RLD WORD
WITH CONT

Sets the format of a card
with a continuation to
a second card.

a

complete

TXT

for the
an ESD

G0392 ABS PUNCH

Sets up for the punching
of object module absolute constants.

G0393 RELOC
CONST
PUNCH

Sets the format for the
punching of a relocatable absolute constant.

G0419 DB SECOND
RLD WORD
WITH NO
CONT

Turns off the continuation indicator for the
punching of the RLD
card.

G0394 ABS CONST
PUNCH
ABS CONST
PUNCH ML

Punches the indicated absolute constants
in
the object module.

G0420 DB SECOND
RLD WORD

Places the second word
into the RLD format in
the output area.

G0396 DEFINE LBL

Defines indicated label
on BRANCH TABLE roll.

G0421 DEPOSIT
WORD ON
RLD CARD

G0397 ADCON
PUNCH

Punches the address constant indicated in Wo.

Places the indicated word
into the
appropriate
location
in the RLD
format.

G0398 POC DAT~
PUNCH

Sets up the information
needed for the listing
and punching of code
contained on the CODE
roll.

G0422 PUNCH AN
RLD CARD

Punches the indicated RLD
card.

G0423 TERMINATE
RLD
PUNCHING

Determines
whether the
RLD card is full and
sets controls accordingly.

G0425 LIST CODE

Sets up the format for
the object module listing, and determines the
instruction format for
each indicated instruction to be printed.

G0426 RS OR SI
FORMAT

Determines
whether the
indicated
instruction
is RS or SI format.

G0401 SWEEP BASE
BRANCH
ROLL

Initializes
for
the
punching of the groups
contained on the BASE
and BRANCH TABLE rolls.

G0406 HALF WORD
WO TO TXT
CARD

A

G0407 WO TO TXT
CARD
WO TO TXT
CARD ML

Transfers the contents of
WO to the outpu~ area
to be punched.

halfword
instruction
format is set up for
the contents of WOe

Appendix E: Miscellaneous Reference Data

209

Form Y28-6638-1
Page Revised 7/23/69 by TNL Y28-6829
Routine
Label ~~~ __ _
G0427 RS FORMAT

G0428 SI FORMAT

G0429 RX FORMAT

G0430 RR FORMAT

Routine
Label ~~!!!~--­
(;0443 PRINT
HEADING
PRINT
HEADING
ML

Comments
SetS-up-the RS format for
the indicated instruction.
Sets up the SI format for
the indicated instruction.
sets up the RX format for
the indicated instruction.
sets up the RR format for
the indicated instruction.

I

G0444 PRINT
COMPILER
STATISTICS

Comments

Prints--

the
indicated
heading that is to
appear on the object
module listing_

Sets up the indicated
message in the print
output area.

G0445 PRINT CSECT Sets up
the indicated
MEMORY
message in the print
REQMTS
output area.
MESS
G0446 PRINT
CSECT
TOTAL
MESSAGE ML

Sets up the indicated
message in the print
output area.

G0447 PRINT
CSECT
MESSAGE

Sets up the indicated
message in the print
output area.

Sets up the format tDC
format) for the address
constants in the object
module that are to be
listed.

(';0448 CONV AND
PRINT
D2(B2) ML

Converts the
indicated
general register designation for the RX,
RS,
and RR formats.

G0433 DC LIST

]:,ists

G0449 CONV AND
PRINT
D1Bl ML

G0434 PRINT
ADCON
LBL

Sets controls for the
printing of the indicated address constant.

Converts the
indicated
address
and
general
register
designation
for the SI
and
SS
formats.

G0435 PRINT }\
MADE LBL

Sets controls
for the
printing of the indicated label that has
been
created by the
compiler.

G0431 SS FORMAT

G0432 ADCON LIST

Sets up the SS format for
the indicated instruction.

DC

constants.

G0436 MADE LBL
ADCON LBL
COMMON

Inserts the
indicated
label into the print
output area.

G0437 PRINT A
LBL

Prints the indicated
label on the
object
module listing.

G0438 PRINT BCD
OPERAND

G0439 PRINT A
LINE
PRINT A
LINE PLUS
ONE ML
G0440 PRINT A
LINE ML

210

Inserts the indicated operand into the appropriate position of the
object listing in the
output area.
Print the indicated line
once a full line has
been set up in the output area.

G0450 CONV AND
Converts the
indicated
PRINT 02 ML
address and
general
CONV AND
register
designations
PRINT Dl ML
to instruction format.
G0452 CONV AND
converts the
indicated
PRINT Bl ML
address and
general
CONV AND
register
designations
PRINT B2 ML
to instruction format.
G0453 CONV AND
converts the
indicated
PRINT R2 ML
address and
general
CONV AND
register
designations
PRINT X2 ML
to instruction format.
G0454 CONV AND
converts the
indicated
PRINT 12 ML
address
and
general
register
designations
to instruction format.
G0455 CONV AND
Converts the
indicated
PRINT Rl ML
address and
general
CONV AND
register
designations
PRINT Ll ML
to instruction format.
G0456 CONV WO AND Converts the contents of
PRINT
WO to decimal and inCONVERT WO
serts into print output
AND PRINT
area.

Routine
~Name

gomment~

GOQ58 CONV AND
PRINT PLUS
ONE ML

Converts a number to decimal
and
places in
print buffer.

GOQ59 PRINT A
COMMA ML

Places a comma into print
output area.

GOQ60 PRINT A
LEFl' PAREN

Places a left parenthesis
output
into the print
area.

ML

G0461 PRINT A
Places
right
parenRIGHT PAREN
thesis into the print
output area.
ML
G0462 PRINT A
CHAR ML

Places
the
indicated
the
character
into
print output area ..

G0464 CLEAR ONE
EXIT
CLEAR ONE
AND EXIT

Prunes one word from the
WORK roll and exits.

Routine
Label Name
GOQ65 EXIT
EXIT ML
EXIT
ANSWER ML

Comments
obtains the last entry on
the
EXIT
roll
and
transfers to the indicated
location.

G0566 RLD ALIGN
SWEEP TE

Sorts RLD entries so that
all RLDs in one CSECT
appear together.

G0561 RLD ALIGN
TEST
SWEEP TEST

Determines whether present
RLD is in
the
CSECT now being constructed.

G0569 GET ADR
FROM PNTR

Gets location on DATA
roll from pointer
WOe

ML

Appendix E: Miscellaneous Reference Data

VAR

in

211

Order No. GY28-6638-1, page revised 1/15/11 by TNL GY28-6841

This appendix describes the logic of the
FORTRAN IV library subprograms.
As the
compiler examines the user's FORTRAN source
statements and translates them into an
object module, it recognizes the need for
certain operations the library is designed
to perform. At the corresponding points in
the object module, the compiler inserts
ca~~s to the
appropriate library subprograms.
At linkage edit time, copies of
these library subprograms are made part of
the load module. Then, at execution time,
the library subprograms
perform
their
various
functions.
The nature of the
user's program determines which and how
many library subprograms are included in
his load module.

SYSTEM GENERATION OPTIONS
At system generation time, the user
makes several choices which determine the
exact makeup of his FORTRAN IV library.
These concern:
BOUNDARY ALIGNMENT OPTION: If this option
is selected, the IHCADJST
routine
is .
included (as a member of the link library).
When specification interrupts occur, this
routine is loaded to attempt correction of
object program data misalignment.
EXTENDED ERROR HANDLING OPTION: If this
option is selected, expanded versions of
some library routines are included. These
provide:

The library performs a variety of functions, which are of five general types:
• load module initialization and termination activities
• input/output operations
• error handling
• data conversion
• mathematical and s~rvice functions
It is an important library responsibility
to form an interface between the load
module and the operating system: library
subprograms interface with the data management access methods, provide exit routines
for
the
system interrupt handler and
abnormal termination processor, and call
the supervisor for various services.

The precise composition and size of a
user's version of the FORTRAN IV library
will depend on what options he chose at
system generation time. The actual location of his permanent library copy (the
partitioned data set SYS1.FORTLIB) is also
dependent on his installation choice.
A few subprograms, commonly thought of
as FORTRAN IV library members, and discussed in this appendix, are not actually
members of SYS1.FORTLIB.
Instead, they
reside in the link library, to be loaded if
needed by true library routines at execution time.

212

• more precise error messages
• in some cases, more extensive library
corrective
action
and
continued
execution
• the ability for the user to choose his
own or the library's corrective .action
The library modules affected by this option
are listed in Table 9. A user's library
will include either one set of modules or
the other.

Table

9.

Routines Affected by
Error Handling Option

Extended

r--------------------T--------------------,
Without
I
With
I

I
I
I

Extended
I
Extended
I
Error Handling
I
Error Handling
1
.--------------------+--------------------~
1
IHCFCOMH
I
I HCECOMH
I
I
IHCUOPT*
I
I HCUOPT*
1
I
IHCDIOSE
I
IHCEDIOS
I
I
IHCFIOSH
I
I HCEFIOS
·1
I
IHCFINTH
I
I HCEFNTH
1
I
IHCTRCH**
I
I HCETRCH
1
I
I
IHCERRM***
I
I
1
IHCFOPT
1
.--------------------~--------------------~
I *The size differs, although not thel
I
name.
1
1 **With Extended Error Handling, ICHTRCHI
I
becomes an entry pOint in IHCETRCH.
1
1***Without Extended Error Handling,
1
IL_________________________________________
IHCERRM is an entry pOint in IHCTRCH. J1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

One other module is affected by system
generation choice. IHCUATBL, the data set
reference table, has both its length and
some contents determined at this time.
MODULE SUMMARIES

I HCFCOMHIIHCECOMH
This module (with its CSECT extension
IHCCOMH2)
handles the load module
initialization and termination activi~i~s, ~~! 3~quential and direct access
inputloutput operations. It also contains switches, addresses, and save
areas (at constant displacements from
its entry pOint IBCOM#) that are used
by other library routines.
I HCNAMEL
This module directs NAMELIST read/
write operations (entry point FRDNL#
for reads, entry point FWRNL# for
writes) •
IHCFIOSH/IHCEFIOS
This module interfaces with the basic
sequential access methods to do all
sequential input/output for the load
module. It is called (at entry point
FIOCS#) by IHCFCOMH/IHCECOMH and
IaCNAMEL
to perform user-requested
read/write and device
manipulation
operations, and by other library routines
(such as IHCERRM, IHCFDUMP,
and IHCDBUG)
to write error
mesages, tracebask maps, user-requested
dumps, debug information, etc.
IHCDIOSE/IHCEDIOS
This module interfaces with the basic
direct access methods to do all direct
access input/output for
the
load
module. It is called by the compilergenerated code (at entry point DIOCS#)
for DEFINE FILE statements, and by
IHCFCOMH/IHCECOMH (at
entry
point
I BCENTRY) for READ, WRITE, and FIND.
I HCFCVTH
This
module
does data conversion
required by other library routines.
It is called (at entry point ADCON#)
for formatted and namelist
input I
output, and for other library operations (such as traceback) that require
EBCDIC output.
IHCIBERH
This module is called by the compilergenerated code (at entry point IBERH#)
to terminate load module execution due
to source statement error.

IHCTRCH
This module (entry point IHCERRM) is
the library error handling routine
when extended error handling has not
been specified. It is called by other
library routines to direct message
printing and produce traceback maps.
IHCETRCH
This module produces traceback maps
when the extended error handling facility is present. It can be called by
the error monitor IHCERRM (at entry
point IHCTRCH), or by the compilergenerated code (at entry point ERRTRA)
at user request.
IHCERRM
This module is the error monitor when
extended error handling has been specified (otherwise, it is an entry point
in IHCTRCH).
It can be called by
other
library
routines
detecting
errors (at CSECT name IHCERRM), by
IHCFCOMH/IHCECOMH
for
termination
error summary (entry point IHCERRE),
and by the compiler-generated code at
user request (entry point ERRMON) for
handling of
user-detected
errors.
IHCERRM directs its error handling
activities according to the entries in
the option table, IHCUOPT.
IHCUOPT
This module is the option table.
In
addition to a preface, it contains one
entry for each library-defined and
user-defined error condition.
These
entries are used by the error monitor
IHCERRM to direct its handling of
errors.
IHCFOPT
This module satisfies user requests to
examine and modify the option table
IHCUOPT. It is called at entry points
ERRSAV, ERRSTR, and ERRSET by the
compiler-generated code.
IHCFINTH/IHCEFNTH
This module handles certain program
interrupts. It is called by the system interrupt handler at entry point
ARITH#.
IHCADJST
This module, which is included in the
link
library
only
if
the user
requested boundary alignment at system
generation
time,
is
loaded
by
IHCFINTHlIHCEFNTH to attempt correction of data misalignment that has
caused a specification interrupt.

Appendix F:

Object-Time Library subprograms

213

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

I HCSTAE
This modul·e, which resides in the link
library, is the STAE abnormal termination
processor.
When
IHCFCOMH/
IHCECOMH receives control (at entry
pOint
EXI'!'RTN1)
from
the system
because the load module has been scheduled for abnormal termination, it
loads IHCSTAE to attempt completion of
outstanding
input/output
requests
before execution ends.
IHCUATBL
This module is the unit assignment
table.
It contains information about
the user's data set references, and is
used by the library input/output routines in their operations;
I HCFDVCH
This module is called by the compilergenerated code (entry point DVCHK) at
user request to determine if a divide
check interrupt occurred.
IHCFOVER
This module is called by the compilergenerated code (entry point OVERFL) at
user request to determine whether or
not overflow or underflow interrupts
occurred.
I HCFSLIT
This module is called by the compilergenerated code (entry points, SLITE,
SLITET) at user request to set or test
private
switches
("pseudo-sense
lights") •
IHCFEXIT
This module is called by the compilergenerated code (entry point EXIT) at
user request to terminate load module
execution.

214

IHCFDUMP
This module is called by the compilergenerated code (entry points DUMP,
PDUMP) at user request to produce a
dump
of
specified areas of main
storage.
IHCDBUG
This module is called by the compilergenerated code (entry point DEBUG#) to
direct
the
production
of
userrequested debugging information.

__ -EQY!i~§:
Information on
these library modules can be found in the
publication IBM Systeml360 Operating System: FORTRAN IV Library--Mathematical and
Service Subprograms, Order No. GC28-6818.

~-!HE~!!£~~

LIBRARY INTERRELATIONSHIPS
It is helpful to recognize that there is
not
always
a
one-to-one relationship
between library functions
and
library
modules. Some functions require the execution of several modules, and, conversely,
some modules are involved with more than
one function.
certain library modules are calledprimarily by the compiler-generated code,' but
a large number are called only by other
library modules or by the system.
This
relationship is illustrated in Figure 16.
In interfacing with each other, with the
system
and with the compiler-generated
code, library modules use n2n§~~~ calling and register-saving procedures.

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Library routines
entered initip1ly
from compil er~
generated code

C

o
M
P
I
L
E

R
G

E
N
E

R

Library routines
entered only
from other
library routines
or the system:

-----

-----

IHCoBUG

I HCAoJST

IHCFDUMP
IHCFoVCH

IHCFCVTH

IHCFEXIT

IHCFINTHI
IHCEFNTH

IHCFOPT
IHCFOVER
IHCFSLIT
IHCIBERH
IHCNAMEL

A

IHCFIOSHI
IHCEFIOS

o

I HCSTAE

E

IHCTRCH

A

IHCUATBL

T

P
R

I
N

IHCUOPT

T
E

G

o

s

y
S

o
B
J
E

T
E
M

C

T

C

o

o

E

Library routines that fall Into both
categories, being entered sometimes
from the compiler-generated code, and
sometimes from other library routines
or the operating syltem:

~-------

- -- -------

I HCFCOMH/I HCECOMH
I HColOSE/1 HCE 0105
IHCETRCH
IHCERRM
Mathematical routines

Figure 16.

Calling Paths for Library Routines

The library is responsible for the load
module's initialization activities. Every
compiler-generated main program begins with
a branch to the IBFINT section of IHCFCOMH/
IHCECOMH.
This library routine performs
the following initialization procedure:
• Saves the load module entry point in
its location MAINEP, and the main program's save area pointer in its location REG13.

• Issues a SPIE macro instruction specifying library control
for
program
interrupts 9, 11, 12, 13, 15, and, if
boundary alignment was selected at system generation time, 6.
• Issues a STAE macro instruction specifying library control if the system
schedules the load module for abnormal
termination.
• Calls IHCFIOSH/IHCEFIOS
object error unit.

Appendix F:

to

open

the

Object-Time Library subprograms

215

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Control is then returned to the main
gram, which begins its processing.

pro-

INPUT/OUTPUT OPERATIONS
Processing FORTRAN input/output requests
is
mainly
the
responsibility of the
library. For each request, the compiler
sets up a call(s) to the appropriate entry
point in' the appropriate library routine.
For NAMELIST READ/WRITE, the call is to
IHCNAMEL, which
then
calls
IHCFIOSH/
For DEFINE FILE,
IHCEFIOS and IHCFCVTH.
the call is to IHCDIOSE/IHCEDIOS. For all
other operations, the call is to IHCFCOMH/
IHCECOMH. If the operation is sequential
READ/WRITE, the IHCFCOMH/IHCECOMH routine

216

calls IHCFIOSH/IHCEFIOS (and also IHCFCVTH
if format control is present).
If the
operation is REWIND, BACKSPACE, or ENDFILE,
the
IHCFCOMH/IHCECOMH
routine
calls
IHCFIOSH/IHCEFIOS.
If the operation is
direct access READ, WRITE, or FIND, routine
IHCFCOMH/IHCECOMH calls IHCDIOSE/IHCEDIOS
(and IHCFCVTH if format control is present).
If the operation is STOP with
message,
or
PAUSE,
routine IHCFCOMH/
IHCECOMH calls the supervisor.
This flow
is outlined in Figure 17. For each direct
access or sequential read/write request,
the compiler-generated code issues multiple
calls to IHCFCOMHtIHCECOMH:
an initial
call, one call for each item (either variable or array) in the I/O list, and a final
call.
Thus, the FORTRAN statement READ
(23,100)Z,Y,X results in five consecutive
calls to IHCFCOMH/IHCECOMH.

Order No. GY28-6638-1, page revised 1/15/71 by TNL

GY28-68~7

COMPILER-GENERATED OBJECT CODE

DEFINE
FILE

NAME LIST
READ/WRITE

all other
I/O requests

IHCFCVTH
converts
and moves
user's I/O
data

IHCFCOMHI
IHCECOMH
interprets
request

sequential
READ, WRITE.
BACKSPACE,
REWIND.
ENDFILE

access
READ,
WRITE,
FIND

IHCDIOSE/
IHCEDIOS saves
DEFINE FILE data;
submits I/O request
to data management

IHCNAMEL
interprets
request

write to
operator
(STOP and
PAUSE)

IHCFIOSH/IHCEFIOS
submits request
to data management

I I

,I ,... __

II
\

I

""---

.....

-----

----------

--

load module

-

-

-

-

**

--,

I

\
I

--II-

I I

operating
system

I I
I

Basic Direct
Access Methods

Figure 17.

Supervisor

control Flow for Input/Output operations
Appendix Fa

Basic Sequential
Access Methods

*If Format is present
"For pre-formatting new data sets before writing user's data

Object-Time Library Subpro;rams

217

Order' No. GY28-6638-1, page revised 1/15/11 by TNL GY28-6847

DEFINE FILE
The
compiler-generated code branches
directly to IHCDIOSE/IHCEDIOS at
entry
point
DIOCS#.
This section takes the
address of the parameter list containing
the data set characteristics supplied by
the user and places it in the appropriate
unit assignment table (IHCUATBL) entry.
There may be more than one data set defined
per DEFINE FILE statement,
in which case
DIOCS# loops through the definitions, plac1ng the parameter list addresses into the
tab.le.
If a data set has been
previously
defined, the new definition is ignored.
If
the data set requested is sequential rather
than direct,
IHCERRM is called with error
condition 235 indicated.
If the data set
is the object error unit, IHCERRM is called
with error 234 indicated.
DIOCS# also places the address of the
section IHCDIOSE/IHCEDIOS
that
handles
actual reads and writes--IBCENTRY--into a
fixed location in IHCFCOMH/IHCECOMH,
in
order to establish addressability for later
branching.
If the user fails to place his
DEFINE FILE statement ahead of his associated
READ
or WRITE statement,
this
address will not be available, and an error
condition will occur.
DIOCS# returns to the compiler-generated
code.

SEQUENTIAL READ/WRITE WITHOUT FORMAT
Initial

C~11

The initial call
is
to
IHCFCOMH/
IHCECOMH,
which
saves
END= and ERR=
addresses, if they are present,
in its
locations ENDFILE and IOERROR, respectively, and then branches to IHCFIOSH/IHCEFIOS,
passing along the data
set
reference
number.
IHCFIOSH/IHCEFIOS uses this data set
reference number to consult the corresponding entry in' the table IHCUATBL.
(This
table is explained in Figures 18 and 19.)
The
initialization
action
taken
by
IHCFIOSH/IHCEFIOS depends on the nature of
the previous operation performed on this
data set. The previous operation possibilities are:
• no previous operation
• previous operation was read or write
218

• previous operation was backspace
• previous operation
file

was

write

end

of

• previous operation was rewind
NO PREVIOUS OPERATION:
IHCFIOSH/IHCEFIOS
must create a unit block, which will contain the DCB,
DECBS,
and other library
information to be used in
cdntrolling
operations.
Space for the unit block is
acquired with:a GETMAIN, and a pointer to
it is stoted in the IHCUATBL entry.
(The
contents of the unit block are outlined in
Figure 20.)
IHCFIOSH/IHCEFIOS inserts certain standard values. into the DCB in the unit block.
It does this by mov,ing in a copy of a
nonfupctioning skeleton DCB, which specifiesOSORG asPS,MACRF as (R,W), 'DDNAME as
FTmlF001, and gives addresses in :IHCFIOSH/
IHCEFIOS for SYNAn and EODAD~ and for
EXLST, which specifies the OPEN exit routine.
IHCEFIOSH/IHCEFIOS puts the data set
reference number into the nn field of the
DDNAME. This establishes for the system
the connection between this DeB and the
user's DD card, which must have' ,the same
name on it.
IHCFIOSH/IHCEFIOS now issues an OPEN
macro instruction, which merges ~he user's
DO information,
and label infprmation if
the data set already exists. Wheri'its open
exit routine (IHCDCBXE) gains
control,
IHCFIOSH/IHCEFIOS examines th~ DCB.
t£
fields are zero, indicating the user has
omitted
corresponding
DD
parameters, :
IHCFIOSH/IHCEFIOS inserts library: default:
values.
(These default values are· stored·
in the IHCUATBL entry.)
After completion of the OPEN macro,'
IHCFIOSH/IHCEFIOS
places'
the
buffer
address(es) in the housekeeping 'section of
the unit block,
and also in the DECB(s).
It also puts the DCB address ,into the
DECB(s).
If this is a read op~ration, it
sets the first byte of th~ type of input/
output request field i~ the DECB(s) to
X'SO', indicating the reads shol,lld be of
blocksize; if this is a write operation, it
sets this byte to x'OO', indicating the
writes should be of logical record length.
If the initialization is for a read
operation, IHCFIOSH/IHCEFIOS no~ issues a
READ macro, with a CHECK,
filling .the
buffer.
If double buffering is in effect,
it also issues a seconp READ macro, ,to
begin filling the second: buffer~"" (This
READ is not checked until IHCFlbSH/lHCEFlOS
is entered the next time for this data
set. ) Control is return'ed, to IHCFCOMH/
THCECOMH, along with address and length of
the data that was read •

If the initializatton' is fot::"'a write
operation, ',IHCFTOSH/IHCEFIOS simply: i,t'eturns
to IHCFCOMH:lIHCECOMHl'" pa,ssing the;"a'd6ress
and' length' of 'the' • buffet .';{The' actual
write' operation' will' not take!' plab'e: until
IHCFCOMH/IHCECOMH fills'the' buff'er,~ )
~
{

,

,

in'tb:, thEfbuffer. >FOr an: "array;:! 'IHCFCbMH/'
:tHcECOMHi;repeat's :theprocess:, emptying the
a'tray~ el!ement "'by'.'elemerit~\" After
adjusting
ii!!j" ,bu'fferr'po±nt'er' :SO it pOints to either
thEfl tri~xt :,data'itemor thehexteinpty space,
IHCFCOMH/IHCECOMH returns to the' compilergenerated code.

"

PREVIOUS OPERATION--READ OR WRITE:

In'this
the
unit block in existence.
The DECB is set
to indicate the proFer action (either"'te'tid
or write).
If 'this 'is a, write'req-uest,
control is :re'turned" to ' IHCFCOJ!ll'H/IHCECOMH
with buffer address ana "length. If;iJt is a
read" request,
the' READ' inacrb is 'i~su:ed to
fill the buffer, and the address'andlength
of the data'that was read'is passed 'back to
IHCFCOMH/IHCECOMH.

case;~he-data-set-Is-already-open and

PREVIOUSOPERATION"'-B~~KSPA'C~':

tibn'

is

The procedure is the same:; as for the
first list item, with these exceptions.
When IHCFct>MfLI'IHCECOMH is) pfodess1.ng: 'a "read
req,uesl:.'· a:J!fd!fiirid'B lit has'~mI1t.ied~ the buff~
er, it calls IHCFIOSH/lHCEFliOS ,'to it'sue
another READ ma,cro and refill it.
If
do\Jble 'bUff'ering" \ ;t's~'i-n:: eflecti\'! IHCFt06KY
I,HCEFIOS: ipass~s ''tl1e 1~ ,'address'! of the other
btlff.r(afte:r" iCh~c){inqthe. R'EAD:\,<-:macro for
that buffe'tl,~::a:nd"'then: i'sSUes ai'READ macro
instruction for the buffer just emptied,
always: :keepln9 ohe; READ ' aheaa~
, ':,

>The' 'Oper'li-

slme' ~~~ 'fdt,,~pr~vious
Operatio'n-~Rea'd or wti te"' deScribe8' above,
except that priming of buffer(s) may be
needed.
~,Ithe

I '

PREVIOUS "OPERATION--END FILE:'
IHCFIOSH/
IHCEFIOS must first 'close the' existing datia'
set,
and, process a new one. 'To proce's's a"
new data set, IHCFIOSH/IHCEFIOS' increments'
the sequence'humber of the DONAME field in~
the old DCB:
for examp'le; FT14FOOl is'
changed to FT14FO 02"
'The OP'EN procedure
described' above under' "No'" Previous opera;;..'
tion"
is then, followed .. , (The librarty
assumes the user has a FTnnF002'DD card fo'r
this new data set.)
The' usual read or'
write procedure is used.
PREVIOUS OPERATION--REWIND:
The data set
has-been-closed;-and-mn6tlbe reopened.
The
procedur~ is the
same as' that described,':
under "NO Previous Operation," beginrtihg'
after th~' creating of the unit block~
In'allof the above cases,
IHCFIOSHI
IHCEFIOS
returns
to IHCFCOMH/IHCECOMH~'which saveS" the buffer pointer and 'length,
and' then returns 'to the co~piler~generated
code.
' '",

. .'d

second Call

.;

", , .. j

~;. _

1

I

I'
, ~

',:,':'.

I

j

.;;
I

,.

"

i

,

~~,

,"

,"

..~

:1

Fina'i
I"

Call
I)

P

,f

~

,~

.• r •

.~

:,'

.

.. , !

, : Ft)r a' 'it'ead operat.ion; the :fual.tl' pro~ratfl i
passes control't.o 'IHCFCOMH/IHCECOMH' which
passes control on to IHCFIOSH/IHCEFIOS.
If
IHCFIOSH/IHCEFIOS finds that, for this data
set,
physical records are larger than logical records,
it
simply
returns
to
IHCFCOMH/IHCECOMH, which returns' '''to "the>
compiler-generated object code. If physical records are shorter than logical records;) ;'IHCFIOSR/IHCEFIOS 'issu~li; 'READ 'Ina,erOS
until: "it reaches' the"'~end:bf')theIGgica'l::
record. : ThHf posit.ions :the; ;devit:!e, at;: the,
beginning of tlie" next logical"record,'r.iti
preparation: 'for sUbsequent "'F()~TAAN 'R~Al>:
re9u:ests' fot this-unit.;'"
I.',

" .: i

~.

i·

:

:: F'()r~', a': w'ri t'e'

i

,.~~.{

, 'When' :'" I HCFCOMR"'lHCECOMH' ,; is "processing a
write request and finds itih~~1G~illed the
buffer, it calls IHCFIOSH/IHCEFIOS to issue
the ,: ac,t.ual 'WRITE macro';; "Ifi'dbuble i)'uff e'rJ.
ing is in effect, IHCFIOSH'IIH:
. ;

':"i': ". .

r.

.....1

12n

column reset
(n=.l-byte

I contrql
J

I . . ..
;"'i:1
I , .
r :.';.
:,
.;.. .':
. 1
I Save!! for use by' F.~,· ·anci... b ~oqyers}pns~.t
I ·
. '..
,.
, "" .. 1
1Reset current pesi tion within r,ecord . ,-.;.
I!!.th column qr byte.

l,

".

1

1

.

:

1

~".I

. "; '.'

.I

IValUe)
'skip or blank J cOJ'}trol
1Skip !! chaz;acter.s of an. input rec~rd. or.' ,
1(n=l-byte
,
linsert!! blanks in an output record.
I
1value)
' I
"
1

1

.' . '

1

Ili teral data 'control
'Move ~ characters ~rom~n input. rec9',r~: 1;0.1
I
, l i t h e F()RMAT, statement, o~! chaz:~c~ers ,'fJ"~ 1
I ,
I
1th~ FORMAT statement;. to an output . x:ecord~ 1

~------.L----_------.L--------------;L.--_-------.L---------

I~:
I

1

, " l . ,." ~.: ... ;' ...... ; ';1

s,cali~g factor cbntrql

18n

1Save location for possibleJ;epeti tion of 1
1the format codes; clear counters.
1
1
.. '. :
. , . " '.' , ':.
'"
,save!! a-nd location ofleft'parenthesi's
1

(n=J.-byte
1
I for possible repetition of the format
value: ot .
I
IGodes; .i;n the, group. .
"
repeat count; I
,'
.. ,'. "
set 1(0 1 if no
1
.: ":';
repeat c o u n t ) ,
;.' .

08*

I • text' lAw
lor nH

I

.

.,.

_________________ -___________ ._;;..:__

~

* is a 1-byte value of!!. if !! was positive; if negative,it is th~,va~9~ piusl
128Cdecimal).
:.
.1
w = 1-byte value of field width.
1
d = 1-byte va lue of number of digits after the decimal pOint.. ,"
'
;
I

L _____________________ - _______________________________ ___ ~~--~-~--_~-~---~~---~-~~~~~~~~~

222

orderNo.'GY2S-663S-1) page revised 1/15/71 by TNL GY28-6S47

Table ,10.

F6rmatcode Translations :andTheirMeclning9 : (Part 2 of '2)

..

'r-~-:-~-I~~d~""~f~;~:~T-~~~~~-:~~~,-"'r:-'~-'~~~---1 ~J~..i~,-~~~:~~;-----'---"'----~----------------,
I
I Compiler or,
',
l ; ' -,

I
I

I
I IHCFCOMH/ ,
I
I'
I
I Source' IHCECOMH
I
I t '
'"
I FORMAT I Translation I.
',,"
,l
,
I' " , :
,',
I Code 't '(in hex)
ID~s'cription ' : 'tType"'"
I corresp<>ndtngAction by IHCFCOMH/IHCECOM-H I

~------+-----------+--------------+----------+------------------------------------------~

IFw.dIOA w.dIF~convers~onlc~nversionIIHcFCOMH/IHC~COMli passes the values of w, I
l oc 'w.d,IE.;.con,:,ers:dJi "lc~rlV'ers~onl~ !a~d'~ -'-p~us 'in'formation':about: 'the list I
low.d--I,OE w.d
ID-conv'~rs7,on ,.Icon.ve,~sl.onl'l!tem':art;d 'the'-bu'ffe:t-- to the ci'ppropriate ' I
Irw
'110 w
1I-coJlve'rs~o~, conver~~on I section of "IHCFCVTH' for c'onversion.
I
lAw
114 w
I'A-conve,rs~on
I,'c:o~vers~on I
I
IGw. d ,120 w. d
IG-conver~!)l.on '-I'c'onver'sl.on I ' ,
I
' I Lw
'116 w
I L-convet"'sion 'I-c'on:version I :
, :,
I
I Zw
1 24 w
'I Z-,convers ion
f conY:er:s ion I '
I
I
t
t"l'
:,)
I': , , ,
I
I)
1C
I group -end
,Icontrol
ITest"r No.

GY2~-6638-1,

page revised 1/15/71 by TNL GY28-6847

If the user passes any other number,
IHCFDUMP
chooses 0 (hexadecimal)
default format.
The procedure is identical for
PDUMP, except for two things:

as

a

DUMP and

• if DUMP finds an input/output corrective action routine is in process, it
functions normally~ PDUMP,
however,
instead of processing, goes to section
ERR904 in IHCFCOMH/IHCECOMH to print
prror messaqe 904 and to terminate load
module
ex~cution.
(An input/output
corrective action routine in process is
indicated by the first byte of SAVE in
IHCFCOMH/IHCECOMH set to anything other
than X'FF'.)
• after normal processing, DUMP goes to
the IBEXIT section of IHCFCOMH/IHCECOMH
to terminate load module execution:
PDUMP,
however,
returns to the caller
for continued execution.
IHCFDUMP uses IHCFCVTH and IHCFIOSH/
IHCEFIOS
to assist in its operations.
After getting the address of IHCFIOSH/
IHCEFIOS from IHCFCOMH/IHCECOMH, IHCFDUMP
branches to initialize for printing.
It
next moves a section to be dumped into the
IHCFIOSH/IHCEFIOS buffer,
and determines
the format type requested.* It passes this
information to the FCVZO part of IHCFCVTH
('Z' output), for conversion.
Lastly, it
branches to IHCFIOSH/IHCEFIOS to print out
the line. IHCFDUMP loops in this manner
until it exhausts the calling list.
If,
during
the printing,
IHCFIOSH/
IHCEFIOS indicaies it has encountered an
input/output error, IHCFDUMP skips the remainder of its work.
\-

IHCDBUG
has a single entry point-DEBUG#--which is the head of a branch
table. This table is outlined in Table 12.
Table 12.

1

Iplace-I
to
I
Iment ISection I

236

I

Function of Routine

o

TRACE

Pass label of statement I
to be traced
I

4

SUB'IREN

Pass subprogram
entry

8

SUBTREX

Pass 'RETURN' on subprogram exit

12

UNIT

Initialize
reference
output

16

INlTSCLR Pass data for initialized
variable

20

INITARIT Pass data for initialized
artay element

24

INITARAY Pass data for initialized
array

1

name

data
number

on

I

set
for

SUBCHK

Pass data on
array element

32

TRACEON

Turn on trace switch

36 .

TRACEOFF Turn off trace switch

40

DISPLAY

Display referenced items

44

STARTlO

Begin input/output
operation

28

L ______

*IHCFDUMP I"xpects tl.e format type requested
to correspond to the format of the data in
main storage.
Therefore, asking it to
print out an INTEGER variable in REAL
format,
for example, will result in a
garbled dump.

I

~------+--------+-------------------------~

48

IHCDBUG is called by the
compilergenerated object code to implement most
user DEBUG requests.
Generally,
IHCDBUG
assembles
debug
information
and uses
IHCFlOSH/IHCEFIOS to write it out.
lHCDBUG
may also have occasion to use IHCFCVTH (for
data conversion), IHCNAMEL (to produce DISPLAY requests),
IHCUATBL (to obtain the
default object error unit number),
and
IHCFCOMH/IHCECOMH (in which to store user
reqisters).

IHCDBUG Transfer Table

r------T--------T-------------------------,
IDisIBranchesl

referenced

I

IENDlO
lEnd input/output
I ________ I opera
tion
____ - __________________ _

~

~

In addition to the 13 routines listed in
the branch table, IHCDBUG uses the following subroutines:
• OUTITEM, which puts a data item into
DBUFFER
• OUTNAME, which puts the name of an
array or variable into DBUFFER
• OUTINT, which converts an integer to
EBCDIC
• OUTFLOAT, which puts a floating-point
number into DBUFFER
• OUTBUFFER, which controls the output
operation for DBUFFER
• ALLOCHAR, which moves a character to a
save area
• FREECHAR, which extracts a character
from a save area
• OUTPUT,
which transfers DBUFFER to
IHCFIOSH/IHCEFIOS for printing

Order No. GY28-6638-1, page revised 1/15/71 by 1NL GY28-bf47

The following items in IHCDBUG
are
initialized to zero at load module execution time:
• DSRN, the data set reference number
• TRACFLAG, the trace flag
• IOFLAG, the input/output in progress
flag
• DATATYPE, the variable type bits
Whenever information is assembled for
output, it is placed in a 77-byte area
called DBUFFER.
The first character of
this area is permanently set to blank to
specify single spacing.
The next seven
characters are the string--DEBUG--to prov1de a labeL tor the output.
The functions
sections are:

of

the

various IHCDBUG

TRACE
If TRACFLAG is
off,
control
is
returned immediately to the caller.
Otherwise, the characters 'TRACE' are
moved to DBUFFER, the section OUTINT
converts the statement number to EBCDIC and places it in DBUFFER,
and
control is passed to OUTBUFFR.
SUBTREN
The characters 'SUBTRACE' and the name
of the program or subprogram are moved
to DBUFFER and a branch is made to
OUTBUFFR.
SUBTREX
The characters 'SUBTRACE *RETURN*' are
moved to DBUFFER and a branch is made
to OUTBUFFR.

and places a left parenthesis, the
element number (converted to EE,CDIC by
subroutine OUTINT), and a right parenthesis in DBUFFER following the array
name.
A branch is then made to
OUTITEM.
INITARAY
If IOFLAG is on, the character X'FF'
is placed in DBUFFER, followed by the
address of the argument list, and a
branch is made to OUTBUFFR. Otherwise, a call to INITARIT is constructed,
and
the
routine loops
through that call until all elements
of the array have been processed.
SU13CHK
The location of the array element is
computed.
If it falls within the
array boundaries, control is returned
to the caller. If it is outside the
array boundaries, SUBCHK places the
characters 'SUBCHK' into DBUFFER,
and
computes the element number. OUTINT
converts this number into EBCDIC and
moves it into DBUFFER. OUTNAME moves
the array name into DBUFFER. Finally,
OUTBUFFR is called.
TRACEON
TRACFLAG is turned on (set to nonzero), and control returned to caller.
TRACEOFi<'
TRACFLAG is turned off (set to zero),
and control returned to caller.
DISPLAY
If IOFLAG is on, the characters

UNIT

'DISPLAY DURING I/O SKIPPED'

The unit number argument is placed in
DSRN and the routine returns to its
caller.

are moved to OUTBUFFR.
Otherwise, a
calling
sequence for the NAMELIST
write routine (IHCNAMEL)
is
constructed.
If DSRN is equal to zero,
the unit number
for
SYSOUT
(in
IHCUATBL+6) is used as the unit passed
to the NAMELIST write routine. On
return from the NAMELIST write, this
routine exits.

INITSCLR
The data type is saved, the location
of the scalar is computed, subroutine
OUTNAME places the name of the scalar
in DBUFFER, and a branch is made to
OUT ITEM.
INITARIT
This routine saves the data type,
computes the location of the array
element, and (via the subroutine OUTNAME) places the name of the array in
DBUFFER. It then computes the element
number as follows:
XXX=( (YYY-ZZZ) /AAA) +1
where:
XXX
YYY
ZZZ
AAA

is
is
is
is

element number
element location
first array location
element size

STARTIO
BYTECNT is set to 251 to indicate that
the current area is full, the IOFLAG
is set to X'SO' to indicate that
input/outp~t is in progress, the
CURBYTLC 1S set to the adoress of the
SAVESTRl (where the location of the
first main block will be), and the
routine exits.
(See the discussion of
ALLOCHAR. )
ENDIO

Appendix F:

The IOFLAG is saved in TEMPFLAG and
IOFLAG is reset to zero so that this
section may make debug calls that
Object-Time Library Subprograms. 237

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

result in output to a device.
If no
information was saved
during
the
input/output, this routine exits.
If
information was saved, section
FREECHAR is used to extract the data
from the save area and move it to
DBUFFER.
FREECHAR does
this
one
character at a time until it finds a
X'lS', indicating the end of the line.
It then calls OUTPUT to have DBUFFER
written out.
If FREECHAR finds a
X'FF', indicating a full array,
it
calls INITARAY to move the array data
to DBUFFER.
If no main storage or insufficient
main storage was available for saving
information during the input/output,
the characters
'SOME DEBUG OUTPUT MISSING'
are placed in DBUFFER after all saved
information (if any) has been written
out. The subroutine OUTPUT is then
used to write out the message, and
this routine returns to the caller.
OUTITEM
First, the characters ' = , are moved
to DBUFFER.
Four bytes of data are
then moved to a work area on a doubleword boundary to avoid any boundary
alignment errors when registers are
loaded for logical or integer conversion.
A branch on type then takes
place. For fixed-point values,
the
routine OUTINT converts ·the value to
EBCDIC and places'it in DBUFFER.
A
branch to OUTBUFFR then takes place.
For floating-point values, subroutine
OUTFLOAT places the value in DBUFFER.
A branch to OUTBUFFR then takes place.
For complex values, two calls to OU'lFLOAT are made -- first with the real
part, then with the imaginary part. A
left parenthesis is placed in DBUFFER
before the fi.rst call, a comma after
the first call, and a right parenthesis after the second call.
A branch
to OUTBUFFR then takes place.
For logical values, a T is placed in
DBUFFER if the value was nonzero;
otherwise, an F is placed in the
DBUFFER. A branch to OUTBUFFR then
takes place.
OUTNAME
Up to six characters of the name are
moved to DBUFFER. OUT NAME returns to
its caller upon encountering a blank.
OUTINT
This is a closed subroutine.
238

If

the

value (passed in R2) is equal to zero,
the character '0' is placed in DBUFFER
and the routine exits. If it is less
than zero, a minus sign is placed in
DBUFFER.
The value is then converted
to EBCDIC and placed in DBUFFER witr.
leading zeros suppressed. The routine
then exits.
OUTFLOAT
This
subroutine calls the library
module IaCFCVTH to put the floatingpoint number out under G conversion
with a format of G14.7 for single
precision and
G23.16
for
double
precision.
OUTBUFFR
If the IOFLAG in IHCDBUG is set,
indicating the library input/output
routines are busy handling some other
user input/output request,
IHCOBUG
must wait until the routines are free.
This means it must accumulate and
store its output data for the time
being.
To do this, OUTBUFFR calls
ALLOCHAR--once for each character in
DBUFFER, and one final time with X'lS'
to indicate the end of the line.
OUTBUFFER checks the IOFLAG. If it is
set, it then checks the input/
output corrective action switch in
IHCFCOMH/IHCECOMH.
If this switch
indicates an input/output corrective
action is in process, OUTBUFFER calls
the ERR904
section
of
IHCFCOMH/
IHCECOMH to terminate execution. If
there is no input/output corrective
action in process, OUTBUFFR calls OUTPUT for normal output processing.
UQ~

ALLOCHAR
ALLOCHAR saves the data passed to it
in 2S6-byte blocks of storage obtained
by GETMAIN macro instructions.
When
BYTECNT is equal to 251, indicating
the current block is full, a new
GETMAIN is issued. If no storage was
available, an X'07', indicating the
end of core storage, is placed in the
last available byte position, I OF LAG
is set to full, and the routine exits.
Otherwise, the address of the new
block is placed in the last four bytes
of the previous block, preceded by
X'37' indicating end of block with new
block to follow. CURBYTLC is then set
to the address of the new block and
BYTECNT is set to zero. The character
passed as an argument is then placed
in the byte pointed to by CURBYTLC,
one i.s added to both CURBYTLC and
BYTECNT, and the routine exits.
FREECHAR
This is a closed subroutine.
current character extracted is

If the
X' 37' ,

Order No. GY28-6638-1, page revised 1/15/11 by TNL GY28-6841

indicating a new block follows the
current block, the next four bytes are
placed in CURBYTLC and the current
block
is
freed.
If the current
character is X'07', indicating the end
of core storage, the block is freed
and a branch is made to the end
input/output exit.
otherwise,
the
current character is passed to the
calling routine and CURBYTLC is incremented by one.
OUTPUT
If DSRN is zero, the SYSOUT unit
number is obtained from IHCUATBL +6.
A call ~3 then made to the initialization section of
IHCFIOSH/IHCEFIOS.
Upon return, OUTPUT transfers DBUFFER
to the IHCFIOSH/IHCEFIOS buffer, and
calls the write section of IHCFIOSH/
IHCEFIOS.
If IHCFIOSH/IHCEFIOS indicates an input/output error, IHCDBUG
ignores the rest of the current DEBUG
request.

Every compiler-generated program ends
with a branch to the FSTOP section of
I HCFCOMH/IHCECOMH.
This section is a termination procedure that:
• puts the return code passed it into
register 15.
• if extended error handling has been
specified, calls IHCERRM to have the
error summary produced.
• calls
IHCFIOSRlIHCEFIOS
to
close
sequential files (IHCFIOSH/IHCEFIOS in
turn calls IHCDIOSE/IHCEDIOS to close
any direct access files).
• deletes IHCADJST,
if it
has
been
loaded.
• cancels the SPIE, restoring the old
PICA if there was one.
• either

b.

r----------------------T----------T-------,
I
I

1Unit number (DSRN)
I
Ibeing used for current I
1operation
I

I
I
n 1 x 16 14 bytes I

.--------T-------T-----~-T--------+-------i

1 ERRMSG I READ I PRINT I PUNCH
1 DSRN3 I DSRN~ I DSRN5

I DSRN2

I

I
14 bytes I

~--------~-------~-------~--------t-------i

IUBLOCKOl field 6
14 bytes I
~---------------------------------t-------~
IDSRN01 default values 7
18 bytes I

.---------------------------------t-------i
ILISTOl fieldS
14 bytes I
~---------------------------------t-------~

I

I

I

1

I

I

I

I

I

.---------------------------------t-------i
IUBLOCKn field
14 bytes I
6

~---------------------------------t-------~

1DSRNn default values 7

18 bytes I

.---------------------------------t-------i
ILISTn fieldS
14 bytes I

TERMINATION

a.

when control is sometimes returned directly
to ,the supervisor, bypassing the above
procedure.

cancels the STAE and returns to the
supervisor if IHCSTAE has not been
loaded (i.e., no abnormal termination has been scheduled)
cancels the STAE and issues an
ABEND macro instruction if entry is
from IHCST:,E

The above termination procedure is used
both for the normal end of load module
execution
and
for
most instances of
library-initiated premature termination.
The only exceptions occur in IHCSTAE,

~---------------------------------~-------i
11n is the maximum number of units that
1 can be referred to by the FORTRAN LOAD
J MODULE.
The size of the unit table is
equal to (8 + n x 16) bytes.
2Unit number (DSRN) of error
output
device.
3Unit number (DSRN) of input device for a
read of the form: READ b,list.
~Unit number (DSRN) of output. device for
a print operation of the form:
PRINT
b,list.
5un~number (DSRN) of output device for
a punch operation of the form:
PUNCH
b,list.
6Th-e---UBLOCK field contains either a
pointer to the unit block constructed
for unit number n if the unit is being
used at object time, or a value of 1 if
the unit is not being used.
7This field contains DCB default values,
which are inserted into the DCB if the
user does not supply them. They are
detailed in Figure 19.
Only IHCFIOSH/
IHCEFIOS gets its default values froml
this field.
I
sIf the unit is defined as a direct 1
access data set, the LIST field contains I
a pointer to the parameter list that I
defines the direct access data set. I
Otherwise, this field contains a value I
L_________________________________________
JI
of 1.
Figure 18.

Appendix

1~:

IHCUATBL: The Data Set Assignment Table

Object-Time Library subprograms

239

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Table 13.

DCB Default Values

r------------T-----------------------------------------T--------------------------------,

I
I
Sequential Data Sets
I
Direct Access uata Sets
I
~--------T--------T---------T-----T-------+-------T--~-------------T-------~
I
I
I
I
I
I
I
I
I
LRECL or
I
I
I
ddname
I RECFM1 I LRECL2 I BLKSIZE I DEN , BUFNO I RECFM I
BLKSIZE
I BUFNO ,
~------------+--------+--------+---------+-----+-------+-------+----------------+-------~
I FT03Fxxx
I
I
800
,
2 ,
2
, FA
IThe value
,2
I
,
,
I
I
"
,
,specified as the,
,
'FT05Fxxx
,
F
,
80
I
80
I
I
2
I F
,maximum size of,
2
I
I
I
I
,
I'
I
la record in the,
I
I FT06Fxxx
,
UA
I 132
,
133,
,2
I F
,DEFINE FILE
,2,

u,

,

,

'FT07Fxxx
,
I
,
, all ot:hers,

,

F

,
,

80

,

I

,

,2,

--

"
I

,statement.

I

F

,

,

,
,

2

I '
I,
'F
I
I
2
,
~------------~--------~--------~---------~-----~-------~-------~----------------~-------~
1

I

U

I
,

'I

80,
800

2

,

2

1 For records not under FORMAT control, the default is vs.
.
,2For
records not under FORMAT control, the default is 4 less than shown.
l _____________. _______________________________________ - - - - - - - - - - - - - - - - - - - - - - - - ______

1

,

-----JI

1

<----- 2 bytes -----> <----- 2 bytes -----> <- byte -> <- byte -> <----. 2 bytes - ______ >

r--------------------T---------------------T----------T----------T----------------------,
I
BLKSIZE
,RECFM,
BUFNO,
LRECL
,

I

not used
l ____________________
Figure 19.

~

_____________________

~

__________

~----------~

______________________ J

DSRN Default Value Field of IHCUATBL Entry

r------------~---------T---------------T------------T------------,

I

ABYTE

,

BBYTE'

CBYTE

,

DBYTE

I

~------------.L----_:----~---------------~--------.----+

4 bytes I

____________ ~

I
Address of Buffer 1
I
4 bytes I
~---------------------------------------------------+------------~
I
Address of Buffer 2
I
4 bytes I
r--------------------------------------------------+------------~
Current buffer pointer
(Note)
I
4 bytes I

I

~------------.---------------------------------------+------------~
I
Record displacement (RECPTR)
(Note)
I
4 bytes i

Housekeeping
Section

~---------------------------------------------------+------------~

I
Address of last DECB
I
4 bytes I
~---------------------------------------------------+------------~
I
Mask for alternating buffers
I
4 bytes I
~---------------------------------------------------+------------~
I
DECB1 skeleton section
I
20 bytes I
~-------------------------T------------T------------t------------~

I

Logical record length I

Not used

I

LIVECNT1

I

4 bytes I

r------------------------~------------~------------+------------~

I

DECB2 skeleton section

I

Work space

I

20 bytes I

~-------------------------T------------T------------t------------~

I

Not used

I

LIVECNT2

I

4 bytes

I

r------------------------~------------~------------+------------~

I

I

I

l ___________________________________________________
i ____________
DCB skeleton section
88 bytes J

Figure 20.

240

Format of a Unit Block for a sequential Access Data set

Note: Used only for
varIable-length
and/or blocked
records

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

•

~BYTE.
This field, containing the data
set type passed to subprogram IHCFIOSH/
IHCEFIOS by IHCFCOMH/IHCECOMH,
is set
to one of the following:

•

FO -- Input data set which is to be
processed under format control.
FF -- Output data set which is to be
processed under format control.

Q~X~~.

This field contains bits that
are set and examined by
IHCFIOSH/
IHCEFIOS during the processing of an
input/output operation
involving
a
backspace request. The bits and their
meanings, when on, are as follows:

o

a physical backspace has occurred

1

previous operation was BACKSPACE

2

not used

00 -- Input data set which is to be
processed without format control.

3

end-of-file routine should
buffers

OF -- Output data set which is to be
processed without format control.

4-5

• BBYTE.This field contains bits that
are set and examined by
IHCFIOSH/
IHCEFIOS during its processing. The
bits and their meanings, when on,
are
as follows:

a --

exit
to
subroutine
IHCFCOMH/
IHCECOMH on input/output error

1

input/output error

2

current buffer indicator

3

not used

4

end-of-current buffer indicator

5

blocked data set indicator

6

variable record format switch

7

not used

occurr~d

retain

not used

6

END FILE followed by BACKSPACE

7

not used

• Address of Buffer 1 and Address of
Buffer 2. These fields contain pointers to the two input/output buffers
obtained during the opening of the data
control block for this data set.
• Current Buffer Pointer.
This field
contains a pointer to the input/output
buffer currently being used.
• Record Offset (RECPTR).
This field
contains a pointer to the current logical record within the current buffer.
• Address of Last DECB. Tnis field contains a pointer to the DECB last used.
•

~as~ __ fof __~li~f~ii~g_~~ff~rs.

This
field contains the bits which enable an
exclusive OR operation to alternate the
current buffer pointer.

DECB SKELETON SECTIONS (DECB1

AND

DECB2):

The--DECB-(data-even~controI-block)-skele-

• £BYTE.
This field also contains bits
that are set and examined by subroutine
IHCFIOSH/IHCEFIOS. The bits and their
meanings, when on, are as follows:

a

data control block opened

1

data control block not T-c1osed

2

data control
opened

3

buffer pool attached

4

data set not previously rewound

5

not used

6

concatenation

block not previously

occurring;

ton sections are blocks of main storage
within the unit block. They have the same
format as the DECB constructed by the
control program for an L format of an
S-type READ or WRITE macro instruction (see
t:he publication !~t1 __ §y:stem/360 Operating
2Y:~i~~~
Supervisor and Data Management
Macro Instructions, Order No. Gc28-6647).
The various fields of the DECB skeleton are
filled in by subprogram IHCFIOSH; the completed block is referred to when IHCFIOSH
issues a read/write request to BSAM. The
read/write field is filled in when the OPEN
macro is being executed.
!&.gical_Re£Q!~_~~gth:

reissue

This is the LRECL
of the current data set. It is inserted by
IHCFIOSH/IHCEFIOS
during its open exit
routine.

READ

These fields
input/output

7 -- data set is DUMMY
Appendix F:

Object-Time Library Subprograms

241

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

operation performed for the data set is
unchecked.
(A value of 1 indicates
that a previous read or write has not
been checked; a value of 0 indicates
that the previous read or write operation on that DECB has been checked.)
• Work Space. This field is used to
align the logical record length of a
variable record segment on a fullword
boundary.

Bit
1

Meaning
error occurred

2

two buffers are being used

3

data control block for data
set is open for BDAM

4-5

10
01

The fields of this skeleton for DCB
f=illed in partly by IHCFIOSH/IHCEFIOS,
and partly by the system as a result of an
OPEN macro instl."uction by IHCFIOSH/IHCEFIOS.

11

DCB:
~rp

r-------T-------T------T------T-----------,
I
I
I not I not ,
,
IIOTYPE ISTATUSUI used I used I

6-7

I
RECNUM
I
4 bytes ,
~-------~---------------------+-----------~
ISTATUSAI
CURBUF
I
4 bytes I
~-------~---------------------+-----------~
I
BLKREFA
, 4 bytes I
~-------T---------------------+-----------~
I STATUSB I
NXTBUF
I
4 bytes'
~-------~---------------------+-----------~
I
BLKREFB
I
4 byte s I
~-----------------------------+-----------~
,
DECBA
, 28 bytes ,

~-----------------------------+-----------~

,
DEcnB
, 28 bytes ,
~-----------------------------+-----------~
,
DCB
, 104 bytes ,

Note:
Subprogram
bits 1, 2, and 3.

STATUSA:
This field specifies the status
of the buffer currently being used.
The
bits and their meanings when on are:
Bit
--0-

Format of a Unit Block for a
Direct Access Data Set

The meanings of the various
fields are outlined below.

unit

block

IOTYPE:
This field,
containing the data
set type passed to subprogram IHCDIOSE by
the IHCFCOMH subprogram, can be set to one
of the following~
format

FO

input data set requiring a

FF

output data set requiring a format

00

input data set
format

OF -- output data
format

not

set not

requiring

o

requiring ·a

242

Meaning
data control block for data
set is open for BSAM

Meaning
READ macro instruction has
been issued
WRITE macro instruction has
been issued

2

3-7

CHECK macro instruction has
been issued
not used

CURBUF: This field contains the address of
the DECB skeleton currently being used. It
is initialized to contain the address of
the DECBA skeleton by the file initialization section of IHCDIOSE after the data
control block for the data set is opened.

a

STATUSU: This field specifies the status
of the associated unit number.
The bits
and their meanings when on ~re:
Bit

IHCDIOSE refers only to

RECNUM: This field contains t'he number of
records in the data set as specified in the
parameter list for the data set in a DEFINE
FILE statement.
It is filled in by the
file initialization section after the data
control block for the data set is opened.

l ____ ~----------_-------------~-----------J

210

not used

4 bytes I

~-------~-------~------~------+-----------~

Figure

U format specified in
DEFINE FILE statement
E format specified in
DEFINE FILE statement
L format specidied in
DEFINE FILE statement

BLKREFA: This field contains an integer
tnir-rndicates either the relative position
within the data set of the record to be
read, or the relative position within the
data set at which the record is to be
written. It is filled in by either the
read or write section of subprogram IHCDIOSE prior to any reading or writing.
In
addition, the address of this field is
inserted into the DECBA skeleton by the
file initialization section of IHCDIOSE
after the data control block for the data
set is opened.

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

STATUSB:
This field specifies the status
of the next buffer to be used if two
buffers are obtained for this data set
during data control block opening.
The
bits and their meanings are the same as
described for the STATUSA field.
However,
if only one buffer is obtained during data
control block opening, this field is not
used.
NXTBUF: This field contains Ule address of
the -nECB skeleton to be used next if two
buffers are obtained during data control
block opening.
It is initialized to contain the address of the DECBB skeleton by
the file initialization section of subprogram IHCDIOSE after the data control block
for the data set is opened. However, if
only one buffer is obtained during data
control block opening, this field is not
used.
BLKREFB: The contents of this field are
the -same as described for the BLKREFA
field.
It is filled in either by the read
or the write section of sUbprogram IHCDIOSE
prior to any reading or writing.
In addition, the address of this field is inserted
into the DECBB skeleton by the file initialization section of IHCDIOSE after the data
control block for the data set is opened.
However,
if. only one buffer is obtained
during data control block opening,
this
field is not used.
DECBA SKELETON:
This field contains the
DECB (data event control block) skeleton to
be used when reading into or writing from
the current buffer.
It is the same form as
the DECB constructed ,by the control program
for an L form of an S-type READ or WRITE
macro instruction under BDAM (see the publication IBM System/360 Operating system:
Supervisor and
Data
Management
Macro
Instructions, Order No. GC2B-6647).
The various fields of the DECBA skeleton
are filled in by the file initialization
section of subprogram IHCDIOSE after the
data control block for the data set is
opened. The completed DECB is referred to
when IHCDIOSE issues a read or a write
request to SDAM.
For each input/output
operation,
IHCDIOSE supplies IHCFCOMH with
the address of and the size of the buffer
to be used for the operation.
DECBB SKELETON: The DECSS skeleton is used
when reading into or writing from the next
buffer.
Its contents are the same as

described for the DECBA skeleton.
The
DEeBB skeleton is completed in the same
manner as described for the DECBA skeleton.
However,
if only one buffer is obtained
during data control block opening, this
field is not used.
DCB SKELETON: This field contains the DCB
(data control block) skeleton for the associated data set. It is of the same format
as the DCB constructed by the control
program for a DCB macro instruction under
BDAM ~see the publication I~~~~mLl~Q
oper~t!~9-_§Y2te~l_~2peryisQf_ and
Q~~~
~~~~g~~~nt_~~£!Q_!~2t!~t!Q~)·

<----------------B bytes------------------>

r-----------------------------------------,

I
PREFACE
I
.-----------------------------------------~
IEntry for library error condition 207
I
~-----------------------------------------~
IEntry for library error condition 208
I

.-----------------------------------------i
IEntry for library error condition 209
I
~-----------------------------------------~

I
I

I
I

I

,

.-----------------------------------------~

IEnt~ry for library error condition 300
I
~-----------------------------------------~
IEntry for library error conditio~ 301
I

.-----------------------------------------~

IOptional entry for user error condition
3.02

I

,

I

~-----------------------------------------~

loptional entry for user error condition
I 303

,
,

r---------------------:-------------------,

I
I

I
I
~-----------------------------------------~
IOptional entry for user error condition I
I n-l
I
.-----------------------------------------~
IOptional entry for user error condition I
I n
(Note)
I
.-----------------------------------------~
INote: The user can specify from none tol
I
598 of his own error conditions;,
I_________________________________________
thus ~ can be a maximum of 899.
L
JI

Figure 22.

Appendix F:

General Form of
Table (IHCUOPT)

the

option

Object-Time Library Subprograms

242.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

1

1

1

1

<---------------- 4 bytes ----------------> <- byte -> <- byte -> <- byte -> <-- byte __ >
r------------------------------------------T----------T----------T----------T-----------,
I
Field One
I
Field I
Field I
Field I
Field I
IL-_________________________________________ iI __________
Two
Three
Four
I ___________
Five
iI- - - - - - - - _ iI __________
JI
~

-----------------------------------------------------------------------------------------

Field

contents
The numb"er of entries in the option table.
user-supplied error conditions.

one:-

This is 95 plus the total number

of

Two:

Bit one indicates whether boundary alignment was selected.
o and 2-7 are reserved for future use.)

Three:

Indicates whether extended error handling was selected.

Four:

contains a decimal 10. This is the number of times the boundary alignment error
message will be printed when extended error handling has n2i been specified.

Five:

Reserved for future use.

l=yesi

O=no.

(Bits

X'FF'=noi X'OO'=yes.

-----------------------------------------------~-------------------------~-------~~--~---

Figure 23.

1

Preface of the Option Table (IHCUOPT)

1 1 1

<- byte -> <- byte -> <- byte -> <- byte -> <---------------- 4 bytes ------------~--- __ >
r---------T----------T----------T----------T--------------------------------------------,
I
Field I
Field I
Field I
Field I
Field Five
I
lOne
Two
Three iI __________
Four
L _________ i I __________
i I __________
i I __________ - - - - - - - - - - - - - _____________________ JI
Field
One:

contents
The number of times the library should allow this error to occur before
terminating load module execution. A value of zero means unlimited occurrence.
(Trying -to set the field to greater than 255 results in its being set to zero.)

Two:

The number of times the corresponding error message is to be printed before
message printing is suppressed. A value 6f zero means no message is to be
printed.

Three:

The number of times this error has already occurred in execution of the present
load module.

Four:

0--

Bit

1

2
3
4

5

6
7

Five:

!:!eaninq
If control character is supplied for overflow lines, set to 1.
If control character is not supplied for overflow lines, set to O.
If this table entry can be user-modified, set to 1.
If this table entry cannot be user-modified, set to O.
If more than 255 errors of this type have occurred so that 255 should
added to Field Three, set to 1.
If less than 255 errors of this type have occurred, set to O.
If buffer contents is not to be printed with error messages, set to 1.
If buffer contents is not to be printed, set to O.
Reserved for future use.
If error message is to be printed for every occurrence, set to 1.
If error message is not to be printed, set to O.
If traceback map is to be printed, set to 1.
If traceback map is not to be printed, set to O.
Reserved for future use.

be

The address of the user's exit routine.
If one is not supplied (in other words,
if library is to take its own standard corrections), the final bit is set to 1.

----------~------------------------------------------------------------------------~--~--

Figure 24.

242.2

composition of an Option Table Entry

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

1

1 1 1

<- byte -> <- byte -> <- byte -> <- byte -> <---------------- 4 bytes __________________ >
f--;i~ld--T---;i~ld--T---;i~ld--T---;i~ld--T----·--------------;i~id-;i~~----------------1
lOne
I
Two
I
Three I
Four
I
I
~--------~----------~----------~----------~------------------------------------ ________ J

Fi;ld---c~~t;~t;-------------------------------------------------------------------------

one:-

Set to 10, except for errors 208, 210, and 215, which are set to 0 (unlimited),
and for errors 217 and 230, which are set to 1.

Two:

set to 5, except for error 210, which is set to 10, and for errors 217 and
which are set to 1.

Three:

Set to O.

Four:

Bit

-01

2
3
4

Setting

o

1, except for errors 230 and 240

o
o
o

5

o

6

1

7

o

Five:

Set to 1.

~:

These system
entries.

Figure 25.

Table 14.

230,

generation

values are also inserted initially into any user error

Original Values of Option Table Entries

IHCFCOMH/IHCECOMH Transfer and Subroutine Table

r---------------T---------------T---------------'----------------------------------------,!
I Displacement I Branches to I

I from IBCOM* J ~
Section
I
Function of Routine
I
~---------------+---------------+-------------------------------------------------------~
o
FRDWF
Opening section, formatted READ
I
4
FWRWF
Opening section, formatted WRITE
I
8
FIOLF
1/0 list section, formatted list variable
I
12
FIOAF
1/0 list section, formatted list array
I
16
FENDF
Closing section, formatted READ or WRITE
I
20
FRDNF
Opening section, nonformatted READ
I
24
FWRNF
Opening section, nonformatted WRITE
I
28
FIOLN
1/0 list section, nonformatted list variable
!
32
FIOAN
1/0 list section, nonformatted list array
I
36
FENDN
Closing section, nonformatted READ or WRITE
I
40
FBKSP
Implements the BACKSPACE source statement
!
44
FRWND
Implements the REWIND source statement
I
48
FEOFM
Implements the ENDFILE source statement
52
FSTOP
Write-To-operator, terminate job
56
FPAUS
Write-To-Operator, resume execution
64
IBFINT
Load module initialization
68
IBEXIT
Load module termination
_______________
_______________
__________________________________________________
-----J
~

~

Appendix F:

Object-Time Library Subprograms

242.3

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

GO.

IHCFCOMH/IHCECOMH (Part 1 of 4)

·.... A4..........

FRDWF

: •• "AI ••••••••• :

FRDNF

• SET IOSWF FOR •
: ~'aRMATTED INPUT:

·.................

·

..•• +B1······ +•.•

·····B"·······...

I

•
•
•

"

o. DIRECT., • "
0

"

"
"

ACCESS DATA
SET
,.
•,
, •

r

'.. ..'

0

.,
.. ..
,

•••• • C2 ••••••••••
.DIOCS~
•
'lES
.-.-.-.-.-.-.-.-.
+-------->.
OPEN IlF
•
•
NEEDED) AND
•
READ
•
•

, . CII
., .,
:~;~~~~ . . . . . . . . . :
,.
DIRECT
0, YE.S
0-.-0-.-.-.-0-.-.
., ACCESS DATA, .-------->0
OPEN IlF
•
SET
NeEDED) AN!)
•
.,
, •
•
RI:.AD/WRIl'l::
•

.................

•

0

..................

o.

l"

• ••• ·D4 ••••••••••

+-+-.-.-.-.-.-.-.°

'FIOCS"
•
+-1-+-+-+-+-1-1-+
•
OPEN (IF
•
NEEDED) AND
•
•
•
READ
•

• FIOCS.

.................
•
•
•

I,------------- - -------

OPEN (IF
NEEDED) AND
READ/WRITE

°

1, -----------------------.....
Eq······
.....
·
.... I:::s·········

: •••• El ••••••••• :
SAVE BUFFER
INFORMATION

.

• ifc . . . . . . . . . . . . . . . .

•• SAVE END: ,l\ND •0
• ERR= ADDRESSES •

.... ·Dl··········
.................
•
:

..

·. . . . r. . . ·.

·..................

I

••••••••••
•

•
•
•

1,------------------------1

•• SAVE END= AND +
•
:ERR= ADDRESSES :

Cl ,

A.~

SET IOSWF rOR •
NON- FORMA TTSD •
OUTPUT
•

• •••• •••• •••• ••••

j

.....

FWRNF

• •

SET IOSWF FOR •
NON- FORMATTED •
INPUT.

•
:

•

·.................

SAVE BUFFl:.k

•
0 kETUkN TO Mhlll •
.-------->.
PROGRA~;
•

.·................
INFORr~ATION

• •

0

······f]·········I..
·.................

FWRWF
•

<- - - -- - - - - - - - - - - -- - ------- ------ -----------.
•

Gl
, •
•:

"

,

• • • • • G2

I.

• ,

I.

.... ;,.

•
•
•

:< __

.......T......'

"

,,·SPECIFICATIONS •

.. •

•

1
..... Hl..........
·..................
I

••••••••••
SCAN FORMAT
•

•

'OB~6~~:pME': .~~------>:SkCr~~~6~~~OL
.,

SET ICJSWf FOR •
rOHMATTl::O
•
OUTPUT
•

•

H2 .'.

I.

•

TRANSLATE.
FORMAT
.----INFORMATION
•

"

,.

'0

..

.

FIRST
"
CONVERSION
.,
CODE
,.

'....
'.. ..'

110

0.---

1''

·J2·········.
...................
'RETURN TO MAIN •
•
PROG
•

Appendix F:

Object-Time Library Subprograms 243

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

GO.

IHCFCOMH/IHCECOMH (Part 2 of 4)

••••• 11.2 ••••••.•••.
·······11.1··········.
..
.
.
.
..
··
"
"......I:: ::::::---------:::::::r. . .

FEN OF

FENDN

'SET 1/0 SWITCH •

··

B1

. '. ' .

'SET 1/0 SWITCH'

'.

.'

B2

.-. ' .

'.

.····83·······.·
................

.'
' . READ
.'
'. ' i E S '
•
'. READ OR WRITE •• --------> •• DIRECT ACCESS •• -------->.RETURN TO MAIN'

'. '.

.

t •

• '

I

.

'. ' . . .'

. .'

' •• '

, omE

A

NO

*-.-. - 1-' _.,----------------······C2··········
·..................
• FlOCS.

• - *-

•

,.01

,"

*-

CLEA.N-UP

•

•

:;~~~, . . . . . . . . . :

•.• ,

'ro.

. . . . ........
j ..

.

.'
' . 'iES
.-.-.-.-.-.-.-.-.
' . DIRECT ACCESS, .-------->. PUT OUT FINAL •
'.
"
•
BUFFER
•

'.

.

..... El*·········

•
•••• E2 •••••••••
•'FIOCSM
-t-t-.-.-t-._._t.
•

.................

• PUT OUT FINA.L o--------).RETURN TO MA.IN •
:
BUFFER:
•••••••••••••••••

FIOLN
: •••• Fl' •••••••• :

.
.

·
·

:SET I/O SWITCH :

·..... F2··········.

FlOA.N

SET ARRA'i
SWITCH

•

·.................

1, _______________________ 1

G1···..
G2···..
G)···..
• •••• GII ••••••••••
• •
'.
••••
.'
'.
°DIOCSI
•
••
' . REAr;
.'
' . YES
.'
' . YES
.-.-.-.-.-.-.-.-.
'. READ OR WRIT!:: •• --------> •• BUFFER EMPT'i •• --------> •. DIRECT ACCESS, .-------->0
••
••
'.
.'
'.
••
•
FRf.SH READ
'.

• •

' . . •

"l"~HITI::

' . . •

··.·~O

.: tH" :.
••••

Hi' '. '.

••
.,
• 'BUFFER FULL'. YES
'.
YET
•• ----••
••

••••• H3..........
•

j
....Kl.........

....... .... ....

•

•••••••••••••••••

·..................

HII

•

1) • • • •

If!

."

.........
j
•

It • • • • • • •

J2
•.
• •••• J) ••••••••••
••••
.DIOCS.
•
•••• JII •••••••••
••
' . YES
.-.-.-.-.-.-.-.-..
•
--> •• ~~RECT ACCE~~,'--------):
WM~f~UT
:RETURN TO MAIN:

·.
I
....
·K2··········
.-.-.-.-.-.-.-.-.
' ... .'
.

NO

.

•

'FIOCS.
•
• MOVE CORRECT •
.-.-.-.-.-.-.-.-.
~AMOUNT OF DATA'
.--------).FROM BUFFER TO •
FRESH READ'
'. LIST ADDRESS •

• •

••••• J l . . . . . . . . . .
•
•
'MOVE LIS'l' ITEM'
:
INTO BUFFER:

·

t)l

:::1'· ~o

'.

::~::

.:::: ... ........
j .
:.... :->
"4 ••••••••••
I)

"1"~0

.FIOCSM

...................

...............

l ....
->: ....

Jl :

•

............ ..... ..
L>:'....::':

'RETURN TO MAIN •
•
• •
•

WRITE OUT
BUFFER

•
•

Appendix

F~

Object-Time Library Subprograms

2-43.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

IHCFCOMH/IHCECOMH (Part 3 of 4)

GO.

FSTOP

101

.'.

'.

••

FPAUS

• •••• 102 ••••••••••
I.

•

•

• • LOAD MODULE'. N O '
•
' . IN FOREGROUND •• -------->.ISSUE WTO MACRO'
e.
.'
•
•

*. I

•• '

.'

•
•
•••••••••••••••••

.'.

'.

' .. '

.....................

.' .'

•
•

1<------------------------

MESSAGE TO
TERMINAL

•
•

·····c,,··········
,
.

·····C1··········

. ·. ·. r·. ·.

·

····01·········
·....
.......... ..

:KI:;TURN TO MAIN:

'ISEXIT
•
._._._._._._ I - I - .

·
•
•

•
•

TERMINATE
EXECUTION

RETURN TO
SUPERVISOR

•

.

0

•
'WAIT
FOR REPLY

•
•

, ... 10q········· ,

...............

•
•

·..... F2........... ...... Fl··········.
·........1""....... ..................

FIOLF

FIOAF

•
SET U P '
'PARAMETEkS FOR
•
CONVERSION'

.<--------,•

bt.:T ARRAY
SWITCH ON

,

,

.... ·G2···· ..... .
• I HCFCVTH

•

t_t_t_,_t_t_t_t_t

·...... .. .........
CONVERT AND
MOVE DATA

•
•

]'

H2' '.

L-------------------------1

I.

• ••••

. ' 'FORMAT •••• N O :
.: REPETITION
•
•
.'
•

.'.

.

..'

H)..........
:

........ .... .......

,-------->,

Itt.:SUME SCAN

NO

H
.' .

t,

•• "
NEXT
'",
CCJNVI::RSION "
"
COOt.
, •

.-------->.,
•

..

' '.. .

.1::::---------------------------. -..-.. --------__ ..J' '"

•••• J2 •• • ••••• •
'RETURN TO MAIN'
•
PROGRAM
•

·................

243.2

00

,

·······1·······

•
•

ISSUE WTOR
MACRO

.
........I::::::::----------------·

•
•

.

• •••• AS •••••• ,••••

r"
·····S,,··········
·
.

······Sl·...·......
··..................
MESSAGE TO
TERMINAL

A"

'. '.

r~

•
•

.

....

• • LOAD MODULE'. NO
•
' . IN FOREGROliNO.o-------->.

•
•

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

chart

GO.

IHCFCOMH/IHCECOMH (Part 4 of 4)

.

IBFINT
: ........ A4" ............... :

·..................................
r:;SUE t;PIE

1

.. ........ fL~""""""""" ..
:1{!::TLlfn Tu MAIN:

..............................

·

•

fiTAF

..............................

.

..

j
........ ·C4 .................. ..
• FIOCSM
•

.°-.-.-.-.-.- ..... -.°

·.................................
•

-.-.-.- ..... -.-.- .
·.............................
..
·A~·

°IHCERRM

OPEN O&T!::(,T
f:RfWR UNIT

..

•

..

1

.......... a~·"""""··""

•

...............
T(, Mil I il

CLl)S!:: FI LE.S

•

0

:

.. . . . . . 011 . . . . . . . . . . . . . . . . . . . . . ..

I

:•... c, ......... :
oDELET!:: HIC.'IDJST •
:
IF LOIIDt.D
•

·

(I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

: ........ i

°•

.

• FIUcsn
•
+-+-+-+-+-+-+-+-.

I

"1 . . . . . . . . . . . . . . . . . :

....... p4+ .............. ..

•O"E1lJfW

•

ERROR SUMMARY :

:

j

j

: ........ 84 .................. :
I~;SUE

....... ............. .

IBEX IT

Ol'ANl'~.L

::1'11-. AN".

·............................. ..
•

:.'ll1r:

•

..

j
•••• '·;'1 •••••••••

·................. ..
kl·.TIIRN I'll
:.1 II' I-t< V (:: .• 1{

Appendix F:

•
0

Object-Time Library subprograms

243.3

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

IHCFIOSH/IHCEFIOS (Part 1 of 2)

Gl.

·····A11I·········
................:-------------_>

--OETERMiNE-oPERii:rioN-TYPEiNiTiii:LiZii:TiON------jFiNiTREAD
WRITE
DEVICE MMIPULATION
FINAL CALL

FlOCS.

.....

NOTE:

THIS MODULE IS CALLED
BY I HCFCOMHI IHCECOMH FOR
USER-REgUESTED SEillENTIAL 1/0,
~~~ ~tssIM~Rwk!nNG: ROUTINES

FI'..0

'.

'.

.'

j

•

.

.

NO

: •••• Hl ••••••••• :
•
•
•

B~U;gKu~n'
NECESSARY I

I

• • • • • •• • • • • • 0 0 0 • •

........11 •••••••••••
•
OPE;N DATA"
• CONTROL BLOCK •
'FOO{ DATA SET IF'
'NOT PREVIOUSLY "
•
OPENED"

.................

I
.

. ·'.
1(1

'.

'.

• 'DCB OPENED ' . YES
'.
PROPERLY
•• ----I.

*0

.'
' ..
'
• NO

.....i

.

002 •

'.H1'
244

.'

.
•

I HC 2 )11

.
•

:

••

".

'.

•

.'

NO

0

0-----

.................

RETURN

•

... ··.
...............

H)

.'.

:

Gil

• I.

'.

'.

••

.'
I.

•

••

.'

.'

.--------> •.

'..

.

.'

j
•

NO

• •••• H5 ••••••• ,•••
'IHCERRM'

'---1 :.'-'-'-'-'-0-'-+-'.
YES

ERR~Ik~~¥I\GE :---

1:~: :-::r ::~;: [~~~~~~~~~~~~

CR2 ••••• J ) . . . . . . . . . .
:
READ A BLOCK

FIO~~r •• JII..........

:H~M~Tlc~~~~~Io{

:
R~~gk50~~~~~" :

:

: ••..•.•.•.••.•. :

: .•• r~. ~~~~~~ .•. :

::::: :->1

1
0" 0....
...............

INVERT
• ••• OK) •••••••
'INVERT BUFFERS •
•
• AND DECBS IF • •
:O~T~u~iiR~UBLE:
:

0"

·········1·· . .·····.
··....
.. ....
Gil •

I •

I.

NO

.'.
HII
'.
••••
. ' 1/0 ERROR ' .
o. IN lOS . "

WRITE

'. f'AO

•

'.

' . SPECIFIED ••
••••

....

'.

••

G!l

o:'H~~E~NR~2~ ·:.!~~----->.:~~E ,&~~t;~~::.!~~

.'

:
:

Gil

:~~~:: .::" :->1

1

OPENRW

'.

Dl'TEIU'IINZ
•
I.•

IS

••

IERROR HANDLING
:IS NOT PRESENT.
: IHCERRM ENOS
I
EXECUT I ON

.

r

• '.

'.

-->.;' 0~~I3:H6N ';'!~~1

l-,(:;':

r-i;-;;;;~;~---

'.

. .'
' .. ' ts

t

• '.

G)

••• t •••••••••••••

I

. *. ' .

• ····F~···
TO ADDRESS
•
• SPECIFIED IN .<-'END: PARAMt.Tf;R •

......

l->:·....·

-------->.,-'-'-0-0-'-'-'-'
ERHOR MESS~GE •

05

---------->[ ->:.•••••
"" :

.................
• •••• G2 •••• • •••••
0IHCERRM'

.

.

NO . '
'.
---'.
LAST DSItN . '

• ••• ES.·· ••• •••

'CHECK kl::SULT OF.
•
Wo{lTI:. HWM
•
: OTHEI< BUFFEk
•

Kl :

• o.
Gl
'.
•0..
DSRN FOR
' . YES
DIRECT ACCESS ••
'.
••

05¥~~~N~~~G

:
• INPUT OR OUTPU'l'.

··................,.

: • • • • E) • • • • • • • • • :

'CHECK RESULT oro
.OHEAD INTO OTHEI<'
:
BUFFt.:I<
:

L__ ~~:~:~~~ ___ _

-->:

'. '.

: •••• F2 ••••••••• :

:
IF EXTENDED
I ERROR HANDLING
: IS NOT PRESENT,
: IHCERRM ENDS

······C5········ ...
·. . . . r. . ·..

FCLOS

Cl :

'WRITE CONTENTS •
'OF THIS BUFFER'
• SWITCh BUFFER •
:
POINTERS
:

i"0

i'"'

NO

V

• '

.0

'.

••••••

. '. ' .

.
'
--1
.
.
.
.
·.................
ins :'::':
.....1.
....
'.

.' OUTPUT '. ' .
.'

YES

··

FCTRL
·····CII· •••• •••· ••

.'.
C3

.0---

• • • • • • • • • • • • • • • • t·

.' 01
. ' DSRN

FRITE

:

II' EXTENDED

I

IHClRRM ENOS

!~:R:.r~~~=,

L__ ~~~:~~_,__ _

(::)--1
•••
...............
'K5'" ••••••••

KII ••••

•

RETURN:

0

RETURN TO

•

:CALL8~I'~iTERROR:<--

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

IHCFIOSHlIHCEFIOS (Part 2 of 2)

Gl.

·····A2··········
•
····A3·········
•
ISSUE ERROR
•
+ RETURN ABORT •
• MESSAGE IHC218I.-------->.CODf. TO IBCOMn •
+
+
•
TO CONSOLE.

·..................

·...... . ..
·02 •
• B1

...............

I

·.. , *

"

.--!
.

B1
••
• •••• B2 •••••••••
•• CURRENT..
IF EXTENDED
•
•• UNIT THE -. YES
-ERROR HANDLING •
•• ~~JE8~I~RRO~ ••• -------->:PR~~E~6f>p~~§s SW:
••
••
• ERROR SUMMARY •

.·....*--!
·02
• B4

EOFM
: •••• B3 ••••••••• :

CTLRTN

o.B4

0 .0

RWND
: •••• 85 ••••••••• :

*0.0

·..................

' '.. .
.'

... ··Cl··········

.....J........

.....J.::::...

·....... ...........

.f................

................ .

.................

'. .'

I"

••

.

.

••••

j

D1

1/0

'.
ERROR ••

NO

COR~~~TED
'.
.' •• • +-----------------1
'. • .'YES

....
l->:

ISSUE CLOSE
WITH REIU.AD
OPTION

•
+
•

I

j

• •••• 0).. ••••••••

• •• ··04 ••••••••••

t
•
FREE 1/0
•
RUFFERS t'OR
t THIS DATA ~;ET

t
ADJU"T THE
•
tHECPTR TO POIN1 •
• TO PHECEDIN(,
t
·LOGICAL HF.COkLJ •

•
t

·.................. 1...................
*-----

t

I

---------->

·01 •

.. ..

.

• •
ISSUE.
• ••• C~ •••••••••
•
•
APPROPIHATJ:: • •
•
•
• NUMBER OF' BSP •
•
RETURN
*
•
•
(Ph'fSICAL..
•
• • BACKSPACE I
•
• •••••••••••• '••

1

••

...................

WRITE LAST.
EOF •• DETERMINE .0 RfW
•
RECORD
.<--------.0
OPERATION 0 +-------->*
•
••
1 'fPE
0*
*

•
•
ISSU!:; CLOSE
• (T'fPr;=TI WITH
• LEAVE OPTION
•

• DATA MANAGEMENT.
•
RETRY
•
APPROPRIATE •
•
• NUMBER OF TIMES.

.•.

•
•
•

Jij ••

..... E2··········

+-+-+-.-.-.-.-.-.
·...............
...
• IHCERRM

.
.............. .

•
• •• ·E3·.·.·.···
RETURN TO
•
• ERROR MESSAGE .-------->.CALLJ::R AT ElHWH·
IHC21RI.
•
OFn;ET
•
•

L_ _ _ _ _ _ _

·... ·Eq········· .
:

...............
RETURN

I IF EXTENDED
I ERROR HANDLING

rI~H~~~~~'

L __ ~~~~~~ ___ _

....

...... ..0
HJ '.

.·.··HII.····· ....

..... J3..........

.....

·02 •

• H3 .--~

"r . . . .1'. . ..

• • CURRENT. 0
t
IF EXTENDUJ •
•• UNIT THE
•• YES
.ERROR HANDLING •
• o~~E~~1 ~RRO~. 0·- ----- -- >:PR~~E~~"p~tL~W:
• 0
o.
• J::RROH 5UMMAk'f •

•••. ~~~~~.;~....

...............

:!~:~~~.-.-.-.-:

.

:CALL~~F:iTERROR:<--------: ERR?ftc~~~¥~GE

:

:

IF EXTENDED

":'.:=.

Fx~

: IHCBRRM ENDS

L__

JII ••• •••••••

ISSUE ERROR

. .:ME~gAg5N!~tP 9I:.

[~~~~~~~~~~~~
I

:

~~~~~____

Appendix F:

········1····· ....
··~~;~~~. ~~~~; ..·
:CODE TO IBCOMN :

•••••••••••••••

Object-Time Library Subprograms

244.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G2.

IHCDIOSE/IHCEDICS (Part 1 of 5)

CI\LLS FOR DEFINE FILE
•
•
•

... *l\.3····.·.·.

...............
COMPI LERGENERATED
OBJECT CODE

•
•
•

j

..... B3····.·· ...
°GETUAT

•

• -t-t-t-t-._t_t_.

.................

'GET UNlT NlJMBER.<-------- _______ _
W5RNI
:
:

j

.... ·C3*·········

•
INSERT UNIT
•
NUMl1ER'S
0
•
• PI\RM~ETER LI5T •
IN UNlT'
•
A5~;IGN TilL
•
'I\DDIU:5~;

.........

~;~:::::j

·.....

,',

0]
t.
• • • • • 0" • • • • • • • • •
"
LAST
"
• (;[:'1' Nl-:XT UNIT •
,'UNIT NUMBER', NO
• NUMBER t ,l!;f{NI •
" IN PAfUlMETER ,o-------->n'iwM PARII:>It:n;H •
t.

'. • .' .
LI~;1'

.

• •

YE~;

...................
•

LI!iT

•

j

·. . . 1. . ·.
••••• E , ••••••••••
•
t.:;TIIBLI:iH
•
'I\DDHF:;:iAflILITY •
•
• 1 N 1 Hl'H'OMII/
•
• 1 HCECO",H FOR
LATE!< CI\LL:;
•
•

•

•••• F \ •••••••••
UlMI'lLI-:H•
(;FNf HIITUJ
•

• ••

~J~~ ~;~"~'. ~.~~~ • • •

CONTINU~:

NORMAL
PIH)CF!i!1l NG

A.ppendix F:

Object-Time Library Subprograms 245

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G2.

IHCDIOSE/IHCEDIOS (Part 2 of 5)

···.1.1·....•... •

--DETERMINE-OPERATION-TYPE-j
-iNiTiiLiiATioN--IDASINT-READ
DASREAD

...............•

!

·•·····C1 ••.·..·....•
·......·T.......·

....
·........
.
.. .. .. ......

••

.-------------_>

DIOCSII

•

DASREAD

•

•

•

GET DSRN

c2

•••

..

.
.
..................

••

• •••• C3 ••••••••••

•• IS RECORD •• NO
.OBTAIN ADDRESS •
••
IN BUFFER • ·-------->·OF INPUT BUFFER.----------·-------

i

02
.,
••••• 03. ••••••••
• ..... 04 ••••••••••
••
••
•
• • INSERT RELATIVE.
, . IS THIS A ., Y E S .
•
.RECORO NO, INTO •
..FIND REQUEST •• ----• READ A RECORD
BLKaEFA OR
•
••
,.
•
• • BLJ(REFB FIELD •

..................
. ...................
....

.. .. ....

.<--------.

i~

·......--1
·02 •
• E3

.
.

·

·····E2· •• •••••••
• CHECK FOR I/O •
•
COMPLETION
•

·
····..··c······

DASEND
••••• E3..........
• GET ASSOCIATED •
•
VARIABLE' S .
ADDRESS AND
1\
.CURRENT RECORD •
•
NUMBER.

,

Gil

:lWi~ttA=

...

••

.. .. .. ......
••

t.

.: ~IHc¥s~cts;:

.~~--

:(s~c'r?LI=~~ :____ _

.................

•
•

8UrNO VALUE
INTO DCB

•
•

:......'1'......:
:

r---------------Ir

~BD

IBItROR IWIDLlNG

lI~H~-:=r'

---~~~----

•

J3

••

•• NEW DAT~ ., YES
SET TO BE •• --•• CREATED.·

• NO

H4

•••

•••••

:0~1:

.,

FIND •• READ OR ••
--- •• FINO REQUEST ••

i

.£AO

r---------------

• •••• J4 •••••••••• ---------1

:~~~~~!!.-.-.-.-:

:

ERR~~C~~~AGE :

s:==

IF EX'J'ENDBD

I~~
I IHCBRJIM

BN08 '

:•••••••••••••.• :

L__~~~~~___ _

·····K4··········

•

L>:~i:·..

.....

·03 •
El •

:!'~~~._._._._:

.....
...

•
EXAMINE
•
-->.JFCBIN02 FIELD •
IN JrcB
•
•

CHNOT

->.

••••• 1t1 •••••••••• ---------

ERR~cHrfAGE

••••• J2· •• • •• ••••
• ~ JOB FILE.

·
.
·........1".......
... ..
..
.0
..........
..
l . .
....

CKOISP
·····03··········

~~~"T""'"

r

:

¥:p:

•

• NO

:0~2:

i

••

I).

•••••

GETUB
·····H2··.·······
• CONSTRUCT UNIT •
• BLOCJI:. INSERT •
• ADDR or UNIT •

..................-------->.
.. ... .. ---1
.. ......
1 ...
.. ..
.. .. .... ....

•~
•• YES
---->·.WRITE REQUEST ••

...

NO

........
j .

·····F4 .. ·.···.·.

, . PREVIOUS ., YES
-->..
OPERATION ••
•

........

o

•
UPDATE.
• ••• FS •••••••••
• ASSOCIATED.
•
RETURN TO
•
•
VARIABLE SO
CALLER
•
.THAT IT POINTS • •
•
.TO NEXT RECORD •
• ••••••••••••••

.,

.. .. .. ..

··r

.-------->.,

·..................
.... .. .... ---1
G2

,.,
E4
.,
••••• ES ••••••••••
••
.,
• UPDATE ASSOC •
•• IS THIS A ., YES
•
VARIABLE SO •
FIND REQUEST •• -------->.THAT IT POINTS.
.,
••
• TO RCD JUST •
••• •
•
READ
•

.........

-->.

• •• ··F2 ••••••• •••
• PLACE BUFFER •
•
POINTER AND •
• BUFrER SIZE IN .----•
REGISTERS
•

J1

l.

.•.<:::--------------------1

.······01··········
-. -.-. -.-.-. -.-..
·..................
·GETIJAT

DASWRITE

.--~

• C2

• GET ADDRESS OF •
•
DSRN
•

THIS MODULE IS CALLED BY
IHCFCOMH/IHCECOMH TO IMPLEMENT
~I~Ct:~ij~¥~, READ, WRITE AND

CLOSE
DASTERM
---------------------------

• 02 •

DASINT

WRITE

NOTE:

·..................
.................
..-------->.

•
•
.SET FIND SWITCH.
-->.
OFF

···.KS·····.···
RETURN TO
•
CALLER
•

• 04 •
• JS •

Appendix F:

Object-Time Library Subprograms

.245.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G2.

IHCDIOSE/IHCEDIOS (Part 3 of 5)

....
.... .--1
003 0

o Bl
•

0

BSAMOPEN

······B3···........
.··.................

v

OASWRITE.

: ..... Bl* .......... :

• OPEN DCB FOR
• NEW DATil SET
o

•
•
•

·...................
,,~m 1..··.··
•·····Cl··,~
LKI:.A'l'l:: AND

•
oFORMT NEW DATA-

·...................
:SE~fu¥~I~c~~AM:

..

\

1

: ••• +D1 ••••••••• :

...... ........... ..
• CLOSE DCB FOR •
:
•
DATA SET

:~I:·...->1
·...·····1-.:1
....••••••

'WRITE A RECORD •

SECONDARY
ENTRY

j

·····C3···· .....:.
__

·····C2·.· •••.•••

• INSERT ADOR OF •
• IlLKREFB INTO
•
-->.DECBB SKELETON.
• IN UNIT BLOCK •
• IF TWO BUFFERS.

•

.................

i:~>'l
.. .
D2

..

'. ' .

.................

·····03·1........ .

..

'INSERT I..C2 ..

j

·02·

..... EJ··········

• OPf.N DCb Fut<
•
• DATA SET FOt<
•
• DIRECT I\CCF~;S •

• PLACE IlUFFER
•
POINTER AND
• SUt'FEI< SIZE; IN
:
REGIS'llI,S

.................
:

PROCEf;SlU(,

I

.... eFt.··.···.··

• ••••••• 0 ••••••••
0
•

I

...

F]
t •
• ·ENTEI:O~I~~~ g~Fn~b

•
•
•

... 'Gl'··'·····
RETURN TO
I He FCOMHI
IHCI:.COMH

.............. ,

•
•
•

Order No. GY28-6638-1, page revised 1/15/11 by TNL GY28-6847

Chart

G2.

IHCDIOSE/IHCEDIOS 1

·····03·.....·...

•
•
•
•

FREE MAIN
STORAGE
OCCUPIED BY
UNIT BLOCKS

•
•
•
•

·........1".......
·
.
·........1'........
·····El··········

• CLOSE DCBS FOR •
• DIRECT ACCESS •
•
DATA SETS
•

····Fl·········

·................
•
•

RETURN TO
CALLER

•
•

·................
• •••• G3 ••••••••••

•

GETUAT

•

1

: •••• H3 ••••••••• :

+

··..................
.,j
.. .......
SAVE DSRN IN
•
DSRNPTR

•
•

,

J3

.,

.•

e.

,.
DSRN
•• YES
•• NEGATIVE OR •• ----•• Too LARGE ••

•
:

····K2··.···.··

r

·····K3.·· ..···.·

•
• •

GET UNIT

•
•

...............:<,.-------:...................
RETURN

T~~G~~f:i:ER :

•• G4

.

..

••• ,

: •••• Gs ••••••••• :

'f"

. . . .'1".......

•.... H"..........

..... H5..........

• .CALLED FROM.. NO
~ GET PARAMETER •
DEFINE FILE •• -------->"
FOR ERROR
•
••
,.
~MESSAGE IHe220l.

--> •.

..

...

...

.-+-+-.-.-.-.-.-.

•
•
·PRCHNTFC
•
• GET PARAMETER.
•
FOR ERROR.
.LINK SAVE AREAS.
.MESSAGE IHC220I.
.AND SET UP FOR.
•
• •
ERROR HSG
•

........]. . . . .

i;i:~

:::].........

....
••••• J". ••••• ••••

• •••• J5 ••••••••••

·COHltn'FC
• •
.-.-.-.-.-.-.-.-.
•
INDICATE NO
•
SET UP FOR.
• RECORD PASSED
• ERROR MESSAGE • •

·

•
•
•
•

..
.
. ...... [i;i:~:
........
1·········
....
····K5·········

•
RETURN TO
•
.CALLER AT ERROR.
OFFSET
•
•

...............

Appendix F:

Object-Time Library Subprograms

245.3

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G2.

IHCDIOSE/IHCEDIOS (Part 5 of 5)

····..A3·.·······..
.......1'......
•

PRCMNTI'C

•

····.·.B3...•••.··...
• LINK UP SAVE
•
AREAS

•
•

·

•
:

.................•
~l~
1
·.··..Cl··········
.
•

•

SET UP

:P~T~sI8~

.

......·T....·..

:. . . 1. . . :
••••• D3 ••••••••••

:!~c;!~~._._._._:
• PROCESS ERROR •

•

MESSAGE·

El·········
··....
.................
•

246

RETURN

•

r----------------

---------1

IF BX'1'DlDaD
HANDLING

laRROIt

I IS NOT 'DSDIT,
I IHCQJtN DlDS

t---~~~___ _

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G3.

IHCNAMEL

··..····Al·······.·
.....1".......
... .0
.0

..··.
······A1·····
.......1"......
.. .
•

FRDNLII

B1

•

•

••

oo'

.' DURING'oo
0.110
110 ERROR
FIXUP

.0 .0

..'

!''

I ... '

··........1".......
GIVE ERROR
IHC904 I

'.. too

NO

o. 0.---

r
..'
.. '

·······Cl··········..
........1'.......

: •••• Cl ••••••••• :
•
•

•

Bl

' ..

NO •• 1/0 ERROR ••
---..
FIXUP IN
••
•• PROCESS.·

'..

FWRNLII

•
•

•
•

...

GIVE ERROR
IHC904I

•
•

-------------~

·.... 01········· .

·................
• TERMI NATE JOB •

.•

02

••

'oo

.

NO •• NAME MORE ••
--- •• THAN 8 CHARS ••

'.. '..

.. ..'

too

.. '

1'
'
·
.
.
·. . . ·1. . . · ··
- -: : : :1"""·
•••• 'El ••••••••••

-->:

.INITIALIZE FILE.
VIA FIOCS..
•

READ RECORD

j
...
. .0 '

:

Gl

.• ..
•• NAME
'oo

'..

.

FOUND

'.. ..'

..

..

.0•• NO

i'''
.
Hi

...

·..... E3··········.:<-·........1".......

·..... F2'·········.
,·..... ···1········..
.:....Kl :.

·
.
·.·.................

•
GIVE ERROR
•
.MESSAGE I HC 2 2 JI.

......................

too
• • • • • H2.··· ••••••
..
••
NAME IN
•• NO
•
GIVE ERROR
•
•• NAMELIST DICT •• -------->.MESSAGE IHC222I.
..

'..

'.. '.. ..' ..

'..

..

I'"

.INITIALIZE FILE.
•
VIA FIOCSII

••••• F3" ••••••••
.WRITE NAMELIST •
•
NAME
•

1
·.... ·G)*·········
.
·........1"........
• IMPLEMENT WRITE.
.USING NAMELIST •

--~

...

• TERMINATE JOB •

·..... E2*·········.
•
GI VE ERROR
•
.MESSAGE IHC22lI.

·..... Fl'·········..
·..................

······03·········
..................

··.................
• •• 'H)*' •••••••

•

RETURN

•

······Jl········ ...
·
.
;:~ ~:;::1::::::::----------------····Kl·········..
··...............
• IMPLEMENT READ •
• USING NAMELIST •

•

RETURN

•

Appendix F:

Object-Time Library sUQprograms

247

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G4.

IHCFINTH/IHCEFNTH (Part 1 of 3)

······1.3·········
.................
•

MITHII

•

1 .....
······B3·.·.·
.
·..................
•
OBTAIN
•
'UITERRUPT CODE •

j

.' . ' •
C3

--------------------., '..'.'
NO, •

IS

'. "

n.n;~~~¥~

.

I •• '

.'

.• '

'---1
YES

.....

.

003 •

• • F~'

1
DETERMINE INTERRUPT TYPE

-SPEC i rlcATIoN ----------SPEC ---DATA
FX-PT. OVERFL.
FX-PT. DIVIDE
FL-PT. SIGI'!.
DEC. OVEkFL.
DEC. DIVIDE
EXP. OVERFL.
EXP. UNDEHFL.
FL-PT. DIVIDE

SPEC

.

.

RETURN
ALEItT
FXOVC
ALERT
A LF. R'l"
DVCHJ(
FPOVF
FPUNF
DVCHK

t'XiJVC

.'.

Ft

'"

'.

.. .
'. .'

YES •

• ' IS IHCADJST'. YES
'.
LOADED
•• ---

'. .,.

-----------------0.

j

·
.
·..................
:

LOAD IHCI'.DJST :

1<----------

.. ··'Hi'·········
·..................
V

• SET UP ERROR
•
'MESSAGE IHC210I'
o FOR BOUNDARY
•
ALIGN ERROR
•
•

j

.
·..................
·... ·'..11*·········
•
SET UP
•
'PMAMETERS FOR •
IUCADJST
•
•

• o.

F~

'.

'.

' ..
l
G4
..

EXTENUEUo.
ERR HANDLINc, . '
o. PItF.:SENT . 0

'.

• NO

: •••• Gl ••••••••• :

.

.

0 I~

'. .'

NO

·

1 .

••••• G)..........

·

DVCHK

.0.

I.

'.

1)0 • • ,

'101 •
FIX

::.....
G\

.

'--1

.
.••••••••j..........
.. • • • •

GS ••••• C1 ••••

• SET UP ERROIt
•
. ' FLOATING
o. YES
0
DETERMINE
•
oMESSAGE IHC 20~10------ -->'. POItfl' DIVID!:. •• ------ .• -> o INTERRUPT TYPE •
o.
CHECK
••
0
•
•
•

.

•••••••••••••••••

.

' .'t'.~:~;"
I.

->:....0.'

·····H!)··········

• PICK UP DATA IN'
•
ERROR FROM
•

··. ·..·T·.......
: F1.oATl~gs pol NT :

J!). '. ..
.. .. .... '---1
' ...

.'
ARE
"'.
• .INTJ:;RRUPTS ••
•• TO BE IGNORED.

....
l->. .

•

NO

rES

.

•••••

..... .

'02·
.02 • • 13'
C) • • •

1······
···1(1···'
··................
..
'GO TO IHCiU)JST •

248

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G4.

IHCFINTH/IHCEFNTH (Part 2 of 3)

.... .--!
·.....C) ..
• 02 •

··....C2...........

•

C3

ALERT

•••

..
'.
:M~fiAg~ ffi~~rOI:<---..:-!:~.: ~R~X~~8~~NG·:.

. . ···1. ·. ·
•

•

•

••

•

'f'

PRESENT ••

I.. •

•••• ·02· •• •••••••

• •••• 03 ••••••••••

• IHCERRM

•

.FIOCS.

•
•

•

.-.- '-t-' -. -. -. -,
WRITE ERROR
MESSAGE

.................

O .0

•

• - '-1 -. -. - *-.- *_.
WRI TE ERROR
•
IHCdOI.

................ •.
:~~: 00->1
....
o

0

SKIPIT

E3

•••

••

. UNDERFLOW
'
' . NU _
________________ >0. uVERf'LOW
OR -..0 __

.

• 0

'. ' .. ' .

o. DIVIDE CK.o

: •••• Fl' •••••••• :
PICI< lJP rHW
DATA

..................
0

n:!;

.0

0<--------0.

•

.

.DID

F2

. '.

.

'.

.

i'''
.
F3

. '. ••

'.

.

USE I{
o.
YES. 0 EXTENDED
••
FIX UP DATA .0< ________ o.ERR HANDLING .0

'.

' '.. .'
.

• •

'.

' '.. .'
.

PH.E!-iENT . '

L"'___________ ;;;;; _____

i

>

NO

•••• 'G J ••••••••••
o
•
• GIVE STANDARD •
FIXUP
•
•

··

..
·······1·······

... 'H)'····· . ··
·...... ..........

_____________________ ---- - - ------ - ------- >.•

RETURN TO
SUPERVISOR

••

<--

Appendix F:

Object-Time Library Subprograms

248.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G4.

IHCFINTH/IHCEFNTH (Part 3 of 3)

.. POV"

.'

B3

.'.

'.

!

'.

...

......

... .

'0] •
: Fl. '--1
••••

·

IMPR

(to

.•

.'.
F]

0 •••

• MESSAGE I HC 21 0 I'
YES . ' EXTENDED '.
• FOR IMPRECISE .<--------o.ERR HANDLING.'
•
INT
°
0.
PRESENT. 0

.
... .
........ I:: ::::::_______________ ::r;o

... ··G]··········
oDETERMINE WHICH.

:S~DE!I¥~ ~g~fi:N:

·
°

.

ON

•

·······1·..····
······Hl·········..
°

DETERMINE
INTERRUPT
TYPECSI

·..................
l .:0;"
.....
•
•

->.

248.2

---'~ERR

...

:OAs:

YES

:M~~gAg~ Y~~~71:

•• :

l

NO

•••••

·······cl............
····.. ···[:~~i~::.

:.;~F3;.~~~~~

.'•

811

.. . ' .'
l'

:~i;:

o. ..EXTHHDij . '0o·

FPUNF

'.

NO . ' EXTENDED ' .
---'.ERR HANDLING.'
' . PRESENT.'

C3 •

'0

P

'.

D
SE

'

o.

NG

'. ' ...
.'
• YES

1

····.Cll•••.•• ••••

•
:dfi...81

~

..
.··...............
...
.
l ......
'ft~~S8I:

->.'01

G~

•

•

Order No. GY28-6638-1, page revised 1/15/11 by TNL GY28-6841

Chart

GS.

IHCADJST

··.......--1
·····Al·····.·..·
........1"......

NOTE: THIS MODULE IS LOADED
AND CALLED BY IHCFI I'l'IH/1.HCEFNTH

• Al

....••....
··.····A4
...............

• ISSUE SPIE TO •
• TAKE CARE OF
•
• INTERRUPTS THAT.
• OCCUR IN MOVING.
•
DATA
•

•

'..
··..... ...........
.

• CHECK ADDR OF •
.INSTR FOLLOWING.
• THE ONE WHICH •
.CAUSED BOUNDARY.
• MISALIGNMENT
•

• SAVE PREVIOUS •
• PICA ADDRESS
•

·

.................

.

,

·····Cl·.· •••••••

• MOVE DATA TO
•
DOUBLE WORD
BOUNDARY

C4

·......... ......... ...................

j

....... ......... .

•• •• VIOLATION
HANDLED.· ••

E3

•
•
•
:

•I '1

j

.'

.

.

F2

WAS

i''

: •••• Gl ••••••••• :

' '.. .'.

t.

j
.... Hi···.·.·..

• RET TO ARITH' •
• TO PROCESS NEW •
•
INTERRUPT.

i''

...... .........

G)

.'

H3

I

.'

i

...

NO

.

.•

>

I'

NO

.

.G ••• rq ••••••••••

.,

. .

•

I

• MODIFY INSTI<
•
ADDRESS TO
oPOINT TO INSTR
• WHICH CAlJ!;l:.D
o
IN'lERRUPT

•
•
•

0

•

• 0 •••••••••••••••

j
'.

.

NO •• IS MESSAGE ••
o • TO BE WRITTEN ••

.................. r
: .::. :
•

'.

1
·... ·Gq··········

••

.

•

. --.

RETURN

...1

'.

••••• H2···· ••••••

•

•I '.

I'" . -.- - -.- - - I
.'

YES
•• ERI< HANDLING •• --•• INCLUDED, •

1<----------

1 .
····J2·········
··...............
.

j

.' . ••

YlS •• INSTRUCTION.,
LENGTH CODE=2
••
• • ••

I'
• I ••
•• I::XTI::NIJED

•
MOVE NEW
•
.CONDITION CODE •
•
TO PIE
•

• ISSUE SPIE TO •
•
RESTORE
•
• ORIGINAL PICA.

.

...............

·.................. ...................

.

: •••• G2 ••••••••• :

.

I'

.

E4

••••

05 •••••••••
•
RI::TURN TO
•
.SUPERVISOR FOR.
•
ABEND
•

• MOVE OP CODE
•
.GET INSTRUCTION •
• AND Rl OF INSTR.
•
LENGTH
•
.TO A Tl:.MP AREA • •
•

·.................. ...................
• ISSUE SPIE TO •
•
RESTORE.
• ORIGINAL PICA •

---1---.'

NO

·..... Fl..........

. '. ••

NO
•• CONDITION •• 1m
,.-------->.,
CODE AFFECTED, .--••
,.

,.
NEW
••
•,
INTERRUPT
·,OCCURRED ••

'. .'

•

1

.'.
.. '••.
• .IS BI.lUNDARY ••

'.

·......

••••• :

.<----

.... ·El··········

*.

1. . . ·

• ISSUE A SPIE •
MACRO TO STOP •
SPECIAL
INTERRUPT
•
HANDLING
•

: •••• g~;~~~
•
IIISTRUCTION •
WHICH CAUSED •
.SPEC INTERRUPT •

: •••• D3 ••••••••• :
• MOVE INSTR TO •
•
WORK AREA
•
•

•
•
•
•

·..................

.'

••••• C5 ••••••••••

'l~O

t .. ··
... ··01······

. '. ••
Fl

.,

YES
•
,.-------->.
•

........ ... ......

• REEXECUTE INST
• WHICH CAUSED
•
ORIGINAL
:
INTERRUPT

1
.,

, . NEXT.,
, . INSTRUCTION.,
.,
ON WRONG
•• BOUNDARY , .
••
••

•
•
:

• ISSUE SPIE FOR
APPROPRIATE
•
•
I NTERRU PT
•
HANDLING

•

j
·····B4..........

·····Bl·······.·.

j

IHCADJST

'. • I I' .
j. YES

••

• •• ··H4 •••••••• • •
•
RESET PSW
•
.ADDRESS IN PIE.
oTO INSTR WHICH .----•
CAUSED
•
INTERRUP1
•
•

.................

••••• J ) • • • • • • • • • •

•
DECREMENT
• MESSAGE COUNT
• AND PLACE NEW
•
COUNT IN
•
IHCUOPT

•
•
•
•
•

........r::::::--·
.
·.................
..
....
.
l ....
·····Kl··········
• CALL IHCFINTHI •
•
IHCEFNTH TO •
• WRITE MESSAGE •

->.o

Al •
•

Appendix

.[4':

Object-Time Library Subprograms

249

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

Gb.

IHCIBERH

······A3····..·....
·..................
1
······B3··········
.
·......... ..........
•
COMPILER•
• GENERATED CODE.

• OBTAIN INTERNAL •
• SEQUENCE NUMBER.
•
(ItiN)
•

j

······C3··········.
·.. ....... .........
• CONVERT ISN TO •
• DECIMAL FORMAT •

j

... ··D3···· . ·· . ·.
•
•

BRANCH TO
IHCEkRM TO
HANDLE THE
WRITING OF
ERRUR MSG

•

..................
•

•
•
•

250

•

I

•••• E)+· .... •••••

IBEXIT RTN OF •
IHCFCOMHI
•

........ ...... .
IHCECOMH

•

Order No. GY28-b638-1, page revised 1/15/71 by TNL GY28-6847

('11':1 T

t

IIWf,'T'!\ F,

NOT 1': ,

{(l,l t

t

of 2)

THIS MODULE IS LOADED
AND clILLED BY THE STI'.F: EXIT
ROUTINE SECTION OF'
Ille F('OMI1/IHC1':cOMH

······A3······· ....
. . . 1·. . ·
•

IHCSTAE

•

·····B3·········.

•
SAVE IBCOMM
•
• PARAMETER LIST.
•
POINTER AND
.-.---.
'ADDRESS OF SAVE.
,
AREA
•

.................

·.. ···C1··········.

R1':~TORI::

•
INSERT 1/0
•
.STlITUS IN ERROR"

:

MSG

:

;:;;:;::·1······· .
... .

V

: •••• '.'1 .......... :
o<;FT POIN'T'ER TO •
..

S'T'A.E' .... ':I\Vr

M1FA

•

:

.... t .............. .

·

j

.

••••• F.l ••••••••••

• "FT POINTER To
o ·:TAF. C()NTR('J.
•
RL()C~

0

0

........................... ..

j

·

.
·;:::: ~~:j..........
·.....

EXITRTN2
·····C2··········

• GET SYSTI!:M/USER.
• "BEND CODE AND 0
•
PROGRAM PSW
•

SYSTEM/USER.0

·AREND CODE liND •
PRIJc;RTIM PSW
:
•

......................... ..

j

.... -.-.- .. .-.-.-.

........ ·Gl- .. •• .......... ..
oClILLCNVT

•

o rClNVERT CODE
•o
MHl PSW

•

..........................

j
........ HI ............... .

o
•
•
';ET !,DOR OF'
•
• ''''TflY p.n""HIE •

,
INSERT I/O
•
.STATUS IN ERROR'
•
MSG
•

"'

- >.

OJ

···.··CIi..·...·· .•.
·········r········.

WTP

:~nN5Y~b5~/~~6R:

•

•

.... -.-.-.-.-.-.-.
........................ ..
..... ·02· ............ ..

·CALLCNVT

•

. PROGRA.M

psw

•

..........
o
•
o 02-*-

• CONVERT ABEND 0
• CODE AND PSW
•
•
FOR MES1;lIGE
•

j

·····E2··········

• ISSUE TWO WTO •
.MACROS TO WkITf' •
• ERROR MES::;IV;F •
IHC2t1(lI
•
•

·......................
1
. ., ..
.. .. .
,

.

.......... 1-'1 .... •• ......... ..
•.GI::T

······C,···..··....
·..............••••.....
1. .
....

NOlO

---,------->

F2

.,

.: tIS:..~~~~/N"
\.', RoUTINI:: "

.~:~

"

•

Nf'

1
·.... ·G2··········
.
·...·....1:·:: .:.:_-.
• RESTORE STAE
•
• SUPERVI SOR SAVEo
•
• liREI'. POI NTI::f(

..... H2··········

·.................... ...................
· 1 .. 1 .
•••• ',11' ••• ••••••

•
•
•

REGTORE
REGISTERS

0
•
•

• •••• J2 ••••••••• 0

·.................. .
--_::::::::r ........
•
~ET RETURN'
•
":()lW-I~ (RFTRY) .-----\
•
o
• •

SET RETURN
(:ODE=O (NO
RETRY)

•
•
•

····1(2·········
·........
........
•
•

RETURN TO
SUPERVISOR

•
•

Appendix F:

Object-Time Library Subprograms

251

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart

G7.

IHCSTAE (Part 2 of 2)

·....Al········· .
:

...............
RETRY

........
······A3··
................

---T----··---~-----

:

,! ~:~V~:O~ROH
~---- ... ---------

•

•

I

1

~

·
.
·.................
·
...

·····B3·······...

·····B1········· ...

•
SET UP
•
.PARAMETERS FOR.
•
CONVERSION
•
•
ROUTINE
•

• SAVE CONTROL ...
• BLOCK POINTER ..

·.................

I

1

° -. -0-0-._._._.
·····C3··········
.-.

·····et··········
*

•
ISSUE STAE
MACRO TO
•
• SPECIFY A NEW
o EXIT RTN ADDR

CALLCNVT

..
•
..
.'

FCVZO

··..····T····..·..

•

.CONVERT SYSTEM •
.ABEND CODE ANO •
•
PSW TO HEX
•

........1"......

·······01··········.'.
..... ...... ......

..·.
······03······
................

•
GET ADDR OF .'
• PA.RMS IN IBCOH ••

•

RETURN

•

1 ':
:' ... El········
•
GET ADDR OF ..
• STAE CONTROL .'
: BLOCJ( POINTER ::

..................
. °. '

n

...1

o•

'.

1/0 TO BE o.

o.

'.

RESTORED

'. '. .' .'
m

..'

NO
• ----

1

•••• 'Gi' . . . . . . . . ..
o
o

:

.'

RESTORE 1/0

:.'

..... .......... ,.
°

..

1<---------•••• 'Hi' •••••••••
oISSUE SPIE FOR •
•
•
"
•

°"ADDRESSING
PROTECTION
AND
• SPECI FlCATION
° INTERRUPTS

~)

"

• • • • • • • • • • • • • • • • 41

1 .....
·····..11······

oSEARCH THROUGH ..
o CHAINED SAVE •
AREAS,
..

°

.................:
:B~~~~~o~lIH

j

J(1
o.
CAN
o.
•• TRACEBACJ( o. NO
o.
MAP BE
. 0 __ _
".COMPLETE ••

.°

L _______.____ _

252

.
0

"

'.
1. . . . . . . . . . . . . . . . . .0

. . .,J. . . . - ----,-- - - - - - -

. . . . r. . ·.
°IHCERRM

•

,'- 0-0-0- 0_._ . - . - 0

-->:

ERR~~cf.iij¥"GE :

•

• o.

'. '.. .' ..'
o YES

.... H2··········

"ADD INDICATION •
TO MESSAGE
•

---->,'

•

····K2·········

................

'.CALL IBEXIT TO •
• TERMINATE JOB •
"

lI ERROR
IF EXTBHDED
IlANDLING
lxs NOT PRESENT,
l IHCEIUIM ENDS

L_~~~~

___ _

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Ga.

Chart

........
....

IHCERRM (Part 1 of 2)

........
....

• Al •

IHCERRE
·····Al·.·· ••• • •• ---- .. -------------------•
•
I CALLED BY IBCPCOMH/
:IN~~A~~'Y:
IIHCECOMH FOR ERROR
•
•
I SUMMARY DURING LOAD

I.c:. ·l·. . : L~_~~~:~~__
:· ·. ·l·····: L~__________
•••• ·B1····· •••••

•.SAVE

•

----f"----------------

REGISTERS.
: AND k~SAVE :

II CALLED
BY
LIBRARY ROUTINE
I DBTBC'l'lNG

· · · . r·. . ·
·····C1··········
• MAKE INITIAL •

:CAH;ri°B~~~1I :

•
ADDRESS I
•
••

.. ... ..
.. .. .. ..
D1

!

!

••••• Al..........
•
PRINT
•

• •••• A5 ••••••••••
• •

:T~~C~£lg~T~UE:

•

:GfIs~O~~~i ~~:

ENTRY MESSAGE.

•

l~~~~::r·····:
•••••

• •••• Bs ••••••••••
• •
• GET NUMBER OF •
:
ENTRIES
:

••••• Cl..........
.IHCETRCB
•
:-.-.-.-.-.-.-.-:
.GIVE TRACEBACK •

• •••• cs ••••••••••
• •

:······r··..·:

~:~~:;:T·····:

:E~R~U~~RT~rS:

•
ENTRY
•
••

..···..T..·····

03.•..
.. . .
......
011..........
.
. . .05... .. ..
.
.. .
.. . .
. . .. . .
. ..
.. .

• • ENTRY FOR •• YES.
•
••
SUMMARY
•• ---->. 1.5 •

•• FREE BUFFER •• Y E S .
•
••
AREA
•• -------->.ISSUE PREEMAIN •

•• ANY ERRORS •• NO
•• OF THIS TYPE •• ---

c'
....

·}~-------------;;;;;~;!:::::::::<______ .::

......::c.....

..
• •
:
G~MB~OR
:

n···.. as •.

•

Bl....... •••
• •
• PRINT MESSAGE •
:FOR THIS ERROR:

·······1·..····

· ·. ··r·. · ·

TABLE

:······l·····:

••

....
..
....

••

• A5 •

····El.·.····.·

•
•
: PRINT BEADING

••••

.
. .. . .
...............
. .
: T~r:r~nr?OB :

..

~.:~~~ ~~~m5.:.

········[:=:~-------------:r..

:~~~~l;~.;~;~:

..l···..

..................

.baoi/~2
YES
•
AREA F O R .
••••
• ••• YES
:
. ' OR ERROR ~06 .-------->.MESSAGE MUST BE.-------->..
ERR. 218 •• -------->.
•
..R E E D .
••
••
•
' •• OR 226 ••

.

··.·.FS··"..······
:
N~~E~R~g~ :
.ERROR COUNT IN •
•
MESSAGE
•

..
.
.
......
..
.
.'.I::------------~::::::::: :::::::- - - - - - ---::!:~------------- _::::::::i········ .......·1········
• G1···...

.:::

••••

D~MiOTE::: .~~_>:

: •••• G5 ••••••••• :

~

'. '1 · . .

.....
1+..........
: S=ITCI"U~ :
STORE ENTRY
~D

......1. . . ·
HS ••••••••• :

•

•

•

•

.J1··...
: •••• J2 ••••••••• :
ERROR • •
NO
• PRINT MESSAGE •
~ER IN : .-------->.TBAT ERROR NO. •
•• ' . TABLE •••
:18 NOT IN TABLE:

·········l··;ii::·
->:

NUMBER

.....
••
.

••

:.::.: ··1··~0
.....Xs..........

....

• •••• •

:~~ iMr:d~Y:

•

••••

YES ••

r---··MORE ENTRIES.·
•• ••
• .' •

G2..

..····n··········.
·········1········.

:
•

•

•• J5

••

•'

···l··~S

PRINT LINE

::....D:i~¥.,:g:RIO

:......T......:
•

~

. . ·. ·F:::::---

Al :

~

•

GET E X I T :
ADDRESS I F .
SPECIFIED.

:

•

RETURN

:

• ••••••••••••••

• 02 •

• Al·

Appendix F:

Object-Time Library Subprograms

~53

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY2S-6847

Chart.

GS.

....
·......--L.,

IHCERRM (Part 2 of 2)

·02 •

• Al

.

o. ·

,

Al

.,

~~IT G~e~~ES~.

*. '.

0

YES
t ________

.' . •

,

>:
•

.

SET SPECIAL
EXIT SWITCH

•
:

................
l .......
•

•

->: .~~.:

• NO

1.,

+.

Bl

.

••••• A2" •••••••••

'.

1/0 ERROR t,

·0

• •••• B2 ••••••••••

,.
t,
tPRltlT EXECUTION.
, . CONTINUE
., NO
.TERMINATING om:.
t,
(BAfED ON
, t ________ >tTO ERROR COUNT t
t, COUNTS t ,t
•
MESSAGE
•

.

.

'. *. .' .

i

• t ••• t
:

l->::~t·.

YES

:->[

Cl

• •••

,.

IlJ ••

v

Cl

.

•••••••••••••••••

,
+.

•• "'e2* •••••••••

• ••• -C3' •••••••••

, . PRINT.,
•
•
NO , .
MESSAGE
"
YES
.GET ADDRESS AND.
___ t,
(BASt'O ON
,.-.,------;..
LENGTH OF
:
MESSAGE:
• , t ~OUNTS ~ . ' •

'

t

PRINT MES~AGE •
SET ME~;bAGE.
PRlIlTED
•
INDICATlCiN
:

.-------->..AND

..................................

... '

:

,.,v--- ----. ------ --- --- ------ ----- -- .-------- -- -_____ .J
,.-,------->.
------->.
'.
.'
.
.
.
'f~-:::::r.......

.V1

••••

: •••• 02 ••••••••• :

, •
hUNT
.,
•,
llUFFER
.,l'lJNTENTS , .

YES

: •••• 0) ••••••••• :

"GET ArlDRFSS A N D . "
LEllr,TH O~'
•.
PRINT
.CURRENT DUFFER.
•

B\J~'fER

•

_ _ - ------.:::::::::.:.:::. _--_--::

\1

••• ··.:

.C'.

• .~.l
••••
: •••• 1:.2 ••••••••• :
:~~~.~¥~t~·
, . l'RACE:BACI< ., YES
tRl::~OVE UNf: SAvr.
.-.-.-.-.-.-.-.-.
RE<,;IJE:;n;n
,.-,·------>.AREA FROM ('HAIII.--------~.
•
••
, •
•
• • CALL 1 RAl r,;
•

..

.
.'

'.

:':.;. :->I

. ...

••••

·

.

.
. ..................
..................

t.

'. '. .'
4'

..

..

:.~~.

RI::TlIRN CODl::.
TO 1
•

.................

G2

•

II

'.

1

·..................
.•••.•
t->:
... .
II~,FH

,

:

'.

H2

.,

•

•

•

'.

t.

'. '. .' .
•

.

•

NO

······J2····I .......

·...................

·

j

••• 'K2' ••••••

.'

•

•• 0

•

...................

.'

.
G4

~'R~:l::MAIN·

,.
TAKE
., n;::
• REt.I!'TI:.R!' AND •
•• SPl::CIAL I::XIT ,"-------->.TURN U~'~' l::NTfl,( •
!iWl1'CH

•

j
••• tJ J •••••••••
•
EXIT 1'0
•
:SPECIFIW POINT:

...............

..

t_

.-.>

.'

•

'.

I •• 1

H4

.

••••••••••••• III.

.
:

. . '!.
t.

NO

t.

••••

Yt.~

:

...1

.,

•••••
•

H~ • • • • • • • • • •

..................

.. ., ,. .
•

(;2 :

0

•

•

, . USER EX IT., '( E~
• PRI NT MESHAGE •
••
TAKEN
, •• -----, -".INDICATING USER.'
.,
••
•
FIXUP
•
,

.
j

l->: ·G~...

NO

......
:

·
.
·...............
.
·
..
.
l ......
• •••• J" ••••••••••

• PRINT MESSA\;t; •
•
INDICATING
•
.:;TANDARO FlXUP •

o

III'

:

PH I NTEU , " t-.

- >.

RETURN

n

0

M.!::!;SA(jl:.

•

•

ft ••

t

•.
:

1

• (;4

•

•

• . . . . . . t ••••••••••
• RI:.~,T(JHt:; U!,FH!j •

t.

I

RI::lNITlALIZl::
FlOC!;"

: . . . . . .; j • • • • • • • • • :

•

.TURN OFt' ~:NTHY •
:
:';WITCII
•

254

(~q

.
.
.
'. Co-_____ ___ ::::::::r.......

• •

t.XIT :

(i4

.,

.

,

,-t_._t_t_t_t

:"ALI.

• ••••••••••• t ••••

•
:

,.FREE 8UF~'ER., Y E S .
••
AREA
•• -------->.I~SUI:.

: •••• ill ••••••••• :
I-t·

•

•
•
:

CHAlN

.~'luCSN

------>.

·02 •

: •••• (;1 ••••••••• :

•

:

.... t',,··········..... . .
..-.-.-.-.-.-.>:
.................
.
· ....

F2 ••••••••••

.St;T RETURN CODE'
TO 0

••••

YE~;

I

'S~:T

..
.'---1
.
...................
....
·· ..
'--t..
..
• ••••

'.

•• lJSl::1! EXIT "
NI)
Rl::f,;UE!>TEO
,.- ..

-->..

~"

N()

v

fo'l

·..... ...........

Rk:['TOHl:: ONE
>.• SAVE
ARl::A TO

•

G2 •

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-b847
Chart

G9.

···..11.......4 ...

IHCFOPT (Part 1 of 3)

.......... .•.
·01 •
• 11.2 .--~

········11.1·.·•••••••..
.................

ERRSET

• SAVE REGISTERS •

11.2
••
• .NO. OF ••

• •••• 11.3 ••••••••••
•
•
:
•
MESSAGES
•

.:.~~y~~G~~ OO.:.~~ ______ >: SE~RI~tR~oTO
••

••
I.

+... '
•

· 1 .
·..................
.;~. :_>[
·:....
.
.-.-. -. -.-. -. -. -.
.................

.'

•

•

•••••••••••••••••

YES

t .
·····A4.........
• STORE NO. Of'
•
MEsSAGES TO
.PRINT IN TABLE
•
ENTRY

·........1".......

····.B1········ ••

.'

•
GET ERROR
•
• NUMBER AND SAVE.
•
IT
•

.. •

•

•

•

•

•

•

I~~------------.-:::::]. . . .

·····CII···.······.
·GETENTRY

.-.-.-.-.-.-.-.~

•

· 1'........
........

..

• GET TRACEBACK •
INDICATIUN
•
•

·02 •

IGNORITM D2 ••• ••
••
••
•• FIRST ••
• ·TABLE ENTRY.. NO
••
TIME
•• YES
•• MODIFIABLE •• -------->..
THROUGH
••
••
••
•• (SWITCH.·

.. ..
.j '"
••

••

··.::r-l

YES
' ••
••
••
••
ERROR
••
CONDITION 212 ••
••
••

.. ..
ON)

•

••

H5 •

••

:~E'~~~~Lt-._._:

03'

--------> •.

).::

·····E1·········.

.

I ...
.. •

i
r---.' .. .. ..
..... ·l ....
.
..

.
.
.................
.. .I.. ..
.. .. .. .. ....

'

E3

• ••

'..

••••

PARAM!;TEHS •• •
..~UPPLIED

•

."

• •

....

'.
..

r
.
+"

'.. ..' . '

.

.

'..

.

• •••• E~ ••••••••••

'. =
•
•• -------->.
••
•

GT . '
---'.
CODE 2
••

I NDICATi:.
TRACEBAl:K
HEQUESTk-D

•

...............:

:

i"

.02 •
- >. B1 •

Fl·.

••

EU

YES

•·02
E2.•

..

·

. ·'. '..
' .. '.. ......

••

:;;1 X

04

..
YE.S •• CODE
LT OR ••
---..
EQ TO 0
••

on

NO ••••

•
GET NO.
OF
••
·ERRORS
ALLOWED

·
.
.·................
• •••• F4 •••• •• ••••

YES •• PARAMETER ••
--- •• LT OR EO TO 0 ••

INDICATE NO
TRACEFIACK

i"0

-----. ----'1

·... ··Gl· ..........

•
:

<----------- -- ---- -------

•••• +<.;4 ••••••••••

'GETEtiTRY
•
+-+-+-+-+-.-+-+-+
•
GET m;EI<
•

. . . ·1. . . ·.

• STORE NO. 0.' •
'ERRORS ALLOWED •
• IN TABLE ENTRY •

·..................

·
•

.I
..

ADDReSS

•

·... .--1
·.....
'01 •

• H'>

• • H1
••••
:;::;.~~~~~.~~~~;:
• .NO. ALLOWED.. YES
•
TO ALLOW TO •
••• ?T O~,>~O T?' .-------->:ZE.ROE~~5lfs~ ALL:

.
.
-- - --::i~~~- -- - - - - -: ::::::i........
..

Yt:S . '

---'.

.GETENTRY

H4

••

ZERU

'.

'..

.
..'

'. ' .

.

••

.'

• ····H'>· •••••••••

.UPDATE ERR lle • •
• BY ONE (TUI.

r ...'

- -:: : : r. . .
·

• STORE ADDRESS •
'IN TABLE ENTRY'

......·T....·.
• GET NUMBER OF •
•
MESSAGES TO •
•
PRINT
•

K4

••

.. •

••
NO.
••
• •••
• .MESSAGES TO •• YES.
•
•• PRINT LT OR •• ---->. 1.2 •
••• ~Q TO

....1
··....
......

+,

. ·' .

FIilS'! TIm:

·' .

•

'THROU\.i1l SWl Tell •
•
ON)
•

••••• J . . . . . . . . . . . .

•

?'.

..

·

·····J1··········
.-.-.-.-.-..-.-.

J'>

...

••

•• ERROR ••
•• NUMBER GT •• NO
t. MAXIMUM Tv bE•• -,--]
••

.. ..

CHANGElJ ••
••

••
YlS

Ii
••••

l ....... .... ·

•

.. ..

.02 •• Cl •
->. E2·
•

t.
t,

.; .FI~~~ofil;~E '; .~~ ___ J
..SWITCH uN.'

••••••

+,

...

+... '
•

YES

.J..
·..

NO

Ali

• •••• 85 ••••••••••

+.

c------------------------------------------------::

I

•

••

.. •

I.

01···..

.. .

·..

+.

• GET ADDRESS OF •
• ENTRY FOR THIS •
•
ERROR NO.
•

Kl

BU

•• NUMBER G'l •• n;s
• INDICATE Pt. ALL ~IESSAGE.S •

NEXT
· · · · · C l · · · · · · · · ••
• FINDENTR
•

••

•

•
•
•

'02 •

• 11.1·

•

Appendix F:

Object-Time Library Subprograms

255

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

chart

IHCFOPT (Part 2 of 3)

G9.

.... .--t
·.....
·02 •
• Ai

•••
Ai
••
••••
••
•• YES
••
ERROR 212
••
••
••
••

l'i::'::1·' ~o

....
..... B1..........
........1"......
• GETENTRY
•
• -.-.-.-.-.-.-.-.
• GET UPPER RANGE.

•

"

•

········1·········

········1·········

·····A"··········
.•
•
··........
.
· 1"......

.....B2..........

..... B3 .•........

.......:r.......

....·..T. . ·.

·····B"···.···
...•
•

ERRSAV
• •••• A2..........
• •••• A3 ••••••••••
·GETENTRY..
•

.-0-.-.-._._._._..
0.-------->0

.

GET CONTROL •
.SAVE REGISTERS •
CHARACTER··
•
INDICATION··
•

•
•

•
INDICATE NO • •
•
CONTROL.
•
GET ERROR
.CHARACTER TO BE.
••
NUMBER
.....n _ T0 BE
•
•
SUPPLIED..
CHANGED··
• •

••••• C1..........
• TURN ON SWITCH •
•
INDICATING.
•
FIRST TIME.
THROUGH
•

·..... ............
1
·····01··········

•
•

STORE UPPER
RANGE AS
• MAX IMUM TO BE
•
CHANGED

•
•
•
•

·.................
.... .
l.

->.·01H5 • •

..

.0

C2
••••
••
-. NO
•• EQUALS CODE-1 •• --• • ••

'.

'1;"
.'

: . . . ~~~~~~;~ . . . . :
•
CONTROL.
-CHARACTER TO BE.
:
SUPPLIED:

........... ......
~oi; :-->1
....

•
•
•
•
•

•••••

Cl ••••••••••
.FINDENTR-

ERRSTR

.SAVE REGISTERS •

•

GET ERROR
NUMBER

•
••

........1"......
·.···C,,··· .. ·····

• FlNDENTR

•

.. . . . 1"....... ·......·T....·..
.-.-.-.-.-.-.-.-.

.GET ADDRESS OF •
•
TABLE ENTRY •

: . . . . 03 . . . . . . . . . :
.GET ADDRESS OF • WHERE TO SAVE •
:
ENTRY
:

.................
1

. - . - . - . - 0 •• - . - •••

:GE+A~JRl~R~F

..

Oil

0·.

••

.'

.. ..

I.

••
ENTRY
•• MODIFIABLE
I.

.'

:

.0•• NO---->.•

. . . ·1. . ·. . . . . . . . . ..

··.................

······F"··········.
··..................

.
.
.<--------.
.
.

·
•
•

TURN O F r .
SWITCHES

····F2·········

•

RETURN

•

.

• •••• E) • • • • • • • • • •
•

MOVE TABLE
ENTRY

.GET ADDRE-SS or
WHERE TO
•
• RESTORE TABLE
•
ENTRY FROM

•
•
•
•

• RESTORE TABLt: •
•
ENTRY
•

··........! ..
• E2 •

• •••

•
E2 •

••••

I •• '

r"
·····E"··········
·. . . ·T....·..

·

FINISHED
••••• E2..........

256

•

•••

Order No. GY28-6638-1, page revised 1/15/71 by

Chart

G9.

,.,
Al
.,
, . ERROR .,
YES , . NO. LT OR .,
EO TO FIRST ••
.,
TABLE , .
• , ENTRY,.

...

•

-->.

1
.,

• NO

.•

B1

,

.,

·•
.•
•
·······T·····
..•
.-.-.-.-.-.-.-.-.
·.................
.
....
l ....
• •
····.A2 •••• •• ••••

_.--.,
! .. ..

:°12:

*.

,.ERR NO, GT ., YES
., NO, OF TABLE ,.----., ENTRIES,·

.. .. .. ..
{"O

SET UP FOR
•
ERROR NO. 902 •

····.B2 ••••••••• •
• WRITE
•
:

WRITE9~¥SSAGE :

·02 •
E2 •

->*

·... ··C1··········.
··..................
1
01 ., .,

,.-------->.

" . • ••••••••••••••

r

,.,

.,
e.

.. ...... .---1

· :~i;:
•••
1
·····B3
..••••....•
•
NO

.UPDATE TO NEXT •
PARAfolETER
•
•

••

••

·······1····..·
·····Cl.·······
..•
•
: ,HJm'IR :

.
········r....··

,

.. ..

A3

••

,.
LAST
., YES
•• ., PARAfolETER
GOTTEN , • ,

•

,.
.,
····02····.· •• •
,.TABLE ENTRY., Y E S .
•
., MODIFIABLE
RETURN

.• .•

GETENTRY

·

.GET TABLE ENTRY.
•
ADOR
•

*. *.

GY28-6847

IHCFOPT (Part 3 of 3)

FINOENTR

•••••

~NL

It

··.····01········.
................
•

RETURN

•

. ., ..

.

,

El

.,

..

,.
., YES
., IS IT ERRSAV ,.-----

..

*.

.•

r

* ..•

······Fl··········
• NO, 901 .•
·..................
• SET UP FOR ERR •

WRITE

1

,.,
, . G1
.'.,
: •••• G2 ••••••••• :
, •
FIOCSI
.,
MAXE
•
• , • ~N IT IALIZE? • ' ·-------->:~ll£I~~I i~~~~

NO

... ...

..•.................:
J

' . ' YES

1<------------------------

······H1··········.

·..................
• PI1l' ERROR NO,
• I NTO MESSAGE

•
•

1
·······Jl··········
.
.
· 1"......
........
• WRI TE MESSAGE •
•
VIA FIOCSI
•

······)(1·········
.................
•

RETURN

•

Appendix F:

Object-Time Library Subprograms

257

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G10.

IHCTRCH/IHCETRCH

····A3·· . ·····.

NOTE:

IHCETRCH IS CALLED BY
IHCERRM.
IHCTRCH (ENTRY POINT IHCERRM)
IS CALLED BY LIBRARY ROUTINES
DETECTING ERRORS.

·................
•
•

·····B2··.· ..

,~...
• SE:T SWITCH TO •
• INDICATE ENTRY •
•
f'ROM ERROR
MONITOR.

IHCTRCHI
IHCETRCH

1

B3 ..
• t.

••
••
YES •• EXTENDED
••
ERR HANDLING ••
•• PRESENT ••

··t

.<--------•.

·......T....·..

•

•
•

···..CI......I ..•

I... •

IHCERRM

C3

• t.

••

•• PRE••
YES •• CEDING USE ••
OF IHCTRCH
••
DONE
••

o.

---.0

'.

* ... '

:->1.
·:.:;.
.....·..

.

D)

..


•• SPECIFIED.·

'..

• PRI NT NAME OF •
.CALLING ROUTINE.

NO

••
ERROR
•• NO
•• CONDITION 217 •• --•• OR 218
••

'.

1
······CII.••.•.••••
.
·..................

'.. • ..'YES

1..

.

••

.:

..

.TR~gE~r~CK.: .~~~ _____

'. '..

1

'. (0
..

.

..

>:.

.·······1·······

........ .......

Fli ..
••
.. ' TABLE '.

••
SIZE
•• NO
•• EXCEEDED OR •• --••
LOOP
••
•• FOUND. •

i

F5 ..
••
. . . .•

•• ·'G], •• ••••••
RETURN TO
ItsEXIT WITH
ABORT CODE

.0

'. .'

.......... .....

.<--

•

....

: •••• G~ ••••••••• :

•

···..................
•
•

.. .-------------------,]f...j ......
·
·

••• "J

······K3··········.
·..................
!
....
··....
..
•
CONVERT REG •
• CONTENTS TO HEX.

•

258

.

"J'" •••••••••

.
:~~~~~~~---------~~ ~~~~~~ j........

....i

ell •

•

j

•
•

. ....
..

• PRINT HEADER
•
• FOR TRACEBACK •
•
•

TURN ERROR

:MONITO~F~WlTCH :

·.····H5·.···.···
...............

: •••• Hl ••••••••• :

PRINT ERROR
ME:;SAGE

NO

·.. ................ ...................
.PHINT TEHMINA'IE.
:
MESSAGE:

L>: .::.:
-->.•

i

'. .'

..

"s ::::::

: •••• G4 ••••••••• :

•

0.··--1

•• EXTENDED ••
•• ERR HANDLlNG
•• PRESENt ••

"s

•
•
•

~JH:i i1ai~T

'.

'.

•••• Fle ••••••••
.RETURN TO EXIT •
:
ADDRESS
:

.:
..

• •••• E5 ••••••••••

.".

• POINT TO NEXT.
• HIGHEST LEVEL
.CALLING ROUTINE.

.<--

RETURN fO
CALLER

•
•

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

··•........A2 ...--1
••••• Al····.·....
••••• A2 ••••••••••
·......·T.......
· ..................

Chart G11.

IHCFDUMP

··...........--1
······A"..·........
··. ·. ·T......·..
..
....
• Ali

DUMP

• SET SWITCH ON •
•
FOR MONITOR •
·EXIT (EXITSW = •
•
X'FF').

•••
B1
••
••
••
YES •• IS TIns A ••
---..
DUMP CALL ••
••
••

.. ' . .' ..

• SET CARRIAGE
•
CONTROL FOR
.EJECT (CHAR IS
•
C'l')

r
.. ··01·f'
....... .
.•.

' .. '

.' '

·................
• BRANCH TO IBCOM.
• FOR MSG IHC90"I.

PDUMP
• •••• B2 ••••••••••
.SET SWITCH OFF •
•
FOR MONITOR •
EXIT
•
• (EXITSW=X' 00') •

• SET SWITCH TO •
-->.INDICATE 1/0 IN.
:
PROGRESS
:

........1'.......

·..... Fl*·········.
• OBTAIN ADDRESS •
•
•
OF ARGUMENT
LIST
•
•

·..................

I

·••• ·'Gi'··· ••••••.

·........[".......
• SELECT SYSTEM •
• Ol1l'PUT DEVICE •

·
.
·..................
1
······J1··········
.
·····Hl··········

•.INITIALIZATION
MAKE
••
• CALL TO FIOCS_ •

·......·T....·..
• SKIP A LINE VIA.
•
FIOCS_
•

·····K1··········
·.................
..
....
.
l->.
• SAVE START OF •
•
RECORD AND
.COMPUTE
END OF ••
RECORD

•

......
A2 •

Bli

...................
·····C2··········•
··...................
·:·~;·:->I
..... ..... .
·····D2····
·
.
·..................

0

.'

E2

·1

..

.~

.RESET ARGUM~NT •
•
POINTER.

'. ••

.

'. ' .. ' .

.'

YES
•• -----

.

••• B5 ••••••••••

..

.

..-.
C~

I·

02 •

: •••• 0] ••••••••• :

.......... ..........
··...J.....

••

.. *... .... ..

l->..·........·.

.SET FOIt END OF •
--->.
ARGUMENTS
•

r. . . ·.

NO •• IS THIS A ••
---.. DUMP ENTRY ••

•

YF.S

...······

····D~
IBEXIT

•

...............

• --- - ----- --- ---t

• TEkMINATJ:: J03 •

• J2 •

••

•• ONLY ONE
••
ARGUMENT

*.

.
.

........

··....c"...........
··•.................•

GETARG

•
•

••

.. ..1.. :..

INITIALIZE
•
• ARGUMENT SWITCHO<--

• ASSUME FIRST
• LIMIT IS LOW

,

•
•

••
ARE
•• YES
.RESET I/O ENDED.
••
ARGUMENTS •• -------->.
SWITCH
•
•• EXHAUSTED. •
•
•

••

: •••• E1 ••••••••• :

•

• DUMP DESIRED
LOCATION(SI
•

<--------.

Cl
••
• • IS THIS ••
NO •• A PDUMP ••
<-- •• DURING AN 1/0 ••
••
FIXUP ••
I.

•
•
• __ _
•

... ....... .
·E~·

·................

•
-->.

kETURN 10
CALLER

•
•

·1""

..

F2
••
• •••• F) ••••••••••
•• BYTES ••
•
•
NO ••
TO BE
•• YES
•
GET BYTES
•
--- ..... R~~~N •••• -------->:BETWEEN LIMITS :
•• LIMIT.·
•
•

'

... '

................ .

·······G2···· ........
·. . ·. T....·..
•
RESET FOR
• SECOND LIMIT

•
.<----------------

..

·

H2
••
•• ••• H3 •• ••••••••
.'
*.
•
•
•• IS FORMAT •• NO
.SET UP FOR HEX •
•• CODE LEGAL •• -------->.
FORMAT

'. '.

' .. ' .'

.'

i,:::---------------------1

·..

---------->
J2

...................

••

..

.

• •••• J3 •••••• • •••

.'
'. • • YES
•
ALLOW FOR
COMPLEX
•• -------->.IMAGINARY PART
'.
.'

••
••

.
•
•

'......K2..........
'.i: :-------------:.....: :1t:3...].·······
. . .:
•
GET BUFFER.
.rcvzo
•
• POSITION AND •
.-.-.-.-.-.-.-.-.
•
ADDRESS OF
.-------->. HEXADECIMAL •
•
CONVERSION
•
• CURRENT DUMP •
•
LOCATION··
•

.................

................
.
...
.
.
.
l ......
->.

All •

Appendix F:

object-Time Library Subprograms

258.1

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G12.

IHCFEXIT

······A3·········
.................
•

EXIT

•

······B3...1·.·····.
•

GET ADDR OF

•

·..................
•
•

IHCFCOMIV
IBCECOMH

1
.···C3·········

•
•

·................
•

•

258.2

BRANCH TO

IBEXIT

•

•

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G13.

IHCFSLIT

··

•• •• 11.3 •••••••••

•

..

. ·..·1··....
SLITE

·•
.·

•

.•
.

·····B3 ••••••••••

....

•

•• ••• c2.... ••••••

.-.-.-.-.-e-.-*-..<--------..
•

•
CONVERT BAD
• OATA FOR ERROR.
•
MSG·

.................

1
,..-------------------------.....02..........

IF EXTENDED
ERROR HANDLING
I IS NOT PRESENT,
I IHCERRM ENDS

• I HCERRM

I

!

:-~R~;;~-~~S~G~-:
•

IHC2l61.

YES.'

1\

C3
••
• • ••

E2

•

' .. '

-_::~.:.

• I.

••

.

• • ••

.... .'

••
••

..
• C3 •
••••

I"'

.:.
••

• •••

. ' .

••

•" .

'.

.... .... t::::::::---------------~t:'

••

I LT 0

E3

NO •• USER FIXED ••
UP DATA
••

.<--------.. '.

03 ..

••

••

••••

• GI VE A STANDARD.
FIX-UP

r

'.
••

• •

••••

j

••••• El..........

I GT "

••

: ••••••••••••••• :

l ___ ~~____
•

•

•

;:;;:;::j.........
.... ...

:.!~:.:
·FCVIO

GET I

• •••• E" ••••••••••

.... .'
"1·' ~o
1=0

0

~

...

••

•

.
t. ······1· ....... .

•• YES

-------->$

GET NUMBER OF •
SENSE LIGHTS •

..... F]..........

..... Fit ....•••..•

..... ....... .....

.................

• TURN ON SENSE • •
•
•
LIGHT.
- .TURN ALL LIGHTS.
• CORRESPONDING •
•
OFF
•
• TO THE VALUE O F . .
•
•

I

• •

•

l_ --------------------- --,1

··.................
•

• •••• G'- ••••••••••

·................

····G2·· ••• ••••
SLITET
•

· 1 .
·..................

•

H3

··.·.H2 ••••• ••• ••
• GET I AND THE •
•
AnOR OF J
•

1

.....<----.. .' ·.. '.
·....." ' . ....
.'
.. '
J2

•

• c2

•

YES.·

'

•• . '

YES
---.,

••

••

I GT "

X2

r

·..

.

••

--> •.

'.

' .. '

•

• •••• H" ••••••••••

••
IS
••
•
,.SENSE LIGHT., N O .
CORRESPONOING ••
·.TOION,·
•

-------->.

'1;"

•
•
•
•

. . . . 1".......

.

.'

SET J=2

.....J"......•....
·.....J3...........
.
.-------->.
·..................
..
.........1'.........
•

SET J=l

•

.TURN OFr SENSE •
LIGHT
•

••

I LE 0

'. '.

••

...

RETURN

• ••• 1(" •••••••••

" ., NO
•• ----.' .'

•
•

•

Appendix F:

...............••
RETURN

•

object-Time Library subprograms

258.3

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G14.

IHCFOVER

······A)·········..
·. ·. T......
•

.

......................
SET J=2

•

.. .
.83.... .
<--------.. ..
.. ....
..
...
.. .. s
... . ...

82... ..
..<--------.. ....

····.81·····~···.
•

OVERFL

NO..

••
UNDERFLOW ••

NO..

r .. ..

OVERFLOW

••
••

l~
.•..•
C2..........
.
....
C)
.........
..
·
..

··

..

SET J - ) .

•

SET J:l

...
•

········1......·..

:::::]::::::::
·
.
---.. --------------------.------------------>.
·.. ..... ...... ....
• TURN OVERFLOW/ •
UNDERFLOW
•
• INDICATOR OFF •

I

.
······E)·········
................
•

258.4

RETURN

•

Order No. GY28-6638-1, page r~vised 1/15/71 by TNL GY28-6847

chart G15.

IHCFDVCH

··.·A3··.......

··.......1".......
83... ..
•

·.·.·82..........
...................:<--------•.
•
•

:

•
•

DVCHK

YES ••

SET J=l

•

•• DIVIDE ••
CHECK
••

...
... . .

l~f~~t~f) O~., •

r

·······Cl··········..
......·T·......
•

SET J=2

•

······03... ·.····..
·..................

•
TURN DIVIDE
•
---------------->.CHECK INDICATOR.
•
OFF (X'OO)
•

j

·····E3..........
·................
•

RETURN

•

Appendix F:

Object-Time Library Subprograms

258.5

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G16.

IHCDBUG (Part 1 of 4)

······1'.3•••••••••..
•

. . ·. r. . .
DEBUG.

o·

83

.'.

.'
' . SELECT

..

I.

•

'.'.

"

OPTION.'

.

' .. '

.'

.'

1
----------oHiOii----------aouTim:--wcATioN
TRicE-------------------- TRACE--- GF01F1
SUBTRACi-ON-------------- sUBTaiN- --GFoiF2
5UBTRACZ-OFF------------- SUBTiEi- --GFoiFl

------------------------UNIT
UNIT
INITSCLR
-------------------------------INIT ARRAY ELEMENT
INITARIT

--G'FOiFS

INITARAY

--GF02Ai
--(;F02A3

iNIT-viiIABLE-----------iifiT-ARiAi-FUi:i:---------SUBCH.K

TRAci-oN-----------------

TRACE
Fl

"

.

.'
"
NO
',TRACEFUt.G OFF, .---

'. '.

.

' .. m
'

.'

-----_
... _----------------DISPLAY

DISPLAY

GF02AS

BEGIN 1/0

STARTIO

--GF01Ai

FINISH 1/0

ENOIO

•
AND NAME OF
• PROGRAM INTO
•
DBUFFER

·.................
.... .
'011 •

1

:

...... ..... ....
RETURN

:

······81··········.
··...................
· 1 .
• MOVE 'TRACE'
• INTO D8UFFER

•

.<--

·····Jl····~·····

·----OUTINT-----·
• CONVERT LABEL •
•
TO EBCD1C
•

·.................
.
....
l ......
-02 •

->.

258.6

•
•
•

l->:....B'.'

·····Gl········· .

All •

GF02AII

--GF020ii

TRACEOFF

:~~~~F~;~;~;;.~~ ~:

It.

GF02A1

TRACE OFF

SUBTREN

,',
.'

SUBCUK
TRACEON

GF01FII

······Fl··········.
·................
..
...
.
l ......

SUBTREX

'MOVE 'SUBTRACE"
• RETURN"
INTO •
•
DBUFFER
•

->.'011811 • •

GF03A2

·
.
·
..
·.................

UNIT
·····FII.···.·.···
.

•
PLACE UNIT
•
'NUMBER IN DSRN •

···
..·..................-

INITSCLR

.·~··FS.·······.·

'SAVE DATA TYPE •

1
·
.
··................. •
. ....·T....·.•
1

····GII •• •••••••
•
RETURN
•

• ••• 'GS-- •••• 0 • • •

•
•
•

COMPUTE
LOCATION OF
VARIABLE

•
•
•

.•····us.··········•
.•...............
.... .•
.----OUTNAME----·
'PLACE VARIABLE'
• NAME I N BUFFER •

l->.......
.02 •

1'.1 •

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G16.

IHCDBUG (Part 2 of 4)

....
·......--1
.....•
•
······Al···.··
•
·....
·..T......·.•
·02 •

INITARIT

.SAVE DATA TYPE •

····"'·81········ ...
·..................
•
COMPUTE
•
•
LOCATION OF •
• ARRAY ELEMENT •

1
·····C1··········
·.................
·----OUTNAME----·
• PLACE NAME OF •
•
ARRAY IN
•
DBUFFER
•
•

1
·····01·······.·.

·

.
................
.
••••

• COMPUTE ELEMENT.
• NUMBER AND MOVE.
:
TO OBUFFER
:

t

..

.... .--1
.······A4
.... .........•
·•
.•
·........1".......
+02 •
• All

• Ai

INITARAY

A2

,.. '

.,

,.,

., ,.

t. . , YES

IOFLAG ON

'. +.

.'
.'

r

,.---

.·····B2··········
-.-.-.-.-.- .-.-.
·..................
·INITARIT

-->.
•

•

PROCESS ARRAY •
ELEMl::NT
•

NO . '

1

. ,·0

.

C2

.,

'. ' .

o.
.'

---., END OF ARRAY

'. ·0

' .. '

······A3···........

SUBCRK

.,

o.

·........1'........
•
COMPUTE
•
•
LOCATION OF •
• ARRAY ELEMENT •

,

.,

B3
.,
, • ELEMENT· ,
,.LOCATION LE •• NO
•,
MAX ARRAY •• --• , LOCATION.·

.. ' .. ' ..

:

...............
RETURN

:

·04 •
->. B1 •

.. ··'E2+·········

• TURN IOFLAG OFF.
•
AND INSERT
•
•
AODRES!; OF
.<-• ARGUMENT LIST •

·................
.
••••
t->:
.. ..
·04 •

B4 ••

.SET TRACE FLAG.
•
ON
•

•····Sll ••••...•• •

•

...............•

•

RETURN

•

l'" .
··.····C3·········
...............
•

RETURN

·..................
• MOVE' SUBCHK'
• INTO DBUFFEk

•

.<--

· 1 .
·.................

j
..... F)'·········

·
.
··..................
.COMPUT" ELEMENT.
•
NUM!;Ek
•

· 1 .
··········l··;~~::·.

AS

•••

.0 ••

IOFLAG ON

*.

.'

r

.0

.' o.

·····SS··········
•
CONSTRUCT
•
•
NAMELIST
•
•
CALLING
•
:
SEQUENCE
:

........1"......

..
·...... ·T. ·. ..
.GET UNIT NUMBER.
•
FOR OUTPUT
•

·.... ·0"··········.
oTURN TRACE FLAG.
•o
OFF
••

·..................

••••• EJ" ••••••••
• - - - -OUTNAME- - - -.
•
PLAc!:. AkRAY
•
.NAM!:. IN DI;UFFER.

---.,

•*

.. ....

YES ••

·····CS··········

THACEOFF
: • • • • D) • • • • • • • • • :

DISPLAY

··

•

r~

•••• +D2····· •••••

TRACEON

o

:

1
.... E"·········

• ••• 'D5' •••••••••

o ---NAMELIST----.
:
OUTPUT
•

0

o

0

:

...............
tlETlIRN

·
.
.·................
... 1 ...
·E~······

...............
tlETURN

0

:

....
.·...............
.
...
.
l ......

·F~··········
• MOVE
MESSAGE •
. ' DISPLAY DURlllGt
-->0110 SKIPPED' Tv.
•
D8UFFER
•
·011 •
BII •

->.

• • • • • <..;) • • • • • • • • • •

• - - - -CUTI NT- - - - -.
• CONVEHT LABEL •
•
TO J:;BCDIC
•

....

->:

B4 ••

Appendix F:

Object-Time Library Subprograms

258.7

Order No. GY28-6638-1, page revised 1/15/71 by TNL GY28-6847

Chart G16.

IHCDBUG (Part 3 of 4)

······Al··········..

STARTIO

..................
SET CURRENT
AREA FULL

•
•

I

v

: •••• 81 ••••••••• :

• SET IOFLAG TO •
• INDICATE I/O IN.
,.
PROGRESS
•

·..................

I

·····el··········

.SET CURBYTLC TO.
o
ADDRESS OF
•
•
LOCATION OF •
•
FIRST MAIN
•

..... ........ ... .
•

BLOCK

•
•

SAVE IOFLAG
INFORMATION

I

....... ....... .

:

•
•

······B2...1·......·
·........... .....
• SET IOF :,AG TO •
• ENABLE FUTURE •
•
DEBUG C.\LLS •

"

"'

1

. ".

C2
••
• •••• Cl ••••••••••
••••
·----OUTPUT---- •
• "ENOllGH MAIN •• NO
• WRITE MESSAGE •
•• STORAGE TO • *--------)"
'SOME DEBUG •
". SAVE INFO..
.OUTPUT MISSING'.

.

'. ' .. ' .

•

·····01········· .
RETURN

··..................

.. • i~FORMATI~N •• NO
•• IN OLD IOFLAG ••

' ... '

.

••••• 03 ••••••••••

RETURN

..

•

::::>i
'"
:•... E2···· ..... :
.--- FREECHAR-- - -.
EXTRACT
•
:
CIIARACTER
:

-->.

.................

1

F2···..

• •••• Fl ••••••• • ••

.....

·

.

'. '..

.
..'

'.

..'

(

.•.

.. ' G2
.....
: ' ••• Gl •••••••• ':
••
•• NO
.HOVE CHARACTER 0
•• END OF LINE. >.-------->0 TO OI:lUFFER

'.

.. .. ....

..'

•

YES

0 ••

1

.... ·H2·········'"

·.................
1
•

"

••••• J2 ••••••••• 0
o

---.UPDATE
POINTER
•

0

°0

.................
•
•

258.8

....................
l->:.·
....
0

E2 :

•
>.>"
·----OUTPUT---.WRITE OUT LINE"
o

····F. ·········

.
.
.................
.. ............... ..

.

• .FULL ARRAY o. YES
.HOVE FULL A R R A Y . .
••
OUTPUT
. 0 ________ >0
TO DBUFFER
.--------)0

0
0

RETuRN

•
•

Order No. GY28-6638-1,

Chart GJ.6.

IHCDBUG (Part 4 of 4)

....
·......--1
·
.
.•................•
j
.•.

....

··....B1..--1
······B1·······.·..
·011 •

·04 •

• B4

OUTITEM

OUTBUFFR

·····B4 ••••••••••

··......T· . · ..
• MOVE EQUAL SIGN.
• INTO DBUFFER
•

•
SAVE RETURN •
.POINT AND BASE •
REGISTER
•
•

·····Cl···· ......

.'

•
PREVENT
•
•
ALIGNMENT
•
•
ERRORS FOR
•
·INTEGER/LOGICAL·

·....·.. T....·...
...

••

'.

. .•.
01

••

.... (.

DATA TYPE

.'

I.

04

'. '.

BRANCH TO I

······E3··········.
·..... ···1········.
··....
.
.....
·----OUTINT---- •
• CONVEI. PRINT A LINE •

1
······G4.········.
.
·..................
.RESTORE RETURN •
.POINT AND BASE
•
REGISTER
•

.<--

·---ALLOCHM----·
• PUT CHARACTER •
• IN SAVE AHEA •

GS

••

.'

t.

••
•• NO
•• END OF LINE •• -~-

'. '.

.

..'

r

' .. '

······H!)··········.
··................

BII •

• SET CHARACTER •
.1'0 INDICATE END.
•
OF LINE
•

I

····.JS··········
·..................
·---ALLOCHAR----·
•

PUT NEXT IN
<________________ •• CHARACTER

-->:UPDATE POINTER:
o
0

o

.

1'"
.... ",r~ .
····Eij·········
.
·
..
.

•

:

•

• RETURN TO I B C O M . .
•
• GET CHARACTER •
• FOR ERROR MSG •

I

1...

·1. . . ·

YES ••
••
-----.. IOFLAG FULL ••

'

: •••• Jl ••••••••• :

0000 • • • •

..<--

• •••• CS ••••••••••

•

................ .
o

.

......

....

LOGICAL---jOUTLOG-- -j GF04Fi----

YES.

"r

'.

NO •• I/O DURING ••
--_..
1/0 FIXUP
••

OUTFIXED

Gl

••

o

••

I

C4

••
•• YES
• SET IOFLAG TO •
••
IOFLAG ON •• -------_>.INDICATE DEBUG
••
••
•
OUTPUT
•

'. '.

DATA TYPE

-

page revised 1/15/71 by TNL GY28-6847

•

0 •• 0 •

SAVE AREA

•

0

··... ..... .... .....

:

•• "1<.4' ••••••••

•

Appendix F:

RETURN

•

Object-Time Library Subprograms

25.8.9

GLOSSARY

active character: A significant character
in the interpretation of a source statement. Always non-blank except during parsing of literal or IBM card code information.
ADDR: contains the address portion of
current POP instruction.

the

ADDRESS (field):
A 2-byte item that is
part of the pointer (indicating an address
on a roll) and a driver (indicating the
forcing strength of an operation).
ANSWER BOX: An item used to hold a true or
false answer for those POP instructions
which use or return an answer in their
execution.
BASE: A status variable maintained for
each roll used by the compiler which contains the beginning address of that roll
minus 4.
Base Table:
A list of absolute addresses
from which the object module
loads a
general register prior to accessing data.
BOTTOM:
A status variable maintained for
each roll which holds the address of the
last
word
on
the
roll
containing
information.
Branch Table:
A list
address of each branch
statement function used
module.

containing
the
target label and
in the
source

branch target label: A label which is the
target
of
a
branch
instruction
or
statement.
central Items:
and DATA 0-5.

control driver: A driver in Polish notation to indicate types of statements and
other control functions.
CRRNT CHAR: Contains the character (from
the input statement) that is currently
being inspected.
CRRNT CHAR CNT: Contains the column number
of the contents of CRRNT CHAR; also called
the 'scan arrow'.
DATA 0, 1, 2, 3, 4, 5: Halfword variables
(except DATA 5, which is two words long)
used to hold constants used in the source
module and other data.
error listing:
The display of messages
indicating error conditions detected in the
processing of the source module.
EXIT roll:
A special roll used by the
compiler for maintaining exit addresses
from compiler routines when a POP subroutine jump instruction is executed.
EXTADR: Contains the address of
rent "bottom" of the EXIT roll.

the

cur-

forcing strength: A value contained in the
driver which indicates the order of the
indicated operation (e.g., multiplication
and division operations precede addition
and subtraction).
global dummy variable: A dummy argument to
a SUBROUTINE or FUNCTION subprogram.
global label: A label used to define a
program
block.
These
labels may be
referred to from any point in the program.

Another name for SYMBOL 1-3

compiler phase:
A program consisting of
several routines written 1n machine language and/or POP language; each phase performs a well-defined function in the transformation of the source module to the
object module.
compiler routines: The routines that comprise each phase of the compiler and which
may be written in machine language and/or
POP language.
CONSTR: contains the beginning address of
the
data referred to by the compiler
routines.

group:
The logical collection of information maintained on rolls; an entry on a
roll.
group size: The number of bytes of in format:ion constituting the group on a roll.
Group Stats:
Information maintained for
each roll used by the compiler; pertains to
comparative search operations.
heading:
Initializing instructions required prior to the execution of the body
of the object module.
IEYALL:
The system name for the compiler
phase Allocate.
Glossary

259

IEYEXT: The system name for
phase Exit.

the

compiler

OPERATOR (field): A 1-byte item that is
part of the pointer and driver indicating
the roll used (pointer) or type of operation to be performed (driver).

IEYFORT:
The system name for the compiler
Invocation phase.
IEYGEN: The system name for
phase -Gen.
IEYPAR:
The
phase Parse.

the

compiler

system name for the compiler

IEYROL: The system name for that area of
the compiler which holds the WORK and EXIT
rolls and the roll controls and group
stats.
IEYUNF:
The
phase Unify.

system name for the compiler

indirect addressing: A method of obtaining
information held at one location by referring to another location which contains the
address of the value in question.
INDIRECT BOX: Used to contain the address
needed in the indirect addressing operation
performed by the POP instructions.
INSTR: contains the "operation code"
tion of the current POP instruction.
item:

Synonymous with variable.

jump:

Synonymous with branch.

A dummy argument

address

of

plex:
A variable lengtn group on a roll;
the first word holds the number of words
exclusive of itself.
pointer:
This item is one element of
Polish notation used to indicate references
to variables or constants; indicates location of additional information on a roll.
Polish notation: An intermediate language
into which the source module is translated
during processing and generation of the
object module.
POPADR:
Holds the address of the
instruction presently being executed.

POP

POP instruction:
A component part of the
POP language defined as a macro.
POP interpreter:
A program written in
machine language for the purpose of executing the POP subroutines; labeled POP SETUP.

LAST CHAR CNT:
This item contains the
colUmn number of the last active character,
i.e., the active character preceding the
one currently being inspected.
locaLg!!~yariable:

PGB2: Contains the beginning
the global jump table.

por-

keep:
Indicates the moving of information
contained on a roll to another storage
location and retaining the original information on the roll.

a statement function.

optimization:
The
reduction
and reorganization of object
code
for
the
increased efficiency of the object module.

to

POP jump table:
A table used by the POP
interpreter in transferring control to the
POP subroutines. Holds addresses of these
routines.
POPPGB: Contains the beginning address of
the machine language code for the POP
instructions and the POP jump table.
POPs, POP language: A macro language
which most of the compiler is written.

in

local label:
A label defined within a
program block which may be referred to only
within that block.

POP subroutines:
The subroutines used by
the POP interpreter to perform the operations of each POP instruction.

MPAC 1, MPAC 2: Two fullword items used by
the compiler in double-precision arithmetic
operations.

program text: The object code produced for
the object module.

NAMELIST Table: A table which holds the
name, address, etc., for each variable
listed in a single NAMELIST list in the
source module.
operation d~iver: A 1-word variable which
is an element of Polish notation and indicates arithmetic and logical operations
designated in source module statements.
260

prune,
pruni!!9::
A method of removing
information from a roll, thereby making it
inaccessible in subsequent operations.
quote:
A sequence of characters preceded
by a character count; used for comparisons
with the input data.
QUOTE BASE:
The initial
first quote (Parse).

address of the

A method of call and recall
employed by the routines and subroutines of
the compiler whereby routine X may call
routine Y which, in turn, calls routine X.
~~sion:

scan arrow:
An
item which refers to the
position of the source statement character
currently being scanned.
source module listing: The display of the
statements constituting the source module.

releasing rolls:
The method of making
information reserved on a roll available
for use by the compiler.
reserve_mark: The i-word value placed on a
roll as a result of a reserve operation.
reserving rolls: A method of roll manipulation whereby information contained on a
roll remains unaltered regardless of other
operations involving the roll.
RETURN: Contains the return addresses
the POP subroutines.

for

roll: A type of table used by the compiler
whose
location
and
size are changed
dynamically.
ROLLBR: Contains the beginning address
the base table.

assigned to each
for the purpose of

roll status items: Those variables maintained for each roll which contain the
statistics needed in roll manipulation.
area of the compiler
in main storage that is allocated to the
rolls.
roll_storaq~area:

rung:
roll.

A word

of

stora~map:
The logical organization of a
program or module and its components as
they are maintained in main storage.
(This
map may also be displayed on an output
device.)

SYMBOL 1,2,3: Halfword variables used to
hold variable names used in the source
module and other data.
TAG
the
the
ing

(field): A i-byte item that is par,t of
pointer (indicating mode and size of
object pointed to) and driver (indicatmode of operation).

of

roll control: A term applied collectively
to those items used in roll maintenance and
manipulation.
roll number: A number
roll in the compiler
internal reference.

storage allocation: The assignment of main
storage to variables used in the source
module.

An

temporary stor~~: An area of main storage
used by the compiler to temporarily maintain information for subsequent use.
terminal errors: Errors internal to the
compiler causing termination of compilation
of the source module.
TOP: A status variable maintained for each
roll which indicates the new BASE of the
roll when reserved information is contained
on the roll.
traits: The TAG field (uppermost byte)
a-word on a roll.

of

translation:
The conversion from one type
of language to another.

a multiword group on a

RUNTIME operations: Several routines which
support object code produced by the compiler.

WORK roll: A special roll used by the
compiler for maintaining values temporarily
during processing.

Save Area:
An area of the object module
used in linking to and from subprograms.

WRKADR:
The address maintained for the
WORK roll that indicates the last word into
which information has been stored; the
"bottom" of the roll.

scalar
ab1es.

WO,Wl,W2, •••• :
Acronyms used to refer to
the last groups of the WORK roll.

variables:

Nonsubscripted

vari-

Glossary

261

Order No. GY28-6638-1, page revised 1/15/71 by TNL GN28-6847

(Where more than one page reference is given, the major reference appears first.)

active characters
definition 259
description 26
ACTIVE END STA XLATE routine 14,39
activestatements 36,39
ADCON roll 57,145
ADDR register
definition 259
description 29
address computation instructions 134,135
cross-reference list 139
address constants 17,20,52,56,57
ADDRESS field
definition 258
description 29-30
addressing
indirect 136,259
relative 29,138
ADR CONST roll
description 159
in Exit 56
in Unify 52
AFTER POLISH roll
description 23,161
in Gen 53,54
in Parse 37-40,42
Allocate label lists 193-196
Allocate phase (IEYALL)
cards produced 51
definition 258
detailed descrip~ion 44-51
general description 12
location in storage 17
rolls used by 44
subprogram list 51
allocation of main storage 28
ALTER OPTION TABLE routine 232
ALLOCATION FAIL routine 42
ALPHA LBL AND L SPROG routine 14,45
ALPHA SCALAR ARRAY AND SPROG routine 14,45
ANSWER BOX variable
definition 258
description 26
in Parse 38
AREA CODE variable 45,55,51,146
arithmetic and logical instructions
130,131,139
arr;a,y
description 18
dwruny 41,48
in Allocate 48,49
listing of 21
position in object module 11
roll 26,47,146
ARRAY ALLOCATE routine 14,45,41
ARRAY DIMENSION roll 150

ARRAY PLEX roll 158
ARRAY REF roll 52,159
ARRAY REF ROLL ALLOTMENT 14,52
ARAY REF ROLL ALLOTMENT routine
ARRAY roll
assigning storage for 47
description 146
group stats for 25
artificial drivers 40
ASSIGNMENT STA GEN routine 54
AT roll 54,159

52

base addresses 28
BASE AND BRANCH TABLE ALLOC routine
14,45,41
BASE, BOTTOM, and TOP tables 23,28
base table
assigning storage for 41
definition 259
description 17
position in object module 11
use in Allocate 48
use in Exit 51
BASE TABLE roll
description 146
in Allocate 45-48
in Exit 56
BASE variable 23
definition 259
BCD roll 45
BLOCK DATA PROG ALLOCATION routine 14,46
BLOCK DATA subprogram
allocation for 46
Parse processing of 39
BOTTOM variable 23
definition 259
branch table
assigning storage for 47
description 18
position in object module 17
use in Allocate 47
use in Exit 56
BRANCH TABLE roll
description 150
in Allocate 47
in Exit 56
branch target label 12,18
BUILD ADDITIONAL BASES routine 14,45,49
BUILD NAMELIST TABLE routine 14,45,48
BUILD PROGRAM ESD routine 14,45,46
BYTE SCALAR roll 47,151

Index

263

Order No. GY28-6638-1, page revised 1/15/71 by TNL GN28-6847

CALCULATE BASE AND DISP routine 14,45
CALL LBL roll 149
central items
DATA 24,192,259
definition 259
description 24
SYMBOL 24,191,259
CGOTO STA XLATE routine 38
character scanning 26-27
code producing instructions 134
CODE roll
description 160
in Exit 56
in Gen 53,54
location 22
CUMMUN ALLOCATION AND OUTPUT routine
14,45,47
COMMON ALLOCATION roll 41,156
COMMON AREA roll 155
COMMON data 12
COMMON DATA roll 152
COMMON DATA TEMP roll 155
COMMON NAME roll 152
COMMON NAME TEMP roll 156
COMMON statements
allocation for 45
COMMON variables
allocation of storage for 45
listing of 21
compiler
arrangement 28-29
assembly and operation of 136
code produced by 175-183
data structures 22
design of 9
flags used 21
general register usage 28
initialization of 33
limitations of 9,
machine configuration for 9
messages 21
organization of 10,14
output from 16
purpose of 9
receiving control 33
relationship to system 19
rolls used in 140-162
storage configuration 15
termination of 33,35
COMPLEX CONST roll 143
CONSTR register
definition 259
description 28
control block area (CTLBLK) 221
control driver
definition 259
description 31
formats of 185-211
CONVERT TO ADR CONST routine 14,52
CONVERT TO INST FORMAT routine 14,52
CRRNT CHAR CNT variable
definition 259
description 26
in Parse 38
CRRNT CHAR variable
definition 259
description 26
in Parse 38
264

data items
24,192,259
DATA SAVE roll 145
data sets
SYSIN 15,33
SYSLIN 15,33
SYSPRINT 15,33
SYSPUNCH 15,33
DATA statements
allocation for 45
DATA VAR roll 56,154
DDNAMES routine 35
DEBUG ALLOCATE routine 14,45,49
decision making instructions 131,132
DECK option 51
DIMENSION statement
allocation for 46
variables specified on 29
DISPLAY statement
NAMELIST table for 18,19
DMY DIMENSION roll 14,46,147
DO loops
in Allocate 46
in Parse 39
in Gen 55
in Unify 12,51,52,53
DO LOOPS OPEN roll
description 144
in Allocation 46
in Parse 39
DO LOOP UNIFY routine 53
DO NEST UNIFY 14,53
DO STA XLATE routine 38
DP COMPLEX CONST roll 143
DP CONST roll
description 143
general 25
drivers
ADDRESS field 30
a.rtificial 40
control 31,185-211,259
definition of 30
EOE 40,41
formats of 185-211
operation 30,260
OPERATOR field 30
plus and below phony 40,41
TAG field 30
dummy array 46,41
dummy dimension 46

END card 13
omission of 39
produced by Exit 51
END STA GEN routine 54,55
ENTRY CODE GEN routine 14,53,54
ENTRY NAME ALLOCATION routine 14,45,46
ENTRY NAMES roll 54,141
ENTRY roll 46
EOE driver 40,41
EPILOGUE GEN routine 14,53,54
~pilogues
12,53,54
EQUIV ALLOCATION PRINT ERRORS routine
14,45,41
EQUIV MAP routine 14,45,48
EQUIVALENCE (EQUIV) ALLOCATION roll

Order No. GY28-6638-1, page revised 1/15/71 by TNL GN28-6847

47,48,156
EQUIVALENCE (EQUIV) HOLD roll 145
EQUIVALENCE (EQUIV) roll 46,47,151
EQUIVALENCE (EQUIV) TEMP roll 145
EQUIVALENCE OFFSET roll 45,152
EQUIVALENCE statements 12,45
EQUIVALENCE variables
allocation of storage for 45
description 18
listing of 21
map of 48
position in object module 17
EREXITPR routine 34
ERROR CHAR roll 144
ERROR LBL roll 148
ERROR MESSAGE roll 144
error messages 21
error recording 42
ERROR roll 42,148
errors
detection of 42
recording of 21,42
ERROR SYMBOL roll 149
ERROR TEMP roll 144
ESD cards
general 12
produced by allocate 44,1.0,51
Exit label list 208-211
EXIT PASS routine 14,55
Exit phase (IEYEXT)
definition 259
detailed description 55-58
general description 13
location in storage 15
rolls used by 55
exit roll
definition 259
description 24,161
general 10
in IEYROL 53
in Parse 38
location in storage 15
EXPLICIT roll 149
EXTADR register
definition 259
description 29
extended error handling facility 232,212

FL AC roll 153
FL CONST roll 143
flags 27
forcing strength
definition 259
description 30,31
in Parse 40
table 31
FORMAT ALLOCATION routine 14,45,48
FORMAT roll 48,157
FORMAT statements
description 20
in Allocate 12,44,48
'listing of 21
position in object module 17
FORTRAN error routine (IHCIBERH)
42,228

FULL WORD SCALAR roll 47,155
FUNCTION subprogram 46,49
FX AC roll 151
FX CONST roll 143

Gen label list 198-208
Gen phase (IEYGEN)
definition 259
detailed description 53-55
general description 12
location in storage 15
rolls used by 53
GEN PROCESS routine 14,53
GENERAL ALLOCATION roll 160
general register usage
used by compiler 28-29
used by Object module 20
GET POLISH routine 14,53,54
global area 136
GLOBAL DMY roll 47,49,148
global jump table 28,137,138
global jumps 137,138
global label 136,131,259
GLOBAL SPROG ALLOCATE routine 14,45,48
GLOBAL SPROG roll
description 142
general 42
in Allocate 48
in Exit 56
GO TO STA GEN routine 55
GO TO statements, processing of 54,55
group
definition 259
description 24,25
group stats
definition 25,259
description 26
location in storage 15
sizes 25
group stats table 26

HALF WORD SCALAR roll 47,152
heading
position in object module 17
HEADOPT routine 35
HEX CONST roll 154

IBEXIT routine 239
IBFINT routine 215
IEYALL (see Allocate phase)
IEYEXT (see Exit phase)
IEYFINAL routine 35
IEYFORT (see Invocation phase)
IEYGEN (see Gen phase)
IEYJUN subroutine 138
IEYMOR routine 34
Index

265

Order NOd GY28-6638-1, page revised 1/15/71 by TNL GN28-6847

IEYPAR (see Parse phase)
IEYPCH routine 34
IEYPRNT routine 33
IEYREAD routine 34
IEYRETN routine 35
IEYROL (see roll module)
IEYUNF (see Unify phase)
IF statement 37,38,39
IHCADJST 229-230,249
IHCDBUG 236-239,258.6
IHCDIOSE 224-226,245
IHCECOMH (see IHCFCOMHlIHCECOMH)
IHCEDIOS 224-226,245
IHCEFIOS 218-224,244
IHCEFNTH 229-230,248
IHCERRM 233,253
IHCETRCH 233,258
IHCFCOMH/IHCECOMH
flowchart 243
initialization operations 215
input/output operations 218-226,227-228
termination operations 239
transfer and subroutine table 242.3
IHCFCVTH 234
IHCFDUMP 235-236,258.1
IHCFDVCH 234,258.5
IHCFEXIT 235,258.2
IHCFINTH 229~230,248
'IHCFIOSH 218-224,244
IHCFOPT 232-233,255
IHCFOVER 235,258.4
IHCFSLIT 235,258.3
IHCIBERH 228-229,250
IHCNAMEL 226-227,247
IHCSTAE 231,251
IHCTRCH 230-231,258
IHCUATBL 239
IHCUOPT 242.1-242.3
IMPLICIT roll 153
indirect addressing 135,260
indirect addressing instruction 135
IND VAR roll
description 141
in parse 37
INIT roll 49,145
Invocation phase (IEYFORT)
definition 260
detailed description 33-36
general description 12
location in storage 15

jump instructions

132,133

keep
definition 260
general 23

label lists
Allocate
266

193-196

Exit 208-211
Gen 198-208
Parse 185-193
Unify 196-198
labeled statement references 12
labels
branch target 12,18
detailed description 135,136
global 135,136
local 135,136
mode 17,54
LAST CHAR CNT variable
definition 259
description 26
in Parse 38
LAST SOURCE CHAR variable 38
LBL FIELD XLATE routine 14,37,38
LBL process routine 14,53,54
LBL roll 45,46,54,153
LEVEL ONE UNIFY routine 53
LIB roll 140
LITERAL CONST ALLOCATION routine 14,45,47
literal constants
description 20
in Allocate 12,44,45
position in object module 17
LITERAL CONST roll 143
LITERAL TEMP (TEMP LITERAL) roll 155
LOAD and DECK options 33
LOCAL DMY roll 148
local label 136,137,259
LOCAL SPROG roll 45,46,149
LOGICAL IF STA XLATE routine 38
LOOP CONTROL roll 52,156
LOOP DATA roll
description 157
in Parse 38
in Unify 53
LOOP SCRIPT roll 142

made labels 17,54
map
of scalars 47
storage 21,44,50,260
MAP option 51
messages
description 27
location in storage 15
printing of (IEYPRNT) 33
produced by Allocate 48,49
produced by Invocation 35,36
produced by Parse 43,44
minimum system configuration 9
MOVE ZEROS TO T AND C routine 14
MPAC1 and MPAC2 variables
definition 259
description 26
multiple precision arithmetic 26

NAMELIST ALLOCATION roll 48,49.1~5
NAMELIST ITEMS roll 149,150

Order No. GY28-6638-1, page revised 1/15/71 by TNL GN28-6847

NAMELIST MPY DATA roll 57,160
NAMELIST name
roll 48
table for 19
NAMELIST NAMES roll 48,149
NAME LIST tables
definition 259
description 19
in Allocate 12,44,47
in Exit 57
listing of 20;48
position in object module 20
NEST SCRIPT roll
description 141
in Unify 53
NONSTD SCRIPT roll 141

object module
configuration of 17
description of 17
general register usage 20
listing of 20,21,54,57
writing of 49
object-time library sUbprograms 212-258.10
operation driver
def.inition 259
o~s"¢'ription
30
. :fb.tm~ts of 185- 211
opjS:liA.;T·OR fie I d

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2002:05:16 19:49:19Z
Creator Tool                    : g4pdf
Modify Date                     : 2009:09:04 19:26:29-07:00
Metadata Date                   : 2009:09:04 19:26:29-07:00
Producer                        : Adobe Acrobat 9.13 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:2da59fb1-3aeb-4fbc-8161-d4e7231ab879
Instance ID                     : uuid:426f50b8-7042-452e-a8fb-3de0048f8c13
Page Mode                       : UseOutlines
Page Count                      : 307
Creator                         : g4pdf
EXIF Metadata provided by EXIF.tools

Navigation menu