Y28 6800 3_PL1(F)_PLM_Mar68 3 PL1(F) PLM Mar68

Y28-6800-3_PL1(F)_PLM_Mar68 Y28-6800-3_PL1(F)_PLM_Mar68

User Manual: Y28-6800-3_PL1(F)_PLM_Mar68

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

DownloadY28-6800-3_PL1(F)_PLM_Mar68 Y28-6800-3 PL1(F) PLM Mar68
Open PDF In BrowserView PDF
File No.S360-29

Form Y28-6800-3

Program Logic

IBM System/360 Operating System
PL/I (F) Compiler
Program Logic Manual
Program Number 360S-NL-Sll

This manual describes
the
internal
design of the IBM system/360 operating
System PL/I (F) Compiler. It is aimed at
personnel responsible for analyzing program
operations, diagnosihg malfunctions, and
changing the program format for special or
national language usage. The information
provides a guide for effective use of the
program listings.
Program logic information is not necessary for the use and
operation of the program; therefore, distribution of this publication is limited to
those
persons
with the aforementioned
require!ments.

Restricted :Oistribution

This publication is organized in three
sections.
section 1 is an introduction
describing the relationship between th€
compiler and the Operating system, and the
overall organization of the compiler. Section 2 is a description of the compiler
phases, including a general description of
each logical phase followed by descriptions
of each of the physical phases contained in
the logical phase. Section 3 consists of
flowcharts and routine directories.
The
flowcharts show the relationship between
the routines of each fhase, while the
directories list the routines and their
functions.

Forw

I
Although not prerequisite, the following
Ipublications are related to this manual and
\should be consulted.

The appendixes appearing at the end of
the publication contain topics of special
importance and reference rr.aterial.

Introduction to
ForJTl Y28-6605

S eg u e!2!~~l_~££~~.§_~~!b od s L_Ef cq r a II' _1.£gi~;:
Form Y28-6604

~~~al,

The convention has been followed in this
manual of printing all PL/I language items
in block capitals.
Prerequisite to the use of this publication are the following:

~~~!_Ref~ren£~~~~~!,

IBM

Form C28-8201

Sy~!em/3~Qper~!~ng~y~~em:

Fourth Edition

('~arch

1968)

This publication is a major revision of the previous edition. Y28-6800-2.
and corresponds to Release 15 of Operating System/3601 it reflects the
improvements and additions which have been incorporated in the fourth
version of the PL/I (F) Compiler. Significant additions include the
implementation of PL/I multitaeking, based storage and list processing.
and the extension of input/output facilities which include LOCATE mode
I/O. mixed record formats, variable length records. positioning control
in stream I/O. and data interchange facilities with OS COBOL data set ••
Other changes provide additional compile-time facilities. and improved
object-time performance in certain areas of application. These and other
changes are indicated by a vertical line to the left of the change I new
or revised illustrations are denoted by the symbol • to the left of the
caption.

Specifications contained herein are subject to change from time to time.
Any such change will be reported in subsequent revisions or Technical
Newsletters.
This publication was prepared for production using an IBM computer to
update the text and to control the page and line format. Page
impressions for photo-offset printin9 were obtained from an IBM 1403
Printer usin9 a special print chain.
Address comments concernin9 the contents of this publication to IBM
united Kin9dom Laboratories
Ltd., Programming Publications, Hursley
Park, Winchester, Hampshire, En9land.
RESTRICTED DISTRIBUTION: This publication is intended primarily for use
by IBM personnel involved in pro9ram design and maintenance. It may not
be made available to others without the approval of local IBM management.

e International Business Machines Corporation 1966, 1967, 1968

Control Program Logi£,

CONTENTS

SECTION 1: INTRODUC?ION.
Purpose of the Compiler.

· 15
. 15

.

The Compiler and Operating system/360.

. 15

Compiler Organization. . • . . . • . • · 17
Logical Phases. • • . . • . . •
· 19
Compile-time Processor Phase .
19
Read-In Phase. • • . .
· 19
Dictionary Phase • . •
· 19
Pretranslator Phase. .
19
Translator Phase . .
· 19
Aggregates Phase . • .
19
Pseudo-Code Phase. . .
• . 19
Storage Allocation Phase
· 19
Register Allocation Phase. •
· 20
Final Assembly Phase .
· 20
Error Editor Phase • •
· 20
SECTION 2: COMPILER PHASES .

· 21

compiler Control and 48-Character Set
Preprocessor. • • •
•.•...••
Compiler Control • • . • • • . . • . .
Initialization • . • • • • • . • .
Character Translation Tables . • •
Communications Region. • • •
.
Text and Dictionary Block
Control • • . • • • . • •
• •
Scratch Storage Control. •
Storage Requirements • • •
• •
Phase Loading. • • . • • .
• •
Phase Directory. • . . • .
• •
Diagnostic Message Centrol •
•
Input/Output Control •
• .
Program Check Handling
• •
Job Termination. • • . • .
·
• • •
Compiler Control Modules.
Module AC. • • • .
• .
Module AD. • . • .
The DUMP Option. • • • • •
·
Module AE.
•
Module AF.
• •
Module AG.
Module AH.
• •
Modules AI, AJ • •
• .
Module AK.
• .
Module AL.
Module AM. • •
• • • • . • .
Module AN. • •
Module JZ.
• •
48-Character Set Preprocessor •
·
Compile-time processor Phase • .
Line Numbering • .
Phase AS • • • • .
Phase AV • • • • •
Phase BC (BE, BF).
Phase BG (Bl, BJ). • . • •
Phase EM (BO).
Module BN (BP, BV)

21
~1

21
21
21
21
22
22
22
22
22
22
22
22
24
24
25
25
25
25
25
25
26
26
26
26
26
26
26

· 27
· 27
27
• . 27
· 27
· 28
• • 28
· . 28

Phase BW . . • .

• .

.

The Read-In Logical Phase . .
Statement Numbering . .
statement and Entry Labels • • .
chains Constructed by Read-In. •
Errors and Diagnostic Messages •
The Output String. . . • . .
Identifiers. •
. •••
Constants. • •
Operators. . •
Initial Labels .
.•• • • .
Structure of the Read-In Logical
Phase . • .
Phase CI .
Phase CL •
Phase CO .
Phase CS .
Phase CV • . • • . . • • • .

· 28
•
•
•
·
•
·
·
•
·
·

28
29
29
29
29
30
30
30
30
30

•
•
·
·
•
•

30
30
31
31
31
31

The Dictionary Logical Phase •
• 31
Constructing and Accessing
the Dictionary. • • . • • • • · 31
Testing for Consistent
Attributes . • • • • • • .
• 32
Compiler Pseudo-Variables and
Functions . • . .
· 32
Dictionary Entries for Entry
Points.
. •••.
• 32
Phase ED •
.•.•
• 33'
Phase EG •
• 33
Phase EI •
••••
• 34
Phase EL (EK, EM). •
· 34
Phase EP •
· 35
Phase EW •
• 36
Phase EY .
• 36
Phase FA • • • • • . • • • • • • • 36
Phase FE • • • • •
• 37
Phase FI • . • • •
• 37
Phase FK .
• 37
Phase FO •
• 37
Phase FQ •
• 38
Phase FT • • • • .
• 38
Phase FV •
• 39
Phase FX •
• 39
The Pretranslator Logical Phase. •
•
Additions to the Text. •
•
Phase GA • . • . • • • • • • • • •
Phase GB (GC).
. •••••
Phase GK .
• • • •
•
Phase GO •
• • • •
•
Phase GP •
•
Phase GU •
•
Phase HF •
•
Phase HK . • • • •
.• • • • .
Phase HP •
•

40
40
41
41
41
41
41
42
42
43
43

The Translator
Phase IA
Phase IG
Phase IL

43
44
44
44

Logical Phase
.
.
•

•
•
·
•

Phase
Phase
Phase
Phase

1M
IT
IX
JD

·· ·
· ·
··
·

·

The Aggregates Logical Phase
Phase JI
Phase JK
Phase JP

·

·

·

The pseudo-Code Logical Phase.
Pseudo-Code Design
Pseudo-Code Items.
Register Description
The Use of Symbolic Unassigned
Registers
The Use of Physical Registers.
Temporary Descriptors.
Temporary Workspace.
Phase LA
Phase LB
Phase LD
Phase LG
Phase LR
Phase LS
Phase LV
Phase LX (LW, LY>'
Phase MB
Phase MD
Phase ME
Phase MG
Phase MI
Phase MK
Phase ML
Phase MM
Phase MP
Phase MS
Phase NA
Phase NG
Phase NJ
Phase NM
Phase NT
Phase NU
Phase OB
Phase OD
Phase OE
Phase OG
Phase OM
Phase OP
Phase OS

···
·

·
·

.

·

·
·
·
·

·
·
··
·
·

··
·
·

·

.

·

The Storage
Phase
Phase
Phase
Phase
Phase
Phase
Phase
Phase
Phase

·
·

45
45
45
46

·

·

··

·

· ·
··
· ···
· ··

··
·

·

·· ·

·

·

·
·
·

··
··
··
···

··

·

·

· ·
····
· · · ··
· ···
··
·

·

·

·

·
···· ··
·
···

·

·
·
·

·

· ·

· ·

Allocation Logical Phase
PA
PD
PH
PL
PP
PT
QF
QJ
QX

·

· ···

·

·

44
45
45
45

·

···
·

··

46
47
47
47
47
47
47
48
48
48
48
48
49
49
49
49
50
50
50
50
51
51
51
51
51
52
52
52
53
54
54
55
55
55
55
56
56
56
56
57
57
57
57
58
59
59
59
60
61

The Register Allocation Logical Phase.
Phase RA
Phase RF

61
61
62

The

62
62

·.. .
·
·
· ·· ···
Final Assembly Logical Phase
· · ·· ·
Phase TF
·. . .· ·

PhasE
PhasE
Phase
Phase
Phase
Phase
Phase

TJ
TO (T~) •
TT
UA
.
UD
UE
UF (UB) •

·

·

··

·

· ·

·

·

· . · ·
·

The Error Editor Phase
Phase XA

·

SECTION 3: CHARTS AND ROUTINE
DIREC'rORIES

·

·

·

.335
.339

.

.341

Organization of Keyword Tables
Format of First Level Directory .
Format of Second Level Directory
Format of Third Level 'Tables
Format of Entry Requiring
Additional comparisons.

·

·

. · · ·

64
64
66

·

·

APPENDIX B: RESIDENT TABLES.

b4

64

APPENDIX A: GUIDE TO PHhSES AND
MODULES
Compiler Phase-in-Storage tliap

.

62
63
63
63
64

·

Phase Directory.
Control Code Word -- CCCODE.

·

.341
. 342
.342
.342
.342
.343
.343

APPENDIX C: INTERNAL FORMATS OF
DICTIONARY ENTRIES.

.345

1. Dictionary Entry Code Bytes

.345

2. Dictionary Entries for Entry Points
Entry type 1 for PROCEDURE,
BEGIN,
and ENTRY statements
Entry Type 2
Entry Type 3
SETS List Format
Entry Type 4
Entry Type 5
GENERIC Entry Point.

.347
.347
.349
.349
.350
.350
.351
.351.

3. Code Bytes for Entry Dictionary
Entries
ENTRY Code Byte.
Options Code Byte.
Optimization Byte.

.351.
.351.
.351.
.352

···

·· ·
·
·
· · .

.

·

·
··

·

·

·

····
··

4. Dictionary Entries for Data, Label,
and Structure Items
Label Variables
Obtained
from DECLARE Statement
Dictionary Entries for Data
Items.
Major and Minor Structure
Entries.

·

.

· ··
.···

. ·

..··

·

.352

·

.352

5. Code Bytes for DATA, LABEL, and
STRUCTURE Dictionary Entries.
The First Code Byte - Other 1.
The Second code Byte - Other 2
The Third Code Byte - Other 3.
The Fourth code Byte - Other 4
Variable Byte.
Data Byte •

·

.·· ··

··

··
·

·

.

35~~

.353
.355
.355
.35!)
.356
.356
.357
.357

6. Format of Variable Information • . . . 357
Uses of the OFFSET1 and OFFSET2
Slots in Data, Label, and
Structure Dictionary Entries • • . 360
STATIC INTERNAL Structures . . • . 360
AUTOMATIC Structures . . • • . • . 360
STATIC EXTERNAL and Parameter
Structures. • • . • .
• .360
CONTROLLED Structures.
• .360
Non-Structured Arrays in
STATIC INTERNAL. .
. .360
Non-Structured Arrays in
AUTOMATIC. . • .
. .360
STATIC EXTERNAL, CONTROLLED or
Parameter Array • • . • . . . • . 360
Non-Structured Scalar Strings
in STATIC INTERNAL. • • . . .360
Non-Structured Scalar Strings
in AUTOMATIC • . . . • . . . . • 361
Non-Structured Scalar Strings
in STATIC EXTERNAL,
CONTROLLED or Parameter.
.361
Non-Structured Non-String
Scalars in AUTOMATIC or
STATIC INTERNAL . • • . . . . . 361
Non-Structured Non-String
Scalars in STATIC EXTERNAL,
CONTROLLED or Parameter.
• .361
7. Other Dictionary Entries • • .
• .361
Label Constants
Extracted
by the Read-In Phase . • . • . 361
Compiler Labels.
. .361
Formal parameter type 1
entry. • • • • •
. . . 361
Dictionary entry for FILE . • . 362
FILE Constants. .
• . . . • . 362
FILE Parameters and Temporaries . . 362
FILE Environment Entries
.362
Dictionary Entries from
Constants. • . . . . . .
. .362
Task Identifiers and EVENT Data . . 363
Dictionary Entries for Built-in
Functions . . . . . . • .
. 363
Second Code Byte . • . . .
· .364
Internal Library Functions .
.364
BCD entries • • .
· .364
Dictionary Entry for Parameter
Descriptions.
· .364
ON Statements . . .
.364
ON Condition . . .
. . • .365
CHECK List Entry .
· .365
PICTURE Entry . . .
• . • . . . 365
Byte 9 - Code Byte .
· .365
Dictionary Entry for Workspace
Requirement • . . . . • . . . . . 366
Dictionary Entry for Parameter
Lists . . • . • . . . • • . • • .366
Dictionary Entries for Dope
Vector Skeletons . . . . . • . . . 366
Symbol Table Entry . . . . •
.366
Dictionary Entry for AUTOMATIC
Chain Delimiter • . .
....366
DED Dictionary Entry
.366
DED2 Entries. . . . . . .
. .367
Dictionary Entry for FED Format Element Descriptor • . . . . 367
Label BCD Entries . • . . • . . • . 367

Dope Vector Entries for
Temporaries • . • . • . • ~
.367
Record Dope Vector Entry
• • 367
Dope Vector Descriptor Entry • . • 368
Format of a Second File
Dictionary Entry. . .
.368
Dictionary Entry for aSIATIC
DSA • • . • •
. • • • . • • • 368
8. Dimension Table

.368

9. Dictionary Entries for Initial
Values • . . . • • • . .
IN IT IAL Value List . • . • • • .

.369
. 369

APPENDIX D: INTERNAL FORMATS OE TEXT . . 371
1. Text Code Byte after the Read-In
Phase • . • • • . • . • • • . • . • • .372
First Level Table (00 to 7F) . . . 372
First Level Table (80 to FF) . . • 373
second Level Table (00 to 7F)
(preceded by second level
warker byte C8).
. . . . . . 374
Second Level Table (80 to FF) • . • 375
2. Text Formats After The Read-In
Phase • . . • • . • . • . .
.375
.375
PROCEDURE Statement.
ENTRY statement • .
.376
BEGIN Statement • • . • .
.376
END Statement. . • • •
.376
IF Staterrent • .
.377
DO statement •
.377
.377
ON Statement •
ASSIGN Statement .
.377
WAIT Statement.
.378
CALL Statement. . . • • . .
.378
GO TO Statement.
.378
SIGNAL and REVERT Statements • • 378
DISPLAY Statement. . . . • • • .379
DELAY Statement. . • . . • • . • .379
RETURN Statement . . • . . . • . .379
STOP, EXIT, and Null Statements • .379
INITIAL Label DECLARE Statements .379
DECLARE and ALLOCATE Statements . • 380
FORMAT Statements. • • . • . . . .380
OPEN and CLOSE Statements. • • • .380
READ, WRITE, GET, PUT, REWRITE,
UNLOCK, and DELETE Statements . . 380
3. Text Code Bytes on Entry to the
Translator Phases • . . • • .

.381

4. Format of Triples • .

.383

5. Text Code Bytes in pseudo-Code • • . . 386
6. Text Formats in Pseudo-Code
pseudo-code Design • • . . . • •
RX Instructions..
.• • . .
RS Instructions.
RR Instructions • .
SI Instructions..
. •.••
SS Instructions..
. .•..
Variable Length Item FLAG.
compiler Function (Bit 1=1).

.386
. 386
. 387
.388
.388
• 388
. 388
.388
.389

Pseudo-code Format between IEMRA
and IEMRF •
• • • • • . • . 389
7. Text Formats in Absolute Code.
RR Instructions.
RX Instructions. • • • • •
SS Instructions. • • • • •
RS Instructions. • • • • •
SI Instructions ••

.390
• .390
• .390
.390
.390
• .390

8. Second File Statements, and the
Formats of Compiler Functions and
Pseudo-Variables. • . • • .
•
Second File statements • •
•
Array Bounds • • • • •
•
Multiplier Function. •
•
String Length statement. •
•
INITIAL value statements .
•
Second File statements for BASED
and OFFSET. • • • • • • .
•
Second File Stateroents for
DEFINED. • • • • • • •
•

.390
.390
.391
.391
.392
.392

Compiler Requirements and
Dictionary/Text Block
Relationship. • . •

.405

APPENDIX

F:

COMMUNICATIONS

REGION • • 407

Transfer

Vectors. • . • • .

• • 407

communications

Region •

• .408

APPENDIX G: SYSTEM GENERATION. • •

.414

APPENDIX H: CODE PRODUCED FOR
PROLOGUES AND EPILOGUES. •
prologues and Epilogues.

.416
.416

DSA optimization

.4201

APPENDIX I: DIAGNOSTIC MESSAGES.

.422:

.392

APPENDIX J: COMPILE-TIME PROCESSOR • • . 429
.393

9. Pseudo-Code Phase Temporary Result
Descriptors (TMPD) . • • • . • . • . • . 393
Temporary Description Stack • • • 393
Temporary Descriptions in
Pseudo-Code. • • • •
.395

1. Internal Formats of Text. . • .
.429
Format of a Dictionary Entry • . • 429
Format of an Identifier Value
Block (IVB) • • . . . • • .
.430
Instruction Codes for the
Compile-time processor.
.431

10. Library Calling Sequences..

2. Communications Region Use..

• .395

. .434

11. Descriptions of Terms and
Abbreviations used in Text During a
Compilation • • • . • • • • • • . . • . 396

3. compile-time Processor, Operating
system, and Compiler Control
Interfaces. .

.437

APPENDIX

INDEX. • . • • •

.43B

E:

STORAGE

REQUIREMENTS • • • 405

FIGURES

Figure 1. Compiler Data Flow and Data
sets Used • • . . . • . • . . . .
. 16
Figure 2. Logical Phases of the
compiler and their corresponding
Functions. • • • . • . . . . . • .
17
Figure 3. Compiler Organization and
Control Flow. . • . • • • . • • . . • . 18
Figure 4. Input/Output Usage Table . • . 24
Figure 5. storage Map for the Read-In
Phase . " . • • • • • . • •
30
Figure 6. Dictionary Entries for an
Internal Entry Point. • • . • • • • • • 33
Figure 7. PL/I Phase-in-Storage Map • . . 340

Figure 8. Crganization of Read-In
Phase • . . • . . • . • . . . . .
Figure 9. Organization of Keyword
Tabl e • . • . . . • . . . . .
Figure 10. Decision to Include a
Second Offset Slot. . . . . .
Figure 11. Dimension Table • .
Figure 12. Temporary Descriptions in
Pseudo-Code -- Use of TMPD Triple
Fields F5 and F6 . • . • • • . • . • •
Figure 13. The IEMAF Control section .
Figure 14. Bit Identification Table .

.341
.342
.359
.369
.394
• 414
• 415

TABLES

Table AA. Module AA compiler Control
Resident Control Phase. • .
. 70
Table AA1. Module AA
Routine/Subroutine Directory. .
71
Table AB. Module AB Compiler Control
Initialization. . . • . . . . .
73
Table AB1. Module AB
Routine/Subroutine Directory. .
74
Table AC. Module AC Compiler Control
Intermediate File Control . . . . . . . 74
Table AD. Module AD Compiler Control
Interphase Dumping. . . . .
. 74
Table AD1. Module AD
Routine/Subroutine Directory.
. . 74
Table AE. Module AE Compiler Control
Clean-Up Phase. • . • . . . • • .
. 75
Table AE1. Module AE
Routine/Subroutine Directory..
. . 75
Table AF. Module AF Compiler Control
Sysgen Options. •
75
Table AG. Module AG Compiler Control
Intermediate File Switching • • • . . . 75
Table AK. Module AK Compiler Control
Closing Phase • • . • • . . . . . .
75
Table AL/AN. Modules AL/AN Extended
Dictionary/Dictionary Phases • . • . • · 76
Table AL/AN. Modules AL/AN Extended
Dictionary/Dictionary Phases (cont'd) · 77
Table AL/AN. Modules AL/AN Extended
Dictionary/Dictionary Phases (contld) · 78
Table AL/AN. Modules AL/AN Extended
Dictionary/Dictionary Phases (contld) · 79
Table AL1/AN1. Modules AL/A~
Routine/Subroutine Directory. . • . . · 80
Table AM. Module AM Compiler Control
Phase Marking . . • • . • • . . • • . · 81
Table AS. Phase AS Resident Phase for
Compile-time Processing . . . . . . • · 89
Table AS1. Phase AS Routine/subroutine
Directory . • . • . . • • . • . • .
90
Table AV Phase AV Macro Processing
Initialization • • . • . . . . . . .
91
Table AV1. Phase AV Routine/Subroutine
Directory • • • • . • . • . • • . . • · 91
Table BC. Phase BC Initial Scan and
Translation . . . . • . . . • . . . • · 92
Table BC1. Phase BC Routine/Subroutine
Directory . • . •
• . . . • . . · 93
Table BG. Phase BG Final Scan and
Replacement . . . . . . . . . . .
· 94
Table BG1. Phase BG Routine/subroutine
Directory
. . . . . . . . . . . · 95
Table BG1. Phase BG Routine/subroutine
Directory (cont'd) . . . . . . . . . . · 96
Table BM. Phase BM Diagnostic Message
Determination and Printing . . . . . . · 97
Table BM1. Phase BM Routine/Subroutine
Directory . • . . . . . . . . . . . . · 97
Table BW. Phase BW Cleanu~ Phase • .
97
Table BX. Phase BX 48-Character Set
Preprocessor. . •
. . 105
0

0

•

•

•

•

•

•

0

0

•

Table CA. Module CA Read-In Common
Block 1 . . . . . . . . . . . . . . . .106
Table CAl. Module CA
aoutine/Subroutine Directory.
.106
Table CC. Module CC Read-In Corrmon
Block 2 . . . . . . . . . . • .
.107
Table CC1. Module CC
Routine/Subroutine Directory.
. . . 107
Table CEo Modules CE , CK, CN, and CR
t<.ead-In Keyword Block • . • . . . • • .107
Table CI. Phase CI Read-In First Pass . . 108
Table Cll. Phase CI Routine/Subroutine
Directory • . . . . . . . • . • . . . . 108
Table CL. Phase CL Read-In Secend Pass .109
Table CL1. Phase CL Routine/Subroutine
Directory . . . . • . . . . . • . . . . 109
Table co. Phase CO Read-In Third Pass • . 110
Table COl. Phase co Routine/Subroutine
Directory • . . . . . . . . . . . . . . 110
Table CS. Phase CS Read-In Fourth Pass .111
Table CS1. Phase CS routine/Subroutine
Directory . . . . • . . . • . • . • . . 111
Table CV. Phase CV Read-In Fifth Pass . . 112
Table CV1. Phase CV Routine/Subroutine
Directory . . . . • . . . . • • . . . . 112
Table ED. Phase ED, Initialization . . . 129
Table ED1. Phase ED Routine/Subroutine
Directory. . . . . . . . . .
. . . 129
Table EG. Phase EG Dictionary
Initialization . . . . . . • . . . • . . 129
Table EG1. Phase EG Routine/Subroutine
Directory . . . . • . . . . . . . . . . 130
Table EI. Phase EI Dictionary Declare
Pass One.
. . . . . . . . . . . • 131
Table Ell. Phase EI Routine/Subroutine
Directory . . • . • . . . . . . . . . . 132
Table EL. Phase EL Dictionary Declare
Pass Two.
. • . • . . . . . . . . 134
Table ELl. Phase EL Routine/Subroutine
Directory . . . . • . . . . . • . . . . 135
Table EP. Phase EP Dictionary Entry
III and Call . . . • . . . . . . . • . . 137
Table EP1. Phase EP Routine/Subroutine
Directory . . . . . • . . . . • . . . . 138
Table EW. Phase EW Dictionary LIKE . . . 139
Table EW1. Phase EW Routine/Subroutine
Directory . . . . • . . . . . • . • . . 139
Table EY. Phase EY Dictionary ALLOCATE .140
Table EY1. Phase EY Routine/Subroutine
Directory . . . . . . . . . . . . . . . 140
Table FA. Phase FA Dictionary Context . . 141
Table FA1. Phase FA Rcutine/Subroutine
Directory • . . . • . . . . . . . . . . 142
Table FE. Phase FE Dictionary Bce to
Dictienary Reference . . . . . . . . . . 143
Table FE1. Phase FE Routine/Subroutine
Directory . . . . . . . . . . . . . . . 144
Table Fl. Phase FI Dictionary Checking .144
Table Fll. Phase FI Routine/Subroutine
Directory . . . .
.145
Table FK. Phase FK Dictionary
Attribute. . . . • . . . . .
.146
0

•

•

•

•

••

•

Table FKi. Phase FK Routine/Subroutine
Directory • • • • • • • • • • . • . • . 146
Table Fa. Phase Fa Dictionary ON • • • • 147
Table F01. Phase Fa Routine/subroutine
Directory • • • • • • . • • • • • • • • 147
Table FQ. Phase FQ Dictionary Picture
Processor
• • • • • . • . • • • . 148
Table FQ1. Phase FQ Routine/Subroutine
Directory • • • • • • . • • • • • • • • 149
Table FT. Phase FT Dictionary Scan • • • 150
Table FT1. Phase FT Routine/Subroutine
Directory • • • • • • • • • • • • • • . 151
Table FV. Phase FV Dictionary Second
File Merge • • • • • • • • • • • • • • • 152
Table FV1. Phase FV Routine/Subroutine
Directory • • • • • • • • • • • • • • • 153
Table FX. Phase FX Dictionary
Attributes and Cross Reference • • • • • 154
Table FX1. Phase FX Routine/Subroutine
Directory • • • • • • • • • • • • • • . 155
Table GA. Phase GA DCLCB Generation • • . 165
Table GAl. Phase GA Routine/Subroutine
Directory. • • • . • • . • ••
• .165
Table GB. Phase GB Pretranslator I/O
Modification • • • • • • • . • • . . • • 166
Table GB1. Phase GA Routine/Subroutine
Directory • • • • • • . • • • • • . • • 167
Table GK. Phase GK Pretranslator
Parameter Matching 1 • • • • • • • • • • 168
Table GK1. Phase GK Routine/Subroutine
Directory • • • • • • • • • • . • • • . 168
Table GO. Phase GO Preprocessor
Parameter Matching 2. • • • • • • • • .169
Table Gal. Phase GO Routine/Subroutine
Directory • • • • • • • • • • . • • • • 169
Table GP. Phase GP Pretranslator
Parameter Matching 2 • • • . • • . • • • 170
Table GP1. Phase GP Routine/subroutine
Directory • • • • • • • • . • . • • . . 171
Table GU. Phase GU Pretranslator Check
List. • •
• • • • • • • • • . . .172
Table GU1. Phase GU Routine/subroutine
Directory • • • • • • • • • • • • . . . 173
Table HF. Phase HF Pretranslator
Structure Assignment • • • • . . • • • • 174
Table HF1. Phase HF Routine/Subroutine
Directory • • • • . • • • • • • • • • • 175
Table HK. Pretranslator Array
Assignment • • • • • • . • • • • • • • • 176
Table HK1. Phase HK Routine/Subroutine
Directory • • • • • • • • . • • • • • • 176
Table HP. Phase HP Pretranslator iSub
Defining • • • • • • • • • . • • • • • . 177
Table HP1. Phase HP Routine/Subroutine
Directory • • • • • • • • • • • • . . . 177
Table IA. Phase IA Translator Stacker • . 183
Table IA1. Phase IA Routine/Subroutine
Directory • • • • • • • • . • . • • • . 183
Table IG. Phase IG Translator
Pre-Generic • • • • • • • • • • • . • . 186
Table IG1. Phase IG Routine/Subroutine
Directory. • • • • • . • . • .
. .186
Table IL. Phase IL Translator
Pre-Generic • • • • • • • . • • • • • • 187
Table 1M. Phase 1M Translator Generic • • 187
Table IM1. Phase 1M Routine/Subroutine
Directory • • • • • • . • . • • • . • . 188

Table IM1. Phase 1M Routine/Subroutine
Directory (continued) • • • • • • • . • 189
Table IT. Phase IT Post-Generic
Processor
. • . . • • . • . . . • 189
Table IT1. Phase IT Routine/Subroutine
Directory. • • • • • • .
• . • . • 190
Table IX. Phase IX Pointer and Area
Checking • • • • . • . • • • . • . • • . 190
Table IX1. Phase IX Routine/Subroutine
Directory • . • • • • • • • • • • • • • 190
Table JD. Phase JD Constant Ex~ression
Evaluator
. • . . . . • • • • • • 191
Table JD1. Phase JD Routine/Subroutine
Directory. • . . • . . . • .
. .191
Table JI. Phase JI Aggregates
Structure Processor . • . . •
.196
Table Jll. Routine/Subroutine
Directory. • • • • . . • • .
.196
Table JK. Phase JK Aggregates
Structure Processor . • . . •
.197
Table JK1. Phase JK Routine/Subroutine
Directory • . • . • . • • . • • . • . . 198
Table JP. Phase JP Translator Defined
Check. .
. • . • • • • • . • . • 199
Table JP1. Phase JP Routine/Subroutine
Directory . . • • • • • • • • • • • • • 199
Table JZ. Module JZ Compiler Centrol . . 199
Table LA. Phase LA Pseudo-Code Scan . . • 231
Table LA1. Phase LA Routine/Subroutine
Directory • • • . • • • • • • • . • • • 232
Table LB. Phase LB Pseudo-Code Initial .233
Table LB1. Phase LB Routine/Subroutine
Directory • • • . • . . . • • • • • • • 233
Table LD. Phase LD Pseudo-Code Initial .234
Table LD1. Phase LD Routine/Subroutine
Directory. • • • • • • • • •
.234
Table LG. Phase LG Pseudo-Code DO
Expansion . . • • • . . • . . . . • • • 235
Table LG1. Phase LG Routine/Subroutine
Directory . • • • • • . • • • • • • • • 236
Table LS. Phase LS Pseudo-Code
Expression Evaluation • • . • • . • • . 237
Table LS1. Phase LS Routine/Subroutine
Directory . • . . • • • • . • • . • . • 238
Table LV. Phase LV Pseudo-Code String
Utilities
. • . . . • . • • • . . 239
Table LV1. Phase LV Routine/Subroutine
Directory • • . . • . • . • . • • • . . 239
Table LX. Phase LX Pseudo-Code String
Handling . • • • . • . • . • . • . • . . 240
Table LX1. Phase LX Routine/Subroutine
Directory • . . . • . • • • . . . ._ • .241
Table MB. Phase ME Pseudo-code
Pseudo-Variables . . . • . • . . . • . . 242
Table MEl. Phase ME Routine/Subroutine
Directory • • • . . . . . . • • • • . • 243
Table MD. Phase MD Pseudo-Code In-Line
Functions
. • . . . • . • • • . . 244
Table MD1. Phase MD Routine/Subroutine
Directory • . • • . . • . . • • • • . • 244
Table ME. Phase ME Pseudo-Code In-Line
Functions
. . . . . • . • . • . . 245
Table MEl. Phase ME Routine/Subroutine
Directory
. . . . . . . • . . . . 245
Table MEl. Phase ME Routine/Subroutine
Directory (continued) • . • . . . • . . 246
Table MG. Phase MG Pseudo-Code In-Line
Functions 1 . • . • . • . • . . . • . • 247

Table MG1. Phase MG Routine/Subroutine
Directory • • • • . • • • . . . . • • • 247
Table MI. Phase MI Pseudo-Code In-Line
Functions 2 • • • • • • • . • • • . • • 250
Table MIl. Phase MI Routine/Subroutine
Directory • • • • . • • • . • . • • • . 250
Table MK. Phase MK Pseudo-Code In-Line
Functions 3 • • • . • • • • • . • . • . 251
Table MK1. Phase MK Routine/Subroutine
Directory • • • • . . . • • . . . • . . 251
Table ML. Phase ML Pseudo-Code Calls
and Functions • • • • • • • • • • • • . 252
Table ML1. Phase ML Routine/Subroutine
Directory • • • • • • • • . • . • • • • 252
Table MM. Phase MM Pseudo-Code Calls
and Functions • • • • • • • • . • • • . 252
Table MM1. Phase MM Routine/Subroutine
Directory • • • • • • • • • • . • • • . 253
Table MP. Phase MP Pseudo-Code BUY
Reorder.
• • • • • . • . • • • • 254
Table MP1. Phase MP Routine/Subroutine
Directory • • • • • • • • • • • • • . . 254
Table MS. Phase MS Pseudo-Code
Subscripts • • • • • • • • • • • • • • • 255
Table MS1. Phase MS Routine/Subroutine
Directory • • • • • • • • . • • • . • . 255
Table NA. Phase NA Pseudo-Code
Branches, ON, Ret urns • • • • . • . . . 256
Table NA1. Phase NA Routine/Subroutine
Directory • • • • • • • • • • . • . • • 257
Table NG •. Phase NG Pseudo-Code
Operating System services . • • • • • . 259
Table NG1. Phase NG Routine/Subroutine
Directory • • • • • • • • • • • • • • • 259
Table NJ. Phase NJ Pseudo-Code RECORD
I/O • • •
• • • • • • • • • . • .260
Table NJ1. Phase NJ Routine/Subroutine
Directory • • • • • • • • • • • • • • • 264
Table NM. Phase NM Pseudo-Code
Executable I/O • • • • • • • • • • • • • 266
Table NM1. Phase NM Routine/Subroutine
Directory • • • • • • . • • • • • • • • 266
Table NT. Phase NT Pseudo-Code Data
and Format • • • • • • • • • • • • • • • 267
Table NT1. Phase NT Routine/Subroutine
Directory • • • • • • • • • • • • • • • 267
Table NU. Phase NU Pseudo-Code Data
and Format Lists • • • • • • • • • • • • 268
Table NUl. Phase NU Routine/Subroutine
Directory • • • • • • • • • • • • • • • 268
Table OB. Phase OB Pseudo-Code
Compiler Functions. • • • • • • • • • .269
Table OB1. Ph~se_OB Routine/Subroutine
Directory • • • • • • • • • • • • • • • 270
Table aD. Phase aD Pseudo-Code
Assignment • • • • • •
271
Table OD1. Phase aD Routine/Subroutine
Directory • • • • • • • • • • • • • • • 271
Table OE. Phase OE pseudo-Code
Assignment • • • • • • • • • • • • • • . 272
Table OE1. Phase OE Routine/Subroutine
Directory • • • • • • • • . • • • • • • 272
Table OG. Phase OG Library Calling
Sequences • • • • • • • • • • • • • • • 273
Table OGlo Phase OG Routine/Subroutine
Directory.
274
Table OM. Phase OM In-line Data
Conversions • • • • • • • •
.275
0

0

•

0

0

0

••

0

0

••

0

•••

••

0

••

Table OM1. Phase OM Routine/Subroutine
Directory. • • • • . • • . • • .
.275
Table OPe Phase OP Further In-line
Conversions. • . • . . . • . • .
.276
Table OP1. Phase OP Routine/Subroutine
Directory . • • . • . • . • . . . . . • 276
Table OS. Phase OS Constant
Conversions . • . • • . • • . • • • . • 277
Table OSl. Phase OS Routine/Subroutine
Directory • . . . • . • . . . • • • . . 277
Table PA. Phase PA DSAs in S~ATIC
Storage.
. • . • . • . • . • • . 290
Table PAl. Phase PA Routine/Subroutine
Directory • . . . • . • . • . • .,. • .290
Table PD. Phase PD Storage Allocation
Static 1.
• • • • . • . • . • . • 291
Table PD1. Phase PD Routine/Subroutine
Directory • • • . • • • . • • • . • • . 291
Table PH. Phase PH Storage Allocation
static 2.
• • • . . • • • • • . . 292
Table PH1. Phase PH Routine/Subroutine
Directory • • • . • . • • . • • . • . . 293
Table PL. Phase PL Storage Allocation
Symbol Table and DEDs • . • • • . • • . 294
Table PL1. Phase PL Routine/Subroutine
Directory • . • . • . • • • . • . • • . 294
Table PP. Phase PP Storage Allocation
Sort of AUTOMATIC Chain • • • • • • • . 295
Table PP1. Phase PP Routine/Subroutine
Directory • . . . • . • • • . • . • • • 296
Table PT. Phase PT Storage Allocation
AUTOMATIC Storage • • • • • • • . • • • 297
Table PT1. Phase PT Routine/Subroutine
Directory • . • . • . • • • • • • • • . 298
Table QF. Phase QF storage Allocation
Prologues
• • • • • • . • • • • • 299
Table QF1. Phase QF Routine/Subroutine
Directory • . • . • • . . • • • • • . • 300
Table QJ. Phase QJ Storage Allocation
Dynamic Storage • • • • • • • • • • • • 301
Table QJ1. Phase QJ Routine/Subroutine
Directory • • • . • • • . • • • . • • • 302
Table QX. Phase QX Print Aggregate
Length Table . • . . • • . • • • . • • • 303
Table QX1. Phase QX Routine/Subroutine
Directory • . • . • • • . • . • • • • • 303
Table RA. Phase RA Register Allocation
Addressibility Analysis • • . • • • • .307
Table RA1. Phase RA Routine/Subroutine
Directory • • • • • • • . • . • . • • . 308
Table RF. Phase RF Register Allocation
Physical Registers • • • • • • • • • . . 309
Table RF1. Phase RF Routine/Subroutine
Directory • • • • • • • • • • • • • • • 309
Table TF. Phase TF Final Assembly Pass
1 • • • •
. • • • • • . . . • . .321
Table TF1. Phase TF Routine/Subroutine
Directory • • • . • • • • • • • • • • • 321
Table TJ. Phase TJ Final Assembly
Optimization • • • • • • . • • • . • • . 322
Table TJ1. Phase TJ Routine/Subroutine
Directory • . • . • • • • • . • • • . • 322
Table TO. Phase TO Final Assembly
External Symbol Dictionary • • • • • • • 323
Table T01. Phase TO Routine/Subroutine
Directory. . • .
. • . • • . . . 323
Table TT. Phase TT Final Assembly Pass
2 • • • . • • • •
• • . • • • • • 324

Table TTl. Phase TT Routine/Subroutine
Directory . • • • • • • • • . . • • • . 325
Table UA. Phase UA Final Assembly
Initial Values, Pass 1 • . • • • • • • . 326
Table UA1. Phase UA Routine/Subroutine
Directory • • • • • • • • . • • • . • . 327
Table UD. Phase UD Final Assembly
Initial Values, Pass 2 • • • • • • • • • 328
Table UD1. Phase UD Routine/Subroutine
Directory . • • • • • • • • • • • • • • 328
Table UE. Phase UE Final Assembly
Initial Values, Pass 2 • • . • • • • • • 329
Table UE1. Phase UE Routine/Subroutine
Directory. • • •
• • • • • . • • 330
Table UFo Phase UF Final As~embly
Object Listing. •
• • • • • . • . 331

Table UF1. Phase UF Routine/Subroutine
Directory. • • •
• • • • •
.332
Table XA. Phase XA Error Message
Editor. •
. • . • • • • • .
.334
Table XA1. Phase XA Routine/Subroutine
directory. • . . • • • . • ••
• .334
Table 1. Communications Region.
.409
Table 1. Communications Region
(cont'd). • • . . • . • . • . •
.410
Table 2. Communications Region. •
.411
Table 2. Communications Region
(cont'd). • • • • • • . • • • • .
.412
Table 3. Communications Region. Bit
Usage in ZFLAGS . • . . • • • • . • . • 413

CHARTS

Chart 00. Overall Compiler Flowchart . . 67
Chart AA. Resident control Phase Logic
Diagram (Modules AA through AM, and
JZ) . . . . • • . . . . . . • . .
. 69
Chart 01. Compile-time Processor
Logical Phase Flowchart . . • . .
82
Chart AS. Phase AS overall Logic
Diagram • • • • • . . . .
. 83
Chart AV. Phase AV Overall Logic
Diagram . . • . • . • . •
. 84
Chart BC. Phase BC Overall Logic
Diagram . . • . . . . . .
. 85
Chart BG. Phase BG Overall Logic
Diagram . . • . . • . . .
86
Chart BM. Phase BM Overall Logic
87
Diagram • . . • . . . . .
Chart BW. Phase BW Overall Logic
88
Diagram • . • • . . . . .
Chart 02. Read-In Logical Phase
. 98
Flowchart • • • • . • . •
Chart BX. Phase EX Overall Logic
. 99
Diagram . . . • • . • • •
Chart CI. Phase CI Overall Logic
.100
Diagram • . • . . . . . •
Chart CL. Phase CL Overall Logic
.101
Diagram • . • . • . • . •
Chart CO. Phase CO Overall Logic
Diagram • • • • . . • . •
• .102
Chart CS. Phase CS Overall Logic
.103
Diagram . . • • • . • . . . . • •
Chart CV. Phase CV Overall Logic
Diagram . . . • • .
· .104
Chart 03. Dictionary Logical Phase
Flowchart . . • • • . . •
.113
Chart EG. Phase EG Overall Logic
Diagram • . . • .
• .114
Chart EI. Phase EI Overall Logic
Diagram • . • . •
· .115
Chart EL. Phase EL Overall Logic
Diagram • • • • •
• .116
Chart EP. Phase EP Overall Logic
Diagram • . . • • . . • • . • . • . • . 117
Chart EW. Phase EW Overall Logic
Diagram. • . • . • . • •
• .118
Chart EY. Phase EY Overall Logic
Diagram • . • . .
· .119
Chart FA. Phase FA Overall Logic
Diagram • . . . •
.120
Chart FE. Phase FE Overall Logic
Diagram • • • • .
. • . 121
Chart Fl. Phase FI Overall Logic
Diagram • . • • .
• .122
Chart FK. Phase FK Overall Logic
Diagram . . . . • . . . .
.123
Chart Fa. Phase Fa Overall Logic
Diagram • . . . •
.124
Chart FQ. Phase FQ Overall Logic
Diagram . . . . •
· .125
Chart FT. Phase FT Overall Logic
Diagram • . . • •
.126
Chart FV. Phase FV Overall Logic
Diagram . • • . •
• .127

Chart FX. Phase FX Overall Logic
Diagram. • . . . • . • . . . .
.128
Chart 04. Pretranslator Logical Phase
Flowchart . . . . . . • .
.156
Chart GA. Phase GA Overall Logic
Diagram • • . . . • . . . • . . .
.157
Chart GB. Phase GB Overall Logic
Diagram. . . . . • • . .
.158
Chart GK. Phase GK Overall Logic
Diagram. • . . • • • . . . . • •
.159
Chart GP. Phase GP overall Logic
Diagram . . . . . • . . . . . . . • . .16 ()
Chart GU. Phase GU Overall Logic
Diagram. • . . . • . . • . . • .
.161
Chart HF. Phase HF Overall Logic
Diagram • • . . . • . . . . . . . • . .16:2
Chart HK. Phase HK Overall Logic
Diagram. . . • . • . • . . . . •
.163
Chart HP. Phase HP Overall Logic
Diagram. • • • . •
. . .•
.164
Chart 05. Translator Logical Phase
Flowchart • . • . • . . . . • . . • . . 178
Chart IA. Phase IA Overall Logic
Diagram • . . . • • . . . • . • .
.179
Chart IG. Phase IG Overall Logic
Diagram. • . . . • . • . . . . .
.180
Chart 1M. Phase 1M Overall Logic
Diagram. • . • . •
. • ..
.181
Chart IT. Phase IT. Overall Logic
Diagram. • . . . •
.182
Chart IX. Phase IX Overall Logic
Diagram. . . . . • • . . • • . .
.184
Chart JD. Phase JD Overall Logic
Diagram. • . • . •
.185
Chart 06. Aggregates Logical Phase
Flowchart. . • . • . . . • • • •
.192
Chart JI. Phase JI Overall Logic
Diagram. • . . . • . • . • • . •
.193
Chart JK. Phase JK Overall Logic
Diagram. • . • . • . • . • . • •
.194
Chart JP. Phase JP Overall Logic
Diagram . • • • . • • . . . . • . • . .19'5
Chart 07. Pseudo-Code Logical Phase
Flowchart. . . . • • . . • . • .
.200
Chart LA. Phase LA Overall Logic
Diagram. • • . • • • . . • • . .
.201
Chart LB. Phase LB Overall Logic
Diagram. • . . . • • . .
.202
Chart LD. Phase LD Overall Logic
Diagram. • . . . • • . • . . • .
.203
Chart LG. Phase LG Overall Logic
Diagram . • . . • . . . • • • • •
.204
Chart LS. Phase LS Overall Logic
Diagram . • . • • • . . . • . • • . . .205
Chart LV. Phase LV Overall Logic
Diagram. . • . . • • . .
.206
Chart LX. Phase LX Overall Logic
Diagram. • . . • • • . . . . • .
.207
Chart MB. Phase MB Overall Logic
Diagram. . . • . • . . . • • • •
.208
Chart MD. Phase MD Overall Logic
Diagram. . . . . • . . •
.209

Chart ME. Phase ME Overall Logic
Diagram "
Chart MG. Phase MG Overall Logic
Diagram
Chart MI. Phase MI Overall Logic
Diagram
Chart MK. Phase MK Overall Logic
Diagram
Chart ML. Phase ML Overall Logic
Diagram
Chart MM. Phase MM Overall Logic
Diagram
Chart MP. Phase MP Overall Logic
Diagram
Chart MS. Phase MS Overall Logic
Diagram
Chart NA. Phase NA Overall Logic
Diagram
Chart NG. Phase NG Overall Logic
Diagram
Chart NJ. Phase NJ Overall Logic
Diagram
Chart NM. Phase NM Overall Logic
Diagram
Chart NT. Phase NT Over'all Logic
Diagram
Chart NU. Phase NU Overall Logic
Diagram
Chart OB. Phase OB Overall Logic
Diagram
Chart aD. Module aD overall Logic
Diagram
Chart OE. Phase OE Overall Logic
Diagram
Chart OG. Phase OG Overall Logic
Diagram
Chart OM. Phase OM Overall Logic
Diagram
Chart OPe Phase OP Overall Logic
Diagram
Chart OS. Phase as Overall Logic
Diagram
Chart 08. Storage Allocation Logical
Phase Flowchart

········
·········
······· · ··
· ·· ··· ·· ····
· · ·· ·· ·
····· ···
····· ···
·········
······· ·
·········
······ ······
·········
· ··· ·· ·· ·
· ··· · ·· ·
··· ······
·········
····· · · ··
········ · ··
· ·· ····· ·
··· ··· ·· ·
······ ·· ··
········

·

.210
.211

·

.212

·

.213

·

.214
.215

·

.216
.217
.218

·

·

.219
.220

·

.221

·

.222

·

.223
.224
.225

·.·
·

.226
.227
.228
.229

·

.230

· ·

.279

Chart PA. Phase PA Overall Logic
Diagram IEMPA. STATIC DSA'S
Chart PD. Phase PD Overall Logic
Diagram
Chart PH. Phase PH Overall Logic
Diagram
Chart PL. Phase PL Overall Logic
Diagram
Chart PP. Phase PP Overall Logic
Diagram
Chart PT. Phase PT Overall Logic
Diagram
Chart QF. Phase QF Overall Logic
Diagram
Chart QJ. Phase QJ Overall Logic
Diagram
Chart QU. Phase QU Overall Logic
Diagram
Chart QX. Phase QX Overall Logic
Diagram
Chart 09. Register Allocation Logical
Phase Flowchart
Chart RA. Phase RA Overall Logic
Diagram
Chart RF. Phase RF Overall Logic
Diagram
Chart 10. Final Assembly Logical Phase
Flowchart
Chart TF. Phase TF Overall Logic
Diagram
Chart TJ. Phase TJ Overall Logic
Diagram
Chart TO. Phase TO Overall Logic
Diagram
Chart TT. Phase TT Overall Logic
Diagram
Chart UA. Phase UA Overall Logic
Diagram
Chart UD. Phase UD Overall Logic
Diagram
Chart UE. Cverall Logic Diagram.
Chart UFo Phase UF Overall Logic
Diagram
Chart XA. Phase XA Overall Logic
Diagram

· ·

·

·
·

·

·
·

·

·
·
·
·

··· ··· ·
··· · · ·
· · · ···
· · · ··
·· · ····
· · ···
··· · ··
· ·· ·· ··
··· · ··
· ···
··· ·
·
·
·
······ ·
· ·
·· ·
· · ·
··· · ··
··· ····
·· · ···
· · ··

· ·

··

·
·

· ··
· · ·

·

··.

·
· ··
···

· ··

· ··
····
···
· ··
··

····
···
· ·

.280
.281
.282
.283
.284
.285
.286
.287
.288
.289
.304
.305
.306
.311
.312
.313
.314
.315
.316
.317
.318

·

.319

···

.320

The Operating System/360 PL/I
(F) Compiler analyzes and processes source programs written in PL/I, and translates them
into object programs in load module form
suitable for input to the Linkage Editor.
When errors are detected in the source
program, appropriate diagnostic messages
are produced. The compiler functions within Operating System/360 and may be used on
machines where at least 45,056 (44K)
bytes
of core storage are available for the
compilation (exclusive of storage requirements for the Operating System).

A compilation is initiated by loading
the compiler control routines from the link
Library.
The compiler control routines
then carry out their own initialization,
including loading those compiler control
routines which remain in storage throughout
the compilation.
These routines perform
the following functions:
1.

Act as the interface between the compiler phase and the Operating System,
controlling all input/output, storage
allocation,
program
interruptions,
storage dumping, etc.

2.

Supervise
the loading of compiler
phases in accordance with source program options and inforrration obtained
from the source program by the compiler phases.

3.

Supervise all workspace used by the
compiler for information concerning
the source program. This includes any
spilling from main storage to backing
storage in order to accorrmodate large
source programs, the conversion of
symbolic
references
to
absolute
addresses, and the conversion from
absolute addresses to symbolic references.

4.

Provide a number of routines to assist
in compiler debugging.

THE COMPILER AND OPERATING SYSTEM/360
The PL/I
(F) compiler is'a processing
program of Operating System/360. The compiler consists of a number of phases under
the supervision of compiler control routines.
The compiler communicates with the
control program of the Operating System,
for input/output
and
other
services,
through the control routines.
A compilation is introduced as a job
step under the control of the Operating
System, via the JOB statement, the execute
(EXEC) statement, and the data definition
(CD)
statements of the Job Control Language, for the input/output data sets.
Cataloged procedures are provided to keep
these statements to a mini~um.
A discussion of the introduction of a compilation
as a job step, and of the available cataloged procedures, is given in the publication IBM System/360 Opefi!:!:.!!}SL.§y~!:~!!!..L-~~~!
~~) Program!!!er's Gui2~' Form C28-6594.
The source program to
be
compiled
appears as input to the compiler on the
SYSIN data set. The compiler uses SYSUT1
(required if the main storage is insufficient to contain the program) and SYSUT3
(required if the 48-character set or the
compile-time processor is used) as work
data sets. The SYSPRINT data set is mandatory.
The SYSPUNCH and SYSLIN data sets
are used, depending on the options specified by the source programmer, to contain
the output from the compiler.
The overall data flow associated with a
compilation, and the data sets used in the
compilation, are illustrated in Figure 1.

The
compiler
options specified are
interpreted
and the appropriate action
taken. The environmental options, such as
storage size and device type, are used to
calculate the text and dictionary block
size and the "spill" point (i.e. the point
at which the main storage available is
insufficient to contain the dictionary and
text).
To determine the block size a table
contained in Phase AB is used. The storage
size is used as the argument tc search the
table.
When the correct entry is found,
the text tlock size and the dictionary
block size values are extracted and used
for the compilation.
The options are instructions to the
compiler. Some of these require a phase to
be loaded that would not otherwise be
loaded. When an option of this type is
found,
a request for the phase required is
inserted into the status byte in the phase
directory.
Other options are in the form
of instructions to a phase that is always
loaded. These instructions are also placed

section 1 (Introduction): The Compiler and Operating system/360

15

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

I
I
I
I
I
I

I
I
I
I
I
I

Source

program
(SYSIN)

L------T------J
I
I

,
V

r---------------------------,
compiler
,

,

,

I

,
(SYSUT1 and SYSUT3
,
lare used as work data sets I
I
when required)
,

L-------------T-------------J
I

,

I

V

r--------T--------T--------T-------T---------T--------T-------T--------,
SOURCE
XREF
LIST
DECK/MACDCK
LOAD
option

opticn

I
I
I
,

V

I,

V

I,

program

I,

listing

I
I
I
I
I,

,

L_____________ J

I

list of
stateroent
numbers

V

V

r-------------,
r-------------,
ESD,TXT,RLD ,
ESD, 'TXT,

I

I,

object codel
produced
I
by the
compiler
I

I,

RLD, END,
I and NAME
I (if OBJNM
I specified),

END and NAME'
I, cards. PL/I
Source text
I, if MACDCK
I
specified. JI

,

I
IL _____________ JI

,
,

SYSPUNCH

SYSPRINT

SYSLIN

for all
compilations

SOURCE2
option

,I

I
I
I

I,

I
I
I

,r-------------,,
External
Symbol

I

,
I,

I Dictionary
I _____________ JI
L
SYSPRINT

V

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

I List of
I identifiers, I
I
I list of
I attributes I
I assumed by I
identifiers JI
IL _____________

,
V

V

r-------------,, ,r-------------,
I List of
I

,

,

compiler
I options usedl
I and
I
I, Diagnostic I
Messages
L _____________ JI

SYSPRINT

compiler Data Flow and Data Sets Used

SYSPRINT

I
I
I

,

I
IL_____________ JI

L_____________

ATR
option

I

16

I
I
I
I

EXT REF
option

V

.Figure 1.

,I
,I

SYSFRINT

SYSPRINT

,

V

identif iers, ,

option

,
,
,
I

r-------------,
List of

,
,
,
,
,L_____________ J,
I,

options

,
I
I
I

,r-------------,
List of

r-------------,
Source

I
I

option

,
I
I
I

,Listing of
I
I input to the I
,
Icompile-tirre
'processor
I

I

I

L _____________ J

SYSPRINT

in coded form in the comrrunications region
of the dictionary, generally in the Control
code word (see CCCODE in Appendix B).

information as the addresses of the
heads of chains, the symbolic start of
text,
etc. The remainder of the dictionary
contains
all
information
relating to identifiers appearing in
the program, terrporary storage areas
required, etc. For the compiler ~ro­
per,
the format of all dictionary
entries will be found in Appendix C.

The PL/I (F) Compiler com~rises a number
of logical phases, each of which consists
of several physical phases.

r-------------T---------------------------,
ILogical Phasel
Main Functions
I

The compiler phases and their corresponding functions are indicated in Figure
2,
and the organization of the compiler is
shown in Figure 3.

Icompile-time
I Processor
I
I

Control is passed between the phases of
the compiler via the control routines.
After each phase has been executed,
it
branches to the control phase, which selects from its load list the next phase to
bE~ executed.

IRead-In
I
I

communication between the
implemented by the following:
1..

phases

is

1:Q~.t.§~.t __ ~!:.!:i:n.9..!.

The text string at
the start of the compilation is inp'l\t
text.
This is converted
by
the
compile-time processor, if necessary,
into a string which is PL/I source
text.
The -characters in this string
are translated into a code internal to
the compiler. The phases of the compiler gradually process the text until
the final form is the object program,
consisting of a string of machine
instructions.
For the compiler proper, the text code bytes used,
and
formats of statements at different
stages of the compilation, will be
found in Appendix D.

The text is broken down into a number
of blocks, depending upon the size of
the machine. Each block has a symbolic name which is independent of the
physical location of the block in
storage. Thus, the text blocks may be
moved around in core storage under the
supervision of the compiler cont~ol
routines, and spilled on to backing
storage if insufficient main storage
is available.
2.

1:Q.§_Gicti2n~~~

The dictionary consists of a number of blocks, each with
a symbolic name.
Part of the first
dictionary block is used as a communications
region
(see
Appendix F)
between phases, and for this reason
the first block is never spilled, even
when the source program to be compiled
exceeds available storage. The communications
region
contains
such

~-------------+---------------------------~

IExecutes compile-time
I
I statements
and
produces I
linput for further compiler I
Iprocessing.
I

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

ICheck source
Itax;
remove
Icharacters.

syn-I
superfluous I
I

~rogram

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

IDictionary
t
I
I
I

IRemove BCD identifiers andl
declarations; I
Ireplace by syrrbolic ref-t
lerences
to
dictionaryl
lentries.
I

I attribute

~-------------+---------------------------~
IPretranslatorlRearrange 1/0 statements; I

Icreate temporary variables I
I
Ifor
procedure
argurrentl
I
I
I expressions; convert arrayl
I
land structure assignments I
Ito DO loops;
remove iSUBI
I
I
I expressions.
I
~-------------+---------------------------~
ITranslator
I Convert PL/I
syntactical I
Iform to internal
triplel
I
I
I form.
I
~-------------+---------------------------~

IAggregates
I
I

IMap all
structures
andl
larrays to align elements onl
Icorrect storage boundaries. I

~-------------+---------------------------~

I Pseudo-code
I

Iconvert
I code.

triples to pseudo-I
I

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

I Storage
I allocation
I

IAllocate storage for items I
lin
AUTOMATIC
blocks orl
ISTATIC storage area.
I

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

IRegister
I allocation
I
I

IAllocate physical registers I
lin place of syrrbolic reg-I
listers requested by earlierl
Iphases.
I

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

IFinal
I assembly
I
I

IComplete translation to ma-I
Ichine code; produce loaderl
Itext; produce object codel
Ilisting.
I

~-------------+---------------------------~

IError
IPrints out any necessary
I
messages.
lIEditor
_____________ Idiagnostic
___________________________
JI
~

Figure 2.

Logical Phases of the Compiler
and their corresponding Functions

section 1 (Introduction):

Compiler Organization

17

r-------------------------------------------,
r-----------,I
1 OS/360
I CONTROL
I PROGRAM

I
I

PL/I (F)
COMPIL~g

L---T-------J

1

A

1

1

I

1

1
V

1
I

r-------.1. ---,1

1 COMPILER
1 CONTROL
I ROUTINES

1-------,
I

L---T-------J

I
I
I
I

V

1\

I
I
I
I

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

r-------.1.---,1
I

\ ___________
RESIDENCE J\
L

I\ COMPILER

\

\<--+-------------->1

I
1I

I PROCESSING I
r-----~

r-----------,
1

I

1---,

I
I

1 PHASES
I

I
1

L ___________ J

I

I
I

\
1

1

I
I

I

I

I SOURCE
I
IL___________ JI

I
VI

I
I
V

V

1\

V

V

V

r-----------,
TEXT

I DICTIONARY I

I I
BLOCKS
Ir---------+-->I
I
L ___________
JI

1L ___________
BLOCKS
JI

V

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

I

OBJECT

I

I1

I

\

1\

1\

I

I

1I

1I

1L_________ +
1_______________________ +
I _________ J

I

V

r-----------,I
1 SPILL
I

1

STORAGE JI
IL___________

Figure 3.

I

I·

L___________ J

18

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

IL _________ +__ >1

V

r-----------,I
1 SPILL
\

I

I

1

STORAGE
L ___________
J

------>

CPU Control

------»

Read/Write Communication

<----->

Input/Output under OS/360 Control Program
and Compiler Control Supervision

Compiler Organization and Control Flow

L.OGICAL PHASES
The logical phases of the compiler and
their main functions are su~marized in the
following paragraphs.

Compile-time Processor

The Translator Phase converts the original PL/I syntactic form to an internal
syntactic form, referred to as "triples."
Triples consist of the original source
program operators and o~erands, but rearranged so that the operat.ions specified in
the source string may be carried out in
their proper order.

Ph~§~

The Compile-time Processor Phase reads
input
text,
executes any compile-time
statements contained in it, and modifies
text as directed, producing modified text
for further compiler processing.

The Read-In Phase is responsible for
source program syntax checking, and the
removal, from the text string, of all
superfluous characters, such as comments
and non-significant blanks.

The Aggregates Phase carries out all
structure and array mapping, so that elements are aligned on the correct storage
boundaries.
When it is not possible to
carry out the ~apping at compilation tirre,
such as when the aggregates contain string
lengths or array bounds which are specified
by expressions, object code is produced to
do it at object time~
~his phase also
checks that items DEFINED on arrays and
structures can be mapped consistently.

Dictionary Phase
The Dictionary Phase removes all BCD
identifiers and attribute declarations from
the source string, and replaces them by
symbolic references to dictionary entries.
The dictionary entries contain all the
consistent declared attributes, and all the
attributes specified in the language in
default of source program specifications.
Error messages are generated for all inconsistent attributes.

The Pseudo-Code Phase converts the triples to a form closely resembling machine
instructions, in which registers are represented symbolically, and storage locations are represented by dictionary references with offsets.
The final pseudocode version of the text also contains a
number of special pseudo-code items for the
guidance of later phasesc

Pretranslator Phase
The Pretranslator Phase processes those
features of the language that are more
easily processed in their original PL/I
form, than when the original syntactic form
has been lost in later phases. The Pretranslator carries out these modifications
which include the rearranging of the order
of certain I/O statements, the creation of
temporary variables for procedure arguments
which are expressions, the conversion of
array and structure assignments to a series
of 'DO' loops surrounding scalar assignments, and the removal of iSUB expressions.

The Storage Allocation Phase searches
the dictionary for all entries requiring
storage, and allocates offsets to each
item, either within its AUTOMATIC block, or
within the STATIC storage area. Code is
compiled
to
set up dope vectors and
pointers at object time, for allocations of
controlled variables and temporaries, the
storage for which must be obtained during
the execution of the object program. Prologue code is generated for each block of
the object program.

Section 1 (Introduction):

Compiler Organization

19

The Register Allocation Phase allocates
physical registers to the symbolic registers which have been requested by earlier
phases, and also ensures that all the
storage location offsets allocated in previous phases can be addressed by the insertion of additional instructions, where necessary.

The Final Assembly Phase completes the
translation to machine code instructiona,
by calculating branch destination addresses
inserted symbolically by earlier phases.
Loader text is then produced for
the
machine instructions, constants, INITIAL
values in STATIC storage, and all the

20

constant data required for block initialization. ESD and RLD cards are produced to
enable the object program to be edited by
the Operating System/360 Linkage Editor.
The Final Assembly Phase also produces a
listing of the object code produced.

The Error Editor Phase is entered at the
end of every compilation.
The dictionary
is examined to determine whether there are
any diagnostic messages to be printed out.
If there are none, the corrpilation is
terminated by the compiler control.
If
there are diagnostic messages to be printed
out, the error dictionary entries are processed and the messages are printed. The
texts of all the diagnostic rressages are
Iheld in modules XG through YY.

Note:
For description~i of terms and abbreviations used in the text during a compilation
which are mentioned in t~his section of the Program Logic Manual, refer to ~EE§~9ix_QL_!!.
Loads phase AN to handle a normal dictionary, or phase AL if an extended
dictionary is requested.
On return from module AB, the first compiler phase is loaded and entered.

COMPILER CONTROL
when the PL/I (F) Compiler is invoked by
the
calling
program
(e.g.,
the Job
Scheduler) of the Operating ,System, the
Compiler Control module IEMAA is loaded and
entered.
IEMAA is resident during the
whole compilation; it controls the following functions:
Initialization
Character translation
Text and dictionary block control
Scratch storage control
Phase loading
Diagnostic message control

The character translation tables (see
Appendix D.l)
provide the facility for
converting external code to a compiler
internal
code, and for converting the
internal code back to the external form.
These tables thus prevent the compiler from
becoming character code dependent, and enable the scanning routines to process the
input source statements more efficiently.
Note that the contents of these tables are
different during compile-time processing
from the contents during compilation proper.

Input/output control
Program check handling
Job termination

Initialization is achieved by module AA
linking to module AB. Module AB performs
the detailed initialization of the compiler, and provides the following functions:
Opens SYSIN and SYSPRINT data sets
a phase directory (for details
refer to Appendix B)

Cons~ructs

The comrrunications region is an area
specified by the control routines, and used
to
communicate
necessary
information
between the various phases of the compiler.
The communications region is resident in
the first dictionary block throughout the
compilation.
Entry to the various corrpiler control
routines is via a transfer vector. Details
of the transfer vector and the organization
of the communications region appear in
Appendix F.
(Note: The use of the corn~uni­
cations region during compile-time processing is described in Appendix J.)

Sets up a communications region in the
dictionary (for details refer to Appendix
F)

Scans option list
Obtains space for
tionary blocks.

text blocks and dic-

Opens SYSUT3 and SYSPUNCH as necessary
Prints a list of options used in
compila.tion

current

Block control is achieved by a systerr of
text and dictionary references.
If the
program in storage becomes too
large,
blocks are placed on an external file,
SYSUT1. The block control routines contain
the input/output control.

Section 2 (Compiler Phases): Control, 48-Character Preprocessor

21

Scratch storage

Con!~21

Scratch storage of 4K bytes is guaranteed to all phases. The control routines
split the 4K-block into discrete sections,
and allocates them as required. The sections are in multiples of 512 bytes.

The (F) Compiler requires
for the following purposes :

main

storage

Because of the number of phases in the
compiler, the phase directory is split into
halves.
The first half is constructed
during the initialization of the compiler:
also a list of names of the phases in the
second half is kept in Phase AA. This list
is used to pass status indications (i.e.,
whether phases are wanted or not wanted)
from the first half to the second half.
Phase JZ uses the list to construct a new
directory for the second half.
(The error
message phases have their own ~hase directory, which is built in phase XB and uses
the same space in AA as the phase directory
proper.)

Compiler processing phases
The phase directories are ccnstructed by
use of the BLDL macro and a build list.
The format of the build list is fully
described in the publication !~~_§yst~m{l£Q

Print buffers
Compiler control routines
Dictionary area

Opera~i~g_§y~!~mL_~2~~~21_g~29~~m_Ser~i£~§,

Form C28-6541. For details
directory see Appendix B.

Text area

cf

the

phase

Input/Output buffers
Input/Output routines (QSAM)
The main storage required by each phase
of the compiler need be contiguous only for
each control section.
During the read-in phases a minimum of
two dictionary blocks and two text blocks
are available in storage simultaneously.

Diagnostic message
control
routines
cause diagnostic messages to be placed in a
chain in the dictionary.

During the rest of the compilation four
dictionary blocks and four text blocks are
available in storage simultaneously.
The dictionary and text block size is
chosen according to the amount of main
storage available to the compiler.
The
SIZE option, interpreted at
invocation
time, provides the value used to determine
the block size. A table contained in Phase
AB is searched, using the SIZE option as an
argument. When the correct entry is found,
the block size is extracted.
Appendix
allocation.

E

shows

details

of

storage

Phase loading routines include phase
marking (where phases are indicated as
wanted or not wanted), phase loading, and
phase
deleting
facilities.
The phase
directory is constructed for this purpose.
22

The I/O control routines involved act as
an interface between the corr~iler phases,
and SYSIN, SYSPRINT, SYSLIN, and SYSPUNCH
data sets.
(See Figure 4.)

The compiler handles all ~rcgraro checks.
Control can be passed to a phase to enable
it to deal with the check.

The compiler completion code is picked
up and control is returned to the calling
program.

The compiler
follows:

completion

codes

are

as

o

No diagnostic messages issued; compilation completed with no errors

4

Warning messages
compiled

8

Error messages issued; program compiled but with errors; execution
may fail

issued;

Sect~ion

12

Severe error messages issued; compilation may be completed but with
errors, successful execution improbable.
If a severe error occurs
during compile-time processing, a
listing of the PL/I text on SYSUT3
will
be printed if the SOURCE
option is specified. The compilation will be terminated.

16

Terminal error messages
issued;
compilation terminated abnormally

program

2  I
I
I r-->I Dictionary entry for entry label
IA
IIII Ir--IL _____________________________________ JI
III

III

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

I I L_>I Entry type 2. Used to provide
I
II
I data description of target in
IB
RETURN (expression).
j
II II r--I
I L _____________________________________
J
II

II
r-----------------------------------------,
I
V
II
I I r----------------- L - - - - - - - - - - - - - - - - - - - , r-------------------------------------,
! L_>I Entry type 3. This entry is used
I Second entry type 2.
I
I
I to point at the data description C I I Used to provide data description
I
I and parameter descriptions for para-ID
r--I meter matching.
I
I l-------T---------T--------------T---- J
II
II
II
II

L___

I

I

I

I

I
I

I
II
I
I

L __________ ,

I of value returned when label A
IC
I is invoked as a function. This
I
I entry may, and usually will, coin- I
cide with B.
lI _____________________________________
JI

l ______ .______________________ ,

I

I

I

V

V

V

r-------------------·---,
I Description of
I
I
IE
I first parameter
I
l ______________________ J

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

I
I Entry type 1 for
l_>1 PROCEDURE or
l___ I ENTRY statement

IF
I

l-----------T---------- J

r----------------------,
I Description of
I
I
I El
Il ______________________
second parameter
I
J

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

I Formal parameter
I type 1 entry

I
IG

I

I

r-----------------------,
I Description of
I
I
I E2
IL _______________________
each parameter
I
J

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

I Description of paraI
I meter used in prologuelH
Il _______________________
construction
JI

l---------------T------ J

I
1\
Il ______________________ JI

/\
I
Il ______________________ JI

Note: There is an entry E for each parameter described in D.
Figure 6.

Dictionary Entries for an Internal Entry Point
construct chains linking entries of
cular types.

Phase ED simply moves a set of subroutines, which handle certain features of the
list processing facility, into the communications region and sets a register to point
at them. The routines will later be used
by phase EL.

Phase EG has two main functions.
The
first is to set up a hash table, and to
insert the label entries left in the dictionary by the Read-In Phase into hash
chains.
The second function of the phase
is to create dictionary entries for PROCEDURE, BEGIN, and ENTRY statements, and to

parti-

For RBOCEDUR£;=BEG!~ staterrents, entry
type 1 dictionary entries are created
(see
Appendix C.2), and block header chains are
set up to link these entries sequentially.
A containing block chain is also set up to
link each entry with that of its containing
block.
On the appearance of PROfEDUR£; statements,
circular PROCEDURE-ENTRY chains are
initialized to link the entry type 1 dictionary entries of the PROCEDURE and ENTRY
statements of the same block.
The formal
parameter list is scanned, and formal parameter type 1 entries are created and
inserted into the hash chain. Details of
the PROCEDURE-ENTRY chains appear in Appendix C.2.

Section 2 (Compiler Phases):

Dictionary Logical Phase

33

The attribute list is scanned and an
options code byte is created in the entry
type 1 (see Appendix C.2). A check is then
made for invalid and inconsistent attributes.
CHARACTER and BIT attributes are
processed, and second file statements (see
Appendix D.8) are created if necessary.
Precision data are converted to binary, and
dictionary entries are created for pictures
(see Appendix C.7).
statement labels are scanned and their
entry type 2 dictionary entries are created. The relevant data bytes in the dl.Ctionary are completed by default rules (see
Appendix c.3).
For ~NTRX statements, entry type 1 dictionary entries are created (see Appendix
C.2), and the circular
PROCEDURE-ENTRY
chain is extended.
Formal
parameters,
attributes, and labels are processed in a
similar
manner to those for PROCEDURE
statements, except that the options code
byte is not created.

!NITIALl.
dictionary entries
for INITIAL attributes.
INITIAL CALL:

second file

are created

statements

created~or-INITIAL CALL attributes.

are

CHARACTER and BIT: fixed length constants
areconVertedtobInary; a code byte marker
is left for * lengths (see Appendix C.8).
Second file statements (see Appendix D.8)
are created for adjustable length constants, and the source text is replaced by
pointers to the statements.
DEFINED:
second
file statements
(see
Appendix D.8) are created and the source
text is replaced by pointers to the statements.
POSITION: the position
verted-to binary.

constant

is

con-

PICTURE:
a picture table entry (see AppendiX--C:7>
is created and inserted into the
picture chain; similar pictures share the
same picture table.
The source text is
replaced by a pointer to each entry.
USES and SETS: USES and SETS attributes
a re--ffiov ed--rnto dictionary entries, and
pointers to the entries replace the source
text.

Phase EI
Phase EI scans the chain of DECLARE
statements set up by the Read-In Phase, and
modifies the statements to assist Phase EK
as follows:

LIKE:
BCD entries are created for identIfiers with the LIKE attribute.

Structure Level Numbers:
verted to binary-.- - - - - -

LABEL:
if the LABEL attribute has a list
of statement label constants attached, a
single dictionary entry is created.
The
dictionary entry contains the dictionary
references of the statement label constants
in the list.

these are con-

Factored Attributes: parentheses enclosing
factored attributes are replaced by special
code bytes, so that Phase EK can distinguish them easily.
A factored attribute
table is set up.
It consists of slots
corresponding to each factored level. Each
slot contains the address of the attribute
list associated with that level, and the
address of the slot for the containing
level.
The following attributes are processed:

IOFFSET and BASED: Second file statements
lare made--and~ext references are inserted
lin the DECLARE statements for these attriIbutes.
1~~EAl.

Fixed-length specifications are conIverted to binary; second file statements
lare made for expressions; a code byte,
Ifollowed by the length of text reference,
lis inserted in the DECLARE statement text.

DIMENSION: dimension table entries (see
Appendix C.8) are created in the dictionary
and the source text is replaced by a
pointer to the entry.
Fixed bounds are
converted to binary and inserted in the
table. A second file statement (see Appendix D.8) is created at the end of the text,
for adjustable bounds, and a pointer to the
statement is inserted in the dimension
table.
Identifiers with identical array
bounds share the same dimension table.

Phase EL, consisting of modules EK, EL,
and EM, scans the chain of DECLARE statements constructed by the Read-In Phase.

PRECISION: precision and
are converted to binary.

An area of storage known as the attribute collection area is reserved. ThIs-Is

34

scale

constants

All other attributes,
constants are skipped.

identifiers, or

used to store information about the identifiers, and has entries of a similar
format to that for dictionary entries.
Complete dictionary entries are constructed for every identifier found in a
DECLARE statement. These identifiers can
be one of the following types:
1.

Data Items (see Appendix C.4)

2.

structures (in
level
number
Appendix C.4)

this case, the 'true'
is calculated)
(see

3.

Label Variables (see Appendix C.4)

4.

Files (see Appendix C.7)

5.

Entry Points (see Appendix C.2)

6.

Parameters (see Appendix c.7)

After the dictionary entry has been
made,
further processing (e.g. linking of
chains, etc.) must be done in the following cases:
1.

DEFINED data

2.

Data with the LIKE attribute

3.

Files

4.

Strings with adjustable lengths

5.

Arrays having adjustable bounds

6.

GENErtIC identifiers

7.

structure members

8.

Identifiers with INITIAL CALL

9.

Identifiers with the INITIAL attribute

After the declaration list has been
fully scanned and processed, it is erased.
7.

Event Variables

8.

Task Variables.

Identifiers appearing as multiple declarations are rejected and a diagnostic
message is given.
The attributes to
each identifier are
ways.

be associated with
picked up in three

First, the attributes immediately following the identifier are stored in the
attribute collection area.
secondly, any factored attributes and
structure level numbers
are
examined.
These are found by using the list of
addresses placed in scratch core storage by
Phase EI.
Each applicable attribute is
marked in the attribute collection area,
and any other information, e.g.
dimension
table address, or picture table address, is
moved into a standard location in the
attribute collection area. All conflicting
attributes are rejected and diagnostic messages are given.
Finally,
any
attributes
which are
required by the identifier, and which have
not been declared, are obtained from the
dE~faul t rules.

Phase EP first conditionally marks later
phases as 'wanted' or 'not wanted,' according to how certain flags in the dictionary
are set on or off.
This assists in the
load-ahead technique,
The entry type 1 chain in the dictionary
is then scanned. For each PROCEDURE entry
in the chain, each entry label is examined
for a completed declaration of the type of
data the entry point will return when
invoked as a function.
If this has previously been given in a DECLARE statement
nothing further is done, otherwise entry
type 2 and 3 dictionary entries are constructed from default rules (see Appendix
C.2).
If this default data description
does not agree with the description derived
from the PROCEDURE or ENTRY statement, a
warning message is generated.
At each PROCEDURE entry, the chain to
the ENTRY statement entry type 1 is followed. Each statement is treated in a
similar manner to that for a PROCEDURE
entry type 1.
The CALL chain is then scanned and, at
each point in the chain, the dictionary is
searched for the identifier being called.
If the correct one is not found, a dictionary entry for an EXTERNAL procedure is
made (see Appendix C.2), using default
rules for data description. Before making
the entry, the identifier is checked for
agreement with any of the built-in function
names. If there is agreement, a diagnostic

Section 2 (Compiler Phases):

Dictionary Logical Phase

35

message is generated, and a dummy
ary reference is inserted.

diction-

If an identifier is found,
it
is
examined to see if it is an undefined
formal parameter. If it is, the formal
parameter is made into an entry pOint,
again using default rules for data description.
If it is not, or if the declaration
of the formal parameter is complete, the
type of entry is checked for the legality
of the call.
A diagnostic message is
generated if the item may not be called.
In all cases, the item called is marked
IRREDUCIBLE if it has not previously been
declared REDUCIBLE.

Phase EW is an optional phase, loaded
only if any LIKE attributes appear in the
source program.
This phase scans the LIKE chain which
has been constructed by Phase EK,
and
completes the dictionary entry for any
structure
containing a LIKE reference.
When a structure in the LIKE chain is
found,
its validity is checked, and dimension data and inherited information are
saved.
The dictionary is scanned for the
reference of the "likened" structure and
the entry is checked for validity.
This dictionary entry (see Appendix C.4)
is copied into the dictionary, with alterations if there is a difference between the
original structure and this structure with
regard to dimensioned data.
If both structures have dimensions a straight copy is
made; if the structure with the LIKE attribute has dimensions and the likened structure has not, the dimension information is
added to the copy; if the structure with
the LIKE attribute is not dimensioned and
the likened structure is, then the dimension data is deleted from the copy. Inherited data is added to the copy.
If an
error is found, the structure with the LIKE
attribute is deleted and a base element
copy of the master structure is inserted
instead.
Where copies of entries occur
which refer to dimension tables with variable dimensions, the dimension table entry
is copied, and new second file dictionary
entries and statements are created. Similar entries must be made if the structure
item has been declared to be an adjustable
length string, or has been declared with
the INITIAL attribute.
36

Phase BY is an optional phase
Iprocesses all ALLOCATE statements.

which

The second file is scanned first and all
pointers to the dictionary are reversed.
All ALLOCATE statements using the DECLARE
chain are then scanned, and the dictionary
references of allocated items are obtained
by hashing the respective BCD of each item.
The attributes given on the ALLOCATE statement for an item are collected together.
A copy of the dictionary entry of the
allocated item is then made
(see Appendix
C.4),
and the ALLOCATE statement is set to
point to it.
The dictionary entry is
completed by including any attributes given
on the ALLOCATE statement, and copying any
second file statements froID the DECLARE
chain which are not overriden by the ALLOCATE statement.
I
In the case of an ALLOCATE statement in
Iwhich a based variable is declared, no copy
' co
lof the original
dictionary
entry
l
Irequired.
The BCD is replaced by the
loriginal dictionary reference.
~>

I
All pOinter qualified references in the
Itext are checked to determine that the
Iqualified variable is based.
For every
I occurrence of a variable with a different
Ipointer a new dictionary entry is made.
If
Ithe variable is a structure the entire
I structure is copied.
A PEXP second file
Istatement is made for the pointer and the
I'defined'
slot in the new dictionary entry
lis set to point to it instead of to the
Ideclared pointer.
I
The BCD of the pointer and the based
Ivariable in the text are replaced by the
Inew dictionary reference followed by padIding of blanks which will be removed by
Iphase FA.
I
The based variable can be the qualified
Iname of a structure member.
If this is so,
Ithe name is checked for validity. Only the
Ifirst part or lowest level of the qualified
Iname in the text is replaced by the dicItionary reference of the rrember.
It is
Ipreceded by a special marker to tell phase
IFA that a partially replaced name follows.

Phase FA scans the text sequentially.
If,
during the scan, qualified names are
found with subscripts attached,
they are
reordered so that a single subscript list
appears after the base element name.
The

dictionary is
scanned
and
references
obtained for any identifiers which are,
contextually, file, event,
pointer variables,
or programmer-named ON conditions.
If no reference is available, a new dictionary entry is made. The identifier is
then replaced in the text by the dictionary
reference.
If a constant marker is found,
the
dictionary is scanned to check if the
constant is present.
If it is not, a new
dictionary entry is made (see Appendix C.7)
and the resulting reference replaces the
constant in the text.
If a P FORMAT marker is found,
the
dictionary is scanned for a picture entry
in agreement.
If there is no agreeing
entry, a new dictionary entry is made (see
Appendix C.7)
and the picture chain is
updated. The dictionary reference replaces
the format marker in the text.
The CALL chain is removed from CALL
statements. The appearance of PROCEDURE,
BEGIN, END,
and DO statements results in
adjustments to the level and count stacks.
If statement introduction code bytes appear
(such as SN, SL, CL, and SN2), the current
statement number is updated.
All data
items associated with the PROCEDURE, BEGI~,
ENTRY, and DECLARE statements are removed,
leaving only the statement identification
and the keyword.

PROCEDURE, BEGIN, DO, and END statements
cause the current level count to be updated.

Phase FI
-------Phase FI scans the text and checks,
where possible, the validity of dictionary
references found.
References in a GOTO
statement are checked that they refer to
labels or label variables and that the
subsequent branch is valid. The code byte
for GOTO is changed to GOOB
(see Appendix
D.l)
if the branch is to a label constant
outside the current PROC or BEGIN block.
If the branch is to a label variable, GOOB
is set up unless a label value list was
given at the declaration, and all members
of the list lie within the current block.
I
List processing based variables in ALLOICATE, FREE, READ, WRITE, and LOCATE stateIments are rrarked as requiring a Record Dope
IVector
(RDV). Variables in TASK and EVENT
loptions on CALL statements are checked for
Ivalidity.
References are checked if they appear
where a file is expected.
Items ln data
lists are checked for validity, and Data
Element Descriptors (DEDs) and symbol bits
are set on for all variables found in the
lists.
Any errors which are found cause diagnostic messages to be generated and durrmy
references to be placed in the text in
place of erroneous references.

when an identifier is found, the hash
chain is used to scan the dictionary for a
valid entry.
If one is found, its dictionary reference replacE~s the identifier
in the output text.
If no valid entry is
found, and the BCD does not agree with any
entry in the tables of BCDs of PL/I builtin functions, then a dictionary entry is
made as if the identifier was declared in
the outermost procedure.
However,
if the
BCD agrees with a function name, and it is
not in a SETS position, a function entry is
made in the dictionary, and its reference
is used to replace the identifier.
If a left parenthesis is found, the
previous dictionary entry is checked for an
array, function, or pseudo-variable.
If it
is one of these,
the relevant marker is
inserted in the text before the parenthesis
(see Appendix D.l).
Checks are also made for the positions
of
function
references
in assignment
statements.
Any
dictionary references
encountered in the input file are moved
directly to the output file.

Phase FK scans the attribute collection
area for entries with the SETS attribute.
The SETS lists in the dictionary entries
are scanned, and their syntax checked.
Identifiers are counted and replaced by
their dictionary references. Constants are
counted, converted to binary, and arranged
in ascending order in the dictionary entry.

Phase Fa makes a dictionary entry for
each ON condition mentioned inside a block.
For ON CHECK conditions multiple dictionary
entries are made (see Appendix C.7),
one
for each BCD.
If a similar condition is
mentioned more than once in a block,
only
one dictionary entry is rrade for that

Section 2 (Compiler Phases):

Dictionary Logical Phase

37

condition, except for file conditions, ON
CONDITION, and ON CHECK, when separate
dictionary entries are made for each different BCD name.
SIGNAL and REVERT statements are treated
in a similar manner to ON statements.
The dictionary entries for each BCD name
associated with file or CONDITION conditions are checked and, if in error, the ON,
SIGNAL, or REVERT statement is replaced by
an error statement. A diagnostic message
is generated.
The BCD name of each file entry referred
to in ON, SIGNAL, and REVERT statements is
examined. If the BCD is SYSIN or SYSPRINT,
the dictionary reference of the file entry
is placed in a slot in the communications
region.
A check is made to ensure that formal
parameters do not appear in CHECK and
NOCHECK lists.
A single dictionary entry
is created for each CHECK and NOCHECK list
and a pointer to the entry is placed in the
relevant entry type 1.
When dictionary entries are made for
CHECK lists, one of three different check
codes is used depending on whether the BCD
is an ENTRY LABEL, a LABEL CONSTANT, or a
variable.

label, an assignment to a compiler label
has been inserted by the Read-In phase.
Phase FO checks the validity of each such
assignment~ for each array with
this type
of initialization, a second file dictionary
entry is made, and all assignments to the
array are chained.

Phase FQ checks the validity of each
item in the PICTURE chain in the dictionary
(see Appendix C.7).
The precision for each correct picture
is calculated, together with its apparent
length, and stored in its dictionary entry.
A data byte is created in the entry for use
by Phase F'I'.
Invalid pictures cause appropriate diagnostic messages to be generated.

Phase FT
------Phase FT performs certain housekeeping
tasks. These are as follows:

List Processing POINTER and OFFSET variables in CHECK lists are treated as data
variables. BASED variables may not appear
in CHECK lists.

I 1.

The second file entries are scanned
and pointers to each entry are inserted in the associated dictionary entry
(see Appendix C.7).

A dictionary entry is made for the list
processing AREA condition. This condition
is always enabled and may not appear in a
condition prefix.

2.

Each item which has a storage class is
inserted into the appropriate chain
for that class (see Appendix C.4).

3.

Constants are placed in the constants
chain and their apparent precision is
calculated.
Sterling constants are
converted to pence.

4.

Dimension tables are separated for
items which are not in structures, but
which are
arrays
having
similar
bounds, but with different elerrent
lengthS.

5.

Items which are members of structures
and which have "inherited" dimensions,
i.e.
are contained in a structure
which itself is dimensioned, are wade
to inherit their dimensions.
If a
base element of a structure inherits
dimensions which are not constant,
second file statements
(see Appendix
D.8) are set up to initialize the
bounds in the oeject time dope vector.

6.

Items which have expressions to be
evaluated at prologue tirre u e.g. par-

Dictionary entries are also created for
each ON condition which is disabled for a
particular PROCEDURE or BEGIN block, and
for each ON condition whose status is
changed within the block.
Pointers to
these dictionary entries are placed in the
relevant entry type 1.
All dictionary entries for ON conditions
are placed in the AUTOMATIC chain for the
relevant PROCEDURE or BEGIN block.
A further,
quite distinct, function of
this phase is to substitute error statements for all statements containing dummy
dictionary
references (which have been
inserted by previous phases on detecting a
severe error).
If a dummy reference is
found in the second file,
the compilation
is aborted.
Wherever an element of a label array is
initialized by appearing as a statement
38

ameter descriptions for entry pOints
and defined items~ are placed in the
AUTOMATIC chain for the appropriate
block.
7.

The dictionary entry for any item
described by a picture is expanded by
the precision and scale or string
length, extracted from the picture
table entry.
Identifiers of different
modes sharing the same picture table
are now placed in se~arate tables.

8.

The 'dope vector required'
bit (see
Appendix C.S)
is set on where necessary.

9.

When a label array is found which has
initial label statements for any of
its elements, the chained statements
are moved into the second file.
The
original statement is left in the
text, to be removed by Phase FV.

10.

Ibased variable is a structure this reflerence is ~ropagated throughout the strucIture.
The PEXP statement is then deleted.
I
A similar ~rocedure is performed for
I BVEXP
(based variable expression) second
Ifile statements whereby the dictionary reflerence of the AREA is inserted into the
I dictionary entry of the associated OFFSET
Ivariable.
ADV second file statements referring to
la BASED variable are checked for com~liance
Iwith the (F) implementation rules.
If the
Irules are obeyed, the dictionary entty of
Ithe 'bound'
variable is inserted in the
I appropriate slot in the multiple table
I entry.
If an MTF statement refers to a based
Ivariable the ap~ropriate bound slot is
Icopied frow one multiple table entry to the
lather.

Dictionary entries similar to label
BCD entries are made for all TASK
variables.

Phase FV scans the second file and
reverses the pointers to the dictionary.
Dictionary entries for DEFINED data are
completed (see Appendix C.4 and
C.S).
Overlay and correspondence defining are
differentiated between, as are static and
dynamic defining.
A preliminary check of
the validity of defining is also carried
out.

Phase FX is an o~tional phase entered
only if the XREF or ATR
(cross reference
lister and attribute lister respectively)
options are specified.
It scans the STATIC, AUTOMATIC, and CONTROLLED chains, and
the formal ~arameter lists.
For each identifier it creates an
in scratch text storage of the form:
2 bytes

3 bytes

When ALLOCATE statements are found,
any
second file statements associated with the
item being allocated are inserted in the
text following the statement.
When a reference to dynamically defined
data
is found,
the base reference is
inserted
into
the text following the
defined reference.
When
an initial label statement is
encountered in the main text, it is not
copied into the output string.

3 bytes

r-------------T--------------T------------,
I Dictionary
IText reference I Text chain I

IL _____________
reference
Ito
this item
I ____________ JI
______________
~

When PROCEDURE and BEGIN statements are
encountered, any second file statements
associated with data in the AUTOMATIC chain
for that block are inserted in the text
following such statements.

entry

~

This entry is inserted into a chain of
similar entries in the alphabetical order
of the BCD of the identifier.
If the XREF option is s~ecified, the
text is scanned for dictionary references.
When the dictionary reference of an identifier is found in the text, an entry is
created in a chain of entries from the
dictionary entry of the identifier.
Each member of the chain which represents a reference to the identifier, has
the following form:
3 bytes

2 bytes

r-------------------T---------------------,
I Statement number I
Text chain
I

L ___________________ ~ _____________________ J

I
The dictionary reference of a POINTER in
I a PEXP , and to place the operand in
the location specified by the TMPD following the function.
Assignments to compiler
pseudo-variables are treated in reverse;
the result from the TMPD following the
assignment is stored in the array bound or
string dope vector slot specified in the
compiler pseudo-variable.
Phase OB also scans the text for BUY,
SELL, and BUY ASSIGN statements. The temporary operands of these statements are
examined, and if they are CAD or short
fixed-length strings, they are allocated

tri-

Assignment

Remote format statements are executed in
a similar way. After the R format item is
met,
control is passed directly from the
data list to the format statement until the
end of the format statement. Control then
returns to the item in the in-line format
code of the EDIT statement following the
appropriate remote format item. rlowever,
if no format elements remain but some data
list elements are still present, control is
passed back to the beginning of the format
statement.
An
which
will
to be
nate.

following

1.

Floating-point to floating-point

2.

Fixed binary to fixed binary

3.

Fixed decimal to fixed decimal

4.

Numeric field to numeric field, if the
pictures given for the operands are
identical

5.

CHARACTER string to CHARACTER string,
if the operands are fixed length and
not more than 256 characters

6.

BIT string to BIT string,
if the
operands are aligned and not more than
2040 bits

7.

Label to label

8.

File constant to file parameter

9.

POINTER/OFFSET to POINTER/OFFSET

110.

1
I
I

FIXED
CHARACTER string to VARYING
CHARACTER string and VARYING CHARACTER
string to VARYING CHARACTER string
provided that:
1.

The length of the source operand
is not greater than 256 bytes

Section 2 (Compiler Phases):

Pseudo-Code Logical Phase

55

2.

The length of the target string is
not greater than 256 bytes, if the
maximum
length
of the source
string is not known.

3.

For
FIXED CHARACTER string to
VARYING
CHARACTER
string
the
length of the FIXED string is not
greater than 256 bytes.

Library calling sequences are compiled
for those cases of CHARACTER string to
CHARACTER string and BIT string to BIT
string codes not compiled in-line.
After checking both AREA operands, AREA
assignments are performed by the library.

In-line conversion phases which are
not required (OM and/or OP) are marked
unwanted.
IGN pseudo-code items and JMP triples
are removed. The amount of temporary working space required by each block of prograrr
is calculated and placed in the workspace
dictionary entry (see Appendix C.7).
The format of the text is converted so
that a pseudo-code item does not span
blocks.
The INCLUDE card matrix is formed for
all the conversion modules required.

All other assignment triples are translated into the CONV pseudo-code macro.
If the source operand is a constant, the
type of the target operand is inserted in
the constant dictionary entry, for processing by the constant conversion phase, and
the assignment is translated assuming the
target type.
MULTIPLE ASSIGNMENT triples produce the
same-Code as~or-sIngle assignment, except
that the registers used by the operand
concerned must not be changed or dropped.
Library calling sequences are generated
for ALLOCAT~L-ig~!L_~UYL-~~3_SE~~ triples,
and pseudo-code markers are left in the
text for insertion of code by Phase QF.
with §PECI~L AS§1§~~~~1 triples, if the
target is a varying or adjustable string,
storage is obtained if the target is AUTOMATIC, or allocated if the target is CONTROLLED.
The assignment is then translated.

Phase OG converts to pseudo-code all
statement numbers, statement labels, PROCEDURE, BEGIN, PROCEDURE', BEGIN', and endof-program triples.
The
CONVERT
pseudo-code
macro
is
examined in conjunction with the OPTIMIZATION parameter and pseudo-code is generated
in one of three forms:
1.

Code to
package

2.

Code
to
"in-line"

3.

56

call

Phase OM is called when either optimization levels 00 or 01 are specified.
This
phase scans the pseudo-code for the CNVC
macros, which phase OG has placed into the
text as 28-byte entries containing a transfer vector to select the appropriate conversion routine within OM, and replaces any
such macros with in-line code.
The conversions inserted by phase OM are
controlled by phase OG. When OPT=O, certain of the simpler FIXED DEC to PICTURE,
PICTURE to FIXED DEC, and FIXED DEC to
FIXED BIN conversions are passed to OM.
When OPT=l, the remainder of the feasible
FIXED DEC to or from PICTURE and FIXED DEC
to FIXED BIN conversions are passed to OM
together with FIXED DEC to CHAR conversions.
certain FIXED DEC to PICTURE conversions, which phase OG cannot itself efficiently detect to be uneconorric when performed in-line, are recognized by phase OM,
which inserts the calls to the appropriate
Library routines.

IPhase
OP
-----I
Phase OP generates in-line code to perIform BINARY to BIT string, BIT string to
IBINARY, and FLOAT to FIXED BINARY converIsions.

the Library conversion

perform

the

conversion

A modified CONV macro which is passed
to phase OM or OF for processing.

Phase as scans through the constant
chain in the dictionary and converts the
constants to the required internal form.
These are then stored in a constants pool,

and the offset of each constant from the
start of the pool is saved in the dictionary entry for that constant.
To permit the correct alignment of the
constant pool, three scans are made of the
constant chain: first to convert all double
word constants, secondly to convert all
single word constants, and thirdly to convert all unaligned constants.
In the first two scans only one pool
entry is made for constants having the same
internal form and value.
A fourth scan is made of the constant
chain and all constants required to initialize static are converted, but instead
of inserting these constants in the constant pool, they are moved into special
dictionary entries constructed by Phase LB.

The purpose of the Storage Allocation
Phase is to ensure that every item requiring
storage in a PL/I object program
obtains a unique location of the correct
size, located on the correct boundary.
Items requiring storage include PL/I source
program variables, dope vectors, dope vector skeletons, temporary variables, work
areas, data descriptors, symbol tables,
addressing slots, register save areas, flag
areas, etc. storage locations are allocated to items in order of descending alignment requirement to avoid wasting storage
by padding to the required alignment.
The Storage Allocation Phase is also
responsible for generating prologues.
In
generating the prologues, expressions which
determine size of variables, code generated
by the aggregates phase to initialize dope
vectors, and code generated by the initial
values phase, must be extracted and placed
in the correct sequence in the text. Also,
when a variable depends for its size or
initial value upon another variable, the
requests
for
dynamic storage must be
arranged so that the dependant variable
obtains its storage after the variables
upon which it depends.
Since all AUTOMATIC and CONTROLLED storage is obtained dynamically at object time,
the Storage Allocation Phase generates code
to relocate dope vectors when the allocated
storage address is known.

I
The purpose of phase PA is to deterrrine
Ithe eligibility of the automatic chains of
lany block for STATIC DSAs. Any chain not
Iso far found to be ineligible for a STATIC
IDSA is scanned to determine the DSA size.
ISTATIC DSAs are generated for any chains of
Iless than 512 bytes.
I
Dictionary entries are generated for
ISTATIC DSAs. This phase also acts as a
Ispill area for routines used in phases PD
land PH.

Phase PD is the first STATIC storage
allocation phase.
It scans the text, and
for every second file statement encountered
sets up a pointer in the associated dictionary which points to the second file
statement.
It then sorts the STATIC chain
so that the dictionary entries occur in the
order in which the storage for their items
will be allocated.
Storage is allocated for simple nonstructured, non-external variables, RDVs,
DEDs, SAVE/RESTORE entries, and the BCD of
entry labels and label constants. Storage
is also allocated for dope vectors for all
items in the STATIC chain requiring them,
twith the exception of EXTERNAL items.
A
tfull word address slot is allocated in
ISTATIC for each STATIC DSA.
The
external section of the sorted
STATIC
chain is scanned and a 4-byte
addressing slot is allocated for each entry
label, label constant, external (entry type
4) entry, built-in function, or EXTERNAL
item.
For each EXTERNAL ite~ the size of
the external control section is calculated
and stored in the dictionary entry.
The constants chain is scanned and the
offsets of the storage and dope vectors for
constants in the constants pool are relocated.
The current size of the STATIC INTERNAL
control section is computed and the result
is passed via the comrrunications region to
the next phase.

Phase PH is the second STATIC storage
allocation phase.
It scans the AUTOMATIC
chain and CONTROLLED chain for all items
requiring a dope vector.

Section 2 (Compiler Phases):

storage Allocation Logical Phase

57

For each such item a skeleton dope
vector dictionary entry is generated in the
STATIC chain (see Appendix C.7).
This
dictionary entry contains a bit pattern
equal in length to that of the dope vector
and containing all those values which are
known at compilation time. In particular,
it contains as much of the relative virtual
origin as is known at compilation time, the
constant bounds and string lengths, and the
constant multipliers.
Skeleton dope vectors are not put into
the STATIC chain for AUTOMATIC variables in
any biock whose DSA is in STATrc, except
when the variable dimensions bit is set to
one.
If the item is dynamically DEFINED, then
the dope vector is preceded by one extra
four-byte slot.
(In the case of structures
there is one extra slot for each element of
the structure.)
If the item is a dynamic
temporary (temporary type 2) or a CONTROLLED scalar string, the virtual origin
slot is relocated by the length of the dope
vector.
In all cases the skeleton dope vector
dictionary entry is pointed at by the
dictionary entry of the associated item.
The sorted STATIC chain is scanned from
the first skeleton argument list entry.
For each such entry, space is allocated in
the STATIC INTERNAL control section according to the assembled length of the argument
list. The offset of each skeleton argument
list is stored in the OFFSETl slot of the
dictionary entry.
RDV and DVD entries are found on this
same scan of the STATIC chain. RDV entries
are allocated eight bytes; DVD entries are
allocated the specified length.
A scan is made of the section of the
STATIC chain containing STATIC INTERNAL
arrays.
Storage is allocated for each
array according to its size (computed by
Phase JK) and the offset of the relative
virtual origin is relocated to the start of
the STATIC INTERNAL control section. If
the array is of the VARYING type and it
needs a dope vector, then storage is allocated for the secondary dope vector.
The
number of elements is calculated for INITIAL arrays and stored in the associated
INITIAL dictionary entry.
The section of the STATIC chain containing STATIC INTERNAL structures is scanned.
storage is allocated for each structure
according to the size of the structure
(computed by Phase JK), and this storage is
placed on the correct boundary on information supplied by Phase JK. The structure
member chain for each structure is scanned
58

and the relative offset of each member is
relocated to the start of the STATIC INTERNAL
control section.
Further, on the
structure member scan, secondary dope vectors are allocated when required, and the
number of elements is calculated for INITIAL arrays.

Phase PL
Phase PL scans the STATIC, AUTOMATIC,
CONTROLLED, structure, and PROCEDURE block
chains for variables which require storage
for their symbol tables and/or data element
descriptors.
When a variable is found which requires
a symbol table, the variable is joined onto
the chain of symbol variables for the
particular block. A symbol table dictionary entry is created for the variable (see
Appendix C.?), and a chain is set up to and
from the dictionary entry for the variable.
The new dictionary entry i~ joined onto the
STATIC chain.
The size of the symbol table is calculated, and its offset from the start of the
STATIC control section is stored in the~
symbol table dictionary entry. Throughout
the allocation of STATIC storage a location
counter is maintained to contain the next
free location in STATIC; this counter is:
increased appropriately.
All symbol variables require a DED and a
branch is taken to the routine which allocates them.
When a variable is found which requires
a DED, it is determined whether or not the
DED descr~bes a standard type; there are
eight standard types, which consist of the
different kinds of real coded arithmetic
data that can be obtained by the combination
of
the
attributes
FIXED/FLOAT,
BINARY/DECIMAL, LONG/SHORT (default preci-sions only).
If the DED is of a standard type, a
check is made for an identical DED that may
have already been encountered, so that
there will be only one allocation of storage for anyone type of standard DED. If
the DED is not of a standard type, it is
allocated storage of its own.
If the variable does not already have a
symbol table dictionary entry (which contains space for DED information), a OED
dictionary entry is constructedi and thE~
offset of the DED in the S~ATIC control
section is stored in it. A pointer in the
new entry in the dictionary entry for the
variable is also set up.

When all data element descriptors and
symbol tables in the compilation have been
processed, all STATIC storage has been
allocated and the total size of the STATIC
control section is placed in a slot in the
communications region.

I
Two words are allowed for tasking inforImation in the DSA if the TASK option is on
Ithe external PROCEDURE of the compilation.
The AUTOMATIC chain is scanned and dope
vectors are allocated for the items requiring them. Code is compiled to copy the
skeleton dope vector, and to relocate the
address in the dope vector.

I
Phase PP extracts all ON
condition
entries and places them at the head of the
AUTOMATIC chain.
It then extracts all
temporary variable dictionary entries from
the AUTOMATIC chain and places them in the
zone following the ON conditions in the
chain.
All dictionary entries which are totally
independent
of any other variable are
extracted, and also placed in the zone
following the ON conditions.
The phase then extracts all dictionary
entries which depend upon some other variable in containing blocks or in the zones
already extracted, and places them in the
next following zone.
Dependency includes
expressions for string lengths, expressions
for array bounds, expressions for INITIAL
iteration factors, and defined dependencies.
This is repeated recursively until
the end of the chain.
If some variable
depends upon itself, a warning message is
issued.
A
special zone delimiter dictionary
entry is inserted between each zone in the
AUTOMATIC chain (see Appendix C.7). A code
byte is initialized in the delimiter to
indicate to Phases PT and QF whether its
following zone contains any variables which
require storage (i.e., it does not consist
entirely of DEFINED items, which do not
require storage), and whether or not the
following zone contains any arrays of VARYING strings.

Phase PT allocates AUTOMATIC storage,
scans the CONTROLLED chain, and determines
the size of the largest dope vector.
It
scans the entry type 1 chain, and for each
PROCEDURE block or BEGIN block it allocates
storage for a DSA and compiles code to
initialize the DSA.
A two-word slot in the DSA is allocated
for each ON condition in the block, and
code is compiled to initialize the slot.
Space for the addressing vector and workspace in the DSA is also allocated.

Where there is a block with its DSA in
ISTATIC, dope vector initialization is not
Iperformed for the variables in the first
Iregion of the AUTOMATIC chain. Address
Islots in dope vectors for variables in the
Iremainder of the chain are relecated.
storage is allocated for addressing temporaries type 2 and for addressing controlled variables, and for the parameters
chained to the entry type 1.
The first region of the AU~OMATIC chain
is scanned and storage allocated for double
precision variables, single precision variables, CHARACTER strings, and EIT strings,
in that order.
The first region of the AU~OMATIC chain
is
scanned
and storaqe allocated for
arrays, relocating the virtual origin. For
arrays of strings with the VARYING attribute, the secondary dope vector is also
allocated and code is corrpiled to initialize the secondary dope vector. correctly
aligned storage is allocated for structures.
If a structure contains any arrays
of strings with the VARYING attribute,
the
storage for the secondary depe vector is
allocated at the end of the structure.
A pointer is set up in the AUTOMATIC
chain delimiter to the second file statement which has been created.
The remaining regions of the AUTOMATIC
chain are scanned and code is compiled to
obtain a Variable Data Area (VDA) for each
region.
code is compiled to copy the
skeletons into the dope vectors and to
relocate the addresses in the dope vectors.
During this pass, any DEFINED items which
are to be addressed directly have the
storage offset and the storage class copied
from the data item specified as the base
identifier.

Phase QF, which constructs prologues,
scans that text which is in pseudo-code
form at this time with end-of-text block
markers inserted.

Section 2 (Compiler Phases):

Storage Allocation Logical Phase

59

When a statement label pseudo-code item
is found, it is analyzed and one of three
things happens:
1.

The item is saved if it relates to a
PROCEDURE statement

2.

The item is omitted if it relates to a
BEGIN or ON block

3.

The item is passed if it relates to
neither of the first two conditions

when a BEGIN statement is found,
a
standard prologue of simple form is generated, and code is inserted from second file
statements (if there are any) to get the
DSA, either dynamically, or in the case of
eligible bottom-level blocks, by using the
supplementary LWS made available at initialization time. code is also inserted to
initialize the DSA and to allocate and
initialize any VDAs.
it
When a PROCEDURE staterr,ent is found,
is first determined whether it heads an ON
block or a PROCEDURE block. If it is an ON
block, a standard prologue (similar to that
for a BEGIN block) is generated. If it is
a PROCEDURE block, a specialized prologue
is generated. This takes account of the
manner of getting the DSA, the number of
entry pOints, the number of entry labels on
a given entry point, the number of parameters on each entry point, and whether the
PROCEDURE is a function.
Prologue code is generated for AUTOMATIC
scalar TASK, EVENT or AREA variables, in
order
to
perform
the
initialization
required when these variables are allocated.
The code generated by the prologue construction phase is partly in pseudo-code
and partly in machine code. The machine
code (which is delimited cy special pseudocode items) has the same form as the code
produced by the Register Allocation Phase
(see Appendix D.7).
DSA
optimization is performed
certain conditions (see Afpendix H).

under

At the end of the prologue, the statement label item saved earlier is inserted
to mark the apparent entry point. Code is
produced to effect linkage to BEGIN blocks
in such a way that general register 15
contains the address of the entry point,
and
general
register 14 contains the
address of the byte beyond the BEGIN epilogue.
At the end of the text, any text blocks
that are not needed are freed, and control
is passed to the next phase.
60

Phase QJ scans the text
FREE, and BUY statements.

fer

ALLOCATE,

On finding an ALLOCATE statement, a
routine is called which does a 'look ahead'
for initialization statements associated
with the allocated variable, e.g., adjustable array bounds or adjustable
string
lengths, and places the text references of
each statement in the dictionary entry
associated with each statement.
If the allocated item has a dope vector,
code is generated to move the skeleton dope
vector generated by Phase PH into a block
of workspace in the DSA of the current
block.
Any adjustable bound expressions
or
string length expressions are then extracted from the text references, and
the
expressions are placed in-line in the text.
Any information required from previous
allocations (specified by * in the ALLOCATE
statement) is extracted from the previous
allocation, and copied into the workspace.
Code generated by Phase JK to initialize
multipliers, etc., is extracted and placed
in-line, after first loading the variable
storage accumulator with the dope vector
size. Phase JK generates code to incre~ent
the accumulator register by the size of the
item.
If the item has no adjustable pararreters, code is generated to increment the
accumulator by the size calculated at compilation time. If this size is greater
than 4,096, Phase JK generates a constant
dictionary entry, which is used in this
code.
If the item has any arrays of varying
strings, the size of the array string dope
vector is added to a second accumulator
register. Code is generated te add the two
accumulators into the second one, which is
a parameter to a Library routine. A routine is then called which extracts the
Library call inserted by ~seudo-code and
places it in-line in the text.
Code is inserted after the Library call
to initialize the dope vector in workspace
to point to the allocated sterage. Code is
generated to transfer the dope vector from
the workspace to the allocated storage.
Any initial value statements associated
with the ALLOCATE statement are extracted
and placed in-line.
The initialization
statements are then sk~fped, and the scan
continues.

The action on·encountering a BUY statement is similar to that for the ALLOCATE
statement, with the following exceptions:
1.

Bound and string length code is inline, bracketed between BUYS and BUY
statements - there is therefore no
look ahead

2.

There is no
initial
value
associated with temporaries

3.

A slot in the DSA is updated with the
pointer to the allocated storage for a
temporary

This phase comprises two physical phases, each with a specific function.
The
first,
Phase RA, processes the addressing
mechanisms, while the second [hase, Phase
RF, allocates the physical registers.

code

The action on encountering a FREE statement is to generate code to load a parameter register with the pointer to the allocated storage for the FREE VDA Library call
inserted by the pseudo-code.

Phase QX is the 'AGGREGATE LENGTH TABLE'
printing phase. It is entered only if the
ATR (attribute list) option is specified.
It scans the STATIC, AUTOMATIC, CONTROLLED
and COBOL chains, and, for each major
structure or non-structured array that is
found, an entry is printed in the AGGREGATE
length table.
An AGGREGATE LENGTH TABLE entry consists
of the source program DECLARE statement
number, the identifier and the length (in
bytes) of the aggregate.
In the case of an
aggregate with the CONTROLLED attrioute, no
entry is printed for the DECLARE statement,
but an entry is printed for each ALLOCATE
for the aggregate, the source program ALLOCATE statement number being printed in the
'statement number' column.
Where the aggregate length is not known
at compilation the word "adjustable" is
printed in the 'length in bytes' column.
In the case ~f a DEFINED aggregate, the
word
'DEFINED', and not the aggregate
length, appears in the 'length in bytes '
column.

Phase RA scans the text fer dictionary
references, the beginnings and ends of
PROCEDURE and BEGIN blocks, and the starting points of the original PL/I statements.
A dictionary reference, when found,
is
decoded into a word-aligned
dictionary
address and a code.
These are used to
determine what is being referenced.
The
corresponding object time address as an
offset and base is then calculated.
If the address required has an offset
less than 4,096 and a base which is either
an AUTOMATIC or S~ATIC data pointer, no
extra instructions are generated. If this
is not so, extra instructions are inserted
in the text stream to
calculate
the
required address. The calculation of this
address is broken down into logical steps
lin a 'step table 1 . ' On completion, the
table is scanned backwards to deter~ine
whether an intermediate result has been
previously calculated.
The steps which
have not been previously calculated are
then assembled into the pseudo-code.
The compiled code is added either to the
output stream or to a separate file.
The
code in the separate file is terminated by
a store instruction to save the calculated
address.
The extra "insertion file" is
placed in the prologue of the relevant
block by the next phase. Instructions are
stored in-line if the referenced item is
CONTROLLED, if it is a parameter, if fewer
instructions are required to recalculate
the base rather than load the
stored
address, or if the reference itself is in
the prologue.
If no addressing code is generated, a
special item is put in text to tell phase
RF what base to use.
All relevant information for PROCEDURE
and BEGIN blocks is stacked and unstacked
at the start and end of the blccks respectively.

The purpose of the Register Allocation
Phase is to insert into the text the
appropriate addressing mechanisms for all
types of storage, and to allocate physical
general registers where symbolic registers
are specified or required as base regi.sters.

At the start of PL/I statements, code is
compiled to keep the required PREFIX ON
slots in the Dynamic Storage Area updated.
On meeting the pseudo-code error marker,
the calling sequence to the Library error
package is generated, and the error marker
removed.

Section 2 (Compiler Phases):

Register Allocation Logical Phase

61

If the STMT option has been specified,
code is generated at the start of each PL/I
statement to keep the statement numoer slot
in the current DSA up to date.

Phase RF scans the text for register
occurrences, implicit and explicit, and the
start
and end of PROCEDURE and BEGIN
blocks. At the beginning of PROCEDURE and
BEGIN blocks all relevant information is
stacked, and is later unstacked at the
corresponding end.
Registers are classified
symbolic, or base.

as assigned,

The Final Assembly Phase converts the
pseudo-code output of the register allocation phase into machine code, the principal
functions being the substituticn of machine
operation codes for pseudo-code operations,
and the replacement of PL/I and compiler
inserted symbolic labels by cffset values.
Loader text is generated for prograw
instructions, DECLARE control blocks, and
OPEN file control blocks, initial values
defined in the source program, parameter
lists, skeleton
dope
vectors,
symbol
tables, etc. ESD and RLD cards are generated
for
external
names and pseudoregisters. An object listing of the code
generated by the compiler is produced if
the option has been specified by the source
programmer.

Assigned registers require the explicitly mentioned register to be used. If that
register is not free it is stored. Symbolic registers may occupy any register in the
range 1 through 8. An even-odd pair may be
requested. Base registers may occupy any
of registers 1 through 8.
When a register is requested, a table of
the contents of registers is scanned, to
determine whether the register already has
the required value.
If it does, that is
used.
If it does not, and it is not an
assigned register, a search is made for a
free register and this is allocated if one
is found.
Should no register be free, a
look-ahead is performed to determine which
register it is most profitable to free.
If a register contains a base it need
not be stored on freeing.
If a register
contains a symbolic or assigned register,
it may require to be stored when freed,
depending upon whether it has had its value
altered since any storage associated with
it was last referenced.
At a BALR (Branch and Link) instruction
it is insured that all the necessary parameter registers are in physical registers,
and not in storage.
.
No flow trace is carried out by the
compiler.
Therefore, the register status
is made zero at branch-in and branch-out
points.
An exception is at a conditional
branch. Here the registers are not freed
after having been saved.
Any coded addressing instructions are
expanded when found in-line. At a specific
"insertion
point"
in a prologue, any
addressing instructions in the "insertion
file" are brought in and expanded.
62

Phase TF scans the text, assigns offsets
to
compiler and statement labels, and
determines the code required for instructions which reference labels.
The size of each procedure is determined
and stored in the PROCEDURE entry type 1.
A location counter of machine instructions
is also maintained.

Phase TJ scans the text until no further
optimization can be achieved in the final
assembly.
A location counter is rraintained for
assembled code, and offsets are assigned to
labels.
The size of each procedure is determined
and stored in the PROCEDURE entry type 1.
The amount of code required for instructions to reference labels is also determined, while attempting to reduce this from
the amount estimated by the first asserrbly
pass.
This phase also attempts to reduce the
number
of
~ove
(MVC) instructions by
searching for consecutive MVC instructions
which refer to contiguous locations.

Phase TO sets the four byte slot ZPRNAM,
in the communication region, to contain the
first four characters of the first entry
label of the external procedure, for the
purpose of object deck serialization.
Phase TO also produces ESD cards for the
compiled program.
It first makes up six
standard entries for:
1.

Program Control section (CSECT)
(SD
type)
allowing roorr for the compiler
subroutines if these are present.

2.

STATIC internal CSECT (SD type)

3.

Invocation count (PR type)

4.

Entry
points to Library routines,
IHESADA and IHESADB (ER type)

5.

IHEQERR (PR)

6.

IHEQTIC (PR)

Module TQ is used to produce a list of
Library conversion routines required for
execution of the program. ER type entries
are made up for each name in the list.

Phase TT scans the text and maintains a
location counter for asserr.bled code.
Loader text (TXT) and relocation directory (RLD) cards for requested combinations
of load and punch files are generated.
Nested procedures are unnested at object
time by suitable manipulation of the location counter. The offset of each procedure
from the start of text is left in the
PROCEDURE entry type 1.
Compiler labels are numberEd for use by
the object listing phase, and trace information is set up at entry points. Phase TT
also generates the text for the compiler
I subroutines. These subroutines are put out
lin one of the following combinations:

If the external procedure has the MAIN
option, an entry for a one-word CSECT (SD
type) is made up. An entry is made for the
CSECT 1H entry and entries are made up for
all entry labels in the external procedure
(LD type).

1.

EPILOGUE subroutine
DYNAMIC PROLOGUE subroutine
STATIC PROLOGUE subroutine

2.

EPILOGUE subroutine
DYNAMIC PROLOGUE subroutine

The entry type 1 chain is scanned and an
entry (PR type) is made up for each block
and procedure.

3.

EPILOGUE subroutine
STATIC PROLOGUE subroutine

The external section of the STATIC chain
is scanned and entries are made up for:
1.

Built-in functions
tions (ER type)

and library func-

2.

Files (ER type)

3.

STATIC external variables (SD type)

4.

External entry names (ER type)

5.

Programmer
type)

ON

condition

names

Phase UA generates text for the static
internal CSECT;
initializes a CSECT for
each static external variable; and, optionally (if the LIST option is present), lists
all the text produced for the static internal CSECT and provides suitable comments.

(SD

The CONTROLLED chain is scanned and an
entry is made up for each CONTROLLED variable and task name (PR type).
The size of the program control section
is incremented to include the compiler
subroutines.
All STATIC DSAs are put into the STATIC
INTERNAL control section, their combined
sizes being allowed for when the size of
the CSECT is calculated.

The phase first scans to the start of
the external section of the STATIC chain,
generating text for entry labels,
label
constants, compiler labels, file attributes, label variable BCDs, and DEDs for
temporaries.
Simple variables found on
this scan are used,
together with the
labels, to mark the start of the character
string section of the chain.
The phase then scans to the end of the
external section of thE chain, initializing
address constants for external variables,
external entry names, built-in and Library
functions,
programmer-defined ON-condition
names, external files, and label constants.
Text is rr.ade up for the constants pool.

Section 2 (Compiler Phases):

Final Asserrbly Logical Phase

63

The third scan of the STATIC chain
starts at the point left by the previous
scan, and generates text for dope vector
skeletons, argument lists, RDVs and DVDs,
and symbol tables. The scan is terminated
at the end of the chain.
Phase UA makes up RLD cards for the
address slots for STATIC DSA's and for the
address slot of the start of the epilogue
subroutine, if generated.

The phase then executes its final scanu
which extends over the external section of
the chain, to initialize a CSECT for each
external variable or external file.
Finally, any incomplete text and RLD
cards are punched out, and an END card is
produced for the compiled program. If the
OBJNM parameter is present for batch cowpilation, phase UD punches a NAME card to
follow the END card.

Text cards are output to initialize all
AREA's, EVENT's, and TASK's.
Arrays of
AREA's, will have a text card for each
element.

Phase UD generates RLD and TXT cards to
set up dope vectors at link-edit and load
time.
TXT cards are generated for each STATIC
DSA, containing its length, which is found
in the STATIC DSA entry.
TXT and RLD cards are generated to set
up the dope vectors for structured items
and any non-structured items appearing in
the AUTOMATIC chains. The TXT cards are
derived from the skeleton dope
vector
entries.
The RLD cards are generated for
each virtual origin slot.
When the last STATIC DSA has been processed control is released from phase UD.

Phase UE initializes those items on the
STATIC chain not processed by Phase UA.
The phase first scans to the start of
the external section of the chain, making
up text for simple data, and listing label
variables.
The second scan starts at the head of
the character string section of the chain,
and initializes dope vectors for all static
internal variables which need them.
The third scan corresponds in extent to
the third scan in Phase UA, but generates
text for arrays, and simple and interleaved
structures.
At the end of this scan, a
test is made to determine whether the
external procedure of the program has the
MAIN option.
If so, a one-word CSECT
(IHEMAIN) is made up,
to contain
the
address of the principal entry point to the
compilation.
64

Phase UF scans the text, and lists, in
assembly language format, machine instructions compiled for the source program.
I~
inserts comments in th~ listing for statement
numbers,
statement labels, entry
points, prologues, and procedure bases.
Phase UF contains module UH which generates NAME from a dictionary reference.
UF
also lists the text for the compiler SUDroutine. This is done by releasing UB and
loading module UI which performs this function.
Upon termination of this
phase
module UI passes control to phase XA.

The Error Editor Phase is entered at the
end of all compilations. The first phase,
Phase XA, examines the dictionary and determines whether there are any messages to
be printed out. If there are none,
this
phase terminates the compilation. If there
are diagnostic messages to be printed out,
phase XB is loaded and the third section of
the phase directory is completed. Phase XC
is then loaded and this together with phase
XA causes further modules (XF, and blocks
XG to yy) to be loaded, which process the
error dictionary entries and print out the
appropriate messages.

Phase XA examines the heads of the error
chains in the first dictionary block, and
the prograrrmer options which specify the
severity level of messages required.
If
there are no diagnostic messages to be
printed, this phase prints out a completion
message and completes the compilation. If
diagnostic messages are required, the phase
loads module XB which completes the phase
directory for Compiler control. Phase XB
is then released and phase XC and the
message address block XF are loaded.

The error editor then scans down the
error message chains and marks each error
dictionary with an indication of where the
associated message is to be found.
This
information is obtained from a table in
module XF.
The text of all error messages is \ kept
in modules XG through YY. The messages are
ordered, by severity, within these modules.
Module XA will have listed those modules
which contain messages required for a particular compilation.
Module XC loads and
releases these modules, one at a time, and
extracts the required messages.
Having
loaded a particular module, the phase scans
down the associated error messAge chain in
the dictionary for error entries associated
with the module.
It accesses the error
message text and scans it.

The message to be printed is built up in
a print buffer in internal corrpiler code.
This involves a translation from EBCDIC
mode, which is used for the rressage text
skeleton.
The message is completed by the
insertion of a statement number, an identifier, or a numeric value as specified by
the message dictionary entry. The message
is segmented, where necessary, to avoid
spilling over a print line, translated to
external code, and finally printed out.
When all
error
message
dictionary
entries have been processed, module XB
returns control to phase XA, which passes
control to module AA for termination of the
compilation.

section 2 (Compiler Phases):

Error Editor Phase

65

SECTION 3: CHARTS AND ROUTINE DIRECTORIES

This section provides a complete guide
to the compiler logic, in the form of
flowcharts and associated tables and routine directories, arranged in phase order.
Flowcharts
The flowcharts are presented at three
levels of detail -- overall, logical phase,
and physical phase. The overall compiler
flowchart (Chart 00) points to the logical
phase flowcharts (Charts 01 through 09),
each of which appears at the head of the
set of physical phase flowcharts to which
it points.
The physical phase flowcharts
point (by means of identifiers placed next
to the blocks> to the various routines
used. Entry points to physical phases are
labeled.
Where transfer is
effected
between
modules within a physical phase, the entry
label into the entered module is shown as
follows:
1.

2.

Where the means of transfer is a transfer vector, an asterisk is shown as the
label on the flowchart, and a note at
the foot of the chart states that the
transfer vector table is located at the
start of the module.
When transfer is made from a decision
block, the block representing the entry
is labeled.

Tables and Routine Directories
For each physical phase, a table is
provided, which lists the operations performed and identifies the routines and
subroutines involved. Where applicable, a
routine directory follows the table.
This
provides an alphanumerically arranged list
of the routines and subroutines contained
in the phase, and states their function.
In some cases, a physical phase comprises more than one module; this means that
routines contained in different modules may
be listed together in one routine directory.
To assist in cross-reference to the
compiler listings, the fcllowing convention
has been adopted: if a routine is contained
in a module whose label is not identical to
that of the phase under discussion,
the
label of the containing module is inserted
in parentheses after the routine name in
the directory.
In the case of a phase sharing a routine
contained in another phase, the label of
the
containing module is indicated in
parentheses after the routine name in the
"Subroutines Used" column.
The routine
will not then appear in the routine directory for the phase under discussion, but
will be found in the routine directory for
the containing phase.

With the exception of "fall-through"
branches, all branches froIT. decision blocks
are labeled where possible.
Where the
branch is actually a branch table, this
fact is indicated on the chart, and the
label of the branch table is given.
In some cases, additional labels have
been given, to assist in following the
program flow.

66

Identification of tables
phase flowcharts is based
label.

and physical
on the phase

Jver3l1 compiler Flcwchart

Chart 00.

··..x

...... 111 •••••••• "'.

liZ
••
YES •••• ",URO ••••
:11 ............. OPTl ON ON ••• (I

:..•-.-.-...._...Z!:

·.
:

.

~~~:lh~EH~r

...
.....

~I...............

....

• NO

.. ·.. ..
x

II

•-

..

•:.

Cl

••

HAScA~p

*.

*.

..

.:.~~ •••

••
*••
• YES

··................
RETUR"

..

..

'

••

..

C~iRU .:.~?
*. *••• .*

.

• YES

••••Ol.!..••••••

•

..

• :.

CZ

.•.•.OZ···.·.···.
ic

••
:

EXECUlE
FORTY
e GHT

••
:

PR~~~~~~S~~R

•••••••••••••••••••

·

.

............ x.x ••••••• ,.•••

•••••EZ.! ••••••••
.-.-.-.-.-.-.-.-.

•
:

"2.

LOGr~tp-~~ASE

:

THE REAO-lN LOGICAL PHASE CHECKS THE SVNUX OF
THE SauRt PROGRAM" REHOVES SUPERFLUOUS
CHARACTER ANO LeAvES CER TA rN CHA INS IN TIiE
PROCESSED TeXT TO AI) LA'fER PHASI'S.

•••••••••••••••••••
THE OICTlONARY LOGICAL PHASE CO~STRUCTS TflE
Ot TlONARV OF IOF.NTrFIF.RS FRO'" INFORMATION IN
OE LARE STATI:"ENTS 'N,) FRnH CONtEl(T IT ALSO
REPLACES IICO 10ENTlFIERS IN THE TFX t flY REI'FRFNCES
TO THE DrCTlONARV.

GZ·..x ..

......Gt...........
PR NT 0rT
AT R
ANp ~aH ~

•
•

.......
,

RET~lIe~
~
~.....

••••
•
YES •• ATR/XREF ••
K••••••• "..
I)PTI ON ON ••
•
......" •

....

.

• NO

.

••••••••••••••••••••••••• x.
X

······1i1···.······
.-.-*-.-.-.-.-.-.
:

•

nlt*

•
•
..................
:P~~GI~~~Sh~X~;

·····Jz··········
.......-.-.- ..........
·..................
X

•
1'5·
•
TRANSLATOR
•
• UIGICAL PHAse •

THE PRE TRANSLATOR LnGICAL PflASF. MMHPtJLATFS THr::
THl, REARRA"IGING till STA'rEM"NTsI. t:i~EATI'IG TF.MPnRARY
VARIII~LFS WHE~E PAR~"ErErlS Iln NOT "'''Tefl TflFIR

~ORAElpnND'NG ARGUM;NT~~ CONVERTtNr; ARIlAV

r~~~E~~A!'~n~~~~F.N S

'''0

DO LOOPS, "NO ReMOvl"lr,

THF TltA"ISLATOR LOGICAL PHASF CIJt.!VF.RTS THE

PlIt SOulteE TF.'('1( IS A'IV •

:O~iar ~~S ~~V-:

•••• , K. E5 •
•
•
•

• •••• G2 ••••••••••
•
EKECUTE·
•
IEMAG T O .

•

.'•••• F4··········

......

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

*..*
•

1'2 ..........:

• ••••

•••• WAS
•••• YES
:
••
PHA SE
0 • • • • • • • • • X.
••
IEM8X
••
•

•
•
•
•
•

x

J4 •••••••••".
•
•
RELEASF AK
•
•

X

.. •••• JS ••••••• "' ••
• r.LOS( SVSUTl
..
• ~CAN BATrH
•
DFLtMITFR
•
• RECORD FnR
•
• SYNTAX ERRORS.

.... ·..... .>l>.................1(.........•....•.....••..•.
......... ·.....

*0"·
•

~

VFS

x

....

•

H4 •

'" H3 •

X

•
•
•

...·.K4 •••••••• •
II. 1'= TUR'I
•
TO CA.LL ING
•
PROGRAM
•
1)1 • • •

** •• ** •••••

section 3:

Ch~rts

an~

Routine Directories

69

Table AA.

Module AA Compiler Control Resident Control Phase

r-----------------------------------------------T---------------T-------------'----------,
IMain Processingl
I

~

I
statement or Operation Type
I
Routine
I
Routine Called
I
r-----------------------------------------------t---------------t-----------------------~
IInitializes the compiler
IZINIT
I LOADW, ABOR~
I

I

I

I

I

I

I

I

I

~

~

IPara~~ters ~§§~Q:

General register i points atl
I
I
Ithe passed parameters
I
I
I
IEntEy-to OS/36Q: GETMAIN(R), TIME, LINK, SPIE
I
I
I
r-----------------------------------------------t---------------t-----------------------~
IDeletes a list of loaded phases
IRELESE
IZUERR, ABOR~
I
I
I
I
I
IPara~~ters ~ssed: PARi -- address of list of
I
I
I
Iphases to be deleted
I
I
I
IEntry_ to OS~1.£Q: DELETE
I
I
I
r-----------------------------------------------t---------------t-----------------------~
Deletes a list of loaded phases and passes
RLSCTL
Module AD if interI
control to either the next requested phase or
phase dumping is reqI
the next named phase
uired; Module AE if it I
is end of Read-In
I
Parameters ~~~~Q: PARi -- address of list of
Phase; ZUERR, ABORT
I
phases to be deleted; PAR2 -- address of name
I
of phase to which control is to be given, or
I
zero
I
Parameters returned: PARi -- load point of new
I
phase-------------I
Entry_to OS/36Q: DELETE, LOAD{EPLOC), LOAD(DE),
I
LINK
I
r-----------------------------------------------t---------------t-----------------------~
ILoads the required phase and returns control tolLOADX
IZUERR, ABOR~
I
Ithe caller.
The phase may be loaded again
I
I
I
IParameters passed: PARi -- address of name of
I
I
I
Iphase to be loaded
I
I
I
IParameters returned: PARi -- load point of
I
I
I
I phase
I
I
I
I EntrY-!2- 0S / 3 £Q: LOAD (DE)
I
I
I
r-----------------------------------------------t---------------t-----------------------~
IMarks phases as 'wanted' and 'not wanted'
IREQEST
IZUERR, ABOR~
I
I
I
I
I
IParameters passeQ: PARi -- address of
I
I
I
Ilist of phase names to be marked 'wanted;'
I
I
I
I
I
I
IPAR2 -- address of list of phase names to be
Imarked 'not wanted'
I
I
I
IEn~!Q OS/3£Q: None
I
I
I
r-----------------------------------------------t---------------t-----------------------~
IPuts a record out to SYSLIN
IZULF
ILFERRX
I
I
I
I
I
IParameters pass~Q: PARi -- address of output
I
I
I
I record
I
I
I
IEntry_!o OS/360: PUT LOCATE{QSAM)
I
I
I
r-----------------------------------------------t---------------t-----------------------~
Iputs a record out to SYSPUNCH
IZUSP
ISPERRX
I
I
I
I
I
IPara~~ters ~~§~Q: PARi -- address of output
I
I
I
I record
I
I
I
PUT LOCATE{QSAM)
I _______________ I _______________________ j I
lIEn~EY_!Q_OS~3(.Q:
_______________________________________________

70

Table AA.

Module AA Compiler Control Resident Control Phase (cont'd)

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

IMain Processingl
I
Routine
IRoutine Called

statement or Operation Type

I
I

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

IDeletes currently loaded phases and passes
Icontrol to the Error Editor

IZABORT, ABORT
I

IModule AD if dump opI
Ition specified; RLSC~L I

I

I

I
I

IEntry_!o OS/3&Q: LOAD (EPLOC) if dump option
I specif ied

I
I

I

I
I

I

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

IPicks up completion code and returns control tolZEND
Ithe program that called cOIT.piler
I

IZUPL
I

I
I

I
I

I
I

I
I

I En!£Y_!2..J2§{l&Q: TIME,

I~REEMAIN,

I
I

DELETE

I

I

I

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

I Handles all program checks
I
I Par9:~~te!:~J2~~~~Q: ARIN'1~ holds address of
jroutine wanting to handle interrupt. ARMASK
Iholds mask indicating which interrupts it is
Idesired to handle

I PIH
I
I

I ZUERR
I
I
I

I

I
I
I
I
I
I

I
I
I
I
I
I
I
I
I En!:!:y_to_OS{l&Q=
None
I _______________ I _______________________ JI
L
_______________________________________________
~

Table AA1.

~

Module AA Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

Function

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

ABORT

BLKERR
CONSLD

IDeletes currently loaded phases, passes control to error editor.

I

I

I

IEnters message "REFERENCED BLOCK NOT IN USE", then terminates compi-I
Ilation.
I

I

I

Takes: dictionary reference and points at relevant slot in dictionary I
control block area (DSLOTS).
I

I

CONSLT

Takes text reference and points at relevant slot in text block con- I
trol area (TSLOTS).
I

lDFREE

Finds dictionary block which can be written on disk to make room for
a new block in storage.

I.FERRX

Marks error on SYSLIN data set.

I.OADX

Loads required phase and returns control to caller.
be loaded again.

I.OADW

Loads required phase and returns control to caller.

PIH

Handles all program checks.

PLERRX

Prints record on SYSPRINT data set.
performed automatically.

HDERRX

Marks error on SYSIN data set.

READX

Reads a block from disk.

I

RELESE
HEQEST
RLSCTL
L __________________

I

The phase may

Pagination (paging action) is

,

Releases all loaded phases.

IMarks phases as 'wanted' or 'not wanted.'

I

IReleases all loaded phases and passes control to next required or
Inamed
phase.
__________________________________
_________________________________ _

~

section 3: Charts and Routine Directories

71

Table AA1.

Module AA Routine/Subroutine Directory (cont'd)

r------------------T---------------------------------------------------------------------1

tRoutine/Subroutinel

Function

I

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

SPERRX

Marks error on SYSPUNCH data set.

ZABORT

Deletes currently loaded phases and passes control to error editor.

ZEND

Picks up the completion code for the compilation and returns control
to ZINT to continue the batch, or to the operating systerr at the end
of a single or batch compilation.

ZINIT

Initializes the compiler.

ZULF

Puts record out to SYSLIN data set.

lIZUSP
__________________

72

~

Puts record on to SYSPUNCH data set.
__________________________________
__________________________________ _

.Table AB.
Module AB Compiler Control Initialization
r-----------------------------------------------T---------------T-----------------------,
I
IMain Processing,
I
Statement or Oferation Type
I
Routine
,
Routine Called
,
I
~-----------------------------------------------t---------------t-----------------------~
'Issues a BLDL macro instruction on all phases
IPROPEN
INone
I
lin compiler, and constructs a compacted fhase
I
I
I
I dictionary
I
I
I

,
I

I
I

I
I

,
I

I

I

I

I

I Ent!j~_!2_Q§'~.}~Q: BLDL
I
I
I
~-----------------------------------------------t---------------t-----------------------~
IPrints initial heading and performs scan of
10PTPROC
INone
I
loption list.
Default options are taken where
I
I
I
I necessary
I
I
I
I
I
I
I
I Par~me!:.§!:§_12~§§.~.9: General register 1 points to I
I
I
loption list passed at invocation time
I
I
I
I En!:!:Y_!:2_Q§./3&Q: TIME, PU~ LOCATE (QSAM)
I
I
I
~·-----------------------------------------------t---------------t-----------------------~
IMakes the initial space allocation for text andlOPENR
INone
I
Idictionary blocks.
Sets up communication
I
I
I
I
I
I
I region
I
I
I
I
I
I
I
I En!!:Y_!2_ OS{l&Q: GETMAIN (R)
~-----------------------------------------------t---------------t-----------------------~

10pens spill file if text and dictionary blocks 10PENSP
I
I are lK

INone
I

I
I

I

I

I

I

IEn!:!:Y_!:2 OS/3&Q: OPEN
I
I
I
~------------------------------------------------t---------------t-----------------------~
10btains the guaranteed 4K of scratch storage
IGETSCR
INone
I

I

I

I

I

I En!!:Y_!:2-2§./3&Q: GETMAIN (R)

I

I

I

~-----------------------------------------------t---------------t-----------~-----------~

ILoads intermediate file writer (Module AC).
I NODUMP
IZUPL (AA)
I
ISets buffer sizes for SYSUT3 and opens the datal
I
I
I
I
I
I set
I
I
I
I
I En!!:Y_!:2_Q§./3&Q: LOAD(EPLOC), OPEN
I
I
I
~-~---------------------------------------------t---------------t-----------------------~
IPrints out list of options for this compilationlNDMP
IZUPL (AA)
I
I
I
I
I
IEn!!:Y_!2 OS/3&Q: None
I
I
I
~-----------------------------------------------t---------------t-----------------------~
IEnters error messages generated when SYSIN,
IPJ13
IZUERR (AA)
I
ISYSPRINT opened
I
t
I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

None
I
I
I
~--------·---------------------------------------t---------------t-----------------------~
IReads first card and stores. Uses as heading
IRDCD
IZURD, ZUERR, ZUPL
I
I if required
I
I (all in AA)
I
~--------------------------------------------·---t---------------t-----------------------~
IEn!!:Y~2-Q§.{l&Q:

IReturn to pre-initializer in IEMAA
I ABOUT
INone
I
~--------·---------------------------------------t---------------t-----------------------~
10pens SYSPUNCH if MACDCK specified
IMCD
IZUERR
I

I ,
I.Ent!:Y_!:2-OS{l&Q: OPEN

~-----------------------------------------------t----- ----------t-----------------------f

ILoads dictionary handling control routines
I (phase IEMAN or IEMAL depending on normal dicItionary or extended dictionary being specified
I in the options)

I

I LODCNTL
I
I

I
I

INone
I
I
I

I
I

I

I

I
I

IL En
!:!:Y_!2.-2.§{1&Q : LOAD
I _______________ I _______________________ JI
_______________________________________________
~

~

Section 3: Charts and Routine Directories

73

Table AB1.

Module AB Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
ABOUT
Returns control to pre-initializer in Module AA.
I

I

GETSCR

Obtains scratch storage.

NDMP

Prints lists of options for current compilation.

NODUMP

Loads intermediate file writer module AC.
SYSUT3 and opens data set.

OPENR

Makes initial space allocation for tExt and dictionary blocks.
up communications region.

OPENSP

Opens spill file.

OPTPROC

Prints initial heading and performs scan of opticn list.

PJ13

Enters diagnostic messages generated when SYSIN and SYSPRINT data
sets are opened.

PROPEN

sets tuffer sizes for
Sets

IIssues BLDL macro instruction and constructs phase directcry.

I

RDCD
first card.
L __________________
LIReads
____________________________________________________________________
J

Table AC.

Module AC Compiler Control Intermediate File Control

r-----------------------------------------------T---------------T-----------------------,
I
IMain Processingl
I
I

Statement or Operation Type

I

Routine

I

Routine Called

I

~-----------------------------------------------+---------------+-----------------------~

IWrites a record onto SYSUT3

IIEMAC

INone

I

I

I

I
I
I

I

I

I

IPa~~~~ters ~~~~9:

PARi -- address of output
Irecord; PAR2 -- length of record
I En!~Y_!2_.2§/3~Q: PUT LOCA'I'E (QSAM)

I
I
I

I
I

~-----------------------------------------------+---------------+-----------------------~

ILink to file switching routine (Module AG)

I ENDED

I

I

INone

I

I
I
IEn!~Y_!2_.2§/3~Q:
LINK
L
_______________________________________________
LI _______________ LI _______________________ JI

Table AD.

Module AD Compiler Control Interphase Dumping

r-----------------------------------------------T---------------T-----------------------,
I
IMain Processingl
I
I

Statement or Operation Type

I

Routine

I

Routine Used

I

~-----------------------------------------------+---------------+-----------------------~

IDebugging aids.
This routine contains a dump- IIEMAD
IZDRFAB, ZTX'IAB, ZUPL
I
ling program which is invoked by use of the DUMP I
I (all in AA),
I
ILoption
_______________________________________________ LI _______________ jDUMP
_______________________ JI
~

Table AD1.

Module AD Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

~------------------+--------------------------------------------------------------------~
I DUMP
IConverts contents of specified area of main storage to hexadecimal, I
I __________________ I prints
the result.
L
____________________________________________________________________
JI
~

74

Table AE.

Module AE Compiler Control Clean-Up Phase

r-----------------------------------------------T---------------T-----------------------,
I
IMain Processingl
I
I

I

Statement or Operation Type

Routine

I

Routine Called

I

~-----------------------------------------------+---------------+-----------------------~

IInput and intermediate file control. Current
linput file is closed and IEMAC is deleted if
I present

IIEMAC

I (Module AC)

INone
I

I
I
I
I
I

I
I
I
I
I En!EY_!2_0S{1.§.Q: CLOSE(current input file),
I
I
I DELETE
I
I
I
~-----------------------------------------------+---------------+-----------------------~
IOpens SYSLIN and SYSPUNCH data sets if requiredlNOT48
IZUERR (AA)
I

I

I

I

I

I

I

I

I EntEY_!2_Q§{1.§.Q: OPEN
I
I
I
~-----------------------------------------------+---------------+-----------------------~
IExpands the number of blocks in storage to fourjNOTDCK
INone
I
Itext and four dictionary, if running with the
I
I
I
144k size option
I
I
I

I

GETMAIN
lIEntEY_!2--2§{1~Q:
_______________________________________________
Table AE1.

I

I _______________ I _______________________ JI

~

~

Module AE Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

~------------------+--------------------------------------------------------------------~
INOT48
IOpens SYSLIN and SYSPUNCH data sets as required.
I

I

lINOTDCK
__________________

Table AF.

I

I

IExpands
number of blocks in storage.
____________________________________________________________________
JI

~

Module AF Compiler Control Sysgen Options

r----------------------------------------------------------T----------------------------,
I
Function
I
Subroutines
I

~----------------------------------------------------------+----------------------------~

IThis module contains no executable instructions.
It is
INone
I
Igenerated at SYSGEN time and passes the default options
I
I
land
values to the compiler
I ____________________________ JI
L
__________________________________________________________
~

Table AG.

Module AG Compiler Control Intermediate File switching

r----------------------------------------------------------T----------------------------,
I
Function
I
Subroutines
j
~----------------------------------------------------------+----------------------------~

jSwitches SYSUT3 from an output file to an input file

INone

I

I

I

I

I ___________________________________________________________
Ent!:i~§_·to_OS{l'§'Q: OPEN and CLOSE
I ____________________________ JI
L
~

Table AK. Module AK Compiler Control Closing Phase

r--------------------------------------------·--------------T----------------------------,
I
Function
I
Subrout ines
I

~--------------------------------------------.--------------+----------------------------~
ICloses files, frees scratch core and deletes unwanted
IZURC(AA)
I
Iphases
I
I

I

I

IIf batch compiling, scans batch delimiter card for correctl
Isyntax and updates completion code.
I

I

I§ntri~~to

Q§{l'§'Q: TIME" CLOSE, FREEPOOL, DELETE, and

I

I
I
I
I

I
I
IFREEMAIN
L __________________________________________________________ I ____________________________ JI
~

Section 3: Charts and Routine Directories

75

• Table AL/AN. Modules AL/AN Extended Dictionary/Dictionary Phases

I

r-----------------------------------------------T---------------T-----------------------,
,Main Processing,
Routine Called
I

II

~-----------------------------------------------+---------------+-----------------------1

, ,
I I

statement or Operation Type

'Releases scratch storage allocated by ZUGC

I

I

Routine

IZURC

,

I

I

IZUERR, ABORT

I '

I
I

' I

I
I
,

I E~ra~~ter~_~~~se9: PARi -- a count of t h e "
I number of entries to ZUGC to be r e l e a s e d "
I
I
I
I
I §nt~Y_~2_2§{1~Q: FREEMAIN if storage being
I replaced is outside the guaranteed 4k block
I
I
,
~-----------------------------------------------+---------------+-----------------------~
IInserts diagnostic message in the dictionary
IZUERR
IZDRFAE, ZDICRF, ZDICAB I

,

,
,
I
I
,

R~~~~~~~rs_E~~~~9:

PARS -- numeric parameter ,
(if any); PAR6 -- message number; PAR7 -- add-,
ress of text (if any) or dictionary reference I
(if any); PAR8 -- length of text (if a n y ) '
§~~~Y_t2_2§{1~Q: None
"

,

I

I
I

I
,
,

~-----------------------------------------------+---------------+----~------------------~

,Takes a dictionary reference and points at the ,CONSLD
Irelevant slot in the dictionary block control
I
larea (DSLOTS)
"

INone
I

,
I
,

I

I

I

I

I R~~~~~~~~~_E~~~~9: PARi -- dictionary r e f - ,
'
I erence
, E~~~~~t~~~_~~t~~~~9: Address of slot in GRA
,
, Ent~y_~2_2S/1~Q: None
"

I
I
,

I
'
,
,

~-----------------------------------------------+---------------+-----------------------~

ITakes a text reference and points at the rele- ICONSLT
I
,vant slot in the text block control area
I
I
, (TSLOTS)
' "
,

I
I

I "

I R~~~~~~~~~-2~~~~9: PARi -- text reference"
I
, R~~~~~~~~~_E~~~ED~9: Address of slot in GRA
I
I
I
I '
I
, §~~~y_~2_QS/l~Q: None
~-----------------------------------------------+---------------+------------------------~
IAllocates space for a text block
'TRYMRT
,DFREE, TFREE, ZUPL,
I
I
I
IAEORT
I
,
,
,
I PaE~~~~ers_~~~~9: Relative track address of
I
,
, the block (if block is on disk) in RDTTR.'
, Otherwise RDTTR is zero
,
,
,
,
,
,
, Parameters returned: Address of block in GRO
, :g!it!:Y=i2=Qs/I~Q:GETMAIN(VC) if s t o r a g e "
,
'available.
OPEN if no space left for text
"
I
, blocks
' I
I
~-----------------------------------------------+---------------+-----------------------~

IAllocates space for a dictionary block
'TRYMRD
IDFREE, TFREE, ZUPL,
I
IABORT
I
, R~E~~~~~rs_E~sse9: Relative -track addr:ess of ' I
, block (if block is on disk) in RDTTR.
Other-,
,
I wise RDTTR is zero
I Parameters returned: Address of block in GRO ' I
I :g~try-t2=Q§~1&Q:-GETMAIN(VC) if storage
I
I
Open if no space left for diction-I
I
I available.
I ary blocks
I
I

I'

,
,
I
I
I
I
I
,

,

~-----------------------------------------------+---------------+-----------------------~

IInvestigates the dictionary block control used IDFREE
I (DSLOTS), to find which block can be written ani
Ito disk to make space for a different block in I
I
I storage
I
I
I
I R~E~~~.!:~E~.-E@~~~9: Relative -track address of
I block required in storage in RDTTR.
RDTT~=O
I
I
, if a block is being created
I Parameters returned: Address of block in
I
, storage-In BLOKAD-I
§~~EY_i2_2§{1~Q: None
I _______________
I _______________________________________________
L
~

76

ICONSLD, ZUERR, ABO~T,
IWDREAD, WRTRD, WDWRIT

I
I
I
I

I
I
I
I
I
I
I
I

I
I

I
I

I

_______________________ JI

I
I

~

Table AL/AN. Modules AL/AN Extended Dictionary/Dictionary Phases (cent'd)
r-----------------------------------------------T---------------T-----------------------,
I
IMain Precessing I
Routine Called
I
Statement or Operation Type
'Routine
I
I
I
~-----------------------------------------------t---------------t-----------------------~

IInvestigates the text block control area
I (TSLOTS), to find which block can De written
lonto disk to make space for a different block
I in storage

ITFREE
,
I
I

I

' I
I
I
I
I

I

E~~~~~!~rs_2~~~ed:

Relative track address
I block required in storage in RDTTR. RDTTk=O
I if a block is being created
I !:~~~~§!:.~~~~§!:~:!rn §2: T FREE
, E1!:!!:~Y_!:Q_Q S /3 §.Q : Non e

ICCNSLD, ZUERR, ABOkT,
IWDREAD, WRTRD, WDWRIT
I
I

I
I
I
,

I
I
I
I
I

' I
I '

' I

I

~--------,---------------------------------------t---------------t-----------------------~

Icreate space in storage by writing on disk

IWDWRIT

I
I
"
I !:~ra~§!:~~~_2~~seQ: RDTTR=O, BLOKAD contains
I address of block that can be written o u t "
, Parameters returned: BLCKAD contains address
"
I of-"block-In-stc)rage that is now a v a i l a b l e ,
I
I E1!:!!:~_to_Q§~l§'Q: WRITE (BSAM), CHECK, NONE

IWRITEX

I

I

,

I
I

I
,
I
I
I

t------------------------------------------------t---- -----------t-----------------------~

IWrites a block onto disk and reads a second onelWRTRD
linto its place in storage
,

IREADX, WRITEX, ZUERR,
I ABORT

I
I

I
I

I

I

,

t
I
t

t

I

!:~~~~§!:§~~_B~~~§9:

RDTTR contains relative
I
I
track address of block to be read.
BLOKAD
I '
contains address of block to be written
I '
Parameters returned: NOTTR contains relative
I
I
track-address-"()fblock in storage
' I
£!!:!!:~Y_!:2~QS/l§'Q: WRITE (ESAM), CHECK', NOTE,
I

I
I
I
I
,
,

~--------------------------------------------·---t---------------t-----------------------~

'Reads a block from disk into space already
,available in storage

IWDREAD
IREADX
' I

I
I

,

' I

I

I
I
,
,
I
I

!:~~~~et§rs_E~~~~9:

RDTTR holds relative track
address of block to be read.
BLOKAD holds
address of space in storage
Parameters returned: BLOKAD holds address of
"block-In-storage--Entry to~§{l§'Q: None

' I
I
I
' I
I
I
I
I
I
I

I
I
I
I
~

I

t-----------------------------------------------t----- ----------t-----------------------~

IWrites a block onto disk

IWRITEX

IZUPL, ZEND

I

I

I

I
I

,

I !:~~~~~te~~-B~~~~Q: TEMP4 holds relative track I
I address of space on disk
I
I E1!}!:~Y_!:~2_Q§{1§.Q: XDAD(WI), WAIT
I

I
,
I

I
I

t-----------------------------------------------t----- ----------t-----------------------~

IReads a block from disk

I

'READX

, !:g~~~!:~~rs_12~~~~9: TEMP4 holds relative track
I address of block on disk
I Par~~~t~rs_re!:~~!}§9: PARi
address of input
, area
I !:~~~~~!:er~ re!:~!~!}~Q: PAR2
record length
, E1!:!!:~_!:Q~§{}§.~~ : GET MOVE (QSAM)

IZUPL,

ZEND

I '

' I
"
"

I

I

,
,
,

' I '
I '

I

I

,

I

r-----------------------------------------------t----- ----------t-----------------------~

IReads a record from SYSIN
IZURD
INane
I
I
I "
I !:~ra~~!:~~~-12~~§.ed: PARl -- address of input
"
I
, area
, !:~~~~~!:£rs re!:~rn~2: PAR2 -- record length
"
,
, _______________________________________________
E1!:!!:~y_!:Q~§~}§.Q: GET MOVE (QSAM)
I
' _______________________ J,
l.
_______________

' I '
~

~

section 3: Charts and Routine Directories

77

Table AL/AN. Modules AL/AN Extended Dictionary/Dictionary Phases (cont'd)

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

I
I

IMain Processing I
Routine Called
I
Statement or Operation Type
I
Routine
I
I
~-----------------------------------------------+---------------+-----------------------~
IPuts a record out to SYSPRINT.
Pagination
IZUPL
IPLERRX
I
I (paging action) is performed automatically
I
I
I
I
I
I
I
I E~ra~eters-Bas~ed: PAR1 -- address of output
I
I
I
I buffer. PAR3 -- address of output buffer
I
I
I
I containing page heading (if any)
I
I
I
I
I
I
I ~g!~y_!O OS/l~Q: PUT LOCATE (QSAM)
~-----------------------------------------------+---------------+-----------------------~
IFinds a new text block.
Optionally chains the IZUTXTC
ICONSLT, TRYMR~, ZUERR, I
Inew block to the current block and changes the I
IABORT, BLKERR
I
Istatus of the current block
I
I
I
I
I
I
I
I R~~~~~ter~_£~~~~9: PAR1 -- optionally, a
I
I
I
I reference to the current block.
PAR2 -- a
I
I
I
I status and chain indicator
I
I
I
I
I
I E~~~~et~rs~~!~~~~9: PAR1 -- reference to new I
I block; PAR2 -- absolute address of the
I
I
I
I beginning of block
I
I
I
I ~~!~~QS/l~Q: None
I
I
I
~-----------------------------------------------+---------------+-----------------------~
IFinds the next text block in the chain.
IZCHAIN
ICONSLT, TRYMR~, BLKERR I
IOptionally, changes the status of the current
I
\
I
\ block
I
I
I

I

I

I

I

I

I

I

I

I

I

I

I

~

~

I R~ra~eter~-Bas~~~: PAR1 -- a reference to the I
I
I
I current block; PAR2 -- a status indicator
I
I
I
I Parameters returned: PAR1 -- reference of the I
I
I
I next~lock_rn-the-chain.
PAR2 -- absolute
I
I
I
I address of next block in chain
\
I
I
I ~~try_!2_Q§~1~Q: None
\
I
I
~-----------------------------------------------+---------------+-----------------------~
IChanges the status of the referenced text blocklZALTER
\CONSLT, BLKERR
I
I R~ra~~!er~-B~~~~~: PAR1 -- a reference to the I
I
I
I block.
PAR2 + 3 -- required 'status' byte
I
I
I
I
I
I
I En!~Y_!2~S/1~Q: None
~-----------------------------------------------+---------------+-----------------------~
IConverts a text reference to an absolute
IZTXTAB
ICCNSLT, TRYMRT, BLKERR I
laddress and optionally, does not change status I
I
I
lof the block
I
I
I
I
I
I
I
I E~~~m~!~~~_£~~~~~: PAR1 -- reference to be
I
I
I
I converted and option indicator bit
I
I
I
I
I
I
I E~~~~eters_~~!~~~~~: PAR1 -- the absolute
I address
I
I
I
I ~g!~y_to~S/l~Q: None
I
I
I
~-----------------------------------------------+---------------+-----------------------~
IConverts an absolute address to a text
\ZTXTRF
ICONSLT, BLKERR, ZUERR, I
\ ref erence
I
I ABORT
I
I R~~am~!er~-E~~~~~: PAR1 -- a text reference tol
I
I
I the block containing the absolute address;
I
I
I
I PAR2 -- the address to be converted
I
I
I
I Par~~~!ers~~!~~~~9: PAR1 -- the required textl
I
I
I reference
I
I
I
I ~~!~-.!:2~S/1~Q: None
I
I
I
~-----------------------------------------------+---------------+-----------------------~
IEnters message 'REFERENCED BLOCK NOT IN USE'
IBLKERR
IZUERR, ABCRT
I
linto dictionary and then terminates compilationl
I
I
~~!~Y_!2 OS/l~Q: None
I _______________ I _______________________ JI
lI _______________________________________________

78

Table AL/AN. Modules AL/AN Extehded Dictionary/Dictionary Phases (cont'd)

Ir-----------------------------------------------T---------------T-----------------------1

I
I

,Main Processing,
'Routine,

statement or Cferation Type

Routine Calles

I
I

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

ISupplies storage space for scratch purposes.
'ZUGC
'TRY~RT, ZUERR, ABORT
IAllocation is made in 512 bytes at a time
I
I
I Para!!!.§!.§!:~__12~~§.§9: PAR1 -- a count of t h e '
I
I number of 512 byte blocks required
I '
I f~ra!!!.§1ers_!:.§1~rn.§9: PAR1 -- address of the
I '
"
I allocated storage
I ];!!trY_1Q_Q§~}.2.Q: None
"

,

,
,
I
I
I
,

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

IConverts an absolute address to a dictionary
Ireference
I Pa!:~!!!.§!:~__12~~.§,§9: PARt -- any ref erence to
I the block containing the abscl ute address;
I PAR2 -- the absolute address to be converted
I Pa~~!!!.§!:ers~.§1~rn.§9: PAR1 -- the required
I dictionary reference
I ~!!trY_!:2-QS/3.2Q: None

'ZDABRF
,CCNSLD, ZUERR, ABORT,
'IBLKERR
' I
I
I
' I
I
I
I '
I
I

I

I
,

I
I
I
I
I

~,-----------------------------------------------+---------------+-----------------------~

'Converts a dictionary reference to an absolute IZDRFAB
ICCNSLD, TRYMRD, BLK~RR I
I
I
,
I address
I Ear~!!!.§ter§__12~~§,§9: PAWL -- the dictionary
I '
I
I reference
"
I
, Par~!!!.§!:er~~et~!:!!§9: PAR1 -- the absolute
I '
,
I address
' I
I
I ~!!1!:y_!Q_Q§~}.2Q: None
I
I
,
~-----------------------------------------------+---------------+-----------------------~

IMakes an unaligned dictionary entry and
'ZNALAB
IZDRFAB, ZDAERF, TRYMRD,'
'returns an absolute address
,
IZUPL, ZUERR, ABORT,
,
,
"CCNSLD,
, Earam.§!~rs_~~~e9: PAR1 -- address of entry tol
I
,
, be made; PAR2 -- length of entry
I '
,
,
, E~!:~!!!eters_~§!urn.§Q: PAR1 -- address of entry "
I in dictionary.
PAR4 -- some reference to the "
,
I
I
,
, block
I En!!:Y_~Q-2S/3.2Q: None
I
I
I
~---------------------------------------------~-+---------------+-----------------------~

IMakes an aligned dictionary entry and returns
IZDICAB
Ian absolute address
I
I
I
I fara!!!.§1g!:~__12~~?eQ: PARl -- address of entry tol
I
I be made; PAR2 -- length of entry
, Pa~~!!!.§1grs ret~lrn'§2: PAR1 -- address of entry I
, in dictionary.
PAR4 -- some reference to the I
, block
I
I ~!!try_12-2S/3QQ: None
I

IZDRFAB, ZDAERF, TRYMRD,I
IZUPL, ZUERR, ABORT,
,
ICCNSLD
I
I
I
I
I
I
I
I
I
I
I
I
I

~-----------------------------------------------+---------------+-----------------------~

IMakes an unaligned dictionary entry and
IZNALRF
IZDRFAB, ZDAERF, TRYMRD,I
Ireturns dictionary reference
,
IZUPL, ZUERR, ABORT,
I
'ICONSLD
I
,
, far~!!!~t~f~__12as§ed: PAR1 -- address of entry to I
,
I
I be made; PAR2 -- length of entry
I '
,
I Parameters returned: PAR1 -- reference of
I
I
I
, entry-in dictionary.
PAR4 -- absolute address,
I
I
I of the entry
' I
I
, ~!!1~Y_1Q_QS/36Q: None
"
,
~-----------------------------------------------+---------------+-----------------------~

'Makes an aligned dictionary entry and returns alZDICRF
,ZDRFAE, ZDAERF, TRYMRD, I
,dictionary reference
I
IZUPL, ZUERR, ABORT,
I
I
"CCNSLD,
, E~~~!!!eters-B~§§~9: PAR1 -- address of entry tol
I
I
, be made; PAR2 -- length of entry
"
,
, Parameters returned: PAR1 -- reference o f "
I
I entry-irldIctionary.
PAR4 -- absolute address'
I
I
, of the entry
' I
I
,l ________________________________________________
EnifY to~S/36Q,: None
I
' _______________________ J,
_______________
~

~

section 3: Charts and Routine Directories

79

• Table ALl/ANi. Modules AL/AN Routine/Subroutine Directory
I r------------------T--------------------------------------------------------------------,
I I Routine/Subroutine I
Function
I

I ~------------------+--------------------------------------------------------------------~
Finds text block which can be written on disk
to make space for a new block in storage.

ITFREE

I
I

Allocates space for a dictionary block.

ITRYMRD

I

Allocates space for a text block.

ITRYMRT

I

Reads a block from disk into storage.

IWDREAD

I

Creates space in storage by writing a block on
disk.

IWDWRIT

I
I

WRITEX

Writes a block on disk.

WRTONL

Writes on last block on disk.

WRTRD

Writes a block onto disk, reads a second one
into its place in storage.

ZALTER

Changes status of referenced text block.

ZCHAIN

Finds next text block in chain.

ZDABRF

Converts an absolute address to a dictionary
reference.

ZDRFAB

Converts a dictionary reference to an absolute
address.

ZDICAB

Makes an aligned dictionary entry and returns
absolute address.

ZDICRF

Makes an aligned dictionary entry and returns
dictionary reference.

ZNALRF

Makes unaligned dictionary entry and returns
dictionary reference.

ZNALAB

Makes unaligned dictionary entry and returns
absolute address.

ZTXTAB

Converts text reference to an absolute address.

ZTXTRF

Converts absolute address to a text reference.

ZUERR

Inserts diagnostic message in dictionary.

ZURD

Reads a record from SYSIN.

ZUGC

Supplies storage space for scratch purposes.

ZURC

Releases scratch storage.

ZUPL

Puts record out to SYSPRINT data set.

I

80

~

I

~

IZUTXTC
L
__________________

I
I
I
I
I
I
I
I
I
I
I
I

Obtains a new text block.
__________________________________
__________________________________ j!

Table AM.

Module AM Compilei Control Phase Marking

r"-----------------------------------T---------------T-----------------------------------,
I
\

Function

IMain Processing\
I
Routine
I

Routines Used

I
I

~"-----------------------------------+---------------+-----------------------------------~

IMarks all non-optional phases and
IIEMAM
jRE~EST, RLSCTL (both in AA)
I
lall phases influenced by compiler
I
I
I
linvocation-time
options
I _______________ I ___________________________________ JI
L
____________________________________
~

~

section 3: Charts and Routine Directories

81

Chart 01.

compile-time Processor Logical Phase FloNch3rt

...x

•

•• YES

.*

E2·.

*.

IN~l~EO ••
ex
••
• ENC UN EREO.

••••••••

*.

....

.*

• NO

x

~i!;;~!i!~:::;:

...•••••• r..•••.

• MESSA
DUINOlTJC
E
TROl.•
•
HA
•

·.·.·H2·.····•.•.
X

~'.! ~~:;~~-.-.J~:
RE-INlTiA~tZE
•• COMMo
R G N ••

AND TA k••••••
••••••••••

•

'32

Cha rt 1\S.

Phase AS OveralL logic

• ••• A2· ••• •••••
~NTRY
FROM

•
•

Diag~am

•
•

•••• :~~U.~~ •••• •

X
02· ••• ••••••
•:•••••
•
U¥~ ;~~~F ~c :
• 'INPUT' n~T
•
•••••••• *••••••••••

X
••••• e2 *•••••••••

•
•
•

•

TURN
INCLUDE-SW

•

•
•

OFF

•

•*•••••••••••••• *.*
X

LOADW

.-.-.-Ai..-.-.-.-.-.
:"·;~n~·:G·*··:

•
•
•

PH

~nAD

•••• *

•
BG INTO •

e
•
.,~ORA
••~••••••

·

····*G2 •.•••.• **
,~

:•
•

X

U¥E PI"A~E BG

no~~~nvCE

:*
•

•••••••• ••• *.* ••••
,~

·

!NCTST
H2

X
,,*.
*•

•• • * is

•• ••

YFS •
••• !I«:L~E-SW••, •••••

.. ·.1 ..
.*

• NO

X

•••• ~2 IJ* ••••
:
•

*••

FtXRN
:
PHASE AA
•
• • • • • • (1 • • • • • • • •

Section 3: Charts and Routine Lirectories

83

Chart AV.

.....

Phase AV OVErall logic Diagr3m

.

·AV •

•

A2 •

••

·····.S3··.•.•.···..
\(

•
~OVF TOKSC"l
•
•
TABLE I"lTO
•
• SCRATCH STORAr,E.

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

·

K

101101"1"48

.

••••• C 3.......... .

ALLO~ATE PO'l
IN C!lATCH
S DRAGE

•
•
•

•
•

••••••••••••••••••••

·····0"··•...ISFII··..•
ic

•

ncs's

SET UP

•

•
AND RUFFER
•
• AIlFA FOR
•
A"lO SYSl 1\
...
• INClUI)E F LFS •

•••••••••••••••••
ic

••••• F 3 ••••••••••
•
SFT UP
•
• KF YW'lRn T leL F. •

•
•
.................
IN'\l8::~lH

:

:

X

WWJVLP

••••• F3·· ••••• • ••

••

~fT

UP TASLF'>
• HI T II.ANSL ATE
• EKTFR"lAL CO('"
•
TO EIICDIC

•

•
..
•
•

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

HH'lflCf'I

K

..··.··G~··
'4AIII

·.....

:
•
'"

•

ADD CODE

•

:

TRl6~~T

:

•••••••••••••••••'"

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

·*-.-.•.·GZ··········

•••••
.SG •
• 83.
•••

·

:
•••••••••••••••••
~~2H~M

ic
• • • • • F) • • • • • • • • • •

TO
STA TEMENT

.TO CAll CLEANUP.

·x

ic

K

llE4P

OZ •
•• ••••
•

• ENcaOE STHNT •
*- *- *-*-*-*-*
.USES AND TESTS.
•
A PUSH DOWN •
•
STACK
•

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

HZ

.•.it

••

• •••• H3 ••••••••••

*.

•

•• wt. S I T . . YES
•
•• THF. EN!) FOR . . . . . . . . . . X.
••
PROC
••
•

.. ..

*..*

•
•

....
....

•

YES..

02 .X ••••••

••

..

J2

•

•
•
•

.................
··..........
•

••••••••••• x.

x

••

..

..,".
*0 o.

PROC

1Ir.

IS

TURN
PROC SW OFF

•

• NO

.·x..

•••••
••
•

·BG •
• 83·

SW ON

• (3 •

•• NO

••

•

••••• ".0

•

section 3: Charts and Routine Cirectories

85

Phase BG Overall Logic Diagram

Chart BG.

•• ••••
8G •
• 83·
••
•

••••••••••••••••••••••••••••••••••••••• x. x•••••••••••
K

PH2SCN

.-.-.-.-*-.-.-.-.

:~;~.~~ ~;.;;::=.:

:TJ!~nSTbR2~T

:

: •• =U~_l~S~ •••:

.-.
~

C1

•*
•*
•• WHAT
*.

·X

.

.

*.

••

*•

*••
•
••.*

IS IT

*•• *

•

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 41 • • 41 • • 41414141414141414141414141 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

·····01··········•

OAE08F

•

••·.··.02··········••

••·····04········.·••
.11.

OAMAC
K
••••• 03 ••••••••••

X

OAI DEN

OAOTHR

FNO OF TEXT

x
.. ... ..
El

NO ••

• •••••

*.

IS

••• * .*

IDENTIFIER

••

••

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

EZ

·· ..

·····Gl··········•

•

·•..................•

·

•• ••

:

*. *.

n~~Kp~~P

·

.X •••••••••••••

...

.
··········_·tc

~

* •• -

••

e·

..

OAPENT
~
•••••HZ •• •••••• ••

X

:

:

.

...

:~~~~~~:~

·

····*H3··••••••••

: :IIITPRT

•
INTERPRET
". .-.-.-.-........-.•
•
•••. It: ~a:-I'l :
•
:
•••••••••••••••••••

...

REPLi)EMENT

• ON ARG • GI'T
•
VIILU FOR

:

STACK
•
•••••••••••••••••

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

• YES

¥b~-~H-n~~

:
•

G2

:

.

• K•••••••••••

••••••••••• )C •••

:··.··J2··········:
·.................
P¥~~-H~-~~~'

•

•

YALUE ONTO

STACK

...
•

.*
••

J3

••

*.

WAS
•• NO •
•• IT INCLUDE ••••••

*.

...

.

.•.
~

X

*.

*•••

••

••

• YES

·•••··KZ··········• ·····K3·········..
·.................... ··
. ......
.. .
.

•••••

X

LEY-81T· 1

X

•

•

•
•

TURN

I Nt LUOf-SW
ON

•

........ .
•
X

•••••••••••••••••

·!'IC •
~.~

86

n5.a........

to

..

• AI·

:_.~~~k~~!:~t_._:

•• OUTPUTS

:•. 1(.:..*PR~~~glJ\ .,.E .: .~~ • • •

··.·.Hl··········:

OAEOS

~

·····E4 •••••• ••••

K
•• ••••
•
04 •
••••

OAP~li ••

·

*.

• NO

•

••
SCAN OF
•
... X.VALUE FINISHED.

••

*.

x

•

:

.. .. o· ....

~H~~·····.

TO CALLER

I~I~~bRtM~E

YES ••
••
••••••
ACTIYATFO ••

••

.111

• YES

•

...

:

•

~

••

LF.Y-BIT 0

*.

•

•

.

e., • • • • • • • • • • •

••
••
••• OTHER •• . •• PERCENT SIGN ••
••••••••••••••••• • ••• •••••••••••••••••
...
04 •
x
•• ••••
•
•••••
.,,"

·•••••••••••••••••••.•• ·••••••••••••••••••.• ·•••••••••••••••••••.••
•

~

TOKFN •

••

.

Chart

Diagr~m

Phase BM Overall logjc

....

Brv1 •

"'
• BH •
• AI·
••
•

leA 0

X

: . . . . Al . . . . . ."' •• :

XA~ 1

. . . . E~H8tiS~

••• :

•
.............
"'...• •................•.

•
S~T
•
•
: SEVERI Y CODE : •••••••• X:

~EVE" ~F
O~~~~ySobf

XAI

YES ••

••

132

.•.·x

•
:

••

ANY ••
f'NTR IES •• NO

•

*. *. PRlt2E~feo • ••••••••••• )( •
*.
••

: •••• e ••••••••••••

*•• *

•

XA'~

K

••••• C1..........

KA7

H~ai~G~::

•

••

A~LOU

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

:

: ........

K~

.sw •

• AI.
I• •

•

... •••• C2 ••••••• '...

:

.'....

.0 ...... x

•••••••••••••

~~H~~

• •••• C 3..........

• •••• C4 ••••••••••

rn ~~:
:
: hNk~5~b
:
:........
••
••

..............,...

:

~S~~:U

................
.•
....
.
·· ....

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

K:

~L~K

: •••••••• K:

•

• 04 •• ~.
••••

NO
: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cttl4I • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 0 . . . . . . .

,.e.

...
l(

114

He~E

••

••••

YES

*., ~~O~~'l~~s"~~.· ...
*.

•• ••

.•

•....rl.a........

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

HEAgEOFT~HAIN

XAZ~ ••••

E2 •••••••"'..

e.·· E·,.··..

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

:
..
••••••••• K:
. . .

0:
••••••••• K..
•
••

NE)(~°ftt.OCK

X

• ••••
·BW •

Or

•
:
•

Cle.8

•

At •

•••

'(Al~~ ••• E4•••••••••••

....
.. ..
TM

•••• YES
•
•••••••••• K
CHAIN ••
•

"N~W

,,~~I~~R9~h

.............
SEVERity
HEADER

•

•

• • • • • • • • • • • • • • • • • • • • 0 • • • • • • • • • • • • • • • • • • • • • <1 • • • • • • • • • • • • • • • " " • • • • • • • • • • • • • • • • • • •

•

·

X

K
••••• Gl............

XA'lr

•

•
••• ):.
•
•

·

.. Ii ..

.
.•..

....

*...

*..*

••••

G2

•••

••

Gl

.. ..

• .NO
••

GET T O .
•• SKEL TON •• NO
••
END
•• YES.
•
NEXT eNTRY
••••••••• X•• IN CU RENT •••••••••• lI •• OF CHAIN
•••••• X. 04 •
IN CHAIN.
•• BLOCK ••
••
••
••

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

.....H2..........
X

•

XA32

H3 ..

....
.. ..

J2..........

.....JI..........

~~~~iE:

•...

•••

·..................
:
•
•

.....J1."'•••••"'..

....

• YES

*HIt ••••••••••

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

•••• THA~T •••• YES
:
TO P~INT
••••••••• IC •• A lTA¥EHENT •••••••••• X.
BUFFER.
•• NUHBER ••
•
• NO

ST~K~~NT

:
•
•

T~

PRINT
IIUFFER

. ..• ···J4...····.··.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • f' • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

i<

:
•
•

•••••

ACCESS:
:
MESSA E
••••••••• X.
SKELET N .
•

: ................:

AN
~••••••••• lC.:
H~!SAGE
SKhETON.
•

: ............... :

M
T

U4r

~fkgE:
I(
IN
••••••••• J(

R liT.

: •••• ~~~~U.....:

•

PUT
T
OIAGIIO~VIC
MESSAGE

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

....

•

•

K

•

: •••••••••••••••••••••••••••••••••••••••••••• (~ •••••••••••••••••••••••••••••••••

••

Kit

WAS

••

••

• •••

,~~.:·lAStH~~TR.V
.:*~;~.)(:•Oft.:
•• IN CHAIN ••
•
*0
••
• •••
*.

•o·

section 3: Charts and Routine rirectories

87

Phase Bw overall logic Diagr3m

Chart BW.

"'' ' ' ' ' '
'" '" '"

"'BN '"
'" AI'"

ic

"'' ' ' '" "'A 1"''''''''''''''''•• ''''''

'"

'"
:

RELEASE

AN~H~~a~EO

'"

'"
:

"''"' ' ' ' ' ' "'''''''''''''. "'''''''.'''''''"
X

•"'''''''''''''81'''········'''•

.'" ...............
•
RELFASE ALL •
"'ACTI VE TEXT AND.
•
DICT BLOCKS •

"'

ic

·"''''''''''(1··''''''·'''··'''·

'"
FREE
•
•
ANV
'"
•
OUTSTANOING •
• SCRATCH STORAGE.

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

'"

.•. "'.
K

.• 01

•••• "''''02'''.'''.'''''' •• '''''''''

*.

",:"'C~~~3unON·:.~~ •••••• x·
s~~b~~
~ *.
'"
.*.'"
•• • *
"'."' "''''.'''''''''.

...

'" YES

.AA •
•

X

•·"'."'.El.·········•
: l~gs~v~~a~A :

·•... ............•.
"'

·

.
..........."'.....•
X

••••• F I ••••••••••

•
•
•

•

RFALLnCATE
TF~T ANI')
nl(T BLnCKS

.,.

GI

.•.;

••

•
•
•

• •••• GZ ••••••••••

*.

•

••
IK
•• YES
•
•• TEXT IllnCKS •••••••••• l(.

*.

.*
**.
••.**
•

·

~O

.
·..................
.....
..·
ic

.·."'.Hl··········

•

SF.T UP

•

•

RFGION

•

• COMMUNI C ATI nNS •

x

·CI •

• 61·

88

•
•
•

•
•
•••••••••••••••••••

• 1( • • • • • • • co • • • • ' • • • • • •

·

OPEN
SPIll FILE

.

It • • • • • •

.....
...

••••••• K

HI,·

Table AS.

Phase AS Resident Phase for Compile-time Processing

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

I
IMain Processingl
~
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IInitializes switches for compileIADRP
INone
I
Itime processor
I
I
I
~------------------------------------+---------------+-----------------------------------~
ILoads phases for compile-time
IADRP
ILOADX (AA)
I
I processor
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IDetermines whether Phase BC should IADRP
INone
I
Ibe
reloaded
L
_______________________
•____________ I _______________ I ___________________________________ Jt
~

~

Section 3: Charts and Routine Directories

89

.Table AS1.

Phase AS

Routine/subroutine Directory

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

I Routine/Subroutine I

I

Function

~------------------+--------------------------------------------------------------------~

I
I
I
I
I

ADRP

Initializes switches for compile-time processor.

BCKUP2

Backs up token pointer two places.

CHBLK

Changes currently busy IVB block status and gets a new block

CLSBUF

Handles calls to close and write out the buffer.
phase BJ if necessary.

COMENT

Scans the limits of a corroment, transfers each character into the
output buffer.

ENDIVB

Closes an IVB chain.

FREVAL

Releases a chain of IVBs containing a no longer needed value and
returns chain to free list.

GETIVB

Removes an IVB from the free chain for use by the calling routine.

GNC

Updates TOKPTR to point to the next character in a particular input
stream.

HASH

Accepts an EBCDIC identifier as input and outputs an index. The
index indicates the beginning of the HASH chain with which the identifier is associated.

INCTST

Determines whether Phase BC needs to be reloaded on return from
Phase BG.

INPUT

Reads in an input record from the source data set or from included
text.

INRD

Reads physical records from the included data set; unblocks and
sends them back one logical record at a time.

NXTTXT

Gets a new text block and sets up address slots.

OUTPTC

Outputs a single character into one of the three output rredia:
IVB's, text blocks, or external records.

SRHDIC

Searches the dictionary for the presence of a named item.

STRING

Scars the limits of a string constant, transfers each character to
output.

TOKSCN

Examines text, character by character recognizing and returning eachl
logical unit of text (called a token>. Tokens include identifiers, I
constants, operators, delimiters, etc.
I

I

UPNEWL
YAG2
l __________________

90

Loads and bases

I
I
I
Loads processor phases for the compile-time
processor.
__________________________________
__________________________________
JI
Updates temporary linecount slot.

~

Table AV Phase AV Macro Processing Initialization

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

Statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

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

IInitializes communication area for IINIT
Icompile-time processing
I

INone
I

I
I

~-----------------------------------+---------------+-----------------------------------~

IAllocates push down stack from
Iscratch storage

IINIT
I

INone
I

I
I

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

IAllocates translation tables

IINIT

INone

I

~-----------------------------------+---------------+-----------------------------------~
I~nters

SUBSTR into dictionary

IINIT

INone

,

~-----------------------------------+---------------+-----------------------------------~

lCreates dictionary entries and
IINIT
INone
I
!values
for constants pool
L ___________________________________
LI _______________ I _ __________________________________ JI
~

•• Table AV1.

Phase AV Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

~------------------+--------------------------------------------------------------------~

IINIT
I

IEntry point to the initialization phase. This
Imunication region for compile-time processing.

initializ~s

the com- I
,

I

,

IWWN048
,

IAllocates the push down stack (to be used by Phases BC and BG) from I
Iscratch storage.
,

I

,

!WWOVLP
I
I
IWWOBCD

,Sets up tables to translate external code to EECDIC; tests the
IBCD,EECDIC option.

IIWWCHNBEG
I
I
iWWMOVEIT
I
~INCLUDE

I

~LABELS

I
I GOTO
I
IACT
I
I ELSE

(BC

I
I
I

I

I

I

I

IEnters built-in function SUBSTR into dictionary.

I

,

ICreates dictionary entries and values for compile-time constant
Ipool.

I

,

I

IMoves Subroutine package into core for use by BC.

I

IINCLUDE Processor
I
ILABEL List Processor.

I

Subroutine IGOTO statement Processor.
Package)

I

IActive/Deactivate Processor.
I
IELSE Clause Processor.

L __________________ i ____________________________________________________________________ J

Section 3: Charts and Routine Directories

91

Table BC.

Phase BC Initial Scan

and Translation

r-----------------------------------T---------------T-----------------------------------,
J
I Main Processing I
I

I

Statement or Operation Type
I
Routine
I
subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IRecognizes statement type
IPH1SCN
ITOKEN, DELETE
I
~-----------------------------------+---------------+------------------------------------~
IScans until next % character
IPH1SCN
IFINDPC
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses PROCEDURE statement
IPH1SCN
I TOKEN, DELETE, IDSRCH,
I
I
I
I ADDSP (FREVAL, OUTPTC)
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses labels attached to state-IPH1SCN
IIDSRCH
I
Iment
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IEncodes statement into internal
IPH1SCN
I PARSE, TOKEN, IDSRCH, ADDSP
I
Itext
I
I DELETE, CHECK
I
~-----------------------------------+---------------+-----------------------------------~
ICleans up after INCLUDE in initial IPH1SCN
INone
I
Iscan
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IBegins statement identification
IPH1SCN
INone
I
Iprocess
I
I
I
l ___________________________________ i _______________ i ___________________________________ J

92

.Table BCl.

Phase.BC

Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------i

ADCONS

IObtains the dictionary reference of a constant, entering it into the
Idictionary if necessary.

ADDSP

Adds a

ADICT

Adds a normal item to the end of the appropriate hash chain and
returns the dictionary reference.

ADPROC (BF)

Processes PROCEDURE statement.

ASSIGN

Processes assignment statements.

CHECK

Checks back for undefined labels and identifiers not declared withinl
the block.
I

DECLAR (BF)

Declare statement processor.

DELETE
DO (BE)
DONE (BE)
FINDPC
IDSRCH

processor-~reated

item to the dictionary.

ISkips over bad text up to the end of a statement, field or proceIdure.

I

IDO statement processor.

I

IChecks stack for possible THEN's or ELSE'S after statement is comIpleted.

I

I

IscanE; source text, character by character, searching for macro perIcent character.

I

Obtains the dictionary reference of an identifier, entering it in
the dictionary if necessary.

IF (BE)

IF statement processor.

:KYWDSR

Checks for single or multiple keywords.

PARSE (BE)

ParsE~s and generates interpretive macro code for compilE-time
exprE!ssions.

PIF4

Provides special handling for end of included text.

PHlSCN (BE)

Main controlling routine for phase.

HETURN

Processes RETURN statement for PROC.

STB3

Collects labels into label list and identifier statement type on
first two tokens of statement.

STMT (BE)

Diagnoses statement type and builds label list.

~rOKEN

Returns significant tokens to PHlSCN and writes out diagnostics for
tokens in error.

UPDLIN
l __________________

I
I
I
I
I
I
I
I

l

~

Generates
an update linecount instruction.
__________________________________
__________________________________ JI
Note: See also BC Subroutine Package in Table AVl.

section 3: Charts and Routine Directories

93

Table BG. Phase BG Final Scan and Replacement
r-----------------------------------T---------------T-----------------------------------,
I
IMain Processing I
I
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
\Final scan for replacements
IPH2SCN
\ OUTPUT, TOKSCN, SRHDIC
I
~-----------------------------------+---------------+-----------------------------------~

\Recognition of end of text

IPH2SCN

I OUTPUT, TOKSCN, SRHDIC

I

~-----------------------------------+---------------+-----------------------------------~

IRecognition of an identifier
\PH2SCN
I OUTPUT, TOKSCN, SRHDIC
I
~-----------------------------------+---------------+-----------------------------------~
\Recognition of macro action
IPH2SCN
IOUTPUT, TOKSCN, SRHDIC
I
~-----------------------------------+---------------+-----------------------------------~
\Recognition of % character
IPH2SCN
I OUTPUT, TOKSCN, SRHDIC
\
~-----------------------------------+---------------+-----------------------------------~
IRecognition of other characters
\PH2SCN
I OUTPUT, TOKSCN, SRHDIC
I
~-----------------------------------+---------------+-----------------------------------~
ITerminates and cleans up INCLUDE
IPH2SCN
I OUTPUT, TOKSCN, SRHDIC
I
Ihandling
\
I
I
~-----------------------------------+---------~-----+-----------------------------------~
IRe-establishes scan at next higher \PH2SCN
\OUTPUT, TOKSCN, SRHDIC
I
\level text
\
\
I
~-----------------------------------+---------------+-----------------------------------~
IPerforms replacement on activated
IPH2SCN
I OUTPUT, TOKSCN, SRHDIC
\
identifiers
I _______________ I _ __________________________________ JI
L\ ___________________________________
~

94

~

.Table BG1.

Phase BG

Routine/subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~.------------------+--------------------------------------------------------------------~

CLOUT (BJ)

Closes output buffer, and writes out record on SYSUT3.

CONVRT

Handles conversions between the three data types used in the
compile-time processor .

DACLN

Terminates INCLUDE text handling and frees text blocks containing
included text.

DAEOB

Re-establishes scan at next higher level text.

DAEOBF

Recognizes and processes end of text condition.

DAIDEN

Recognizes and processes identifier in text.

DAMAC

Recognizes and processes macro action character.

DAOTHR

Recognizes character and outputs it.

DAPENT

Handles replacement operation for text identifiers.

DAPRTC

Recognizes % character and recalls Phase BC if appropriate.

I~UNCTN

(BJ')

Handles built-in functions.

I

Picks up a two-byte dictionary reference from scrubbed text, perI
forms error checking, resolves indirect references, and returns bothl
relative and absolute address.
I

GETDIC

I
I
I
I
INTPRT (BI)
Interprets the macro code generated by the Phase I scan.
I
I
Handles the output of tokens.
OUTPT
I
I
Scans text blocks.
PH2SCN
I
I
Pops the top temporary off the Phase II stack.
POP
I
I
PROINV (BI)
special entry point to interpreter for invocation of procedures
I
found in source program text.
I
I
Pushes next available temporary onto the Phase II stack.
PUSH
I
I
PUNCH (BJ)
Punches down output record, in source code, on MACDCK option.
I
I
Synchronizes linecount, closing buffer if necessary.
SYNCH
I
I
'I,'PEEK
Scans for procedure reference argument list left-parenthesis.
I
I
ZAASIGN (BI)
Performs identifier assignments for INTPRT.
I
I
ZACOMP (BI)
Performs all logical comparison operations for INTRPT.
I
I
ZACONCAT (BI)
Performs string concatenations for INTPRT.
I
I
ZACVT (BI)
Converts stack items to required type by 'RETURNS' attribute.
I
I
Z,ALGCL (BI )
Perforrrs all logical operations for INTPRT.
I
I
(BI)
IPerforms
stack maintenance for INTPRT.
LZAPUSH
__________________
____________________________________________________________________
JI
INCLUDE control routine. Opens DCB, finds member, sets up buffer,
and initiates look-ahead read.

INCONT

~

section 3: Charts and Routine Directories

95

Table BG1. Phase BG Routine/subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
/Routine/Subroutinel

I

Function

~------------------+--------------------------------------------------------------------~

IZARlTH (Bl)

IPerforms all arithmetic operations for lNTPRT.

I

I

I

I

I

I

IZATRAl (Bl)
IZATRAN (Bl)

IZJSUBS (BJ)

IHandles transfers from included text to including text.
IPerforrrs all transfer operations for lNTPRT.

96

I

IBuilt-in function SUBSTR.

L __________________ L __________________________________ ___________________

I
I
I
I

~

I
______________ JI

Table BM.

Phase BM Diagnostic Message Determination and Printing

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

I
I

statement or Operation Type

IMain Processing I
I
Routine
I

I

Subroutines Used

I

~-----------------------------------+---------------+-----------------------------------~

IDetermines whether error messages
lare to be printed

IXA
I

INone
I

I
I

~-----------------------------------+---------------+-----------------------------------~

Iscans error message text: skeletons IXA8
IXA50, XA70, XA90, XAii0, ZUPL
I
land
prints them out
I _______________ I ___________________________________ JI
L___________________________________
~

Table BMi.

~

Phase BM Routine/Subroutine Directory

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

~-------------------+--------------------------------------------------------------------~

IXA

XAO

IDetermines whether error messages are to be printed.

I

I

I

Isets severity code.

I

XAOi

IEstablishes which message types to suppress.

I

XAi

Icounts number of error chains to be processed.

I

XA2

Puts out messages if there are no diagnostics.

XA4

Prints out "COMPILER DIAGNOSTIC MESSAGES".

XA7

First scan of message chains.

XA8

Scans error message text skeletons and prints them.

XA9 (BN)

Scans to head of next non-empty chain.

XA12A

Selects and prints header for messages of given severity.

XA30 (BN)

Gets next entry in message chain.

XA32 (BN)

Builds up first part of message in buffer.

XA35 (BN)

Accesses message skeleton.

XA40 (BN)

Puts out completed message.

IXA50 (BN)

Moves wessage text to print buffer.

I

IXA70 (BN)

Converts binary statement number to character representation, and
moves it to print buffer.

I
I

Converts binary numeric value to character representation and moves
it to print buffer.

IXA90 (BN)

I
I

IXAii0 (EN)

Moves identifier from dictionary entry to the print area.

I

IZUPL
a line on SYSPRINT data set.
L
__________________ IPrints
____________________________________________________________________
JI
~

Table BW.

Phase BW Cleanup Phase

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

I
I

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

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

IResets all tables and communiIIEMBW
INone
I
Ications region cells to the value
I
I
I
Irequired
by the compiler proper
I _______________ I ___________________________________ JI
L
___________________________________
~

~

section 3: Charts and Routine Directories

97

Read-In Logical ?hase Flowcnart

Chart 02.

Al

...x

••
••
•• CHARA~TER •• YES
••

1t8

.. ..

*-.-.-.-.-.-.-.-.
WR :

• •••• A2 ••••••••••
.lt8-CHAR
8X •

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

•••• •OpnOl'
'l •••••••••••• K:•
•••
• NO

·x

6&0~~Ulc
SET

•

.

• x••••••••••••• '" •••••••••

:n!:!Hi:::::~!i
• LIST IF REQ'O •
• ANO CONVERT TO •

:~~U~~:~.~~~~~.:

..··.Cl········.·
X

.MAKE DICT ENTRY.
*FOR U~ELS AND.
•
~H~ K
FOR
•
L G o
A~ RAM
END ••
••
0

••••••••• •••••••
x

:!;~:~Hi:::::g:

• SCAN TEXT TO •
• ANALYZE SYNTAX •
• OF STATEMENTS •

•••••••••••••••••

.•.x

._._._._1_._._._.

•• E1 ANY ••••
:;~~·U:······;,~:
•• ALLOiAT~1
•• YES
•• OECLAR J
LL •••••••••• K. SCAN TEXT TO •
.ANALYZE SYNTAK •
• STATE toN s.t
••
••
• OF STA TE IIENTS •

.. ..

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

·x

.

• NO

• X•••• I I • • • • • • • • • • • • • • • • • • •

:H;~Hi:::::~~:

.MAKE CHAlNl pF •

:cUtocOE~Lp=O~

:

••••••• ,J. •••••••••

x
•••••
•"3 •
••
•

• U·

98

Phase BX cverall Lcgic Diagram

cbart BX.

••••• •
••••• •

•••••
• A1·
•••

• 8X •

• A2 •

• x••••••••••••••••••••••••••••••• ., •••••••

8A1~•••• A2.a••••••• '" ~
• CRJi~O AND·• •• SC~~ FIRST •'"
•
••• x: ~Eloa~E : •••••••• IC: Tf.tJerr :

r,. • • to • •

ft.

0 0

~.

0 0 6 . C ft 0

~."

CI •

8A1 ••••• A1 .:........

,

•
• •••••••••••••••••••
•••••••••••••••••

......... .................
,.

II

•••

81

12.......... .

8A70
• ••••

••

••••

•

It

A9XORO
ONE

•

•

•
•
.,

•••• K~~O~b •••••••••••• IC: T:~i VrA~2 : ••••
••

N AR

•• YES

•

...111
•• • ••NO

•
•
•••••••••••••••••

K
.••

CI' ••••

t.

8A2Zl.t~~~..........
•

.·00 ...... :

••
SURT
•• YES
.. OF C~~"fNI
•• ~~
R ~¥'.

•• • ••NO
K

".

••
•• IJF

01' ••••
Ji!10

.,.~~

*. ••

•
K·

~I!T

ArPRyPRIATe
WI CH ON

•

•

0

••
•••• it
:
•

•••••••••••••••••

•

8A2i'.2~~~..........

:

•

YES
•
••••••••••
111,..
:

IC.

C~T"ENT

•• • ••NO

~I!T

APPR PRI ArE
SWIT HOFF

•

•

••
•• '•• ,
:

•••••••••••••••••

ic

£1

••• ••

4t-

•• POSSIRLf

••

K~V~RD6R

.

.*...

ell'

*. ••

.1)t~gM~A.".

••• ••

El

YES

••

••••••••••••••• " ••••••••••••• ,•••• ., ... K·.

•• ••

•.••

~

·..

:

•• ••

•••••••••••••••••

X
••

••
~NO
••
F
• " Rf ORO
••

*.

1'3···..
••••

••••

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

• NO

SVH80L

.*
.:.

••

•

••• 0 •••••••••••••

G3···..

.. ..

*.

PERIOD
.~

••

n'"

.....
ic

HI..

N~XT
•• YES
R'E' nRD
••••••••••
III EIIOV ••
•• IN ••

•• •*

• NO

.•.

••

.,

••

JJ

••

1Ir.

IS"'.
IT lAST
••
•• RFCOII(l ••

• N,l ••

*. •• •*.*

....

• VFS

"'

·x)(•••• "" •••••••

.

H3 .*" ••

• ••• tIoHZ ••••••••••

•
X.
•
•

II(lTJUST
FM:T
IN CORE

*••'

•

•••• "'."•••••••••••

It "

K

·CI •
• AI·

•••

....

••

CO".""

••

.. ..

••

.,

··
..
·.. ..............
·•.....x....•
··
·
"'

A;> •

••••• •

••

• •• ·.HII.· •••• • •••

~V A
p~'nr)l)

." ."

."

*

J4

.,

•

," *

'"

•

•

.........
•• )(. A2 "

C *0

AAzr••••• J~ ••••••••••

.,

*. .:.~~ •••••• )(:•

IlIGIT
r

••

**

•

RF~~A('F
SFMT-COlNI

•

:
•

•••••••••••••••••••

C

'" VFS

......
.
.......... ....
..
. ....
x

~

'"

• 117. '"

•11 •••1(4"'··""'··•• '"
•

IG"IORE

•

0:-

.. VF ~

*C' *0

...•
•

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

••• , •••••• K.

~
n

:

•

•

•• X. all •

. ; . FOk~~FO

'"

•

lI·a

•
, . co'"
f'nt.l.'lWE:l *!' ... N l .

YES

. . . . . . . . . ,X..

•

ClllON

It • 0 • Il 0 • • " " . . .

X
•••••J, ••••••••••
IGNORF

•

..

• Nl1

• "In

•

RE~bACF.

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

••

.

!lilt

K
....••••
.. AZ •

*1"

*e."

114

*. ••

.. .. ..(I.
••

•

••••

it

••• •••

.

811A"

AA"~ •••• G5 ••••••••••
•
•

G4····.,

·:.:~~ ••••• X.:· ~SL~~~f~1) .:.~~~ ••••• )(:

• NO

•••

•

: ••••

~

:IIA'ltI
ic
••• ~I.GI.· •• ••••••
:
WR~TF
:
9
•
u K ING
•
S~URE
•
•

•

.

....
•• ••

....

• 111

81111"'••*F" ••••••••••
•
REP~ACF.
•
OPE RATIlR
•

.: *.~ O=~~:t~~ ••.: .:;.~ .. ." K:. .

•• NO
•
•
•••••• K. 112 •
••
••

• YES

*.••••

•
•
: ••
•
~

IG"fORE

" •• ". •••• It.liC.

.~

....

,,*

•• " , S .

ST I~..

K

Fl

. oe

•·••••E4·· ••••••••

IN

~OMMINT

[r,'lnRF.

••• "

l(.

A2 •

"'.0 • • "' • • • • • • • • • • • •

Section 3: Ch3rts and Routine Iirectories

99

cr.

chart

Phase CI Overall Lcgic Diagram

"'''''''''''''
"'CI '"
• AI'"
'"'" '"

'IOTEs

RSTART
X
f~~~~2~AnE~A~HOoRI~S~~\;:E~~V~EP~~~hHoJF
"'''' ••• A1 "'''''''.'''''''''''''''''' IS NOT SPEC I FI EO
'"
'4AI'I SCAN
'"
'"
OF TEXT
'"

•
•
'"
'
•••••••••••••••••"

.·"'..... .
• B1 •• K.

• •••••

~x

••••••••••••••••••••••

0 . , , , , , 0 • • tllJ 0 0 • • • • • • •

n" • • • • • • • • • • • • • • • • • 0 . . . . . . . 0 • • ~ • • •

o. en ••

0

0 ........ :

•••
POPLS T
• ",BleST·'.
:·~~~~~~·t:~~·;·:
• FOR LAB EL OR.. YC S
• AND/OR PREF
••
PREFIK
•••••••••• X. OPTIONS IN
•
•• OPT! ONS ••
• 01CT I ONA RV
•

h •

...

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

·X

.

* . . '*
"

*

•

• NO

Xe ••••••••••••••••••••••••

PROC, ENTRY , •• OO,BEGI 'I
C1
"'.
... ;O~E~TO:· •• YES
••
HEAD
•• STATEMENT..

....
"'. ..
\'1&

• ••• "'«:2 ••••••• "'.'"

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

••• "''''.
•••••••••• K.•:BLA~R~A8jOR:
LEV~L ~OIJNT ••••• J(. E2 •
81' 1
•
'"
•

• NO

K

ST!O

.•

•••
•••
END
••••
•• 01
••••
..02
••••
: . . . .~l:·:·····"':
I)~ T··..
:
.'"
TEST
"'. YES
••
TEST
•• YES
•
~~~OR
•
•• IF t~V"L
••
FOR
•••••••••• X..
FOR
••••••••• ,11. ~ ~f~ COUNT
is ••"'. 'In •
•• KEVWORD ••
••
'ENO' ••
•
!itER'EN'.
b ••••••••• X., •• col.Jtf
ZERO

Bt8CK

•. "'. • .•.•
NO

'"

•

ASS IGN

1'1

.......

•.•. • ."NO '"

:l.. ¥.:~!.u:!"':

E2 •• X.

x·
•••• • :X
STATZ

•••

••

.... ....

K
,.,

• ••••E2 ••••••••••

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

••

• •F;R T~~rL b~ YES
:
"'. ASSIGNMENT •••••••••• X.
•• STATEMENT..
•
• NO

TRAN FER

STATEM~NT
TO
OUTPU¥ TEXT

:
••••••
••••• X. 81 •
•
)(.
•

..

TO NEXT
SE'MI-COlON

• 81 •

100

.0 *,

••
*. •• VI'S
END
INPUT
• *•.•••

•.

.•
"~O

X

X

..
••••
X···"'
·
···········
·•••••.•
,...
•

1'4

.*
••
*. OF

.*

....."4··········

••·"'.·.FISKI"' •••••••••
•
P
•

BADST!

0·....

•.•. • ....
VES

•: fnp~E~~t :•
••
•
••••••••••••••••••

•
•

:

••••••••••••••••••••••••••• 0 ••••••••••••

'!' • •

lC

• ••••
:C\2:

••
•

:::::hart CL.

Phase CL Overall Lcgic Diagram

Xx••••••
SCHA

•••

0 • • • • • 0 • • • • • • • • • • • • • • • • • It • • • •

~

6

• ••••,\3 ••••••••••

.* . .
B2

•

••

•

.••••••••••••••••.
..••••.
x ·•••• •
..... .
.:
.. •• ••..

• :;OR UiEIFIC·:.!;~ ••••• X:
•• KEYWOROS ••
•

PR~~~SS

:
•

STATEMENT

•

• NO

•• X. F2 •

C2

8

*. *.

._ ••• Cl ••••••••••

•• TESi FOR •• YES
•
·'1~0 S ATEHE~t··········x:

•. •• •• o·
·NO

:~~~0~1~lL DECLARE.

I~EVERTf F.ASllGHr
I.OOB.
IIROC.

•• ' . TEST •••• YfS
:
••
FOR OTHER •••••••••• X.
.St~TEMEN!i··
:

.•.x

••

~l ~~

*. ••

YES

&gEl

:

.......

lern~l~EAs~~~~A~ijf

.

:Cil:

•• ••• HO

,

F2 •• X,

.

BAOll ••• F2.~........

:KU::JR5 ~~S~~ :.
• SKI P T~T TO

T8 PHA$~ ~s IF PROGRAM

CArl. /IIo~

4I·.1t ,:&,; ~A" •••• (~ •••••• ic:

•

:
:
•••••

OUTIt¥' TIXT

HOTEl

....
....
··. .......:
F~R

•

•••• ¥.i¥~' ••••••

•• ·NO
.•

ft· E2
•• TEST

TH~

••
••••STn~!U~~RTO
*o1.~........ :

x
oz···..

TEST FORI

MARK

uo,:~~f~~.

•••••••••••••••••••

•• • • • • • • • • • • • • • • • ••

...D
F3'··..

•

eo •••••

.1~

••••

II.... *. . . *.•.•... ,.., .X::¥b
1.
••

TEp

Er~~.

••

••

•• YES

I~

.

F4 ••••••••••

TRANiFER

Shu~~uP:~~~~

•

:
.

I~ • • • • • • • • • • • • • • • •

• /110

x

•••••
•
BZ •
•• ••••
•

·••••.
••••••
K

• F2 •

Section 3: Charts and Routine Directories

101

Chart CO.

Phase

Co Overall Lcgic Diagram

••••••
·co
• 81·
••
•
x

SCAN2

.*

BI

•••

••

.. ..

OECl.·.
82
••

.*

*.

• •••• B1.·· •• •••••

*.

.. ..II·

•• X.:·
T~5~
.:.~~~ ••••• )(.:. (ilh~~~ ·:.~~~
•• Of CLARE ••
••
••

*..*

•• ••••
•
81 •
••••

·.

*.

• NO

•

..... X:

.

.• x•••••••••••••••••••••••••.

Ie

IICOl
X
Cl
••
• •••• C2 ••••• • ••••
•••• TEST •••• VI'S
: CHECKO~VNTAX:
••••••
••
FOR
•••••••••• )(. DEClARAT ION ••••• X. III •
•• AllOCATE ••
•
OR
.)( •
•

•••• ••••

: ..~~~~~ll~ ••• :

......

• NO

X
••

01···..
TEST

*.

c~r~

••••

CAl~~: •• 02 ••••••••• *

•

•• YES

••••••••••••

**.
••.**

X:••

PROCESS

sTln~ENT

•

'"

: •••

••••••••••••••••••

•

~

• NO

x

EI

••

••

•••

SCANT

••

• •••• F.2 ..... • •••••

"'.

TEST

..

•• NO

••• ~0~R8~~A~F ••••••••••••

"'.

"'...
•

VFS

K

•••••
·CS •

• B2·

·

••

102

•
•

I(:..

TRANSFER

STI\TEME~T

•
•

.................
TE~ ~Vf~~~T
PROCFSSING

•

: ••••
•

•

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

• NO

•••

••

THEO(~U(ISI

•

:
•

chart

cs.

Phase CS Overall Lcgic Diagram

NOTEI
lNPlIT FROM PHAS E C lF PROGRA"l
DOES NOT CONTA1N 0 CLARE, CALL
OR ALLOCATE STATEM lilTS

1

..

•••••
:C~:
•

;x •••••••••.•••..••••••••••••.••....

SCNA

•*

.:**.

92

•••

••

*.

TEST

•
.:.:~~ ••••• )(:

...*••
•• • ••NO
x

C2

•••

eflC'

• •••• B~ ••••••••••

P~91f~~E~~E

••

•

('I

: ••• :

•

•••••••••••••••••
III

)(

FORMAT

• ••••c ~ ••••••••••

••

••
*.
•
• •
.:. ~~5IM~~~ .:.:~~ ••••. ~~~~~~\I~~ :... :

••

·0

.. ...•
•

••

NO

X

•*

02' ••••

*.

. : . T~M ~R *:.~?
•• PR OGRAM ••

*..*

•• • ••YES

x:•

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

TRT~~ •••D3 ••••••••••

•

••••. x:•
III

sTI~~~~~~RTn
OUTPUT TF.XT

•

x

•

t• .. :
•

•••••••••••••••••

K

•••••
·CV •
• 112·
••
•

Section 3: Charts and Routine [irectories

103

Chart

ev.

Phase

ev

Overall Logic

Diagr~m

..•

•·cv
•••••
• 82·

.x ••

0 • • • f!" • • • • • • •

X

SC'!A

82

••

•••

••

.. ..

e • • • • • elf • • • • • • • • e., • • • c.

SCNZ
• •••• 83 ••••••••••

*.

*

••
TEST
•• YES
•
••
FOR
••••••••• '" X.
•• LA8ELlS I ••
•

*.

*

•
•
•

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

*

CI

PROCESS
LABEL'S I

•

• NO

•

.

·

• X."" ••• " •••• " •••••••••••••
X

C2

NO ••

•*

•••

POAI

••

• ••• *C3 ••••••••••

*. ••

..•..
TE ST

: •••••• ~O~pf~~P ••
*..*

••

•

·········n X:•................
OP~I~NS
.•
YFS

~~O~E~S

•
:

x· ••..••••••••••..•.•••••••
02

•••

POCI
• •••• 03 ••••••••••

••

••• =O~EnEC:· •• YES
:
••• ~NOL~~~EC~ •••••••••••

.. ..

X:

~F~rs!~~Y

:
•
: ••••

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

*..*

•

• NO

S~n~~FNT

•

x

E2
TEST FOR I

ENTRY, PROC.
S~~l~kECALL •

•

•••

••• X••••

CHAIN

••

....

• •••• E4 ••••••••••

• ••• YES

TEST

•••. ••••

······OI················ X : ••••l~lFYI~t•••••:::
:

•• •••·•••••• ..

'·X:

~U~~~~~~
~~U~~

• NO

x

•••
F2
••
• ••• F~~SIN •••• YES

.. ..

CHE KON
• •••• F3 ••••••••••
:
T~R~2~~~1T :

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

•• ON-STATEMENT ••••••••• .., K*

••

*..*

••

•

•

• NO

x

••
*.••••

G2

•••

••

••

•

•

• •••• G3 ••••••••••

•

YES
•
••••••••• oX.
••
•

PROCESS
END

••

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

• NO

H2

•••••••

ENOl

*. ••

.. ..ft·
.x..
e·
..

TEST
FOR
• END'

8Y A

PROC-ENO

•
•

x

*.

TEST
•• YES
*.••••FORPROGRAH
END OF
••••••••••
••
)(

*••. .••*

•• ••••
•
82 •
•••••
•

•••••

·EG •
• AI •

• NO

•••

·

• X••••••••••••••••••••• !) • • • • • • • • • • • • • "

·····J2··········•
.................

TRTSC

•
:
•

•

104

X

~~~~~~~~T

WlTtt:lUT
CHFCKING

••••

: •••• )(: 82 :
•
•
•

•

• •••

.

•••••••••••••••

Table BX.
Phase BX 48-character Set Preprocessor
r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~

ITranslates keyword table to inter- IBAOO
Inal code and initializes
I

INon~

I

I
I

r-----------------------------------+---------------+- ----------------------------------~

I BA1

I Reads a record

I ZURD (AA)

I

r-----------------------------------+---------------+- ----------------------------------~

IScans text

IBA1A

INone

I

r-----------------------------------+--------·-------+ -----------------------------------~

IHandles operators and keywords

IBA5

INone

I

r-----------------------------------+--------·-------+ -----------------------------------~

IReplaces operator keywords

IBA11

INon~

I

r-----------------------------------+--------·-------+ ------------~----------------------~

I Replaces comma-dot by
Iwhere applicable

sE~mi-co.hon

I BA20
I

I None
I

I
I

r-----------------------------------+---------------+- ----------------------------------~

I Deals with quote marks

I BA25

I None

I

~------------------------------------+---------------+-----------------------------------~

IMaintains parenthesis level count

IBA30

INone

I

r-----------------------------------+---------------+- ----------------------------------~

IReplaces period-period by colon

IBA40

INone

I

r-----------------------------------+---------------+- ----------------------------------~

IProcesses a slash

IBA50

INone

I

~-----------------------------------+---------------+-----------------------------------~

IReads one record ahead in case of
Ineed

IBA70
I

INone
I

I
I

r------------------------·-----------+---------------+ -----------------------------------~

IRestores the situation when a read IBABO
lahead has taken place
I

INone
I

I
I

~-----------------------------------+---------------+-----------------------------------~

IPuts out converted text and origi- IBA90
IZUBW
I
Inal
text onto backing store
I _______________ I _ __________________________________ JI
L
___________________________________
~

~

Section 3: Charts and Routine Directories

105

Table CA.

Module CA Read-In Common Block 1

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

Function

1

Subroutines

1

I

~-------------------------------------------+--------- -----------------------------------1

IProvides subroutines common to all five
1ACONST, DECINT, EXP, EXPAND, EXPLST, IDENT,I
Ipasses
of the read-in phase
1MVCHAR,
OPTOR,
SCONST, SINGLE, SQUID
L___________________________________________
_________
__________________________________
.1I
~

Table CAl.

Module CA Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------,
I Routine/Subroutine 1

Function

I

~------------------+---------------------------------- -----------------------------------

ACONST

Checks for a valid arithmetic constant.

DECINT

Checks decimal integer.

EXP

Diagnoses expressions.

EXPAND

Expands iterations of string constants and picture characters.

EXPLST

Checks for a list of expressions separated by corr.mas but enclosed in
parentheses.

IDENT

Checks for a valid identifier.

I
I MVCHAR
I

Moves text from one address to another.

IOPTOR

IChecks for an operator and replaces the two-byte operators by oneIbyte codes.

I
I

I

ISCONST

IChecks for a valid string constant.

I
I SINGLE
I

I

IDiagnoses a single expression in parentheses.

1

~

ISQUID
for a valid subscripted and ___________________________________
qualified identifier.
I1
L__________________ IChecks
__________________________________

106

Table CC.

Module CC Read-In Common Block 2

Ir-------------------------------------------T-------------------------------------------,

I

Function

I

subroutines

I

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

IProvides subroutines common to all five

Ipasses
of the read-in phase
L
___________________________________________

Table CC1.

I CHAR, CHECK, KEYWD, MESAGE, NONEX,
I
INULINS,
OPT£ST,
PleT, FREC, SCFLOW
_________
__________________________________
JI

~

Module CC Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
Routine/Subroutine I

Function

I

------------------f------------------------·---------- ----------------------------------~

CHAR

Diagnoses the CHARACTER and BIT data attributes.

CHECK

I

I

Tests the top entry in the stack.

I

I

KEYWD

Iden"tifies keywords and hands back the replacement character to the j
caller.

MESAGE

Provides a diagnostic message.

NONEX

Checks stack for non-executable statements.

NULINS

Inserts null statement in output text.

OPTEST

Tests the output string and moves text to the output.

PICT

Diagnoses a picture.

PREC

Diagnoses the precision, and the attributes and fornlat items which
use it.

ISOFLOW

L __________________

Table CEo

~

It uses a TRT table set up for the purpose.

Bumps
stack pointer and checks for _________________________________
stack overflow.
__________________________________
_

Modules CE, CI<, CN, and CR Read-In Keyword Block

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

I
Function
I
Subroutines
I
~-------------------------------------------+-------------------------------------------~
IProvides tables of keywords in internal
I None
I
Icode, together with replacement code.
I
I
INo functional code exists in these modules. I
I
IRefer to Appendix B for details of keyword I
I
Itables.
L
___________________________________________ I _________ __________________________________ JI
~

Section 3: Charts and Routine Directories

107

Table CI.

Phase CI Read-In First Pass

r-----------------------------------T---------------T-----------------------------------11
I
IMain Processing I
~

I

statement or Operation Type

I

Routine

I

Subroutines Used

~

~-----------------------------------+---------------+-----------------------------------,1

IControls main scan, identifies
I statements, and analyzes some in
Idetail
I
I
I ___________________________________
L

Table CI1.

I RSTART
IASSIGN, BADST1, BEGIN, DO,
~
I
IELSE, BUMP, END, EOP, ERROR, IF,
~
I
ION, POPLST, PROC, READ, SIGRVT,
I
I
ISTAT2, STRING, plus those
~
I
Isubroutines contained in modules CAl
I _______________ land
CC
___________________________________
Ji

~

~

Phase CI Routine/Subroutine Directory

r------------------T----------'----------------------------------------------------------,
I Routine/subroutine I
Function
I

~------------------+--------------------------------------------------------------------~

ASSIGN (CG)

Diagnoses an assignment statement.

BADSTl

Recovers from failure to recognize a statement type; skips to next
semi-colon.

BEGIN (CG)

Checks the BEGIN statement and makes an entry in the first pass
stack.

BUMP

Advances the input Data Pointer (DP), skips blanks, if any, forcing
source text to be read into storage as necessary.

DO (CG)

Checks the DO statements and makes an entry in the first pass stack.

ELSE (CG)

Unstacks an IF compound statement.

END (CG)

Processes three different types of END statements; PROCEDURE-BEGIN;
DO; iterative DO.

ENTRY

Processes ENTRY statement.

EOP

Processes end-of-program marker, and returns to compiler control in
order to load next pass.

ERROR (CG)

Handles false starts on possible statements.

IF (CG)

Scans the IF statement and makes entry in first pass stack.

ON (CG)

Diagnoses the ON statement and makes entry in first pass stack.

POPLST

Removes prefix options from the text and places them in the dictionary.

PROC

Scans the PROCEDURE and ENTRY statement and makes an entry in the
first pass stack.

READ

Reads source text into storage, translating it into internal code,
except for character strings; removes comments; prints source listing and prefix options.

RSTART

Controls the first pass scan.
dictionary.

ISIGRVT (CG)
I
ISTAT2 (CG)
I
ISTID
I
ISTRING
(CG)
L__________________

108

Enters statement labels into the

Scans SIGNAL and REVERT statements.
Handles all other statements.
Statement identifier routine.
~

Scans
character strings.
____________________________________________________________________
J

~

I

Table CL.

Phase CL Read-In Second Pass

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

I

I

statement or Operaticn Type

IMain Processingl
Routine
I

I

I
I

Subroutines Used

~-----------------------------------+---------------+-----------------------------------~

Iscans for statements handled in
ISCNA
IBUMP, DELAY, DSPLAY, DO, FREE,
I
Ithis pass, analyzing them in
I
IGOTO, ITDO, LABEL, PROC, RETURN,
I
Idetail. Skips over other statements I
ITRTSC, plus those subroutines con- I
IL___________________________________ I _______________ Itained
in modules CA and Cc
I
_ __________________________________
J
~

Table CL1.

~

Phase CL Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
BUMP
Increrrents the input Data Pointer (DP), skipping over clanks,
I
obtaining a new text block if necessary.
I
DELAY

I

Processes DELAY statements.

I

I
I

DSPLAY

Processes DISPLAY statements.

DO

Processes DO statements.

EOP

Processes end-of-program marker, and releases control to phase CO or
CS, or CV (CO and CS are optional phases).

FREE

Processes FREE statements.

GOTO

Processes GOTO statements.

ITDO

Processes iterative DO statements.

LABEL

Diagnoses LABEL attributes.

OPTION

Handles OPTIONS attribute on PROCEDURE or ENTRY statements.

PROC (CM)

Analyzes PROCEDURE attributes and options, and completes the diagnosis of PROCEDURE and ENTRY statements.

RETURN

Processes RETURN statements.

SCNA

Main controlling routine of this pass.

L.TRTSC
__________________

~

I
I
I
I
I
I
I
I
I
I

Skips
over all other statements.
__________________________________
__________________________________ JI

Section 3: Charts and Routine Directories

109

Table

co.

Phase CO Read-In Third Pass

r-----------------------------------T---------------T-----------------------------------,
I
I Main Processing I
I

I
statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IScans for DECLARE, CALL, and
ISCAN2
IATTLST, BUMP, CALLOP, DECL, DEFIND,I
IALLOCATE statements. Analyzes
I
IDIMS, ENTRY, ENVMNT, EOP,
I
I syntax of attributes by calling
I
IGENRIC, LABEL, LIKE, USES, IVLIST, I
lappropriate subroutines
I
land those subroutines ccntained in I
I ___________________________________ I _______________ LImodules
CA and CC
L
___________________________________
JI
~

Table COl.

Phase CO Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

~------------------+--------------------------------------------------------------------~
ATTLST
Processes an attribute list.
(Recursive)

BDCL

Processes DECLARE or ALLOCATE statement.

BUMP

Advances Data Pointer (DP), obtaining new input block if necessary.

CALLOP (CP)

Checks CALL statements and options.

DECL

Processes the DECLARE and ALLOCATE statements.

DEFIND

Checks the DEFINED attribute.

DIMS

Examines the dimension specifications.

ENTRY

Checks the ENTRY attribute.

ENVMNT "

*"' •••

'"
•
•
•
•

X ......
1;".....

R~PLf.CF.

0*

k

• •••• "" ••••••••••
:
GE~~~A~F.
:
X.
'4ElSAGE
•
: I Ni~~FR~UI1~Y :

•••••• "''''*.~ •••••

.....

r: PL 7. 0 '

•
•
0 0 !lY.
nrc' lnNARV
••• l'.:Ht~C'(.
RfFFRfNCr:.
•
• •

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

,.

• YB

•• • • • • • "' • • • • • • • • •••

·····F"··········:
:

EPL 3~"
•

•

ic

II1'PLACl'
BY

er.n

•
•

..*"'O~~H~~~H
.•.••••••••••

~

r.4"' •••••••••
r.FT TFlIT
•
RF.HRfI'ICF
•
•
(')F ".r'Cr
.X:).o.o •••••••• fJ • • •
ITE'" IN
•
CALL CHAIN
•

........."'.......
x

••• *

·.
•• 1'1 ••
• ***

Section 3: Charts and Routine Virectories

117

Chart EW.

Phase EW Gverall Logic Diagr3m

CEsl~ •••, 1.!••••••••
•:s~a~ ~fil.l9NARY:•
• WI TH SAME Vc8 •
••••••••••••••••••
•
01

~
•••

••

• ••••02..........

. . . . THli A •••• NO
: SET
••
VALfD
••••••••• oIC.
.'l!RUC u~~..
:
••• "

P ERROR

~OOE

• •••• ~l..........

EWERNe

04

0.. .0

EWElD",

i •••• 05 ••••••• • ••

P
:
:
d C~TH::
•••• THM A . ' . . NO
:
lH!NT=6 ~~ :
••••••••• 11. WliH ~HE ~~Ke ••••••••• '(..
"DR
•••••••••• 11. INTO ~RATlH. •
: :
ATTRI au ~
:
••
II
:
AOSA ~Hut. T :

l8

!!R TURi'

•••••••••••••••••

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

• • • ill'

• YI'S

•

"' •••

YES

:•••••••••• xi
EWC~PY

• EWNOLK
•••
:
•• E1
•
•• OR G NA
•
•• STI TV~f

EWOROM...
•.•.
TH·~..
• •••• Fl ••••••••• :
.0•••NO, •••••• 11••••..~i
E E ~t •• YES
.C PY Til. T E '"
OIM~NriONeo
••••••••••
~LEM~NTJNro •
M
••• ~laN~6;...
•••.
.•••
: S RAT H :

.. ..

:

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

.. ,.

• YES

1(.

• NO

....
·.
x
•• J2 ••
••••

···.··G1··········
. .
~

:ewcopy

.COPY §TIIUCTVRE •
: ELE~~~lr~~ 0 :

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

•

·
.
.............
·
.••..Hl..........
.•.••H?••.••..•..
• x........... .

:eWINCH

·........
··.........
.•.
•

FORW1RO ANO
HASH CHAINS

...

•

l!

...n

• 1'1)..

••••••

THi!..
THE ENO •• YFS

fJF A .. ew
••••••••••
•• STPUCTUR£.'"

*. *. •• ••
•

r O~~cE~J~y,

nl"ENs~nNS
PR~~F'IT

...
..H

IF •

...

• J2

.....

THis ••
••
THE f'l(I ., VF~
x.o f1f' THr LIKE .* •• "~.e.
.,
CHAI'I ••

*...
*. ,..

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

'10

'"

'"

• A1 •

.·0
~

)(

x

118

:

................
.
....
... ....0 ..
•

"'.

• J1 •• ".
••••

:

.lI . . . . . . . . .

:.~......

·

K

EWElO"

: rN~W; 8~~ITE :

, NO

o.

,..*

J4

••

F.NO OF

*. ••

VE C ; .

. .•.• ?' .. t~U~NF.~ ••••••• '(:

.

**.
••.**

.. ••• •

.*.*

Jl :

"''''.k~''' ••••• '''.

NOTE

•

...••.....•

•,

•

IEMf'f
X
·'~···AI
•
RfVfRSF
:
s5~r~~E:~LE

Diag~3m

Phase EY Cverall Logic

Chart EY'.

I

~~:~~

FROM PHASE E P OR
EW (OPTIONAL!

•
:

.. ...............
it

EY16

··'···111··········

•
•
•
•
•

SCAN PROC
AND O~CL ARE
CHAIN F~R
AllO AT
STATEMEN S

•
•
•
•

..,...............

•

" • • • tI • • • • •

..

•

XJc

leM~~ •••C2 ••••••••• 0

CI···..

".

.,.

••••

•

0

eND OF
•• y e s .
CHA INS
•••••••••• X.
••
••
X.
••••
•

•. ..

02

•
•
: Ht=' ~~O E~fH :
• UP ATTR Illurrs •
•,
•

Il.

••

O~

.. ..

*..*

••

•

:.~~.:..

.*

III.

E2

.•.x

*. •

••

.. ..

EYl4
• •••• 0 . . . . . . . . . . . .

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

NO
:
OPY
:
~~R VAil. W,VH •••••••••• ){.VARIAiLE·S O.E ••
•• THIS PTII. ••
•
•
• YES

.

•

·.···.E3·••••••••R...• •.....•
·••••••••••••••••. ....

•

.

• X•••••••••• It • • • • • • • • e •••••

••

OFE~fxT

*.

•••

r;eX&~·MA·e..

-...

• NO

it

• IF TEM IS
•
• STRUC URIJ.C~CI(.
ON I t~
•
O~~LAR T ~M

•••

..··PO'NT 11. •••• YES
•
•• QuaLIFiER ••,........ X••

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

:r.'~CR

•

it

•.·•.•01·.··it ••••••

: EY17

..,... E1··········
n :•
.......•....
,.....

••••

(lX ••••• C2 •
(l.
•
(l
••••

..0..............

• NO

:EV21

o.

SCAN TEXT

o·

~

*•

.*

YES

.:.,
••

•
•
• REPLAC! PTR.
• AND VAil. AeLF . . . . . )!. C2 •
• 'N TE XT Y D.

'

•

NOTE I

B:K: :

MOV~U

g'HI8~t:~ K~J~~ENCE

Gl·i••••••••

:
••
•
.COpy NV ~E~ONO.
•
.F I LE STAT M NTS.
••••• ASSOCI A E
•
WITH
•
•

:)lI.~~~~~~~U~~ •• :

Section 3: Charts and Routine Iirectories

119

Chart FA.

Phase FA Overall Logic

•·FA
•••••
• A2·
••
•

·•....••••..• .
•

Al ••••

Diagr~m

NOTEI

•
INPUT FROM PHASE EP OR
IEMFAX
PHASE EW OR PHASE EY
.INITIAL IlE. GET.
• SCRATCH fORE. •
~ l~~¥T ,og ~UT :
.SET UP ~o¥NhRS.

••.•·AZ········••

CE32
X
••••• AI·····.·· ••
:
F~8~EI~~~i :
•
TO
•
• OUT PUT Nt EAS •

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

•••••••••••••••••••

•••••••••••••••••

• BI •• x.

CE31
X
·····BI··········
: T'~~P p8Y~~'
•
AND CALL
•
•
CENOTS
•

:

•
•
•••••••••••••••••

CE300
X
••••• B2·····.····

:B~l~~ ~:v~E~tST:

• •• X.TRANSlATE BYTE.
•
AND EXECUTE •
•
TRANSFER
•

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

•••••••••••••••••
x
•••• B2 •

X
••••• c I ••••••••••

CE30

• •
•• BUMP INPUT.
•• TEXT POINTER ••••••••

·•••••••••••••••••
.
••••

..• .•
x

•••• CI •

••••

CEINT
••••• F I ••••••••••

•

•
•
•

CALL CECON
CONSTANTS
ROUTINF

·

••

.
•
•

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

CEI SUfi
·····GI··········
•
MOVE SUB
•
•
AND BINARY
•
•
CONSTANT
•
•
TO OUTPUT
•

•••••••••••••••••••

.••••FZ···•••· •••

CEKFY

• PICK UP KEYWORD.

:•

IMN~~~~5h

:•

.................
RELEVANT
TRANSFER

•

•

CE2~ •••• F3 ••••••••••

:~~~~ ~~EL~~H

:
•
FOLLOWS.
•
• SET 2ND LEVFL •
•
SWITCH
•

•••••••••••••••••

.·.··F4··········
:

CEBNK

CFL:,~~:~5

..........

.FOR ( INCREASE •
• BRACKE T COUNT.
• FOR I REDUCE •
• BRACKET fnUNT •

• IF VALID DICT •
.REF "lOVE TO 01 P.
~H~ ~a~K THR :
• NOH lfRJ !lYTE •

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

•••••••••••••••••

·····Gz··········
•.................•

CEOIIA)(

.MOVt' TEXT FROM.
.1 NPUT TO OUTPUT.
•
TEXT UNT I L
•
. . SIGN I S FOUND.

..•.....•
•• x.

···.·*Hl··········. ·•···*Hz·.·····....
.................
·
. ·................. .................
•
•
•

x
••••• H3..........

CEKPFR

CESMCL

CLEAR FLAGS •
AND
•
COUNT •

fI~ACKET

• GO TO PIC TURF •
•
ROUTINE
•
•
IN IEMFB
•

•
:
•

•

MOVF

S~~~~P~~

•
•
: ••••••••
•
• •

QUALJ FIFO.

HAME

x:

MOVF

81 •

••••

it
• •••• HIt ••••••••••
•

CEKSN
• •••• HS •••• • ••• ••
.STORE RELEVANT.
•
STATEMENT
•
.NUMBER MOVE SN •
• FTC TO OUTPUT •
TEXT
•
•

..................·..... .................
•....•
··
.
.. .................
1~5Nbb~~~~
BLOC K

:• •.••
•

~

• Al •

CEKPRC
*····Jl··········
• UPDATE BLOCK •
•
LEVEL AND
•
:COg~hA~~A~~~P :

·

.

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

.

··.···J7.·········.
·..................

CFKDC L

.R E'10VE SN. F rr. •
'"
FROM
•
•
nUTPUT Tfl(T •

.
X
·•• ··K2.····**·
•.

•••••••••••••••••••• 0 •

·
•
•
•

~

0.1(0

SKIP I"4PUT
POINTER TO
SE"'ICOLO'4

.
•
•
•

.................•
·.....

•

it

·.....
• Bl •

120

CEKCEH
····.J3···· ••••••
..
BUMP
..
• I HPIIT POI HTER ..
•
OVER CHAIN
•

•

•

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

CEK I no

CI'~ON

• ••• ·JIt.· ••• •••••

• UPDAT E BLJCK
•
A'In COIJ'4T

•
•

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

·.·.·JS····.·····
.MOVE ALOCK LEVL.
• CJU'4T ANI' ON- •
*CO,., TI') DIP SFT.

:g~N~H~o~I~bNg~:

·
. •.•··K4·····. •••· ··*··1<5··········
·.................. ·................... .................

:tKF.118
·····K3··········
•
•
•

GET NFl(f
flLOCK
IN CHAIN

•
•
•

CEKEOP

CF.'IOTS

• UPI1A TF END OF
• TEXT RFHRE'ICE
• RF.LEAS~ I~PUT
'" AND SCR"TCH

~

..

**** ••
.FE
•

.'11

'"

*

•
•
•
•

•
•
•
•
•

GFT NFW
TF.~T ALnrKn
:HFCK T~XT
'lOT LnNGER
THAN BLOC K

•
•
•
•
•

Chart

Phase FE Jverall Logic

FE •

•••••

••••
·•.....•

• FE •
• A1·

·

••

·

•

.

it

••• · · A l · · · · · · · · · .

•
•
•

GET START
OF
TEXT

·

•• x••••••
x

:
•

.. ..

*..*

x

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

-.

.. ..
END

••••

:MO¥g

12~1

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

•...•02..........

.

.. ..

ING BLOCK

:MO¥~ 6MIG~;NT

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

NO

•••

••

.. ..

•

•

••

••

*. ••

OICT
REF

.. ..

*..*

••

•••

••

.. ..

ENTRY
FOUNO

•

.i:NU··.,oO •••

to...
BH~hT ·:.:~~

.. ..

••

••

..

G2

•••••

••

*e

.. ..

ARRAY,.
••••

NO

•

III '"

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

AOO • • • •

X.:~lt~F~~~I~8~·:.:~~c
••

fl,

n

*.

<) \:

co ...

*

(I':

•
•

MOVE I)ICT RFF.
•
OUTPUT fFXT . . . . .
•
I(

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

n'"~.TO
~.

..

(;"1..........• •.....

i

G4 ••••••••••

*

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

sb~~t~jpT:

:•

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

0

o•• ee ••••• "el'll'l&.It,.r.•• ft~;~; o••••

• ••••

.. "'X:•

III"

•

• •••• F4 ••••••••••

• UPOATF.• ••
INPUT POnlTER ••••••
•
• OVER IICO •
•

•

CELP

DICTIONARV
I'IIITRV

•

YE S

11 til O.

•

•
•
•

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

*..*

•
•
•

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

••

. '"lAKE

NO
•
•••••••• 0oX.
••
•

X

•

•

CEPFOR
• •••• F4 ••••••••••

*. ••

• •••• " 3 . . . . . . . . . .

YES
•
UPDATE
•
•••••••••• X. INPUT POINTFR •
•
OV ER KEF
•

.!.

•

••

E3

•

CEnDRF
• ••••1'2 ••••••••••

NP

GI

••

•

o.
1(..
••

: x.

•••

•

.:.
••

SCAN.
OICTIONA~Y
•••••••••
•

•

K

••
••
• '.

:

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

••

• NO

1'1

:

L ANO •••••••••••••••••••

CEIO
• •••• E2..........

*.

•"
•• YES
•
•• IDENTIFIER . . . . . . . . . . 1(.
• '.
••
•

*.

•

• C AFTER fOENT •
•
flYTI'
•

K

EI

:

CEKON
YES

R£e~lT •••••••••• X.INSERTING
•

•
:

•

NO

"'. STATE~NT..
••
••

e.

~MI5~~NT

A.... O••••••••••••••••• X.
•• •••••••••• X.INSF.:RTINGL
• C OF CONTAIN•

01*s x .. ••••

OR

B3 ••••••••••
VUMP
•
INPVO ~~~~TER :
STATEMENT
•

CEK~=~ ....C2..........
• ••• YES

•••

.4'·

•

00)(:•

X

K

•

:

BY 1

\1. . . . . . . . . . . . . . . . . 0 • • • • • • • • • 01• • • • • • • • • • It • • • • • • •

C1···..

4_.

.

••••••••••••••••••••

• NO

••

INPU'u~gINTER

CEKPRC
• •••• !I~..........
."OVE
TATEMFNT.
·:.:~~ ••••• X: TgMln~~'
: .......
••
•
L ANO C .

P~~812R

.~...

X

• •••• A2.···.·····

•••
Bl
••
••••

,~.

,1\2 •

• x••••••••••••••••••••••••••••••••••••••••••••••••••• oOOO.,ftC00,.,,,eo

cn,'

•
•
•

•••••••••••••••••••

• :'~

Diagr~~

MARKfR I N .
OUTPUT.

..•.....•

•

F,~~H~~ OR
PSFIJfln-VAR
"II\RKF R

"'

: ••• :
•
•

•• X. A2 •

it

•••

..

••
••
••

HI..

CEKEOP

-. ••

...EOP

III.

••

•

K

1110

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

·.

lit-

H2

•••

••

• •••• H' ••••••••••

*0 ••

•

••

....•••.•.•.•••..•
.
....
..•.....•
••••.JZ..........
••.••J3 ...........·
·
..
. .......
•

YFS
••
•••••••••• X..
••
••

-...
o.
FIRST

YES
• UPDATE START
••••••••• ,X.
OF 2ND FILF
••
•
POI NTFR

•
•

_.

• NO

•• X. 1\2 •

K

: MAKE IN LUO:
:
.CARD OIC~ ENlRY .......... )(.
•
• •

•••••••••••••••••

G;!R~Q?KlR

:
IF ARC LIST
••••• ,.".
IN PROGRAM.
)(

•••••••••••••••••

·"1 •

• 1\ 1 •

section 3: Charts and Routine Cirectories

121

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

Phase FI Jverall Logic

Chart Flo

.·.

*••••
• FI •

• AI.

CESI~! . . A2.:........

:••••••••• X.:

!~Vl~HitH

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

STORAGF.GET
FIRST I'IPUT •
•
TElIT 8 U I C K . .

•
•

•• A3 ••

• A2 •

...... AI.a..........

:•

....
·.....

Diagca~

lO~OAlA~VTE

CE02~l .. A3.: ••••••••

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

:

:
8 P
APPROPRliTE
.x ••••••••• TEXT rolNTfR
BRANCH..
• •

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

.

.. ••••
85 •
•••••
•

•

ox •••••••••••

~

BZ

:
•
•
•

•••

CfI)REF....

••

1'3

CECMflK...
84

oil.

CEJU"IP

.. ,

...... 85 ..............

NO ••••
. ' •• YES
•••• ,l;l~T . ' •• NO
•••• SE~~NO ..... VF~
:
BUMP
: ••••••••••••••••••••• IS IT 00 •••••••••••• X•• ~MWRR~oi~I~ ••••••••••• X••• ~EV~~R5TOII~ . . . . . . . . . . . X: S:ANA~O\NTFR

o·

**.. . *
•

**.. .
••*
.. YES

*.:).
*• • .-:.'1O

:
:

•••••••••••••••••••

x

oil . . . .

K

CEKEYW
Cl
••
• •••• C2 ••••••••••
. . . . 'S IT •••• YES
:
TR:~l~ATE
:
••
KEYWORD
•••••••••• X.
EXFCUTf
•

•. ••

.. ..

:

• NO

:

...

• 111

•

••

KN8:,.a~lO ~S

:

•

03J. •.

K

01
••
•• RIGHT ••
• •••
••
OR
•• NO
•
•
••
lEFT
•••••• x. A3 •
• ".RENTHES IS.
x.
•

*. ••

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

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

:

~~k~~t~~

CERFMT...
nit
••

t:ue .'.,

...*
.. ..

••••

it

FOR I 8UMP

•

COUNT.

•

•
:
•

·..................
:8M~KPR~gP2l·

CFKON

Cf SMCl
••••• Hl········.·
•
SET OFF
•
•
ALL FLAGS,
•
• ClE AR 8RACKET •
•
cnUNT.
•

CFPR8G

•
:

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

: ~~~¥E~F i~l~v

:

BUMP OVER

•
•

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

•

UPOATF.
AlnCK LEVfl
UIr) COUtiT

······JZ··········.
·..................
•
8UMP OVER
•
SUR
• ANIl rONSTA"IT

."

*.

••

.•.

••

•

...

HOCK lfVEL
.NI) cnUNT

~" • 0 0 .. III . . . . . . . . . . . . . . . .

IS
THI SA

1

:

•
..
•

••••

:

1)<;

••••

• A~

Cf F ~MK,
. CEPS,",K

;

"

.. X NJ

...

*. ••

•• ,

*x.

t'l

•

:~~:~i~·;~~~;r6~:

_.J4 I t.! . ' . ,
>lRntir,
., YES

... TJ PSF.UOg-VAP •
O~nP~Il~Tj"~~R :
•
•

:X x "·· H\~f~~NV~~~, ......... I(:
.,

... e.

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

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

TEl) ••

V[

NO

••

••• f'I • • • •

S

•
• • • . . . III ro . . . . . . III (I . . . . II • • • • III ....

x••••
•

r.

..-....
....
....
.
·....
x

C "

" " ' " III ) . III

~

x... ,...
It

0 .00 • • • • •

fI

to " " ....

'I" f

III

I)

•

')

II 0 . . . 0 . . . . r'

.. 05 •

Y. C'

...

l(

...

•

R~ •

...

122

•
•
:
•

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

CEKFOP

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

...

H~

X:

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

•
•

It It .......

CEDOND

• UPOATF IIlnCK •
• UPDATE 8lnr.K
•
LI'V~L M I n .
•
COU'lT AND
:lIMlI~HrA~V~~C. : . " . . . . .
l~~a¥~FOF
•
• •
S T "CK

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

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

crKrtin

••

UPOAT~

• ,.3 .X ..

••

FilE f~TRV

III.

A5 •

..•.•"'4..............

CF.K 11'10
·····H3··········

•
•
•

:Cf ISUB

Kl

•

•
:

F2l~g~bWlk~

·•·•••HZ·········..
·.................

•

CEFIU

•

······Gz··········.
·.................

CEKSN
: •••• GU·; . . · · · · :
•
•

STAT~MENT

X
Oli..........
.

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

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

*..*

·

• YES
• VB
• ........... ~ ••••••••••••• XC'
Ie

YES

•

• ••••

05 •

• ,~..
• ••• NO
....
NJ
:
~~~~ A~~R~~O :
:
••••
EIIROR ••••• . , , , . . . X.' •• C~R~Uf~ •••••••••••• X:oua~~~~Hn~NCf:""

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

CflRCT

•

A2 •
•••••
•

•

• TAKR

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

....

oil

CFGOTO
K
••••• C3··········
A~TI~ETON ..
• OEPEN IN
•
• HER T AN F R IN.

•••

...

•

Ko;

, t.!O
••

, . .- IS IT *" ••
.,
lAST E(1P
••

-. ·If

. ",,-

*t! ...

....

• vrs

_x

.f'K •

·

• A7*

* •

Diagr~m

Phase FK overall Logic

Cbart FK.

••••

•••••
• A2·
••

·•.....•

.

• FK •

• A3 •

x

•••

... 0. A~~A
B3

E"lOFO

••

FNO

• •••• 1\4 ••••••••••

•••• YES

••••

.......
·· ..

s12r~xh

••••••• ,,'",K:

••••

•

•• ••

:

RHHl~

:

:·······lc

CONTROL

•

•••••••••••••••••

• NO

...

• ••••

·1'0 •

• AI.

• C3 •• K.

K

1'02 ••••

····.C3··.•••····

•
:
•

SC AN SF TS

o,HgNl~Y
F"fTRY

•
:
•

•••••••••••••••••••
• • • • • • • • • • • • • • • • • • • • • • CI • •

x.

03 x •.
•••

1'04

..•..0"..........

.....05..•.••....

..1 ••ii••••• ~....

•••••••••••••••••

•• ··END F·· •• YF.S
:
chtlafRTnF:
:cONsl~~~RTLlST:
••
LIS9
.......... 11. lOENTIJfFII.S ••••••••• 1(. 1''1011 stACK
•
••••
....
: A~O £9~SE~!fn :
:
fNFNTRY
:

•. .•

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

• NO

•• X. A3 •

~
•••

CESCN

••••
f3

••

..... ..
.....F2.'.........X.......... FIl •....

•••

Cl'IOLP

Q*..
Eit

•

••

•

• •••• E5 ••••••••••

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

-.... ..

••
•• YES
••
IS ~T
•• YES
•
SCAN FOR
•
••• !OENTIFIER •••••••••••• x•••• QUALI IEO............ )(: :)J"L~~l~ATION ~
• NO

:
•
:

FLA~E~IT

:

III ,FTS

8U~~SR~TR:

•••••••••••••••••

• lItO

·

YF.S ••••
• •••
ASTERISK
••
••••
• •••

••
•
••

·

...•••Jl.a.........:
•

:•

:
.~J

~~X~K

x.
x

..

'3 ..........
..•••.:..........

.· :

~~ '.1:

.•.....:..••...,.

IY

•
:•
•

ic

••
••
••

••

....••
FOUND

•• •

.
.•••••••••••••••••
.
....
.. .
. . •••H5 . . . . . . . . . ...

•• NO
•
•••••••••• ".
••
•

ERR~R

WR T1

shc

OIA~

.. ..

• SAllE

FOERR2
rc
•• ..·*K2 •••• ••••• ..
••••••
:
l~R~f
~
• C3 .".....
WR9T~
..
.'
•
•
0lAGN6sTIC
>.

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

J4· •••

'.·:IK~8yN

• •
••••• •

NO

..~~ dU,8ic~;

••••

•

•

i ••••· · · · ··
ou=Mt.c :
.... .... .......... x::...............
:

CON~~•••

C ~[l~T I" :
sl8
!t IT CK •••••
cu'R" VW~:fRY: :x

~

•
•

:

YES

•• x.

LOW ... ' ~ N~~:Rf··.. HIGH
:
.)(.......... W
N~"T • >• • • • • • • • • " .
oO~~A9~E:
•••• h.~~
fNTRY

8tS"

Hit

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

•••••••••••••••••••••••• 0

*G4.~........

c~~t= 14U~

.................
...
.-..

H3.~. . . . . .. .
••
ER
CP"'.lk
T~~=YlllT! :

•
•

•••

HASH 8CD

••••

•
•

:•

•
:

••

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

••••
·HO

•••••

.

• Je......................... .

"'i~~ ••1'".:••••••••

CE

C3 •

• •••• J5 ••••••••••
ERR9'
:

:

• YES

x

·

C3 •

••••• K4.i........
:

•

01.

~~U~IRY

RfFUE?JE

:
•

•••••
•
C3 •
•• ••••
•

:• •••••ittHfly
:
••••••••••

.....x

....

•• C3 ••
• •

Section 3: Charts and Routine DirEctories

123

Diag~~m

Phase FO overall Logic

.....
••
·

Chart FO .
• FO •
• AI·

• ~.

i:.••.•..•........... •.. ••:::...•..•.........•. •.•·.•:••••.••••.

NOHOY E

A2..........•

..
,A
.I.
.
•• ••••
. : . T~n08E ·:.~~ •••••• X:
SCAN
••

., . .
MOilED

.

••

x

: ••••••••
•

1(.:.••

....

••

A4' ' . .
a
*·,

..... JC.:.••

., ,.

•

....

·:.~?

.....

Nn

A5' '..

e , •••••••• • • • " ,

,..,
X.:· ~~gGa~ . : .

., ,*

.. ,-

•

•

END

YES

••

••

••

., ,.

YF.S

ns

ic

x,
X

QP

• •• ·.81·.··.· ••••

••
•
•

.

•••••••••••••••••

• YES

• II ••••••••

TEXT

•

-, ,.

.Al
. .••,
ORP~r~IN .:.~?

•
•
•

• • •••••
•
.X ••••• 81 •
•
• •

·•••••••••••••••••. ....
SCAN TEXT

..· .. •·· .. ·.. ·x·

x
··.··83··········

·····84.······.·.

•:MA~fiR 0l~l~ f~TRY:•
•
CHANGE 8'ITE
••••••••••••••••••
••

•
MAKF OI~T
•
."NTRY FOR ACH.
o
.:

: :

.

..... ..:.....:
E~~~l\~
~~

N

•••••
• AI·
••
•

• FQ •

X

Q3

:

.

• • • • • • • • II • • • • • • • • • • • • 1 . II I" • • • • • • • • I I .

ic
Cl···..

FKM¥11 •• c2 ..........

QP •••••C3..........

C4··· ••

c·· •.

•••• PROC •••• YES
:
AilE OICT REF :
:ENT~~K~ RI~ICH :
•••• CH
NO
••••••
••
OR
•••••••••• X.O~ ENTRY TYPE 1........
0lSA2LE
. . . . . . . . . " •• OR N~"'~CK . . . . . . X. G4.
••
BEGIN ••
•
• •
COIilOYTI N
•
••
L~T..
••

,1,.

•

: •••• ~~~tl: ••••• :

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

•••• ••••

•.•. .•.•

NO

•

e*

04

••••

YES

.•.xx ..............
••

G •••••

*.

.. ..
·.....F"...........

eo • • • • • • • • • • • • • • •

• •••• 05 ••••••••••

•

•

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

••
LIST
•• YES
•
fIIAKE LASH
•• ITEM • lA8EL . . . . . . . . . . X. II AR 1 ABlE BCD
•• liAR ll8LE ••
•
01 CT ENTRY

*..*

•

• ND

E1

••
• :.
••

.•.x

••

.. ..

*.

END

*..-

.:.!~~

••

•

..... JC:fIIA~6RO~iJF~~TRY:
•
CHANGE 8YTE
•

*

•

•••

••
••

Fl..

.. ..

• ••••

*
.SCAN

*. ••

F2..........

• •••••

MVS IG

F3

•
CflA IN.

ON,
YES
AUTO
•••• f)~I*~II~h . . . . . . . . . . . . K:T~~~ ~~~Tr~g~

.................:.••••.•••

*...
•

•

NO

·x

Gl

•••

••••
••
INITIAL •• YI'S

.. ..

••

...x

HI·.

•• END

*.

OF
PR OGRA...

••

•
:

•••

••

••

.

END OF
LIST
•

•• NO •
..... .

••

Y~S

.. ..

•• FIRST ••
INITIAL ••

•• "'AI(!:

.. ..

NO

*

...
•

MAKE

SEC~NO

°JfiR

lit • • ., • •

•

YES

* ••••••• "
x

••

• NO

• AI •

••

FJlF

l~~~~

o~I'I

• • • • • • • • • • • • )(.)( • • • • • • • •

•
•

.

x.

...

.FQ •

K

•
:

:1~rlSArR~HY~aT: •• '"

•

.

••••• •

• G4 •

FOR IIRRAY.

•••••••••••••••••

•

x:

't • • • • • • • • • • • • • " • •

X

R!!

:

...·
••• H~
•• ••••••••
"''''OVF
STATEMENT
,.
...
CHA INING
•

...

•

YE S

K

*. ••

• CHECK UST ••
.MAKE
• fJICT ENTRY
•
••
••

•
FNTRY.

................. •••••••••••••••••
.
.
.
······r.4··········.:oo .. x:....
:'
x:
.•................. •....·•................. ....
•

... •••• G3 ••••••••••

YFS

ic
•••••"0; ••••••••••

flEFCHL

• ••• '\'f'4 ••••••••••

*. ••

*...

•• ••••••••• •• ••• • *" •

SMH~iNhW

124

••

*...

.....

MOllE

•••

·

······JI··········.
·..................

: 8EFTRN

G2

•

*...
••

•

ENTRY
"10
0AC T
X•••• PRESENT •••••• , . . . . . X: fOR C NDtTIO"l :

.. · .. ·)(··~~AT~:~~~ F?!.......... X:

• "10

••
••

•*
••

••••••••••

FP010

••

··.H~lhNQ~~~!.····

*.

•

••

•• X. Git •

K

:FKPROC

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

.. .

.1:5. ... . .
X..
* ...
.,. *
•••

•
"'AKE.
• ON-CI1NOITIO'" . . . . . . . . .
•
OII:T ENTRY.

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

•...

• NO

•

ic

ic

LASCO

• •••• E2 ••••••••••

•

•
•
•

• •••

•
81 :
• •••

.. nVf

SJ~1~~~NhW

•

•

AI

•
:

Chart F;:2.

Phase FQ Overall Logic Diagr3m

.....

••••.
··....
.

•FQ •

• AI·

•••

•

....

A2 •

CYfABl

••••• Al •• ~ ••••• "'.

·......

• A3 ••••
•
.
CYFNT)(
•

•••••A2 ••••••••• '.

••••• A3..........

"'••• "'A4."'''''''''' •• '''''''''

:••~~••2:U~~"'.:

INSTRUCTION

:tNITIALlZE ANO :
:
c~~t~uru~s:
:Pt~~~:C~~pURE::
• PICK UP START ••••••••• )(.POSITION OF KEY'••••••••• )(.
CA~CUl.ATi: ••••••• .,~.
•
OF CHAIN.
•
BYTES IN
'"
'" OFF FT. GET •
•

:...............:

:.~l~I~~~.I:~~~.;:

CYIII INE

·.. ...... ..
•

CHARACTER

R~!3

CYOTT
."' ••• G 3."' •• "' •• "''''.
•
PROCESSES
'"
•
PICTURE
•
'" ( HA RAC TF R S
•

P~9t f~~fS
CHARACTERS
S,S,.,-

•

•

•

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

"', "'

C YK

<;I

(YV

:

'.

III

*••••• 1.

C YC

"' •• "' •••• *'"
•'""'··"''''·CI
•'"
PROCFSSES

J>ROCESSES
••
··"'··G~·········,·
PICTURF
••

•
•
•

· .... .........
·. .··HI··········. ·····O>H2.········"..
.. .. ... ....... ·...................'.
•
•

PICTURE
CHARACTER K

""."'

"'

'"
•

:

CHARACTFRS
CP

OR

t

..

::

* ............ $** ••• ·tc

CYG

CYSS

P~OCESSES

•
•
•

PICTURE
CHARACTFR G

'" ~"' "'

CYEK

"'' '

•
•
•

•
PROCESSES
..
•
PICTURE
••
• CHARACTFRS ",7 ••

•••
••
IS."
THIS
•• NO

• •••• JZ ............
•
'IAKF SUR>;
•
.PICTURI' LENr,TH >.

Jl

".

••

..... S~~~'tb~~ •••• , ••••• ., x:
iii.

*. ••

••

A~~r"2h~~~HN

•

:11

• ......... * •• ****1)

'" YES

"'."'.
·· ..

• • 00100 . . . "'0 ... ) ( .

X

X
... "'.'" Kl "''''''''''''''''''''''.'''
'" GO THROUGH
'"
:
C~~~~~~G
: ••••• :
'" INDIVIDUAL
•
'"", ", FIELDS
'"
",.",
",.",
",

.•

... .. ..

::

•

A7 •

••• *

'"
:
•

:...............:

. ....."".. ...... •....F5·····.····•
........... .... .•.......... ..... •..... .. ........

··*••F2··"'··"'···'::·
·..*....... '.

C YSOPM

•'."'."'F 1"'•• '" "'."'."''''
''"'"" PROCESSES
'••"
PICTURE

TU~~~H

"''''''''''.F 3"'' '••• ' ' ••••
'"

CY(PAS

'CHARACfFR V

•

:•
"'•

:•
"' •

P:'Fct~iP

·......."'.."'."'.....
•

:•

1,2,3

•

CYl

..•

CVF.

"'' '

r:H"RAC~ER ~
"

I 8

"'

·
•

•

plI.nCEssrs
PICTURE

.."'

"'

P~7~p~ES

CHARAr.¥F~

"' "'

:

E

•

•

.

rH~~"'CTER

7.

•
•

..

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

CYST ...

"'····H~

•
PROCESSES
'"
•
PICTURE
'"
"'CHARACTEI\S ~,H •

..

• •••• G4 . . . . . . . . . . .

· .•"'' ' ' •.•''.' ·••.·.>i4·····.·. ·•.
·.... .......... ·
.

rYSSfH

•:

:•
•
•

P~1~~~~P

•
•
•

PROCESSFS
PICTUII.E

CH~RACTER

'I

•
•
•

"!"' ............... .

CYP

••••• H5 ••••••••••

•
•

•
:

PRO'CESS~S

••
:
•

......."'.........
CH~~X~¥~~

F

CYENDO
• •••• Jl •• ··"'·"''''''''''
*'"
'"
END OF
• PIC"TURF CHAP>! •

·

.
*

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

......
;

'"

.

.FT •
• AZ·

SEction 3: Charts and Routine Directories

125

Chart FT.

Phase FT Overall Logic

Diagr~m

•••••
• FT •
• A2·
•••

·...·. 2··········
K

ACt

•
•
:
SEC~aN~ILE :
•
•
•••••••••••••••••

.

·

•••• ••••••• x.x •••••••••••••••••••••••••••••••••• .,.o
•

IC

.AC2

AF3 ••••• B., ••••••••••

liZ.....

•••• T~~l •••• YES
:
•• SEC OND FILE •••••••••., 1(.

:~INT A~~E

0JC~~~N"RY

:
•
•••••

:••••
FN ~ITUE~~E :
i ••••••••••••

··l~n~~l~!··

•. .•

• ,.0

••
••

CZ

·K..

••

*.

NO
TEST
••
•••• , .~ORT~t'V OF . . . .

·......
$I.

*•• *

•

*

•, YES

· ..
• OZ •• x.

X

BlA ••••

••••••• OZ •• ••••••••••
• DICTIONARY SCAN.
••
•
••••••••••••••••••
TEST FORI
DATA VARIABLE.
STRUCTUIIEI
EVENT VAR AILE.
M~~h~~R ALE.
~M~~ COfcsTANT.
ENTRY!
F I \ E pAR AMETERS
au
L
BU LT N GENERIC.
FILE

,

X

fIIIVlil •." ••••••••••

EZ'·· ••

:

• ••• T T •••• YES
:
~~tl~NI~$
•• OICTfl!ARY .......... I(.!N~lY IIITO THE.
•• flll¥'Rv ••
• AItPII PilI ATf •

•••• . •••

TIN.

: •••••;~U~•••••:

• ,.0

·•..
.• M n..
GZ

••
F
•• Of' 0

••

ST

• x••• ~ ..)....

••

••

• ••• *G'\ ••••••••••

NO

• SI( P T NE XT
olcTI!;!NAIIY
EIIIY"Y

CTf~ARY.......... IC.
••
•
*..*
•

•• • ••YES

••••••••••••••••••
lc
•• ••••
•
OZ •
•••••
•

126

•
•
•

't . . . . . "

D" I t . e 1'1 • • • • ~

Chart FV .

Diagc~m

Phase FV Jverall Logic

•••••
• FV •
• 81 •

·

••

·•• ••Bl···••••••."

FVO

X

'~

••

RFVERSi
seCOND
F LE

••

POINTER
..
•••••••••••••••••••
•

·X

FV9

•• ~ •• ~1 ••••••••••
:
1~oRl~:AICH :
• ptCI( UP ST~T •
•
OF TeXT
..

•••••••••••••••••••

···*01···
...•••••••
•••
•
IDENTIFY
X

FVIC1

·•••••••••••••••••.

... x:

TEXT ITE"

:)( ••••• o ••

o ••• " •••

•

.

1c:0 • • CI • • • • /) • • • • II • • • • • • • • • • •

...

El···..
K

DEFTST

OEF:~ ••

•

x

•••
Fl..

n.

O~fI

• • • • • • II • • • • • • •

~.fI:

c:

•

AD~

8ASE

:

:

~b S~~~ij~

FV18
• •••• F2 ••••••••••

••••

• ••• YES

:

.... ....

AL~~~~~

:...

LJST :

...:

•••• ALLOCATE •••••••••••• X:M~~A~¥ ... ~~~AF~~E:'( ••••••

•

E3.'••••••••

QfI • • • • • • • • •

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

..

K:

*....
..

• NO

t.).e~t:'-'.o ••

• le. 0110.0 • •

. ' . NO
E2..

••••
• ••• YES
•• O~NAMICALtY.. YES
:
•••• nICT. ~eF •••••••••••• ~ •••• OEFINED ••••.••••••••

*...
.. ..

x••••••••

NO

~~~~.U~=

DATC PY

:.:6~i~6.~i.e

c-(l • • • o • • • • :

..:

o. .•

•
G3

i. NO
••••

•

.STATeMeNTS ~OR •
YES.
: eAC~uJ~o~ TO : ......... K•••• OF L ST •• " •••..•

·0.·
....•

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

K

•••
HI..

••••

*. ••

• ••• YES

.. ..
PRnc

••

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

•••••••••• K.

•

..

• NO

•:*••

J1x •. *.

. .'"
eEGIN

*.

•

~J

NO

...x

••

••

• III

FOP

LAS El S

•.,. •• " ....

•

..

•.. ••••J2..........•

••·: .. :~~ ••••• K:ErH:~C~Y~~1
•

.. .1'1....
1<1

O)O'tIl*"

••

•

FOR. fNTRY

FV2·~

•••

••

FVl q
• •••• H? •••••••••
:nFS~~~R~HN~fS :

*..*

.).

fNV

*

X

III

: ••• o,,"~:
>
II.

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

•••••J,•••.••••••

FV3..

•

~~~~NAW6~

: ......

..*....*.........
ALOCK

III

•
•

~

*• ••

YfS
.*.0 ••••••

•• ••

•.••.*

•

• "2*

)(

...*

.FX

Section 3: Charts ana Routine Directories

127

over~ll

Phase FX

Chart FX.

DiagL~m

Logic

..·

•••••

• FX •

• A2·

X

••••• A7.·.····· . ••:

:

b~~o I~:~~~

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

•
STORi&E AND •
• TEXT BLOCK FOR.
•
SORT TABLE
•

:X························:·YE~····················,·· ........................ :
•••.•B2..........
113 •.
••••• ............
8'5 •.
.1h~lk&TE··

NO

FX"':>"-'

x

•••

:
:
•

SCAN STATIC
CHAIN

:
: •••
•

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

0 ...

FX'r'l~

.. ..

•• N O :
. . . . . . x:
•

x.cg~Plb~~IHAs~ ••• '
•• NAME..

Fx"r3"

~

•••

... .

:
•••• END . ' ••
ENTRY: •••••••• U ••• OF' CHAIN ••••
•
••••

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

•

sou

•

YFS

·····C2··········
ic

FK(\lN1

•• SCAN PROC-REGIN.•
•
CHAIN
••
••

-)C • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

•••••••••••••••••

·

x
02···..

•_
. . ••
••
END

.. . ."
....
·•....E2 ..•. .
•··.··E2·········.•
·•••••••••••••••••.
...

OF

••

CHfllN

••

••
••

NO

•••••••••• lC*.

-••
"
• YE S

•

K

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

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

x*

G 1 • •• ••

AUTOMATIC •

•••

pul~NE RS

•..•
..

·.
.

..
..

•

:

.

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

YEi •••

......,0F

CHAIN

••

....x

••

NO

•

•

ADO

STATE"'E~T

•

: ••• :N~~:E~HI~ 5~NN:
•
ENTRY
•

·•••••••••••••••••.

128

••

*: •

"ENTRY TYPE ••

.. II·

l(

·.3,",5 .•
• NO

..
.••
•..................
.................
FK,.~~ •• F5.a••••••••

• ••••F ...;. ••••••••
SOltT EH'''V

•
••

:
•
•

•••••••

•

SORT ENTRY

•

••••••

Fxl~2 . . *G3 •••••••••••

.,c •

PRIIfr eCD
•
A~F~Ifv~D• •

••••• •

•••••••••••••

• r,z •

••••• •
X

.*

H3

••

H..

*.

...- ·······X··

••
'ITII.
•• NO
• ••• LIIMNG ••
• • • 111

• YFS

"•

lI

••
••••

• III.

:

••

*0 ••

H5

• ..

NO

••

•• END OF
~a:IN

·...••J3.·.·.·.····

L~~Q~NG
•

...

YES

N3

••

• YI'S

•••••
·GA •

~

PRINT
'TTR IBUTES

•••••••••••••

*. ••

······x··x•.•. *..
•..•
*•• _
_•• _ *
KII iF

ic

x

*.

~ •••••••••••••• :;~.:. c~~glT~~N

._.

••••• JJ ••••••••••

••

••

• NO

1"5

: ••••• :

..

YES

ENO

••

•

~

.*• *DIeT REF •• *.••
•• *.
••.*
*••
• *
YES

:t. 05··· •. *.

•• K. EZ •

ic

.. NJ
• K. •••

X..

••

fJ • • • •

•

X

•

10:·..

FXP!=I •• G2 • : . . . . . . . .

••

*r ~ ..

C HAl N

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

....
:

•• V E S .
• •
•••••••••••• X:SCAN SORT CH"IN: •••••••

NO

:

o.............•

IU.4I£ 3.~ ••••••••

•

-..*
.. ..

• G2 ••••

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

FX()

F3···..

X · •••• • :

Hl

Co

X.

*. • ••YES

FZ···..

••••

•

• _ •••••• ')

:
YES •••• END OF •••• NO
•• 1tLocAT
NO:
.X •••••••• -,
CHAIN
• -. ••••••• •••
OR.
•••••••••• X.
..
••
••
•• "'''''''ETER..
•

SC.N TEXT

•• END OF
••••
TEXT

•• NO

••

x

FK(ll:~ •• Fl............
•

•.SCAN

.. .x •••••••••••

... SCAN CONTROllEO.
•
CHAt"!
•

:

-...
ANY

PA RA fifE TE A. S

••

FK01~Z ••

K.

FX:Hl"

••• x*

03···.. *.

•• Al·

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

•

....

Table ED.
Phase ED, Initialization
r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
ISets up routines in scratch core
ISETUP
INone
I
Ifor phase EL
I
I
~
L ____________________________________ i _______________ i ___________________________________ J

.Table ED1. Phase ED Routine/Subroutine Directory

I r------------------T--------------------------------------------------------------------,
I I Routine/Subroutine I

Function

I

I

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

I

I,]~ASK

I
I
I
I
II

ICELL
IRoutines for processing declared attributes.
These set up
I
linformation in the attribute collection area of scratch core,
I
IBASED
IAREA
Ifor reference by CDICEN, etc., in phase EL.
I
J
I POINTER
I
I OFFSET
I
I
L__________________ i ____________________________________________________________________ J

I I EVENT

I

I

I

I

Table EG.
Phase EG Dictionary Initialization
r-----------------------------------T---------------T-----------------------------------,
I
J Main, Processing I
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~----------------.-------------------+---------------+ -----------------------------------i

IHashes labels

ICAAl

ICHASH, CBCDL2

I

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

IPROCEDURE-BEGIN chain

ICA7

INone

I

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

IBEGIN

ICA8A

INone

I

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

I PROCEDURE

ICAPROC

ICANATP, CFORP

I

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

I ENTRY

ICA10

ICANATP, CFORP

I

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

IFormal parameters

ICFORP

ICHASH, CBCDL2

I

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

IAttribute list

ICANATP

ICAPRE1, CATCHA, CATBIT, CATPIC

I

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

Icreates entry type 2 entries for
ICTYPBL
IENT2F, CDEFAT
I
Ilabels
I
I
I
L ___________________________________ i _______________ i ___________________________________ J

Section 3: Charts and Routine Directories

129

.Table EG1.

Phase EG Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------·1
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------.~
CAA1
Scans label table and hashes labels.

CANATP

Processes attribute list.

CAP ROC

Processes PROCEDURE statements.

CAPRE1

Processes precision data.

CATBIT

Processes BIT attribute.

CATCHA

Processes CHARACTER attribute.

CATPIC

Processes PICTURE attribute.

CA6

Scans the PROCEDURE-BEGIN chain for the relevant statements.

CA8A

Processes BEGIN statements.

CA10

Processes ENTRY statements.

CBCDL2

Traverses the hash chain looking for entries with the same BCD as
that just found.

CDEFAT

Completes data byte for entry type 2 entries by default rules.

CFORP
CHASH
CTYPBL
ENT2F'
TYPW
OPTN1 (EF)
OPTN2 (EF)
OPTN3 (EF)
IATTRBT (EF)

Processes formal parameter lists.
t
IObtains an address in the hash table for an identifier.

I

Icreates entry type 2 entries for labels.

I

ICreates or copies second file statements.

I

IScans ENTRY chain.

I

IChecks containing block options, for inheritance.

I

IProcesses procedure options.

I

IPerforms post processing, makes

I

S~ATIC

DSA decisions.

IProcesses POINTER, OFFSET, and AREA attributes.

I

L__________________ ~ ____ ~----------------------------- __________________________________ J

130

.Table EI.

Phase EI Dictionary Declare Pass One

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I

statement or Operation
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
Iscans DECLARE statement
ICCGSO
INone
I

t-----------------------------------+----------------+-----------------------------------i
IScans text
ICCGS2
INone
I
t-----------------------------------+---------------+-----------------------------------~
IProcesses structure level
ICCGSCM
INone
I
~-----------------------------------+---------------+-----------------------------------i
IFactored attribute, left
ICCFLP
ICFP~CR
I
I
I
I
I parenthesis
~-----------------------------------+---------------+-----------------------------------~
IFactored attribute, right
ICCFRP
INone
I
I
I
I
I parenthesis
~-----------------------------------+---------------+-----------------------------------~
IData following DEFINED attribute
ICCDEF
INEWBLK, CTXTRM
I
~-----------------------------------+---------------+-----------------------------------i
I POSITION
\POSIT
INone
\
t-----------------------------------+---------------+-----------------------------------~
I CHARACTER, BIT
ICHABIT
ICTXTRM
I
~.-----------------------------------+---------------+-----------------------------------~
I PICTURE
ICATPIC
INone
I

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

IUSES, SETS
\SETS
INone
\
t·-------------------~---------------+---------------+-----------------------------------~
ILIKE
ILIKE
INone
I
~-----------------------------------+---------------+-----------------------------------i
IKEY
I KEYED
INone
I

t·-----------------------------------+---------------+-----------------------------------i
I Dimension
ICDDIMS
AST, TOMENE, ERRORB
I
ICTX~RM,

~------------------------------------+---------------+-----------------------------------~
I Precision
ICDPREC
IERdNEG, SCLBIG
I
~-----------------------------------+---------------+-----------------------------------i
I INITIAL
IEJINIT
ICECON, EHINIT
\
~------------------------------------+---------------+-----------------------------------~
IINITIAL CALL
IINCALL
ICTXTRM
I
~-----------------------------------+---------------+-----------------------------------i
I OFFSET
IOFFSET
ICTXTRM
I

t------------------------------------+---------------+-----------------------------------i
I BASED
I BASED
\PTVEXP
I
~------------------------------------+---------------+-----------------------------------~

L
____________________________________ ~I AREA
_______________ ~ICTXTRM
___________________________________ JI
I AREA

Section 3: Charts and Routine Directories

131

.Table Ell.

Phase EI Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
AREA
IProcesses AREA atrributes.

AST
BASED (EH)
CATPIC
CCDEF
CCFLP
CCFRP
CCGSCM
CCGSAT

I

IDeals with the case of* dimension bounds mixed with non -* bounds.

I

IEntry point in OFFSET routine, at which second file statement is
Imade.

I

IProcesses.PICTURE attributes.

I

IProcesses data following DEFINED attribute.

I

IProcesses factored attributes (left parenthesis).

I

IProcesses factored attributes (right parenthesis).

I

IProcesses structure level.

I

Attribute routine selector.

CCGSE

Scans DECLARE chain.

CCGSOO

Scans text.

CCGS2

Scans source text.

CDDIMS (EJ)
CDPREC (EJ)

Processes dimension attributes.
Processes precision attributes.

CECON (EH)

Makes a dictionary entry for a constant unless one has already been
made.
Returns the dictionary reference of the constant entry.

CFPMCR
CHABIT

Obtains more storage for the factored attribute table.

I

Processes CHARACTER and BIT attributes.

I
I
I
I

CSGSOO

Detects end of DECLARE chain.

CTXTRM

Tests for space in current text block and obtains new block if nec- I
essary.
I

EHINIT (EH)

Processes the INITIAL attribute except for the initialization of
label variables and INITIAL CALL.

EJINIT (EJ)

Processes INITIAL attribute and LABEL with a label-constant list.

ERRNEG

Deals with the case of a negative precision specification.

IERRORB
I __________________
L

132

I
I
I
I
I
I
I
I
I

IDeals with the case of lower dimension bound declared greater then
Ithe
upper ,bound.
__________
_______________________ ___________________________________ JI

~

Table Ell.

Phase EI Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
Routine/Subroutine,

Function

~

------------------+--------------------------------------------------------------------i
,
GENTRY

,'Keeps

INCALL (EJ)

,'Processes

IVROOM (EB)

'Checks if there is space in scratch storage for another entry.
If
Inot, it makes a dictionary entry and chains it to the previous one
lor to the C8 in text as required.

a count of parentheses in GENERIC and ENTRY processing.
INITIAL'CALL attributes.

,
IVPUTL (EH)

a dictionary reference in the 'initial list' for a label
I constant.
If the constant is not known, a dumrry reference is
,inserted.
'Plac~=s

,
IVPUTC (EB)

,IVPUTO

(EB)

,Places a dictionary reference in the 'initial list' for a constant.

I

,Places the dictionary reference of zero in the 'initial list' for a
'negative or imaginary replication factor.

,

KEYED

Processes KEY attributes.

LIKE

Processes LIKE attributes.

NEWBLK

Obtains new text block.

OFFSET (EB)

Processes OFFSET attributes.

POSIT

Processes POSITION attributes.

PTVEXP (EB)

Entry
made.

SCLBIG

Deals with the case when the scale factor in a precision specification for fixed-point data is declared too Large.

SECON

~oint

in OFFSET routine, at which secondfile staterrent is

I

Icreates a dictionary entry for a constant provided the appropriate
,entry has not been already made.

,

,I

SETS

IProcesses USES and SETS attributes.
I
I
,
'TOMENE
IDeals with the case when the number of dimensions declared is great-I
IL __________________ ler
than 32.
__________________________________
__________________________________ JI
~

section 3: Charts and Routine Directories

133

Table EL.

Phase EL Dictionary Declare Pass Two

r-----------------------------------T---------------T-----------------------------------,
I
I Main Processing I
I

I

statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
Iscans chain of DECLARE statements
ICGENSC
ICDCLSC
I
~-----------------------------------+---------------+-----------------------------------~
IScans each item of DECLARE
ICDCLSC
IATLSCN, BCDPR, CDFLT, CDICEN,
I
I statement
I
ICDIMAT, DCIDPR, INTLZE, POSTPR,
I
I
I
I SELMSK, STRPR
I
~-----------------------------------t---------------+-----------------------------------~
IInitializes each identifier
IINTLZE
I DCIDPR
I
Ideclared
I
I
I
~-----------------------------------t---------------t-----------------------------------~
IProcesses factor brackets and levellDCIDPR
I~EMSCN, BCDPR
I
I numbers
I
\
I
~-----------------------------------+---------------+-----------------------------------~
IScans for next level number
ITEMSCN
\CDATPR
I
~-----------------------------------t---------------+-----------------------------------~
\processes BCD of identifier
\ BCDPR
IBCDISB, CHASE, SELMSK
I
~-----------------------------------t---------------+-----------------------------------~
IHashes BCD of identifier
ICHASH
INone
I
~-----------------------------------t---------------t-----------------------------------~
IScans list of attributes following \ATLSCN
ICDATPR
I
\ identifier
\
I
I
~-----------------------------------+---------------+-----------------------------------~
IApplies factored attributes
ICDFATT
ICDATPR
I
r-----------------------------------t---------------t-----------------------------------~
IApplies implicit attribute
IIMPATT
INone
I
~-----------------------------------+---------------t-----------------------------------~
IAttributes controlling routine
ICDATPR
ICDAT40, CDAT41, CDAT42, CDAT43,
I
\
I
ICDAT44, CDAT45, CDAT48, CDAT49,
I
I
I
I
ICDAT4A, CDAT4B, CDAT4C, CDAT4D,
ICDAT4F, CDAT54, CDAT55, CDAT56,
I
I
I
I
I
ICDAT57, CDAT58, CDAT59, CDAT60,
I
ICDAT61, CDAT62, CDAT63, CDAT64,
I
I
I
CDAT6A, CDATB4, CDATB8
lI ___________________________________ I _______________ ICDAT69,
___________________________________
JI
~

134

~

.Table ELl.

Phase EL Routine/subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
ATLSCN
Scans the list of attributes following the identifier.
BCDISB

Checks for multiple declarations, etc.

BCDPR

Processes BCD of identifier.

CDATPR (EK)

Attribute controlling routine.

CDAT40 (EK)

Processes DECIMAL attribute.

CDAT41 (EK)

Processes BINARY attribute.

CDAT42 (EK)

Processes FLOAT attribute.

CDAT43 (EK)

Processes FIXED attribute.

CDAT44 (J;:K)
CDAT45 (EK)

Processes REAL attribute.

I

Processes COMPLEX attribu'te.

CDAT46 (EK)

Processes precision attributes.

CDAT48 (EK)

Processes VARYING attribu'te.

CDAT49 (EK)

Processes PICTURE attriou'te.

CDAT4A (EK)

Processes BIT attribute.

CDAT4B (EK)

Processes CHARACTER attribute.

CDAT4C (EK)

Processes FIXED DIMENSIONS attribute.

CDAT4D (EK)

Processes LABEL attribute.

CDAT4F (EK)

Processes ADJUSTABLE DIMENSIONS attribute.

CDAT56 (EK)
CDAT57 (EK)

Processes USES attribute.

I

Processes SETS attribute.

CDA'I' 58 (EK)

Processes ENTRY attribute"

CDAT59 (EK)

Processes GENERIC attribute.

CDAT5A (EK)

Processes BUILT-IN attribute.

CDAT60 (EK)

Processes EXTERNAL attribute.

CDAT61 (EK)

Processes INTERNAL attribute.

CDAT62 (EK)

Processes AUTOMATIC attribute.

CDAT63 (EK)

Processes STATIC attribute.

ICDAT64 (EK)

Processes CONTROLLED attribute.

I

ICDAT69 (EK)

Processes INITIAL attribute.

I

ICDAT6A
(EK)
Processes LIKE attribute.
L_.
_________________
_________________________________
___________________________________ J
~

Section 3: Charts and Routine Directories

135

Table ELl.

Phase EL Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

~------------------+--------------------------------------------------------------------~

CDAT6B (EK)

Processes DEFINED ATTRIBUTE.

CDAT6C (EK)

Processes ALIGNED attributes.

CDAT6D (EK)

Processes PACKED attribute.

CDAT6E (EK)

Processes PACKED(NONSTRING) attribute.

CDAT88 (EK)

Processes POS attribute.

CDCLSC

Scans each item of DECLARE statement.

CDFATT (EM)

Applies factored attributes.

CDFLT (EM)

Applies default attributes.

CDICEN (EM)

Constructs dictionary entry.

CGENSC (EM)

Performs phase initialization and scans chain of DECLARE statements. I

CHASH (EM)

Hashes BCD of identifier.

DCIDl

Main scan routine.

DCIDPR

Processes factor brackets and level numbers.

ECHSKP (EK)

Initializes and passes control to Module EM.

IMPATT (EM)

IApplies implicit attributes.

I

IINTLZE

I

I

I

I

I

I

I

I

I

I

I

IPerforms initialization for each identifier declared.

I

I

I

I

I

I

I
I

I

I

IPOSTPR
I
ISCAN4 (EM)
I
ISELMSK

IPost-processor.
I
IScans chain of DECLARE statements.
I
ISelects correct test mask to be initialized.

ITEMSCN
L__________________

136

IProcesses inheriting of dimensions in structures.

~

ISTRPR

I
I
I
I
I

I
IScans
ahead for next level number. __________________________________ .1I
__________________________________

Table EP.
Phase EP Dictionary Entry III and Call
r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+- ----------------------------------i

IScans for PROCEDURE entries type 1

IENTRY3

INane

I

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

IFollows chain of ENTRY statement
IEPL40
lentry type 1 entries from a PROCE- I
IDURE entry type 1
I

INane

I

I

I
I
I

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

IExamines all labels belonging to anlLBPROC
lentry type 1, constructing an entryl
Itype 3, if necessary
I

INane

I
I

I
I

I

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

IFollows CALL chain in text making
IEPL290
I dictionary entries for E?ntry points I

INane
I

I
I

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

IExamines the first character of an ICDIMAT
lidentifier and sets a flag indicat-I
ling the range in which it lies
I

I~one

I
I

I

I

I

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

IApplies default rules

ICDFLT

INane

I

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

IGiven an identifier calculates its ICHASH
loffset in the hash table
I

INane
I

I

I

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

IConstructs a dictionary entry

ICDICEN

INane

I

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

ISets address slot to zero or the
IFNDEND
INane
I
I end of the dictionary
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IConstructs list of nu~bers of knowniBLDST2
INane
I
I blocks
I
'I
I
~------------------------------------+---------------+ -----------------------------------i

IBuilt in function name

ISCANBF

INane

I

l ___________________________________ L _______________ L ___________________________________ J

Section 3: Charts and Routine Directories

137

Table EP1.

Phase EP Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
BLDST2
IConstructs list of numbers of known blocks.
CDICEN
CDIMAT
CDFLT
CHASH
ENTRY3
EPL20
EPL40
EPL75
EPL100
EPL290

I

IConstructs dictionary entry.

I

Isets flag for default routine.

I

IApplies default rules.

I

ICalculates offset in hash table for given BCD.

I

IScans ENTRY chain for PROCEDURE statements.

I

IFirst entry in entry type 1 chain.

I

Iscans ENTRY chain for ENTRY statements type 1.

I

IReturn point from LBPROC routine.

I

IProcesses new entry label.

I

Scans CALL chain.

EPL340

Searches built-in function table for BCD of identifier.

EPL360

Blanks out BCD in text.

EPL600

Scans the CALL chain.

FNDEND

Sets address slot for label.

LBPROC

Processes labels of PROCEDURE or ENTRY statements.

PHSINT

Initialization of phase.

PHSMRK

Marks later modules as 'wanted' or 'not wanted'.

SCANBF

Checks for built-in function name.

l __________________ L ___________________________________________________________________ _

138

Table EW.

Phase EW Dictionary LIKE

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

Statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

~------------------------------------+---------------+-----------------------------------~

Iscans LIKE chain
I EWBEGN
I EWCOPY, EWELDM, EWINCH, EWONDM
I
~-----------------------------------+---------------+-----------------------------------~
IUpdates hash chain for new entry
IEWHSCN
INone
I
~-----------------------------------+---------------+-----------------------------------~

ICalculates start of structure data IEWVART
INone
Ifrom start of variable inforrration I '

I
,

~-----------------------------------+---------------+------------------------------~----~

IChanges error entry to base elementlEWCHEN

INone

I

~-----------------------------------+---------------+-----------------------------------~

ICopies dimension table entry and

I EW2FNT

'EWN~BK

,

file statement
'
I _ __________________________________ JI
lIsecond
___________________________________
_______________
~

Table EW1.

~

Phase EW Routine/Subroutine Directory

r'------------------T--------------------------------------------------------------------,
I Routine/Subroutine ,

I

Function

~,------------------+--------------------------------------------------------------------~

CESCN

Scans dictionary to find entry corresponding to BCD in text.

EWBEGN

Scans LIKE chain.

EWCHEN

changes error entry to base element.

,I
,I
I

I

EWCOPY

copies dictionary entry into scratch storage.

E~L~

copies entry into scratch storage with dimension data rerroved.

EWELTS

Tests whether the likened structure is dimensioned.

EWEND

Handles transfer of control to next fhase.

E~R~

Processes erroneously "likened" major structure.

EWHSCN (EX)

Updates hash chain for new entry.

EWINCH

completes entry copy and places it in dictionary.

EWNOLK

Tests whether original structure is dimensioned.

EWNWBK

Obtains new dictionary block and terminates current one in use.

~~~

copies entry into scratch storage, inserting dimension information.

EWORDM

Processes dimension information in original structure.

EWSTRT

Tests validity of likened structure.

EW2FNT
l __________________

~

Copies
second file statement and associated
dictionary reference.
__________________________________
__________________________________
J

Section 3: Charts and Routine Directories

139

.Table EY.

Phase EY Dictionary ALLOCATE

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

statement or Operation Type

IMain Processing I
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+-----------------------------------~

IScans text for explicitly pointer- IIEMEX
Iqualified based variables
I

IEY14
I

I
I

~------------~----------------------+---------------+-----------------------------------~

ICopies dictionary entries for
lexplicitly qualified cased variaI bles

IEY14
I
I

IHASH, ATPROC, DICBLD, STRCPY
I
I

I
I
I

~-----------------------------------+---------------+- ----------------------------------1

Isecond file pointers.
ICATE statements

Scans ALLO- IIEMEY
I

IATPROC, DICBLD, HASH, STRCPY
I

I
I

~-----------------------------------+---------------+-----------------------------------~

ICompletes copied dictionary entry
Ifor an allocated it err
I

IATPROC with
Isecond entry
I point ATPROD

I MOVEST
I
I

I
I
I

~-----------------------------------+---------------+-----------------------------------~

IControls ATPROC and ATPROD routineslSTRCPY
IATPROC, ATPROD
I
each member of a structure
I _______________ I _ __________________________________ JI
lIfor
___________________________________
~

.Table EY1.

~

Phase EY Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

~------------------+--------------------------------------------------------------------~

ATPROC/ATPROD (EZ) Icoffiplete copied dictionary entry for allocated item by including
lattributes from ALLOCATE and second file statements.
I
DICBLD
Icollects attribute given for an identifier and copies its dictionary
lentry.
EY16
EY17
EY21

I

IProcesses ALLOCATE statements.
I
IProcesses identifier in ALLOCATE statement.

I

Processes major structures.

HASH

Hashes BCD of identifier to obtain its dictionary reference.

IEMEX

Scans text for explicitly pointer-qualified variables.

EY14

Copies dictionary entries for explicitly qualified based variables.

IEMEY

Scans second file,

MOVEST (EZ)

Copies second file statement and associated dictionary entry.

STRCPY

l __________________

140

~

reverses pointers.

Scans ALLOCATE statements.

Controls
ATPROC and AT PROD for each rrember of structure.
__________________________________ __________________________________ .1

Table FA.

Phase FA Dictionary context

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

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

t o -----------------------------------+---------------+ -----------------------------------~

IScans text

ICE30

ICENDTS, CETRAN

I

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

IReorders subscripts; makes dicItionary entry for file and event

I

ICEID

Ivariabl~s

I

ICESCN
I
I

I
I

I

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

IIdentifies keywords
I

ICEKYWD
I

ICEKEND, CEKEOB, CEKEOP, CEKON,
I cEla'RC, CEKSND

I
I

t-----------------------------------+---------------+-----------------------------------i
IScans dictionary
I

ICESCN
I

ICESTUC, CEYES, CFPDER, CFPDR2,
I CHASH, CE3XX

I
I

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

IMakes dictionary entry for variaI bles

ICFPDR2
I

ICDFLT, CDICEN, CDIMAT, CEONCK
I

I
I

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

Iscans dictionary entry for conIstants and makes new entry, if
Inecessary.

ICECON
I

I

ICHASH
I
I

I

I
I

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

IScans PICTURE chain entry and makeslCEPICT
INone
I
Inew
entry, if necessary.
I _______________ LI ___________________________________ jI
l ____________________________________
~

section 3: Charts and Routine Directories

141

Table FA1.

Phase FA Routine/SubroutinE Directory

r------------------T--------------------------------------------------------------------'1

I Routine/Subroutine I

Function

I

~------------------+---------------------------------- ----------------------------------,i

default attributes for identifier.

I
I
I
I

CDFLT

Deter~ines

CDICEN

constructs default dictionary entry for identifier.

CDIMAT

Determines default scale for identifier.

CEBNK

Transfer point for zero or blank.

CECON (FB)

Scans dictionary entry for constantsw

CEDWAX

Subscript prime text marker.

CEID

Reorders subscripts and makes dictionary entries for files and eVEnt
variables.

CEINT

Transfer point for constant routine.

CEISUB

Transfer point for iSUB.

CEKCEN

Transfer point for CALL to get over chain.

CEKDCL

Removes SN from DECLARE statements.

CEKEND

Processes END keyword.

CEKEOB

Processes end-of-block marker.

CEKEOP

Handles end-of-program marker, or start of second file.

CEKEY

TransfEr point for keyword.

CEKIDO

Transfer point for iterative DO.

CEKON

Processes ON keyword.

CEKPFR

Transfer point for picture format itEm.

CEKPRC

Processes PROCEDURE keyword.

~
~
~
~

CEKSN

Moves SN, etc., to output stream.

I

CEKSND

Processes start of second file staterrent.
Identifies keywords.

ICEKYWD

I

Transfer point for left parenthesis.

ICELP
CENDTS

End of text block in output file routine.

CEONCK

Makes entry for programmer-named ON condition.

CEPFDR

Makes dictionary entry for variables.

CEPICT (FB)

Scans picture chain entry.

CERP

Transfer point for right parenthesis.

CESCN

Scans dictionary.

CESMCL
ICESTUC
L
__________________

142

~

I
I
I
I
~
~
~
~
~
~

i

I
I
i
I
I
I
I
I
I
I
I
I

I
I
I

I
I

I
I
Handles semicolon.
I
I
Points at next entry in structure chain.
__________________________________
__________________________________ JI

Table FA1.

Phase FA Routine/Subroutine Directory (cent'd)

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

iRoutine/Subroutinel

Function

I

Ir------------------t--------------------------------- -----------------------------------~

Translates keyword into transfer instruction.

~CETRAN

I'

ICEYES

Compares structure levels.

I

ICE2L

Transfer point for second level marker.

I

ICE30

Controlling scan of text.

~

ICE31

Tests for end of block.

CE32

Moves one byte to output stream.

CE300

switches to appropriate routine.

CE3XX

Compares identifier in text with entry in dictionary.

CFPDER (FB)

Makes dictionary entry for ordinary identifier.

CFPDR2 (FB)

Makes dictionary for formal parameter.

CHAStI

Hashes identifier.

CHASHC

Hashes constant.

IIEMFA

Initializes phase.

I. __________________ L ____________________________________________________________________ J

Table FE.

Phase FE Dictionary BCD to Dictionary Reference

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

I
I

Statement or Operation Type

IMain Processing I
I
Routine
I

subroutines Used

I
I

~-----------------------------------t---------------t-----------------------------------~

IScans text

ICE30

ICENGTS, CETRAN

I

~-----------------------------------t---------------t-----------------------------------~

IScans dictionary

I

ICESCN
I

ICESTUC, CEYES, CFPDER, CFPDR2,
I CliASH, CE3XX

I
I

~-----------------------------------t---------------t-----------------------------------~

IChecks for array, function, or
ICELP
Ipseudo-variable if left parenthesis I
I is found
I

ICEFNCT
I
I

I
I
I

~-----------------------------------t---------------t-----------------------------------~

ITests for end of text block

ICENDTS

ICEKEND, CEKIDO, CEKPRC

I

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

IIdentifies keywords

ICEKYWD

ICEKEOB, CEKEOP

I

~-----------------------------------t---------------t-----------------------------------~

IMakes dictionary entry

INone

ICDFLT, CDICEN, CDIMAT

I

l ___________________________________ L _______________ L ___________________________________ J

section 3: Charts and Routine Directories

143

Table FE1.

Phase FE Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------1

I Routine/Subroutine I

~

Function

t------------------t---------------------------------- ----------------------------------~

CDFLT

Applies default rules.

CDICEN

constructs dictionary entry.

CDIMAT

Sets flag for default routine.

CEFNCT

Tests validity of function reference in text.

CEKEND

Processes END keyword.

CEKEOB

Processes end-of-block marker.

CEKEOP

Processes end-of-program marker, or start of second file.

CEKIDO

Processes iterative DO keyword.

CEKPRC

Processes PROCEDURE keyword.

CEKYWD

Identifies keyword.

CELP

Checks for array, function, or pseudc-variable if left parenthesis
is found.

CENDTS

Tests for end of text block in output file.

~

I

CESCN

IScans dictionary.

I

IPoints at next entry in structure chain.

CESTUC
CETRAN

Translates keyword into transfer instruction

CEYES

Corrpares structure levels.

CE30

Controlling scan of text.

CE3XX

Compares identifier in text with dictionary entry.

CFDICN (FF)

Makes dictionary entry.

CFPDER

Makes dictionary entry for statement with ordinary identifiers.

CFPDR2

IMakes dictionary entry for formal parameters.

I

ILCRASH
offset in hash table for__________________________________
given BCD.
__________________ Icalculates
__________________________________
J
~

Table Fl.

Phase FI Dictionary Checking

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

I

Statement or Operation Type

IMain Processingl
I
Routine
I

I

Subroutines Used

I

t-----------------------------------t---------------t- ----------------------------------~

IScans text

ICESTRT

ICEKEYW

I

t-----------------------------------t---------------t- ----------------------------------~

IIdentifies keywords

ICEKEYW

ICEKEOB, CEKEOF, CEKIDO, CEKSN

I

t-----------------------------------t---------------t- ----------------------------------~

IChecks GOTO statement references

ICEGOTO

INone

I

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

IConverts GOTO to GOOB, if necessarylCEGOB

INone

I

t-------------~---------------------t---------------t-----------------------------------~

IChecks file references

ICEFILE

INone

I

t-----------------------------------t---------------t- ----------------------------------~

IChecks data list items for validitylCEDTCK

INone

I

L___________________________________ _______________ L _ __________________________________ J
~

144

Table Fll.
Phase FI Routine/Subroutine Directory
r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~

ICECMBK

I

ICEDDOL

I

ICEDOND

Tests value of previous second level marker.

Processes function names used as control variables for DO groups.
Processes end of iterative DO groups.

CEDREF

Tests whether dictionary reference needs to be checked.

CEDTCK

Checks data list items for validity.

CEFILE

Checks file references.

CEFNMK

Processes function markers.

CEGOB

Converts GO TO to GOOB, if necessary.

CEGOTO

Checks GOTO statement references.

CEISUB
CEJUMP
ICEKEND

IProcesses iSUBs.
Bumps scan pointer over dictionary reference.
Processes END statements.

CEKEOB

Processes end-of-block marker.

CEKEOP

Processes end-of-program marker.

CEKEYW

Identifies keywords.

CEKIDO

Processes iterative DO keyword.

CEKON

Processes ON statements.

CEKSN

Processes statement number.

CELRCT/CERPCT

Process left and right parentheses.

CEOOPS

Checks validity of keywords in the text.

CEPRBG

Processes PROCEDURE and BEGIN statements.
Processes remote format references.

CESMCL
ICESTRT

Processes semicolons.
Controlling scan of text.

L __________________ L ____________________________________________________________________ J

Section 3: Charts and Routine Directories

145

Table FK.

Phase FK Dictionary Attribute

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I

I
Statement or Operation Type
I
Routine
I
Subroutines Used
1
.-----------------------------------+---------------+-----------------------------------~
IScans attributes area for SETS
IF01A
INone
1
Ilists
I
I
I

.-----------------------------------+---------------+------------------------------------1
IScans SETS list
IF02
INone
.-----------------------------------+---------------+------------------------------------1
IProcesses constants
ICONPRO
INone
.-----------------------------------+---------------+------------------------------------1
IProcesses
identifiers
ICESCN
CE3XX, CHASH
I
L
___________________________________
_______________ ICESTUC,
___________________________________

1

1

~

Table FK1.

~

Phase FK Routine/Subroutine Directory

.1

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
.------------------+---------------------------------------------------------------------f
CEIDLP
Scans qualified name.
CENQUL

Processes unqualified name.

CESCN

Processes identifier.

CESTUC

Finds address of next structure in chain.

CE3XX

Compares current BCD with BCD in hash chain.

CHASH

Calculates offset in hash table for given BCD.

CMPERR

Provides terminal error action.

CONPA

Inserts constant in ordered stack.

CONPRO

Processes constants.

ENDFO

Releases control.

FOERR2

Diagnoses constant greater than 255.

F01A

Scans attribute tidy-up area.

F02

Scans SETS list.

F04

Completes SETS dictionary entry.

scratch storage.
LGETSCR
__________________ Obtains
___________________________________________________________________
_
~

146

Table Fa.

Phase Fa Dictionary ON

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

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

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

IScans input text for ON, SIGNAL,
land REVERT statements

IFK~VIT

I

IBEFTRN, CENDTS, QP
I

I

I

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

IMoves second file froIT input text
IF2
ICENLTS, BEFTRN
I
Iblock to output text block
I
I
I
~-.----------------------------------+---------------+-----------------------------------~
IMakes dictionary entries for ONIFKDCEN
ILABCD
I
Iconditions found in ON, SIGNAL, andl
I
I
IREVERT statements
I
I
I
~-.----------------------------------+---------------+ -----------------------------------i

IExamines BCD of file entries refIMVSIG
ICENDTS
I
lerenced in ON, SIGNAL, and REVERT
I
I
I
I
I
I statements; scans previous entries I
Ifor ON conditions
I
I
I
~-"----------------------------------+---------------+-----------------------------------~
IProcesses CHECK and NOCHECK list.
IBEFCHL
ICENDTS, LABCD
I
~-"----------------------------------+---------------+ -----------------------------------i

Icreates dictionary entries for
I NOMOVE
IQP
I
Icondition
prefixes
I _______________ I _ __________________________________ JI
L
___________________________________
~

Table F01.

~

Phase Fa Routine/Subroutine Directory

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

I Routine/Subroutine I

Functlon

I

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

I
I

BEFCHL

Processes CHECK and NOCHECK list.

BEFTRN

Replaces statements containing dummy dictionary references by error I
stateroents, and generates error message.
I

CENDTS

Requests a new text block for output.

Fl(DCEN

Makes dictionary entries for ON conditions found in ON, SIGNAL, and I
REVERT statements.
I

FICMVIT

Scans input text for ON, SIGNAL, and REVERT statements.

FICNOCK

Processes CHECK and NOCHECK lists.

FICPROC

Scans input text for ON, SIGNAL, and REVERT statements.

FP010 (FP)

Chains initial label statements and makes second file dictionary
entries for each label array initialized in this way.

I
I
I

Moves second file from input text block to output text block.
Ll~BCD

Creates a dictionary entry for each label constant and each entry
label mentioned in a CHECK list.

MVSIG

Examines BCD of file entries referenced in ON, SIGNAL, and REVERT
statements; scans previous entries for ON conditions.

NOMOVE (FP)

Creates dictionary entry for condition prefix.

Q3

Processes condition prefixes changed in current block.

QP

Determines which condition prefixes require dictionary entries.

I
I
I
I
I
I
I
I

IR8
statement to output buffer. ___________________________________ JI
L __ " ________________ Moves
_________________________________
~

Section 3: Charts and Routine Directories

147

Table FQ.

Phase FQ Dictionary Picture Processor

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

I

I

Statement or Operation Type

IMain Processingl
I
Routine
I

I

Subroutines Used

I

r-----------------------------------+---------------+- -----------------------------------~

\Controls scan of PICTURE chain;
I initializes

ICYBR3
I

ICYEK, CYFIND, CYTABL
I

I
I

r-----------------------------------+---------------+- -----------------------------------~

IPicture character 9

\CYNINE

INone

I

r-----------------------------------+---------------+- -----------------------------------~

IPicture characters S, $, +, -.

ICYSDPM

INone

I

r-----------------------------------+---------------+- -----------------------------------~

IPicture character V

ICYV

INone

I

r-----------------------------------+---------------+- -----------------------------------~

IPicture character E

ICYE

ICYC21

I

r-----------------------------------+---------------+- -----------------------------------~

IPicture character K

ICYK

ICYC21

I

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

IPicture characters C,R,D,B.

ICYCRDB

INone

I

r-----------------------------------+---------------+- ----------------------------------~

IPicture characters 1,2,3

ICYOTT

INone

I

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

IPicture character P

ICYP

INone

I

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

IPicture character Z

ICYZ

INone

I

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

IPicture character

*

ICYAST

INone

I

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

IPicture character Y

ICYY

INone

I

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

IPicture character G

ICYG

INone

I

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

IPicture characters 6, 7, 8, H

ICYSSEH

INone

I

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

IPicture character M

ICYSTM

INone

I

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

IPicture character F

ICYF

INone

I

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

IConverts integer constants to scalelCYC97
Ifactor
I

ICYCONV
I

I
I

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

ICalculates
scale factor
L
___________________________________

148

ICYFNT
_______________ INone
_ _________________________________ ._JI

~

~

Table FQ1.

Phase FQ Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

r------------------t---------------------------------------------------------------------~
ICYAST
Processes picture character *.

I

ICYBR2

Identifies picture character.

I

ICYBR3

Controlling scan of PICTURE chain.

I

ICYCONV

Converts integer constant to scale factor.

I

ICYCPBS

I

Processes picture characters slash (/), comma(,), point (.), and E.

CYCRDB

Processes picture characters CR, DB.

CYC21

Adjust:s data to terminate picture before illegal character.

CYC97

Converts integer constant to scale factor.

CYE

Processes picture character E.

CYEK

Completes entry for correct picture.

CYENDD

Releases control at end of picture chain.

CYF

Processes picture character F.

CYFIND

Obtains code for next character in picture.

CYFNT

Calculates scale factor.

CYG

Procel:,ses picture character G.

CYK

Procel:,ses picture character K.

CYNINE

Procel:;ses picture character 9.

CYOT'l'

I Procel:,ses picture characters 1,2,3.

CYP

Processes picture character P.

CYSDPM

Processes picture characters S, $ , + ,

CYSS

Procel:,ses picture characters 6,7.

CYSSEH

Processes picture characters 8,H.

I

Processes picture character M.

ICYSTM

I

Code table for picture characters.

ICYTABL

I

Processes picture character

ICYV

I

v.

ICYY

IProcesses picture character Y.

I

I

ICYZ
L
__________________

-

IProcesses
picture character Z.
__________________________________
__________________________________ JI

~

Section 3: Charts and Routine Directories

149

Table FT.

Phase FT Dictionary Scan

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processing I
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
.-----------------------------------+---------------+- ----------------------------------~

IScans second file
IACl
INane
I
~----------------~------------------+---------------+-----------------------------------~
IScans dictionary
IB1
INane
I

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

IData variables
IDATVAR
INane
I
~-----------------------------------+---------------+-----------------------------------~
IEvent or label variables
I EVLABV
INane
I
~-----------------------------------+---------------+-----------------------------------~
IDimension attributes
IFO
INane
I
.-----------------------------------+---------------+- ----------------------------------~

IScans AUTOMATIC chain
IG2
INane
I
~-----------------------------------+---------------+-----------------------------------~
Iscans STATIC chain
IG3
INane
I
.-----------------------------------+---------------+- ----------------------------------~

Iscans CONTROLLED chain

IGEl

INane

I

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

Isets dope vector required bit
IP1A
INane
I
~-----------------------------------+---------------+-----------------------------------~
IENTRY type 1 entries
IQA4
INane
I
.-----------------------------------+---------------+- ----------------------------------~

IENTRY type 2 entries
IQA3
IPROPIC
I
~-----------------------------------+---------------+-----------------------------------~
IENTRY type 3 entries
IQA2
INane
I
.-----------------------------------+---------------+- ----------------------------------~

IENTRY type 4 entries

IQX

INane

I

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

IENTRY type 5 and 6 entries
IQAl
IPROPIC
I
~-----------------------------------+---------------+-----------------------------------~
I Constants
ICONST
INane
I
~-----------------------------------+---------------+-----------------------------------,~
Structures
ISTRUCT
MKDMTB, MVTX~
LI ___________________________________
_______________ IAJDMRT,
_ __________________________________
JI
~

150

~

Table FT1.

Phase FT Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
J
~------------------+--------------------------------------------------------------------~
ACl
Scans second file.
AC2

Detects second file statement marker.

AF3

Points relevant dictionary entry at statement.

AJDMRT

Modifies second file statements to initialize dope vectors for base
elements, rather than for the containing structures.

Bl

Scans dictionary.

BIA

Initializes dictionary scan.

CONST

Processes constants.

DATVAR

Processes data variables.

EVLABV
FO

FULIN
GEl
G2
G3

JProcesses event or label variables.

I

IProcesses dimension attributes.

I

JMoves initial label statement to the second file, collecting togethler all statements for the same array.

I

IScans CONTROLLED chain.

I

IScans AUTOMATIC chain.

I

Scans STATIC chain.

llo1KDMTB

Creates dimension tables.

llo1VTXT

Moves text blocks.

PROPIC

Extracts precision data from picture tables.

PiA

Sets 'dope vector required' bit.

QAi

Processes ENTRY type 5 and 6 entries.

QA2

Processes ENTRY type 3 entries.

QA3

Processes ENTRY type 2 entries.

QA4

Processes ENTRY type 1 entries.

QX

Processes ENTRY type 4 entries.

STRUCT

Processes structures.

L 'rRVECT
__________________

~

Transfer vector for appropriate chaining
routine.
__________________________________
_________________________________
_

section 3: Charts and Routine Directories

151

.Table FV.

Phase FV Dictionary Second File Merge

r-----------------------------------T---------------T------------------------------------1
I
I

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+- ----------------------------------1

IReverses second file pointers;
IIEMFV
IDATCPY, DEFMOV, DEFTST, F2MOVE,
I
Iscans text for block heading state-I
~MOVE
I
Iments; allocates statements and
I
I
I
Ireferences to dynamically defined
I
I
l
Idata
I
I
1
~-----------------------------------+---------------+-----------------------------------~
IExamines ADF references in second
IDEFCOM
INone
I
Ifile; completes defined item dicI
I
!
Itionary entry
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IDetects dictionary references whichlDEFTST
INone
I
Irefer to dynamically defined data
I
I
I
~-----------------------------------+---------------+- ----------------------------------,1

IExamines dictionary references and IDATCPY
Imoves any associated second file
I
Istatements to the output string
I

IF2MOVE, MOVE
I
I

I
I

~

~-----------------------------------+---------------+- ----------------------------------,

IInserts dictionary reference of
I FVPTR
INone
I
Ipointer in associated based varia- I
I
I
Ible entry
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses adjustable extents on
I FVADV
INone
I
Ibased arrays
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses adjustable lengths on
I FVSDV
INone
I
Ibased
strings
I _______________ LI _ __________________________________ JI
L
___________________________________
~

152

.Table FV1.

Phase FV Routine/Subroutine Directory

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

I Routine/Subroutine I

Function
I
~----------.---------+_\_-----------------------.------.-------------------------------------~
DATCPY
Moves second file statements associated with dictionary reference to
output string.
DEFCOM (FW)

Examines ADF refenences in second file; completes defined item dictionary entry.

DEFMOV

Modifies text references to dynamically defined data.

DEFTST

Detects dictionary references which refer to dynamically defined
data.

FVO

Scans second file reversing pointers.

FV9

Initializes text scan.

FV10

Scans text.

FV16

Releases control.

:FV18

Processes ALLOCATE statements.

FV19

Processes PROCEDURE statements.

FV20

Processes BEGIN statements.

FV34

Scans AUTOMATIC chain.

FVPTR

Inserts D.R.

FVADV

Processes adjustable extents on based array.

FVSDV

Processes adjustable lengths on based strings.

F2MOVE

Moves second file statement to output string.

IEMFV

controlling scan of second file; invokes processing routines.

of pointer in associated based variable entrt.

IL MOVE
Moves text from input string to output string.
__________________ __________________________________ __________________________________ J
~

Section 3: Charts and Routine Directories

153

Table FX. Phase FX Dictionary Attributes and Cross Reference

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

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+-----------------------------------~,

JScans STATIC chain for all items

IFXOOOO

JFX0010

I

~-----------------------------------+---------------+-----------------------------------~

Iscans PROCEDURE-BEGIN chain

IFX0100

IFX0010, FX0101, FX0105, FX0120

I

~-----------------------------------+---------------+- ----------------------------------4

IScans CONTROLLED chain for nonIparameter DECLARED, CONTROLLED
I dictionary entries

IFX0170
I
I

INone
I
I

I
I

I

~-----------------------------------+---------------+- ----------------------------------11

Iscans parameter list from PROCEDUREIFX0101
land ENTRY statements
I

IFX0010
I

I
1

~-----------------------------------+---------------+- ----------------------------------11

Isorts BCD of variables and creates IFX0010
lentries in scratch text storage
I

INone
I

I

I

~-----------------------------------+---------------+-----------------------------------~

IScans circular chain of ENTRY
Istatement dictionary entries assoIciated with a particular PROCEDURE
I statement

IFX0105
I
I
I

IFX0101
I
I
I

~

I
I
I

~----------------------~------------+---------------+- ----------------------------------11

Iscans AUTOMATIC chain associated
IFX0120
Iwith particular PROCEDURE or BEGIN I
I block
I

IFX0010
I
I

I
I
II

~-----------------------------------+---------------+- ----------------------------------11

IPrints heading line for tables
laccording to options specified

IFXHD
I

IATTMOV
I

I
I

~-----------------------------------+---------------+- ----------------------------------11

Iscans sorted chain of identifiers

I FXPRNT

IFX0299

I

~-----------------------------------+---------------+-----------------------------------~

JDetermines attributes of a given
lidentifier if the ATR option is
I specified

IFX0299
I
I

IATTMOV, FXBCD, FXDCLN, FXEND,
IREFMOV
I

I

I
I

~-----------------------------------+---------------+- ----------------------------------,

IScans the chain of references for alREFMOV
Igiven identifier (if XREF is
I
I specified) and prints therr in
I
lexternal decimal form
I

I FXDCLN
I
I
I

I
I

I
1

~-----------------------------------+---------------+-----------------------------------~

IConverts EBCDIC of particular
IATTMOV
lattribute to required external forml
land moves it to print area
I

INone
I
I

I

I

I

~-----------------------------------+---------------+-----------------------------------~

IPrints BCD of identifier having
I FXBCD
Iconverted it from internal form to I
I external form
I

INone
I
I

I
I
1

~-----------------------------------+---------------+- -----------------------------------1

I Converts an internal binary number I FXDCLN
Ito external decimal form and moves I
lit to print buffer
I

I NonE::
I
I

,I
I
I

~-----------------------------------+---------------+- -----------------------------------1

IFrees all scratch text storage and IFXEND
INone
1
Irel~ases control to next phase
I
I
I
l ___________________________________ _______________ _ __________________________________ .1
~

154

~

Table FX1.

Phase FX Routine/Subroutine Directory

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

IRoutine/subroutine!
Function
I
~------------------+--------------------------------------------------------------------~
ATTMOV (FY)
Converts EBCDIC data to required for~, moves data to print area.
I
FXBCD (FY)

Move~3

!

identifier BCD to print area, determines options tc be print- I

ed.
FXDCLN (FY)

Converts binary number to external BCD, moves it to print area.

FXEND (FY)

Free~3

FXHD (FY)

Prints heading line for table according to options specified.

FXPRNT (FY)

Scans sorted chain of identifiers.

FXOOOO

Scans STATIC chain.

FX0010

Sorts BCD of variables and creates entry in text for each item.

FX0030

Tests for end of STATIC chain.

FX0100

Scans PROCEDURE-BEGIN chain.

FX0101

Scans parameter list from PROCEDURE and ENTRY statements.

FX0105

Scans circular chain of ENTRY statemEnt dictionary entries associat-I
ed with a particular PROCEDURE statement.

FX0120

Scans AUTOMATIC chain associated with particular PROCEDURE or BEGIN
block.

FX0170

ScanB CONTROLLED chain for nonparameter DECLARED CONTROLLED dictionary entries.

FX0250

Scans text, making chain of references to each dictioary entry.

FX0299

Determines attributes of a given identifier if the ATR option is
specified.

scratch storage, releases modules, releases control.

!REFMOV (FY)
Moves the references to an identifier to the print buffer and
!l __________________ __________________________________
prints.
__________________________________ J
~

Section 3: Charts and Routine Directories

155

2hart 04 .

.....
..
·

• (14

Pretranslator logical Phase

Flo~chart

•

• B1·

••

.•.x

81
••
••••
••
FILE
•• yes
••
OR OPEN
••••••••••
•• CONSTANT ••

.. ..

*..*
• NO

• ..... R2 ••••••••••
.DCBS
GA.

.- .......-.-.-.-.-.

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

X.
CRE ATE
•
• OCBS AND DCBS •

*

..

·

.

.•.• x•••••••••••••••••••••••••
x

C1

• ••• *<:;1 ••••••••••

...

0
• • S;MNH AN~· •• YES
:!'~.~~~.-.-.-~~:
••
2ND LEVEL •••••••••• x.
MODIFY
•
•• MARKERS..
PARM1ETt=RS •

*.

.. ..

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

."0
•

.•

• NO

•'"

"'

·xx ......................... ..

01

·..

'

••
•• ANY..
•• FUNCTION •• YES

.. ..

··.~~kE~~~P ••
••

••

• NO

• •••• 02 ••••••••••
.MATCH1
GK •
.... -.-.-.-.-.-.-.
PA~~~HER :
•
MATCHING
•

··········x:.................

·

."'ic.

E2
"'.
•• ANY·.
NO •• FUNC TION ••

•

·• x•••••••••••••••• *. **. . ..*..*
REFERENCES

*•• *

• YES

·
••••.F2..........

••••F3••••••••••
.-.-.-.-.-.-.-.-.Z···.·.·· x:•.-.-.-.-.-.....-.
•.................• •.................
•
X

•

:

GO.

PREFb~O&~SSOR

...·• x•••••••••••••••••••••••••••••••
x

• NO

••

• ..... HZ . . . . . . . . . . ..

......
." STRUCT
... YES

"STRUCTS
HF"
.-.-........ -"'-.- .. - ..

•• • ~~S~ ~~~~~~~'" ••••••••••

... '"
·
...

•• IONS ••
• NO

x:

S t~O~~~~E

......

..

I GNMENTS
.. "'' 'ASS
' "''''.'''
'''.'''.'"

.

• x•••••••••••••••••••••••••
x

J1

"'.

•"'..
ARRAY"'. YFS

"''''.''''''J2 ...... '''''' •• •

'" ARR AYS
HK '"
.-"'-.-"'-"'-.-"'-.- •
P~~~~~S
:
.. ASSIGNMENTS ..

•'.MS~~~~~~~.' "'••••••.. x:
.'"

•• IONS ••

*•• *

•••••••••••••••••

• 1'10

·• x•••••••••••••••••••••••••.
·..x

K1

••

••••
• '"
ANY
•• YES
•• ISUB DEFINED ."' ••••••••
••
ITFMS ••
••••

*. ••

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

.ISURS

HP'"

X. PROCFSS ITF'1S •
•
DEFINED
•
•
USING ISI)~S •

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

• NO

x
.....

*••••

•

.. AI·

··.

• 05 •

156

AI·

x

..·

.r

0;

...

.

o •••••••••••••••••••

... "
...................
·x• x•••••••••••••••••••••••••.
·..

GP*

~~C~~RA~~~~~S :

G1
••
• •••• G2 ••••••••••
••••
.CHECK LIST
GU.
••
ANY
•• YES
.-.-.-.-.-.-.-.. -.
••
CHECK
•••••••••• J(. PROCEED CHECK ..
..... 1I STS....
:
C~~~~HON
:

H1

.MA TCH 2

Chart GA.

Phase GA Overall Lcgic Diagram

•••••
• GA •
• AI •

·

••
~

ILOCN'

1:1"

e

AI • • • • • •

: 1L0l"'"

••

Bl

... ........ A3 .. • .... • •••••

• FILE NAME TO •
.SKElfTON OClC:Fl •
.CHANGE SYSPRINT •
•
TO I HE SPR T
•

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

X.

.:.

••

.•
••

x

••

•

0·0

.

•• ••
• NO

.GB •
• AI •

II'

•••

••
*.
N[J
ANY
•••••• ATTRI BUTFS ••

.....

.. ..

·

X

IL '11 f\

*.

". END OF
•• YES
• " STATIC CHAIN ••••••••••

*.

X

I l'lll"

•.~· •• AI··.· •• •• •••
••INITI Al IlA TION •
•
••...........................••

*,

.0

-...

••

,.

• YES

••

.

~

.'····CI········ ... •
•
GET NEXT
•
•
ENTRY IN
•
• STATIC CHA IN •

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

...

·· ..

x

••

• ,.

•*

••

01

••

FILE

CONSTA~T

*.

:.~~~3 ~.:.t:t~.:

•• ••

'''81

*••• .*

•

YES

•

f)

NJ

• *. ••

*. •• ''lei • *••
*•••

X

IlI\11~
•• E3 . : . . . . . . . .
•
•

*. *.,

•• ', •• " ATTR IBUTFS

•

•••••••••••••••••
.•••••••••••
.
x.

it

EI

•
APPRO~RlATE •
• PART OF DClce •
•
SKEl ETON
•

••

................................. ,

• NO

.*
I~.

.x

• YES

I

GET ENYMNT.

•• CHECK

•

•

•

•••••••••••••••••••

.................
flo •

15

ft

~

(! • • "

• •••• F5 ••••••••••
•
•
.SET COBOL FLAG.
ON I~N~HRIFI :

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

••••••••••

'"

n • • .,. ~ 0 • • • • • • • • • • 0 • • •

.CHECK AND PbACf'.
:
IN ~H~~T N :

ATTR IBS •
• AND HAKE OPEN •
• CONTROL BLOCK •

·• x••••

.,..
., ..

YF.S

•••••••••••• x:

• NO

~ •• ~ •• ' 0 ' . ' • 0 • 0 • '3 • •

•.···.F3·· .•....•.•

i<

• '•••• F I ••••••••••

EI; .'..
, . IS
.,
COFlOl HI ••

CMA~T~~N~UlLl : ••• " •••• X.o., ~~~i'~~

[~ir~V t

:ILIl:Zt

n.

·..................
•
:

••

fI "II' t'I •

~ ~

0" ., It 0 0 0 0 •

~

•••••

e

.

G , • • • • tI ' 0 0 ' 0 • • • • • • •

.'•••• Gl··.· ••••••
•
.. 10K EDICT
•
,
•
ENTRY fiNn
•
••••• CHAI N FROM
•
• SU TIC ENTRV •

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

Section 3:

Ch~rts

and Routine Cirectories

157

chart 38. Phase 38 uverall Logic Diagrlm
*••••

..

·GB •
• AI·

MR

·
X

·. ···"1·. ········
.................
*...••.
*

•• INITIALIZE ••
• TEXT POINTERS.
•• LOAD IEMGJ ••

·......•
• 02 •

*.*.
x

• 81 •• X.

..

A6

• •

It

• *.

••••
X
: •••• B1 ••••••••• :

:
•

SCAN TEXT

•• R2

: •••••••• X.:·
•
••

••••••••••••••••••..
x
••• *

.........
• x••

A4.
",.B3

*"...

S~~~~~~NT

o.

*. *. ".
• YES

·'•• ~;" . . . . ,X.:·
,.
••

X

•

• x••••••••••••••••••••

.....01..........
........*........

*.

,

rt.

Nil

·......
•

...
...0
x

*.

••

*••
'*
.. YFS

('.

•
RFTURN TO
•
•• X.
SCAN FrIR
•
*SKIPPfD OPTIONS.

•

• Fl •

X

•
•

SCANS
FOR MA T LI ST

~l •

••

••

••

••

.:.

•• STATEMENT,.

·0 .

* . ~" •

• Yr S

• YI' 5

X

.-.-.-.-.-.-.-.-..00
..........."'..... ....x
•
CO .. P,.R!'
.ST Rue TURES ('1.\1'1 •
•
COflY INSEI!.T •

:

o·

·· .. ·.....
·••••.
•

Bl •

~

**.*

• '11 •

······"5·. ········.
·...................

•
•

...
.:.
••

G3

• III.

••

•

OUTPUT ANO

•

•

I SEE C21

•

•

RI'TURN

•

x

<:..

*n

';4

,.

•*(1 NO
.,

• YFS
F6A.

*e

IH~~6AON ·:.~~ . . . . . . X.:·pAl!.~~i~hls·:.:;~ . . . . . II:.:·

*. *•• *•• ."

•..

.. YES

., *,.

..

ft· ••
,...

••

G5

OF

••

.~

*. ••

*n

~~~MAT

.: •

••
*•••...
LISTS

• NO

•

• Fl .X ••

X
••

'*

••• ·.fl4 . . . . . . . . . ..
•
MAP/COPY
•

• G 3 •• X.

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

• NO

(."

to

•••••F 3 ••••••••••

.....•

*. ••

~n
." • .,.

,•

·..
.
.
.•...............
.•
....
.
··••••....I:

•••
LABI7e.
Gl
••
• •••• G2 ••••••••••
••••
•
FORL ST
..
•• FORMAT
... YES
.-.- ....-.- .. -.-.. -.
0
OPT ION
•••••••••• ~.
sr. AN S
•
••••
....
:
F?~~~TF~I·;r :

•

8')

..

.*

FORlST

x

x

••

• F3 •

• r.K •
• A3·

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

*. *,,;

• fit •

••••

*••
• *
YF 5

•••

..... f.I

x

~

X

*"

....
• •
••••• •
··..........

02 •

.....
.•.
··..........

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

••

s~iH~tNT

:

~1
E2
••
••
•• NO
••
ENO
•• NO
•
•
••
OPTIONS
. . . . . . . . . . X..
OF TEXT
. . . . . . X. Bl •
••
••
••
• , SKIPPED ••

*.

••

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

t\.

A4

.x •••••••••• ,

• SCM-I STATFMENT •
••••
• SI( II'PING DATA.
YES.. GFT OR
••
.SPF.CIFICATIONS .X ••••••• ,..
PUT
•• X•••
.. TRANSMITTING •
., STATEMENT ••
• OTHER OPT IONS •
••• •

.-. *. *.

,.

x
:::::~l~i!i::::::

• *. ••
n?
*. •

.•.x

*. •••
*".
• YfS

0 . . . . . . . . . . . . . . . . .,

x

x

C3
.1Ir

NO
. . . . . . . . COBOL FlU'

~~~~S I ~~~M~~ I

• 01 •

A8

c.

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

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

FORLST

.to

SWf~~~NT ·:.~~."."X.;· ST:H~ENT ·:.~~ •••••• 'I(.:·OR ~~~HT(
• YES

·····C7.··········
•.•. •••.••.•..••. eo:*-*-*- *-*-*-*-*-*t
•

n.

AI..,.
B4

·11 *..

*.....
*. ...

Bl •

AFORMT

*.

•••••• •

•••
HI..
DATA

*. ••

NO

SCAN2.·.
H2
••
YES

••

••

DOES

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

••

fDIT OR
. . . . . . . . . . X•• IT CONTAIN ,"
LIST..
X..
I TOO
,.

**.. .
••*
• NO

··......
••••

X

X

*CI

*...
*. II.

• YE S

..····Hl ••••••••••

···.·HS· •• • ••••••

•
OUTPUT BUY
•
•
AND HMP
•
.1 Ton S TAHHF.NTS.

:

ol~n6~HY

:

.·................
:

R~~'=~~~V

:

• H2 •

.. 0·.x ..
Jl

••

END
••
. . . . . OF STATEMENT ••
'01') ••

··........... ....
··......
*. *.

x

•

•• .*
III • • *
.. YES

FI •

J3 •. .'...
••••
K

LLOOI T
X
·····J2··········
• OUTPUT PR I(1R •
• TEXT AND FND •
.SCAN TO THE I • •
• REPLACE IT flY •
•
SF"lI-CflLO'l
•

•••

O~H

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

• ••

••••• J4..........
:

• yes

MKROO'l
X
• .....K2··········
•
MAKE ROOM
•
.1"1 nUTDUT TF XT ..
•
ANfl INSFRT
•• " .
• ENfl 5TATEME'IT •

..

..

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

X
...... K3· •• ••• .... •

·.................... ....
....
· ..
~

:

H":! :
•• 0*

•
•
..
•

I' 5A

•...•J5.•••••.••.

fll/TPUT:
:
: ........

X

OIHPIJT AND

:

~A~~n~sSI~.> •• , , " ... l(: F~~A~~WI~F"l
)!: sHHMn~~ :
*. *. .•.•
••••••••••••••••••• •••••••••••••••••••

x

• B1 •

158

F5
NO

STACK
•
nlfTlnNARY.
•
..
••• " .X. F1 •
RfFERENCE
nF T FMP
•
•
•

··........x ..
,. r.3 ..

.....

Phase 3K Overall Logic Diagram

Chart 3K.

"'GK •
* A" *

'" '" '"
ox

••• •• A~ •••••• "' •••

'"

'"

·...... ... ......
··.........
"'····83.···.··."'.
·.. .. ....
•
l"lITIIILl7F
•
• TFXT POINTERS.

•

ETr.

"'."'

"'

••••

*. X.

• 111

tI".Clt)"flrC!t.'I .... "CI ...

x

SCAN TEXT,
'"
NOTING
•
RlOCK LEVEL.
liND COUNT
•

r.'~*

•

"' "'

"."''''.CI.'''.'''''''''''''..

'"
•

:•

S~T 'ElUILT-

'.
l"l r.ENFRIC'"

n~vt~.

• NO
•• 0

BflPVM

VES ,.

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

X

RIITST3

C? .,
0'" I~ ••
V[S.. PSFIJOO-.,

'"

tI

f1asct.N
'"
•

•

.'"

C~

•••
"'.

PSEUOO-

"'.

••

:l(·····o<· . ' •. y~~MH~ o.·X.... ""."""'.V~~~:nF .• -'"
'"

"'.

•••••••••••••••••

*" .;,.

,.'"

•• FOUND.·

*•••

'"

'" NO

ox

BAn,

•"'."."2."''' •••• ''''''.
03 ."' • ••
:
~Hv~JT~oaN:
YES •• ·~UNCTION .'.,
.GE"lF.RIC
AND/OR .)1 • • • • • • • • "'.
MARKI'R
'"
RUlL T- I N .
••
FOUND ••

o.

•

FUNr.T10NC;

•

••••

•••••••••••••••••

III • • •

• NO

8AR

.

." •• (looall • .,ao ••

~~~"EZ.!...

.

•
e.X*PUSH
•'"

x

F~

",*", • •

•'"
ST4CK*
•

"III

.. ........... ...
now,.,

"'

"'

•.•·.FZ·········'"

F3

................
..'...GI..........
G2 ..
"'1(..........
..................
....o·
Lin:
.FOR "ln~I-RU~l T- •

IN FUNCTI':lNS

:
•

•

:

ARr.NO. 0

•

•

*.

•

OF

TEXT

*.

(I-

••

~.

x

..•

• 81.

NO . . . . Oop ••••
FOLLOW
••

•

*. III.

••

*.

• YES

·••••••••..

A~MJ=~~T

'"

:
•

•

• Fit •• X.
••••
X
RADELM
•••
F4
••

••

NO

••

IS
ITS

.,

•• NO

·•.........• .. ..
·.••
.•
.
.................

"*,, •.,

., .?ELl~4~~R ~ •• "' ••••••••

*e

x

.,.

• vFS

• 83 •

K

FlAMORE

.····G4··········
AOO ONE T'l
•
IIJl.GNO
•
•

,.

x

• G5 •

..

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

*t,I ••

•••••
·GP •

•• 0

•• I'IARKER

• •••• F It ••••• "' ••••

•

"'.

••

• YES

X

8AlPQ

8ASTOP

,*.

NO

.•.x

.*ENO
••

:P:~~Mhf~

"'

.. ..
•

• SET POJNTFRS Tn.
•

••

Mn~~R ·:.::~ •••. ,X:
••
FOUNO ••
•
*..*
•

• :.

K

BAI'ST

•••

• •••• F5"' •••••••••
•
•
•
OUTPUT
•
E~~R~UT

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

X:•
•

:

"'

•

G'I •• IC •

AI\G~~2"G!I.~ ••••••"
•• AG4tNST
CHECK ARiNO
0 CT
•
F.NfI\Y (1

••
•

: po~u:i~T~9~CK :

•••••••••••••••••
it

••••• •
•• 83 ••

....

tlAC~~2•• H?:... '"* •••
•

ARG"lO· \

•

• OUTPUT PRlnR •
• TFl(T, TrsvTr, •
•

S TMT NUM8ER,

•

!~U~~.:~~.~~~~I:

·• x••

tI • • •

e

I' • • ,

~

"

~ ~

•

e •••••••••••••

41 • • • "

~

•

e • c ••

\'I

to C' "

~

•

e •

.
to

...
·.
x

>I<

•

'"

•

F4 •

•• *$

Section 3: Charts and Routine DirEctories

159

·.....

Chart ::iP.

Phase GP OVErall Logic

·•.•...••••.

Diag~3m

••••• •
•

x
EXSCAN."'1 . ' .
A'3

".

..·

ES1~~~~.f\1.a........

*

...

NO
, ••• ,

01···..
IS
'.

.. ..
ITVM

·'.Jm.hj'~~

tI..*

"'16

02···..
••••
IS
'. YES
K··.AA~g~~n~T ••

11.533

' . NO

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

tI..*
'

•

.~

: TESTC

•

.*

EI

'.

E2

*. ••

:)(•••••• ~~~~~~~f •••••••••••• K·.

• YES . '

....

re

K:..

IS

NO

••

. .IS- . ••

.'

**.
••.**

YES
'E~~2~~~nN•• ••••• ~

*..*.
• NO

.•.K

. .....
·••••••...•

fr44

*.

•

*.

.. ..

•

1(:

....•

•

••••
••••

• *.

.... .....

NO •• ARGUMENT
SCALAR

• YES

• YES

• ••••• : x•••••••• "

·•
.•
•
•
•••••••••••••••••
....
.
·· ..

II.

M12~:l~*H3.~ . . . . . . . .

••
••

•
•

WARNING
MESSAGE

~

X

CHCKS1,82 •••

CHECKS,M~4...

..H4

•
•

H....

*••
*
• YFS

'.

CHCK T

Cop.,;t·:13

J2

'.
*f'
A!IIO •• YfS
'.
PAR SliME
, *•••.
•• DATA TYPE ••

c*
•• ARG

*. *.

o· c·

....•
·.....
K

•

• NO

• 81 •

·•·•••••••••••••••••..•
··....
......
~

•• ···K2··········

•
•

WARNING
MESSAGE

K

•

04 •

•
•

x

:··~t~~:t~·:~···:

•
•
•
•

AGGREGATE
OUMM., OF
PARAMET Elt
DATA TYPE

•
•
•
•

•

K

J4
••

••
O~
••
A A
••
ES
••
MATCH ••

NO..
••••••••
9.,
••

*. *•••.*

.

• YES

)( • • • • • • • • 0 • • • '

•••••
•
81 •
•• ••••
•

K
•••

CHECK T
•
•
•

•••••••••••••••••

·

•.

• .Hao~··
0D ••••
•• AGGREGATE •• NO
NO •• R 0 ED ••
•• STRUCTl:'\1 ES •••••• K......
ARiu NT
••
•••• MA f
~! MAic~~~

• J3 •• K.

K
'16 •••

..•..............:..

..

• H3 •• K.

• YES

160

••••:

"'1c\

*..
..

· ..

.*.x '.
H2
.*
*.
.X..........
••
••
*. * . . *.*
.................
... '
•

K
•• ••••
•
J1 •
•••••
•

K

*..*

••

• YES

• YES

FRROR
MESSAGE

• YES

....•

.-.

• H1 •• X.

••
•• •••

•••
•••.•...
Hl ••*

..G2
••••
..G3
••••
..G4
••••
: ••• ~5 ••• =~
IS
•• PARAMETER ., NO
••
IS
' . NO
. ' ~1ti'l"Elf •• NJ
'IS A ~"U~LY •
•••• SC AL AR •••••••••••• K•••• A~~~~l=T . . . . . . . . . . . . K·. ¥~l~~R~a p.Tl~2····· •••• ' IC: ~B~~rAn~o

*. *•• *.-

x
•••••Hl..........
•
•

••

• 81 •

• CREATE SCALAR •
•
•
:
CHtn~~~ON
: ....
81 :

K

Gl
'.
•• IS
'.
• 'lJ •• ARGU"'ENT ••
• x. ••• AN ENTRY ••
~

'.

: •• *. :~¥R~2~~~~~!~"
.,"IATCH ••
;
*0 ••

•

K

•••••••••••••••••••
K
•• ••••
•
1.3 •
•••••
•

~.

•

••

00

PAR ANn

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

•
•
·····1:3··········

.~

NO . '

04 •• IC.

03···..

• NO

ic

.'

• YES

• E3 •• K.

ic

.K..

85

•. ••

COP~l~~~l.~ ••••••••
••••
• CREATE SCAl~R •
•• PARAMPrR •• YES
•
~~M"'Y
~ESCRI T ~ . . . . . . . . . . .
~O~~ ER
:

·· ....

• NO

••

e •

•••• ' .
·••••• :

... ··········X•.•....*'.....'*

.'

• YES

.

*•

• Nn

r·

•Hl •

....

...
x

*. *•••

*. *•• *

lc

•• 1"3 ••
••••• •

• 1.1 •

....

NO
••
IS
' •
•••••••••••• )(~ ••• A~~~~~T ••••

AIl.GI.JMFNT
••
•• SCALAR "

••••• •
••••• •

• YES

K

• NO

*. ••

• •• ' .
1.5

~

*...
.. ..

'.

: YFS

0"
*. • ••YES

C'. 84 IS
,.

••••

•• • * END *. •• YES
*. *. OF TEXT •• .- ••••••••)(
*••. .••*
•••••
·GU·

••

*

*0

83··· ••
CREATE A
CHAMELEON.
NO . '
IS
'.
AGGREGATE
.K..........
ARGUMENT
••
DUM..,Y'
•• SCAlAR . '

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

•'

f'

x

EX3~,.:~~2..........

•
• •
•
SCAN TEXT'
•
, •• X' FOR ARGU"'ENT .X.........
•
LIST.
•

C1

AI,

*.

*. *. •• ...
• NO

• 81·

.•.K

'.

)(

*. ••

•

•• PARAME'TFR •• YES
••
PARA..,
••• ~ESCR~PTlO~ ••••••••••• X.o •• SC~~AR

•••••
'GP •

: 8S10

• H3 •

A3 •

)(

••••••••••••

:

••

·*...)( .
....•

••

HI •

CHfCKT

.~?"':.

••

••

K

••• •
•'" •H3
••••• ••

••

.

*•••YES

J5

...K
00

••

90~~s

ill.

MATCH

.:.

••

*. *•••.*
'" YES

lUtlU.K5.: ••••••••
CONSTR~CT
•
•
'"
A REOU FO
•
•
DOPE VE TOR •
•
FOR l o G .

•••••••••••••••••••

Phas8 GU cverall Logic Diagr3m

Chart 3C'.

...

•• ••••
•
A2 '"

"' '"
·GU •

·..

••
•

• Al'"

X

••••• Al..........

•
GET SCRATCH
•
S T~RAGE FOR
• CHE K TAB~E.
•
IN TlALI E
• TEXT POIN ERS

"'' ' '"

X

ASt AN

• •••• A2 "'."' •• "''''.'''.

• •

•

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

o
il.
• •••••••• ~.

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

.....

SCIIN TEXT

" ' .

•

OJ<.

•

..
~

B2

,

••

.. ..

*. •• YfS
•• ".
END
*. *. OF TE Xl •• • *••••
••

••
• NO

.......

fI •

CI •

x

••• •
••C3
•• ••••
••

.HF •
• Al.

•

x

.•

ATST3

CZ.·...
••
• •• , YE 5
• •
•••• STAT EMENT •••••••••• "
••
,.

.. ..

•• ••••
•
01 •
•••••
•
AFM

•

•• *••01 ••••••••••'

•
CALLA'"
• -.~-.-.-.-.-.-.-...

·•.....•
~

•

NO

.·FoHousfNEKo1EP
INT9..
R
~ E •.

x:

As~~~~l.tt~2~2......

••

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

02

• ••

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

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

P~V~TP=E2~~I~ : •••••••• x:PR5lH~M~~~NAL :

• • nR t:ALL STMTS •

·••••••..•0.............
•

X

ATEST...

115C •••••C5 . . . . . . . . . .
•.~JSSIBLE
SET PCSW CHFtl(
FOR
••

•
•• UPI)·HE
TIIBLE CHECI(
FOR.

\It

IF-swH AT ONCE : . . . . . . . ,
•
• •

04 - ••

8SCA=···

••

:

-eo

)c

:

• • ••
YES •• FUN~T~ON
••
MA K.R
••••
••••

..*..............:x........•.•. ....

: •• :51G~~~u~~~f~Eo
•
•
RESFT FMPTR ••

••••

AS!:b:~~~~!.......

•..•• 05••••••••••
X

Asel

:

:_._._~~~~t._._:

:x",," ••• :sr:;~~kr~~~~~FO:

SCA"! TEXT

LABEL
•
•••••••••••••••••• ••••••••••••••••••

•

• NO

A? •

ABGNIlI1

".'~ •• EI

•

••••••••••'

TF-~~hcH

ATEST5

Itt

X

:x ••••• :;~.:·
TWI C E .
••

·

:
..

.

E~~E

·0.·
(I.
•
THEN

x

BPC

•

.:.~~ ••

:

i<

•

••

••••• •
• Al •
•••• '"

.•.•.F2.......... ·

.................
~hH~~~~

....

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

•

NO

.•.x

••

••

*0

F MPTR
SET

*.,

•••

••

....

0

*

• NO

BTEST4

X

F",

•••

.,

••••• F5 ••••••••••

NO ••' =UNCTlON··., YES
:...-.-~~~L.-.-:
:"'~' •• MARKER . . . . . . . . . . . . x:SIGt;!~~cf~5~KFO:
••••
•
NAME
•

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

··•••••••• '" .. •..
K

,~
• 0 ....~

*a

••

8ENTON

......

•••• •
•

• ....

•••••• :

•• YES.
•
, ••• "l(* 01 •
••
••

*•• *
•

o'.

f4

*e
••
......... STATEMENT ••••

X

8STMT
•••
F3
••
•
GO T n .
••••
•
•
•
PSEUDO-CODE.
YES..
~S.
••
• AZ .)(..... ROUTHoIF Tn
.1( •• , . . . . . . .
sw
••
•
•
•
CHECI( THIS.
••
FT
••
••••
.STATEMENT TYPE.
••••
••••

••

O~

•

•
•
..
•

•

.K......

A"!o FMPTR

•••• R~lrT*•• ••
lit • •

•

CH~CK UBLE

••

YfS

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

~

DOWNflATE
FOR ~ND
STATFMENT

·~5·

•
•
•
•

•
•

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

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

X

•••

.*G5PCSW •• *•••
NO..

NO

····. . 3···••••···

ElY4RNO

•.4··~~~::·;b···· •
CAllA/CAUB

:X ••\o

YES ••

•

•*G3 IS
••

••

••

O~TPUT

•

ic

BTEST3

• ••••E3..........

••

*.

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

•• ••••
•
C3 •
•••••
•

•••

"..0
E2

X

SET FMPTR IF •
ANY AR~MENTS •

:• c~~ckla.
~~~N :
FROM MARKER •
•••••••••••••••••

.. .
•• K. fll •

K
CALlIF'

• •••••

•••

•• Jl
••
•••'.

••••

:··;;iH·r;s::··:
90.

CALLBA

•• YES
•
~TPUT
I~n
•••••••••••• x: G~TA~~~~~LAG : . . . . . . eo
••
••
•
OR ENDSW.
IS

••

•

••

NO

.•
••

'<....

• •• " ' . . . . . . . . . . . . .

•••

J3

CAlSTM

: ·. .·i~~C6=:····:

••••

WAL. IT
•• NO
oil
C L8 . . . . . . . . . . . . K:
••••
oil
••

•

••

• X•••• It

• • • • tI • • •

CALSYM
X
·····K3 •••••• •• ••
•
OUTPUT.
•• oe •••••.t' • • o ••• (\" •• fI

•

·•••••••••••••••••.

.,.(!I •• eo.tI.".OOOOC.III).X:
•

R~~g~:rO

•
:

••

0 ••••••••••••••••

YES

·

STATEMF.NT

SO~~~MTElCT

1'\ • •

of) • •

.

0 •••••

CAli. EX

...............
• •••1(4•••••••••

!.o •• GoooX:
STATFMENT.
OIl

RETURN

:

•

Section 3: Charts and Routine Cirectories

161

Chart HF.

*

****

•

•** •• •

• A2 •

***

MR

Diag~~m

Phase HF Overall Logic

*****
*HF *
* Al*

• x•••

II • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • " • • • • • • • • • • • • •

K
MRTRT
K
MRBYN
.*.
****.A 1**********
*****A2**********
A3
*.
*
*
*
•
.*..
* INp~A\,fE
*
*
*
.*~TR!lCT~Rt*.YES
SCAN TElCT
: . . . . . . . . lC*. *~dh~~~~T." * .. "
: TEl(
0 N ERS : •••••••• l(:
*
*
**************...

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

J(:*

*..*
•• ••
• NO

• •••
•
E2 :
****

K

L SGET

••

B3

•••

••

*.

.. ..

• •••

*.

....

••
ITEM IN
YES.
•
•• :~IrlT~H~~~t . . . . . .
G2 :

J(:

* •••

• NO

x

LS21

C3

YES ••
: ••••••••••• O ••••• • ••

•••

•

Cit

••

••STR~~T~RF.*. .,

'10

,*

• ••

NO
.,

. *END
· 0 ••

YES

.....
•.•
·.

~~Ti sp@l~!.··········X.CI.f'o OF TFXT " •••• et-· •• •

*..*

•..•

*. ••

*.

o.

X
• ••••

• 05 ••

*HK •
. . . At.

•

•

** ••

.....01..........
:
:

EXPAND

ST~¥~~URE

..

LS23

••,

••••• 05·· •• ••• •••

:

· ..
•

:
:
.......

~¥I;~~F~~g
~~~pIE\~

:........

*...
••••

·.......

X

SAENOfSA 13

:
YES •••• IS IT .' ••
:lC .......... "'. GElIi~TA .",.*

.*••"'.............•
x
*• A2"'. •*
•••• **

02 ..
K

•

NO

• 1'2 •• lC •

~ ARY

NECE

•

.

1'"..........

"'."''''
•lC
lC •
SAORAB
SA19
• "'
"'''' ••• E2'''.*'''......
• ••••
EO;
••
:8n~DS¥~u~lt~~ :
:
RESET
:
YFS •• ' . T~~h ••••
.UNT~L F~N~ BASe.'I( •• " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SOURfiE POI~ITeR .X"" •••••• MORE ELEMENTS ••
:T~bpre~F'N~!l6EO:
lC
:
T START:
••• ,
••••
~....
• NO

.................... .
....•
·.....

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

x

SA?"

K

FZ
•••• 0

•••

*• A2

SA32

*.

I~CE ••••

••••• F3 •••••• *•••
nul~~~TB~~g

:
•• POiN¥FR AT . . . . . . . . . . lC. R~hACF. IT IN •
••
START ••
.SnURCE TElCT BY *
••
••
•
NElCT ITEM
•
NO

:

•

•••••••••••••••••

•• • ••YES

.

·

••• ~ •••••• ftX.X •••••• " ••••••••••••••••• fI

······G2·.········. ...'"
K

:SATRT

......
·••••.

*SCAN STRU,TIJIIE •
•
•
: ,}~l(~HU"~~T :lC . . . . : Gl :

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

••••

..

• 05 •
lC

: SAOP

•• .*

HZ

•

K

*. ••
*10

•• .*

•• yes

H1

• •. .,

*tI

H5.~

BYNU •••
••••••••
•
BflCKSPACI;
•
.OUTPut POINTFR •
•
Tn START OF •
• THIS SCIILAR •

0

HA ~
•• 'In •
•,
STRUCTURE . . . . . , ••• ' 1( •• STACK BEEN ••• , ..
••
••
••
!WI LT ,~.

*..*....

o.

*tIr.. . . *
• NO

••

J?

.•.x

••

••

• C'

*
• vrs
..

·. ..........
~

.. 00; •

*.**

162

~

4. J' •. *.

J4...........

.......
•
, . BY NA'!F. ., vrs
FOR.
··.~Hl~~~~~t .. ·•.. ····"'l(: ~i~t'H~~~~ : ...
.11
"•
.
.

SA ~"

*f'

• NO ."
END
.,
......
OF EXPRN
••
... OR ST'!T ••

*f'

: .. ~U12~~~~I
...:
x

• YFS

•••

tIr • •

*'

.. NO

'iV'll

*•

AY'I13
••

C;E~QCH

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

*....

"< • • •

.~

•••

...0
J~

1( . . . . .

*0:

••

FOUN('
~

•

*•••
• v~ S

••

r*'·

Cl'J art

Phase HK cverall Logic

HK .

Diag~~n

•••••
••
•

• HI( •

• AI·

HRTRT
X
••••• Al· ••• ••••••

••
•••

•••
••

.................
SCAN TEXT

• x••••••••'•••••••••••••••••••••••••• ".
""EOP

.....

Bl

•••

T~fl

x•••••••••••••••••••••••

(I • • • • • • • • • • • • • • • • • • • • • • • • • •

e •

(I • • • • • • • • • () • • • • '" 0 0 0

•

fI 00 III " :

••

••••
.......... .
.".. x ••••
..~ ••

••• x-. e'B ¥F

:

•• ••

.HP •

• NO

••

~
Cl' ••••

0.·.
.• li ij •.

••

~

.. ..
fT

•"1. A E

~l'.

A1 •

•

.f

.

NES!~I.*C2 ••••••••••

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

EARCH NisT~R •
,'ES
• AIE"EHT
••••••••••
x·s
F
•• 0

:

A 51G,... HT

LSTSCH

07···..

• NO

,

~

01' ••••

••~rt

1~3

·" •. i ffI ••••

·
.•. ..
.·~O

.

..

AR~~¥ho~~U:••••••

!~t·· ••
..!!Ii' E ••

Lith.••••••••••
YES
• •••
X..

•• i)THER THAN

•.

••

:

~l..

NO

:

u ••••••

';ES

SEARCH FOR
:
F IR~T ARRAV •
IN E PRESSION:
•••••••••••••••••

x.

:

tc

El

••

....

Ihli
••
•••••• '1551 "NT ••
•• STA EM NT ••

• N[)..

••

.*'

··a:' .............. ·....... ·............... ..;........
*F3..........
• YES

ARRASS

•

~~

Fl..
• ••• 0fl •••••• 011•••
~ •••
•• ··THU A •••• ~s
: ~E~RG~~Bn :
:
LUt"~T:
••
PI'~~- •••••••••• X. AND WHITHER ••••••••• x.
¥~
L~...
:
VAL 0 :
:
'seAAIR

••

.. .•

•.••0............

...•••• •••..
~..

·...I .....................................
.
..... .........................................
,...••.••••••••••••••••.•...•..
• NO

","

AAMULA

•••
61
••

• Ai:

••

••.••F5•.••.•..••

.CI...............

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

0 ..................................... .

• ••• tI~.-.*
•
I(
P1HER •
~!:l!~
•••••••••• ,(..PS~ -vL~FTIABLE.•
RBliJ..
:
0
EQUALS
:

.• l.'TU'
IJ

••

X

....

AA3

F"..........

.CI • • •

::~~N~R~~~pA~~Ry:
2"11.1. 11.:••••••••• x.::P.ACH~~~~yON~:
STAlK ~OR
••••••••• x. A~b Gi~~~2T~ •
[) HENSlnN :
:eu ST
HFN S :

•• 01.
A
•• YES

••

• NO

·tc
.....H!..•••••.•.

• • • • 111 • • • • • • • • • • • •

.
.•••"'Hl..........

• X•••••••• " ••••••••••••••••

ARREXP

AETRT

: DoGlriR1tUNTS :
:
: INF~MfflON : •••••••• X:

:•••I=.U:~ .0•••:

ST"~=ENT:

ARRAy~fJ~l~H

....•

....HIt.........'"

SLMCG

~I...........

.....H5··········.

FRf'T"'P

:

: CHE AIUNOS :
:AOO SUeSCRTPTS :
:
GE~~~erF
:
:
: •••••••• X: AglrA~l~ncl( : •••••••• X: APPROPRIATELY :········)(:FO~Tna~1i~UIES:····

:=~U.,:::=U~~.:

:•••••••••••••••:

:••••••••••••• """:

:...............: .

section 3: Charts and Routine [ir€ctories

163

Phase HF Cverall Logic Ciagr3m

Cr1art HP.

. ..

.

*****
• HP •
•

'"

AI"

'"

'"

•

......
A2

•

ic
..... "',\1 "'.........

INIT

*

•

. . . .•

(I

0 • • • • • • • II • • • • I I "

A3 ..
••

~

• • "' .. CI 1'1 . " •

n

•...... "' •••• "' •••• "'.• •.......................

.'"

x•• "'.

OEFINI'O

*"

,..

"'. NO
,.
S~n~uPT •••••••••••• x.o"'o

• "'••••*•
• YfS

••••••••••• x.
: OEFSUII
X

A4 ,.:"'1.,

t' fI G r< f' 0 II • I"

."'.

SCAN.
S~~~lE
: ••••••••

: •••••••• x:

r>oT~H..........*

MASC~N)C
• ••••

INITIALIZF.

:

•

*.**

~'10

*"

T~~T

*0 *. ••II.

... VES
.",o·
.. ·•· .. x

..•

•.1••••
A •

.A'*

•

.

'···."'
" 113· •• •••••••*

• SK I P TO STAR T

..

:sUe~~Rn~O~~ST

.
·••••••.

:

"'''''''

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

.

..

•

"'' ' ' ' ' "'.

'" C3 "'. x.

'" "'... x
•• OETEMQ
•••
C3 ., "'.
•• IS

·•..."'''..' '.' '.' '."'.'•"
··....*.........
.····0'·····."'...'"
··.................
.•
•
••• "'C, •••••••• '"

'"

SUMOVF

.. "'.. '"..

'"

'" NO

..
•

.....
....
.. ..
EI

•

U~~ Uvt~So~

TE~P IN TMlF •

;

••• ·.no; ••••••••••

"'-.-.-.-.-.-.-.-.
•

SUMnVE

•

•
•

OUTPUT
SUBSCR IPT

•
•

..• "'' ' ' ' '..''' ....''..•

... ... ....

·

.

DIeT REFCF •
1~~OT'ABkE
:

:

NO

.

ic

• "' "'."''''.''' •

• X.e.".o.o.ec.e •••••••• e •••
'(

OERCUR
"''''''''''.EZ ••••••••••

"'.

...."'.............:

,.

"'' ' ' ' '.n4'' ·······'' ·

DEGRO!

•••
FI,
••
••
ANV ••
• •••
••
"IORF
•• VES.
•
•• SUBSCRIPTS IN ••• ".X. C~ •

Of FINED
•• YES
•
PUSH DOWN.
•
SUBSCRIPT . . . . . . . . . . X"'PARAMETER STACK ...... .
•• MARKER ••
•
•

••

••

"'."''''.C'''''.'''.'''
•••••
.)UTPlJt BUY TFMP •

J("'::N
~41~~~R o;:",~;, ..... x:
",.C&NSfANT .'"
•
.",.,.
"'. • VI'S
'•" SET

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

x

•••

OEEN02

"'.

,"'.,

x

••••
C!I ''""
'" "''''.''''"

''""

X

•
SCAN TEXT
• OF SURSCRIPT

:4

. : . fU~i~~HT ·:.~~; •••••
.0ICT REFCE.'"

• 01 •• X.

SUSCAN

DENGUe...

C5 •

"'.

SECOND

·,LIST .'"

•• II"

••

"'

••••

•

• NO

)c
•••
1'1
••
••••

••
.....

.. ..

I SUfi

~lISU8S

•• VFS

••••••••••••

••••

• •••• FZ ••••••••••
• OUTPUT PRIOR •
•
TEXT. FIND
•

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

x:

:

c6UHp~~~~~G

.TO ISU8 NUM8ER •

"'' ' ' ' '

'" NO

.

•

X

..

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

••
••

...x

HI·.

..

"'. "'.

."''''·H:>.·'''·''''''''''''·'"
'"

END
vr S
•• OF SUASCRIPT ."' •••••••• X.

*/t

.'"

*••
*
'" NO

..
·...

••

,.

RETURN

...

~

f:o • • It • • • • •

K

"'''''''·*2('£ •• YES
•
SET UP
•
•,
TEMPORARV •• "oo ••• oX. ERROR MESSAGE •
•
ANf' ABOR T
•
• , RESULTS ••

*. *•• *••
•

'lO

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

.....
...
ic

• XA •
• AI·

l.04

*>iJ..........

•••..

:
SET U P :
:
oroX. ERROR MESSAGf: *Ol)"t-flO'.I"X.
• •
•
• •
•

H4 ••••••••••

ERR~KTTW~PlE:

......
IN TeXT ANn *n"f'oX* 01 •
EII.ASI' RAO.
•
•
STATEMENT.
• •••

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

Chart JD. Phase JD Jverall Logic Diagr3u

•••••
·JO •
• u·
••
•
(NITI

x
r:·ii····:
POINTER~ E~C

:~'·r~n

•
••
• GET SCRATCH •
• C:ORE FOR STACK.

...• "'' ' ' ' '...''''''''''''

....•

• x••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• " ••••• oc •• ee
SCANT
X
• •••• Cl.·.······'"
•
SCAN TEleT

STAKOP

*
:'" Fg~TR ~R~~t~
:X
••••••••••••••
IPLE S
*
"'''''''

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

··"'··C5·······"'··
C5
! .... X:
:x .. :
•••••
•

• ."'.'" •

!

0 ••••••••••••••

••

X
••• ·"'05"''''·
..•••••

:

•• ~X*

:

:F~g~ET~~!.~~UK

·.. .. .. ..."'.". ' ...... ...... ....
"'

••••• El..........
:

END O F :
PROGRAM

E2

••• 0" •••• X••

:

:

•
•
•

•••

:

STACK EMPTV •••••••••• X.

.'..

....

SCR=H~A~6RE
AND

:

*.o •• n,,·o.

•••••••••••••••••

• NO

BTHT I*,a~~
.c aNTROL STACKNG.
ABORT IF
•
•
• STACK FUll
•

:

:RETURN CONTROL :

•• ••

''

X

TRYFLG

• ••••E3 ••••••••••

YE S

''

•.•··E5·.····....:

WINDUP

••

:
•
•
•

..... ......

INTO TEXT.
ABORT II'
STACK EMPTY

.."'' '

"'

••• ·IS THE ••••

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

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

UNSTAK

x:

"' "'."' "'

••

"' "'' '

"

MORTXT
••••• 01 •• "'.......
• •••• 02 ••••••••••
•
• •
GET NEleT
•
•
•
EN!) I F "
.BLOCK IN ~HAIN,.
•
r.le: TEXT BLOCK
: ••••••••
A~gIM~~T
: ••••

~

aPERAND
<;TACKING

F\33~r~~Lg~~s

•• ~ . .
·JI

.•

*

•••••••••••••••••

• AI •

'"

• • • • • • o.oa • • • • • • • • • • • • • • • • •

•• " ••F 1 •• "'.......

•

••

' •• X.
•
•

E NO OF
EXPRESSION

F2

•'"

•~

om

••

,.*
."
••
IS..

X

• •••• F 3 ••••••••••

••

NO
••••••••• X••
THE'STACK •• " •••••••. X.
•
••
EMPTY.'"
•

•"'''',''''''' • • • ''' • • • '''.'''...:

*. tIt.

.

••

,,*

•

PUT OUT
MESSAGe
AND ABORT

••

PROnUCER

,,,

",,,,~.,,,.,,,

•
:
•••
•

c •••

·.. ... .....
· .
'"

"''''''''''.''' x ' '

.."' • • • • • • • • "' • • • • •

'" YES

It.CI • •

"".l' ••

X

••••••••• " ••• «1

'"

."' •• *H3 ••• "'''' •• ''' ••
•
lERn STACK.

•• 0 •••••••••

0 • • • • • • • 0)(.

TEMPORARY

'•••••
" X.•

•

CIj •

x

• NO
PREF I X
• tIt.
•••·"''''Jl •• '''''' •••• ''''''
•••• "'J2."'''''''.'''.'''..
J3
tIt.
"'''' • • • J4 ••••••••• '''
••••• JS ••••••••••
:
:
:ROUTINE CHECKS:
•• ··NUMERIC·· •• YES
: A~~E~A~~G~EII :
: ~~~LR~=I~~fo :
X. UlNARY PREF IX "' •••••••• X.
OPERAND'S
••••••••• X"'. CONSTANT
."' •••••••• X. DIeT. ENTRy"' •••••••• X'" STACK TfMP,
•
•
" ' . DieT. ENTRY •
tIt.
••
•
IF MINUS
'"
.SET SFLAG • r2 •

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

*..*
'"
tIt.

••

•

••

.."' • • • • • • • " ' . . . . . .

•

"' • • "'''''''''' • • • • • • • • • •

.•."'."'.....•

•• 0 ••••••••

"'.

••••• Kl "' ••••••• "'.

•

'"

O •••• 0 •• 0 ••••••• 0 •••••••••• 0.

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

."'''' •• Hl "' •• "'."'."'..
'" rJTHER RESULT •

oooX.

.0 ••••••

•

• • • • • • • • oo • • • • • • o • • • • • • • • • • • • • • • • • • • ' ••

.
· ....
.
.
..,,,....

•

•
•

UPfl(T
X
• •• ·"'FS·"'········
• UPDATE TI;XT •
0 . 0 • • • • POI NTE R RE SE T •
• TFUG TO lERO •

''""

INERT

•

TRIPLE

.

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

''

"'.
'"

' ' ''''''

'" C5 '"

.."' •• K2 •• "'."'''' ••••

••• X. NON-PRODucTIve.,......... .:. seT TFlAG ON

'"

"'' '

Xx

'"••••••••••••••••••••••• II • • • • • • • o.,.,.oo~.a ••

•

., • • • • • • C1«!')eo0:-.(\"

•

s~ction

3: Charts and Routine Directories

185

Table IG. Phase IG Translator Pre-Generic

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

I
I Main Processing I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~--------------------~--------------+---------------+-----------------------------------~
IScans text for BUY aggregate argu- IGS1
IFR, BR, TRF1, GS12
I
Iment dummies, end-of-block, and
I
I
I
lend-of-program triples
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IObtains next text block
IGS12
INone
I
~-----------------------------------+---------------+-----------------------------------~
ITransfers text to output block
ITRF1
INont
I
~-----------------------------------+---------------+-----------------------------------~
ITransfers text skeletons to output ITRF2
IGS1, TxF1
I
~-----------------------------------+---------------+-----------------------------------~
IStacks and unstacks information on IFR, FRP
INont
I
lencountering function and function I
I
I
I triples
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IInserts assignment statement for
IBR
IGS1, TRF2
I
laggregate
argument dummies
I ____·___________ I ___________________________________ JI
L
___________________________________
~

Table IG1.

~

Phase IG Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
BR
Inserts assignment statements for aggregate argurrent durrnies.
I
BR1

Transfers point for IGNORE triple.

BR2

Inserts assignment into text.

BR3

Makes new dictionary entry for temporaries.

BR4

Processes second BUY.

FR, FRP

Stack and unstack information on encountering function and function'
triples.

GS1

Scans text for BUY aggregate arguwent dummies, end-of-block, end-of-'
prograrr triples.

GS12

Chains to next text block on encountering an end of block marker.

TRF1

Transfers text to the output block.

TRF2

L __________________

186

I

I

I

I

I

I

I
I

ITransfers
text skeletons to the output block.
__________________________________ __________________________________.J

~

Table IL. Phase IL Translator Pre-Generic

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I

statement or Operaticn Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------i
IMoves function table to scratch
IBASROU
INone
I
storage.
I _______________ I ___________________________________ JI
lI ___________________________________
~

~

Table 1M. Phase 1M Translator Generic

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

J
IMain ProcessingJ
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------i
JSelects function for processing
IGNFUNC
IGNXTRP
I
~---------------.--------------------+---------------+-----------------------------------~
ISelects generic procedure
IGNPLIG
JGNDRTA, GNXTRP, GNFMID
I
~-----------------------------------+---------------+-----------------------------------~
ISelects generic Library routines;
IGNBIFH
IGNARID, GNCBEF, GNCACI, GNC1BI,
I
Idetermines function result
I
IGNGNCR, GNPRSC, GNSACH, GNSAPC,
I
J
I
I
IGNSBAR, EXPANL, GNSAPR, GNSBRT,
I
I
IGNSFMS
I
~-----------------------------------+---------------+-----------------------------------i
ISelects chameleon du~my and insertslGNCHAM
IGNXTRP, EXPANL
I
lit in relevant dictionary entry
I
I
I
~-----------------------------------+---------------+-----------------------------------i
IControls scan of text -- branches
I EXPANL
IARITH, LST1, SUBSPT, ASSIGN
I
processin9 routine
I _______________ I ___________________________________ JI
lIto
___________________________________
~

~

Section 3: Charts and Routine Directories

187

.Table IM1.

Phase 1M Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

~------------------+---------------------------------------------------------------------1
Calculates type of result of arithmetic operation (except **).
ARITH (IN)

ASSIGN (IN)

Returns to calling phase with result.

EXPANL (IN)

Controls scan of text -- branches to processing routine.

GNARID (IP) .

Identifies argument of built-in function and converts it to valid
type, if possible.

GNBIFH (IP)

Selects generic Library routine; determines function result.

GNB08 (IP)

Selects relevant faroily member.

GNB16 (IP)

Sets up result type of a built-in function.

GNCACI

Checks and converts a decimal integer.

GNCBEF

Standardizes argument code byte to a form for generic selection.

GNCHAM

Selects chameleon dummy and inserts it in relevant dictionary entry.

GNCTBI

Converts from decimal to binary.

GNDRTA

Analyzes dictionary type.

GNEOB

Processes end-of-block marker.

GNEOP

Processes end-of-program marker.

GNFMID (IQ)

Identifies family rr.ember.

GNFUNC

Selects function for processing.

GNF04

Checks for nested function situation.

GNP027

Sets up result type of a PL/I functicn.

GNFM3 (IQ)

Heplaces original reference in text.

GNL06 (IQ)

Forms entry relating to particular invocation.

GNGNCR

General conversion routine.

GNPLIG (IQ)

Forms tacle of family member descriptions.

GNPRSC (IP)

Selects highest mode, scale and precision of variable argument list.

I

I

IGNSACH

Perforrrs special argument check.

I

I

I

I

IGNSAPC

Calculates scale and precision of a function result.

I

I
Examines second and third arguments of the SUBSTR built-in function I

IGNSAPR (IP)
I

I

l __________________

188

or pseudo-variable and, if possible, converts them to binary
~

I
I

I

integers. Sets selection code according to findings.
____________________________________________________________________
J

.Table IM1.

Phase 1M Routine/Subroutine Directory (continued)

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Functicn
I

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

GNSBAR

GNSBRT (IP)
GNSFMS (IP)

GNTRID
GNXTRP
LST1 (IN)
(IN)
L SUBSPT
__________________

IHandles a subscripted argument.

I

IExamines all three arguments of SUBSTR and calcuiates the resulting
Itype exactly.

I

IReplaces references to SUBSTR in text by a reference tc another
lentry giving detailed information about the arguments.
Places a
Idescription of the resulting string in the text.

I

IScans source text.

I

IGets next triple.

I

ICalculates type and length of result of string operation.

I

IAdds
of array to stack.
______type
• ______________________________________________________________
JI

~

.Table IT. Phase IT post-Generic Processor

r-----------------------------------T---------------T-----------------------------------,
IMain Processingl
I

I
I

statement or Operation Type

I

Routine

I

Subroutines Used

I

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

IScans source text

IPGTXSC

IPGT01,PGEOB,PGECP

I

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

IAnalyzes type of function detected IPGFUNC

INone

I

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

ICompletes function handling
IPGFNCP
IPGNEXT
I
~-----------------------------------+---------------+-----------------------------------i
IDetects 'chameleon' temporary ref- IPGBUYS
IPGRUY
I
lerences and deletes BUY and BUYS
I
I
I
Itriples where possible
I
I
I

.-----------------------------------+---------------+-----------------------------------i
IDeletes 'chameleon' reference in anlPGPASS
INone
I
lassignment triple and alters the
largument triple to indicate an
lintermediate result

I
I

I

I
I
I

I

I

I

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

IDeletes all other references to
IPGFNCM
IPGBYAS,PGSELL
I
I 'chameleon' temporaries where
I
I
I
laQplicable
L
___________________________________ I _______________ I ___________________________________ JI
~

~

Section 3: Charts and Routine Directories

189

Table

I~l.

Phase IT Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

~------------------+--------------------------------------------------------------------~
PGASS
IDeletes 'chameleon' assignments.
I

PGBYAS
PGBUY
PGBUYS

I

I

I
I
I

I

I

IProcesses 'Buy Assignment' triples.
IProcesses BUY triples.

I

Processes BUYS triples.

I

PGEOB

Deals with End of Text Block conditions.

PGEOP

Processes end of program marker.

PGFNCM

Replaces 'chameleon' reference by an intermediate result where
applicable.

PGFNCP

Processes function prime marker.

PGFUNC

Analyzes function, and determines the type of processing required.

PGNEXT

Gets the next triple in source text.

PGSELL

Processes SELL triple.

PGTXSC

Scans text.

IPGTOl
L
__________________

~

I

Determines
action to be taken for a significant triple.
___________________________________________________________________
_

eTable IX. Phase IX Pointer and Area Checking

I

r-----------------------------------T---------------T-----------------------------------<1

I I
I Main Processing I
I
I I
Statement or Operation ~ype
I
Routine
I
Subroutines Used
I
I ~-----------------------------------+---------------+-----------------------------------.~
scan routine
IBUMP
___________________________________
_______________ I~ES~,ERASER
___________________________________ .1I
I LIMain
~

~

I Table IX1. Phase IX Routine/Subroutine Directory

I

r------------------T--------------------------------------------------------------------<1

I I Routine/Subroutine I
Function
I
I ~------------------+--------------------------------------------------------------------<~
I IBUMP
Iscan routine.
I

I

I

I

ITEST
ITests operands for pointer and area data types
I
I
I
I
bad statements.
I ERASER
L
__________________ IProcesses
____________________________________________________________________
.1I
~

190

• T,i i'll..' JD.

Phase

JD

Constant Expression Evaluator

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

I

I

statement of Operation

~ype

IMain Processingl
Routine
I

I

I

I

Subroutines Used

~-----------------------------------+---------------+-----------------------------------~

IInitializes phase, gets scratch
I etc.

IINI~l

INone

I

I

I

I

~-----------------------------------+---------------+-----------------------------------~

Iscans text, for constant triples

I SCANT

I MOHTXT, PREFIX,

I

CCNCA~

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

IHandles stacking/unstacking of
ISTAKOP
IUNS~AK
I
ILoperands
I
I
___________________________________ _______________ _ __________________________________ JI
~

• Table JDl.

~

Pha~e JD Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

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

CONCAT

Detects constant string operands, performs concatenation, makes new I
disk entry, and puts ref. in a slot for stacking.
I

INIT1

Gets scratch core for the stack, initializes slots and switches.

MORTXT

Gets next text block, resets pointer.

OUT

Puts out error message and aborts corrpilation if stack
tied.

lS

I
I
I
I

not emp-

I

PREFIX

Detects unary prefixed constant, makes new list entry and puts ref.
in a slot, for stacking.

SCANT

Main scan routine.

STAKOP

Push down stack handler.

TRYFLAG

Tests if stack is full, and if so, aborts.

UNSTAK

Moves entry from the stack.

UPTXT

Updates text pointer.

l WINDUP
__________________

~

I
I

Releases
scratch core and returns control
to the control phase.
__________________________________
_________________________________
_

Section 3: Charts and Routine Directories

191

Aggregates

Chart 06.

Lo~ical

******
*"6
* 81*
** *
it

*****81****
.STRUCTURE ******
JI.
*-.-.-*-*-.-*-.-*
•
STRUCTURE
•

·
*

PRF.PROCESSOR

.
*

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

it

..
.-.-.-.-.-.-.-.-.
:;;;~E t~~;

•

··~~:

STRUCTURE

•

• PRCCESSOR SCANS.
DATA CHAIN
•
•

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

.•.it

01
••
••••

• •••• 02 ••••••••••
.OEFINED
JP.

••
ANY
•• YES
.-.-.-.-.-.-.-.-.
OEFI"IEo
•••••••••• x.
nFFINED
•
••
ITEMS ••
..
CHFCK
•

••

*. *. •• • *

.....

• *

*•

·[7 •
• A1·

•

192

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

......x

.. "10

x

.n7 •
• A1·

•

Phase

Fl~wchart

Chart JI. Phase Jl 8verall Gogic Diagr3TI

•••••
·JI •
• U·
••
•
••••• Al.~ ......... .

•

••

·.'................'"
81.!......... .......82............
·•..•.•
·•................... ...'...............
·
LOAD CONT
'fM1JNTS ••
• MOVE
AND RELE SE •
•

•
•

LOAD IEMJK.
• 08TAlN FIRST
AND tEMJL
••••••••• )(. CHAtN HEAO

"

••

...,

C2 , ..

•••••••••••••••••••••••• e ••••

.

·•····.0".·.···.·.·.
·
.
.................

CI./IO.•

SFT

•

*

,.eXT CHAIN

•

)(

• x•••••••'••••

·

................. x.:·

41.

.. ..

*.

•

OF E~IN
.:.~~~ ••••• )(:
••
•
*..*
•

••••• 01.;. ••••••••

':"
••
•••••••••••••••••
x
••••..

:

NufEhEM

..

• X•• 01

·.·.·02•••••·••·•

..
•

: •••••••• )(.:·lAST CHAIN

*.

•

*.

,,-

••

• YFS

···.·0"·
•.·•..··.•
•

X

X

·•••••••••••••••••.
•
•

GET
COBOL CHAIN

•
•

•

*,........•

E2-

X
*.. *.

:)(...... ~~.:. .*nEAsoATA*. .:.
• '...............•
111.._
...

•

:

.*

•

•• LOOK AT ••
• ENTRY ON CHAIN •
••
•
••••••••••••••••••

••••••

•• '••• Et

HE:~~AIN

Cit •. *•
.... *:.
.~

•

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

• NO

·
••

.~

•••••C3..........

.~

••

.

PM~ n~~

CHAIN 2 "

•• VARU8LE ••

.....

• YES

x

• JK •
• AI·

•.·••F2··········:•
ic

•:

•••

PM~ n~;

CHAIN 1

•

STRUC TURE

..

•

•••••••••••••••••••

...

.
..
..................
K
,...'••••• F"••••••••••
MAP
•

,

ic

••••

.-

G2

.X...
.•.
• ••••.
• X · . ·0

•
•
• 01

*.

.:$

*.••

••

••

•*

.•.ic

••

.*

*

••

G4·

*e *.

.. ..

*.

.•

... **F5.;.••••••••

•

•

GET

NEXT ITEM

•
•

•••••••••••••••••••
x

*..*

••••• G5 ••••••••••
•
•

•• NO
• PUT STRUCTURE' •
••••••••• n X. ON CORRI'CT
••
• AUTO CHAIN

• YES

··•••••H"••••••••••..
.................

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

•

)(

X

*.

•• AOJUSTABLF

*0

••

4'. AnJUSTA8LE

• YES

H2

·•

ic
••

NO •• STRUCTURE
OR ARRAY
III • •

•

*..*
*. 0*

••

••

NO

•

• •••

•

•••••• )(. 01 •

••

••••

• YES

...IIlKF ENTRY FOR •
*ll RR ARY ROUT I NF* •••••••

•
0 ••••••••••

ic

••••• J2.· ••••••••

•
•

•
•
•

MilKE ENTRY
FOR LIBRARY
ROUTINE

•
•

•
•
•

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

Secticn 3: Charts and Routine DirEctories

193

....

Phase JK Over311 Lcgic Diagr3m

Chart JK.

.....

.·.

....

• •
•• A2 ••

• JII: •

• AI·

.....A1..........

CHNSCN

A2 .. ·'.0
:K••••••.••.•.

K

c~if~lO~6~:
slge~iE

....
•• .••

•

• •
••••• •

• Al •

Bl

••

...x

••

*.

~~21 NS

• : . OF

CI

MAKE A OVO

:
:

x

•••••
•
Al •
•• ••••
•

x
.....
.A1 •

•• ••
• NO

CHKOEF

.

x:
.•••••••••••••••••

.: .~~~ •••••

*. * . . *.*
X
•••

MKOIIO

NO •••• ~Y2
ves:
REQU? EO ............

·
.
"" •••••••••••••••••
:.K:
:

.....A3··.······.

X

•••

.JP •
•

•

••

• ••• *CZ..........

••••

*

....
•• ••

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

NO

•
: ••••••••

GET BASE

• ••

C3

•

••
l~
YES·
••••
olFlneo
••••' •••••••••
K:

••

• •••• C4 ••••••••••

.* ..!!Ai *. •• N O ·..
K•••••l~EII~g
•••••••••••• K:
••

....
•• ••

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

• YES

1

•••••••••••••••

OZ···..

• ••••

03.~........

i4..........
00
•••••••••••••••••

•••••••••••••••••

III.

·.FZ••••••••..•.FZ.t •.
.. ..

•

*..*

MAKE AN ROV

MKO¥2 •••c

.•.•REQU~fVREO •.•.••••••••••
NO
*. * . . *.111

H2

••••

••

...
*. •• YES
.*
*. •• YF S
••
ARRAV
•••••••••• K•• AnJUSTARlF. ......
*. *.
*. *"
••.*
....*
x
*••
*
*. • ro"NO
• NO
••••

••
••

...

.. ..
JI

••
••

••

K

••

F IKEO

seAL AR

*. *•• *.*

K

..•.....•

••••• KI.a........
:
ADJUS U R l ·
•
STRING E
: ••••••••
•
•
: ••••••••••••••• :

K.: ••'"••
til.

*•••

AUTO

*.,

••

0 ••

•

III

..
'" .
.•*.

194

.................
H4 ..
•

..••

•• ••••
•
11:5 •
•••••
•
X

G'5 •.

.i.VES

•

X..

.*

·6.*
• NO

x
•• ••••
•
••Al•••••

.*"

....
... .
...n

....

*0

••
••
AUTOMATIC ••
••
••

••••
• •••
••
CT~
•• ves.
•
X•••• OR T liP ........
1'5 :

'"

•
•

•

....

x:

G NERATF.
ODE T n ·
RFlOC ATE FlV . . . . . . . . .

Vo,,·

:..~~l~~~'*U~: ••:

••

x.. ••
••

•••••
•
Al •
•• ••••
•
i NO
J,' ' ••

YFS
:
••••••••••
•

K.
: ••

Ge~5~ A~a

RELOCATE
FlV VOA

~~~~=~~~l~:

....x .

.....

'"
•
'"

F4 •

:
'"
•

••:

IS
••
RJV
••
REQU REO
• '"

••
•.•. • ....
VFS

··....••••..
...
• K5

AlV~~' •• K) ••••••••••

foIO

x
•'" "' Al '"••

• •••
At :

••

"'AKE·
ROV AND
..... eo ••
CHAIN·

AlV~~~ •• ~4..........

•• X. E4 •

K"···..

x:

'I(

••·····J2······"'· ••••
•
•• MAP ARRAV "' •••

Flo •
•• ••••
•

•
•
•

•

x

' 1(

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

•• YFS
••••••
••

• NO

....

X

~IBRARV.

s~atH~~

*.

·:.~~ ••

• !II

.•....G4............

MAKE OVO

GENF.RATE.

IS·.

Rt~u?Rlo

:

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

K

3.:••••••••

.....H3..........
·:..................:.....•..
•
•
•

....

••

• YES

•
• F2 •
• •

·

ic

III.

R

SI

•
• 1:5•
•

.~.

••

.:.

••••••••••••••••••

•• K. F' •

•••

•
:

•

..• .•

'ROeOT

••••

veel

::

.,••••••••••:••••••••

• ••
K.

•

••• •• ES ••••••••••
•
ReLOCATF
•
•
BV O~PE
•

••••• a • • • • X.

••••
·~O

..F4••••..•.F4 •.
....o·

..

•• : ••VF.i •••

K

:
K.

TE"P

?

•.•

•

ic
GZ' •• ••

•••
HI..

••••••••• x.o ••••OR

•

..

x

:

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

...

• NO

••

'"

ic

••••
•
• :.
TEMP
.:.:~~ ..... )(:
III.

1;4 ••••

• ••
1!4
••
••••
••
cn
•• YfS

••••
..F3....
..
•••••
••••F3..........

• ••
X.

•

"

.. .

· ..

•••••••••••••••••

··.·~S

:
•
:

•••••••••••••••••
••••
.0 X. Al •
SETOVS, SETOVA ••••• •

••••••

• •••• El..........
•
•
•
STBMUCATPUBE.

A
•••••••••• x•• ADlu,TA'kE •••••••••• x*
.'1.fIEM
UCTU~~..
• ••• )( EN ••••
:

··.·:0

G ~5~A~5:
:
GE~5~RAl~
5 T RASE
••••••••• x.
R~LO ATE
ESS:
.: DEFINE ITEM

••••

PROCST...
EZ
••
••••
••
ANV
•• NO

.....05....•...•.

STB~U ••

•

•••
El
••
••••
••
IS
•• YES

:

0 •••••••••••

• ••••• VES •• •• Bl;~ •••• NO
:
MAP:
:
• Al .x•••••• IUITA'
FOR •••••••••• x. DEFINED ITEM •••••••• ,X.
••••••
AoBIE lNG··
:
: :

•• •••

..•

MAP BASE

•• X.

" OR Il\!
X
••• •• Ko; •• ·"' •• • •• •
:
G~~6~A~8
:
•
SET ITFM
•
•
• AI')ORF.SS IN
•
Rnv
•

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

....
x

...

...

Al •
'" .***
..

•

..

••• •
•• •Cl
•••••••
x

•••••
• JP •
• Al·
•

I EM~: ••• Al.~ ••••••• ~

A2' i.:~

.. x:• DEFI~~~NCHAIN •
•

:
•
:

•
: ••••••••

~ ~~~~ ~~

x.:·••

.. ::::::: ........... '........................ '........ :::

: YES •• ' . O~~~~E . ' ••
T ~
'.~ TR~Tg~

••
EN··
OF CH~IN . : .

: .................:

••••

Diagra~

Phase JP Overall Lcgic

Chart JP.

••

x: •••
K

•• ~~s~...

•

••••

•

YES

• • •

x:

Al :
••••

::::.:
• Al.
• •
•

• '.C~RRE~PONb! •• NO
:.X·.I~.DE~~NfNG ••••••••••••

· _. ..
*•••

C2

•••

<• • • • • • • •

)(*11;"

••

X·· ••...* ··(t •••.•..
StR~TORE ••

•

••. Bit ••

••

·

n •••

··.·~ES

·••••.
•

••••• •

I

d..

fRu ,
OF PA~K~O ••
•• STRINGS ••

*.

.-TN·.

....

••

*••
*
• YES

r~ A~I.'
1(....... .•. ••III..
O~
.
NO •• II
••

IN
SAM
TYPE

·

••• •••••• 0 •••••••••••••• 0

ERROR HE SSAGf.

t>

.

x•
l

• ••• 05 •••••••••

...............
F.RROR

:
•

X

GETCLS
••••

, ..

E5

: NO
•••
••

IIRF·.

•

: B5 :X.:~~.:·•• AAS
,9~~'~~g "':.X •• :
••
E SAME,.

.... •
• •

••••

•• TVPES ••

*•••

• B4 .x ••

• ••••• :
\.

P5

YES

••• ••
ARE

••

X.:~E~~~ch~tijG;: •
•• OF 8ASF. ••
... TYPE ••

*••
• *
NO

.

eft • • • • • • • • • • • • • • • • •

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

.

••••••••••

••
••

••

*••
• YES

NOTEI

g~~~~TA~~ I~~pl~p~? ATe

o. e.····o:

*•••

NO
• ····G4.········ •
•••••••••••• X:
ERROR
:

*•••
• YES

• X•••••••••••••• fl
X

••

K

•.•.

~i

••••

*. • ••NO

• $A

•

..x ••••••

G3··· ••

....

••

.:.:;~ ••••• ~:

••

*. • 00·NO

• NO

•••• OE~'N~O •••• YES

• ••

• NO

K

*•• -

NO

*0

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

•*.

G2' •• ••

....

X. A I •
• •••••

. . . ·15 BA~E·' •• YFS
CI.oX • • • • PACKE.

Fit
••
••••
..:.
SHE
.. :.~~~ •••••
•• STRING ••
••
••

·.1~EMI8N~~NS; •••••••••• ' " •••• P1CK~~

•

••••

••••••
•••Fit•••••

rc

.-.
• • Hl s:h

CS

•• ••••
•
Al •
•••••
•

•• ••••
•
Pl •

• Fl •

JP542

•

rc

....

X

••

••• ·~O

K

.-.tc

...,.............
..
•

••••

....
~gI

0

~E'S

• B5 •
• ..
•••
•

NO

0 ••••••••• 0 .0 •• 0.0.

..rJ4

0.

•• ABLE ••

0*0

X
F2
••
•••' •• Pl..........
YES •• ··DE~INE ••••
•• ".
ERROR
.X•••••••••• ITEM Y RV~NG ••
•
•
•
•• STR NG ••

.;,

......0
. ...

•

....

.;,..

AA5ij~T-

oe('oX • • • •

oo ...
.,....
•• o.

*..*
*••
*
• NO

*••
*
• NO

• t.

Cit

..gl~E ~~..

JP541'\
•••
••
E2
••
el~ E ••••
YE S •••• DE~~NEO ••••
COOED
•• X.......... IT EH ODED ••
ARITH ••
•• AR TH ••

*..*

:

··'f

.....XX.:irE~Eol~~2s-·:.~~
•••••• X"':·
..
IONED ••
••
• •
••••• •

ic

•••

TYPF.S,.

•.1(..

t ••

• 03 •
•••

•••

• • • • • • • • • • • • • II •

··.·~O

K
•• ••••
•
03 •
••••• •

..... *tI .CI.
oil.

• *.

....

YES • ~...
•••••
• . ~'.

.~..

*...
*
.

x

El

.

••

• NO
•••
AS
••
• .IS BASE.,
•• DEFINFD
••

JPlf'l

•• ··OfIJNEO·· •• YES
••
8ASE·· •• YES
X•••• PAlK~D •••••• oe • • o.X.(j.~ S RUCTUR~ •••

• *0

JP5lt3

• NO
JP541
•••
AI,
••
•• ARE ••
•• DEFINED •• YES

• NO

•• 02 IS ••••
• : . DHJ~EO ·:.!;~
•• A LABEL ••

.'., ....
•

sTRucTu~ttl····)~,·xox·l"l!~:M~~A'~;~·*o

•...•

C3

•• ··9~HNEO·· •• YES
t. ••
• NO

_•• t

:X•••••••• ·'1.

x

: NO
•••
83
••
••••
••
IS
., YES

F4
••••• •••••

: YES
• t.
Cl
••

~.......

Al :

••

• Cl ••
•• ••••
•

........

x

••••
JP2!'1'

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

x:

i.:~ s

NJ . . . . DE~~NED·' ••
TE aF IIBi~EBSET
... .

••••• A4..........
ER ROR

N? , ....... "

•••• ••••

•

~O

••'.

••

J2

.

"fc

• • It'

l~

••

.111.

•.••

D".~N~foNEn

••

_..*
*. ••

••

•

·

NO

y~S

•••••••• .,

J3
••
•••• 81~E'
NO
SUf:lSCRIPTED ••••••••••
••
••

.'.,

X.,

*e

0.··
X..

J4

• *. ••

IS
•••• NO
••••• JS ••••••••••
ARRAy
••••••••••
EIIROR
•
•• PACKED ••
•
•

X.

*...
.0 o.

n.

*. • ••YES

•

.

.

VE S

......•..•.....
)(

••••••••••• o •••• " •••••••• XXX.o •••••••• rfl."." •••••••• ~

•••••• VI'S •• ~;I~F~~~~~· •• NO
• Al "'( •• , ••• ITEM ADJUST- •••••• , ••
•
.)(
••
IIAlF..
•••• ~
*c
e* ".
•

*.

(\ ••• no" " ." • " ••• " ••• " .•.•••

NO

GETI.I~ ••K4..........

K 3' ••••

~

•

KS··· ••

:ER~tt~EII2fiF~~~n:

.>11".

BAS

.0.0

·X.
WITH BA.5F.
••••••••• '(..
GRF.AtER
••
•
lP.~GTH
• .
••
••
•
•
*1'1 •• c· *
•••••••••••••••••

0 6 II II • •

r<

•

II)

no.

II II 0 0 1'1 (10 _ • •

no.

II •

II •

~ II • • 0 •

II 0 •

YFS

n •••

Section 3: Ch3rts and Routine Directories

195

eTable JI. Phase JI Aggregates Structure Processor

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

I
IMain Processing I
I
I
Statement or Operation Type
I
Routine
I
subroutines Used
I
~-----------------------------------t---------------t-----------------------------------~
ITO re-order the STATIC AUTOMATIC
ISCANA
IMAP,MAPA
I
land CONTROLLED chains and to proc- I
I
I
less structures
I
I
I

r-----------------------------------t---------------t-----------------------------------·t
ITO scan down the COBOL chain for
ICOBOL-mapped structures

ISCAN
I

IMAP
I

I
I

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

ITo transfer items from the COBOL
IRECHAN
Ichain to the appropriate AUTOMATIC I
I
I chain

INone
I
I

I
I
I

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

ITo transfer control from IEMSI to
I IEMJM

ITERMIN
I

INane
I

I
I

~-----------------------------------t---------------t- -----------------------------------j

ITO map COBOL structures

IMAP

INXTRF1,NXTRF2

I

r-----------------------------------t---------------t- ----------------------------------~

ITO check non-COBOL structures for
Iconstant length

IMAPA
I

INone
I

I
I

r-----------------------------------t---------------t------------------------------------j
ITO find the next member of a struc-INXTRFI
I
I ture

INone
I

I
I

r-----------------------------------t---------------t------------------------------------1

ITO find the next element of a
I NXTRF2
INone
I
struct ure
I _______________ I _ __________________________________ .1I
lI ___________________________________
~

~

eTable JI1. Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

r------------------t---------------------------------------------------------------------1
MAP

To map COBOL structures

MAPA

To check non-COBOL structures for constant length

NXTRF1

To find the next member of a structure

NXTRF2

To find the next element of a structure

I
I

I

I
l
I

I

il

RECHAN

To transfer items from the COBOL chain to the appropriate AUTOMATIC I
chain
I

SCAN

To scan down the COBOL chain for COBeL-mapped structures

SCANA

To reorder the STATIC, AUTOMATIC, and CONTROLLED chains and process ~
structures
I

I

I
II

II

lITERMIN
__________________

196

~

To
transfer control from IEMJI to __________________________________
IEMJM
__________________________________
JI

.Table JK. Phase JK Aggregates Structure Processor

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

I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~------------------------------------+---------------+-----------------------------------~
Iscans AUTOMATIC, STATIC, and
ICHNSCN
IADHDV, CHKDEF, MKDVD, MKRDV,
I
ICONTROLLED chains
I
IPROCDT, PROCST, SETBRF, TERMWS
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses DEFINED items
ICHKDEF
ICMPIL1, INOBJ, PROCDT, PROCST,
I
I
I
I STBASE
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses structures (calculates
IPROCST
ICMPIL1, INOBJ, ELSIZ
I
loffsets, multipliers, sizes, align-I
I
I
Iments and padding; generates objectl
I
I
Icode)
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses arrays (calculates ~ulIPROCDT
ICMPIL1, INOBJ, LOADCN, SP54
I
Itipliers and generates object code I
I
I
~------------------------------------+---------------+-----------------------------------~
ICalculates storage offsets for
IPS25
ICMPIL1
I
ladjustable items in structures
I
I
I
~------------------------------------+---------------+-----------------------------------~
ICalculates storage offsets for
IALVACA
ICMPIL1
I
I
I
I
I adjustable arrays
~------------------------------------+---------------+-----------------------------------~
ICalculates storage offsets for
IALVACI
ICMPIL1
I
I
I
I
I adjustable strings
~------------------------------------+---------------+-----------------------------------~
IGenerates code to initialize stringlSVARY
ICMPIL1, INOBJ, IPDV, VOBJC
I
Idope vectors for arrays of varying I
I
I
Istrings in structures
I
I
I
~------------------------------------+---------------+-----------------------------------~
IGenerates code to initialize stringlVOBJC
ICMPIL1, INOBJ, IPDV
I
Idope vectors for varying, nonI
I
I
tstructured arrays
I
I
I
~------------------------------------+---------------+-----------------------------------~
IGenerates code to calculate the
ISTBASE
ICMPIL1
I
Istarting address of storage for
I
I
I
loverlay defined items
I
I
I
~------------------------------------+---------------+-----------------------------------~
IAdds text skeletons to the output
ICMPIL1
INone
I
I
I
I
I stream
~------------------------------------+---------------+-----------------------------------~
IMakes dictionary entries for dope
IMKDVD
IELSIZ
I
lvector descriptions
I
I
I
~------------------------------------+---------------+-----------------------------------~
IMakes dictionary entries fer recordlMKRDV
IMKCNST, CMPIL1
I
Idescription vectors
I
I
I
~------------------------------------+---------------+-----------------------------------~
IGenerates code to set the address
IADRDV
IINOBJ, CMPIL1
I
lin a record description vector at
I
I
I
lobject time
I
I
I
~-----------------------------------+---------------+-----------------------------------~
Icalculates the length and alignmentlELSIZ
INone
I
lof scalar data items
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
Isets
offsets for BASED variables
IBASED
L.
___________________________________
_______________ INone
___________________________________ JI
~

~

section 3: Charts and Routine Directories

197

.Table JK1.

Phase JK Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------1
I Routine/Subroutine I
Function
I
~------------------+---------------------------------------------------------------------\

\ADRDV (JL)

Generates addressing code for

AUTOMA~IC

RDVs.

ALVACA (JL)

Calculates storage offsets for adjustable arrays.

ALVACI (JL)

Calculates storage offsets for adjustable strings.

BASED

Sets offsets for BASED variables.

CHKDEF (JM)

Processes DEFINED items.

CMPIL1 (JL)

Adds text skeletons to the output stream.

ELSIZ

Determines size of storage required for structure base elements.

INOBJ (JL)

Initializes object code statements.

IPDV (JM)

Generates code to set up primary dope vectors.

LOADCN (JL)

Generates object code to load object registers with constants known
at compile time.
~

MKDVD

Makes dictionary entries for DVDs.

MKRDV (JM)

Makes dictionary entries for RDVs.

NXTREF/NXTRF1 (JM) Gets 'the next structure base reference.
PROCDT (JM)

Processes arrays.

PROCST

Processes structures.

PS25

Calculates storage offsets for adjustable items in structures.

CHNSCN (JL)

IScans AUTOMATIC, STATIC, and CONTROLLED chains.

SETBRF (JL)

Sets the reference to the current entry type 1.

SETDVS

Sets the dynamic dope vector size for non-adjustable structures.

SP54

Calculates base element multiples.
Generates code to initialize starting address storage for overlay
defined items.

ISTBASE (JM)

I
I

ISVARY (JL)

Generates code to initialize string dope vectors for arrays of
varying strings in structures.

I
I

ITERMWS (JL)

Terminates object code.

I

IVOBJC (JL)

Generates code to initialize string dope vectors for varying, non-

~
~
~

I
I
i
I
I
~

I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

IL __________________ ____________________________________________________________________
structured arrays.
JI
~

198

Table JP. Phase JP Translator Defined Check

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

I
I

Statement or Operation Type

IMain Processingl
I
Routine
I

~ubroutines

I
I

Used

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

IScans DEFINED chain; checks
Ivalidity

IIEMJP
I

IGETCLS, GETLTH, STRCMP
I

I
I

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

IChecks that two structure descrip- ISTRCMP
INone
I
Itions are the same and that they
I
I
I
be validly overlaid
I _______________ I _ __________________________________ JI
lImay
___________________________________
~

Table JP1.

~

Phase JP Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

FUnction

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

GETCLS

Analyzes structure descriptions, and checks that all
the same defining class.

GETLTH

Obtains length of string or numeric field from associated dictionary
entry.

IEMJP

Controlling scan of DEFINED chain; checks validity.

JP8

Tests whether defined item is packed.

JP20

Tests whether base defined item is adjustable.

JP200

Tests whether item is a structure.

JP540

Tests whether defined item is coded arithmetic.

JP541

Compares base and defined item.

JP542

Tests whether defined item is dimensioned.

JP543

Tests whether base code is arithmetic.

ele~ents

are ofl

I

structure descriptions. ___________________________________ J
LSTRCMP
_______________ •___ ICompares
_________________________________
~

Table JZ.

Module JZ Compiler Control

r------------------------------------T---------------T-----------------------------------,
I
I Main Processing I
I
Function
I
Routine
I
Routines Used
I
I
~------------------------.-----------+---------------+ -----------------------------------i

IReconstructs the phase directory
IIEMJZ
Ifor the second half of the compilerl

IRLSCTL, ZUPL, ZEND

I

I
I
I
I
I ___________________________________
EnllLE-Q§/36Q: BLDL
I ________. _______ I ___________________________________ JI
L
~

I
I

~

Section 3: Charts and Routine Directcries

199

PSEudo-Code

Chart 07.

-....

L~gical

..·

Phase F1Jwch3rt

• 1'7 •

• AI·

.-.-.-.-.-.-.-.-.

A3

••
• •••• A4 ••••••••••
•• ANY..
.CALLS I: F"IS
I1L •
•• GENERIC •• YES
.-.-.-.-.-.-.-.-•
••
ARGUMfNTS •••••••••• X.
PROCESS
•
••
••
•
r,t:NFRIC
•
••••
... FNTRY NAI1ES •

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

•
•
•

UTILITY
SCANN ING
PHIISE

81

.•.x

•
•
•

••

••••
•• DYNAMIC •• YES
INITIAL
••••••••••
••
••
••
••

.. ..

*.

.•.X

•••• e •••••••

X

••••• 11 I ••••••••••
• SCAN
LA.

• NO

.. ..

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

.!.

X

• NO

• •••• B2 ••••••••••

LR.

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

.. ..

X. CONSTRUCT P-C •
•
TRIPLES FOR •
.DYNAMI C I NITI AL.

.COMPIL ER FNS nM

.

:£................

• NO

...·. ........................ ..
x

X

·····B5··········
.-.-.-.- .-.-.-.-.

83
••
• •••• S4 ••••••••••
•• ANV ••
.CALLS &. FNS
MI1.
•• CALLS OR •• YES
.-.-.-.-.-.-.-.-.
•• FUNCTION
•••••••••• X.PROCES~
CCk~.
.R~~ERENC;~..
~~vhc~~lgNS :

*-.-.-.-.-*-.-.-.

.INITIAL

•
PROCESS
•
*COMPILE R FNS & •
.PSEUDo-VARI MILS.

•••••••••••••••••

)(

·.-.-.-.-.-.-.-.-.
..··C5···.······
.................
X

CI
••
• ••• *C2 ••••••••••
••••
.INITIIIL
LD.
•• STATIC
•• YES
.-.-.- ....-.-.-.-.
INITIAL
•••••••••• X.CONSTRUCT DICT,.
••••
••••
:sTi~r~ll~I~?~L :

.. ..

*.

• NO

.ASS I GNMENT

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

...·xx........................ ..
.-*-*-....-.-.-.-.
....
.
.. •..
..................
·X
.

·
...• x•••••••••
X

01
••
• •••• 02 ••••••••••
••••
.00 EXPANSION LG.
•• '
DO
•• YES
•• STATEMENTS •••••••••• X.
EXPAND
•
••
••
•
DO LOOPS
•

.•.·

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

·

• X••••••••••••• 'I.e." •••••

·FI··········
.....-.-.-.-.-.-.-.-.
.................
.... .

··...F3··.·······

.emE

x

••
• •••• GZ ••••••••••
ANY..
.STRING HANDL LX.
• '" STRING
•• YES
.-.-.-.-.-.-.-.-.
•• EXPRESSIONS •••••••••• X.
CONVERT
•
"'.
••
.STRING TRIPLES.
Gl

III

G.l

..

•

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

JI

••

.•.x

·
•

·· ..

••

·

.•.

• X•••• " ••

X

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

·

•• X. Gl ..

J3

••• "

00

eo

G ••• " ••••

YES
•••• OPt~nspR ••••••
••••
0

eo

(1 • •

0 0

I)

•••

e ••••

~

•
•
...

2ND PAS~

...
K

/>In

*0

It.

(1,.

• ORIE'ITFfl 1/r')

••

.* I N-Ll 101 E*Q ••
••

• •••••• CONVERSIONS.·
• • • • 3RDPASS.*

.,*

*. • 0*VFS

CI

··.··J5···.······
.-.-.-.-.-.-.-.-.
X

.CP •

'"
•

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

.

0- • • .,." • • ,.. 0 )( CI

• )( • • • • olt." • • • eo" •• oo.t\o.oe.

X

K3

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

.. 0

ox

····
. K5·······*··
.-.-.-.-*-+-.-+-*
.crlN~TA'ITS

•• lINV ••
"nATA FURI1 NT ,'I\).
•• DATA nR •• YeS
.-.-.-.-.-.-.-.-.
••
FORMAT
." . . . . . . , oX" MM(E LIB CflLL ..
••
LI STS ••
.S~QS FOR DHV ..
••
...
.. FnRMlIT LISTS •

• (I"
~

·

•••••••••••••••••

• NO
•

•

G "

• • ., G C' •

e

I'J ., 0 "

., (I ., • • 0 -0 •

..

eo'll( "

(I

o.

II

eo" •

0

,

~

II!

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

x

*.***

..." '"

...'~A2*

2 00

os.

.cnWERT CO'lSTS •
• Tn 0EOO 1Rff) ".
• INTFRNAl FClRM '"

Phase LA Overall Logic

C:hart LA .

.....

..•

Diagr~m

·LA •
• A1·

NOTE:
THESE ROUTINES ARF. SCAN
RgUTINES CALLED BY
C ~P LI'R PHAses IEMLPJ
THROUGtl fEHOE.

X

•• ~' •• Al·······.··
•• Fl.AGSl
INITIALIZE
•
PO NTERS.

DYI

••••• A3······.··.
.CONSTRUCT DOPE.
• ••• A4 •••••••••
•
VECTOR I N . .
•
RETURN
•
• WORKSPACE FOR ••••••••• )(.
.BASEO AGGREGATE..
•
~

.................:•
A~80k~~~

:

•

! •••••••••• •••:

,

X

MYZ

:

• •• ··83.·· •••• • ••
~~n ¥~E~:

•• •••••••
•·····81·
•
•
TRANSFER TO •
: s~:~R~bnH~~ :
•••••••••••••••••••

.•................•
:

x

•••••
•••

oij~~MG~~fNG : •••

·

•••••••••••••••

•••• *64 ••• •••••••

0. x· 0)(:

RETURN

•••••••••••••••

:

..0:

HY~t• ••
MY3A
·.C3 ••••••••••

·LB •
• AZ·

:GEN~~nE~s~~XT

: ••••
.TO OUTPUT 8LOCK.

•••••••••••••••••••
SC2

·

..

••• '~.Ol········.·
MOn I ~reR ~~T
OUTPUT

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

:
•

•

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

: ••••• :
•

,~

•
•
:

UPDATE TO
NFlCT Til. I PLE

SCl
• •••• 03 ••••••••••
•••
•
'~ •• ·D4··.·····.
.)(
•
S~AN F O R . .
•
: . I• • • • • • •
RTiV~HEO
: •••••••• )(:
RETURN
:

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

K:

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

•

• •

1'4·••••••••••
.1'3···... • ..40 •••.
•:••••• ···.1'5·.·••·•·•

SC4'~il~.El..........

•
.:•••
:

.
.
...................
• MARK CURRENT
rN:~~T~bOCK

•

e ••••••••• tt • • • • • • • •

.... ....

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

•• WAS ENTRY •• NQ
•
o.e$.o.".x ... x.tt:!
SC6 OR S~Z ••••\. •• Xe.,)(:
•

SC5 '1~~.Fl ..........

YES

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

ACCESS..
T~i~lF
e.oX:

RFTURN

•

:

··
..
.................
K

•
••
CURR ENT
:• MIIRK
ll~~U~A~~~gK :.& ..................••.
• ,
•

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

sce '1~~,lGl ••••••••••

I~ • • • • • • • • • • • • • •

•

• ••••F 3 ••••••••••

•
0 • • • • • • (\0

•••••

•
•

MaYI' TRIPLE.
•
TO OUTPUT
•••••••

G3···..

•••••

G2..........
r"' ••••••••••
•
• • UPOATE INPUT •
••
WAS
••
•
'40YE T H E .
• ••• GIj •••••••••
• MARK CURRENT
•
•
POINTER T O .
•• ENTRY AT •• NO
.COnE OELI'4JTED • •
•
INPUT BLOCK
•••• o • • • • X.RF.GISTER STt.TUS . . . . . . . . . )( •• SC11 OR SC12 •••••••• "X. BY JHP TRIPLE ••••••••• X.
RF:TURN
•
•
•
WANTI'D.
•
flYrES.
••
••
.TO OUTPUT BLOCK.
X.
•

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

·

x

.. ...

*...
•

YES

• • II!I • • • ~ • • ., • • It

·

.

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

_.:J o •• " •••••• eo It.

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

0 •• " ••• 0 ••

SC9dH~Hl . . . . . . . . . .
•

*

HARK CURRENT
INPUT BLOCK
NOT WANTfO

•
••••••••• ,.0 • • • • • 0
•

•.................•
..•..Jl..........

•

SC1"

.....

J2 ••••••••••
CONYERT THE • •
•
• ••• J3 •••••••••
SYMBOLIC.
•
ADJ U S T . .
•
INPUT POI NTER •• ". . . . . . X.PARAHETER BLOCK ••••••••• X.
RETURN
•
TO ABSOLUTE • •
• •
•

·....
•
•
•
•

•
••

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

,~............

"'

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

section 3: Charts and Routine

Lir~ctories

201

Phase LB Overall Logic

chart LB.

Di~g~~m

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

•••AZ·
"'lB·

•

ic
.....··AZ·········
•

SCAN

.!

T~~T I~~R :
•••••••••••••••• 1(: i~a~
AL~~JLr~p :X•••••••••••••••••••••••• ·•••••••••••••••••• :

•••••••••••••••••••

.•.
fc

BZ

•*

••

*•

....
··.·:0

• :·EOP lAfpLE .:.!~~
••
FOUNO ••

.....

.....X

:~~I:

•

NO..
••••••••••••••••••
*.

EZ·· .

:.••:u. .~.~•••:

•.•. .•.•

:-.-.-=~~

•
•

PR9C'Sf
ANY ~lAT Al

Tc

•

.•.•G2

••••• G~:T:;·····.

...............
TO MAIN

.........
•

x..

.•.

••

N:

Auto"~9Yc

•••••••••

:•••••••••••••••:

•

INIT I AL PROCESSING
•
•

•

SC N

•••.

CHAIN.

G3 ••••••••••
x...................
.

....

NO
•••••
INItIAl
••••••••••
RETURN
•• Fl G Oft ••
•

*•••

•
•

• YES

...
ic

••

••

••

H2

••

*.

•

•

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

is
••••••••••••
yes
•
PROCESS
•
IT" AN
X.INITIAl STRING.
"'. A RAY..
•
•

.. ..

...*

*

·NO

fc

MAIN

•••••JZ ••• ••• ••••

•

INI~Vi~T~NTRY

•:
••

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

:

••

·• x••••••••••••••••
ic
····*ttz . .•••••. •••

CNSTWK
•
•

•
•

202

.

0 ••••••••

OUTPUT.
• ••• K3 ............ ...
5NZ A N D . .
•
ASSIGNMENT
••••••• " X.
RETURN
•
TR I P l E S . .
...

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

Olt

ElD

••

••

*. *•••.*
x•

SCA~t~.*E3.~........

YES ••• :
~lTE·· •• NO
:
.X. •••••••••
~k LE
•••••••••• X.
•
•• F UNO ••
•

•*

OF
••
AU O"ATIC ••
••
HAIN.·

•••••••••••••••••

.....El.'.........
. -.-:

...

• YES

..,z.!••••••••
•: lOY ~~~~~AiNTS :•
••
••

AUTiU •

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

....

*EIt.\ ••••••••

:.. ...... ~1~._
X.
PRoces~ .
• ANY INrTtAl

.... _:•

:•••~u:n~.~•••:•

Phase ID Cverall Logic

Chart LD.

Diag~~~

"'' ' ' ' ' '
'" '"'"

"'lO '"
'" AI'"

·X

: S T(\OO4)

"'' '0' ' ' B1•• "'''' •••• '''.

:

:,

~2~~Ul
sr:~~

:

·

:
'"

• • ~I • • • "' • • "' • • • • • • '"

x

•••
GAAt·
.",C1 1 ""..
: •••
~
.~, OAi.
"'. YES
•
INHul.
··~I. IU:A~N •••••••••••• lC:
sn~~

:."''''.''''''.'''.''''''.'''.''':

~

··~'·*oI···.······
cORRiHI~NTRY :

:
•
•

:•.

•
•

.

·

• ST999~1

•

••"'."':

ON
CONSTANT

,."'.~~U=

lC

• ••'.*1:1.·
•• ·"'···.:
MAK~olLOT

..

:

:...
~3=n:~fO :
• ..........."' •
'

·
·
· .•...FA··········
~

:STN'88

:

IN~Hh

:

:

:

:

l~~W

•

•

••••••••••• 41 •••••

G)

• NO

•*
••

••• e..

•..

..

K,

••

END
OF CHAIN

CNSTWK
••
A •••• NO
:: COR~~~~I~NTRY :
FA~~:;R •••••••••••• K: CON~~ANT
:

"'·"'''''''C4''''''''''''.'''''''''''''''

C1

..··1T1~

:........ x••••

•••• '"••••
NO
.CNSTWK

•••

*Ci•• ••••••:

:.",,,,••~~:l~,,,,,,,,,.,,,:

"'. "'. • ..'
'"
YES

CNVERT
X
• •••• 03 •••• • •••••

·•
•
:

CONVERT TO

'"

•
:

..............."'•.
FW~~AI~RO

GACl

K

"''''.''''''04··
••·.'''••:•
MAK~ ~LOT
: ~S'M~~~~n :

...................
:'

•

•

ARRI~.*E1.i••••••••

•

•
:x...........
•

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

:•
•

seT U P .
Tn~ll~~

•
o •••••

STI)~~ •• F3.! ••••••••
•

POINT

•

:• VAl~~
T~t~T :
TO TABLE
••••••••••••••••••
••

*. .,

*. *•• *.*

.*

•
•• JC • • • • • • • • • • • • • • • • • • • • o • • • o • • • oooe • • • • • • • • • • •

• YES

~
• lG •

•••••
• At •
•••

Section 3: Charts and Routine Lirectories

203

Chart LG.

.....
•.•A1·.

Diag~~~

Phase LG OVErall Logic

·•••••••••.•
.•.
....
....
.. ..

·LG •

• A3 •

.
. x:....
................. ....

x

LGOOOO
fc
·INITIALlZATlON •
:
~MRi~r1~ :
•
DO BLOCKS
•

•••••A1··········

41

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

••

• : . WHILE'
••

·:.:~~ ••••• lC: g5~@R~l5'4T~T

••

: ....
III :
STACK ENTIlY.
•
•

•

• NO

LGf"Zl~ . .B1.i ••••••••

•
•
•••••••••••••••••••
•
•

:SCRATR~LEA'S
H S RAGE: .......

x

·LS •
••••••
A1·
••
..

x

C1···..
LGO~ll •• c2 ••••••••••
••••
• PUSH OOWN 00 •
••
•• YES
•
STA~K A~O
•
••••
00
•••••••••••• K: '~JL ~H~~
••
••
•
ENTRY
•

.. ..

• NO

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

.••.•03...........

•••••••••••••••••

• •••••; ••i •••••••

•• X. B1 •

x

01 •.
•••

LGClt:' 11

....
• ••• YES
: PU~Ag~'Ngo :
: ~ftNAiONT~~h:
ic ......
••
ITOO
.......... K. INITIA~I~E
......... K. AN~ l~¥ il
•.... K. B1 •
••••
••••
:
NE~N~R¢ K :
:
nA~K 9~TI~:
• .....

•• .•

• NO

X
E1···..

LGI'~l~.~,F ••••••••••

....
.. ..
• NO

LG('~IZ ••

*..*

•

• " *cONTRO •••• YES
:
•• VAR IABl~
.......... )C.
••
••
•

•• • ••NO

•• • *

*.

DO STACK

Fl···..
X

*.

gros
~~!E C!i8~P
ANO PDP UP

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

•• ' • DO' •••• YES
:
•• DR tTOO'
•••••••••• K.
••
••
•

G!

...ic

•

••••••
•

•

F2.......... E

)CP~~k •• F3 ••••••••••

SY~~~~~tTKEG

!

:
:
ANA YZ TH
FOR LOOP
........ ")C. EXPR~SS ~ON ~N •
CLOSE.
• ENSUING TEXT •

••

•••••••••••••••••

•

•••••••••••••••••
ic

••

TO,BV

*.

:

••••• lC. B1 •

*•• *

*. ••

.-

.*

YES
,
•••••••••••••••• eo ••••• e ••• '·II • • • OO

•• ••••
•
111 •
•••••
•

• NO

ic

HI···..

••••

• :. TO~AB~. ·:.!~~
•• EQUALS ••
••••

•• ••

"'00

H2..........

LG~ ~~! ••

• GENERATE TEXT •

..... X:•
•

~REn~l~~

EXPRFSSION TO
A TI'HPORARY •

•••••••••••••••••

x

lG~"21

• •••• JZ ••••••••••
.SAVE LOOP ENTIlY.
•
AND HI' 'IT
•
....
.... YFS
••••
WHllf ............
~~'~~FA~~TWN :
••
••
..
00 STACK
•

.. ..
·.....
"lO

x

• A3 •

* *••• •

204

..SPEC

•• ••

.................
·•.....•

'1:

x

••• *

• 81 •

o.

.00

ic

•••
Jl
••
••••

•

H'3···.11

••••

COOlii
••• H4 ******* ••••
•

:• ... ,•••• x.lhRn~V~FpARt:.:~~,
••• lC:
•• OF THIS ••
•
•• ••••
•
• IH ••

....

GF.NE"·~~b H~T

! ... :

•• •••••••••• * ..............
COlli'lT COOl'

•

Phase LS

:-::hart LS •

.....
.•

Logic Diagr3m

~verall

·LS '"
• AI·

'"

X

••• ;·"'Al·.···"'····
•
INITIALIZE
•
•
WORKS PAC E
'"
• ANO TEMPORARY •
•
I)ESCP.IPTION •
•
STACK
•

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

..
·· ..
.-.-.•-.-.-..-.-.-.
.. ...............
• Ell •• X.

X

L Elf •••'.

·····81··········
•
LA
•
•
lJISE SCI TO
•
• LOOK FOR TR IPL E.
•
0" INTERE'ST •

"'

x
•••

eopz.. ......C2 ............ ..

CI
••
••••
•• END OF
.... YFS

*. ...

PROGRAM

.. ..

*..1lI

••

••• O

..
•

•••••

••

01

WANTED ANO

•••••••

•

~r

X

•

••

LflE21

*.

-. *•• *..

.* ))2
*c

·

.0 .0

••••

",.

• •••

*. '" 1:.'YES
.
K

•••

.

C O"lST
• •••• F 3 ••••••••••
CREATF
•
••
IS
•• YI'S
•
DICTrONARY
'"
".
OPERAND
........... X'"
fNTRY FOR
'"
.A CONSTANT..
•
URGFT
..
"'..'"
'"
CO"lSTANT
..
• NO
E2

•
•

SET UP

"'.

,..0

;ARITH
x
••••• E I ............ .

DES8n~n8NS

•••

•• OP fRAN!)
NO
•
•
••• X•• CONVERSION •••••.,.X. F3 •
·.RI'QUIRf'O ••
••

• YES

:

•

P.ELEASF L S .

.. AI •

.• ~~.: *.·H~~E~kl ~~E·:.
••

••

•

.........................l••.***V
.
..

•

•

.. NO

.•.x

HARK NEXT
PHASES I"

flX.

••

.. ..

:

•••••••••••••••••••

................
.
....
.
· ....
"'

·.......
.. 1'3 •• X.

·
.
•.... ............•
X

•••• '~F I •••••••• "'.

•
I)ETERHrNE'
•
.CHAItACTE RI STICS.
•
OF RESULT
..
,~

GI

.•.x

••

.0

•• STRING
TVPf
•• RESULT

*.

tl.

)(

x

:CONVT

ARITH2

•••••CALCULATE
... 2 .. •• ..····"'·•
8~SE, SCALE
•
•
: H08~'T:~a~f'
:

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

.* ••
*••
*
• YES

NO
•
••••••••

x

:STRING
• ••••·Hl··········
..
OUTPUT
•
•
•
~)ECESSARY
..
••• X: TR IH~~ AND :
.. OESCRIPTIONS •

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

• x•• e"e ••• 0'.

RELSTK
~
• ...... JI· ......... • .....
:
TE~~~FcnD :
•
FROM TEMP
..
•
SUCK
•

·............... ....
"'

..

x

X
"'.··.112
••••
·."'··.
AS~~~~RNipLF
~b ~~~aH

H3

~~~.~.~

'"
•
:

SOURC~

:
•

•
••• ""

••

J)I • • • • • • • • • • • • • •

.."' •• Ht. ••••••••••

.0

••••

•

GF.NF~A TE

PS EIJD!)-C::mF
FOR FrXEn

81"1ARY

EXPRESSION

•
•
•
•
•

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

•• .. ••YES

:ASSIGN
K
• •••• J3 ••••••••••

iND.
•
TARGET IN
•••••••
IJE~~d~~~~Y :

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

~L"AT

FXC I

••

0"

:

....:

•••

••••
•
FIXEO
"10
•
••
DECIMAL
o • • • "O.",.X.
••
••
•

• • • • • IOt • • • • • • • • • • •

:...... x

FOR

X

ASS IGN

:
•

PSr:lJ")O-Cf)O~

EXPRESSIJ"I

·····G3····.··.··.

TARGFT
.........FOR"'."''''''''''.''''''
.. ' ' ' ..•

:

•
•••

..
:• ~~~~¥l~~~
:•
AllGNMI'NT
••••••••••••••••••
•

elr :•
TI Mf'

G~t T0 ~j

WORKSPACE

...'~ •• F4 ••••••••••
Ge"lEP~.TF
•

iII..*
*
*••
• YES

"'····GZ··········
..
•
•

LRFLl

••

•• OPERANDS ••

•

:

....

••••
•
.,.
., NO
•
• •• X•• FIXED POINT •••• ,.•.•.• 1(.

K

*. ••

F3

:
•
•
•

..

AS~~~~RtUPLE

:
•
•
•

.................
FOR DECIMAL
S~IFT IF
NEEDED

K
...... Kl· .. ··.·"' .. • ..
•
Ann ANV
•
'" RESULT TEMPS •
'"
TO TFMP
'"
•
SUCK
•

·....... .."'."'.......
··....."'....
"'

x

• I'll

•

Section 3: Charts and Routine Lircctories

205

Phase LV Overall Logic Diagc3n

chart LV .

..•

•• $ ••

·LV •
• AI·
NOTE

..... Al········.·
•
•

·

I ~I TI ALI ZE
CO""O~

•
•

.

: TO:Nbn :
•••••••••••••••••

I

THESF TWO ROYTlNF.$

K

STUTO

A~r:

··.*

~~~YSIHNgA~l~bl~VS •
COMPILER PHASES IEMLW
THROUGH I E"'OG.

····AZ·········

• lSTUTl
•
•• •••••••••••••••
••

•

.

*·A4· .. ••• ... • ..
7.STUTZ
..

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

x

•••••
·U •
• Al·
•••

X

STRUTl

•••
••
IS
••
•• SOURCF
•• YES
•• OPERAND A ••••••••••
•• CONSTANT ••
••

8Z

.. ..

...*
• Nfl

: STRUTZ
X
• •••• 8~ ••••••••••
··.*·84· •• ·* •••••
• CRFATF NFW
•
*OETFR'1INE TVPF •
.f1F STRING DOPE.
•
OICT lO~ARY
•
X.
ENTRY FOR
., . . . .
•
VFC TOR
•
•
CONSTANT
•
•
RE(IUIPEI')
•

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

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

...

it

LSUTl7

•••
(Z
••
•• RFSUlT..
•• STRING
•• YES
•••• L~N~~~ . . . . . . . . . .

*.

.. ,.

••

it
·····C4.•••••••••

• •••• C3 ........... ..
•
•
•
CONITRUCT
•
8UtRI~HGN
:

.,)!:

•
GI:'IERATE
•
PS f.UO'J-C~OF
• TIJ (NI TI
HI:
•
DOPE: VFC OR

A

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

..*

.. Nfl

•

•
•
•
•

: •• ~~.~~~~1~~2 •• :

·

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

LSUTZ7
X
...... OZ··········
CO~STRUCT

•
•
•

•
ASSIGN
•
TRIPLE.

·

• K••••••• if!

LSUT26
it
• •• ··E2··.···.···

:

A~~7~~AI~0

"'.0. "'. ., ...
~

.

0 •••••

·····"'4·····.····
it

:

•
•
..
•
..

ANY T"'PD
TRIPLES

·

• X••••••
II

LSUT?2

•
•

*•••

.*

• NO

K

.····G7 ............ ..
RETURIII
..
•
•
OFSCRIPTTON •
•
UF RFSULT
•
•
STRING
•

·

.

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

··..................
K

..

206

..

•

..

It • • • 0 • • • • • • • " . "' • • • • • • • " . , . • • • 1& '" C

1&

•••
FZ
••
• ·STRING ••
•
• -nOPE VEl-TOM •• YES
•
•• •• R~~~V'REO . . . . . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . .

*.

•
•
•

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

·..................
•
•

INCREMF.NT
AOOR
OEPENOIIIIG
ON TYPE of
OOPF. VECTnR
RETIJR~

.···HZ···· .. • .. ••
RFTURN
..

··.................
~

••••F4* ........ .

..

R~TlIP.~

•

.....

··....•••..

Diagr~m

Phase LX Overall Logic

Chart LX.
·LX •
• A1*

•••

•

BEGIN
X
••••• A1 ••• •••••••

A4

•••
INITIALlZI'
•••••••••••••••••'"

••
•

·

A4 •

•
x
•••

lIl2

••

• •••• A5 ••••••••••

•• ' . NOT •••• YES
:
p~~~~l60E :
•• OPF.RATION •••••••••• X.
I'OR
•••••
••
••
• NOT OPERATION.

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

.. ..

.

*..*

•

• NO

.•.

•

K

••

'14

••

CAN ••
• •••
•• IN-LINE . , NO
•
•
••
CODE BE
•••••• K. K2 •
•• GENERATED..
••

*0

*•• -

••

• •••

• YES

x

• :'~

••

,~.

•••

C1

LB

••

*.

•

....
.. ..
~~8c.R~M

.•.x

C4
••
. .••• C5 ••••••••••
••••
•
GENERAT!'
•
•• CONCAT
•• YES
• PSEUOO-COOF •
~'.
OPERATION . . . . . . . . . . K.
FOR
•
••
,.
• CONCATENATION.
••
••
•
OPER AT ION
•

• •• "'.C2 ••••••••••

•

..··"'··...·..······MB
. ......

.: .~~~ ••••• K:
••
•

PH:~rKMP

.. ,.

: ••••••••
I F WANTED.
X

• A1 •

• NO

•••

x

•

*"

• *.

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

1'j0

•

FUNT.
*. .,
02
••
03
••••
•• CAN ••
• •••
•• NO
,.
BOOL
., YES
••
IN-~INE
•• NO
•
•
•• o. 0 ER T ON ............. X•••• FOOCT ION •••••••••••• K•••• ~~~RA¥~D •• '." , • K: H2 :
,.11
".
••••
~TRll'i

• 0

**.
••. **

• NO

K

STROP

•• ~' •• E1 ••••••••••

•• SET UP ••
: ClEs2:~ ~~~8NS :
•
•

T5 •••••

:
•
•

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

~,

OTHE~

TRIPLE
TYPES

.

X

•••••

••••••• FI· •••••••• ••
:CluR~H~~I~~lcs:
•
• ' OF RESULT ••

••

F2.~••••••••

••
•
••

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

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

.•.x

x
•• ••••
•
B1 •

Gl

•
•

•

I'jO
•••••• CONVERSION ••
-.REQUIRED ••

*•••

••

• YES

.....-.-.-.-.-.-.,

••

•

it

•
:

0)(0 111 • • • • • • • 0 •

••••• F4

SET OP

:
•
:

•
:

N~~8EJg

.•.

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

• NO

REL

P~~~g~t~OE

.ft •.

RlSb~k~o

*.

.*
*
*••
• YES

••

:

o*.C'1'I

:

.................
•
:

AOOU~"G5.~ ••••••••
•
:

•
0

A~~L f~~~s

USED FROM
TEMP STACK

"

••

NO

U~ •• F 5. ~ ••••••••

:
:
••••••••• K.
o~~~:mjN:
K:
FOR

11

XOI:CO.OOflO • • OO

••

ADO

A~~EU~bS
TO

•
:

*

TEMP ST ACK
•
•••••••••••••••••

~

··.··H2··········

•• CREATE MASK •
•
FOR
•
•• BOOl FUNCTION.•

:.~~~.~~.U ~l~~.:

•••
L!L8
••
• •••• E!> .......... .
,...
•
GENE RATE
•
•• AND-OR
•• YES
•
PSFIJOO-COOE •
•• OPERATION . . . . . . . . . . X.
FOR
•
••
••
.ANo-OR-E KCl. OR •
••
••
•
OPERAT ION
•

.. ..
.a........
•····*F3··.·.·.···•
•••••••••••••••••
.
. . .................

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

SETUP.
OPERAND
•
•
• DE SC RI PTI ONS •

G3

X

• GENERATE PSEUDO.
• -COOE Tn CONV- •

o. x

E4

•

••

.•
*• ••
•• ASSIGN

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

x

:L11
•
··.·.Hl.·.·"'····.
.ZSTUTl
LV.

Olt • • • • 0111.0

X

•••••1' 3 ••••••••••

• )C . . . . . . . . . . ".

••••• •
••••• •
• H2 •
••••• •

••

•• • * OPERAND -. ••

*.

MOVE TRIPLE
TO
OUTPUT

••••

• YES

1'2.:••••••••

: HT. F~~RS

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

.

*....
*•• _

*III.
.*
•• *

• YI'S

•••••
•
B1 •
•• ••••
•

····.,..3·····•••··*

ASS IGN

X

•
GENERATE
• ASSIGN TRIPLE.
•
TO ISOLATE
•
.STRING OPERAND •

•••••••••••••••••••

•••••••••• "x.

...
ic

••

•:.••

J1

MAX

••

••

~I~A~~
·:.~~ ••••••••••••••
KNOWN , .
*.
••

·••••..

*•• -

• YES

• K2 •• K.

K

•..... :

LIB1 •••• K2.~........

Kl···..

.. ..

•• ' \ENGTH •••• YES

*. .,

>

25~

*..*
• NO

x:

••

••••••••••

:

p~~~b~~l50F.

:
.OO.O ••••••••• O • • • • • • • • OO"
•

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

x.•

•

TO
CALL LIBRARY

•
.....

O.fI.""' •• eol'O • • • • • • • Ol'OOOoa oe

~

•• ~

•

ic

••••• •
••••• •
•

A4 •

Section 3: charts and Routine Directories

207

Phase MB 8verall Logic

Chart M2 .

Diagr~~

•••••
• 148 •
• A1·
••
•
x

••••• Al··········
.INITI ~ZATlON ••
: Lg~¥
~n~n':
•
ST AG~
•
•
•
FOR TA K

••••••••i •••••••

·.......

B1 •• x.
•• ••••
••• x. ••••••••••••.•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
K .

................-....-.

HB02U •• B1.~••••••••
•

LA

•

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

• use FOR
sc 1 TR
Tf PLe.
•
.LOOK
•
OF INTeRe T •

X
HBOOl)4

• •••• C3 ••••••••••

00-·· •• yes
:
I~J~TAh!:
:
•••••••••• X.VARIA l~.l HAKE ••••••••• K.
•••• PSI ••••
:sEfT~s~ §~f~tH :
:

•••• p

••

MBO~ll •• C2..........

Cl···..

.. ..

vA~fY8Le

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

• NO

l6r..~E¥6L ~g:

.................
AND SET fRT

T~R~fi~~N~~R

•

•••••
:
x

....

•• Fit ••
••••••
ic
Fl···..

H8HI13

F2···..

=' •.

H81~1~ •• F3..........

•• ·*SIHPLE •••• YES
•• ·:s~Y~~
YES
:
•• ASSIGNHENT •••••••••• K•• psv SWIT2H •••••••••• x.
••••
••••
• ••• ON • •••
:

.. ..

H81111 •• FIt.~ ••••••••

~Sf~~ ~N~gT
STAR~ OF

:
:R~~5A: ~5llfn
•••••••••
T"'PO~ FROH •
SEi~~~~~s OF:
K : RE~a~~ A~I)ER :

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

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

......

• NO

• NO

001(.

:

1(.

81 •

x

G"

•••

.,

"813"".

••••• G5 ••••••••••

, . ' . END of •••• YES
:
:UnNH~~6 :
••
STAr.K
••••••••• 0 K. PSV SW ITCHES 0 •
•••
• :LEAR STACK •

*0

.•.

H1

• * END

••

OF
PROGRAH

•• ••

••

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

x

*.

.*

• YES

• 81 •

"'8DO l!'l
ic
.RELEASE SCRATCH.
•
STORAGE.
•
•
RELEASE
•
• IEHHB, IEHHC •

ic
.......

• 140 •
.. 81·

208

....
....

•• B1 ••
• •

:14BI318
(I

• NO , .
•

•*

*•• *

...•

•

".

'10

x

ic

NO ••
•••••

.. ..

0

Hit

j. .,

.* PSEuno- *. ••

•• ••

••

VAR I A8L E
••
T"'PO
••

*.

••

··.....,...
.....
•••··J4·•••··••••.
.1(00...
*. • 41·YES

••••

• Jit ••

"IB132r

G

l( •

)(

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

•
•
• Fit
•
•

• GENERATE CODe •
FOR PSEUOQ- •
•
VARI ABL E
•

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

*

Cnart Mu·.., • Phase

~D

~verall

Logic DiagriTI

•••••
·"0·
••
•

• 81·

•.~1
:
•
•

•..

• x•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

•X

x

•:

81 ••• "'······

F~iArRIPT

OF I NTER~h

••

• 41 •••••••••••••••

~
CI···..

VARIN

LFA~11 ••c3 ••••••••••

C2···..

.. .. ••••

•••• • fSA •••• YES
.",'. IS
•••• YES
:
•••• FYI6~lgN •••••••••••• X"' ••• IT AOOR ••• "'••••••• , x:

*.

"t~E~nl~V

:

•

02
••
• ••• "'03••••••••••
•••• IISAN •••• YES
:
RE"OYE
:
•• 0 • • • • • • • • •
FI~AP~~xT

•

.. ..

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

*...*

••

• NO

•

• NO

. •'"•••••'"

"~~lA~'~~N

:".x
•

•• X. 81 '"

ic

•••

LFIGN

.. ..

•••••••••••• X·· •• FmcH~~

01
••
•••• IJSAN •••• YES

••••

fa~~~

*.

•

••

E1

• NO

••••••

LFSPEC...
E2
••

••

.. ..

.".~S~R ?~~EN •• '

*...
•

:···x
•

•• X. 81 '"

i~E~I A\· ••

••' :

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

.. .... .....

X:•

*..*

NO

ic
•••

•••

NO

YES

*••••••••

• •••• E3..........

•••• I SIT·· •• YES
:
"t~E§~:l:V
X.'.~ ~u4rr~A:= •••••••••••• )(: Tgu~RTRVHEA

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

*..*

•

•
•

:
:
: •••

•

x

• NO

•• X. 111 •

X

••••••

• ••
LFCO"...
L FOR
Fl..
F2
••
• •••• F3..........
•
•••• IPAN •••• YES
•••• IS IT •••• VES
:
DJ~lK~JTrON : ':
•• ,•• A~~V:£~T •••••••••••• X••• ~~u4~T\A=E •• ' •••••••• X: ?~TaR~¥~~~T : ••••

*.

.. ..
•

.•

NO

...... .....

*..*
• NO

,

0

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

•

•• X. 81 •

X

••••••

SNAKE
LFMOYE
••
G2
••
• ••• *G3 ••••••• "''''.
• •••• G4 ••••••••••
IS
••
••••
•
• •
MOYE CODE
•
IT AN
•• YES
••
IS IT
•• YES
•
PRODUCE.
•
TO OIlTPUT
'"
•
•••••
• EI~o-OF-FUNCTION ••••••••• )( •• END OF AOOR ••,•••••• H)(. APPROPRIATE ... oo"uX. RESET SCAN
I~. TRIPLE
••
..FUNCTION ••
• IN-L INE CODF. •
•
PARAMI'TF.R
•
••

•*

GI

•••

•••

.. ,.

.. ..

*..*

•••••
• ME •
• 81·
•••

·.."'..

*..*

·x
•

NO

• NO

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

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

••

•

x

••••• •

• 81 •

secticn 3: Charts and Routine Directories

209

Chart ME . Phase ME Overall Logic

.....

Diagr~n

•••••••••••85 •••
85 •.

·"E •
•••

• 81·

•••••84..........

X

SIGN

•

:•

95kK~ijT

•••

.*
*.
:X• ••• !~~~~;~...OR
IA~oU .;.
DOUBLE ••

.....

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

TRIPLE.
•

·.CO""A••

• DOU8LE

.COMMA

.····C5·····•••··.
•••• ........ ••••• X:·
it

SOCOM

•

• PLACE SECONO
IN~hE~t~8K

•
:

•
•
•••••••••••••••••

...x

x

•••
$FUNC
•••
• • 01 S ••••
..°taST:·.
: . .; , , :•• ;:.::.:
••
If A
•• YES
.INoix ~IPE~ •• YES
• ~E~ET ~~LAS
•
•• FU~TION
•••••••••• X•• COMPtET ON •••••••••• X. se' AR UMF,Nl •

.. ..

.'.!"

.NO

:...

:

.NO

E~ ~F

··:¥RiJL~~"·
*•• *

:

*.

:

:

••••••••••••••••• X:

••••••••

:•

.•.

Fl·.
• • A;Gb~En ~.. YES
•• ONE OF THE ......
-.RELEVANT ••
•• FNS ••

*•••

• NO

V~9Al~Lf~!~~·
S~~lt~~US~~T

K

:

•
•
•

·····F2······.···
•
•
•
ODWNOATE
•
• STACK POINTER.

•••••
•
C1 •
•• ••••
•

It.•• ••

*.•
• *
YES

•85 •

• YES

•.A1·

• C1 •

··.·.HZ••X•••·••••
•
•

RESET CF~AG
FROM STApK

: M9~f O~~~U\~

•
•
:

•••••••••••••••••••

·····.Jz.··.·.....·
X

• IF CFLAG • Z
• SET ARGUMENT
•
SWITCH ON

•

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

•

•

•

.x ••.••• o • • • • • • • • • • • • • • • • • • • • • • •

··....••••..
X

• Cl •

•••••••••••••••••••

.
X

FS··•••••• ••
••• ••••"'OVE
••
TDB
STACK
•
•
•
•••••••••••••••••
•

••

it

X

·····E5··•••·••··

·

*. *•• *. *

210

••

.COIISTRUCT TOB • •
:TR~HfEo~l~l~o :
• INTO FIelD 6 •

IIIS8

•• ··IT1~NO •••• NO
•• OF PROGRAM ••••••
•• TRIPLE..
•

•

1m

••••••••••••••••••••••• o.X •

•
•
x •••••••••••••••••••
••••
• •
••••• •

x
•••• .
·
·
•.... •
.....
·"G •

"'S7

•
•
•

.

••••••••••• x.x

X

CONSTRUCT
TOfl FRO'"
T"'PDS

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

:

•
•
•••••••••••••••••

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

x

·····F4
.••••·•••·•
•

MS1 •••••E3 ••••••••••

• NO

Gl

N

••••• •

•

El
••
•• IS
••
••
IT AN
•• YES

...x

SWIT H

:••••••••.•••••••••••?

•• X. Cl .•

.•.x

••

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

.. ..

..~~U~~

K "....

05

NO •••• I~S A ••••
A~H ~H

X

"'SG

··H4 ••••• •••••
••• ••RESET
•
CFLAG •
•
• FRO .. SH.CK
••
••

.................
·
.
X

••••• J4 •••••••• ••

•

IF CFLAG-Z

•
•

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

••

SFT ARGUMFNT

SWITCH OFF

O • • • II . . . . I:I' • • • • • • • • O.1I

••

TO

.

Phase MG 8verall Logic Diagr3n

Chart MG .

.....
·MG •

• AI·

••
•
X

••••• Al.·.·······
• LOAD PHASE "H •
.SASE REG $lER• •
• OBTAIN S RATCH •

•

ANl

•

:••••n2:.~~••••:

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

•• Bl •
•• •
X.
X•••••••• tlo • • • • • • • • • • • • • • • • • • • • • • • • • •

" •••••• " •••••••••

0 ••••• 0' •••• 0 • • • • • " • • • • • • • • • • • • • • • •

)

x

.-.-.-....-.-......-.

(

~

.

:··~~U~·(:·····:

:LoH~EF~~IT~?PLE:
~:.l=~r.~U

:..

••:

x

:

•••
LFARIN
•••
LFARII
•
• ,.CI IS ••••
..C2 IS ••••
:··=:~r·=;:~···:
••
IT A
•• YES
•• CODE TO •• YES
•
IN ~~A~K.
•
•
•• • /¥~~JlFN •••••••••••• ~ •• B~ET~~~~~f~E···· ••••••
"~~IA~Ef~~N :"'le

*.

*...
.. o·

•. .. ••

..••••.

• NO

• NO

x:

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

III

•

•• X. Bl •

X
01

•••

••••••

••

LFIGN

02

•••

.0

.0 ..

.. .. ••••

•••••
x:•

03 ••••••••••

••• ,. IPAN •••• YI:S
•••• ,PIN
YES
: RE"RYE TRIPLE:
:
.'l?I~ORE TR I P~~ •••••••••• X••• ~~~~T\d~E ••••••••••••
F 0" TEXT
:." • 1<
_.

.. ..

*.

• III

• NO

·

El

•

.. X. Bl •

K

•••

... .. .................
c*

• NO

••••

••

LFSPEC.·.
102
••

• •••• E3..........

... ': t~EHA~· •• YES
•••• \fSIN •••• YES
:
••• ~'siRr~~~N ............ K· ••!~U~T\~E .......... eo

...*
•• ••
• NO

• NO

·

•
0

:
:
: .. ole

x:• B~~~?WHL ~ •
•••••••••••••••••

•• X. IH •

X

Fl···..

. .....
..
..

....*
•• ••

1~K~T~~~R~O

••••

LFCO"

f2···..

•

LFO: ••• .,.3..........

••• ,. IJSAN •••• YE·S
. . . . IfSI~ •••• YES
:
*. J\RGyHENT •••••••••• 1( • • AN N-\dN£ •••• n •••• cX.
•• ,.!R PLE....
•• :~NCT ~...
:

... .....

•. .•

•. .•

• NO

:

On~n~TtOH:
OF

~~g\Jl'l~~T K

:
•••••
:

••• l ••••~ ••~ •••••

• NO

•• X. Bl •

X ·•••• •
G1' ••••

LFEOF2

G2' ••••

L FE~:: ••G3..........

•• ·::NI~NbTO~· •• YES
••
O~· •• YEl)
:
•• I'UN TION
•••••••••• K•• AN IN-LINE •••••••••• K.
•• TR PLE ••
•• FUNtT ION..
•

.. ..

•Jr..*
• NO

x
•••••
•••

• "1 •
• AI.

·ir Mo

.. ..

-tot.• NO

:~~aM~~IIV~
IN-LINE
COOE

••

G".......... :
:

:
: IIInYE COOE
::
......... X. OUTPut. RE!2T .... .
•
.SCAN PAIIA"Efb •

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

L F"'~:l

..,................

..

.!••

•• 81 ••
••••••

section 3: Charts and Routine Directories

211

Chart MI .

Phase MI Overall Logic

Diag~~m

••••••
·"1

·•.

* Al*

ic

"J •

••••• Al·.········
• LOAD PHASE
•
AND
•
:3:nI~EfllnrH :
•
STORAGE
•

·.......

•••••••••••••••••

••

81 •• X.
• • x••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
.... ic
x

.......-.-.-.-.-....

:··;~U:·(:·····:

:LoM~EF~lT~yPLE:
: ••2~.I=U~S*! ••:

ic
Cl···..

LFARI~

LFA~!l.~i ••••••••••

CZ···..

•••• liSA •••• YES
•• ··co&~ TO·· •• YES
:
•••• F¥:~H~N •• ··········~··B~E~~~~i~E··········

*.

••

*..*

..••••.

•• • ••NO

•• • ••NO

x:•

ic

•••

:

•

•

•••••••••••••••••

...... .

LFIGN

OZ

•••

••

03.......... .
."''''.'''..' ' ' ........ .
• ••••

•••• lIS AN •••• YES
•••• IJSI~ •••• YES
:
·'I~NORE TRtP~i •••••••••• K••• ~~UN~T\D=E •••••••••••• K:

.. ..

"'. .NO
.'"

..· .....

*..*

*,.*

.NO

RE"i~A
F

JRULE:
:
E
:"0ic

•

•

.

•

•• X. Bl •

....~

ic
•••

~nl~Y

•• X. Bl •

01 ..

LFSPEC. "'.
EZ
"'.
••• : l~EHA .''''' YES
.",'''' IISll··"" YES
"'. ASSIGNMEN~ •••••••••• K"'. AN IH-L NE ••••••••••
•• TRIPLE ••
..FUNCTl N ••
El

"tN

M~UJEf~lN :"'ic

••

.. ..

*...
"'.. '"

..

*..*

"'' '
· .",.",.
'" .
'"

'" NO

• NO

Ei •••"' ••"'.... .•

• ••••
:
1~K T~~~Rlo
K.
PR 0 EA
•
BUY T PLE

:
:
•••••
•
K

•.............."''''.• .

•• X. Bl •

•

ic

• "'.
LFCOM. "'.
LFOR
Fl..
FZ
"'.
• •••• Fl ••••"'."' •• '"
••
IS
••
• '" I S . .
•
IN ER T A
•
••
IT AN
•• YES
••
IT IN
•• 't'ES
• DES ~PTlON •
•
•• ARGUMENT
•••••••••• X•• AN IN-LINE .......... , X.
• ••••
"'. TRIPLE ••
..FUNCTION .'"
•
AltG iNT
•

..."'...

•• "'. •",..

"".. ••••

• NO

:",.Ula",i

~~~"' ••:

'" NO

.. X. Bl •

ic

••• ",,,,.

Gl···..
LFEOF2 GZ···..
LFE~U •• ~~..........
LF"~:~ •• G4 ••••••••••
•• I SIT..
•• IS"'.
• Pit UCE THF. • •
•
•• AN END OF •• YES
•• IT END OF •• YES
• AP OPRI AT E •
• "OV~ fDDE TO •
•• • /v~in~N ••••••••• ~ ••
!~UA~i\~~E ••' •••••••••
I~ohlNE
: ....... " K:sg~~ ~~AA=nn : •••

*,.*

•• • ••NO
ic

•••••
·MK •
• AI·
•••

212

K· ••

*..*

•• • ••NO

·x

•• ••••
•
Bl •
•••••
•

K:

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

•

Chart MK.

Phase MK Overall Logic

·41...41.......
• 81 •• X.

•

• • x••••••••••••••••

Diag~~m

• • • • • • • 0 , • • •' • • • • • • 0 • • • • • • It • • • • • • • • • 0 • • • • • • • • • • 0

0 . 0"

X

e ,.

0 •• 0 0 ••••••• " ••••

-.-.-.- -.

... 41• • • 81.: ........... ...

.......PHASE LA... -... -... •
:t.o~~E F~i IT liPL E:

•
••

l ......

•••••

OF NT ~.~
R T
fi ......

x

Cl

•••

LFARIN

••

C2

•••

LFARIl
• ..... *C~..........

••

•••• IJSA •••• YES
• ,~··coA~ ~.'.' YES
:
....
FUNCTION
•••••••••• X.... liE PR 0 EO .0 •••••••• X.
•• TRIPLE ••
BY THI
HASE
•

..

.. .. ••••

*..... . *

••

·x

RAME ER

•

• NO

•

•

0

· ......

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

.NO

••

III

•• X. III 1)1
•
•••• 0
LFSPEC...
Et
••
E2
••
lT
YES
P l · · •• YES
.... ASS G~ N~ •••••••••• X•• AN IN-L ~NE • I • • • • • • • • •
•• T IPL
••
o.F\JNcnllH ••
•

X
•••

.0'·

:· ..
I
*..*

••': le

*...

·

• • • 1It

....

•• ••

.

••

•••••41

LFCON
••
.1)1

F2···..
IS
••
IT IX •• YES

•••••••••• K•• AN IN-L HE

o.~~t«:Tt ~...

..••••.

lFEOF?

··./¥~lJLgN ••••••••••••

•• • ••1\/0

.. ..
~

• M!. •

• A2*

•••

ERT A

RJPTlOtf

OF

IA!i~':IK

•

•

•

•

•••••
:

• ••••~¥.i••:.•••••

•

•• x. In

fi

•

(I

X

•• ·:NI~Nr o~· •• YES

X.
:

•

• NO

•

Gl···..

;l..........

LFOL •••
•
I
•
DE

.G ••• o • • • •

•• ••

• NO

*..*

• x.
.•

•

fi
fi

•• ". 111

Fl···..
IS..
l,~ AN
•• YES

•'.!•• PL•• ••••

.

•
•
• ••• *E~.........
:
r~K TIN~A~O: •
X.
PA ~5E A
•••• t
•
IIUY nPLE
•
•••••••••••••••••

.NO.NO

X

:

:"'x

-..*
•• ••

•• "'NO
••

ARrtME~T

X

••••

*..*

*.•.•

•

.. ".• B1 III
0

.....
LFIGN.·.
01
••
02
••
• ••• *03 ••••••••••
•••• ,PAN •••• YES
.1)1'. IPIN •••• YES
: RE~~E TRIPLE:
... ·l~NORE TRI"!'~ . . . . . . . . . . X•• I)I!PU~TH~E ..... o•••••••• ":
F H TEXT

••

.

:.....:

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

*..*

... NO

"A~K st~:~
H IFY CAN

••••

lFE~Z ••

G2···..

.0·';'T l~

r:,•••

YES

:

x•• o!~uACT~A~E ••• 41• • • • • • • • , , :

*...
•• ••
.i·••

.NO

il............

:=lIK~alJ.Y~

r,4t..........:
•

LF~~¥S ••

:
:
: ••••••• ,

NOY;

•

~oor 19:

l~iihlN
~lhN;nI
••••••••••••••••••
• •)I:S2~N
••••••••••••••••••
.

:

: ••••

•• III ••
••••••

section 3: charts and Routine Directories

213

Chart ML.

Phase ML Overall Logic

.•......A2·

Diag~3m

• ML •

·

·•
.•
·•••••••••••••••••.
it
·.···A2 ••••••
••••

•
•

INITIALIZE
MOOULE

•
•

•••• ••••••• JC. x•••••••••••••• 0
: FPAfll
it

..:

:····U~·~~~·
~UNCTtON
ARGUIIENT OR

•
•
•
•

••••••••••••••••••••••••••••••••••••

•

•
•
•
•

END OF

PROGRAM
•••••••••••••••••

.•.x

C2
••
• * IS IT *. •• YES
••
*. END OF
••••••••• ,.

.......

....

.*

•• PROGltAM
•• ••
• NO

: FPFNAR
•

.

.*

a.

•
02·.

:.~~.:. ANI~NnV
••

*.

NAME

*.

o·

lit

.1414 •
• .Ai •

•

••

••

.:.
••

• YES

E2 ..

•••••E3..........

ic

•••

FPEPCO

.•.it

••
NO •• 1·B~hl!I~· ••

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

*.

FUN( liON

·0 *•• *.* .*

••

• YES

FPGAR
X
•••••GI··.·······
•
FORM TABLE
•
•
OF FAMILV
•
•
ME MBFR
•
• DESCRIPTIONS •

·:•.•·Gz··········:

FPB IF

X

R~He~T
T:~~T ~2~RV

·.................. ·••••••••••••••••.
:

:

•

FPARD3

ic

•
•
•
•

FORM ENTRV
RELATI NG TO
ARGUMfNT
DESCRIPTION

x

····*Hl··········

:····~~·~t;·····:

•

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

•

:•

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

•

•
•

RHkvANT

:~=~~~

•

•:

······Jl.•····•···. ·····J2··········
X

FPF(,'"

·..................
•
CHECK FOR
•
• ONE ~ND ONlY •
• ONE AGRfEMENT •

:•

X

o~f~\~XE

REFERE'N~E

:••••• •

·.................
•

IN TEXT

)I.

•

it

••••• K 1••••••••••
•
RFPL AC E
•
•
ORIGINAL
•

·..................
:

R~~F~~~~E

214

: ••••••••

¥SNlMIJR5~YE

~4

:

:
: Al\GU~MC:lTH :
AN EN RY
••••••••• IC.ENTRVPARAM .TER •
PARAM TER.
•
REFERENC
•

•

• YES

F2

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

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

....
•• ••

••• \E~~IUC·· •• NO
:
••
SELECTION •••••••••• X.
•• REQUIRED ••
l(.

•
c . O . O • • • • • • • • r ... e • • I1 • • • •

Chart MM.

Phase MM 0verall Logic

Diagr~n

•• ••••
'1'1 •
• AZ·
••
•
BEG

·

l~••• Az.a ••**.**.
:
:
•

LOAD

..."'.............
~~~¥~~L 1re

CFE

:11•• A3.**.**.**.

: •••••••• x:

:

•

~C"U~~ION.:

.................:X••••••••••••••••••••••••••••••••••••••••••••••••••••••:
:CA

~NWg~

T TON.
.END OF PROGRAM •

...
ic

B3

••

....

......

•• ··E~A~F . ' •• YES
•• PROGRAM BEEN ••••••••••
••
FOUND ••
X
•• ••
• NO

.MP ...
• A1"

••
•

·

CFC~k~ ••c 3.!••••••••

• S~AN ARi,rr~~T ••
~dle~NThES :
•••••••••••••••••••

•
:

• • • • • • • • • • • • • • • • • • • • • • • • It

CFB!lZ1

E3

Xx
•••

CFFSI TR

••

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

•• ··,s THI . ' •• YES
•• A BU[LT-fN ••••••••••
•• FUNCTION ••

*..*

••

SAve

•
••
•

..................
ENV'RONMENT

••

•

K

••••••

.. ..

• NO

•

:

•

ic

•••

103
••
.*
*.
yes •• [S THERE ••

A NESTeo
••
•• FUNCTION ••

*•••

••

CFY(iCll

•

yes • •

•

••

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

•

*

·
H···..

.. ..

*..*

.. ..

*..*

• N O .

CFL~~~

ic

.....*0,. ••••••••••

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

•...

.
•

CFC~~:.*H.............

H'···..:

JZ.~........

II.
.o...................•

.:

• GENERAlE R~~OOE
•
••
*TO P A
SUl T.
• • • • • • • • • ,. . . . . . . . 1(:
L1sT : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A*RBai t

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

•

YES

is STRi~
RE U ~'..
FUNC •• ,~I cI~ ~' •• CAll
:
G NORAl:
A
•••• NO :
•• ,.•••••••••• AALL I~ A ••••••• , .•• K.
T~2N~Fe~
......... K
•.••••
IN'IO~A~ION
••••••
••
..FUNCTl8N ••
CONfROl.
•• Ne~T~O ••

A

.
.
:
..
••

•

•
.SET PARAMETIRS •
•
... TO
•
•••••••
THEPR~Or
K R
...
IT 'I
•

K

HZ···..

.K..........

•

••••••••

• NO

RE~Ul

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

:K·· rc •• ••••••• S~~~~1~E ••••

: ••••• 2~~~.....:

*.

T
DOPE VECTOR

e, ••••••••••

F ...••• ••
•• TS
••
NO.. CALLING ••

• SCAN ARGUMENTS •
• AND GENERATE.
: f~85..l2lr~~T

•
•• ••••••• •••••••• •••

•
•

• ••••

rc

CFC~U . . F3.~........

CFCt'3C

•

CFL~~.' ••Hl..........
: G'E~5RAn $OE :

••

• F3 •• K.

CFN~n ... FZ.i** •••• **
•

•••

*..*

• NO

·

"...

• • :~sA~~n·· •• YES
:Ai~~~RMht~N :
1( ••
BUILT-[N
•••••••••• 1(.
SCQALuL!NCG
..FUNCtlON ••
•
e E.. e

....

*..*
• YES

CFB~ •••J,.L •••••••

•:

E,.:U~~~NT

•

:

••
•
••••••••••••••••••
ic

•••••
•
F3 •
•••••
•

•

Section 3: Charts and Routine Directories

215

Phase MP

Chart ME' .

.....

~verall

Logic

Diagca~

• MP •

• AI·

••
•

.x ••••.•••••••••.••••••••••••••••••••••••••••••••••••••••••••••••••
it
lC

MP8

0 ••••••••••••••••• " •••••

•

••••• AI ••••••••••

•
• SCAN

•
TElCT AND
.MOYE TO OUTPUT •
•
•
•••••••••••••••••

·

.
.:<

: SWITCH ON
• APPROPRI ATE TRI PLE

...............................................................................
MP"

•

it

MP3

•••••81..........

•

X

•
••
!But~M~RlS~&s~OR:
!

•

•

STRING..

••••• C1.·.· •• •• ••
• ST ACK 8UYS DR. •
•
STACK INPUT •
:.lC: SK~gl~be~hT :
•
BUY
•

..... .................
··•••·01.··•••••••. ....

• •
••••••

:
•

.:.
••

•••

ON

X

MPItA

••

..... ..
•

x
•••••
·MS •
• A2.
•••

it

83

• ••• *84 •• • •• •• •••

••
*.
.
8U~~L~LAG .:.~?:

·.................. ...................
END OF TEleT

rc

MPe82

• •••• 82..........

:.~eT
R~~~e T~& PkQ;s. :
•
8UYX FLAG ••••••

••

•
•

IF CURRENfLY

•

lC

JFF
•
•••••••••••••••••
••••

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

'l'ES

• C4 ••••

X

••••••

.• .. un -. •.
C3

.'..

•••

••

-.... ..
•

:

MPB8T
lC
• •••• C4 ••••••••••

YES
•
GENERAT~
• ••••••••••• lC: TR~~tL SL~s9M

NO

•
•
!···x

• C1 •

·····0"······....•
.·.................•

it

AoOSEL

• ADO OICT REF.
•
•
• TO SELL LIST .lC ••••• 01 •

•••••••••••••••••••
•

•

X·

••••

• ADO
•

•

•

OICT REF

• •••••••••• o ••• oeX. TO SELL LIST

•

•

•

•• ~ ••

• •••••••••• x.
X

: MPZ3

••••• F I ••••••••••

•
•
•
•
•

SCAN
•
TElCT
•
WITHOUT
•
MOYING
•
IT
•
• SWITCH ON
• APPRoPR lATE TR IPLE

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

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

·

:MP31
it
•••• ·F1··.······.
• 8UYS FN ARG.
•
• MOYE 8UYS-8UY •
• TEXT TO OUTPUT ••
• . REMOYE FROM •
•
STACK
•

'

·:

"II'Z8

·
•

•
:•••••
it
•••••••••••••••••
•..• ••••
C1 •
•

.- -.
.. -.. -..
Gl

ic

••

••

TRIPLE

•

·

••

••

.. HZ •

YES

• 1( • • • • • • • • • • • • • •

..
.
·.................. ..................
X

••••• Hl..........
•
•
•

·····G3···· .. •••••
• MOYE BUYS-8UY •
•
•
.TFXT TO OUTPUT ••••• lC. 01 •

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

• NO •• OUTE RMOST ••
BUVS

flUY

"?~F.oJhw=

.....
•
•
••••
·...................
..
. ......

it

•••. *.

..
.

••• •• F" ......... .

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

.X

X

MP8T

• •••• HZ ••••••••••

1'1 . . . . . . . . . . . . . . . . 11 • • • • 18 • • • • • • • • • tI • • • " • • • • • • • • • • • • •

lC

RESET INPUT •
• SCAN TElCT AND.
POINTER TO
••••••••• K.MOYE TO OUTPUT.
OUTER B U Y S . .
•

:1~~lb~R~~TE: TRI PLF.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • tt • • • • • • •

••••

.*

it
J2' it" ••

·0

•
•
YES..
BUYS.
••
• C4 .X •••••• IS FN ARG.
••
••
•• OUTERMOST ••
••••
•• ONE ••

*•. *
•

NO

·..

..
.................
ic

••••• J 3 ••••••••• "

Y

: RE MOeW TR I PLE :
•
FROM TElCT
•

·

.

•••••K 3 ••••••••••

•
•
REMOYE FlUYS •
•••• ceo •••••••••• eX.
FUNCTIO~
•
• ARGUMFNT FRO" •
•
HXT
•

•••••••••••••••••

··....
......
x

•

216

liZ •

o •••••••••• o

MP86

it

·····J4.·········
•
flUYS.
••
:REMnhR~~~MBUY: ••• :
•
OUTPUT
•

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

Phase MS

Chart MS.

Lcgic Diagcam

Over~ll

•••••
:Mlz:
••
•
BEGIN
K
·····AZ···.····.·
•
LOAD
•
:
MO~~hE,
:
•
INITlAltZE
•

··.........

•••••••••••••••••••

• BZ •• K.

••••

K

•• • •• BZ··· . . •••••
:
s~~~~Rl~~ED :
:EN~LS=E~R08~AM :

•••••••••••••••••••

...it

CZ

••
END *. •• 'YES
••• ~F C~~~RAM •••• o • • • • • • X
•• FOUND.·
•••••
•• ••
·NA •
•
• NO
•• It*HAS

."i •

•

SBS~UUOZ.!. . . . . . . .

•
•

•

iaK~Y

............"'.....•

:
•

:
•

NAME

. . . . . . . . . . . '• • • • • • • • • • • • • • • . , ) ( . ) ( • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • I1 • • • • • • • • 6 • • • •

SBT~l~ ••EZ.a........

•
• .....

:SCA~ FO~R~~~MA.:

~fMEA

• E2 ••••• K.
••••••

.........

£3.....

SIISTIH
••

IS

.. ..

e ••• ~ •••••••••••••

S8S~~•• *fIt ••••••••••
••

•

••• ~INARY ...~

:

~.......

:

• YES

·.x •••••••••••••

.•.·x

81NARY

.

j) • • • • • • • • • • •

J(

•• F Z . . *.
••
A l~oA~A .:.:~~ •• :
-. *.
.*.*
*•••
·NO

.:.

•
:
:

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

• •• K.;· AR~rx~~T .:.~~ •••••• J(: C93v~nEAT

•

: OR 'KnCE IPT:

•••

SBOPT
F3
••
• •••• FIt"'."'''' ••• '''''''''
•••• OFI~ET "'. "'. YES
:
~a~Eo~~Ui :
•• KNOWN AT
•••••••••• K. IN CONSTANTS •
•• COMP ILE ••
•
POOL
'"
•• TIME .'"
•
•

.. ..

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

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

• NO

'"

.. K. l!2 •
• De • • • 81' • • •

:

X.

SBN~n"GJ .i...........

•

•"'..

leNVUX~ENT

S8TRID

•

K

ic

.*

G2

• "'.

••

G3

*.

:X• ••••• :~!"':··.SUBSCRIPT
ISAIT
.:.
••

til...
....
.•.x
••• O;~A=:=:;.... ••.K..........
Il P;· ••
.. ........"''''''• .";UB"'..
'"
*•• *

:
•

,~"'

....."'......•

,~

•

•••• '"
•

E'NVIRONNENT

YES

0°
.'"

.K •••••••• "'.

•"'."'~I."' •• "'."''''''''''...'"•

JZ

.•.ic

•"'

MAKE ENTRY
~g~SHNJN
POOL

K

• •• "'.H3•••••••• "'.

Hit

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

•."'."'

*. "'.

*

"'

•

'"

: J( . . . . . . . . . . . . . . . . :

CI..*
"'. ••

'"

K

"' '"'"
BZ '"

x

'"

.'" o·

• YES

K

.."'.

.."'.

TO ADD
'"
i¥~~E~ I ~r.o T8R :
THREE TIMES '"

...

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

• NO

"'' ' ' ' '

"'.

"''" ••GENERATF.
"'.J4"''''.'''•••••
''
CODE '"

*. "'.

... .

•••

• GENERATE CODE.
••••
'" TO MULTIPLY.
NO..
IS
••
• SUBSCRIPT 8Y .1( • • • • • • • • • • MULTIPLIER .'"
•
MULTIPlfER
'"
"'. It OR II ••

585029
••

•
:
•

....."'' ' ' .......'''.•

K

SBS05

Ii
SUII,S RIPT ••
•• NE'S ED • '"

''""

."' ••• G4"' •••••••••

'"
•

• NO

'" YES

•• •"'."'~''''J 1."'•• "'.....•
•
'"
RfSTORE·

.. ..

*..*

••
RI
COUNT
••
•• CORRECT ••

NO

SBS028

••

··.:~~~~H~t.··········K:

H2

C:OMPILATI!;,.

•••

••••
IS
•• YES

·NO

: S8ERR
•
•

••

• •••••

."'.
••••
NO.'"
IS
•• YES
A~¥re~

K3

'"

: E2 :K••••••••

"'.

....
.. ..

~BS8RN

"''''···K4'''
"''''.'''.''''''''''''
• GENERATE
COOE •

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

••.•• ., ..... X:•

·

TO CHECK
~~~ER1~T

"'

"'

section 3:

•

•

: ••••
'"

Ch~rts

and Routine Directories

217

Phase NA

Chart NA.

Lcgic

Qver~ll

.....

Diagra~

..•

~A.

• AZ·
•••••••••••• 0 •••••••••••••••• 000.

•

*...

A4
~.

t:." e

_ • • e _ • • • • ., •• " • • •

~A"rr3:

0*. .,

.. ..

••••• A!' ••••••••••

*.

•
•
••
"'ASK
•• YES
• A4 ••••• K•• AS OPERA'ID •••••••••
••
••
••

••••

·

• 83 •• X.

.

•

•
•
•••••••••••••••••
X

'10

•

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

•

x

•••
'1A8r In
84
••
• •••• 115 ••••••••••
••
IS
••
.7STUTl
lV.
•• OPERAND A •• NO
.-.-.-.-.-.-.-.-.
• •• ~tT STRING ••••••• ·····)(:C~~~~~ ~~~RI~D:
••
••
• TO lilT STR ING •

.
x: x•••••••••••••••• :

MOV~.
: ••••••••••••••••

•

··....••••.....
.
.:x...

•

'1ASC 1
X
• •••• 83 ••••••••••

NASC2
••••• 81..........

: LA~IT T~E~~e.

*..*

•

• OUTPUT P /C Tn •
8RA'ICH ON
•
• MASK TO lAIIE L •

,I(.

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

.. ..

•
DELETE
•
lA ~lT T=l ~~E.
•
•
•••••••••••••••••
X

• YES

·

.)C • • • • • • • • • • • •

,

0 ••••••••••••

NA801Z
X
·····C4··········
•
: °n~~IR~/i,lO :
. . . . . . . STRI'IG TO 7.ERn •
•
AN~ 8RA'ICH
•

:...l:.~~~~~ ••••:

••
••
••

*.

...ic

02

••

*• ••.

EOP2

*.

*•• *

.*

.*

··................... •••• .. ..
• •
E2

•
•••••

x

X

:

.•.

••

•:.*. EXI T

*.

••

NO
RETURN...
1'3
••

.*. ••

X..

•
•

·..................•
••••• •
·.....
OUTPUT CAll
TO IHEOSSA

•

•
ADDRESS OF
•• eo
.LAIIEL, AND CALL.

: .... l~~~~:~
••••:
X

NO

X

*•• *••

.•

• YES
•••
G3
.,
••••
GOOI!
•• '10

,.X.:·•.

*...
*•• *

• NO

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

•

.••.. F4..••......

:l~~PKlGP{CwIVH:

.:~008G&~O&OLN· ••• Y.;~,. ••

.

• '10

.. ..

.....F3..........

•••
G2
••
••••

•. *.

•
•
•

2...

.. ..

GOOS

*.

*..*•• *

STOP
X
·····Gl ••••••••••

IIIA3NI

•

·:.X••••• ~ !.:.*. oKXHop .*.:.
••
•

ilTPUT
GNME .. T
IPlE

"..
••
• •••• E5 ••••••••••
•••• VAI.UF •••• YES
•• ·*vARIOUS·· •• Y!,S
:~~¥~TE~C~wnl~Y:
RETURNED
•••••••••• )(.,
TYPES
•••••••••• l(.YAI.~E AND OUT PT.
••
••
.,RETURNED ••
~OO
TO 8RANCH •
••••
••••
.ON WTCH VALUES.

X

••

*••. .• **
• NO

•
•
•
•

..

• NO

F2

AS

••••••••••••••••••• •••••••••••••••••••
K
X
X
•••••
·NG •
• AI·

••••
• ••• YES
••
RETURN
••••••••••
••
••
••
••

83 •
•• ••••
•

YES

Fl..

•••

: '1A3r" 5

OUTPUT CAll·
X·
TO IHESAF8
• •

•
•
•

X · .

'=l(tT
••••• E1 ••••••••••
OUTPUT CAll
TO IHEOSEA

·····04·..••·••••.
..
.X..........

• •••• 03.;. ••••••••

.* •.••

• NO

•
•

·

YES

:
•••••

DE

T

:

••••••
A2 •
•

F8L~5WeNG
••••• X.
hl~lES.
•

X.

• GOT

: ...............
:
K

••••

GOT!).
••••• G4 ••••••••••
•
OUTPUT
•
.PSEUnO~DO~ TO •
8Rt~~L 0
:

..' ·.0 ...... 1(:•

••••••••••••••••••

•

K

•

83 •

ic

H2

•••

••

••••
••
ON
••••

Hl

:~;:dl.:;~~~!.:

.•

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

ic

·.....

J2

• NO

•••

••

o·

... IF

X

At. •

..

83 •

••••

S TG'IAL

• ••• F DR ...... SGNL
••
SIGNAL
............
••••
••••

··....
......
218

••

• •••• H5 ••••••••••

1(.

• •••• K3 ............. .

:
1(.

°nr~~TPl&oln
BYTE IN

P~Y

A~~E~:k\i

:
•
:

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

:

......
..
x

•

I'll •

• •• *

...

ps~~~b~P'8~E

····.J4··········

'1A1140

X

:pO~T :~~Rr~~ ~~

:
••••••
IN
••••• 11. 113 •
ONt" OR MnRE.
•
•

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

...

~ROC"nURE

o'l-UPlns

:•

.................
TO fET SNAP

8~N_8~lfN

··-........................ ..

......
• •
...

•

•••

• '10

•
'lORE
•
•
ON-UNITS
•
•••••••••••••••••

•
lC

•

X

*.

H4

.. ..

YES

•:·~·;~3;·;~c·;~·:
se¥ SYSTEM 81T •
. ' , . ON 1'1 ONE OR •

••••

....

K2

0:' •.

ic

x

••••
•• 83 ••

•

•••

CO Of TO ~ET.
YES ••
••
:1~E~~PoRIMO~~ :)( •••••••••••• REVERT . . . .
ON-UNITS.
••••
•
•

IIIAllrn

••

.. ..

.. ..

• NO

REVERT

•••

• ••• YFS
•• ·SYSTEM
NO
....
• ••• YES
:
•••••••••• )(.. SYSTEM/SNAP •••••••••• lC."
SNAP
••••••••••
••••
••••
••••
••••
••••
:

•

• •••

:

Chart NG .

Phase NG

•••••
•••

Jver~ll

Lcgic Diagrarr
• A2 •

.....
*-.-.-.-.-.-.-.-.

A? .. •.
..x....

•X
~l..........
LA·

•

: ••~~.l~U~UI ••:

••

• •••••
:

~

D.
*.

.,.

••

B1

.~

••

WAIT

•••• ••••

••

....

.*

*. NO
••
•••••••••• )( ••
••
.,.

• YES

BZ

.~

••

*.

DELAV

*..*
*. ••

~ o. ,a.

.*

.

• ~ONvlRT ••
•
:
OP1=~~l;ElO
:
•••••••••••••••••••

• *•

•

...... .

.*

*.

• YES

B3

• NO
••

•••••

.0 *.

o·

II.

.: •

YE S

•••••••·. .
······B,.··
•
•
X

.~

*.

DISPLAY

**.
••. **

."0*

:

••

CAL~ohn~~p.Y

: ••• :

•••••••••••••••••••

• YES

x
·····~ii·········
OP ANYgRT.
T
•
CHARA TE~
•
STRING
•
•••••••••••••••••••

O$PY,CHAR
••
•
•

0 ••••

..
~

·

•• X•••• n.
•

•X

~o

.

1\4

*.
~.
~~£5CATE·:.!~~ •••• ,x.;· YARH~eE
.,.
.~
*.
•*
*....
* •. *
*.

It, :

.0••••••••• ftX*.••

OlAY
X
···.·CZ·.··.····.

·• x.

*00

: ·,J°z·:
:

.-. ••

.:·OR

.

•

/13

...

YES
.......
•

AZ :

*.

*..*
*. ••

EOP

x

:X~j ••• ~

: NO

• NO
•••
••••

••• X. USE SCl T O .
• UIOK FOR TR IPLE*

• Al •

x

.. )C . . . . . . . . . . . . . . . . . . . . . . . . . .

NGO

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

·•....
.....•

• NG •
• AI·

·.··.OZ··········

II • • • • • • • • • • • • • • • • • • • • •

• GENERATEMALL
'fO I HEOS A
••
.lIBRARY" UlE.

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

OSPY1!!

K

03

•••

••

OSPY3
• •••• 04 . . . . . . . . . .

.. ..

•••• REPLy·· •• YES
:
••
OPTION
. . . . . . . . . . X*
•• PRESENT ••
,~

*..*
• NO

III

,~

·• x••••••••••••••••
OSPY4
it
·····E3······.···

8~~~~ ~HAl
CHAR~ T~R

•

................
YAR IA LE

:
•
•

.

0 ••••••••

•• BUILD UP ••
• PARA"ETER LIST.
••
••

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

·

.•.•••F3········.•.
X

G~~EV~6S':LL :
*lI BRARY MODULE.
•••••••••••••••••••

: ••• ., • • • • • • • • • • • • • • • • • • • • • • • • • • • • o • • • • • • • • e . . . . . . . . . . o ••• :

section 3: Ch3rts and Routine Directories

219

Cnar t

.....

Jver~ll

?hase NJ

NJ.

. .

Lcgic Diagram

****

.

·NJ •

... Al"

:

A2 :

•• **

STRTMJ
X
NUSTAT
X
PRGENO
...... Al ••••• "'."'..
"' •••• A2..........
• •••• A3 ••••••••••
•
• •
SCAN F O R . .
•
•
INITIALISE.
•
RECORD 1 1 0 .
•
END OF
•
:SC:2D~~tH:~PSM : ••••••••
~ESBC~F.S5~ :·····.,·l(:RElE:~~G~a~TROL:·······x
•
• • PROGRAM END • •
•
• ••••
•••••••••••••••••
•••••••••••••••••
•••••••••••••••••
."l"1 •
• AI·

x:

••
•

•......B4........

:SC"l~~h~~~~~~

....... BI............
....... .
•
••
•
SCAN FOR
•
•
PUT DPRNO.
X
.DPTION TRIPLES.
• ON SfLl CHAIN ••••••••• X. GO TO PROPER ••••.,
•
•
X .ROUT TO PROCESS.
•
• •
OPRND
•

.......!I'x...........

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

SE~wSa~l

!•

SVS~~~ •• CZ............
..

·.x •••••••• :
• •

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

g~~N~OVW

··••••..
•

•

~H ~~~~HT

: ••••••••
... CONTROL BLOCK •

....

•

IGNOPT
• ••••

*

x.~·

c~~hStQ~HtK :x··~

• •

FR~~T~RP~lE

:

:

CaHRStQ~tatK

• •

•

• YF.S
C4· ••• ,
••••

••

•

INTFR"

IG"lORE TRIPLE::

2~2R~Leis~F

•

~

~ •• : ...... :

SELL TRIPLE

•

••••• n l . . . . . . . . . .

o

SET2~X •• C3..........

•••

.................
02..........
•••••cn..........
t
:
:
....X:
.................:x .....•.. .................
.................:.o ......

:
; •• :
••••

)(

PUT AODRFSS
OF PNT~
opRNn l"l
2ND SlnT
PIIRM LIq

•
•
•••••
•
x
•

...................
••••• Co; ....... .
•
SET
..

·;.~? ...... x:

~l~O~C~A~TAF~~

.....II.o.

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

04 ..

.....[)5.•••••...•
n

REA:> SF.T

*1)

•••

: . •••

*

*

;x

¥

•• ··INTO A·· •• YI'S
:CO~P fl~6~UF~~f):
X•••• H~t~~G , . . . . . . . oc.,x:h~To~~2~
~~X:oo·x
••• •
.5 l I1T I'll. RM LI ST.

.. ,.

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

0..,

·····ES··••••••••

•

NO

:

B2 •

••••• EI...........
EVT~:! •• E2..........
KYT~~! ••F3..........
E4··· ••
•
PUT ADDRESS • •
• •
..
•
OF E V E N T . .
• • • KEYTO TRIPLE
•
••
KEYTO A •• NO
: •• : ~r~~Do~Np~~~
EVENT TRIPLE
C~MR~tQ~(bh : • ., ••••• X•••• n~u~G . . . . . . . . ' :
••
liST
• •
• •
•
••••

:x ....•••. :

·•.....•

x •••• ••••• ••••••••

••••

•

••••• B5 ...........

•
•
X.
•
•

B2 :

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

•

SET.
SfTSW Tf").
INDICIITE
.........
REAl) S E T .
•

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

••••

:

••••• Cl.~......
•
•

•
•
•
•
•

:x.. :....)l!

•••••••••••••••••

•••••••••••••••••

., • ••YES

X

•
•
•
•
•

PUT ADDRFSS
OF RDV OF
'lPRND IN
2ND SLOT OF
pARM LI ST

•
•
•
•••••
•
X
•

•••••••••••••••••

B2 •

KFYOPT
U1COPT
••••• F l . . . . . . . . . .
• •••• FZ..........
• •••• F3 ••••••••••
•
PUT ADDRESS •
•
KEY O R . .
•
•
OF SDV D F .
.KEYFROM TRI P L E . . .
•
4~~R~rotNOF" :X •••••••• : cb~h~[Q~t6h
lOC~TE TRIplF :
•
•
PARM LI S T . .
• •
•
X · ••• • •• •• •••• ••••
•••••••••••••••••
."' •••••••••••••••

:'·t

,:t•• ; .. ..

•.. •
·.....

x:

"'' '

• B2 •

FILOPT
••••• Gl ••• "'......
• ••• "'G2 ••••••••••
•
PUT ADDRESS
•
'"
•
•
OF OPRND IN • •
•
••• :
I~IR~l2IsVF
FILE TRIPLF

:x....... ,!

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

.,x •••••••• • •••••••• ••

x

: ....~~~~;~ .....:

:·";~l·t:H:·.
•

,c.,:

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

•
'"
•
•

:•• :~y5:;6:~;;··:
OF ROV OF
•

TO INOICATE •
.CO"pllER LA!lFL ...
•
LOCATE 4Nn
•••••• ".X.PUT IN ~RI) SlJT ••••••••• X.
SAVF pNTR •
• OF P4RM LIST.
•
opRND'"
..
• •

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

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

...••H3..........

.•.••H4.•..••... '"

•••••••••••••••••

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

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

• B2 •

ENOIO
••••• HI..........
• •••• HZ ••••••••••
•
PUT ADDRESS • •
•
•
OF REQUEST.
'"
ENOIO
••
: C?~T~~~ ~t8fK
SaT~~~NT
, .. . .

:x........ :

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

•

IN PARM LIST

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

"'.

•

i:

••••• J l . . . . . . . . . .
•
GENFRATE.
•
LIBRARY.
•
CALLING
•••••••••
•
SEQUFNCE.

•
•
•••••••••••••••••

J2

••
)(.0

•• ,

••

.o. r.

SETS..,

*. *.

·

..

x

J3

.*.

ON
••

<. • • • • ..

."'''c ••

*.

•
r.E!IIE R A T E . .
'" SFll TRIPLES •
•
CANCEL
•
FOP OpRNOS
•• o"O.''',X. OPTION TR,pl~
•
ON CHAIN
•
X.
SCMI

RFAO
o*" ••• atl."''C*(,

0*

.lOCATE

•. *. *. o. "'.o.
SELL SW

.

I1FF

,

1l*.Otlt'lt'

to

X

it
."'•••KI..........

......K2..........

•••••K3 ••••••••

•••••••••••••••••

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

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

• GENEP.AH COOl' •
• GENERATF conE
• TO ASSIGN pNTR •
• TO INITlALlZF
• VALUE RETURNFD . . . . . . . . . X.Vb.RIABlE NAMED
• IN ROV TO SAVED.
.BY LOCATE OPNI'l
•
pNTP O P R N O . .

220

.~
•
•
r.E!IIERATE
..
.COMPILER lABEL
•••••••• ·X. MFNTIONED IN
•
•
1RO SUlT OF
• •
P~RM LIST

...
•
•
•
•

•
• •••
•
•
•
•• " .X. "2 •
•••

. ....

OpRND HI
2ND SLOT OF
PARM LI ST

•••••
•
•

Char: t

.....'"
*

N~\

Pnase NM Jver311 Lcgic Diagraw

•

*'1"1 *
AI'"

'" '" '"
)c

N'1RI

"'''''''''''''Al.·'''······'''•
SCAN TO
•
:"ItoX: ~~)(IN~~~t~~ :Ke ....................•...•••.•.•....•.••...•...•...............................•.•... "........ :
..*

·

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

••

.

.

•

c-

)c

••

*.

••

•.•

81

•••

••

EOP2

*. ••

*..*
*. • ••YES

x
•••••
·NT •
• AI·
•••

.*

NO

•-

•••, ••••••• X..

••

*.

82

• *.

••

OPEN

*. ••

*..*
*••
*
• YES

.*

NO

••

•••••••••• X..

.*

*.

83

• *.

-.

*.

CLose

*...
*•• *

•• NO

••

••

••• 0 •••• 0.)(...

*('1

• *1'

• NO

••

GET

*.

• yeS

*0 ••

o.

*. • fI-VF.S

••

"10
••
•• n.o •••• oX..

•

CH~f~
o~AkJ¥to~s

..•
•

:

•••••••••••••••••••

O'pE~~l.*C

••
:

3.a•••••••••

CHE~K

0~Ab~9t6~s

•

:

•••••••••••••••••••

:

lhn:IS~~M

••••• E2 ••• •• •••••

• GENERATE CUt •
•
TO 1I8RARY
•

~~~~~CA

• •••••••••••••••••••• 0 •••••••••••••••• •

:

o.

*tI ••

o.••

.-

*• • ...YFS

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

X

~~~IB~TY :

•*•••••••••••••••••
~I

:• ~~~~H8 ='•
•••••••••••••••••

*.

••

YES
:INIlr~nntION :
•••••••••• x.
CAll TO
•

. ····04·.·.·.·...•

·•••••••••••••••••
- .
.
t

PUT

0

• NO

•:'cHe5~

CA1I8
ic
• •••• E~ ••••••••••
: Gf~F L 'J~A~¢ll :

• *.

GFTlZ ••• C5 ••••••••••

••••

.. ..

:

ic

0

..NhTThIP~e ••

•••••••••••••••••••

CALl8

C4

•••• x•• ••OAl'AI
l STEDIT,
*.
••

••...02.·········:
~~~~~E¥~R

85

fcx ••••• o •• o • • • • • • • • • • • • • • • •
GETI'r

.ic

:

••

*.

•

X
•····~2··.···.··

OPENt'''

:

·

o.

84

•

:STORAO

x

••••• ~4 ••••••••••

•

:

•••• :
•"'

opnb~T fN
PA~t;pf'R

:

:

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

lPIRARV

••

••••• no;· X
•••••••••

MVTRSP
•

MOVE DATA

•

*SPECTFICATfONS •
•
TO OUTPUT
...
•
UNCHr\NGEO
•

•••••••••••••••••••

GETI!5

.ic

:····~~:=n~····:
•
T~~Mf NAT ION •

:

Et~hA:Q

:

•••••••••••••••••••

.

x••••••••••••••••••••••••• x••••••••••••••••••• 0', o • • • • • • • • • • • • e , • • • • • • • • • • • • • •

S2ction 3: Charts and Routine Directories

221

Phase NT

Chart NT .

.....

Jver~ll

Lcgic Diagram

·NT •
• AI·

••
•
;;

•
•
•
•
•

INITULI ZE
PHASE AM)
GET 4K AREA
OF SCRATCH
STORAGE

•

x

At,

•
•
•
•
•

••

*.,

••••

·•••••.•

•••••••••••••••••

•

:

•

YES
••••••••••••••••• e • •

NTrrll
:
•
•

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

ic

TRIPLES OF
INTfREST TO
THIS PHASE

it

..•..04·······..·
X

•••
NTOl:l21
01
••
• ••••0' ••••••••••
•••• COMMA •••• YES
:OEDOSFE~~~~~IlL.E:.
•• IN EDIT lIST •••••••••• X.ANO MAKE ENTRV •••••
••
••
•
TY S DATA
1ST
••
•X

.. ..

.•.......R

.•

~.......

• NO

.

t~~~21~.~2~=~U.:

.. )C .............. ..

·X
•*

•
SAVE TYPE
•
• cnllF.S OF ANY •
.DA TA I TEM WHICH.
•
MAY INVOKE
•

El· ••••

•• FORMAT
••••
ITEM

o·x···········o.~

NTJ~i: ••E2 ••••••••••

*. ••

*..*

........

III

X:

YES
•
••••••••••••

MAKE

•

~NTRV

I~E~ ~~tl

•

•

•

:••.•

••••••••••••••••••

•• • ••NO

.•.x

••

*.••••

Fl·.
END ••
OF
•• YES
FORMAT
LI ST

*. *•• *.*

••

•

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

• NO

x

•••

HI..

NTI'017

• ....

*H2..........

••••

.. ..

• •••

• NO

ic

•• ••••
•
Cl •
•••••
•

222

....... .i.......
:R2~T~~ ~

.....

,-13 ••••••••••
:
: RP~AC ~Ol~T S :
••••••
••••••••• X.EN~R fES IN ~H~ ••••• X. B2 •
~=~~EO:
:
LlBT:iUTlNE:
• •••••

•••• END OF •••• YES
: MA~~EW;~lP
••
PROGRAM
•••••••••• X.
ll!RAa~

.........

~i ••••••

:
•
•

.•...............•.
••••••
·.....
liSE U PRnr.
I'JR BEGIN

• Cl •

•
•
•

•
•
•••••••••••••••••

•.

X

1~~~El~~~M~~R

;;

• .x ........................................... ..

:·..~H~·~~:··..:
•
•
•

·..··85····.····.

it

•

• ••••

• .Al.

• Cl •• X.

*. *•• *.-

.-

••••• 1\" ••••••••••

.···.·..·····.····NU..

YES

*. ••

.ASSOCTATE ITF.MS •
•
IN THE
•
• DATA AND FORM"'.
• TYPE LISTS
•

NT:" 23

:·······ic

· ..... ..
••••

F~T'

• NO

~.

....

••

0*

*(,

B2 •

..
NTll00
X
Bl
••
• •••• B2 ••••••• • ••
•• ·~CA~AiEE~· •• NO
:
FSRvr;s~En :
··l~OI~~U~ B~ ••••••••••• )(: PH~~h~¥C~NTO
•• NM ••
•
STORAGE
•

NTI.'flOl

.•.

• • • • • • e • • • e • • • • • • e • • • o • • • oc

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

NT{'nnn

Phase NU Jver311 Lcgic Diagram

2hart NU .

.....
.•.

·•.....•

'NU'
• AI'

•

..,·.·Al··.·······

'.•...1.4..........
*••
**.......

K

IN~~lH! ZE
LOAD MODULE
IEMNV

.. ...............
:
•
•

•,

•
••

*:1('..

:
•
.'

•

III

*1fr..

.0

** •••

x
.
" x." •• " •••• ,,")(
' . x.
• .x ••••••••••••••••••• o • • • • • • • • • • • • •
"

:

"luv' 27

.
...... 04..........
'.Gt;NF.~IITf LAOF.L •
.. USED IN LOAO'

••••••••••••••••••••••••• 0 •••

X

x

ADOP.FSS

.,"(:$

'''''''.'02''''''''''''''''

'. .'

."'''''''

• NO

'.

•

... ..''''''.''''''''''''

.. "'."''''
0:

III.

'''.'''.'''

YF S • '"

'.

•

III.

LIST

••

.*

...
1 "'.

"'. YES

.*

•••••••••••

•

• • • • • • • • • • • 00 • • • • 0 . .

0 •••••••••••••••••••••••

05
••
FORMAT
ITEM

"' ..
'"
'" NO

.

3"''''''''''''''''''''''''

'''''.'''FZ''''''''''''''''''''''''''

••• "''''F
:FgSN~~~~fNX~~~N:
:
RESET COMMA :
)(. IOATA OUTPut)' "' •••••••• X'" fNTRY IN SCAN'
'" BRANCH ROUND '"
•
TRT TAOLE
'"
'" FORMAT IEOITI '"
'"
'"

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

.. .. ...

"'''''''''''''''' ' ' ' '

"'' '

x

"'''''''''' *G7 "' •• "'''' "'''''''''''''

• '"
"'.
•
GENERATE
'"
"'''''''.
• '"
COMMA
"'. YES
'" LIBRARY CALL '"
'"
'"
"'. IN LIST OR ."' •••••••• X'"
FOR
"' •••• X'" B1 '"
"' ••• DATA ••• '
: ~~A~k~PH~~:
x '" "'."'''' '"
"'.

....."'''' ..'"
'•"

"'.

• II

• NO

PR.OGRAM

*e

*. "'.
,,*

.*

*••• *
1\

... ..
~

F
",·"'DATA' "'.'. YES
.eolT' OR [IST·."',••••••••
t.
.'"
"'..'"

'. • NO
'"

••

'.
••

••

*s..,.

'" NO

~

Gl

• NO

."
0* E5
YES •• fND OF

*••
*
'" NO

.K"'.

".

."'K.

'.

".

••

••

111.,,* . '

.'.
.K.......... 0.."

1)""'*04 "''''.'''......
•
•
..
GENERATE
•
........ APPROPRIATF.
.. LIBRARY CALL •
4r

x:

.... ..' '.

.•

LtST

*)(000('01)110*.

t.T E n I T '

~

8 •

• NO

X

K

•'

*0

ic

NU0018
• GENERATE CODE'
•
.'
' . YES
• TO LOAD AD~R '"
' . ".
EO IT
. ' •••••••••• X:O~ NtgR~HNbA~b : ••••
••••
•
REGISTER 8
'"

-.

'0

.'.
R5
'.
• • ••
YFS.'
FORMAT
'.

1tI................

..

K
.'.
' .•
•01
••

El

. '•

C1 • • •

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

~...............

."'.

~>;

'" GFNERATE COOE •
.",
'" TO SAVF. lINK'
VI'S . '
'.
• •••••••••••••••••• 0 •••• 0 •••••• 01 ••••••••••••• "0 •••·."(' ••• ,,(1 I)
~"ID
*X",.C'''''lIftt)*''
FO!:tMAT
••
'. TRANSMISSION •
'.
.'
REGI5T~RS
•
..

X
NU1~l"'.02 ••••••••••
•• •••••••
•• ..... 01·
LA
•
•
GENERATE
•
• - .. -.-.-.-.-.-.-.
• UORARY ~ALL •
:
i~~~L~O~F
:)( •••••••• : DI~rcTg~ ~NO
•
INTEREST'
•
NO LIST
•

..

ic

"ll).. "11

"

NUl (1)2

115 •

*•••

Rl •

'''

"lU;'"l3
ic
...·.·.F4·"''''···''''''.·
: MooO[HA~F.MNU :
• IFM~V ANO 4K •
•
OF SCRATCH
'"

.. ..... .."'."''''''''''•
"'''''''''''''
'" .

• "'

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

• 61 '"

"'

x

'OB '"

'" At '"

'"

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

x

.'.
NU~~·24
••••
'"
GENfRATE
• '"
COMMA
' . YES
'" LA 1 DATUM
"'.
IN EDIT
."' •••••••• X'"
LA ~.(lED
"'.
LIST.'"
•
BAlR 7,8

HI"'.

.

*..*

"'. '" 'NO
"
X

"""'''''HZ''''''''''''''''''''''''''''''•

•

'"
•
",, , ... t.
"

•

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

I~'.

Jl.·. "'.

NU(l~~~."'J?"'''''''''''''''''''''''' ,{ ':

..

"'' ' ' ' ' "'''''''''''''''''''''''''''''''''''''

• '"
"'.
'" GENERATE CODE '"
•
• "'PRE-FORMAT •• YES
•
TO ORA~H
'"
•
"".. MARKFR • ",. "'•••••••• X:R~~~AtO~~M~~NG: ••••

*..*

"' • NO
'"

··."'...

•

•

x

•

A5 •

"'''''''''' '"

section 3: Ch3rts and Routine

Dir~ctories

223

2nart OB .

Over~ll

Phase JB

.....
..

Lcgic Diagraro

·OB •
• AI·

•

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

.•..

X

••••• A I . . . . . . . . . . .

••• X.

SCAN TeXT

..

.X••• )( •••••••••••••••••••••••••••• ., ••••••••••

.........
•

.•.
*.
III...
x

BI

••
*.••••

Al •

••

END
OF
TE1(T

•• YES
••••••••••
x

•••••

••

....

•• ••
• NO

·00 •
• BI •

X
CI···..
••••
•• COMPILER •• YES

.. ..

ST4 ••••• C2 ••••••••••
• •••• C3.; ••••••••
•
• •
PLACE
•
•
BUMP
•
..
PSEUOO•
STACK
: •••••••• 1(: pX~~~:~Hs
..
. . .
IN STACK
•

•••• V~~i~g~E •••••••••••• X:
••••
• NO

x
.111.

..................:

.................
.111.

ST6

01
••
02
••
• ••••03...........
••••
•• I S . .
•
FXAHINE.
•• COMPILER •• YES
•• ASSIGNEO •• YES
•
PSV OPERAND"
••
ASSIGN
•••••••••• X•• VALUE FIXED ••••••••••
AT TOP OF
.....
••
?
••
•• BIN AR Y • •
lC.
S T ACK "
••••
III.
? .111
•
•

X.

*. • *

*. ••

• NO

•••••••••••••••••

• NO

.

•
•
•
•
•

·......................
X:

••

..

.. ..1\.

Ct.LCLlLATE.
•
•
flOP= VECTOR •
OFFSET FROM .......... 1(.
PAR4'1erl'RS.
•
• •

• NO

• • 41.

.

iii.

eo; ••••••••••

GF.NFRATF
CODE TO
SET RFSULT
PI OOPF
VECTOIl

•
•
•
•
•

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

....•

0:

·•

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

1'4 ••••••••••
REPLACF.
•
"IT" BY
•
PSEunO-COOE •
"IVC
•

X

• •••• 1'5 ••••••••••

•
•

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

*. TEMP

•.....

e 00 • • • • • • 0
An

• Al .X ••
••••••
:)(." •••••••

F3..........

Fl···..
MTFR
F2' •• ••
FRS l~~
••••
•• I S . .
•
REPLACE.
•
••
MTF
•• YES
••
FIRST
YES
•
BY
•
•
••
FUNCTTON
••••••••••
oprRANO
••••••••• ,·x..
WORKSPACE
•••• 00.,.X.
...
••
... CTL OR ••
•
REFERENCE
•
X
•
• NO

O f t . " . O.

'x

·····E2········ ••
• Pl~CE AS'SIGN •
TO F I)(EO
•
•
•
•
BINARY IN
•••••••
•
TE XT
•

...*
..

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

.....£4..........
....................
·......
"Xo 0

X..

X.

**.. .C'..*
• N:J

ic

.<

AT~

c*o

1)4
••
• •••• f)5 ••••••••••
••••
•
REPLACF
•
CTL
•• YES
•
OPFR~NO BY
•
OR TEMP
••••••••••
WORKSPACE
•
••
••
•
REF
•

o.o.X..o.

DECR Fill FNT
STACK

•
•

•

x

AOVR
••
• •••• G2..........
• •••• G3 . . . . . . . . . ..
AOV ••
•
CALC ULATE.
..
GENERATE
..
• •••
•• OR S[lV
•• YE'S
•
OrJPE VFCTOR •
•
PSEUDO-COOE.
•
•
••
FUNCTION
•••••••••• X. OFFSET FRO"l ••••••••• )(.
TO LOAI)
••••• X. Al •
••
?
••
•
PARA"IETER'S"
• REGISTER FRO'4 ..
•
•
••••
•
• • [lOP!' VFCTOR.
• •••
GI

••

•••

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

.. ..
•

NO

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

*..

x

•••
ST7, ST6
•••
BY5
•••
HI..
H2
••
H3
••
••••
••
IS..
••
"'.
•"
BUYS
*. YES
••
IT A
•• NO
••
SCALAR.
•., yrS
OR FIRST
........... X•• DOP£: VECTOR ••••••••• 0X.1\
< 256
( I . f \ ..
••
RUY
••
..'lNLY TEMPo.
••
!.IYTES ."
••
••
.....
••
o.

*.

fI • •

•. ..
•

a

.YFS o.
• Xe • • •

~

*0

*

JI

••

SFLL
7.NO

nQ

*.

.•.x

. , r·

NO

RUV

*•• *

*0

•*

••

0*

•

.*

•
•

KI
o

•

N J ••

O . J " *0

••

·

*0 • ({

224

..

*

• ft ••

0

x
..... 3...........
..... 5.•.........
f..... .*••••J4..........
....
*
•.••..••.•••..•..
*****.** ••• *••
*** ••••• ** ••

x

110 r! O .

o.

11.0.001'1 • • 0 . 0

J

~L I r . N .
•
WURKSPACF.
•
T(1
*.,1.\0"0".''(.
R'lIJNO •
•
"'.

4-~YTF

coo

J

PL AC
WORKSOArF.
'"
OFFSE'T
.o,~,.~ .. ,,~X.
IN 'lrFSF.T 2 •
•
SLOT·..

IlIJ'4P
W'OP'I(SPA.CE
r 'JIJ 'IT

'"

•

.onno'H)O"')(*

X"

. . .

:11:*"

POIOVF

5TArE~FNT

FP,O'1 TFlCT

•• *.~

..
x
****

:

-.

"'.

vF S

BUYS AFF:N o*c
•• RE'10VEfl ••
••

OFFSET
1'1 OFFSFT 1
SLOT

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

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

.!. *.
HA S

HS .......... .
PL AC F
•
•
•
•
•

WORKSP~CE

****

•• X. Ai '"

;>..........
*
*
•• ** •••••••• *.*..

RVlq
• •••• J

• NO

: STIr

.. .

*. • ••NO

• YES

••••.

• •••• H4 •••••••
•
flL I G N .
•
•
WO'\I(SPACE.
•
Tn
."coe •••• r-X.
•
RF'lUIP~'l.
'"
'"
BOU"JOARY.
•

e~r.X:.

• III

«.ft • • • •

0

• • • • 0 . 0 • • • • • 0 0 1100 • • • 00

oor

CI"" 0 0 • • 0 . " " " flO (\ 'I

.~o

0 -:0""

t"

0'" 0 " 1 " " " " 0 0

~"o oon

Cr!"" 0

ftc ..

ft8

0'

"I :

•

..
•

•

Chart 00. Module 00 Overall Lcgic Diagram

.....
..•
·00 •

... Bl'"

SCRCOR

X

.

"' •••• "'''' .....
'*"''''··Bl
..."
GET BLOCK
•

•
OF
... SC ~ATCH CORE

•

'"

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

...

MOVTAB

X

•• *'~.C I .......... .

• 'lOVE TABLFS,
•
'" C ONST ANTS AND.
• ROUT' NE S INTO •

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

...•

SCRATCH CORE

•

·...4'.DI········•..
~

•

•

•

•

SET UP
PO INTfR
1 N REG I S TER

•
•
•

•

..... 4' .................. .

·

X

.

." ••• E I ••••••••••

•

END OF

•

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

:RELt~~~Rt~~TROL:

•

x

...

·OE •
• Al·

S~ction

3: charts and Routine Directories

225

Phase OE overall Lcgic Diagraro

Chart OE.
* ••••

• OE •
• Al·

·

••

··•....81 ....•. X..
••••

ic

ASS"32

•••
'iPASS
83
••
• •••• 11.. • •••••••••
••••
•
AllOCATE OR •
SPECIAL •• YES
•
IIUY POItAGE •
: •• X••• !SU~~~~NT •••••••••••• 1(: FO~p~~~~~O
:

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

•
•
•
•

SCAN TEXT
FOR A"I
INTERESTING
TRIPLE

•
•
•
•

••

•••••••••••••••••••
•••

.. ..

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

,*

•

• NO

•

·• x•••••••••••••••••••••••••.

ic

C1

*.

••

••• •
•••• YES
:g~~ An py~~R~~gH:
•• ASSIGNHENT •••••••••• X. TH~O TRIPLES] ••••••••
•• TRIPLF ••
• AND CHECK FOR
••••
•
VALIDITY
•

.. ..

• NO

X

ASS 1)1'1
• •••• C2 ••••••••••

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

••

••

C3

•••
••
ARE ••

.. ..

OP~RA"lOS

•• YES

•••• Fl~AIJRG ••••
*..*
• NO

111.,,.

ASFLl"·
• •••• C" ••••••••••
• GENEItA TF. COOE •
• FOR FkOATlNG •
• • • • ,,)(:
ASSr:G~~l.NT
: ••••••••••• 0

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

••••• :

...

x

•••
Aspar-'
03
••
• . . . . 1). . . . . . . . . . . .
•• ARE ••
• GENERATE CODE •
•
•• OPERANDS •• YI'S
• FOR PO~NTERI •
•
••• ~O~~HHsO~ ••••••••••
AS~~~.N~~NT
: •••••••••••••••• 1(:

*,

.. ..

,I(:

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

,*

•

• NO

•

ic

•••
lISARr r
E3
••
• •••• 1' ........... .
••••
•
G~HERATF.
•
•
••
ARE
•• YES
.LJ8RARY ~A~LlNG.
•
•••• OPi:U~S ............ ·1(:AK~2un~ fG"I2~NT:" •• ' ' ' . · ••••••• 1(:

*.

.. ..

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

••

•

• NO

1'3 ..

•••••1'............

ic

• *.

, " bp
III"

.. ..

~IXEO

*,.*

.

ASFBtr

~~~DS·· ••

•• 8 I NARY

•

GE~E:A~~ I(~H°F.

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

YES
:
•• ,.." ••••• x.
••
•

...

• NO

al~AAy

ASS I GNHENT

:

:

••••••
"•••••••• ~.x.•
•
•

x

•••
f,SFOf'
G3
••
• •••• G........... .
•• ·:;P n~DS·· •• YES
: GE~R=AHI(~goE :
•
••
~IXED
. . . . . . . . . . x.
Ol'CIHIIL
•••••••••••••••••• lC •
•• DECIMAL ••
•
ASSIGNHENT

.. ..

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

*..*
• NO

III

~

•••
O\STR: ,.
H3
••
• •••• H4 ••••••••••
•• ·*STRING •••• YES
: ~~~E~~HN&og~ :
*, OF Nl..fJIl'fRlc •••• e • • • • • X. NUMf.RIC FIELO *.D
•• F I EL~S ••
•
ASS I GFH~NT
•

*.

.. ..

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

••

•

• NO

x

•••
•• J ~UY, •• ••

CAL III

:···G~~~::TE·"·:

.:"•• AL~bHh,
.:.!;~ ..... K:
FREE
••
•

.. ..

*..*
• NO

Jrlrrt~~

................
.
.
··•....
....81 ..•
•

SEOUENCF.

•

•• J3

0..x

f,SL"r
: . . . . J" . . . . . . . . . :

••••

1(:

. : . ope~~~DS .:.:~~ •••••
•• LAI'IELS ••
•

*.

.. ..

Gr~S~~n8~roe

•

• NO

ic

it
•••• *K, ••••••••••

:E~g a~R~R~=~H,:

·..................
• OJ, 1."10 RELEA~E.
•
CONTROL
•

.....
••
·
ic

·OG •
• A2·

226

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

GF"IC"I
X
••••• K3··········
•
•

GF"IERATE
CONV HACRO

"'

•
•
•
..... ~. 81 •

•

ASOROP

•

ic

:.~:~~5S~=;~~~~.:

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

: •••••••• ~:
Ra~~~Tf~
ASSIGNHFliT.
• TMPI) TRIPt F~

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

••

:

•••••••••••••• )(.

...

••

·•..a......•
• III •

:

..

•

~G

Phase

Chart 03.

~ver311

.......

Lcgic Diagraw

• OG •
• AZ·

•

TRSCAN
X
•• ••• AZ··········

•••••
•
•
•

•
•

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

AZ ••••• X.
• X
•

~....

"'

GF.T NEXT
TR IPL E AND
rXAMINE

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

TSC I'll'

•'"
•
'"

••••• 11 3 ••••••••••

•
OUT PUT P I C .
•
•
• FOR LAST ITEM . . . ooX. A2 •

x

x

:

Xoo a.

0 •• 0'

I)

x.

0.:. 0 0 0 0

on •• () e

0

•••
TSCSNO.
8Z
••
• •••• S 3 ••••••••••
••••
.UPOATE MAX I MU'! •
••
SN,
•• YES
•
STORAGE
•
••
Sl OR SNZ
••'•••••••• X.REQUIREMENT IF •
••
••
•
NfCF SSARY
•

.. ..

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

*..*

•

• NO

•

ic

····OZ·········

•• COMPI LE R ERROR ••
•••••••••••••••• •
X
• NO
TSCEP,!
•••
•••••• E l . . . . . . . . . .
EZ
••
•
TERM INA TE
•
••••
• PHAS E~ DELFTF. •
YES ••
••
:I~';;L~~CE~~U~S : X . . . . . . . . . . . . EOPZ
••••

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

•

x

•••••
.OM •
• 81·
•••

.. ..

*..*

•••
TSCPRC.
03
••
• •••• 04 ••••••••••
•• PROC
••
'"
PRES E RVF
•
•• OR BEGIN •• YES
'"
WORKSPACF
•
..PRIMEO OR NOT •••••••••• )('.COUNTS FOR tAST •
•• PRIMEO
••
'" BLOCK PREPARr= •
••
••
'" FOR NEW ALOCK •

.. ..
•

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

NO

X

• ••
1'3
••
••••

X............
NO ••

•

*...
....
JUMP
•

••
••••

YES

x.x ••••••• o • • •

.. ..
.. ..

• • • • • • • • • • • • oeo •• o • • • • • • •

F3

X
•••

••

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

....

"ftftO.O • • • • • • • • • • 0.(> • • • • • • • • • • 10 • • • • • • 0 • • 0

•
CNVFNO
•
• •••• F5 ••••••••••

.:. E~~Ar,~ho .:.:~~.)(: A? :
••

*.

••

•

•••••••• ••• x.

••••• Gz.; ••••••••

•• MOVE PSEUDO- ••
• CODE TO OUTPUT.
••
••

.................
X

·•

••

: PUlo8~N~~MEO

••

• OUTPUT BLOCK

••• 1fI

NO

X

.X •• ., •• e

.•

PCSCAN
X
·····G3··········
•
•

GET NEXT
PIC ITF'!

:
•

'!JG

•••••

~=1"G5 .i........

•••••
X!

•

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

•
•

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

: G5 : ••••
•
•

•

GENf~AlhEOOE
LIBRARY

:
•

X

: NO
ic
• NO
•••
•••
IEMOH
•••
HZ
••
H3
H4..........
H5
••
•
••••
••••
•
El(AMINE·
• • ••
• YES ••
.,
NO , .
•• YO:S
•
OPERANDS OF •
••
IN-LINE ••
••••••
IGNORE
•• K. . . . . . . . . ,
CONVERT
. . . . . . . . . . K. CONVERT ANn . . . . . . . . . K •• CONVERSION ••
••
••
••
••
• CHECK IF TIiF
•
••
••
••••
••••
.CONV IS IN-UNE.
••••

.0

.. ..

•

.. ..

•

•.•••

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

IE'!OI
••••• J 4 . . . . . . . . . .
••••••
:
• G5 .X., •••
•
•
•

......

1~[~~AgDE:
FOR THIS
C'lNVERS ION

....

• YES

ic

J5

•••

••

YES •• ~ONVERSIO~· ••
.X •••••••••• DONE 8Y 01
••
•
••
••

•

.,~...............

....

*..*
•

NO

ic

·····K5···.·· ••••
•
OUTPUT
•
MOnlFIED
•
•
•
*CONVERT AND SET •••••
• TO CALL OM OR •
•
OP
•

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

section 3:

Ch~rts

and Routine Directories

227

~hart

OM. Phase OM Overall Logic Diagram

•••••
• OM •
•• e~.
•
~

···.·81··••··•••·•

•
••• x:
••

SH~TUICT

:

•

••••••••••••••••••

.•.
i

jz ••••••••••

Cl
••
• •••
••••
•
N~OE
•
•• ITEM •• YES
•
B AN H ON
•
•• CDNY~ItJ MACRO •••••••••• x.
CONT tNEO
•••••
i.
.i
.TRANSFER YECTOR.
•

*..*

•• •••••••••••••••••

•• • ••NO

•

.•.
....
.
.:x•• :
.... :
r
....
.••••••••••••••••.
•• ••
..••·:C,... : .....EZ..........:
..
.:x••.:
:x•••• :
•
•
~

01

••

• ••• *oZ ••••••••••

NO ••
••
••••••• ~NO OF TEX! ••• X••

•

UNPACK
(DEC TO PICI

••

•

• YES

*OP •

•

(PICPf~KOECI

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

•

•

•..•. .Z··········•

•

·•••••••••••••••••.• .

• x••••••

OToe
(DEC TO elNI

••
.x
•••

•

· .....GZ...........

••

* •

:X •••• :ILleRU~RCAlll :x •• :
••
•
••••••••••••••••••

.••••HZ·.··••••••

• •
:x• •••• :•* I OEcEVATPIC I :X
•• :
•
•••••••••••••••••••

· .....JZ··········.
..
.:X••:.
: ••••• :

IOEeE9~KpICI

•
••
••••••••••••••••••
x

..
··..................
.
•
•
••••• ItOP •

ic

·····C2·······'. ••

oil
oil

·•

ic

.
....*03..........

SCAN TEXT

.•0.02 ..
.. •• ••.'"
....
· ...

:.... .....:
.-.-.-.-.-.---..:
~;~:;

•
•
oil

••
•
••••••••••••••••••

••• X"

oil • • •
•

• F2 •

••••••
x

:" ••••••••• 0 •••••

.~

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

X:

~dN ftV~

.••..n" ••••• •••• •

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

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

CONVFRT·· •• YES
:
8RA~H O N :
:_._.~l!~~~-*-.-:
••
MACRO
•••••••••• X.
CON AtNED
•••••••••
"IT TO
••••• X. E? •
••
••
.TRANSF.R VECTOR.
•
8 NARv
'"
'"
•

lC.

• NO

·..

• E2 •• X.

•

••••

NO ••

••••••

.*

•

.X •• tI • • • • • • • 6

X

E2

••

END

OF TEXT

*. *.

*•••

••

..·..
:°12:
•

•

••

YES

'''.
••

.:*

.....
.•...."'."''''''''''.....•''

F~·.········
·•••••••••.•.••• 0.lC::-.-.~k!2!~-.-.-:
:
F~V~XR~O

~

•••

Section 3: Ch3rts and Routine Directories

229

Chart

as.

as Overall Lcgic Diagram

Phase

·•......•
•

·····1\2··········
X

•
•
•
•

GET SCRATCH
STORAGE TElIT
8LOCK.
SET SCAN· 0

.*

NO ••

·• x•••••••••••
•

·

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

•••••
•
AAt •
•• ••••
•
x

•

:-.-.£2!!¥~1-

......:

INTO lOCATION

.1(..........

s~ Y~~:

•

CONl~~~~ I N :

•••••••••••••••••••

•

1Ulli •.•.
.. ..

VSEA
·····85··.·······

••

GET NFl(T

:

•

SCANAt
2 • ••••
YES ••••
ijNSt N~..
•••• O.S~A~ •• "

ic

••

•

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

•

:

8'1 1

••

· · · · · 8 4 . · · · · · ••••

xx ••••••••••••••••••••••••••••••••••••

. . . . .C1.'........

:

•

up8~HN!CAN

:

•••

ic

•••••
• PA •
• 83·
••

X

CONSTANT IN

A4

n

0

:···~n·tT:;~···:
..

ic

STPTST

••

*. ••
YES •• * END OF -. ••
••••••••
SCAN· It
•• X••••• "....
CHAIN
,.*
••
.*
*,.
*. *•• *••
**.. .a**.*
• YES
.. NO

•
•
•
•

•••••••••••••••••••

LOCOMP

0..

A3

A4 •

* ....

.

•
: •• :

"

CHAR TO

Pl8~~~~~16~AR

•• J3 ••
• •

• NO

•
:l( ••••••
:

CH~~ ~~~lNG
CONYERS ION

:

YE S

C5··· ••
••••

...................,
..
..
.
x ·..... •
:

····C3·· •• • • • • • •
:
CONVRT:
:
...............:
:

.

l(
•••••••••••••••••
••••
l(

&..............
•••* .
vsc:••• *C"'..........
fI

••

~~.:. pf~~ano
••••

.:.

..'.

•l(

••••

•• lI. J3 ..

• *.
o.SOg~tiE
*.
e.
·:.~? .....

• *.

03
••
.:.*.•• H~r~~ *..*.: . :;~... ,.l(.:.*.
*.
•*

*. • ••NO

POOU~ . .E1.a . . . . . . . .

••
•
•
•

•

••

SCAN POOL
FOR SIMILAR
ENTRY

:
o

••

.:..•.

.•.·x

••

S~=neR

*. *•• *.*
•

NO

•
•

•• 'l2~
aIc

o.o.
.*

0 ANS

'I

2

f3

••
••

••

*.

x

•• ••••
•
M •

....

•

ic
F3

.*•••.
*..
•
*. *•••.*.*
x

.-..-.- .............-.
...................
ic

·····G2··········
•
CONYRT
•
•
•

X

••••• H2··········

:
•

AR~05rN~~~T
TElCT BLOCK

:
:
•

•••••••••••••••••

··....
.
••••.
ic

•

AAt •

••

....

••

*"

e..*

*•••
• YES

••

·•••••••••••••••••.
Fit

*...
*. ••

....

FORM
•

•••

CHAR TO
81 T S TR fNG
CONYERS tON

•••••
•

o.

.0 ..:1...
NEEDEO

.*

.:"".

G3

••

H~r~~

•.•••••••••••••••••..0 ..
:

••••••••• aX*

....
..
..lI!. .

*.

G4

•••

••

*"

•

•

·;.;;;..... X.:·". c~~~2~hR
.:.~? ..... )(:
STR INC ••
•

*...
.c

••

.

0*

NO

Bt~lm~r~G

CONYERS ION

•

•
:

C~~RA~T~~NG

CONV"R~ION

.

•••••••••••••••••

•

ARCHD
ic
·····H4··········
•
•
•

ARITH TO
CHAR
CONVERSION

.. J3 •• X.

•
•
•

X

CHARD

ic

•

x••••

•
0 •••••••

• ••• J3 •••••••••
RETURN

•

•
'"
•

CHAR TO
~RITH

C ONVF RS JllN

•
•
•

......... **** •••••
x

••••

"..

1(4

• YES
•••
••

*t'

I\RARD"

• • • • • 1(5 • • • • • • • • • •

•

•
•
.'" SOURCF
., NO
•
• K4 . . . " )(..
Cl-tARACTER
•••••••••• l ( .
....
., ~TRI"'G .'"
•

••••

230

(\

L"~

•

• YES

• •••••• x•••••••••••••••••••••• e. x•••••••••••••••••••••••••
•

~
1'"

AR8Tn
• •••• Go; ••••••••••

·
.
·.....................
. ·.................
.
· ..
.
·•................• ·.·..·.J4.·.··.··....
•

:

ARTTH

•

• •••••

0*

CHA~~ •••H3.: ••••••••

•:

ARITH TO

CONYERS ION

• 'In

*...
*•• *
•

YFS

*•• *

NO

J~

•••

ARARO
• •••• "5 ••••••••••

••

•• ~riNvERSln~· ••

ic

•

·•••••••••••••••••• ••••••• x..
\~1aR~I~n~~-

•

•
•
•

•
•
••••

•• IN INTeRNAL •••••••••• K.n

••••
•• •AAt
• ••

YES

INTO TEXT
8LOCK
SEE C 3

*. ••

VSOA
ic
• •••• 1''1 ••••••••••

••• *

..··SOURCE •••• YF.S

AN

•

:

*. .to

• NO

0 ••

ANO

c

·xx••••••• ., ................. ..

HR~E~·.'
•

•
..
•

.*
*...
*. ••

YES.
•
••••• oX. K" •

*•• *

••
o. UNAL CHEO •• NO

.:.:;~.

••

•*SOURCE *. ••

NO

05

X*:"'sltAHHNG . : .

.. YES

*. *STR.ING
. *••

*••
·NO

SCANl

...

".

·X

o.URfE~O.
IIOR
*••

..

*.

ic
0 ••

YES o.SI
•• 0000.0
AL

.................•
Fl

SCAN2

DIt

*c

.".n.ft.

ARITHMETIC
TO AP,I Hi

••

..

CO"IVF.RSfON
...
•••..••.•.•..••.••
*

.Table LA. Phase LA Pseudo-Code Scan

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
ISCINIT Initialization
ILAOOOS
IUT01,UT02
I
~-----------------------------------+---------------+-----------------------------------~
ISC1
Search for triple of inter- ILA0010
IUT01,UT03,UT06,UT07,UT08
I
est
I
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISC2
Move current triple then
ILA0011
IUT01,UT03,UT06,UT07,UT08
I
search
I
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
ISC3
Delete current trifle then
ILA0012
IUT01,UT03,UT06,UT07,UT08
I
search
I
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
ISC4
Skip current triple - text
ILA0020
IUT06
I
wanted
I
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISCS
Skip current triple - text
ILA0021
IUT06
I
I
free
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISC6
Move current triple - text
ILA002S
IUT03,UT06
I
wanted
I
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
ISC7
Move current triple - text
ILA0026
IUT03,UT06
I
I
free
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
ISC10
Symbolic input pointer to
ILA0035
IUT01
I
I
absolute
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
ISC11
Skip pseudo-code - text
ILA0040
IUT06
I
wanted
I
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISC12
Skip pseudo-code - text
ILA0041
IUT06
I
I
free
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
IMV2
Move user pseudo-code to
ILAOOSO
IUT04
I
I
contiguous OP
I
I
I
~.-----------------------------------+---------------+-----------------------------------~
I1'1V3
Move user pseudo-code to OP I LAOOSS
I UT04
I
~.-----------------------------------+---------------+-----------------------------------~
IMV3A
Move user triples to OP
ILAOOS6
IUT03
I
~.-----------------------------------+---------------+-----------------------------------~
IDV1
GE~nerate dope vector for
ILA0070
IUT07,UT10,UT11
I
based aggregate
I _______________ I _ __________________________________ JI
lI ___________________________________
~

~

Section 3: Charts and Routine Directories

231

.Table LA1.

Phase LA Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+---------------------------------------------------------------------~
DVl
IGenerate dope vector for based aggregate.
MV2
MV3
MV3A
SCINIT

I

IMove user pseudo-code to contiguous output text.

I

IMove user pseudo-code to output.

I

IMove user triples to output.

I

IInitialize input and output text blocks.

SCi

Searches for triple of interest to user as indicated by 1RT table.

SC2

Move current triple to output then search for triple of interest to
user.

SC3

Delete current triple then search for triple of interest to user.

SC4

Skip over current triple and mask input WANTED.

SC5

Skip over current triple and mark input FREE.

SC6

IMove current triple to output and mark input WANTED.

SC7

Move current triple to output and mark input FREE.

SC8

lYJove input pseudo-code to output and mark input WANTED.

SC9

Move input pseudo-code to output and mark input FREE.

SC10

Convert symbolic input pointer to absolute.

SCll

Skip over input pseudo-code and mark input WANTED.

SC12

Skip over input pseudo-code and mark input FREE.

UTOl

Get a new input text block.

UT02

Get a new output text block.

UT03

Move pseudo-code to output.

UT04

Move triples to output.

UT05

Move text to output.

UT06

Test for end of block and chain to next clock if necessary.

UT07

Convert dictionary reference to at-solute.

UT08

Move input pseudo-code to output.

UT10

Set adjustable Dound values in a dope vector.

IUTll
Convert output text references to __________________________________
absolute.
L
__________________ __________________________________
.
~

232

Table LB. Phase LB Pseudo-Code Initial

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

I
I

Statement or Operation Type

IMain Processing I
I
Routine
I

I
I

Subroutines Used

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

IScans text for PROCEDURE, BEGIN,
land ALLOCATE triples
I

ISCAN
I
I

ISCINIT, SCi, SC3, SC5 (all in LA),
ISFSCAN, ENDRTN, MAIN, SCAUTO,
I AUT012

I
I

I

~-----------------------------------+---------------+-----------------------------------~

IScans automatic chain

ISCAUTO

IMAIN

I

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

IProcesses INITIAL attribute dicItionary items

IMAIN
I

ICNSTWK, ARRENT
I

I

l

.--------.---------------------------+---------------+-----------------------------------1

IProcesses IDV

statement~)

IAUT012

I

IARrtENT

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

IProcesses
INITIAL arrays
I ARRENT
L
___________________________________
_______________ ICNSTWK
_ __________________________________ JI
~

Table LEi.

~

Phase LB Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

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

ARRENT (LC)
AUT012

CNSTWK
ENDRTN
MAIN
SCAN
SCAUTO
L SFSCAN
___________________

IGenerates triples and pseudo-code for arrays declared with INITIAL.

I

IProcesses IDV (initial dope vector) statements.

I

\

ICreates initialization triples.

I

IReleases phase and scratch storage.

I

IProcesses INITIAL attribute dictionary items.

I

IScans text for PROCEDURE, BEGIN, and ALLOCATE triples.

I

IScans AUTOMATIC chain.

I

Iscans
through second file statements.
_________________________________
___________________________________ J

~

Section 3: Charts and Routine Directories

233

Table LD. Phase LD Pseudo-Code Initial

r-----------------------------------T---------------T------------------------------------1

I
I

statement or Operation Type

IMain Processinql
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+- -----------------------------------1

Iscans the STATIC chain for any
I STATIC
IENDRTN, ARRENT, CNSTWK,
I
Ivariable with the INITIAL attribute I _______________ I _LOVNAS,
STHADD
__________________________________
.JI

L ___________________________________

~

~

Table LD1. Phase LD Routine/Subroutine Directory

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

I Routine/Subroutine I

Function

I

~------------------+---------------------------------- -----------------------------------1

ARRENT

Processes the initial value string for arrays.

CNSTWK

Creates constant entries for initial values.

CNVERT

Converts decimal integer constants used as replication factors to
fixed binary.

ENDRTN

Releases the phase and scratch storage.

GAAl

Scans array initial value string.

GAC3

Makes slot for converted constant for arrays.

LOVNAS

Calculates the equivalent length in bits or bytes of a constant for
variable or adjustable length strings.

STATIC

Scans the STATIC chain.

STRADD

Addresses elements of structures.

ST0006

Locates initial value list.

ST0088

Resets initial value entry.

IST9999

Makes slot for converted constant for scalars.

L __________________ i ___________________________________________________________________ _

234

Table LG. Phase LG Pseudo-Code DO Expansion

T -----------------------------------,
r----------------------------------- TI --------------Main Processing I
I

I
I

Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+-------.--------+-----------------------------------~
I Scans text
I LG0002
I SCi (LA)
I
~------------------------------------+---------------+-----------------------------------~
IFor iterative DO triples, pushes
ILGOOii
IPSHDWN, SC5 (LA), CVSCAN
I
Idown stack and examines control
I
I
I
I variable
I
I
I
~-----------------~-----------------+---------------+-----------------------------------~
IPushes down DO s t a c k ·
1LG 0013
IPSHDWN
I
~-----------------------------------+---------------+-----------------------------------~
IFor iterative DO' and DO' triples, ILG0012
I EXPEVL, POPUP
I
Ipushes up stack and removes top
I
I
I
I
I
I
I entry
~-----------------------.------------+---------------+-----------------------------------~
IFor CV triples, reverts to normal
ILG0015
IEXP~VL
I
1 scan
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IFor TO and TO' triples, examines
ILG0017
I EXPEVL, TESTOP
I
~argument and assigns to temporary, I
I
I
I
I
I
I if necessary
~-----------------------------------+---------------+-----------------------------------~
IFor BY and BY' triples, examines
ILG0019
I EXPEVL, TESTOP
I
lexpression and determines signs of I
I
I
I
I
I
I constants; assigns variables to
I temporary
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IFor WHILE and WHILE' triples, marksiLG002i
ICODE3
I
Iloop as iterative; generates test
I
I
I
I triples
I
I
I
.-----------------------------------+---------------+-----------------------------------~
IDO EQUALS triples, assigns expres- ILG0024
ICODE2, TESTOP
I
ISion as a temporary; generates codel
I
I
Ito control loop if end of specifi- I
I
I
I
I
I
I cation
.-----------------------------------+---------------+-----------------------------------~
Isets up control variable text in DOICVSCAN
ICVCOPY, PSTYPO, PSTYPi
I
~stack
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IGenerates loop control code
ICODE2
ICVCODE, DICENT, COMPAR, SWITCHP,
I
I
I
I
ILMV3AU, LMV3A5, PSTYPO, PSTYPi
.---------------_._------------------+---------------+-----------------------------------~

ITests expression result type and
ITESTOP
IDICCHN, LMV3A5
I
lassigns to temorary if not constant I
I
I
~-----------------------------------+---------------+-----------------------------------~
IMoves
text from DO stack to output ICVCODE
L
___________________________________
_______________ ILMV3AU
___________________________________ JI
~

~

Section 3: Charts and Routine Directories

235

Table LG1.

Phase LG Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
CODE2
IGenerates loop control code.
I
I
CODE3
IGenerates loop control code for wHILE.
COMPAR

I

Generates triples to test upper limit control expressicn.

CVCODE

Moves text from DO stack to output.

CVCOPY

Moves input text to DO stack.

CVSCAN

Sets up control variable text in DO block.

DICCHN

Chains dictionary entries.

DICENT

Makes a dictionary entry.

EXPEVL (LH)

Analyzes expression to determine result type.

LGOOOO

Initializes phase.

LGOOO2

Scans text.

LGOO1O

When EOP triple encountered, releases scratch storage and passes
control to next phase.

LGOOll

For iterative DO triples pushes down stack and examines control
variable.

LGOO12

For iterative DO' and DO' triples pushes up stack and removes top
entry.

LGOO13

Pushes down DO stack.

LGOO15

IFor CV triples reverts to normal scan.

LGOO17

For TO and TO' triples, examines argument and assigns to temporary
if necessary.

LGOO19

For BY and BY' triples, examines expression and determines sign of
constants. ASSigns variables to temporary.

LGOO21

For WHILE and WHILE' triples, marks loop as iterative and generates
text triples.

LGOO22

When WHILE' triple encountered, branches to generate comparison
triples.

LGOO24

For DO EQUALS triples, assigns expression to a temporary: generates
code to control loop if at the end of specification.

LMV3AU

Moves triples to output.

LMV3A5

Moves one triple to output.

POPUP

Removes item from DO stack.

PSHDWN

Pushes down DO stack and initializes new stack entry.

PSTYPO/PSTYPl

Test pseudo-variable argument type.

SWITCHP

Changes DO stack text markers.

TESTOP
l __________________

236

~

Tests expression result type and assigns to terrporary if not constant.
__________________________________ _________________________________ _

Table LS. Phase LS Pseudo-Code Expression Evaluation

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

I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-.----------------------------------+---------------+-----------------------------------~
IScans text and branches to
ILBO
IARITH, FUNCT, LZZ1, MOVEPC,
I
Iprocessing routines; marks phase LWI
ISCAN (LA), STRIN~, SUESPT
I
land releases control to next phase I
I
I
~-.----------------------------------+---------------+-----------------------------------~
Icalculates result type and
IARITH, ARITH2
IADDSTK, ASSIGN, CONVT, CICDES,
I
Igenerates pseudo-code for +, -, *, I
I EXPONT, GENRPD, GETADX, GETFR,
I
I/f prefix +, prefix -, compare
I
IGETGR, MCVEPC, RELSTK, SETCPX,
I
loperators, and ADD, MULTIPLY, and
I
I STRING, SWOP
I
IDIVIDE functions
I
I
I
~-.----------------------------------+---------------+-----------------------------------~
ICalculates result type for string
I STRING
ILZZ1, MOVEPC, STALRG
I
I
I
I
I operators
~-.----------------------------------+---------------+-----------------------------------~
IInserts symbolic register in subISUBSPT
IADDSTK, DICDES
I
Iscript triple and stacks result
I
I
I
~-----------------------------------+---------------+-----------------------------------i
IInserts workspace descri~tion in
IFUNCT
IADDSTK, ARITH, DICDES, GETFR,
I
ITMPD triples after function, and
I
IGETGR, SCAN
I
Istacks result.
Stacks arguments
I
I
I
Ifor ADD, MULTIPLY, and DIVIDE func-I
I
I
Itions. Adds pseudo-variable mark- I
I
I
lers to stack
I
I
I
~-----------------------------------+---------------+-----------------------------------~
Icalculates results types and
I EXPONT
IADDSTK, ARITH2, CONVT, GETADX
I
Igenerates pseudo-code for ** opera-I
I MOVEPC, STALRG, SWOP
I
Itor.
Generates calling sequences
I
I
I
Ito library subroutines for complex I
I
I
I arithmetic
I
I
I
~-.----------------------------------+---------------+-----------------------------------~
ICalculates target type and
ICONVT
IADDSTK, ASSIGN, GETFR, MOVEPC,
I
Igenerates assignment triple for
I
ISTALRG
I
Iconversion; sets dictionary entries I
I
I
Ifor constants
I
I
I
~-.----------------------------------+---------------+-----------------------------------~
IInterchanges operands; optionally
ISWOP
IGETADX, GETFR, GETGR
I
Iloads first operand
I
I
I
~-----------------------------------+---------------+-----------------------------------i
IObtains free floating or fixed
JGETFR, GETGR
IGETADX, STALRG
I
larithmetic register; stores it, if I
I
I
Inecessary
I
I
I
~-.----------------------------------+---------------+-----------------------------------i
IAdds items to, and releases items
IADDSTK, RELSTK INone
I
Ifrom intermediate result stack
I
I
I
~-.----------------------------------+---------------+-----------------------------------i
IGenerates calling sequence for
ISETCPX
I EXPONT, GETADX
I
Icomplex * and I operators, superI
I
I
Ivises complex arithmetic
I
I
J
~-----------------------------------+---------------+-----------------------------------i
IInserts TMPD triples after zero
ILZZl
IRELSTK, SCAN
I
lloperands
___________________________________ I _______________ I ___________________________________ JI
~

~

Section 3: Charts and Routine Directories

237

Table LSi.

Phase LS Routine/Subroutine Directory

r------------------T-------------------------------------------------------------------I Routine/Subroutine I
Function
~------------------+---------------------------------- ----------------------------------

ADDSTK (LT)

Adds items to intermediate result stack.

ARITH/ARITH2 (LT)

Calculate result type and generate code for +, -, *, /, prefix +,
prefix compare operators, and ADD, MULTIPLY, and DIVIDE functions.

ASSIGN

Generates an assignment triple and TMPD in the output text.

CONST

Sets up dictionary entry for constant operand.

CONVT

Calculates target type and generates assignment triple for conversion.

DICDES

Constructs operand description from dictionary entry.

EOP2

Marks phases wanted/not wanted and releases control.

EXPONT (LU)

Calculates result type and generates pseudo-code for ** operator,
and generates calling sequence to Library subroutines for complex
arithmetic.

FCTDES

Inserts workspace description in TMPD triples after function, and
stacks result.

!
I
I
I
I
I
I
I
I
~
~

FUNCT

Inserts workspace description in TMPD triples after function, and
II
stacks result. Stacks arguments for ADD, MULTIPLY, and DIVIDE func-j
tions. Adds pseudo-variable markers to stack.
~

FXCi (LT)

Generates fixed binary pseudo-code.

GENRPD

Generates pseudo-code for packed decimal operations.

GETADX (LT)

Sets up address of pseudo-code instruction.

GETFR/GETGR (LT)

Obtain free floating or fixed arithmetic register; store it, if
necessary.

LBO

Scans text and branches to processing routines.

LBE21 (LT)

Tests for operand conversions and constants.

LBFLi (LT)

IGenerates floating pseudo-code.

LZZl

Inserts TMPD triples after zero operands.

MOVEPC

Moves pseudo-code to output text.

PSI

Adds pseudo-variable marker to stack.

RELSTK (LT)

Releases items from intermediate result stack.

SETCPX (LU)

Generates calling sequence for complex
complex arithmetic.

STALRG

*

~
~
~
~
~
~

I
~

I
~

I
I
I

I
I
I
I
I
I
I
I
I
I
I

and / operators; supervisesl

I

I
Generates pseudo-code to store all arithmetic registers currently inl
use.
I

I
I
I
SUBSPT
Inserts symbolic register in subscript triple and puts result in
I
stack.
I
I
SWOP
Interchanges operands and optionally loads first operand.
I
L __________________ L ____________________________________________________________________ J
STRING

238

Calculates result types for string operators.

Table LV.

Phase LV Pseudo-Code String utilities

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

statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

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

IInitializes module; releases conItrol to next module

ISTRUTO
I

INone
I

I

I

~------------------------"-----------+---------------+-----------------------------------~

Iconverts data item to string; cal- ISTRUTi
Iculates string length
I

ISCAN (LA), STRUT2
I

I

I

~-----------------------------------+---------------+-----------------------------------~

IProduces a string dope vector desIcription from a standard string
I description
L
___________________________________

Table LVi.

ISTRUT2
INonE
I
I
I
I
I _______________ I _ __________________________________ JI

~

~

Phase LV Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Functicn

I

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

LSUT17

Tests whether string length is greatEr than 256, and if necessary
generates fixed length calling sequence.

LSUT22

Tests whether string dope vector result is required.

LSUT26

Generates any assignrr.ent and TMPD triples.

LSUT27

Sets up assignment and TMPD triples.

STUTO

Initializes module; releases control to next module.

STRUTi

Converts data item to string type; calculates string length.

STRUT2

Produces string dope vector description from standard string description.

ZSTUTi

Transfer vector to STRUTi.

ZSTUT2
L __________________

~

I
I

I

I
I
I

Transfer vector to STRUT2.
__________________________________
__________________________________ JI

SEction 3: Charts and Routine Directories

239

Table LX. Phase LX Pseudo-Code String Handling

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

IMain Processingl
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IInitializes phase, scans text and
IBEGIN
I FUNPT, SCAN (LA), STROP,
I
Ibranches to processing routines;
I
ISUBSPT, TMPDT
I
Ireleases control to next ~hase
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses TMPD triples.
ArithmeticlTMPDT
IGETMPD, MOVSEL, RELSTK, SCAN (LA)
I
Itype TMPDs are ignored.
String
I
ISET~PD
I
ITMPDs are replaced by the top item I
I
I
Ifrom the string stack
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses function and function
I FUNT
~ADDSTK, DICDES, GETADS, GETMPD,
I
largument triples.
Arithrretic type I
I MOVEPC, RELSTK, SCAN (LId, SETMPD, I
Ifunctions are ignored. Dictionary I
ISTkOP
I
lentries are created for the resultsl
I
I
lof string type functions.
A
I
I
I
Ilibrary calling sequence is gener- I
I
I
fated for the BOOL function using
I
I
I
Ithe mechanism for packed tit opera-I
I
I
Itions. The result descriptions arel
I
I
ladded to the string stack
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses subscript triples.
ISUBSPT
IADDSTK, DICDES, SEGNOR, SCAN (LA)
I
IArithmetic type subscripts are
I
I
I
lignored. A symbolic register or
I
I
I
Iworkspace offset is added to string I
I
I
Itype subscript triples and the
I
I
I
Istring description is added to the I
I
I
I string stack
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses string operations CONCAT,ISTROP
IADDSTK, DICDES, GETADS, GETADX,
I
lAND, OR, NOT and comparisons with
I
IGET~PD, MOVEPC, MOVSEL, RELSTK,
I
Istring type operands.
For simple
I
ISCAN, STRUT (LV), ASSIGN, GETWS4,
I
Icases, in-line pseudo-code is gen- I
IGETWS8, SBGNER, SBGNR
I
lerated; otherwise calling sequences I
I
I
Ito the library are generated.
The I
I
I
Iresults are added to the string
I
I
I
LIstack.
___________________________________ I _______________ I _ __________________________________ JI

I

~

240

~

.Table LX1. Phase LX Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

Function

~------------------+--------------------------------------------------------------------~

ADDSTK

ADSTR (LY)

IAdds strings to the intermediate string result stack.

I
I

Iconstructs dope vactor and string descriptions from a given descriptor which may describe either a string, or its dope vector.

ASSIGN

Generates an assignment triple and associated
text.

BEGIN

Main controlling routine for phase.

DICDES

constructs operand description from dictionary entry.

FUNPT

Processes result returned by functions.

FUNT

Processes funtion and function argument triples.

GETADS/GETADX

construct address part of pseudo-code instruction.

GETMPD

constructs operand description from TMPD triples.

GETWS4
GETWS8
LB

~MPDs

in the output

IAllocates 4 bytes of aligned workspace.

I

IAllocates 8 bytes of aligned workspace.

I

Terminates phase at end of program.

LIBl

Generates Library calls for string operations.

LIL2 (LY)

Generates pseudo-code for NOT operation.

LIL3 (LY)

Generates pseudo-code for concatenation operation.

LIL6 (LY)

Generates pseudo-code for comparison operation.

LIL8 (LY)

Generates pseudo-code for AND/OR operation.

Ll1

Generates pseudo-code to convert to string.

MOVEPC

Moves pseudo-code from nuffer to output text.

MOVSEL

Moves SELL triples to output text.

MVC1/MVC2(LY)

Creates MVC instructions.

RELSTK

Removes strings from the intermediate string result stack.

SEGNER

Gets next even-odd pair of symbolic registers.

SBGNOR

Gets next symbolic register.

SBGNR

Gets next symbolic register.

SETMPD

Constructs TMPD triples from description.

SUBSPT
TMPDT
L T5
__________________

I
I
I
I
Processes subscript triples.
I
I
Processes TMPD triples.
I
I
Sets
flags for triple types.
__________________________________
__________________________________ JI
Processes string operations CONCAT, AND, OR, NOT, and comparisons
with string type operands.

STROP

~

Section 3: Charts and Routine Directories

241

Table MB.

Phase MB Pseudo-code Pseudo-Varidcles

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processing\
\
\
Statement or Operation Type
\
Routine
\
subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
\Scans source text
\MBOOOl
\SCl (LA)
\
~-----------------------------------+---------------+-----------------------------------~
IPSI operator; starts new entry in
\MBOOll
\ SWITCH
\
\stack for pseudo-variable
\
I
I
~-----------------------------------+---------------+-----------------------------------~
IPSI' operator; completes stack
\MB0012
\SWI~CH, TARGET
\
\entry and generates code for data
\
\
I
\list items
\
\
\
~-----------------------------------+---------------+-----------------------------------~
\Assign completes stack and rescans \MB0013
IDRF~~P, MMV3A5, MVTMPD, OUTMPD,
I
\group of assignments, putting tar- I
\TARGET
\
Iget descriptions out in correct
\
\
I
\ sequence; generates code for
\
\
\
Ipseudo-variables in stack
\
I
\
~-----------------------------------+---------------+-----------------------------------~
\Multiple assign; places only target\MB0014
I MVTMPD
\
\descriptors in stack
\
\
\
~-----------------------------------+---------------+-----------------------------------~

IConstructs pseudo-variable stack
\MB0020
IMVT~PD
I
lentry
\
\
I
~-----------------------------------+---------------+-----------------------------------~
IPlaces temporary descriptor in
\OUTMPD
\MMV3A5
I
\ output
\
I
I
~-----------------------------------+---------------+- ----------------------------------11

\Gets temporary workspace for

\TARGET

\GETWKS

~

\ pseudo-variable,
if necessary
I _______________ \ _ __________________________________ J~
L
___________________________________
~

242

~

Table MB1.

Phase MB Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
DRFTMP
Makes temporary descriptor from a dictionary reference.
I
GETWKS

Obtains workspace to accoITmodate a variable of given type.

MBOOOl

Scans source text.

MB0004

Multi-switch for triples of interest.

MB0010

On reaching end-of-text marker, releases rerraining block, and
releases control of phase.

MBOOll

PSI operator; starts new entry in stack for pseudo-variable.

MB0012

PSI' operator; completes stack entry and generates code for data
list items.

MB0013

ASSIGN; completes stack and rescan group of assignments, putting
target~ descriptions out in correct sequence, generates code for
pseudo-variable in stack.

MB0014

Multiple ASSIGN; places any target descriptors in stack.

MB0020

constructs pseudo-variable stack entry.

MB1310

Resets input pointer to start of sequence of ASSIGNS.

MB13l1

Rescans ASSIGNS and associated TMPDS from stack in reverse order.

MB13l6

Tests for end of stack.

MB13l8

Tests for pseudo-varaible TMPD.

MB1320

Generates code for pseudo-variable.

MMV3A5

Moves one triple to output.

MVTMPD

Places temporary descriptor in stack.

OUTMPD

Places temporary descriptor in output string.

SWITCH

changes scanning table.

I
I
I
I
I
I
I
I
I
I
I

I
I
I
I
I
I
I
I

Il TARGET
temporary workspace for pseudo-variable,
if necessary.
___________________ Obtains
_________________________________
___________________________________
J
~

Section 3: Charts and Routine Directories

243

• Table MD.

Phase MD Pseudo-Code In-Line Functions

r-----------------------------------T---------------T-----------------------------------"
I
IMain Processingl
I

Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------i
IScans text
IPhase LA (SCAN) INone
I
~-----------------------------------+---------------+-----------------------------------i
IBuilds up function stack
ILFARIN
INone
I
~-----------------------------------+---------------+-----------------------------------i
IBuilds up argument stack
ILFCOM
INone
I
~-----------------------------------+---------------+-----------------------------------.~
IMoves generated code to output
ILFMOVE
IMV3(LA)
I
I
I
I
I block
~-----------------------------------+---------------+-----------------------------------i
IGenerates in-line code and
ILFEOF2
I SNAKE
I
Ilibrary
calling sequences
I _______________ I ___________________________________ JI
L
___________________________________
~

• Table MDl.

~

Phase MD Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
LFARIl
Continues scan for in-line functions.
I
LFARIN

LFDR
LFEOF2

Calls subroutines to generate

LFIGN

244

in-lin~

code.

Removes triple from text if inside an in-line function.

LFSPEC

I

I

I
Builds up argument stack.
I
I
Unpacks dictionary reference of argurrent when argurrent triple found. I
I

LFCOM

L SNAKE
__________________

I

Builds up function staCK.

Branches if IGNORE triple or not an in-line function.
~

I

I

I

I

I

I
Generates code for ADDR function.
____________________________________________________________________
JI

eTable ME. Phase ME Pseudo-Code In-Line Functions

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

I
IMain Processingl
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
IScans and moves text
IPhase LA (SCAN)ISC1,SC2,SC3,SC5,MV3
I
~-----------------------------------+---------------+-----------------------------------~
IBuilds up function stack
ISFUNC
IZDRAOF
I
~-----------------------------------+---------------+-----------------------------------~
IConstructs result TDB and branches ISFNPM
IMS4,MS5,MSB,RTAA,RTAB,INDEX,
I
Ito routines for INDEX, UNSPEC,
I
I ILUNSP,EVENT, ZDRAOF,STATUS
I
I CONPLETION, and STATUS
I
I
I
~-----------------------------------+---------------+- ----------------------------------i

IDeletes current triple
ISIGN
INone
I
~-----------------------------------+---------------+-----------------------------------~
IBuilds up argument stack
ISDCOM
IZDdAOF
I
~-----------------------------------+---------------+- ----------------------------------i

IInspects arguments and branches to IMSB
IRTB,RTC,RTL,RTE,RTF,RTG,RTH
I
subroutine
I _______________ I ___________________________________ JI
I appropriate
L_,
__________________________________
~

~

eTable MEl. Phase ME Routine/Subroutine Directory

T------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+---------------------------------- ----------------------------------i

EVENT

Generates in-line code for COMPLETION function.

FINISH

Passes control to the next phase.

ILUNSP

Generates in-line code for the UNSPEC function.

INDEX

Generates in-line code for optimizable invocations of the function
INDEX ..

MSB

Calls subroutines to generate in-line code.

MSG

Resets current flag and continues scan.

RLCTOF

Releases module and passes to"next phase.

RTAA

Generates in-line code when the result is in a register by name, and
the second argument is constant.

RTAB

Generates in-line code when the result is in a register by name, and
the second argument is variable.

RTB

Generates in-line code for the case when the first argument is an
aligned bit string, and the second and third arguments are both
constant.

RTC

Generates in-line code in the case when the first argument is a
character or aligned bit string, the second argument is constant and
the third variable.

RTD

RTE

Generates in-line code when the first argument is a character or
laligned bit string, the second is constant and the third is not
Ipresent.

I

IGenerates in-line code when the first argument is a packed bit
Istring, and the second is constant.

I

IRTF
IGenerates in-line code when the first argument is a character
and the second and third are
both variable.
LI __________________ Istring,
__________________________________
_________________________________
_
~

Section 3: Charts and Routine Directories

245

Table MEl. Phase ME Routine/Subroutine Directory (continued)

T------------------T---------------------------------------------------------------------,
I Routine/Subroutine I

Function

,

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

RTG

Generates in-line code when the first argument is a character
string, the second is variable, and the third is not present.

RTH

Generates in-line code when the first argument is a bit string, and
the second is variable.

SBERR

Error routine.

SBGNER

Gets the next even register and sets the even/odd bit on.

SBGNOR

Gets the next odd register and sets the even/odd bit on.

SBGTNR

Gets the next available symbolic unassigned register.

SCAN

Scans for the next triple of interest.

SCINIT

Initializes pointers and text blocks.

SDCOM

Builds up argument stack.

SFNPM

Generates in-line code.

SFUNC

Builds up function stack.

STATUS

I

Generates code for STATUS function.

STRUT2

Constructs a string dope vector.

SUBl

Generates code to place the address of the first argument plus a
literal offset into a symbolic register.

SUB3

Generates a ST and DROP instruction, optionally followed by a MVI
instruction.

SUB4

Constructs a dictionary entry for the constant JJ, and generates an
MVC instruction.

SUBS

Generates two STH instructions, followed by a DROP instruction.

SUB6

Generates an RX instruction to operate on a TDB by a register,
optionally followed by an instruction to drop any reqister used in
addressing the TDB item.

I
I
I

ISUB7L

I

ISUB7R
I
ISUB9

I

Deletes current triple.

SIGN
I

I
I

Generates SR, SLDL, OR instructions.
Generates SR, SRDL, OR and DROP instructions.

ICalculates correct values for ILEN, IOFF and Y.
I
IConverts a dictionary reference to an absolute address.
IZDRAOF
I
I
IZURCOF
scratch core.
__________________ i IReleases
__________________________________
__________________________________.J

I

~

246

Table MG.

Phase MG Pseudo-Code In-Line Functions 1

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

statement or Operation Type

IMain Processing I
Routine
I

I

I
I

Subroutines Used

1·-----------------------------------+---------------+ -----------------------------------~

IScans text

IPHASE LA (SCAN) INone

I

1·-----------------------------------+---------------+ -----------------------------------~

IBuilds up function stack

ILFARIN

INone

I

l·-----------------------------------+---------------+ -----------------------------------~

IBuilds up argument stack

ILFCOM

I

INone

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

IMove generated code to output
Iblock.

ILFMOVE
I

IMV3 (LA)

I
I

I

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

IGenerates in-line code
ILFEOF2
IABBFLL, ABbFLS, ABSFB, ABSFD,
I
I
I
I
IALLCC2, CElLB, CEILD, CEILL,
I
I
ICEILS, CMPLXB, CMPLXD, CMPLXL,
I
I
I
I
ICNASTR, CNVIN'I, CCNJGE, CONJGD,
I
I
ICONJGL, CONJGS, ERRFUN, FLOORB,
I
I
I
IFLOORD, FLOORL, FLOORS, IMAGB,
I
I
IIMAGFD, I~lAGL, IMAGS, REALE,
I
I
I
IREALFD, REALL, REALS, SBG'INR,
I
I
I
I
I
I TRUNCB, TRUNCD, TRUNCL, TRUNCS,
I ___________________________________ I _______________ LI UNSPEC,
UTTEMP
L
_ __________________________________
JI
~

Table MG1.

Phase MG Routine/Subroutine Directory

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

I Routine/Subroutinel

Function

I

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

ABBFLL

Generates in-line code for ABS function with long floating-point
argument.

ABBFLS

Generates in-line code for ABS function with short floating-point
argument.

ABSFB

Generates in-line code for ABS function with fixed binary argument.

ABSFD

Generates in-line code for ABS function with fixed decimal argument.

ALLOC2

Generates in-line code for ALLOCATION function.

CEILB (MH)

Generates in-line code for the CEIL function with fixed binary argument .

CEILD (MH)

Generates in-line code for the CEIL function with fixed decimal
argument.

CEILL (MH)

Generates in-line code for CEIL function with long floating-point
argument.

CElLS (MH)

Generates in-line code for the CEIL function with short floatingpoin1: argument.

CMPLXB

Generates in-line code for COMPLEX function with fixed binary
argument.

CMPLXD

Generates in-line code for COMPLEX function with fixed decimal argument.

CMPLXL

Generates in-line code for COMPLEX function with long floating-point
argument.

CNASTR

Constructs assignment triple and associated TMPDS.

ICNVINT
L
__________________

~

I
I

I

I

I
I

Converts a decimal integer constant__________________________________
to fixed binary.
__________________________________
J

Section 3: Charts and Routine Directories

247

Table MG1.

Phase MG Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------1

I Routine/Subroutine I

Function

I

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

CONJGB

Generates code for the CONJG function with fixed binary arguments.

CONJGD

Generates in-line code for the CONJG function with fixed decimal
arguments.

CONJGL

Generates in-line code for the CONJG function with long floatingpoint arguments.

CONJGS

Generates in-line code for the CONJG function with short floatingpoint arguments.

I
I
I
I
I
I
I
I
I
!I
I

ERRFUN

Aborts if Phase 1M discovers an error in a function.

FLOORB Om)

Generates in-line code for the FLOOR function with fixed binary
argument.

I
I
II

Ii
II

FLOORD (MH)

IGenerates in-line code for the FLOOR function with fixed decimal
argument.

I
II
I

FLOORL (MH)

Generates in-line code for the FLOOR function with long floatingpoint argument.

II

Generates in-line code for the FLOOR function with short floatingpoint argument.

II

I

FLOORS (MH)
IMAGB

Generates in-line code for IMAG function with fixed binary argument.

IMAGFD

Generates in-line code for IMAG function with fixed decirral
argument.

IMAGL

Generates in-line code for IMAG function with long floating-point
argument.

IM/,GS

Generates in-line code for IMAG function with short floating-point
argument.

LFARIN

Builds up function stack.

LFARIl

Continues scan for in-line functions.

LFCOM

Builds up argument stack.

LFDR

Unpacks dictionary reference of argument when argument triple found.

LFEOF2

Calls subroutines to generate in-line code.

LFEOF3

Depending on start of argument list, branches to produce in-line
code.

LFIGN
LFMOVE
LFSPEC
IREALB
L
__________________

248

~

~

I
II

~
II
II

I
I
I
Removes triple from text if inside an in-line function.
I
I
Moves generated code to output block.
I
I
Branches if IGNORE triple or not an in-line function.
I
I
Generates
in-line code for REAL function
with fixed binary argument. JI
__________________________________
__________________________________

Table MG1.

Phase MG Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
I Routine/subroutine I

I

Function

~------------------+--------------------------------------------------------------------~

IREALFD

IGenerate in-line code for REAL function with fixed decimal argument.

I

I

I
I

I

I

I

I

I

IREALL

IREALS
I
ISBGTNR
'rRUNCB (MH)
TRUNCD (MH)
TRUNCL (MH)
TRUNCS (MH)
UNSPEC (MH)

IGenerate
I argument.

in-lin~

code for REAL function with long floating-point

IGenerates in-line code for REAL function with short floating-point
I argument.

IGet next available symbolic register.

IGenerates in-line code for the function TRUNC with fixed binary
largument.

I

IGenerates in-line code for the TRUNC function with fixed decimal
largument.

I

IGenerates in-line code for the TRUNC function with long floatingIpoint arguments.

I

IGenerates in-line code for the THUNC function with short floatingIpoint argument.

I

IGenerates in-line code for the UNSPEC function.

I

IUTTEMP
a required amount of temporary__________________________________
work space.
l __________________ IGets
__________________________________
J
~

section 3: Charts and Routine Directories

249

Table MI.

Phase MI Pseudo-Code In-Line Functions 2

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

I
I Main Processing I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
Iscans text
IPHASE LA (SCAN) INone
I
~-----------------------------------+---------------+-----------------------------------~
IBuilds up function stack
ILFARIN
INone
I
~-----------------------------------+---------------+-----------------------------------~
IBuilds up argument stack
ILFCOM
INon~
I
~-----------------------------------+---------------+-----------------------------------~
IMove generated code to output blocklLFMOVE
IMV3 (LA)
I
~-----------------------------------+---------------+-----------------------------------~
IGenerates in-line code
ILFEOF2
IMAXB, MAXD, MAXL, MAXS, MINB, MIND, I
I
I
IMINL, MINS, MODB, MODD, MODL, MOGS,I
ROUNDD, ROUNDL, ROUNDS
LI ___________________________________ I _______________ IROUNDB,
_ __________________________________
JI
~

Table MIl.

~

Phase MI Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
LFARIN
Bu{lds uf function stack.
I
LFCOM

Builds uf argument stack.

LFEOF2

Calls subroutines to generate in-line code.

LFMOVE

Moves generated code to output block.

MAXB/MINB (MJ)

Generate code for MAX/MIN function with fixed binary arguments.

MAXD/MIND (MJ)

Generate in-line code for MAX/MIN function with fixed decimal
arguments.

MAXL/MINL (MJ)

Generate in-line code for MAX/MIN function with long floating-point
arguments.

MAXS/MINS (MJ)

Generate in-line code for MAX/MIN function with short floating-point
arguments.

MODE (MJ)

Generates in-line code for MOD function with fixed binary arguments.

MODD (MJ)

Generates in-line code for MOD function with fixed deciwal arguments.

MODL (MJ)

Generates in-line code for MOD function with long floating-point
arguments.

MODS (MJ)

Generates in-line code for BOD function with short floating-point
arguments.

ROUNDB

Generate in-line code for ROUND function with fixed binary argument.

ROUNDD

Generates in-line code for ROUND function with fixed decimal argument.

ROUNDL

Generate in-line code for ROUND function with long floating-point
arguments.

I ROUNDS
Generate in-line code for ROUND function with short floating-point
IL__________________ __________________________________
arguments.
_________________________________ _
~

250

I

I

I

I

I

I

I

I

I

eTable MK.

Phase MK Pseudo-Code In-Line Functions 3

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

I

Statement or Operation Type

~

I Main Processing I
I
Routine
I

I

Subroutines Used

I

I~-----------------------------------+---------------+-----------------------------------~
~scans

text

IPHASE LA (SCAN) INone

I

~-----------------------------------+---------------+-----------------------------------~
~Builds

up function stack

ILFARIN

INone

I

~-----------------------------------+---------------+-----------------------------------~

~Builds up argument stack
ILFCOM
INone
I
~-----------------------------------+---------------+-----------------------------------~
~Move generated code to output blocklLFMOVE
IMV3 (LA)
I
~-----------------------------------+---------------+-----------------------------------~
~Generates in-line code
ILFEOF2
IDIM, HBOUND, LBOUND, LENG~, SIGNFB,I
~
I
\SIGNFD, SIGNL, SIGNS, FREBIE
I
L ___________________________________ _______________ _ _________________________________ -J
~

eTable MK1.

~

Phase MK Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
Routine/Subroutine I

Function

I

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

DIM

FREBIF
HBOUND

IGenerates code for DIM function.

I

I

I

I

I

IGenerates code for FREE function.

I

JGenerates code for HBOUND function.

I

I

LBOUND

Generates code for LBOUND function.

I

LENGT

Generates code for LENGTH function.

LFARIN

Builds up function stack.

LFCOM

Builds up argument stack.

LFEOF2

Calls subroutines to generate in-line code.

LFMOVE

Move~3

SIGNFB

Generates code for SIGN function with fixed binary argument.

SIGNFD

Generates code for SIGN function with fixed decimal argun-ent.

SIGNL

Generates code for SIGN function with short floating point argument.

SIGNS

Generates code for SIGN function with short floating point argument .

generated code to output block.

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

Section 3: Charts and Routine Directories

251

Table ML.

Phase ML Pseudo-Code Calls and Functions

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

statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

~-----------------------------------+---------------+- ----------------------------------1

IScans text

IPHASE LA (SCAN) INone

I

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

IIdentifies argument of procedure
I invocation

I FPFNAR
I

INone
I

I
I

~-----------------------------------+---------------+- ----------------------------------oi

Iselects generic built-in function

IFPBIF

I FPARDl

~-----------------------------------+---------------+-

______ ___________________________ I
~

o~

Iselects
PL/I generic entry name
IFPGAR
FPARD3, GNSECO
L
___________________________________
_______________ IFPARD2,
_ __________________________________
.JI
~

Table ML1.

~

Phase ML Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------01
I Routine/Subroutinr I

Function

I

~------------------+---------------------------------- ----------------------------------of

FPAOl

Scans for next argument.

FPARDl

Obtains parameter descriptions relating to built-in function arguments.

FPARD2

Obtains successive parameter descriptions relating to the entry
description of a PL/I generic procedure.

FPARD3

Obtains and stacks full parameter description of a PL/I generic
procedure.

FPBIF

Selects generic built-in functions.

FPEPCO

Constructs an entry parameter.

I
!
I
FPGAR
Selects FL/I generic entry name.
I
I
GNFM2
IReplaces generic reference testing for uniqueness.
i
I
I
IGNSECO
entry in stack of parameter __________________________________
descriptions.
L__________________ IMakes
__________________________________
JI
FPFNAR

Identifies arguments of procedure invocations.

~

.Table MM.

Phase MM Pseudo-code Calls and Functions

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

I
I

Statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+-----------------------------------~

IScans text
IPHASE LA (SCAN) INone
I
~-----------------------------------+---------------+-----------------------------------~
IScans list, counts arguments and
ICFCALL
ICFARID, CFPBIR, CFFDVS, CFMVTR,
I
lidentifies storage class
I
ICFMVCD
I
~-----------------------------------+---------------+- ----------------------------------1

IRescans list and generates calling ICFCFSS
ICFARHA, CFCALP, CFBIFH, CFMLBR,
I
Isequence for library routine
I
ICF~VCD, CFNEST, UTTMPW, CFAIF1,
I
I ___________________________________ I _______________ I _BASED
L
__________________________________ JI
~

252

~

eTable MM1.

Phase

~M

Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

Function

~------------------+--------------------------------------------------------------------~

IBASED (MO)

I

I BEGIN

I

ICFALFl (MO)

I

ICFARHA

I

ICFARID (MO)

I

ICFBIFH

IGenerates relocation code for based variables.
Initializes phase.

Places address of invoked routine at the head of its argument list.
Generates calling sequence.
Counts arguments and

se~s

STATIC/AUTO flag.

Further built-in function identification with relevant parameter
setting.

CFB04

Restores previous environment.

CFB021

Tests nature of function found.

CFB036

Restores pointer to start of invocation.

CFCALL

Scans lists, counts arguments, identifies storage class.

CFCALP

Completes calling sequence and, if necessary, generates code to
initialize dope vector.

CFC03C

Tests for nested function.

CFCFSS

Rescans list and

CFEXIT

Transfer vector after first scan.

CFFBIR

Identifies built-in functions, sets parameters for calling sequence
generation.

CFFDVS (MN)

Reserves output text area for generation of code to initialize dore
vector when a function returns a string.

CFL06

Generates code to set up result dope vector.

CFL043

Generates code to place result address in

CFMLBR (MN)

Generates code to move a skeleton parameter list which is greater
than 256 bytes.

CFMVCD

Generates pseudo-code into the output text block.

CFMVTR

Generates triple into the output text block.

CFNEST

Handles a nested situation.

CFY007

sets parameters to produce special calling sequences.

UTTMPW (MN)

gene~ates

calling sequence for Library routine.

argu~ent

list.

IAllocates one word of workspace.

L__________________ L ___________________________________________________________________ _

Section 3: Charts and Routine Directories

253

eTable MP.

Phase MP Pseudo-Code BUY Reorder

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I

Statement or Operation Type

I

Routine

I

Subroutines Used

I

~-----------------------------------+---------------+-----------------------------------~

IMain
scan routine for phase
L
___________________________________

eTable MP1.

IMPl
ZDRFAB, ZTXTRF, ZUERR
_______________ ISCAN,
_ __________________________________
JI

~

~

Phase MP Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

~------------------+---------------------------------- ----------------------------------1

,

.

UT05

Adds SELL dictionary reference to SELL list if not already there.

MPl

Main controlling routine for rearranging BUY and SELL statements
involved in obtaining VDAs for adjustable length string temporaries.

MP3

Processes EOP triple.

MP4

Processes BUYS triple.

MP4A

Processes BUYX triple.

MP8

continues text scan if not string or arithmetic data, or not structure.

MP23

continues scan of text.

MP26

Processes BUYS triple.

MP27

Processes BUY ASSIGN triple.

MP28

Processes BUY triple.

MP29

Processes SUBSCRIPT triple.

MP30

Processes ASSIGN triple.

MP31

Accesses top stack entry.

MP86

Tests triple for BUYX, and processes.

MP87

Scans for BUYS, BUY, and SELL triples.

MP5

Processes SELL triple.

SCAN

General scan routine.

ZDRFAB

Converts dictionary reference to absolute address.

ZTXTRF

Changes absolute address to a text reference.

IZUERR
L
__________________

254

~

Releases control of phase.

Makes
error message entries.
__________________________________
__________________________________ J

Table MS.

Phase MS Pseudo-Code Subscripts

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

I
I

Statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

~-,----------------------------------+---------------+-----------------------------------~

IScans text

ISBSCAN

INone

I

~-,----------------------------------+---------------+-----------------------------------~

ICalculates element offset
I
I

ISBSTIH
I
I

ISBASS, SBCOBI, SBGNOR, SBMVCD,
ISBNEST, SBSUBP, SBSUDV, SBXOP,

I
I

IUTT~MP

I

~-,----------------------------------+---------------+-----------------------------------~

IChecks
subscript range
L
___________________________________

Table MS1.

ISBSBRN
INone
_______________ L
_ __________________________________ JI

~

Phase MS Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~

SBASS

Updates scan pointer over an assignment.

SBCOBI (MT)

Converts subscript to binary integer.

SBERR (MT)

Puts error message into dictionary.

SBGNOR (MT)

Allocates an odd sYffibolic register.

SBMVCD (MT)

Generates pseudo-code and moves it into output text block.

SBNEST (MT)

Handles nested subscript situation.

SBSBRN (MT)

Checks subscript range.

SBSCAN

Branches to LA for scan.

SBSTIH

Calculates element offset.

SBSUBI

Saves array name.

SBSUBP (MT)

Handles end of subscript list.

SBSUDV

Generates code to set up the dope vector of an array of adjustable
strings.

SBS05

Generates code to mUltiply subscript by multiplier.

SBS06

compiles code to convert to fixed binary.

SBSOO2

Checks for occurrence of subscript.

SBS029

Generates code to multiply subscript by 4 or 8.

SBTRID

Scans for comma, subscript prime, or subscript triple.

SBXOP (MT)

Handles special index feature.

SCAN

Controlling scan of text.

(MT)
L UTTEMP
__________________

~

Allocates
workspace.
__________________________________
_________________________________ _

section 3: Charts and Routine Directories

255

Table NA.

Phase NA Pseudo-Code Branches, ON, Returns

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

/
/ Main Processing /
/
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
/Initializes text block
INAINIT
/SCINIT (LA)
I
~-----------------------------------+---------------+- ----------------------------------i

IScans text for next triple of
/NASC1, NASC2,
/SC1, SC2, SC3 (all in LA)
I
I interest to user
I NASC3
I
I
~-----------------------------------+---------------+-----------------------------------.~
IProcesses STOP statements
ISTOP
INAUTl
I
r-----------------------------------+---------------+- ----------------------------------~

IProcesses EXIT statements
IEXIT
INAU~l
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses IF statements
IIF
INAUTD, NAUT16, NAUT21, ZSTUTl
I

r-----------------------------------+---------------+-----------------------------------·1
IProcesses ON statements

ION

INAU1D, NAU16, NAUT16, SC5 (LA)

I

r-----------------------------------+---------------+------------------------------------1

IProduces Library call at end of
leach PROCEDURE or BEGIN block in
Isource text

IPROCP, BEGINP
/
I

INAUTl

I
I
1

1

1

r-----------------------------------+---------------+------------------------------------,
IProcesses RETURN statements

IRETURN

INAUTl

I

~-----------------------------------+---------------+- -----------------------------------1
IProcesses function RETURN stateINA3002
INAU~B, NAUTCA, NAUT1, NAUT12
1
Iments for one data type
1
I
I
~-----------------------------------+---------------+- -----------------------------------1

/Processes function RETURN stateIments for more than one data type
1

INA3013
I
I

/NAUTA, NAUTB, NAUTCA, NAUTD, NAU~F, 1
INAUT1, NAU~7, NAUT8, NAUT9, NAUTll, I
I NAU'I12
I

r-----------------------------------+---------------+- ----------------------------------~

IProcesses GO TO statements

IGOTO

INAUTD

1

r-----------------------------------+---------------+- ----------------------------------~

/Processes GOLN triples

IGOLN

I

INAUTD

~-----------------------------------+---------------+- ----------------------------------1

IProcesses GOOB statements

IGOOB

INAUT5, NAUTD, NAUT16, SC5 (LA)

I

t-----------------------------------+---------------+-----------------------------------1
IProcesses SIGNAL statements
I

I SIGNAL
I

INAUTD, NAU~6, NAUT16,
/NAUT10, NAUT21

NAU~8,

I
~

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

IProcesses
REVERT statements
IREVERT
SC5 (LA)
L___________________________________
_______________ LINAU1D,
_ __________________________________
Jl
~

256

Table NA1.
Phase NA Routine/Subroutine Directory
r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~.------------------+--------------------------------------------------------------------~

EXIT

GOOB
GOTO
GOLN
IF
NAINIT

IProcesses EXIT statements.

I

IProcesses GOOB statements.

I

IProcesses GO TO

staterr~nts.

I

IProcesses GO TO label number (GOLN) triples.

I

IProcesses IF Statements.

I

IInitializes text blocks.

NASC1/NASC2/NASC3

Scan text

NAUTA

Generates pseudo-code to test switch value at RETURN (function
value) statement for more than one data type.

NAUTB

Generates assignment triple to

NAUTCA

Generates assignment triple set up by NAUTB.

NAUTD

Generates indicated pseudo-code.

INAUTF
L
__________________

f~r

next triple of interest to user.

RETU~N

function result.

IGenerates
pseudo-code to branch to __________________________________
L~U v~lue.
__________________________________
J

~

Section 3: Charts and Routine Directories

257

Table NA1.

Phase NA Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
NAUTl
IGenerates call to indicated library routine.
t

NAUT2
NAUT5

I

I

\Makes dictionary entry tor indicated library routine.

NAUT6

I

f

IMoves indicated pseudo-code, deletes current triple, continues text I
Iscan.
I

I

I

I

Updates current symbolic register value.

J

J

NAUT7

On entry, register BR points at an 8ntry label dictionary entry. OnJ
normal exit from the routine, register BR points at the next label I
dictionary entry. Abnormal exit indicates that there are no furtherl
labels on the current PROCEDURE or ENTRY statement.
I

NAUT8

Bump EQU* value for branch pseudo-code item.

NAUT9

Bump return switch value to be used for current entry lacel.

NAUT11

For current entry label, generate appropriate EQU* pseudo-code item.

NAUT12

Converts current label dictionary reference to an absolute address.

NAUT16

Converts dictionary reference of tri~le second operand to absolute
address, loads address into register BR.

NAUT17

Makes dictionary entry for maximum negative number.

NAUT18

Makes indicated dictionary entry.

NAUT21

Generates pseudo-code to compare source tit string, making library
comparison routine dictionary entry, if necessary.

NAll00

Tests for SNAP.

NAl140

Using NAUTD, generates code for ON-units.

NA3002

Processes function RETURN statements for one data type.

NA3005

Outputs assignment triple.

NA3013

Processes function RETUHN statements for more than one data type.

NA8003

Generates pseudo-code for branch and mask, labels.

NA801D

Converts ID to bit-string.

NA8012

outputs pseudo-code.

ON
PROCP/BEGINP
RETURN
REVERT
SIGNAL
STOP

I
I

Compares bit-string to zero.

Processes ON statements.
\

IProduce Litrary call at end of each procedure in source text.

I

IProcesses RETURN statements.

\

\Processes REVERT statements.

I

\Processes SIGNAL statements.

I

IProcesses STOP statements.

I

IZSTUTl
Istring utility in Phase LV to provide a dope vector for a specified
IL__________________ Istring.
__________________________________ - ________________ ________________ J
~

258

~

.Table NG.

Phase NG Pseudo-Code Operating System Services

r------------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I

Statement or Operation Type

I

Routine

I

Subroutines Used

I

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

IProcesses ALLOCATE triples for
Ibased variables

IALOCAT
I

ICALIB, FALUTl
I

I
I

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

IProcesses DELAY triples

IDLAY

ICALIB, INTEG, SCAN (LA)

I

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

IProcesses DISPLAY triples
I

IDSPY
I

ICALIB, CHAR, ENDLST,
I SCAN (LA), STeRAD

I

I

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

IProcesses FREE triples for based
Ivariables

IFREE
I

ICALIE, FALUTl
I

I
I

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

IProcesses
WAIT triples
IWAIT
L.
___________________________________
_______________ LICALIB,INTEG,SCAN(LA},OPLAST
___________________________________ JI
~

.Table NG1.

Phase NG Routine/Subroutine Directory

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Function
I

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

CALIB

Generates part of calling sequence and makes dictionary entry for
Library routine.

CHAR (NH)

Converts a given argument to character string.

I
I

I

I

I

DLAY

Processes DELAY triples.

DSPY

Processes DISPLAY triples.

DSPY3

Tests that operand is character variable.

DSPY4

Makes dictionary entry for parameter list.

DSPY10

Scans for REPLY option.

ENDLST

Completes parameter list and makes dictionary entry for it.

FALUTl

Examines argument of ALLOCATE or FREE triples to see if variable is
based and forms RDV in workspace to Frepare for call to the library.t

INTEG (NH)

Converts a given argument to an integer.

NGO

Scans to next triple.

OPLAST
L STORAD
__________________

I

Builds up parameter list in workspace.
~

I
I
I
I

I

I
Stores
an address in a parameter list.
____________________________________________________________________
JI

Section 3: Charts and Routine Directories

259

.Table NJ.

Phase NJ Pseudo-Code RECORD I/O

r-----------------------------------T---------------T-----------------------------------,
1
IMain Processingl
I

I
Statement or Operation Type
I
Routin~
I
Subroutines Used
I
~-----------------------------------+---------------+-------------------------~---------1
IInitialize Phase NJ by calling in
ISTRTNJ
IZLOADW (AA), SCINIT (LA), SC1 (LA) I
Iblock NK and initializing SCAN
I
1
I
lutility
I
I
I
~-----------------------------------+---------------+------------------------------------1
IInitializes switches and flags to
INUSTAT
I TXTEST
I
lindicate start of new statement.
I
I
I
IDetermines RECORD-oriented I/O verbl
I
I
land goes to appropriate routine
I
I
I
~-----------------------------------+---------------+------------------------------------1
IGets next triple of interest,
ISCNOPT
ISC3 (LA), TXTEST, SCAN01, CMPERR
I
Iconverts to internal code and sel- I
I TXTERR, ZABORT (AA)
I
lects the appropriate routine to
I
I
I
I process it
I
I
I
~-----------------------------------+---------------+----------------------------------_.\

IProcesses FILE option of RECORDIFILOPT
I TXTARG, DYNMPL, LAONLY, STDROP,
I
loriented I/O by placing dictionary I
ICMPERR, TXTERR, WRKSPC, MVPSCD,
I
Ireference of FILE Declare DCB in
I
IZTXTRF (LA), SYMREG, MV3 (LA)
I
Ithe appropriate slot of the param- I
I
I
leter list. The parameter list is
I
I
I
lin STATIC if file constant, WORKI
I
I
I
1
I
ISPACE if file parameter
~-----------------------------------+---------------+----------------------------------_.\
IEstablishes the record dope vector IINTFRM
ITXTARG, CMPERR, DYNMPL, LAONLY,
I
I (RDV) for the triple operand and
I
ISTDROP, LAOSM2, CRDV, TXTERR,
I
Iplaces the address in the second
I
IZABORT (AA), WRKSPC, MVPSCD, TXTRF,I
Islot of the parameter list unless
I
ISYMREG, ZD~FAE (AA), CALLIB,
I
Ithe operand of the INTO triple is
I
IZDICRF (AA), REFRDV, SCALAR,
I
IA varying string, in which case it I
IPNTRDR, BSDRDV
I
Iplaces the address of the string
1
I
I
Idope vector of the operand in the
I
I
I
slot in the parameter list. I _______________ I ___________________________________ JI
lIsecond
___________________________________
~

260

~

Table NJ.

Phase NJ Pseudo-Code RECORD I/O (cont'd)

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
t------------------------·-----------t---------------t -----------------------------------~

Iprocesses the operand of the
LOCOPT
ILOCATE triple by establishing the
IRDV for the triple operand and
Iplacing this address in th~ second
Islot of the parameter list.
It
lestablishes the pointer qualifier
lof the based variable and saves
Ithis, either to be used, or tc be
loverwritten by the operand of a SET
Itriple. It establishes a compiler
Ilabel and puts this in the third
Islot of the parameter list in ~rder
Ito tell the library where to
Ireturn, so that code assigning the
Ipointer value returned in the RDV
Ito the saved pointer operand is
I avoided. It then initializes the
Ibased variables just allocated

I

ZDICRF, PNTRDR, SCALAR,
LOCRDV, CMPERR

TX~ARG,

I

t-----------------------------------t---------------t- ----------------------------------~

IProcesses KEYTO option of RECORDloriented I/O by verifying that its
largument is a character string,
Ithen placing it in the appropriate
Iparameter list slot, which may be
lin STATIC or WORKSPACE

I TXTARG, SCALAR, DYNMPL, LAONLY,

IKYTOPT
I
I
I
I
I

I
I
I
I
I

ISTDkOP, NXTMPD, ZSTUT2 (S~RUT2 in
ILV), LAOSM2, LAOSM1, TXTERR,
IZD~FAB (AA), SC5 (LA), WRKSPC,
IMVPSCD, MV3 (LA), SYMREG
I

I

t-----------------------------------t----~----------t-----------------------------------~

IProcesses the KEY or KEYFROM optionlKEYOPT
lof RECORD-oriented I/O by
I
Iconverting the argument to a char- I
lacter string if it is not already al
Icharacter string and placing the
I
Iresult in the appropriate parameter I
Ilist slot; this is either in STATIC I
lor WORKSPACE
I

ITXTARG, SCALAR, DYNMPL, LAONLY,
I
NXTMPD, ZSTUT1 (STRUT1 in
I
ILV), LAOSM1, LAOSM2, TMPSEL, TXTERRI
I
I
I
I
I
I
I
I
I
I

~STDROP,

t-----------------------------------t---------------t- ----------------------------------~

IProcesses the IGNORE option of
IIGNOPT
IRECORD-oriented I/O by first
I
Ichecking that the argument is a
I
Iscalar and then converting to a
I
Ibinary fixed integer if it is not
I
lalready a binary fixed integer.
I
IThe address of the argument is
I
Iplaced in the appropriate parameter I
Ilist slot in STATIC or WORKSPACE
I

I TXTARG,
ILAONLY,
I MVTRPL,
ICMPERR,
IWRKSPC,
I
I
I
I

SCALAR,
STDROP,
LAOSM1,
TMPREF,
SYMREG,

CINTEG, DYNMPL,
MVPSCD, WRKSPC,
ZDRFAE (AA),
NXTMPD, MV3A (LA),
MV3 (LA)

I
I
I
I
I
I
I
I
I

t-----------------------------------t---------------t- ----------------------------------~

~

~

IProcesses the event oftion of
I EVTOPT
I TXTARG, DYNMPL, LAONLY, STDROP,
I
IRECORD-oriented I/O by checking
I
I NXTMPD, TMPREF, TXTERR, WRKSPC,
I
Ithat the argument is a scalar EVENT I
IMVPSCD, ZTXTRF (LA), SYMREF,
I
Ivariable and placing its address inl
IMV3 (LA)
I
Ithe appropriate parameter list
I
I
I
Islot. The parameter list is either I
I
I
lin STATIC or WORKSPACE, depending
I
I
I
lupon the storage class of the argu-I
I
I
Iment.
L___________________________________ I _______________ I _ __________________________________ JI

section 3: Charts and Routine Directories

261

Table NJ.Phase NJ Pseudo-Code RECORD I/O (cont'd)

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
1
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------·t

IProcesses the pointer operand of a ISETOPT
ISET triple.
If part of a READ
I
I statement, the address of the poin-I
Iter variable is placed in the sec- I
lond slot of the parameter list.
Ifl
Ipart of a LOCATE statement, the
I
Ipointer operand overwrites the
I
Ipointer taken from the based varia-I
Ible in the LOCATE statement, to be I
lused in the pointer assignment codel
Iproduced by ENDIO.
I

ITXTARG, SCALAR, NXTMPD,
ITMPREF, STDROP, TXTERR
I
I
I
I
I
I
I
I

I

DYN~PL,

1

I

I
I

I

I
I

I
I
I
I

~-----------------------------------+---------------+------------------------------------1

At end of I/O statement, places
IENDIO
REQUEST_CODE (i.e.
IODEF) in sta- I
tic constant chain, puts STATIC
I
parameter list in STATIC chain.
Creates external Library calling
sequence for RECORD-oriented I/O
statement as follows:
EPRM
LA
1, PARM.LIST
L
15, RECORD.IO.LIBRARY.ROUT
BALR 14,15
EPRM

IZDICRF (AA), LAONLY, LAOSM1,
1
ICALLIB, MVPSCD, ZTXTAE (AA), SELL, 1
ISC3 (LA) SYMREG, TMPREF,
1
IZDRFAB, MVTRPL, RCBCMN
L
I
I
I

I
I
I
I

If there is a WORKSPACE parameter
list, it updates the MVC or parameter list from STATIC to WORKSPACE.
It checks whether a LOCATE statement is being processed, for which
it generates pseudo-code to assign
the pointer value from the RDV to
the pointer variable and to initialize the REFER variable of a
self-defining structure.
It generates an allocate triple to indicate
possible initialization of TASK
and/or EVENT variables, and a compiler label triple to mark the end
of initialization code for the
library.
It generates any SELL
triples accumulated throughout the
Istatement on SELL chain.
It canIcels the RECORD-oriented I/O option
Itriple codes from the SCAN TRT
I interest table. It gets the next
Itriple of interest and goes to
INUSTAT to process as a new statelIment.
___________________________________ L _______________ L ___________________________________ JI

262

Table NJ.

Phase NJ Pseudo-Code RECORD I/O (cont'd)

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

I
I

statement or Operation Type

IMain Processingl
Routine
I

I

Subroutines Used

I
I

~---------------~--------------------+---------------+-----------------------------------~

IIndicates presence of NOLOCK
I option.

INLKOPT
I

INone

I

I
I

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

IDelete the SELL triple encountered ISELL routine
Iduring scan of RECORD-oriented
lat SVSELL or
11/0 statement but puts dictionary
ITMPSELL entry
Ireference in the SELL chain so thatlpoint
I
ISELL triple can be regenerated at
lend of I/O statement
I

IZDHFAB (AA), MV3A (LA)

I

1

1

1

I
I

I

I

I

I

I

~------------------------------------+---------------+-----------------------------------~

IAt end of program, releases own
IPRGEND
IRLSCTL
I
Imodules and turns control over to I
I
I
requested phase.
I _______________ I _ __________________________________ JI
LInext
___________________________________
~

~

Section 3: Charts and Routine Directories

263

.Table NJ1. Phase NJ Routine/Subroutine Directory

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

I Routine/Subroutine I

~------------------+--------------------------------------------------------------------1
BSDRDV(NK)
Entry point to CRDV routine which warks it as processing a based
variable in an INTO or .FROM option.

CALLIB

Creates pseudo-code to call library routine; indicates call in dictionary if not previously noted.

CINTEG

Checks whether argument is a binary fixed integer.

CMPERR

Indicates compiler error and ABORT, error code in HOLD register.

CRDV (NK)

Constructs a record dopt vector (RDV) entry in WORKSPACE. If the
dope vector descriptor bit is on, then the routine generates a
library call to generate the RDV.
If the variable has static
extents and is not a string, the RDV is constructed froIT information
in the RDV dictionary entry.
If the variable is a string, then the
RDV is constructed from its string dope vector.

DEFER

Indicates compiler error in the case of a deferred feature not
detected by earlier phase.

I
I

DELETE

Establishes DELbTE code as REQUEST_CODE.

DYNMPL (NK)

I
I
I

Establishes a parameter list in workspace if one is not already
established. Calculates workspace offset to particular slot
I
requested. Establishes a symbolic working register.
Establishes
I
skeletcn pseudo-code for LA, ST, and DROP of register into workspace I
offset.
I

ENDIO

handles operations at end of I/O statement.

J

EVTOPT

Processes EVENT option.

II

FILOPT

Processes FILE option.

I

IGNOPT

Processes IGNORE option.

II

INTFR~,1

Processes INTO/FROM option.

I

KEYOPT

Processes KEY or KEYFROM option.

LAONLY (NK)

Outputs pseudo-code for LA into symbolic work register of a dictionary reference without any offset modifiers.

I
I

(Not implemented in second version.)

I

I
I
I

I

~
II

I,

LOCRDV (NK)

Entry point to CRDV routine which marks it as processing a based
variable of a LOCATE statement.

KYTOPT

Processes KEYTO option.

LAOSMl (NK)

Establishes pseudo-code for a LA instruction into a symbolic work
register wit.h the address of WORKSPACE and a literal offset which is
pointed to the argument register.

LAOSM2 (NK)

Generates LA pseudo-code in which both base and offset are in registers.

MVPSCD (NK)

Puts pseudo-code asstmbled in pseudo-code area into output text
block.

MVTRPL (NK)

Invokes SCAN utility to move generated triples into output text
block.

I

I
I
I
I
I

I
I

INLKOPT
presence of NOLOCK option.
L
__________________ L Indicates
____________________________________________________________________
J

264

.Table NJ1.

Phase·NJ Routine/Subroutine Directory (cont'd)

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Functlon
I
~.------------------+--------------------------------- -----------------------------------1
~USTAT

IHandles operations at start of new statement.

I

I

I

IInvokes SCAN utility to get next triple, which
lit is a TMPD; if ~ot, it is an error.

~XTMPD

i~

checked to see if I

I
I

I

PNTRDR

IEstablishes the seven-byte pointer information slot in
able dictionary entry.

PRGEND

d

BASED vari-I

I
I

Releases control to next phase at end of program.

I

I

RCBCMN

Commons the dictionary entries of request code blocks.

REAC

Establishes READ code as REQUEST_CODE; establiShes
size.

REFRDV (NK)

Establishes the address of the RDV dictionary entry in the ARG register when given the data variable dictionary address in IND~l.

REWRIT

Establishes REWkITE code as REQUEST_CODE.

SCALAR

Confirrrs that dictionary code byte refers to scalar item; ascertains
whether item is a constant.

SCANOl

Indicates compiler error in the case of a deferred feature not
detected during Read-In.

list

I

IGets next triple of ipterest, branches to afpropriate routine.

tSCNOPT

I

I

I
I

I

ISearches options, inserts RECORD-oriented I/O option entries into
ISCAN TRT interest table.

ISCRHOP

/SELL (NK)
STDROP (NK)

IGenerates SELL triples for all dictionary references in the SELL
Ichain.

I

10utputs fseudo-code to ST contents of symbolic work register into
Iparameter list slot in workspace set up ty DYNMPL, and the drop of
the syrrbolic register.

STRTNJ
SY~REG

pararr~eter

Initializes phase.
Establishes sYffiDolic work register.

(NK)

TMPREF (NK)

Generates the appropriate LA pseudo-code to load the address of the
temporary described by TMPD.

TMPSEL (NK)

Adds "temporary entry to SELL chain for generation of SELL triple
upon completion.

TXTARG

Proce:3ses second argument of triple.
If dictionary reference, establishes absolute address in INDX1.
Returns to LR if zero, i.e.,
TEMP, LR+4 if dictionary reference.
If null, indicates compiler
I
error.
I

TXT ERR

Writes error message.

TXTEST

Converts function code of triple interest TRT table to internal key,1
and invokes PRG£ND if end of program is indicated.
I

UNLOCK
WRITE

I
I
I

IEstablishes UNLOCK code as REQUEST CODE.
Iversion.)

I

(Not implemented in secondl

I

IEstablishes WRITE code as REQUEST CODE.

I

I
I
I
I
I

IWRKSPC (NK)
IEstablishes the requested workspace brea, starting on fullword
IL __________________ Iboundary.
__________________________________ __________________________________ JI
~

Section 3: Charts and Routine Directories

265

Table NM.

Phase NM Pseudo-Code Executable I/O

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

I

Statement or Operation Type

IMain Processingl
Routine
I

I

I

Subroutines Used

I

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

IProcesses GET and PUT statements

I

I
I

IGET
I
I

I INSERT, STORAD, INSTFL, GENPC,
IGENTR, MVTRSP, BNDLST, CALlE,
ICHAR, INTEG, UTTMPW, SRCERR,
ISCAN (LA), STRUTi (LV), STRUT2 (LV)

I

I
I
I
I

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

IProcesses OPEN and CLOSE statementslOPEN
I INSERT, STORAD, INSTFL, GENPC
I
I
I
IGENTR, MVTRSP, ENDLST, CALlE,
I
I
I
ICHAR, INTEG, UTTMPW, SRCERR,
I
I
I
ISCAN (LA), STRUTi (LV), STRUT2 (LV)I
L ___________________________________ _______________ _ __________________________________ J
~

Table NMi.

~

Phase NM Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

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

CALIB (NN)

Generates part of calling sequence and makes dicticnary entry for
Library routine.

CHAR (NN)

Converts a given argument to character string.

ENDLST (NN)

Corrpletes parameter list and wakes dictionary entry for it.

GENPC (NN)

Moves

GENTR (NN)

Moves generated triples to output.

GET

Processes GET and PUT statements.

GETOO

Initializes switches for GET/PUT.

GET20

PAGE option.

GET85

Processes end of I/O statement.

INSERT (NN)

Inserts dictionary reference in pararr,eter list.

INSTFL (NN)

Inserts file reference in parameter list.

INTEG (NN)

Converts a given argument to integer.

MVTRSP (NN)

Moves data and format list triples to output.

NMRi

Begins scan for triples of interest.

OPEN

Processes OPEN and CLOSB statements.

OPENOO

Initializes switches for OPEN/CLOSE.

SRCERR (NN)
STORAD (NN)
(NN)
L UTTMPW
__________________

266

~seudo-code

to output.

IMakes error dictionary entry.

I

IGenerates pseudo-code to store symbolic register in parameter list.

I

10btains
temporary workspace.
__________________________________
__________________________________ J

~

Table NT.

Phase NT Pseudo-Code Data and Format

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

I
I

IMain Processingl
I
Routine
I

statement or Operation Type

I
I

Subroutines Used

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

IInitializes phase, obtains scratch IN'TOOOO
I storage
I

INone
I

I
I

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

IScans text

INT0003
I

I

INTOOll, NT0014, NT0017, NT0021,
INT0023, NT0024, SC2 (LA)

I
I

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

ICollects remote format items and
Isaves until end of block

INTOOll
I

I

INone
I

I

~.-----------------------------------+---------------+-----------------------------------~
IN~UT10

IAssociates remote format items withiNT0014
I data list items
I

I

I
I

t·-----------------------------------+---------------+ -----------------------------------~

IMakes entries for Library routines INT0017
INTUT20
I
Irequired for EDIT-directed I/O and I
I
I
Icopies skeletons for phase NU into I
I
I
Iscratch storage, then releases
I
I
I
Iphase
I
I
I
~------------------------------------+---------------+-----------------------------------~
IIdentifies type of data list item
INT0021
INonE
I
land enters the type code in a list I
I
I
~-----------------------------------+---------------+-----------------------------------~
IAssociates format and data list
INT0023
INTU~10
I
litems and marks INCLUDE matrix
I
I
I
~-----------------------------------+---------------+- ----------------------------------i

IIdentifies type of format list itemiNT0024
land enters the type code in a list I

INone
I

I
I

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

Isets bits in INCLUDE matrix to
Irepresent STREAM I/O conversion
Irequirements at execution time

INTUT10
I
I

INone
I
I

I
I
I

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

IMakes dictionary entry for Library INTUT20
INone
I
IL___________________________________
Routine
I
I
I
L _______________ L ___________________________________ J

Table NT1.

Phase NT Routine/Subroutine Directory

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

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

NTOOOO

Initializes phase, obtains scratch storage.

NTOOOl

Initializes phase address slots.

NT0003
NT0011
NT001L~

NT0017
INT0021

I

INT0023

I

INT0024

I

INT1700

I
I NTUT10
I

INTUT20

I

I

Scans text.

I

collects remote format items.
Associates remote format items with data list items.
Makes entries for Library routines for EDIT-directed I/O.
Identifies types of data list items.
Associates format and data list items.
Identifies types of format list items.
No EDIT-directed I/O, therefore no scan pass.
Sets bits in

I
I

IN~I"UDE

matrix.

Makes dictionary entry for Library routine

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

L__________________ L ____________________________________________________________________ J

Section 3: Charts and Routine Directories

267

Table NU. Phase NU Pseudo-Code Data and Format Lists

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

IMain Processingj
I
Routine
I

Statement or Operation Type

Subroutines Used

I
I

~-----------------------------------t---------------t------------------------------------~

IGenerate Library calling sequences INU0022
Ifor data items in DATA-directed 1/01
I statements
1

IINSERT,UT24,UTii,UT23
I
I

I
I
I

r-----------------------------------t---------------t- -----------------------------------~

IGenerate Library calling sequences INU0023
Ifor data items in LIST-directed 1/01
I statements
I

IINSERT,UTii,UT25,UT14,UT23,UT09
I
I

I
I

I

~-----------------------------------t---------------t------------------------------------~

IGenerate code for data items in
IEDIT-directed I/O statements

INU0024

IUT09,14
I

1

I
I

r-----------------------------------t---------------t- ----------------------------------~

IScan text

INU0002

ISC1(LA),SC2(LA),SC3(LA)

I

~-----------------------------------t---------------t------------------------------------~

~

~

IGenerate Library calling sequences INU0029,NU0030
IUT15,UT18,ECDCNV,UT10
I
Ifor format list items
INU0033,NU0037, I
I
1L ___________________________________ I NU0050
_______________ I _ ___________________________________ JI

Table NUl. Phase NU Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------t---------------------------------------------------------------------~
BCDCNV (NV)
IConvert decimal constant to binary.
INSERT

I

IAdd an entry to an argument list.

NUOOO2 (NV)

Scan text.

NUOO22

Generate Library calling sequence for DATA-directed data list itew.

NUOO23

Generate Library calling sequence for LIST-directed data list item.

NUOO24 (NV)

Generate cards for EDIT-directed data list item.

NUOO29 (NV)

Generate Library call for A or B format item.

NUOO30 (NV)

Generate Library call for E or F format item.

NUOO33 (NV)

Generate code for R format item.

NUOO3? (NV)

Generate Library call for P format item.

NUOOSO (NV)

Generate Library call for X, PAGE, ShIP, LINE, C, or COLUMN format
item.

UT09

Make dictionary entry for constant in EDIT or LIST list.

UT10

Convert a constant entry to one of specified type.

UTll

Generate Library calling sequence passing argument list.

UT14

Generate code for intermediate result items in EDIT and LIST data
lists.

UT15
UT18 (NV)
UT23
UT24

I

IMake dictionary entry for FED or DED.

I

IGenerate an assignment triple.

I

IGenerate Library call code.

I

IConstruct symbol table dictionary entry.

I

IL__________________
UT25
I Set
bit in the INCLUDE matrix.
__________________________________
__________________________________.JI
~

268

Table OB.

Phase OB Pseudo-Code Compiler Functions

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

Statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

~-----------------------------------+---------------+-----------------------------------~

IScans text for BUY, BUY ASSIGN
Istatements and compiler function
land compiler pseudo-variacles (see
IAppendix 0.8), and transfers to
lappropriate routine

ISTl
I
I
I
I

ISCAN (LA)
I
I
I
I

I
I
I
I
I

~-----------------------------------+---------------+-----------------------------------~

IReplaces MTF compiler functions
I (Appendix D.8) by pseudo-code move
Icharacter instructions, adjusting
Ithe target field to controlled or
Itemporary type 2 workspace where
Inecessary

IMTFR
IEUFIZE, FRSTOP, se3 (LA)
I
I
' I
I
I
I
I
I
I

I
I
I
I
I
I

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

IReplaces ADV compiler functions
I (Appendix D. 8) by pseudoo-code
linstructions to load specified
lelement of a dope vector into a
I register

IADVR
ISC3 (LA)
I '
I
I
I
I
I '

I
I
I
I
I

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

IReplaces SDV compiler functions

ISDVR
I
jload the waximum length from a
I
Istring dope vector into a register I

ISC3 (LA)
I
I
I

I (Appendix D.8) by instructions to

I
I
I
I

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

IReplaces compiler pseudo-variable
Itriples and compiler assignment
Itriples by pseudo-code instructions
Iwhich store the value assigned in
,specified part of dope vector

IBUFIZE, S~ACK, MV3A (LA), FRSTOP,
IDROPRG, USTACK, SC5 (LA)
I
I
I

IST4
I
I
I
I

I
I
I
I
I

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

IRemove BUY, BUY ASSIGN, and SELL
IST8, ST10, ST7 ISC2, SC3 (both in LA)
Istatements for scalar nonI
I
ladjustable temporary variacles froml
I
Ithe text, and allocate storage in
I
I
Ithe pseudo-code workspace for the
I
I
,t,emporaries
I
I

I
I
I
I

I

I

~-----------------------------------+---------------+-----------------------------------~

IGenerates code to drop a symbolic
Iregister, or mark a literal
Iregister not wanted

IDROPRG
I
I

INone
I
I

I
I
I

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

Determines whether the target dic- IFRSTOP
tionary reference of MTF function, I
or ADV or SDV pseudo-variacle is
I
controlled or a temporary type 2.
I
If it is, the dictionary reference I
is replaced by the dictionary ref- I
erence of the controlled or temI
porary type 2 workspace, with the
I
appropriate offset, if the target
I
is a structure base element
I
stack and unstack the information
,STACK, USTACK
specifying the target field of
I
compiler pseudo-variable assignment I

ISETDVF
I
I

I

I

I

I
I
I
I
INone
,
I

.-----------------------------------+---------------+-----------------------------------i
ICalculates the offset of the dope
Ivector of a structure base element
I from the start of the structure
Idope vector

ISETDVF
INone
I
I
I '
I
I

I
I
,
I

~-----------------------------------+---------------+------------------------~----------~

IPlace triples from the source text IBUFIZE
ISC5 (LA)
I
lin
an internal buffer.
I _______________ LI _ __________________________________ JI
L
___________________________________
~

Section 3: Charts and Routine Directories

269

Table OBi.

Phase OB Routine/Subroutine Directory

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

IRoutine/Subroutinel
Function
I
~------------------+--------------------------------------------------------------------~
ADVR
Replaces ADV compiler functions by pseudo-code instructions to load
the specified element of a dope vector into a register.
AT7

Generates pseudo-code.

AT8

Replaces operand by workspace reference.

BUFIZE

Places triples from the source text in an internal buffer.

BY5

Tests length of string.

BY19

Processes string temporary (dope vector only).

DROPRG
FRSTOP
MTFR

Generates code to drop a symbolic register or IT.ark a literal reglister not wanted.

I

IReplaces the target field of MTF fUnction or compiler pseudoIvariable by controlled workspace where necessary.

I

IReplaces MTF compiler functions by pseudo-code move character
I instructions.

SDVR

Replaces SDV compiler functions by pseudo-code instructicns to load I
the maximum string length into an object register.

SETDVF

Calculates the offset frow the start of a structure dope vector to
the dope vector of a particular base element.

STACK/USTACK

Stack and unstack information specifying target field of compiler
pseudo-variable aSSignment.

STl

Scans text for BUY and BUY ASSIGN statements, compiler functions,
and corrpiler pseudo-variables.

ST4, ST6

Replaces compiler pseudo-variables and compiler assignment triples
by pseudo code instructions to set the aSSigned expressicn, converted if necessary in the specified part of a dope vector.
I

I

ST7,ST8,ST10

Remove BUY, BUY ASSIGN, and SELL statements for fixed scalars froIT
I
Ithe text, and allocate space for the temporary variables in the
I
workspace.
L __________________ Ipseudo-code
__________________________________
__________________________________ JI
~

270

eTable 00. Phase OD Pseudo-Code Assignment

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

I

I

statement or Operation Type

IMain Processingl
I
~outine
I

I

Subroutines Used

I

~-----------------------------------+---------------+-----------------------------------~

IGet block of scratch core

ISCRCOR

INone

I

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

IMove routines, constants and tableslMOVTAB
INone
I
I _______________ I _ __________________________________ JI

block
lIto
___________________________________

eTable OD1.

~

~

Phase OD Routine/Subroutine Directory

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

I Routine/Subroutine I

Function

I

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

18CRCOR

10btains block of scratch core.

I

I

I

I
routines, tables and constants
into scratch core.
I
lI MOVTAB
__________________ IMoves
__________________________________
__________________________________
J
~

section 3: Charts and Routine Directories

271

Table OE.

Phase OE Pseudo-Code Assignment

r-----------------------------------T---------------T-----------------------------------'1
I
I

statement or Operation Type

\Main Processingl
I
Routine
I

I

Subroutines Used

I

~-----------------------------------+---------------+- ----------------------------------·i

IGenerates pseudo-code for assignIment triples

IASSOO
I

IASCOO, ASCDOO, ASDROP
I

I
I

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

IGenerates Library calling sequenceslALLOC, FRE~,
ICALlB
I
Ifor ALLOCATE, FREE, BUY, and SELL
IBUY, or SELL
I
I
I triples
L
___________________________________ I _______________ LI _ ___________________________________I1
~

.Table OE1.

Phase OE Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------1
I Routine/Subroutine I

Function

I

~------------------+---------------------------------- ----------------------------------1

ALLOC (OF)

Processes ALLOCATE triples.

ASCOO

Inserts target types for constants.

ASCDOO

Controls assignment of real and complex data.

ASDROP

Drops symbolic registers.

I
I
I
I
I
I
I

ASFBOO

Generates code for fixed binary assignments.

I

ASFDOO (OF)

Generates code for fixed decimal assignments.

I

ASFLOO

Generates code for floating-point assignments.

ASLOO

Generates code for label assignments.

ASPOOO

Generates code for pointer/offseL assignrr.ent.

ASAROO

Generates library calling sequence for area assignrr.ent.

ASSOO

Processes assignment triples.

ASS032

Tests for special assignment triple.

ASTROO (OF)
BUY (OF)
CALIB (OF)

Processes BUY triples.
Generates Library calling sequences.
Enables for SIZE prefix option.

FREE (OF)

Processes FREE triples.

GENCNV

Generates convert macro instruction.

GENRXO

Generates RX instruction.

GENSSO

Generates SS instruction.

GETDES

Obtains operand description.

RMNDX

ReITroves index from operand.

SELL (OF)
jSPASS (OF)

I

Generates code for string and numeric field assignments.

I

ENABLE

SBGTNR

I

IObtains next symbolic register.
I
IProcesses SELL triples.
I
IProcesses special assignrrent triples.

f

I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

l __________________ L ____________________________________________________________________ J

272

Table OG.

Phase OG Library Calling Sequences

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

IMain Processingl
I
Routine
I

statement or Operation Type

Subroutines Used

I
I

r------------------------------------+---------------+ -----------------------------------~
ITRSCA~

IScans triples and takes action on
Itheir values

IEOBIN,TSCSNO,TSCCLB,TSCPRC,FMT001, I
ITSCEOP,TSCEP2,JSCJMP,MOVITM,MOVODT I

I

r-------------------~---------------+---------------+- ----------------------------------i

IScans fseudo-code deleting IGNORE
litems and detecting CCNVERT items

IPCSCAN
I

ICNVFND,MOVITM,MOVOUT

I

I
I

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

IExamines fields of CONVERT, and
Idetermines whether the conversion
lis to be done in-line

IIEMOH

IMJG201,IEMOI,CODCAL
I
I

I
I

I

I
I

r-----------------------------------+---------------+-----------------------------------i
IGenerates Library calling sequence IMJG201

IMJG203,MJG204,MJG298

I

~-----------------------------------+---------------+-----------------------------------~
-

-

-

-

-

-

-

-

-

-

-

_

~

~

IGenerates in-line code for selectedlIEMOI
IBITCDI,FDTOFB,FIBFLT,DECFLT,PICHAR I
I conversions
I _______________ I
I
_______________________ J

l ___________________________________

section 3: Charts and Routine Directories

273

Table OGi.

Phase OG Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
IEOBIN
Entered when an end of in~ut block marker is detected.
I

I
I TSCSNO
I
I TSCCLB
I

Processes SN, SN2, and SL triples.
Processes CL triples.

I

I

I

I
Processes PROC, PROC1, bEGIN, and BEGIN1 triples, and sets up counts I

I TSCPRC
I

I

I

for work space requirements.

FMTOOi

Handles the workspace requirements for FORMAT and FORMAT LIST.

TSCEOP

Processes EOP triple.

TSCEP2

Processes EOP2 triples and terminates phase.

TSCJMP

When a JUMP triple is found the routine sets up a counting mechanism
and enters PCSCAN.

MOVITM

Moves from input an item which spans blocks.

MOVOUT

Moves an item to the output block.

CNVFND

When a CONVERT is found passes control to IEMOH and outputs pseudocode generated on return.

MJG20i (OH)

Generates pseudo-code to call the Library conversion package.

CODCAL (OH)

Given a DED generates a code byte used by the in-line conversions.

MJG203 (OH)

Generates pseudo-code to point registers at data.

MJG204 (OH)

Generates pseudo-code to call Library conversion module.

MJG298 D-.Q,'"-••

.OYN. STORE
... ..
... SCANS TF.XT
"'FOR ALLOCATE I: •
"'BUV STA TE"IENTS ...

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

.•.·x

J2
••
......
....
LIST
•• VFS
..... Ar,GREGATF ••••••••••
•• LENGTHS ".
......

(I.

*.

.....
.•

• NO

ic

• r9

*

• AI·
...

... ....... J3 ........... .
'"LIST LFNGTHS .~~,"
.-.-.-... -.-.- ... -.- •
PRINTS
•
..
AGGREGATF
•
'" LHIGTH TABLE •

~'"

$ •••

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

.....
...
ic

.1'9 •

• Al*

Section 3: Charts and Routine Cirectories

279

<~hart

PA.

Phase PA

~verall

Ciag~~m

Logic

•••••
••
•

• PA •

• B3·

PAOSA
X
••••• B 3 ••••••••••

•• PICKUP HEAD ••
• OF ENTRY TYPE 1.
CHAIN
••
••

.................
••••••••••••••••••••••••• x.x
C3
••••

••

.*. ••

.. ..
END

OF CHAIN
••••

•

C4

•••• YES
••••••••••

••••

NO

. *. ••

• •••• C5 ••••••••••

•• ·;H~nLBE •••• NO
: SET OFF FlAG :
ANY ~TATrc
•••••••••• X.
IN THI:'
•
. ' •• fl. A'
:cnMM~NJi~~ IONS:

1(••

.....S....
.....
::21:
•

YES

...... .........
. .
~

.x •••••••••••••••••••••••••
I(

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

PICK U P :

•

x

yes ••,;

....

NHTHE=· ••
N~~ ••

:1( .......... :~ocg~h"l~

.................
NE~~p~NIRY

03- X*. *.

•

*..*
• NO

...
K

('3

•
•

••

•• I S · .
NO •• BLOCK ~O ••

: x•••••••••••••••••• ~A:

~L~h'~~.··

•• OSA ••

* •• *
•

YES

·····G3··········
·..................

OSASI7.E

X

• CALC STORAGE •
• FOR V AR I ABl ES •
:STRUH~~~~ ANI) :

X

··..*H3··········

•
ADD
•
• STORAGE FOR STD.
:

g~~pt~~PoI2

:

•
SI ZI'
•
•••••••••••••••••

••••••••••• x.

.....J2..........

•
•

•

J3- X*. *.

SET.
••••
ELIGIBILITY.
YES..
IS SIZE
••
BIT OFF
.X •••••••••• )512 BYTES ••
IN ENTRY.
••
••
TYPE 1 .
••••

•••••••••••••••••

*•• *

• NO

••••• KZ..........

~

OICENT
it
• •••• K3 ••• • ••••••

CHAIN ENTRY :
:os~A~iCHA~l~Y :
FROM ENTRY
.X.........
ENTRY FOR
•
TYPE 1 .
• STATIC CHAIN •

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

:....
•

280

•

Phase PD overall Logic

Cha::-t P;) .

.....

Diagr~m

..·

·po •

•

PO

AI·

X

.... · . A l · · . · . · . · · .
•
SCAN TEXT
•
AND
•
•
•
REVERSE
•
•
SECOND FILE
•
POINTERS
•
•

•• *••••••••••••••
X

·····Al··········

SCS OIlT

•
SCAN STATIC
•
CHAIN
AND
•
• SORT ENTIIIES
•
(I N PAl

•
•
•
•
•

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

• X••••••• G • • • • • • • • • • • • • • • • •
STATIC

x

•

Cl···..

• ••••C2.' ••••••••

." ·~~~~~t •.•.

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

YES

:

ALLOCATE

•.• J~H~~r~ .• ' •.•.••••• x:

.. ..

• NO

.X ••••••• 41 • • • • • • • •
X

OVALOC

R~PH~:a~

*

*..*

:

:
•

0 ••••••••

•

•••
01
••
• ••••02 ••••••••••
• .... I S A -. _. VF.S
:
°fitE~~J.~E
:
-. DOPE VEC TOR •••••••••• X.
AND
•
• ,,~;QUIRE~...
:
A\~g~~~~

.. ..

................:.

• NO

• )C • • • • e • • • • • • • • • • • • • • •

X

El···..

TVALOC

it.

e ••••••• e _ a • o •••••

• •••• EZ..........

•• ··STATIC •••• YES

:

•.•. ~~H:~~~ ............. K:

.. ..

~L~~~e~~:

....9............

••••

•

• "10

AOO~fM ING

0 0 •••••••••

•
.. •••• F3.t. ......... .

:I')E6~R~h~h~PF

1(:

:
:
•

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

: ••••••••
• •

~~~UO~TA7~

DICT ENTRV

CONAlC
~
····'*Fl··········
.SCAN CONST ANT~ •
CHAIN AND
•
•

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

:.CONSTANTS
O~Hp~~T fN :
POOL -

·

.X •••••••• '•••

K
···Gl ••••• •••••
•••• BU'IP
•
lOCATION.
•
COUNTER flY
•
• SI Z F. 0 F POOL
•
••

.................
...x

• '"

HI· •

ARF·.

•

."'THERF MOPE •• "£5.
"'.
CONSTANTS
••••••
••
POOLS
• '"

*.

*•• *

••

•

.....
)c

.....

• PH •
• AI·

section 3: Charts and Routine Cirectories

281

Phase PH overall Logic

Chart PH.

•••••
•••

• PH.
• A1·

.x ••••••••••••••••••••••••••••••••••••••••••••••••••••••

P8SCAN
••••• A\..........

AUTENO

.•

S;A~~ g~:

:
•
•

X

A2

•••

P8s1

••

•

.. ..

*..*

•

• YES

:..··.81··········
snn ~~ :
•

ic

CON TROll ED

...

••

*..*
* ••
*
• NO

x:•

•• ••YES

G¥ TO

?~XcHIUH

84

• *.

• *.

••

RF8~IR:· ••

eE~Tb~

*...
* •• *

NO

••••••••••••

85...
•••• IPA •••• NO :
x•••• STRUCTUR'E •• •••••

*..*

*••
*
• YES

• YES

ic

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

• ••• *C2 ••••••••••

*

•• END OF
•• NO
•
•• • ~ONl~~\~EO ••••••••••••

*..*

•• i~

•.•• ee2Vb( ••.•...••• o.x ••••

•

*.

•

83
••
•• ··ll~~YE·· •• YES

•I( x•••••••••••••••••••••••••••••••••••••

C1

:
•
•

•••

CHAIN
•••••••••••••••••••
••

••

GO TO NEI(T
ITEM l"l
THE CHAIN

.;

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

CONSCN

0000.00 • • • • • • • • • • • • • • • • • • • • • • • • • • • 0

• ••• A3 ••••••••••

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

··ENO OF •••• NO
:
••••••••• x•• AUTOHATIC •••••••••• ".
•
•• CHAIN ••
•

.................
PROCEDURE
8EGIN CHAIN

•

Diagr~D

•••••
•
A2 •
•• *.**
•

••
:

••••••••••••••••••

·····04··········
X

:Y~~i~~~N~eF IN:

......
• S'fATIC CHAIN •••••• ". A2 •
:
A~~~:T~
:
••••••

••••• ~ ••••¥••••••

···.·El··········
•
CONTINUE
•
SCAN OF
•
•
•
STATIC
•
•
CHA IN
•

•••••••••••••••••••

·
•••••EZ··········
.
K

:YE ;g~ ~~£Y IN:
:
• slAT IC CHAIN ••••••

:

A~\g~:~~

:

•••••••••••••••••

• x•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
K
"
Fl.·...
SKARGl F2···..
SKA~:1 •• F3.' ••••••••
••••
••••
•
AlJ,;,1~CATt
•
•• END
NO
•• iK~~JlTO~ •• YES
•
AHVO NT
•
••••
CHA N •••••••••••• x•••• Rlrs~N •••••••••••• ":
R~QU~ft~

•

CSCN2

r.: ••

.. ..

.. ..

*..*

• • • III

• YES

• NO

ARRSCN

.................
:

•

•

x

G2

•••

•

••

• ••••G3..........
• •••
• ••• YES
:
A~h~l~l~:
••
ARRAY
•••••••••• x.
lAlCUlATE
•••••••••
••
••
•
NUM8ER O F .

•••• ••••

: ••• ~k~=~:U ••••:

•
• •••• G 4 . . . . . . . . . . .
: Ol~Gy~RTYA~YE:
:
X.
AllOCAfE
•••••
•
DEGENERATE
•
"

: •• ~2:~.¥~¥I2:•• :

• NO

;
:
:

STRAlO

H2 •••••

.IC. ••••• ••••••••••••

:•

ic

•••••
•

·Pl •
• .A1·

282

• ••• *H3..........

• •••• H 4 . . . . . . . . . . :

NO • •••
• ••• YES
: STA~~8~ATSORK :
:
D~~~~~Uh :
:
STRUCTURE •••••••••• x.
NYHtER OF ••••••••• X.OOPE YEfTDR FOR . . . . .
.'.
•••
:~h:~N NNA~II:
:
-YbRlbRI~VAl :

' ••••'

·

01;9
•••••• b,.

I......

.........

i •••••

x

Chart PL.

Phase PL Overall Logic

Diagc~m

"'' ' ' ' ' '
'" '" '"

"'PL '"
'" AI'"

SCS~:~**AI*~"'*"'''''''**'''

DE2!Hh~~2~~~",****

*
*
'" SCAN CHAIN
'"
S~Rn~n~
:
'"
*
*****************

SYMIU**A3********"''''
*
*
*
'"
*
ALLOCATF
*
:X •••••••• : ~6~BShH~~~ :
*
*
*
*
***"'*************
*"'*************"'*

*

:x.. :x ••.. :*
*'"
*

x

****
A1

****

.*.

ALLOCATE OED
FOR VARIABLE

x

*'"

*

x

• YES

• YES

.*.

.*.

*..*

*.TABLE.*

*

*

B1
*. *.
62
*.
63
*•
.* DOES *.
.* DOES "'.
.* • *END
OF
*. NO
*..* ••
NO
.* VARIABLE *. NO
***** *
*.
CH~.IN
.* .••••.•. x*..* VARIABLE
REQUIRE
o •••• ox*.
REQUIRE
.* •• 00)(* Al *
*.
.*
*.
oeD
.*
*. SYMBOL.*
'"
*

*..*
*•• *

*

*•• *

YES

: x••••••••••••• ·OEOAl.t:··· x'"

CCSCAN
x
*****Cl **********
'**" OFSCAN
''""
CHAIN
CONTROLLED *
*
VAPIABLES
*
*
*
*****************

SYMTAB
*****C2**********
*****c 3**********
**
** ALLOCATE OED "
* '..
*
ALLOCATE
* FOR VARIABLE *X •••••••• * SYMBOL TABLE *
*
*
* FOR VARIABLE *
*
*
*
*
*****************
*****************
x
x

.*.x

*.

CH.6IN

*..*

.*

02

"'.

II

03

OED
.*
*..*
*0

VES

X••••••••••••••••• 0

*

0

• • 000 • • •

X

X

CNSCAN

.*.• YES
*.

*•• *

*

o. e • • • • • •

00 • • 0<1 0" • • • • 0 0 • •

DEDA Ll
•
*"***E3**********
..'" ALLC'CATE OED **
* FOR CONST ANT *

*

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

•*

*.

X

. •*. NO

F2
*•
• * DOES * •
• '" CONSTANT "'. YES

FI
*. *.
END OF
*. NO
CH.6.I"J

*.

*•• *

.*

.*

*

*
*
"'****************

X
.*.

*.

.*.• *YES
•

*. SYMEIOL .*
*.TABLE.*

*

*****El **********
** SCAN CHAIN
**
* OF COIIJSTANTS *

•*

•

.*·~A~n~Le*·*. NO
.*·~A~~~~LE*·*. NO •
.* ......•. X*.
REQUIRE
.* •..•.• 001<*. REQUIRE .* ••••

*•• *

*

•••••••••••••••••••••••••••••••••• :

OEDAL~.

01
*.
• *·*eND OF *.*. NO

*.

****

*•• *

.* •.•••••• X*.

'" YES

*.

REQUIRE
OED

*..*
*. 0*

0*

.* •.••••

•
OOOClO • • • • • • •

*

B:SCAN
X
*****Gl **********
* SCAN CHAIN
*
* OF PPOCEOURE *
*
AND BEGIN
*
*
BLOCKS
*
*
*
*****************

.t

R~g~U'

X
SYMTAB
X
*****H3**********
*****H4****"'*****
**
'"* ALLOCATE OED **
**
ALLOCATE
FOR VARIABLE :X •••••••• : ~6~BSaRIUH :

ACSCAN.
HI
*.
*****H2**********
*'" SCAN CHAIN"*
.* • * END OF *. *. NO
""*. CH~.IN .*.* •••••••• X: OF v~~I~~eHC
*0

•

*

*•• *
* YES

x

*"'***
*PP *
* Al*

*

:X .. :X •••• :
*

0

************"'****.
"''''**
** H2 **

*

*

**"'****"'*********

***********"'*"'*****

****'" *

.. *
*

Section 3: Charts and Routine

[ir~ctories

283

Phase PP Jverall Logic Diagr3m

'2hart PP .

.....
•....1.1·
• pp •

•

. ....1.1 •
1 ..
·······1.1··········
.
•••••••••••••••••. ....
X

RI.O

•
SCAN ENTRY.
•
••• X. TYPE
CHI. IN .X •••••

...·x

••
IS·.
THERE
•• NO
AN ENTRY
• *••••••••
•• TYPE 1 ••
x
•• ••
.PT •
• YES
• A1.

••

*.

81

•

.....

....

••

X
C1

••••• •
••••

·.

•••

•••

••
•• I S . .
••
THERE
•• YES
•••• A~H~Y~O ••

.....

*..*

• C2 •

.x •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

SETCHN
X
•••
SC24
• ••••C2..........
C3
••
• ••••C4 ••••••••••
•
•
••••
•
•
•
SCAN.
••
ON•• YES
•
h~~EIiAI~
•
X:
AUTO CHAIN
: •••••••• )( •••• CONoITION ••••••••••••

·······x·· •

~

.~

·

x
·.K....·····01·••·•••·••.
•

•

•

MAKE AN
AUTO CHAIN
DELIMITER

X

.*

•
•
•

•

• E1 ••••

:SORC;~···

•

• •••• E2 ••••••••••

*..*

•

•• •••

.. ..

:
•
•

.*
••

.•.

•

NO

...ic

••

E3

*.

•

*•• *

•
•

•
•

••
NO..

••

F3

*. ••

ADD TO
ANY
INoFPENoENT
.x •••••••••• oEPENDENC IES ••
CHAI"!·
••
••

•
•
•••••••••••••••••

RA7

••

G1

.•.ic

••

*..
••••
•

•• ••••
•
E2 •
•••••
•

.. ..

• YES

H1

J.

••

SCRU81
• •••• H2..........

)!:

•• • ••NO
ic

·····Jl··········
••
••• ERROR
•
•
•

·..................
x

•••••
•
Al •
•• ••••
•

284

DU~~~E~~?~S

•

•
•
: ••••

•

-.

••

J.

~~~~~N,

SRCH2
• •••• F4..........

••

o~~~Nbl~lln

<;C44
• •••• ~5 ••••••••••

:
:
IN CURRENT
••••••••• x.
DEPENDENT.
•

:.....~~~l=••••• :

ADO TO
OEP"NOFNT
CHAI N

...ic

G3

•••••••••••••••••

••

• •••• GIt••••••••••

*.

x:

•••• ••••

• •••• H3..........

)!:

INDE~~~~NT

A5~al~HAIN

o~O~~l~~

INDE~~2DENT

:
:

: •••••~~~l~••••• :

•

:
:
: ••••••••
• •

·•••••
.
•••••
x

•
NO •••• END
*. YES
:
•••••••••• OF CHA IN ••••••••••••

X

• •••• H4 ••••••••••

:
:
: ••••••••
• •

•••••••••••••••••

X:

MAK~

OEf~~t~ER

:
:
•

•••••••••••••••••
x
••••.
......
.
*

El •

:
•
•

:.................:

• NO

.................
1.A~;~YJjENT

PhA~~ IN
IN~HA~~ENT

.•

•.•. .•.•

YES

• •••• G2 ••••••••••

•••• I~~~f •••• YES
:
•• • .t2B~DCH2 ••••••••••••
•• ? ••
•

•

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

•• 1~JU TA8l~· •• YES
:
••
I~EM
•••••••••• x.
••
••
•

III

*.
*
...
E~~IN ·:.X •••••••• :DEPE~g~NfoCHAIN:
.*
•
...
*..111
...
•

. ~?:.*. OF
x

F2

x:

• NO

ic

••

x••

NON
•• YES •
• •• ~OJvn:8lE ••••••••••

•••••••••••••••••

••••• F1..........

•

•• YES
•••••••••

*..*

E2 •

SCAN
DEPENDENT
CHAIN

SC31 •••• 04 ••••••••••

*.

TEMP

ic

El..

: NO •••• THaE A·· •• YES
:
••••••
DEPENOE NT •••••••••• K.
••
CHAI"! ••
•

03· ••••

••
• •••

·•.••••....•

•••••••••••••••••••

·•••••..• .t

x:
.

...*

•

:RA4
•

..................:.'.x

.. ..

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

•
•

• C2 •

Diag~3~

Phase PT Jverall Logic

Chart PT .

•••••
• PT •
• AI·
••
•

............ ··x

CONTl
K
. . . . . Al··········
• SCAN CONTR~~LED.
• CHA IN FOR
:
gSp~Ae2~ DR :

OSA19

.. ..
A3

•••

....

••

.... -....,... ......

tlE.

••
••

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

•

PROC

•• NO
•
•
•••••• X. E3 •

• YES

••••••••••• xxx •••••••••••••• o •• o • • • • • • :
: :oSA26
••

83'·'..

••

.:.

.. ..

• •••• 81t.~ ••••••••

*.

•

p:R~~~hR ·:.~:~ ••••• X:

*. * . . * .*

•

:

••• C

:

•

3.~ •• "

•*

.

••••

GET NEXT El'

•

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

"'*

• NO

.. DSA~~.

*

:

a~~O~A~1i

:CIR~~a~ l~AIN

•
:

•••••••••••••••••••
• X••••••

DSA4

01

It
•••

•••• 9

elta • • • • • • • • • • • • • • • •

•

••

• ••••

•
Di ...........
.

. ' •• 'tES
:ALL~ColEA2D8YTE:
N
•• CON IliON ••,•••••••• x. CO"'~JLE CODE •
•• EN RES ••
• TO INITIALIZE.
•• ? ••
•
•

•• • ••NO

•••••••••••••••••

·• .•

• •
03
.* 11
• NO..

.-.x

••

······I~E '~=~l NA~ •••
*.
••

-...
•••• •

··.........
•

OSA1'4
>0.···04 ••••••••••
St8R~NPO~n~R :
• •• X'"
STAT~MENT .X •••••••••••••••••
•
'"
CREArEO
•
•

t

THIs*. ••

...

...

YES

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

• E3 •• x.

X
••••• e I ••••••••••

oSA25
X
·····E3··········

OSA10
:
•
•

AbaR5~T~oR

ADORESSI NG
VECTOR

•
•

:
•
•

:

•••••••••••••••••••

.•.x

Fl..

.. ..

••••
• ••• YES
:
••
PROC'
•••••••••• X.
••
••
•
• NO

2Aba~~ATPOR

:
•
•

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

ADORE S'ING
SLoh

•

:x. () ...................... ~

*GI.····••··•••
•••••AllOCATe
P~5~~~Pie~E :
•••••••••••••••••••

oSA17
• •••• H2 ••••••••••
•
ALLOCAT~
•
~~~A~h&yr :
• :·o~~PV~g~OR·:.~~ •••••• X:
• '.
••
•
WORK SPAce
•
e

*

• YES

·

x

:oSA161
·····Jl··········

:•

STORAGE

:
•

•••••••••••••••••••

AHg~:J~
:••
•
R EQUIREO
•
•
•••••••••••••••••

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

:oSA162
K
······Kl··········
•
• COMPILE CODE •
••••• 1'0 INITIALIZE.
•
oOPf VECTOR •

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

•

•
:

•

.

x

'"

'..."

................
·x

X

.*

G4

•••

••

*0

.. ..o·
··..........

OSAENO
• •••• GS ••••••••••

•

•• END OF
•• YES
•
••
El CHAIN
•••••••••• X.
••
••
•

*.

• NO

• C1 •

••
•
••••••••••••••••••••
•
•

GET VOA
WRR~S8'~~o

:OSA91t:'
...... ·F4··········
...
STORE OSA
•
'"
S I7.E I~
•
4, ENTRY TYPE I
•

oSA46
X
·····H3··········

••

•

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

.•

x

•••
HI..
••••

.. ..

S~~!;~~A~fiRo

.. ..

•

X:•

• NO

•• ALLOCATE ••
CHAR STRING •
•
STORAGE
•••••••••••••••••••
••

· ... ·······)ex
*.

:
•

OSA38

•
:

:oSA16

.

•
OSA~~! •• E5.l ••••••••

YES
•
••••••••• , ••

EGlON

*.

··.·*G3······.···

X

oSA121

·

·

X

E4···..

••••

:

oSA29
X
• •• ·.F3··········

o·

*.
• .AO~USTA8LE ••

•••••••••••••••••••

• •••• F2 ••••••••••

*..*

ALLOCATE

OO~~bKA~~Ro

: OSAl'2

••

ALLOCATE
BIT STRING
STORAGE

RELEASE
TEI(T ~LOr.KS
AND CONTROL

•

•
•
•

.•.................
x
.........
*QF •
• AI·

••
•

·
.
·•••••••••••••••••.

OSA,)4

X

•••• ·J3 •• ••••••••
•
ALLOCATE
•
STORAGE FOR •
•
•
ARRAYS
•

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

OSA68
X
• •• ··K3··········
•
...
...

...

ALLOCATE
STORAGE FOR
S TRUCTUR ES

•
•
....... H
•

...'"

secticn 3: Charts and Routine Directories

285

Chart QF.

Phase

OF Overall Logic DiagL3m

••••

•••••
•
••••••••••• x.

••• 103 •••

•*OF•101·••

••••

. ....

..
•

~
• •••••101··········

:OFOOOO

OAD~:. •• A3.!........

:

·

••••••
• 101 ••
••• SCAN TEXT .X
•
••••• •
•
•••••••••••••••••
••

B1

...·x

••

AU

.

MioTIC
•••••••••
AI N .

K......
••

•••••••••••••••••
K

.:.!!~

••

•• ••
NO

.....

.....X

A',:··..

....
•• ••

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

·OJ •
•• 101.

VI'S
••••••••••

NO

K.:PlA~~DO~~l~IT"R:
~TATF~eNT

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

*. *.

•••

•
•

IN TE XT

~

8"

•*
VES..

•

OMO¥~1 . .A5 ..........

•.•.

OElIMITER
••
•

OF1172

*.

....

•:.•• E?Bx9"

•
•

!~AN:

~

••

FIRST
lONE

B5 ••••

OF" 860

*.

.*
••

NO
ENO
•••••
OF CHAIN
•
III.

••
••

•• .-

~

*••
*
• NO

•••••
•
A3 •
•••••
•

•

*.

*•• *

•. ••
._

••

••

• VI'S

•

·····C4*·········
X

:EX~Q~~~sl~~A~T

•
•

FOR I EM
FROM NO

X

.. ···C5 ••••••••••
•
~~IP 2ND
•
:
Tol~
•
STATdM~NT •

lffT :

:
•
•

·.......

: ••• !~.n2~~ ••••:

: ..... :I~~ •••••• :

•• X. J3 •

x · •••••

OF1215 0"···..
0"11:: •• 5 ••••••••••
••••
••••
•
RXTRACT
•
•
•
NO..
DOES
•• VES
•
~APPING
•
: 103 :X X••• • ••• IlfaR~~~O •••••••••••• X:
~RgEF~~~M
:

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

...............:

:

•

t".•••••.•.•

K

QPPROL
OF(l360
•••
• ••• ·E2·.·.··....
E3
••
• ••••
••••
• ••• VI'S
:
E2':ER~T NT :
••••
• ••• VES
:
G ~SRAfE
:
••
PROC
•••••••••• X.
F«I
••••••••• K·. E XJK
•••••••••• X.
A C
•
••••
••••
:
E H ~to L :
•••• 0 • •••
:
RRSS N
:
•• ••
• •••• ~.... •••••
•• ••
• ••••••• 11 •••••••
El

•••

••

~~l

R~Al

.~

·

NO •••• Il~M ••••
.x......
FJ~ST
•• IN ZONE ••

.111

•

*.

e*

*•• *

• YES

.

•••••• ••••••••••••• ••••• • x.

X

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

....
•• ••
X

....
•• •••

GENERAT~

T~l(g~~G~~A

:
••••••
: •••• X: A3 :

:
:

OON~~~.*G2 ••••••••••

·:.!!~ .....

••

F".:........

G~g~=~~E
F~R ~~tU8SA

:
:

•••••••••••••••••••

•

• NO

G1···..
••••

QFOU~ ••

oep~a~ ••F2 ••••••••••

••••
• ••• VES
:
•••• BEGIN •••••••••••• X:

ON

~

E5·.

.~

Fl···..

•• ~~.:.
••

Ig ~ i T~

.•.

•
:

•

:

QF1~U •• F5.~........
: :E~O~1i XVAR :

......:••••••••••••••••
A"f~N~'~~ :
MA~P
•

NG CME

•

.•••••••••••••••••. X:....•••101 :

X:••

~R!tF~~1

TO ~~roh

•

:. •••

•

X.

•

•

...........................
OF!!m •• H5.!••••••••
••
GSNERATE
••
ODE TO
•
C PV ARG
•
• A1!! TAR~p •

.. .

••••
••••••

: •••• ¥~~h.i•••:

•••• •
•
X
.. " •
•••
OF"625
QMOVfl
Jl
••
J"
••
. . ' •• ill••••••••••
••••
•••• VE S
•••• H :RE A •••• VE S
:2~=~OiT ~R8N~~~ :
••
PROC
•••••••••• X.. ~N~R~ p~l •••••••••• X. 3T RNFt ~Nn •
• J3 •

••••

•• ••

·

....

• NO

• *

..X. A3 •

.*.

••••

?

••••

*•• *

.

• "10

:~A= ~ ~~ f~9R~S:

•••••••••••••••••

.
•

••••••••••••••• K••••••••••••••••••••••••• X•••••••••••••••••••••••••

286

Chart

Phase

QJ •

QJ

• A1·

•

......Al··.·······••
••
X

o.

.."'.............. ..•

••• X.

••

A2

A2 •

.-.x

••

*.

•• ADJUST
•• 'II'S
••
ARRAY OR
••••••••••
•• STRUCT ••

.x•••

SCAN TE XT

••

.*

K..

••
••

*..*
*. • ••NO

..•.....•
••••
..."'.81..........

.;.

.

•• A1 •
••••• •

Cl

.• END

*. •:.

*...
*•••

••

OF

TeXT

*. ••

E~~r~TS

flNDEXP
X
••
.. ••••84 ••••••••••
:
YES •••• ANy·· •• NO
:
~n~~f T
:
.X..........
STARS
•••••••••• X..
2ND FILE
•
•
••
••
•
STATEMENTS
•

FROM OLD
DOPE VECTOR

.*

X

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

••••••••••
X

•••••

.QU •
• A3 •

•••

**.
••.**

••

*••• .*

••

.. ..

•
SET SIZE
•• YES
• AND GENERATE
•••••••••• X.
CALLING
••
•
SEQUENCE

.•.

•

••

X

*.

*•• *

x

~'.~XM .~ ....... .

•

•

•• F2 ••
••••••

·.... .............
•
•
•

EXTRACT
HAPPIIIIG
CODE

:•
••

og~~E~~HoR

:•
••

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

.*

• YES

BYI

•

·····G2.·········

•• "DJUSTABLE •• NO
••
ARRAY OR
••••••
... STRUCT ••

*.

OF.TERMINE

:

CALLING
SEQUENCE

•
•

LIB~l." •• ES.:••••••••
•
DETERMINE
•
.:. L~2~nT? ·:.~; •••••• X: ~~~~h~~D :
••
••
•
CALLING
•
••

•
•
•

RELOCATION
CODE

• x••••••••
K

•• ••••
•
A1 •
•••••
•

.. ..

x

F 11

••

*.

••

.* INITIAL *. ••

*.

VALUE

*.

••

.*

.*

F4

...·x

• *••••

*.

x

.
.... ··"'"'........
..
.
·····G3••••••••••
it

•• EXTRACT 11'40 ••
•
FILE
•
•
STATFMENT
••••••••••••••••••
••
1) • • • • • • • • • • • • • • • •

••

. : . S¥a~G
•• LENGTH

NO

*••
*
• YES

.

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

••

•

• vES

F3 •• X.

••••

1'5 •

.. x•••••••••••

X

•

~U~AA~~n

•
•

••••• •
••••••
•

E4°··..
••••

••••••
• •
• Ai •

x

0*

•
•
•
•

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

• 1110

Gl

• YES

:

•

X
• •••• F2 ••••••••••

8Y15

Fl..
.••••

• •••
A2 :

*•• *

• YES

··.........
.•.

••••

•.:.~~ •. l(:.••••.
*..*

•••••••••••••••••

'"

x

*..*

••

**.
••.**

•

• F2 •

•••

••
••
STRIIIIG
•.•

• ••
04
••
••••

••

NON

t ....... X.:·. .
~~:l~K
~~~l~~
? .·:.~? ..... X.:·..?

.....
··....

••

• YES

BUY

•••

Ll8i.l ••• E3.! ••••••••

*. ••

'op.

BUY

03
••

•••••••••••••••••••

• NO

*.

.4
..................

•

·····C4.· ••••••••
•
EXTRACT
•
• •••
•
HAPPING
•
•
•
•
C mE FROM
••••• '(. E5 •
1ND FILE
•
•
•
•

X.

•• 8UYS

•••

*...
.. ..

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

x

*.

* •••

• 84 •

x

83

•••
ALLOC
01
••
• ••••02..........
••••
• ••• YfS
:
i8A~E'A~~~B
•
••
AllOCATE
••.••••••••
2ND ~ILE
••
••
•
POI 1'4 TF R S .

• NO ••
••••••

··••••..

••• *

YES

• NO

...x

• •• 41

•• YES.
•
•••••• X. G4 •
••
••

•• X. B4 •

*••. .••*

E1

*.

ALL
STAR

• NO

•...0..............
••'

... ••

A3

.. X. E5 •

:
•
•

.•.x

Diagr~m

··....••••..

...

•••••
• QJ •
GS 1

Qverall Logic

*. 0*

• ..

.:.~?

••

•

••

.....X·"'. ·······"'·······.
·.....
•• E~ ••

... :
•
•
•••••••••••••••••
.
•• X. F3 •

PREVAL
X
.····G4· •••••••••
COpy
OLD
DOPE VECTOR

• ••• ·FS··.···· •••
•• DOPE
GENERfTE
Y CTOR ••
RElg5~ ION
:

.......

• YES

•

•

X

*.

• G4 •• X.

•
• •••
•

SEQUENCE

•
•

•

••••
•
••
··G5·····.··
••:
:•• )(:
•

•

FXTRACT

•

FOR

•

~~ZT~l~~T

:....~~~2~~ •••••:

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

~

....·x
·.
• •
• F1 •
••••

Section 3: charts and Routine Directories

287

Chart QU. Phase JU Jverall Logic

Diagr~n

•••••
••
•

• QU •
• A3·

•••••A3.i ••••••••

TI~p~3\~nRS :
Eft
•
••••••••••••••••••

:

••

X

TRANS

••••• ~3 ••••••••••

•• ••••
•
C2 •
•••••
•
:

i

ET
0 OSII

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

:

•

••

C2

NO ••

•• X••

•••••••••••••••••••••••

rc

TLA

••••• Cl.......

• •••• •
:
SN~~I ~~XT
:
• B3 ••••• x. IPRM AND EPRM •
•
•
•
NESTS
•

•••

x

••

·IT ~hHI~·..

.. ..

*..*
• YES

••

k
*...
...

YES ••••

x••••••••• sE~k~~G ••••X••••••••••••

•

• ••

C3

.

A

••••

IN TRN

••••

•• •F2•••••
••••••

• NO

l(

.t

K

LARGQ

•••

03

•
02
••
:
No····SISAN·· ••
•• •••••• AR UMENT
••
•• RE ISTER ••

*.

.*

•

....:X.x"':................

*.

x

"'."''''

•• C2 !II•

'"

••

•'"
'"

.'" pK~RAM"'.

""..

TEOP

"'.

•• OF

"'. YES

.....

•",' '"

•••••••••• )(.

'"

'" "'

•)( x•••••••••••
'" •• "''''.

• NO

X

..

• •• : P8GT~GTn~K
•
• MVC'S STORED

'"

lC

•• ••••
•
83 '"
•••••
•

•••••
• Q)( •

"'

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

•••••••• "'.

••
•

....

.. ..

'"

....
*•• *

*•• *

• YES

~

•• NO
•• ••••••

..AOOR ••

AOEOQ
•••
"'.
J2
••
•••• I S · · •• NO
• •••
•• "'. NO
•••• AL6~~~ENT •••••••••••• )("'."'. OEOSW ••••••••••••

MTSQ
•••
MTMVC
J4
••
• ••••~5 ••••••••••
• ••• NO
•••• Opl~ANO·· •• YES
:
"o~I~Yl.D
:
ARGSW ••• "' •••••••• K•••• A ~~~r5T •••••••••••• lC: f~~lNfw~AON :
8'1' MVC
•

J3

•••

••

x.... .0..
••••

....

*. ••

• YES

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

*. ••

• YES

• NO

x

x

X
••...K2··"'
·······

• NOTE REGI STER •
• LOADED 8'1' THE •

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

:... :

x

• tl3 •

X

"'PUTK3······.··
•••
•.•..
•
MVC
• INSTRUC TlON FOR .....

MSTACK

REGENT

:opl~~~SNh r~s:.~~~I.~~~~~~~~.:

288

:
•

• &2·

ri:~:;i;:~:;·:· :~:E::·;i~;:fi;··
WAL~G~~~-

X:

•••

•••••
•
83 •
•• ••••
•

.

"'•••••••••••••• "'.

-)(

X

Jl

SE ¥EX¥

···.·F5··.···"'
·.·•
•

•

·• x•••••••••••••••••••••••••.
AOFSIQ

TLM

H 0 TP T •

*..*•• -

••••
••••• YES
•••• OR ~~¥SW •••••••••••• oE6 QHI VARfArE:
••••
•
•

.. ..

"'...

x

••••

xx ..............•..•....•••••....•.•.. :

H~::::

*••
• *
YES

..

"'~~~i~U"'~~~~~~~'"

*•• *

IS "'.

*..*
*••
*
• YES

• 83 •

."'.'"

.."'R~~l.Fl"'····"'' '··

• F N

."'.
ALIGNQ
•••
'" 83 '"
••
'"
•
IT ••
•• G2
NO •• A ACKEO ••
YES.. tP RAND •• NO
••• "'. (NONSTRINGI •• leo ••••••• "'.A 0 C 10NARY ••••••••••••••••••••
•
..VARIA8LE ••
..R F RENCE..
•

•

••

.x "'.
E5
"'."''''
.'"
"'.
: F2 :)( .. ~?"':\ l~~ l~TRY·:.
••
*.
.*
"'."''''
- •• *

'" NO

•'" G2 ••
••
X.
• ••••• K

x
••••

05

.i. NO

'" YES

•••

F3

"'

.•GlS ••

'"

.*
*•• *

x

X

••

yes

'" NO

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

ALGREF

••

98:. •••

•

.•.x

:.:;~Fi(·~~~:~;"':

• ACCORD
REQUfRfD
'"'" F2 '"
"' •••• X'"
N TO
'" INSTRUC ION
•
•

TLLl8Q

i. ....

E'l
••
• '" OTHER "'.
YES .'" iNSTRN
••
••••••••
QUIRING.'"
•
•• A rGNMENT. '"

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

04

*••
*
• NO

LARGY
X
••• ··E2·······
•
SET
•
AltGSIl
••

TTS

••

•••

••••
L
•••• yes
•• ··ITlfoAR·· •• NO
••·~T JiTHJ=· ••
••
INSTRN
•••••••••• X•• FROM ADDReSS •••••••••• X.. A CA~Ll~G ••
••••
• •••
• •• ~=C
~~ au N ••••

*••
• *
YES

•••••

•
•
: G2

TLL

•

"S

·····1(4··········: ••••
X

•

OUTPUT

•

. .••

.·•.•••. ·.................. ....

IT INTO STACK.

•• "'..............

•

K

·....'"
• 83 •

••••• •
• 83 •
••••

:

•

M~~ ~Hh~~n8

INSTRUCTION·

K: 83 :

•

•

·.

2nart OX. Phase

Jverall

~X

.....

~ogic

Diagr~D

• QX •
• A2·

•••

·

SCANC
X
·····A2··········
: Aa~~~AH~T1~o :

cg~n~~L~2

:
•

:

DICTIONARy
•
•••••••••••••••••

.

• • • • • • • • • • • • • • • • • • • e.o • • • • • • • • • • • • • • •

ic

• •• ·.B2···.······

•

•
: s~H I~EtaA ~~ :
•••••••••••••••••••

· ..

.••.•.85•.••••....•
~

• ••••••••• x:PR8E~D~~~OCa:JN:
•
•

•••••••••••••••••••

x

x

•••• •l.

••••• Cl..........

C2

•

.*

••

.. ..

*.

.*

.;..YES
C3
••

.. ..

• GET NEKT ~NTRY •
••
END
•• yES
•• W~S IT
:
IN CHA N
:." •••••• X•••• OF CHAIN •••••••••••• X•••• scAl ~

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

*..*
• NO

x

*.

.*

.

•

NO

·
·..x

*...
*•••
• yES

.

• x•••••••••••••••••••••••••

E'2

NO •• E~Tn

••

~6R ·1••

: x•••••••• "•••••••• No~~iT~LNu~~D'.
·.ARRAY.·

*•• *

•
•
•••••••••••••••••••

NO

X

.AUTOHAT IC C HA IN.

~l~P~~VRY Gr~

·•••••••••.•
x

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

.PROCEDURE CHAI N.

• Cl •

••••
: E4
••

••••

x

······Gz···. •··••·••
•

I~R !~~R~~I~~

• C2 •
)(

:l ... )(.:·

E4
••
••••

• •••• E5 ••••••••••
•
GET HEAD OF •
AtJTOHATIC
•

x:

.. ..

................:.

P~~gEg~RE ·:.~~ ••••••
•• CHAIN ••
•
*..*
•
• YES

.*
••

F4

.•.x .0

*.

·0 .•
•

••

YE S

.. .

•••••
·RA •
• Al·

~~~t~o~~r

•

•••••
•
•
x:
•••.••.•••••••••••*

F5 ••••••••••

*.

IS
•• NO
..~~B(JL(J~WITC~ ••••••• 0

x

PRALEN

·•••••••••.•

...x

• YES

ANAGG
X
·····F2···... •••• ... •
• ANALySE DICT: •
• ENTRy FOR AN •
•
AGGREGATE
•

•

····*04··········:
:

••• ••

•• 1S IT ••
••
IS
•• YES
•• ENTRy FOR •• NO
•• ~~BOLo~WI TC~ ••••••••••• )(.A.~~~~bc~e~~~;'.'.':

**.. .••*

*.

*...
..*

•

03

•• ••••
•
E4 •
•••••
•

.:..YES
C4
••

•• NO
•• WAS IT
••
•••••••••••• )( ••• ~oN~~2~~eD ••••

*..*

x

• *.

02
••
••••

•

•••••••••••••••

• C2 •• X.

x
•

Tg~~oeN

:

~

SWITCH·
••••••••••••••••
•

·.......

•• ••••
•
Cl •
•••••
•
•

•.•..84.......•
•

•

•••

GH HEAD OF
C(JN~~2~~FO

•

.......
x

.

•......•

• C2 •

.LENGTH TABLE •

•••••••••••••

section 3: Charts and Routine Directories

289

.Table PA. Phase PA DSAs in

S~ATIC

Storage

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

I

IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------t---------------t-----------------------------------~
IScans Entry Type 1 chain for blockslPADSA
IDSASIZ,DVSIZE
I
leligible for STATIC DSAs
I
\
\

r-----------------------------------t---------------t- ----------------------------------~

IMakes a dictionary entry for each
\STATIC DSA

IDICEN~

I

INone

I

I
I

r-----------------------------------t---------------t- ----------------------------------~

ISorts STATIC chain (called from PD) ISCSORT

INone

I

~-----------------------------------t---------------t-----------------------------------~

IScans STATIC chain for INTERNAL
larrays; calculates number of eleIments for those arrays needing
I initialization. Allocates storage
Ifor arrays and, if necessaryv for
Isecondary
dope vectors
L
___________________________________

IARRSCN
INone
I
I
I
I
I
I
I
I
I
I
I
I
I
I _______________ I _ __________________________________ JI

~

~

.Table PAl. Phase PA Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

r------------------t---------------------------------- ----------------------------------~

ARRSCN

Scans STATIC chain for INTERNAL arrays; allocates storage for arraysl
and secondary dope vectors (callEd from FH).

DICENT

Makes a dictionary entry for each STATIC DSA.

DSASIZ

Calculates size of DSA excluding Register Allocator Workspace.

DVSIZE

Scans AUTOMATIC chain for variables requiring dope vectors, and
calculates size of dope vectors.

PADSA

Deterffiines eligibility of a block for a STATIC DSA.

ISCSORT
L
__________________

290

ISorts
S~ATIC chain (called from PD).
__________________________________
__________________________________ J

~

eTable PD.

Phase PD Storage Allocation Static 1

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

statement or Operation Type

IMain Processingl
Routine
I

I

I
I

Subroutines Used

~------------------------------------+---------------+-----------------------------------~

IReverses second file dictionary
IPD
I NXBLCK
I
I pointers
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISorts STATIC chain
ISCSORT (in PAl INonE
I
~-----------------------------------+---------------+- ----------------------------------i

I SDSAl
I

I1Ulocates storage for sin'fle, non- I STATIC
I structured, non-external items
I

I
I

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

IAllocates dope vectors for all
I DVALOC
INone
I
Inon-external items
I
I
I
~------------------------------------+---------------+-----------------------------------~
IAllocates 4-byte addressing slots; ITVALOC
ISTHCDV
I
Icalculates control section size for'
I
I
lall external items
I
I
I
~-----------------------------------+---------------+- ----------------------------------i

IAllocates
storage for constants.
L
___________________________________

eTable PD1.

ICONALC
_______________ LINone
_ __________________________________ JI

~

Phase PD Routine/Subroutine Directory

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

I Routine/Subroutine I

Functlon

I

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

CONALC

DVALOC
NXBLCK
PD
SDSAl
SCSORT
STATIC
STRCDV
I'I'VALOC

I Allocates storage for constants.

I

I

I

I

I

I

I

I

I

I

t

I

I

I

I

I
I Allocates 4-byte addressing slots; calculates control section size

I
I

IAllocates dope vectoI'S for all nen-external items.

I

IObtains next text block.

I

IScans text file and reverses second file pointers.

I

IAllocates a 4-byte address slot for each STATIC DSA.

I

Isorts STATIC chain.

I

IAllocates storage for simple, non-structured, non-external iterrs.

I

IAllocates relative offsets of structure ITember dope vectors.

I

IL __________________ Ifor
all external items.
__________________________________
__________________________________ JI
~

section 3: Charts and Routine Directories

291

eTable PH.

Phase PH storage Allocation static 2

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

I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IScans AUTOMATIC chain; allocates
IPBSCAN
IAUT04, SKDV1, SKENT3, S~RSCN,
I
Idope vector
I
ITEMPDV
I
~-----------------------------------+---------------+-----------------------------------~
Iscans CONTROLLED chain
ICONSCN
IAUT04, SKDV1, STRSCN
I
~-----------------------------------+---------------+-----------------------------------~
IAllocates storage for skeleton
ISKARGL
INone
I
largument lists appearing in STATIC I
I
I
Ichain
I
I
I
~-----------------------------------+---------------+-----------------------------------~
Iscans STATIC chain for INTERNAL
IARRSCN (in PA) INone
I
larrays; calculates number of
I
I
I
lelements for those arrays needing
I
I
I
I
I
I
I initializing. Allocates storage
Ifor arrays and, if necessary, for
I
I
I
Isecondary dope vectors
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IScans STATIC chain for INTERNAL
ISTRALO
INone
I
Calculates number of
I
I
I
I structures.
lelements in structured arrays need-I
I
I
ling initializing. Calculates size I
I
I
lof storage for all structures and I
I
I
location counter.
I _______________ I _ __________________________________ j I
lIbumps
___________________________________
~

292

~

.Table PHi.

Phase PH Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~.------------------+--------------------------------------------------------------------~
ARRSCN (in PAl
Scans STATIC chain for INTERNAL arrays; allocates storage for arrays
and secondary dope vectors.
AUT END

Tests for end of AUTOMATIC chain.

AUT04

Calculates size of dope vectors for dynamic temporaries and CONTRCLLED variables.

CONSCN

Scans CONTROLLED chain.

CSCN2

Tests for end of STATIC chain.

END5i3

stores STATIC location counter and releases control.

PBS CAN

Scans AUTOMATIC chain; allocates dope vectors.

PBSi

Gets next item in chain.

SKAkGL

Allocates storage for skeleton argument lists appearing in STATIC
chain.

SKARGi

Allocates storage required.

SKDVi

Creates skeleton dope veotor dictionary entries for non-structured
variables in AUTOMATIC and CONTROLLED storage.

!3KENT3

Constructs skeleton dppe vector dictionary entries for function
Ivalu~s.

STRALO
STRSCN
TEMPDV
l __________________

I

\Calculates number of elements in structure arrays to be initialized;
Icalculates size of storage for all structures.

I

Icreates skeleton dope vector dictionary entries for structures in
IAUTOMATIC and CONTROLLED chains.

I

ICreates skeleton dope vector dictionary entry for temporary workIspace.
__________________________________ __________________________________ J

~

section 3: Charts and Routine Directories

293

Table PL.

Phase PL Storage Allocation Symbol Table and DEDs

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

I

IMain Processingl
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
IAllocates STATIC storage for all
IIEMPL
IBCSCAN, CCSCAN, CNSCAN, SCSCAN
I
Isymbol tables and DEDS
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IScans STATIC chain for symbol and
ISCSCAN
IDEDALi, STRSCN, SYMTAB
I
IDED variables
I
I
I
~-----------------------------------+---------------+-----------------------------------~

IScans CONTROLLED chain for symbol
land DED variables

ICCSCAN
I

IDEDALi, STHSCN, SYMTAB
I

I

I

~-----------------------------------+---------------+-----------------------------------~

IScans PROCEDURE block chain of
IENTRY type 1 entries

I BCSCAN
I

I ACSCAN, DEDALi
I

I
I

~-----------------------------------+---------------+-----------------------------------~

IScans AUTOMATIC chain for symbol
land DED variables

I ACSCAN
I

IDEDALi, STRSCN, SYMTAE
I

I
I

~-----------------------------------+---------------+- ----------------------------------1

IScans chain of members of particu- ISTRSCN
Ilar structure for symbol and DED
I
I variables
I

IDEDALi,
I
I

SY~TAB

I

I
I

~-----------------------------------+---------------+-----------------------------------~

IAllocates storage for symbol tableslSYMTAB
IDEDAL2
I
~-----------------------------------+---------------+-----------------------------------~
IAllocates storage for DEDS
IDEDAL (two
INon~
I
I
lentry points:
I
I
DEDAL2) I _ __________________________________ JI
I ___________________________________ IDEDALi,
L
_______________
~

Table PLi.

~

Phase PL Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
I ACSCAN
IScans AUTOMATIC chain for symbol and DED variables.

I

I BCSCAN

I

Scans procedure block chain of ENTRY type 1 entries.

CCSCAN

Scans controlled chain for symbol and DED variables.

CNSCAN

Scans constants chain for DED variables.

DEDALi (PM)

Allocates storage for DEDs.

IEMPL

Allocates STATIC storage for symbol tables and DEDs.

SCSCAN

Scans STATIC chain for

STRSCN

Scans chain of members of particular structure for symbol and DED
variables.

294

and DED variables.

I
I

I
I

I

ISYMTAB (PM)

L __________________

~ymbol

~

Allocates
storage for symbol tables.
I
__________________________________ __________________________________ J

Table PP.

Phase pp storage Allocation Sort of AUTOMATIC Chain

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

I
I

statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

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

IScans BEGIN-ENTRY for ENTRY type 1 IRAO
I entries
I

ISETCH, SCRUB1, SORCH
I

I
I

.------------------------------------+---------------+-----------------------------------1
Iscans AUTOMATIC chain from each
IENTRY type 1 entry

ISETCH
I

IEXDT, SRCH2
I

I
I

~------------------------------------+---------------+ -----------------------------------1

IAdds ON conditions to first AUTOIMATIC zone

ISC24
I

INone
I

I
I

~-----------------------------------+---------------+- ----------------------------------1

IAdds temporaries (type 2) and inde-ISC31
Ipendent items to first zene
I

INane
I

I

I

~-----------------------------------+---------------+- ----------------------------------1

IAdds dependent items to subsequent ISC44
I zones
I

INone

I

I

I

~-----------------------------------+---------------+- ----------------------------------1

IDetermines list of dependencies
I from INITIAL attribute

ISC39
I

ISCNCHN, SHCH2
I

I

I

t------------------------------------+---------------+-----------------------------------1
IDetermines list of dependencies
I from DEFINED attribute

ISC40
I

ISCNCHN, SRCH2
I

I
I

t-----------------------------------+---------------+-----------------------------------i
IDetermines list of dependencies forlSC35
larray bound expressions
I

IEXDT, SCNCHN
I

I
I

~-----------------------------------+---------------+- ----------------------------------1

IDetermines list of dependencies forlSC50
Istring length expressions
I

ISCNCHN, SRCH2
I

I
I

~-----------------------------------+---------------+- ----------------------------------1

IRemoves independent item dictionarylSCRUBl
INone
I
Ireferences upon which iterrs in the I
I
I
IAUTOMATIC
chain depend.
I _______________ I ___________________________________ JI
L ____________________________________
~

~

section 3: Charts and Routine Directories

2~5

Table PP1.

Phase PP Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------1
\ Routine/Subroutine \

Function

I

~------------------+---------------------------------- ----------------------------------i
I EXDT
\scans dimensions tables for second file statements with adjustable
j

I
I

Ibounds.

IRAO

Scans BEGIN-ENTRY for entry type 1 entries.

I

IRAl

Tests for end of ENTRY type 1 chain.

I

IRA4

Creates an AUTOMATIC chain delimiter.

j

IRA7

Tests for end of chain.

SCNCHN

Scans curr~nt AUTOMATIC chain; determines whether reference belongs
to it.

SCRUBI

Removes independent iteffi dictionary references from the stack of
dictionary references upon which items in the AUTOMATIC chain
depend.

SC24

Adds ON conditions to first automatic zone.

SC31

Adds temporaries (t}'pe 2) and independent items to first zone.

SC35

Determines list of dependencies for array bound expressions.

SC39

Determines list of dependencies from INITIAL attribute.

SC40

Determines list of dependencies from DEFINED attribute.

SC44

Adds dependent items to subsequent zones.

SCSO

Determines list of dependencies for string length expressions.

SETCHN

Scans AUTOMATIC chain from each ENTHY type 1 entry.

SORCH

Sorts chain in order of dependencies; creates zone delimiter dictionary entries.

296

I
I

I
I

SRCH2
L __________________

!
i

~

Scans second file statements for dictionary references of labels,
~
data. items, and structures, which may belong to the current AUTOMAT-~
IC chains.
__________________________________
__________________________________ J~

Table PT.

Phase PT storage Allocation AUTOMATIC Storage

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

I
IMain Processingl
I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
~.-----------------------------------+---------------+-----------------------------------~
IScans stacked CONTROLLED chain for IMYNAM
IDVSIZE
I
I
I
I
I largest dope vector
~-----------------------------------+---------------+- ----------------------------------i

IInitializes ENTRY type 1 chain scanlDSALOC
land DSA
I

IMKSTAT
I

I
I

t-----------------------------------+---------------+-----------------------------------i
IAllocates slots for ON conditions

I~KSTAT

IDSA4

I

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

IAllocates storage for workspace andiDSA10
Ifor DSA addressing vector
I

INone
I

I
I

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

IScans AUTOMATIC chain and al16catesiDSA16
Istorage for dope vectors
1

ICOPY, DVSIZE, INITDV, MKSTAT,
ISTDVIN

I
I

t------------------------------------+---------------+-----------------------------------i
IAllocates BUY workspace

IDSA17

INone

1

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

IAllocates storage for parameters

IDSA19

INone

1

t------------------------------------+---------------+-----------------------------------i
IAllocates storage for double preci-IDSA25
Ision variables
1

INone
I

I
I

r------------------------------------+---------------+-----------------------------------i
IAllocates storage for single preci-IDSA29
Ision variables
1

INone
I

1
1

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

IAllocates storage for character
I ~3trings

IDSA38
I,

INone

1

I
I

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

IAllocates storage for bit strings

IDSA46

INone

I

t------------------------------------+---------------+-----------------------------------i
IAllocates storage for arrays and
Isecondary dope vectors

IDSA54
1

ICOPY, INITDV, MKSTAT, SDVCDE
1

I
I

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

IAllocates storage for structures

IDSA68

ICOPY, MKSTAT

I

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

IGets VDA and initializes dope vec- ~DSA72
Itors for adjustable regions of
I
IAUTOMA1IC chain
I

ICOPY, INITDV, MKSTAT, STDVIN

I

I

I

I
I

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

IAllocates
storage for DEFINED iternslDSA98
L
____________________________________
_______________
~

INone
___________________________________ JI

~

section 3: Charts and Routine Directories

297

Table PTi.

Phase PT Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
, Function
I
~------------------t---------------------------------- ----------------------------------11

CONTi

Scans controlled chain for size of longest dope vector.

COPY

Compiles code to copy skeleton dope vector into real dcpe vector.

DSALOC

Initializes ENTRY type 1 chain scan and DSA.

DSA4

Allocates slots for ON conditions.

DSA5

Allocates standard save area and flag bytes.

DSAiO

Allocates storage and workspace for DSA addressing vector.

DSA16

Scans AUTOMATIC chain and allocates dope vectors.

DSA17

Allocates BUY workspace.

DSA19 (PU)

Allocates storage for parameters.

DSA25 (PU)

Allocates storage for double precision variables.

DSA29 (PU)

Allocates storage for single precision variables.

DSA38 (PU)

Allocates storage for character strings.

DSA46 (PU)

Allocates storage for bit strings.

DSA54

Allocates storage for arrays and seccndary dope vectors.

DSA68

Allocates storage for structures.

DSA72

Initializes dope vectors for adjustatle regions of AUTOMATIC chain. I

DSA74

stores pointer to skeleton second file statement.

I
I

DSA98

Allocates storage for DBFINED items.

I

DSA16i

Allocates storage required for dope vectors.

I

DSA162

Compiles code to initialize dope vectors.

I

DSA952

Gets VDA for this region of AUTOMATIC chain if required.

I

PVSIZE (PU)

Determines size of dope vectors.

INITDV

Compiles code to initialize address slot in dope vector.

MKSTAT

Makes a second file statement.

MYNAM

Scans CONTROLLED chains.

I
I
I
I
I
I
I

SDVCDE (PU)

Compiles code for secondary dope vectors.

I

I:
II
Ii

I,

I:

II

Ii

ILSTDVIN
Initializes structure memter dope vectors.
__________________ __________________________________
__________________________________ JII
~

298

Table QF.

Phase QF Storage Allocation Prologues

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

I
IMain Processingl
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~--------.---------------------------+---------------+-----------------------------------~
IScans text for statement labels,
IQFOOOO
IQBEGEP, QB~ROL, QECP, QMCVE, QPHOL, I
IQSL
I
IPROCEDURE statements, BEGIN state- I
Iments, BEGIN END statements, and
I
I
I
lend-of-program marker
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses statement label pseudoIQSL
IQMOVE
I
Icode items
I
I
I
~----------------.-------------------+---------------+-----------------------------------~
IFrees text storaqe at end of phase; IQECP
IQMOVE
I
Ireleases control
I
I
I
~-----------------------------------+---------------+- ----------------------------------i

ICreates stereotyped prologue for a IQBPROL
IQADJAL, QFSKIP, QF020i, QMOVE
I
IBEGIN block requiring a dynamic
I
I
I
Istorage area
I
I
I
~----------------.-------------------+---------------+-----------------------------------~
Icreates stereotyped or special
I QPPROL
IQADJAL, QFSKIP, QF020i, QMOVE,
I
Iprologues for PROCEDURE statements, I
I QONPRL
I
Idepending on conditions.
Processes I
I
I
Istatement label pseudo-code items
I
I
I
~----------------.-------------------+---------------+ -----------------------------------i

Icreates a compiler label rrarking
Ithe return from a BEGIN block

IQBEGEP
I

IQADJAL, QF020i, QMOVE
I

I
I

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

Icreates a prologue for ON block

I QONPRL

IQADJAL, QFSKIP, QF020i

I

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

IAssembles code to initialize DSA
IQADJAL
IQMOVEi
I
Idope vector data areas, and to
I
I
I
lallocate variable data areas
I
I
I
~-----------------------------------+---------------+-----------------------------------~
ISkips second file statements
IQFSKIP
INane
I
Ifollowing a block heading statement I
I
I
~.-----------------------------------+---------------+-----------------------------------~
IObtains new buffer and chains it tolQF020i
INone
I
Ithe previous one
I
I
I
~-----------------------------------+---------------+- ----------------------------------i

IMoves input text being skipped fromlQMOVE
linput buffer to output buffer
I

INone
I

I
I

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

IMoves a second file statement,
Ipointed at by PARi, to the prologue
Ibeing
generated
L.
___________________________________

IQMOVEi
I
I _______________

~

IQMOVE
I
I
I
I ___________________________________ JI

~

Section 3: Charts and Routine Directories

299

Table QF1.

Phase QF Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------1
I Routine/Subroutine I

Function

I

~------------------+---------------------------------- ----------------------------------

QADJAL

Assembles code to i~itialize DSA dope vEctor, variable data areas,
and to allocate variable data areas.

QBEGEP

Creates a compiler label marking the return from a BEGIN block.

QBPROL (QG)

Creates stereotyped prologue for a BEGIN block requiring a dynamic
storage area.

QEOP

Frees text storage at end of phase; releases control.

QFSKIP (QG)

Skips second file statements followin0 a PROCEDURE or BLGIN statement.

QFOOOO

Scans text for statement labels, PROCEDURE staterrents, BEGIN statements, BEGIN END statements, and end-of-program marker.

QF0201 (QG)

Moves code to output buffer; obtains new buffer if required.

QF0360

Tests for external procedure.

~F0370

Generates prologue for GFT DSA.

QF0570

Generates code to copy argument and target addresses.

QF0625

Tests for entry points.

QF0860

Tests end of chain.

QFl172

Tests end of first reqion.

QFl194

Extracts mapping code frow second file.

QF1215

Tests for storage required.

QF1511

Removes VDA accumulator assignment ccde from mapping code.

QMOVE

Moves text from input buffer to output buffer.

QMOVEl

Moves second file statement to prologue being generated.
Creates prologue for

IUONPRL (QH)

I

I QPPROL (QG)

eN block.

Creates stereotyped or special prologues for PROCEDURE statements,
depending cn conditions.

I
I

I
I
I
l
I
I
I
I
I

I
I
I
statement label pseudo-code
items.
lIQSL
__________________ IProcesses
__________________________________
__________________________________
JI
~

300

Table QJ.

Phase QJ Storage Allocation Dynamic Storage

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

I
IMain Processing I
I
Statement or Operation Type
I
Routine
I
Subroutines Used
I
I
~-----------------------------------+---------------+-----------------------------------~
IGeneral scan of text for ALLOCATE, IGSl
IALLec, BUY, BUYP, FREE, TRP1.
I
IBUY and FREE statements
I
I
I
~---------------,--------------------+-~-------------+-----------------------------------~
IAllocates items not requiring dope IAL20
IAL15, TRP2
I
Ivector
I
I
I
.-----------------------------------+---------------+- ----------------------------------~

IGen8rates code to move skeleton
I MOVEDV
ITRB2
I
Idope vector into workspace for
I
I
I
Icontrolled variables
I
I
I
.-------~---------------------------+---------------+-----------------------------------~
ILooks ahead to reverse pointers forlREVPT
IGS1, TRFl
I
IALLOCATE statements
I
I
I
.-----------------------------------+---------------+- ----------------------------------~

IAllocates storage for controlled
I string

IAL28
I

IGS1, LIBC1, LIBC2, SCANSF, TRF2

I

I

I

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

IAllocatE storage for controlled
larray

IAL27
I

I ABOUND, LIBC1, MOVEDV, PREVAL,
ISCANSF, TRF2

I
I

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

IAllocates storage for controlled
I structure

IAL29
I

IBNDEXP, LIBC1, MOVFDV, NXTREF,
I NXTVAR, PREVAL, SCANSF, TRF2

I
I

.-----------------------------------+---------------+-----------------------------------i
ILoads Library call parameter reglister to free allocated storage

IFREE
I

ITRF2, TRF3

I
I

I

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

IMoves skeleton dope veotor for
I bought temporary

IBUYP
I

ITRF2
I

I
I

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

IBuys storage for temporary array

IBY14

ISCANSF, TRt2

I

.-----------------------------------+---------------+-----------------------------------i

IBUYs storage for temporary struc-

IBY13

ILIBC4, NXTREF, NXTVAR, SCANSF, TRF21

I-t urE:

I

I

I

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

IPlaces initial value code line for IAL15
Icontrolled variables
I

I NXTRF, SCANSF
I

I
I

•._----------------------------------+---------------+ -----------------------------------~

ISkips scan register over initiali- 18KIPTX
I
I zation st.atements

IGSl
I

I
I

•._----------------------------------+---------------+ -----------------------------------~
IGenerates code to set a pointer to IPREVAL
Ithe previous allocation.
I

ITRF2
I

I
I

.-----------------------------------+---------------+-----------------------------------i
ISearohes dimension tables for
ladjustable bound expressions

I ABOUND

I

ISCANSF
I

I
I

.-----------------------------------+---------------+-----------------------------------i

IGenerates code for temporary varia-ISTMP
ILIBC3, TRF2
requiring only a dope vector
I _______________ I _________________________
lIbles
____________________________________
~

~

I

~

_________ JI

Section 3: Charts and Routine Directories

301

Table QJ1.

Phase QJ Routine/Subroutine Directory

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

/ROUTINE/SUBROUTINE!
FUNCTION
\
~------------------+--------------------------------------------------------------------~
ABOUND (QK)
Searches dimension tables for adjustable bound expressions~
ALLOC (QK)

Ascertains the type of allocate statement.

AL15

Places initial value code line for controlled variables.

AL20 (QK)

Allocates items not requiring dope vector.

AL27 (QK)

Allocates storage for controlled arrays.

AL28 (QK)

Allocates storage for controlled strings.

AL29 (QK)

Allocates storage for controlled structures.

BNDEXP

Generates or extracts code to set the adjustable bounds of structures.

BUY

Ascertains the type of

BUYP

Moves skeleton dope vector for bought temporary.

BY13

Buys storage for temporary structure.

BY14

Buys storage for temporary array.

BY15

Buys storage for temporary string.

FREE (QK)

Loads Library call parameter register to free allocated storage.

GSl

General scan of text for ALLOCATE, BuY, and FREE staterrents.

LIBC1/LIBC2/LIBC4

Places the library calling sequence for controlled storage in
sequence in the text.

MOVEDV (QK)

Generates code to move skeleton dope vector into workspace for controlled variables.

NXTREF (QK)

Obtains the next structure base element reference.

NXTVAR (QK)

Obtains the next varying array base element reference.

PREVAL (QK)

Generates code to set a pointer to tlle previous allocation.

REVPT
SCANSF

DUY.

Looks ahead to reverse pointers for ALLOCATE statements.

!

Places second file

state~ent

in line in the text.

SKIPTX

Skips scan register over initialization statements.

STMP (QK)

Generates code to buy storage for terrporary variables which only
require a dope vector.

TRFl

Transfers input text to output.

TRF2

Adds text skeletons to the output text.

!TRF3
Adds the Library calling sequence to the output text.
l __________________ __________________________________ __________________________________ .1
~

302

.Table

Q~.

Phase QX Print Aggregate Length Table

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

statement or Operation Type

IMain Processingl
I
Routine
I

I

Subroutines Used

I

~-----------------------------------+---------------+-----------------------------------~

Iscan storage chains in dictionary
ISCANC
IANAGG
I
Ifor aggregate entries
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IAnalyze aggregate dictionary
IANAGG
IANCOB,FINALA,FIRS~A,FCR~AL,GETVO,
I
lentries
and
print
table
entry
I
IGETSB,PRALEN,PRHED,VOPLUS
I
L ___________________________________ _______________ _ __________________________________ J
~

~

.Table QX1. Phase QX Routine/Subroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
ANAGG
Analyzes dictionary entries for a major structure or non-structured
array.
ANCOB

Finds original major structure dictionary entry for a COEOL major
structure.

FINALA

Calculates address of final basic element of a major structure.

FIRSTA

Calculates address of first basic element of a major structure.

FORMAL

Calculates length of a non-structured array.

GETVO

Gets virtual origin of a dimensioned variable.

GETSB

Sets

PRAIEN

Prints an entry in the Aggregate Length Table, and gets statement
number.

PRHED

Prints main heading of table.

SCANC

Scans STATIC, AUTOMATIC and
aggregate entries.

SETPH

Prints first page heading and sets print buffer for subsequent page I
headings. headings.
I

~ointer

to BCD in a dictionary entry.

CON~ROLLED

~

chains in dictionary for

I
I
I
I
I

I

IVOPLUS
Calculates address of first or last
element of major structure.
L. __________________ _________________________________
___________________________________
JI
~

Section 3: Charts and Routine Directories

303

Chart 09. Register Allocation Logical Phase Flowchart
******
*nq
* Al*

***

x
*****
*10 *
* Bl *
***

304

Phase RA Overall Legic Diagram

Chart R1\ •

•••••
••
•

• RA •
• Al·

lAA

K

••••• s l · · · · · · · · · ·

... x:••
•

•

INPUS~AN
TEXT

...
••••

• ••
:",

.................•
,

:x .................................................. x.••••.•...••..•.••••.••.. tc: •••••••••••••••••••••••• -:

.~

'•.

• Bl •

•

ACT~ ••• *C~..........
• •••• C3 ••••••••••
•
TACK.
• GET NEW STACK •
••
•• YES
•
RMATION •
• Er.TRY FOR NEW.
••• ~ROC/BEGIN••••••••••••
F"'~~'fi~A~~S : ••••••••
'\~~h~~
Cl···..
••••

•••• ••••

ANI'

X:

: .................:

X:

•

: •..•
: •••• i.~~~~~ ••••:

• NO

K

•••
ACTl
01
••
• ••••
~ ••••••••••
••••
•
lIN 0 T E .
• •••
••
•• YES
•
S A K "I
•
•
•
•• PROC'/BEGIN' •••••••••• X.
••••• X. Sl •
••
••
•
ORA&E
•
•
•

....
•• • ••NO
K

E~

•.

••••

•••

..

J~RT

~AT1H
.•••••••••••••••••
. ....

••...•••.. x••
ME~!..

.. ..
p~e

•• :!A

:
.................

• NO

ic

DRT~U,.~~UU......

••' . p{EUrr-·· •• YES
:
00
........... X.
• INS RU TION.
•

.

til.

.....J'.

x.

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

• NO

Fl···..

*..*

•

~

K

ACT l~

Gl···..

....
•• ••

AlO

F3°··..

x.

~

• ....

0 IHT~R~~~y:
'.·~O~~A!EE~·.'.* YES
RE~ER NCES
••••••••• K*, PR DU fO
•.••.••. X.:
AND 0 FSETS •
•• B FO E ••
•

•

•••••••••••••••••

•• ••

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

•••
UPSN
GENFLP
E2
••
• ••••~3..........
~4...........
•• ·;TAT M Nt' •• YES
:
Gf~~Alg:
:
Ge~~Al~
:
:
Ng!.gl'~N ••••••••••
¥A~AT~
•••••••••
~POATE
•••••
. . : . \lUES
S ~lS~ NT
:
x
:
ON~~FA~s
:
)(

•••• YES

*...
•• ••
.~

F4.......... :

rF.~~6RngM
fOR~O

:
:
*.0 ••
•

.•••••••••••••••••.
f)OR"SS

•••G2 ••••••••••

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

••·:B}~k~TE·· •• YES
:
•••• MXt\Kh ••••••••••••

x:

~MPo~O

AB~8~~TE

:
:

•

• NO

•

•• X. Rl •

K

• •••••

Hl···..

ACT12 ••• H2 ••••••••••

•• ' ;ROlOGUE ... • •• YES
: TaT:MR'H~?AI~G :
••
INSERTION •••••••••• X. INSTRUd "IS •
••
POINT ••
•
"I HISER ON •

•••• ••••

: .....~1~~ •••••• :

....

• NO

o.

• NO
••••••

••

*.

J1

...ic

x

••

END ••
OF
••
PROGRAM
••

*. ••• * .*

•• Rl ••
••••• •

.*

• YES

K
•••••
• RF •

..·

• 1.1·

s2ction 3: Ch3rts and Routine Lirectories

305

Phase RF Gver311 Lcgic riagraw

Chart RF .

.....

..•

• RF •

• Ai·

.....Al··········
X

.GET TEKT BLOCK •
• FOR OUTPUT AND •
• SCRATCH STYRAGE.
:
A~gRsH~K~ :

·......
:
:
·•••••••••••••••••.
•••••••••••••••••
.
• III •• K.

• •••• •

: x•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

0 • • • • • • • • • • • • • • • • • • • • ell • • • • •

P91NIT
x
••••• 81..........
••• X.
•

SCAN TEXT

e ••••••••• :

LB

•
• •••• B5 ••••••••••

: €g~~l~VH :
• •••••••••••••••• X.IIjSTRUCTlON AND.X •••

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

•
•

•

x

C2..........

•.•.

•••
OBREGS
C1
••
• ••••
*C~ ••••••••••
•••• USI NG •••• YES
:
RE~a~~~:
: SC~~~~~G~~IER :
••
PfEUDO•••••••••• X.
UiAGE AND
••••••••• X.
RE~U~~T~
•
:
~:~HD:
:
PEN
:
• I~~ RUCT!~N.

•• ••NO

•••••••••••••••••

•••••••••••••••••

OUTPUT

•

•••• *C4.~ ••••••••

•• ~~N~RATe ••
:
~ERI HE~~
:X•••••••••••••••••
•••••••••••••••••••

• YES
*.
00;..
•
•• ·~EGAI~hRS· •• YES
... ·8RANCH •••• NO :
e. AVA LA8lE .e •••••••••••••••••••••••••••••••••• X*.
IN OR. OUT • * ••••
••
••
••
POINT ••
03

e.

ic
.e.
••

.

.*
*••
*
• NO

e.

*•••
•
l(

XXo ••••••••••••••••••••••••
E1···..
LAOi •••• e2 ••••••••••
••••
•
GET FREE
•
•• ADDRESSING •• YES
• REGISTER FROH •
NSTRUCTlO~ ••••••••••• X:~~~MIH H~~'
••••
•
IF NONE
•

.. ..

.'.!

E3

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

·ic

••

••••

: •••.• :

• NO

•••

. : . E~~r
.:.~?
•• =~GI e~~..

•• • ••YES

LAn.
• ••• *f" ••••••••••

•

I NIt

•.•• ••.•

••••: ••••: :•

:l~~UU~~.tlk~.:

• NO

. .....'3..........
:ADIHOV
••
•

•

X

LPROC,
LEND

••

•• ";0( IPROC:· ••

• •••• HZ ••••••••••

yes
:
OR Ub~MATE:
•• ~~GIN/BEGIN: •••••••••••
BL~l~C~N~~IES

.. ..

*..*
• NO

Kl

...x

••

*•

• NO
END
••
•••••••• PR8~RAH ••••

*.

*•• *

.....
•.Al·
·
•

x

·TF •

306

••

YES

K:•

......

:"'XX:
B1 :
•
••••

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

XPAN
•
RE
NG.

• •••

•
•
1t~.uloNS
1r.HpUT.••••• x.• B1 ••
•••••••••••••••••••
••••

•

A

••• ". IN 9

••
••

.

••••••• ••••• •••••• ••••••• X.

•••

•••

•

:

:
••••••• ~.l ••••••

• • F1
••••
: ••• :~f
•• PROLOG
•• yeS
• AOOR~~SING.
•
••
INseRTION •••••••••• K. INSTRU T ONS ••••• x.
•• POINT ••
•
Fit H
•
•

H1

LOOK-AHEAP

..... X:: TR~UINVlRef6
FR
Ny

("I

••

Table RA.

Phase RA Register Allocation Addressibility Analysis

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

statement or Operation Type

IMain Processingl
I
Routine
I

Subroutines Used

I
I

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

IControls scan of source
I

ILAA
I

IACT1, ACT2, ACT5, ACT8, ACT9,
I ACTiO, ADCPUF, GETSBF

I
I

t-----------------------------------+---------------+-----------------------------------i
IProcesses RX, RS, or SI instrucItions

IACT3
I

IADTEST, DRTEST
I

I

IProcesses 55 instructions

IACT4

IADTh5T, DRTE5T

I

I

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

ICompiles code for start of PL/I
with label, 2.
Iwithout label, 3. compiler label

I Statement: 1.

IACT15, ACT14,
IACT16
I

IADCBUF, GENFLP, UPSN
I
I

I

I

I

t-·----------------------------------+---------------+-----------------------------------,

IProcesses PROCEDURE and BEGIN
I blocks

IACT6
I

IADCEUF
I

I
I

r-·----------------------------------+---------------+-----------------------------------,
Iprocesses END statements on PROCE- IACT7
IDURE or BEGIN blocks
I

IADCBUF
I

I

t

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

IAdds text to output string

IADCBUF

IGETCBF

I

r-----------------------------------+---------------+-----------------------------------,
IAdds text to insertion file

IADIBUF

IGE1IBF

I

r----------------·-------------------+---------------+-----------------------------------,
IObtains new source buffer

IGETSBF

INone

I

t-----------------------------------+---------------+-----------------------------------,
IObtains next output

buffE~r

I GETCEF

I NonE

I

r-----------------------------------+---------------+-----------------------------------,
IObtains next insertion file buffer IGETIBF

INone

I

r-----------------------------------+---------------+-----------------------------------,

IExamines dictionary reference in
I source

IDRTEST
I

IADINST, DECOMP, SETBLK
I

I
I

r-----------------------------------+---------------+-----------------------------------i
IProduces recovery code when literaliADTEST
loffset greater than 4095 is met
I

IADCEUF
I

I
I

t-----------------------------------+---------------+-----------------------------------,
ICreates coded addressing instruc-

Itions
L
___________________________________

IADINST
IADCBUF, ADIBUF
I
I _______________ I _ __________________________________ JI

~

~

Section 3: Charts and Routine Directories

307

Table RAi.

Phase RA Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

Function

~------------------+---------------------------------- ----------------------------------·i

ACTi

Copies non-special three-byte item to output.

ACT2

Copies

ACT3

Processes RX, RS, or 81 instructions.

ACT4

Processes SS instructions.

ACT5

End of block routine.

ACT6

Processes PROCEDURE and BEGIN blocks.

ACT7

Processes END statements on

ACT8

End of source text routine.

ACT9

Action of start of

ACTiO

non~special

five-byte item to output.

co~mon

PROCEDU~L

or BEGIN blocks.

block of prologue.

IAction at end of prologue.
arsolute code to output streaw.

ACT12

copi~s

ACT13

Creates ADI instruction at prologue insertion point.

ACT14

Compiles code for start of PL/I statement with label.

ACT15

Compiles coce for start of PL/I statement without label.

ACT16

Compiles code for start of PL/I

ADD/ADD2

Generates store of calculated address.

ADCBUF

Adds text to output string.

ADIB[JF
ADINST

I
I
I
I

sta~eroent

compiler label.

Adds text to insertion file.

I

ADTEST

I
I
I
Produces recovery code when literal offset greater than 4095 is met. I
I

Creates coded addressing instructions.

ATD

Tests whether previous offset is out of bour-ds.

DECaMP

Decodes dictionary reference.

DRTEST (RB)

Examines dictionary reference in source.

DTY

Scans step table and generates addressing instructions.

GENFLP

Generates code to set bits on and off in a prefix ON-slot.

GETCBF

Obtains next output buffer.

GETIBF

Obtains next insertion file buffer.

GETSBF

Obtains next source buffer.

LAA

Scans input text.

L125

Moves addressing instructions to IN-LINE.

8ETBLK

Finds block number of referenced iterr.

UPSN

Generates code to keep the statement number slot in the LSA up to

~

I
I
I
I
I
I
l
I
I

date.
L__________________ __________________________________
- _________________________________ .JI
~

308

Table RF.

Phase RF Register Allocation Physical Registers

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

Statement or Operation Type

IMain Processingl
I
Routine
I

I
I

Subroutines Used

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

Icontrols scan of text
I

IZ9
I

IADCBUF, ADIMOV, BRi, BH3, BR4,
I
I
I GETNX'I', LBAL, LBALf{, LECTR, LEOE,
1
1
ILEOP, LRi, LR3, LR4, LF6, LR7, LR9,1
I
I
I LSH 1FT, OB}{EGS
I
~-.----------------------------------+---------------+-----------------------------------~
IProcesses PROCEDURE or BEGIN state-ILPRGC
INone
I
Iment
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses end of PROCEDURE or LEGINILEND
INone
I
I block
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IProcesses requests for registers;
IOBREGS
IBRGUSE, LOADi, STOREi, STORE2,
I
lallocates physical registers
1
IREGUSE
I
~-.----------------------------------+---------------+ -----------------------------------i

ICompiles code to store syrrbclic
I registers

ISTORE2
I

IADCEUF
I

I
I

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

ICompiles code to store assigned
I registers

ISTOREi
I

I

IADCEUF
I

I

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

ICompiles load of physical registerslLOADi

IADCEUF

I

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

ICompiles load register
I LOADRG
IADCPUF
I
~-----------------------------------+---------------+-----------------------------------~
IExpands coded addressing instrucIADIMOV
IADCEUF
I
Itions
I
I
I
~-----------------------------------+---------------+-----------------------------------~
Il\dds to output buffer
I ADCBUF
I None
I
L ___________________________________ _______________ _ __________________________________ J
~

Table RFi.

~

Phase RF Routine/Subroutine Directory

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

I Routine/Subroutine I

Function

I

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

ADCEUF

Adds to outfut buffer.

ADIMOV

Expands coded addressing instructions.

BRGUSE

I
I

.

I

I

Tabulates use of base register in look-ahead.

BRi (Ril)

Processes RX branch instructions.

BR3 (RH)

Processes BeT instructions.

BR4 (RH)

Processes RR branch instructions.

F'RTEST

Scans list of free registers to make even-odd pair.

GETNXT

Obtains next block.

LADi (RH)

Processes ADi (addressing) instructions.

I

I
I

ILB
(RR)
IConstructs
and puts out completed _________________________________
instruction.
L __________________
__________________________________
_
~

section 3: Charts and Routine Directories

309

Table RF1.

Phase RF Routine/Subroutine Directory (cent'c)

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Function

I

t------------------t---------------------------------- ----------------------------------~

LBAL (RH)

Processes BAL instructions.

LBALR (RH)

Processes BALR instructions.

LBCTR (RH)

Processes BCTR instructions.

LDROP (RH)

Processes DROP pseudo-instruction.

LEND (RH)

Loads end of PROCEDURE or BEGIN block.

LEOB (RR)

Processes end-of-block marker.

LEOP

Processes end-of-program marker.

LOADl

Compiles load of physical registers.

LOADRG

Compiles load register.

LPROC
LR1

LR3 (Rh)

Processes floating-point instructions.

LR4 (RH)

Processes SS instructions.

LR6 (RH)

Processes instructions where a load of first operand is required, no
operands are changed, e.g., ST.

I

I

I

I
I

Processes SI instructions.

ILR9 (RH)

Processes instructions in which no load of first orerand is needed,
and it is changed, e.g., LA.

LSHIFT (RH)

Processes shift instructions.

OB560(RG)

Tests whether all registers are available.

OB630 (RG)

Generates stores of registeLs if branch in or out.

OB895 (RG)

Generates code to load registers.

P9INIT (RH)

Main text scan.

OBREGS (RG)

Processes requests for registers; allocates physical registers.

REGUSE

Tabulates use of registers in look ahead.

STORE1

compiles code to store assigned registers.

STORE2

compiles code to store symbolic registers.

W4

Extracts ADls at prologue insertion roint.

(RH)

Z9 (RH)

310

I

I

Processes instructions in which first and second operands require
loading, and the first is altered, e.g., AR.

(~H)

L __________________

I

I

Processes PROCEDURE'or BEGIN statement.

(RH)

I LR7 (RH)
I
I
I

I
I

~

Controlling
scan of text.
__________________________________ __________________________________ J

Final Assembly Logical Phase Flowch3.rt

Chart 10 .

•••••
•••

·1(\ •
• 81·

••'••• Bl.a••••••••

:~:~~i!.-.-.-.-I!:

• ASSIGN OFFSET.
•
TO lA"IEl S
•

•••••••••••••••••••

X

····••Hl·········4,
.-11>-.-.-.-.-.-.-'"
lIE'"

.SUTIC

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

.FURTHfR STATIC 4'

.INIT I Al t

ZATfO~

•

4'

4'

.1 >
••

·x..

JJ
••
••••

•~.

.. ..
.....

Lt ST TEKT

*.

••

• NO

K

·KA •

• AI·

•••

• •••• Jz ••••••••••

.I.IST
•.••••••••••
YES
.- .... -.-.-.-.-.-.
K•

••

UF •

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

•

*

LIST

TF.~T

~

•

ic

·~A

•

• AI·

• *

•

section 3: Charts and Routine Directories

311

Cbart TF .

Phase TF

~ver311

Logic

•••••
·TF •
• A1·
•••

Diag~a~

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

....
.... ....
x

A3

·.......

......
•••••
•• 82 •

• 81 •• X.

.....81..........
X

ILClOZ"

:
~HT8~~~~~:
• FROM TA8LE
: USI~~ l~~ENT :

:

Cl

x
•••

••

ILf)f'17

:

BLOCK

83

.X..........

••

•

~~:fNT~QT
BLOCK

: •••• x: 81 :
•
•
•

•••

••

NO •••• NO OF •••• YES
~ROGRAM ••••••••••
••••••••
..~ . .
il:

l~~b~ ~OINV~~
•••••••••••••••••

•••••••••••••••••

OFE~gxT ·:.~;~ ••••• x:

x

X

ITEM FRgM

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

I Ll)(\22
• •••• A" ••••••••••

• NO

gPcbK~~~1:

1 .X.... ....•

••

•

.....8Z..........

•••••• :

IL0003

"':.
••

•••

:

I LOlll!)
• •••• C2..........

•• •••

:T

••
•

• •••• C3..........

• •••• C" ••••••••••

•• ·;ROCEOUR:· •• YES
: ~~l~ ~Mll~¥~l
25~ti~~'~~:
SET LOCATION:
••
HARKER
•••••••••• X. VAL UE fN ET~ ••••••••• lI.A~igjS RiYUIR@O* •••••••• X.
iOUNTKR
: •••
.'..
..'.
: ~~O~O~I~I~~vy :
:OF S71~SlNMNl :
:
0 IE O .

:

•• ••

• ••••••• "'........

:

:

• •••••• i. •••••••

• ••••••••••••••••

: ....
82 :
• ...

Xli:

• NO

x

01

•••

••

ILnOll

• •••• 02..........

• ••••03..........

..:

:...............:

!L0015
• •••• E2..........

• •••• F.3..........

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

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

pft°o

• •••• ~4 ••••••••••

•

•• ·*eNO OF •••• YES
: S~~~CllFT~~a~ :
:
Sl~~
Lo~n~M
:
••
PROCEDURE •••••••••• x. IN LOCNl SLOT ••••••••• x. CU~~~¥ TOTAL ••••••••• X. COUNTER FROM •••••
•• HARKER ••
•
OF
•
• PROGRAH sIze •
.Eft OF CONTAIN-.
X

.'.. .•.•

:.~~!::.n:~.l

VS :

:

:.1~~.:~i~'2~~~.:

• NO

x

E1

•••

••

• ••••

. . . . PL8 S •••• YES
: o~L~~fic~M~e :
:
~MUekof~:
••
OR
•••••••••• X.
SO bAR IN
••••••••• X.ZaRO ~~~~ ~PACE ••••••••• I(.
•• • /C8S •• ' .
:LC~~~T SFL~f~3 :
:F R ~lSCnNi INC :
:

.. ..

• NO

·x

F1

•••

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

ILl' 01"
• •••• FZ..........

•• N~N-8RANC~· •• YES
:
••
HACHINE
•••••••••• X.
••
INST
••
•

.. ..

•

• NO

x

Hl

•••

••

··....••••..
• NO

;

• "3 •

312

Tn LOCATION
COUNTER

•

x ......

••••• )(. 82 •
•
•
•

•

••••

1l",!l9

••••
••
•• YES
••
LABfL
••••••••••
"'.
••
••
.••

* •• *

A~2sH~gf~o~F:

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

*..*

•

• •••• H2 ••••••••••

•
ASSIGN THF..
• •••
•
cuRRENT
•
•
...
X.
LOC'!T ION
••••• X. 82 •
• COUNTFR VALUE.
•
•
•
AS OFFSET.
• •••

•••••••••••••••••

:

e"...........

SE~ij:RII ~~LOG8HS u, E

:

OFF ?:C8S'

:

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

•

• ••••

~verall

Phase TJ

Chart TJ.

Lcgic Diagram

••••
··••••·
•

.•.

...

~

.•

·••

~
••• '~·Al··········

IU")OIl

A3 •...

•• 1".

•

.*

A3

••

*.

•
•
NO..
END
••
• 02 .X......
OF.~
••
••
•• PROGRA", ••

• INUI ALilATlON •

••••••••••••••••••••

111..*
*•• *

..111111

• YES

·

X

•••••• B3···••••• •••
: Cn~H~~ET~~f :
•
• 8LOCK ••

...................
......,.

.•..'.91..........
X

ILI\()1}3

* •• JC • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • ., ••• o •••••••••••••••••••
ILt!O . : . .
.l••• x
~3 ••••••••••

oz..........
..,..........

1.X.........

:
EfsT8R~~~~:
• FROM T!~l
: uSts~ ~gD ENT :

...........

•• OZ •••••

:

:

~.....

K

•••

......
.. ..
t

• NO

ic
HI···..

...

LABEL

••

....

•• Jl
• :'"
••
te.

•
•• YE:S
...
••••••, •••••• )(:

•

~

.•.x ........

.. ....
··....••••..
x

• A3 •

...

•• H2..............

x:•

I LZrI(16

H3· ... •••

•
••••
ASSIGN NEW.
•• CHANGE
•• YES
TO
: •••••••• X••• ~~g <\t~~~

nFEUh

IL(ln21
:.. HJ~;:~rM~r . .:

.:.~~:~ •••••

....

••

• NO

...
... .....
All TREATEO'"
•
•
t"l SA .. e WAY "' •••• l(. 02 ...
AS IN te .. T F .
•
...

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

• '"

MVC

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

X'"

I v'~12

••••

••
••••

x

ILU!l2
• •••• GZ ............. .

.Gl"'ACH.•• "'.
•• NST, PLBS.t •• YES
!
8S END OF ••••, ••••••
••
IILOCK .'"

•• P

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

8PtT~"b.~~~:
:Fa~s f~~RS~A~N :
F~O'" .x ••••••••• PRO~' ANO END.
T~~b~ ~(1I2V"~ :
:
OF EXT BLOCK:
~...

rg , :•
COMPRESS

I~HE=~~

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

.. ..
x
··......
.
••••.
..

••••
.~

• ••••H4 ........... .

•
•

SET OPT8 ON.
• •••
IN F.Tt O F .
•
•
C~~~E~~p~~QC. : ....
02 :
swi TCH
•
• •••

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

.......... ~ x:
•

l(:

• 02 •

*

•

x

•• ••••
•
02 •
••••

·.

section 3: charts and Routine Directories

313

Phase TO

Chart TO.

~ver311

Lcgic Diagram

X

•••••• B1··•••••••••
• GENERATE BASE.
: FOR ~f2E~NTRV :
•••••••••••••••••••
lG421 •••

•

•
:

c1.:•••••••••
MAKE 6

E~JA~2t~?ES

•

!

•••••••••••••••••••
K
••••• 01·· •••• ••••

• MAKE SO TVPE
•
F~RECT ••
•• THE ENTRV
MA IN C
• IF EXT PRO HAS.

:.~=U=~.~~.l~~.:

••••••••••••••••••••••••• e ••••••••••

••••.Gl.·········
K

LGI:'sn
•
•

SCAN
ElCTERNAL

·

lG02~ •••G3.~........
•

•
•

.

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

••

•••

.* . .

••••

H2

•• NO

••

•• EXTERNAL

•• NO

••

: )(;"0'" ••••••
• ••

..."
H3

••

EXTERNA~

•••••••••••• )(··.~~~Mn'io2~ ••••••••••• l(··~~n~C~tSN

••••

..NAME ••

• YES

• YES

•• ••

X

M. KE SO
ANn PR
TYPE ENTRIES

••••

*. ••

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

• *.

.*..

••

FILE

•

•
•
•

*0

Ie

x

H1

CONC~~~~EO

• •••
•

·····J2··········.
·.·...............
..
.

yes

••

?:.•

.. ..
•

•
•

~.

"In

"'AKE PR
TVPE ENTRV

•
•
:

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

••••••••• ~o.l(:

...x

OO

• •••• G5.;. ••••••••

•
•• 01 CT ••
•• F.~TRY FOR •• YF.S
: •••••••• X•••• OA~~~~(~

~CAN.

•
:

: •• xt snfHo~H2~N :
•••••••••••••••••

(I . . . . . . . . . . . . . . . .

r,4···..

*

•

Hlo
••
•• OICT
•• ENTRV F:lR •• YFS
•
··.~I)~f~~~lEO ••••••••••

*,

*.

.-

* ••
*
• NO

X

:

Ty~~K~Ni~Y

:

••••••••••••• x••••••••••••••••••••••••• x•••••••••••• o.

.

0 ••••••••••

.

X

•• •••1<5· ......... .

...

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

.PRnIJUCE eR TYPF •
• F.'ITRY FOR fACH •
...
"'OfJULE
...

...

314

Chart T'I •

....'"

Phase TT Over:lll Lcgic Diagram

•·TTAI·'"

••
•
X

.41• • • Al.· •••• •• ••
• INITJAL~lATI~N •
• SE T SW T~HF.
'•
• FOR PUN H LO 0 '.
•
OPT 0 S
..

·................
'...
....
.
· ..
••

Bl •• X.

*.

ILOO~;"
K
••••• Bl ••••••••• '"
:
••• x.

••••• •

B2 •
•• ••••
•

GfT BRANCH
L ST INDEx

.x ••••••••••••••••••••••••••••••••••• o ••• o •• ~o •••••••• •••••

!lOll";!:
~
•••• "'82 ••••••••••

':
:
.X•••••••••

:...............:
Cl ..
x

0 •••••

~E~R~~~GI~EUF :
P~OM TABLE 2 • •

:.l~:~!~:§,~U=.:

••.•Hz..........

.••••

•.•... i

•

•
CIt........... •
••·~RO E UR~· •• YES
: SA NC nE~~ :
:~~Nrc·.p~R ~:
• SET
~~NT •
:
••
•••••••• X. L& "'}
Of •••••••••
•
••••••••• X
••••
••••
••••
:
:
:
;RO
I :
T T
r.
•••

MA~K~R

!lOfHn

.'~

gL~T

pioNEA~~etGT1
•••••
;.2•••• ~....

•. .•

lLOO 3

~3..........

X.PRO~~~ PR~L~

~O~~n~ yA~UE

•••••• ~~HN
~~.;.1....

•• ~~
••• ~~F~~~R.
•••••

• NO

01

~
•••

ILOOll

*.

••••••

Ol...........

···.·1'13···•••••••

••••
~EAR
•
•• EN~ ~F
•• YES
• TEXT UFF~R.
.RESTORE PRiCLC
•• PRO E URE ........... X RFSTO E L CN
•••••••• X. FROM LOCH +
•• MA K R ••
4(;0IlNTER F OM •
• LOCN3 1~ TI

•••• ••••

•
•
•

: •••••••••••••••:

~2~n.l~.SU.

•
X.

••••

•
•

••••• Ie. 81. •

••••

• NO

1~~31~·
• •••

.1. *.

GENUT
El
Ef..........
• •••• ~~...........
• ,••• PL8 S••••• YES
:8vp~ftOe PReca~ :
: G~~o ftTS :8~T:
:
••
PC 8 S
........... X.
kN'D ••••••••• Ie. THE R!h~IR~O •••••
••••
••••
: TOF~P Nao.v~ :
8N 0
:

i!lY.'!+r

•. .•

:,a
•••••••••i ••••••

•••••••~~........

• NO

x

•••
Fl..

• '~··MACHI . ' •• YES
•• INSTRVC~fON
'~'..
••••

GENTXT
• •••• FZ ••••••••••
: T ~~N~~~TS 0 :
••••••
X. iNFORMATlbN .,•••• X. 82 •
: A~~x~LAf#Fl~:
• .....

.* ••••••••

•• ••

••••••••t ••••••••

• NO

·
....
....
.. ..
~
G1···..

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

1l02~~ •• G2 ••••••••••

• " END OF
•• YES
• CHA IN TO NF.XT •
•
•
•• TEXT 8LOCK • III• • • • • • • • )(. TEXT BLOCK
...... )(. 81 •
III.

••

• NO

•

••

x

•
: NO

•••
HI..

"~··~N8

•••••• '11.

RF •••• 1YES

R G AM ••• 4 • • • • • • • •

*..*
•• ••
•

H2

•••

••

IS ~OMPILi~••••
•• NO
x••••
••

USA~VlDN

*..*
•• ••
• YES

•

ILOl'17
• •••• *H3...........

.CL~AR

0 ••••••• )(.

TEleT

A~D

LO BUFFf.R

•

1~ • • • •

• o ••••• ooX:

•••••••••••••
II:

.: ........ ".......INC~~~
. .i.••••••••.
)(:F8~N~Oft~fivH~~ :

HIt ••••••••••

: MARK

C~R~NT

T[,~~AN~e"DK

:

: ••••••• ~

I
}I.
'.................

..VA
...••

•

••A2••

•• J3

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

section 3: Charts and Routine Directories

315

Cilart iJA.

Phase UA

~ver311

Lcgic Diagraw

•• ••••
UA •
• A2·
••
•

·X

UAOOI'

••••• A2..........

• •••• A3 ••••••••••

••
••
•
•
••
•••••••••••••••••• •••••••••••••••••••
••

••

• • Gf'T HEAO OF
• INITIALlZATION ••••••••• K. STATIC CHAIN

·ic

83

•••

UAOC'l5

• •••• BIt ••••••••••

••

•*
*.
•
••••••••••••••• ~;~.:.*. E~R.Y~ .*·:.x........ :•

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

.. ..

*..*

....
""2..........
:STARID~~A~

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

•

X
oz.·...

UAIt(l1

••
RNAL·· •• NO

'.·:XIfEM

FOR:
yes
•
CONST~N~
.)(..........
.INIT IALllAT ION •
••

•

X

.!.

C3

•

•

• NO

UM1C'

•

GET NEXT ITEM :)( •••••••••••••••••

..·..

••

YES

••

•••••••••• )(..

*..*

Cit.i. •.
··~:nE •.•.

.••..C5 ..••••••••
•

NO
:-.-.-.-.-t~t~2~:
IABLE
•••••••••• X.
•
LABEL..
• PRocess ITEM •

.....

..1)*...
Y

tl:I~~:

UA 3.,

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

UA01~ ••• D3 ••••••••••
••••
•
TXTMOY·
•• END OF
•• YES
: •••••••••••••••• X•••• Ta~S S~1~T •••••••••••• )(:CONS~~~~S~OOL :
UA013

.-.-.-.-41-.-.-.-.

*..*

•

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

•• • ••NO

•

••••• El..........

•

E2

•

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

: GET NEXT ITEM
•
•

*

••

•

Ie

.

...it

it
• *. ••

.*
*.
:X ...... ~~.:· IT~~E~EED . : .

.

AOCON ••
*.....
•

FJ

*.

••

,F *. .. *yes
••••••••

....

••.- END

STAT C
•• CHA N

••

.......

•

K

•• ••

YE!

.uo •

• NO

• B2 •

•

.....
······F5······
•
•

•.•••F2··"'····.··
.-.-.-.-.-.-.-.-.
·..................
X

•

••• ••••••••••• •••• :

X

TKTMOV·

PROCESS ITENl

•
•

:

••

.•.x

• * E"lD

: • • • • • • • • • • • • • • • • )(.0 ••

••

OF

St~llij

*.

X

*. ••

••

YES

••••••••••• ~

...

• ••••

•• ••
• "lO

H3

••

.UD •
• liZ •

• ••

••

OR *. ••
STRUCTURE ••

•• .*ARRAY

YES
• GET "lEXT ITEM .X..........

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

*.

)(

....

••
*..*
• "lO

~:~n~,

.

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

U'd8"
)(
••••• J3 ••••••••••

·................ 1'1.:.-.-.-.-.-.-.-.•

TKTMOV·

PROCESS ITf"

316

•
•

·"'····G5··•••••··••

.............
OUTPUT
TEKT

X

UA033
•
. . . . . HZ..........

•
•

FORM TFleT
IN BUFFER

•••••••••••••••••••

G3

••

····E5·······.·

•• TxTMOV ••
•••••••••••••••• •

:

K

•• ····H~·········
•
• RETURN ••

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

Chart UD.

Phase UD Jverall Lcgic Diagram

••••••
·uo
• 82·

••
•

..···C2·········.
X

: MOv~N~¥~Rij~T :
•
FROM •
• COMM!. REGt. [NYO.
•
fJSAOFF
•

S~ATlC

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

x
:••• ~o~;;.;;o
•••:
•
•
•
•

.....:

:•••

*D~~:t;
F IR~T OR NEXT •
•
O~ AOFF 8Y
STATl
OSA
LENGTH OF
• PREVIOUS OSA
OICT I NAAv.
F.N R Y . .

.x.........

........•...0....
9

•
•
•
•

•......••........
x

••••• F~.i••••••••

•. x:
•

A~CllS

eN ~~Y

AtTO •
'\. :

~Y~

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

SCAN I

•*
••

G2

.-.K

••
t.

•• VES

.*
••

G3

...

YES
••

MORE

•••• OELIMITE'\ ••••••••••• x•••• S~~II~

*••. .••*

• *.

H2..

,

.. ..

,,*

•

• )C • • • • • • • • • • • • • • • • • •

1>10

•••

H3

••••
• NO..
ITEM
•• VES
:x .. ··.D~~~U~~lnR.·· .. •• .. .,

*.

··.·····iI
•••••

·UE •
• • A3 •

x

•

•••

*••. .••*

• 1>10

•

*. ••

••• ••

H4

...,

••

)I • • • •

.. ...

CORRE~-

P8~~~~ES

••

.. ..

• •••• H!5 ••••••••••
•• VES

*...

*..*
• YES

0 •••••••••••••••••

• •• *.

••••

GElERATE

.•

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

*

• 1>10

H

CARl)

•

Te~gg~F :

"'

"'

•

e

~

"'·"'.·J4 "''''* •••• ' ' •••

• GFI>IERA TE TKT

•

CARO OOPF
V!;C TOR A'IO

•

•
•
'" RLIl CARD FOR •
• VIRTUAL ORIGIN.

·

•

••••••••• .,.x •••• STRUCTURE . . . . . . . . . . . . )!: F8ap
•• NO

•••••••••• O •••••• O •••••••••• " ••••••••••••••

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

OOIl.Ofl"~fI.O

••••

X
0;.***
•••••••
*••• *.J
SCAI>I BAH
HF.MENB
•

•

** RLO
GENFRATINC:
•
CARDS FOR.
.1/ IRTUAL OP I GINS •

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

. "

oo • • • • ,,'I(oo • • •

OftOtlO • • OClI"iO.OO • • • • •

1'I

Section 3: Charts and Routine DiIcctories

317

)ia~rarr

Chart UE. Overall Logic

•••••
• UE •
• "3 •
•••

··..."3.····.·....
X

U,,':Ion

..

.••••••••••••••••••.•
:

S?HI~E~~,,~~

:

x

e3

•••

U"'r' 15
• •••• RIt .......... .

••

•*
*.
•
••••••••••••••• :~~.:. OF f~2rN ·:111)(.0 •••••
*. _.
.*
•
• III
III

.. ..

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

• "10

X

•

0:

Nt:)[yEITEM

•

:

C3···..

•

.111

..•..

••

)(

K

UAlI2l . . . C2..........

:X ••••••••••••• e •••

~n

•
UA2~;'l;l5.;. ....... .
•
•
•

C4 •••••

*.

.*

*.

.. •..

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

• START SCAN FOR.
yeS •• eXTERNAL' •• NO
•• SIMPli
•• Y E S .
• nOPE VECTORS .X..........
ITEM
•••••••••• K•• O"T ... V"R "eLF •••••••••• x. PROCESS ITfM
•
•
••
••
..OR LAB L ••
•

•
II
.................
x

02

•••

••••••••••••••••• X.:tHI ~"I~AR~ OF .:.!~~
•
•• SC AN
••
III.

·

••

•• • ••NO

•

III

III

•

..... X:OFRn~~fcS~~~I';
•
•
•••••••••••••••••

x

E2 .~ ••
•• DOE S ••

••••• El..........
•
•

•

~TEM

....

•

.·

..

•••••• F2·····•• ••••
••••••••••••••••••• PROCESS ITEM •
•••••••••••••••••••

rc

.-

F3···..

f~~IN ·:.~?
.111
*..111
•• ••

.:. OF
••

Fit

*.

ITE~

." •••••••••••••••••

.....

.....
•."1.

.....
!;~.:*
x

•*

!tI.

·UF •

H3

•••

••

f~~IN

• ••••

*

.

·:.K•••••••. :

••

•

•

ITf"

:

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

H" •••••••••••
:l(•••••••••••••••••

GE~"IN~~XI~TE'"

.
•

•

• ••••••••••••••••

....*J3..........
.................
III

K: PROCess

*...
••• *

U"I~5

*.

•• ••
NO

•

•

UAI'Ud~F'5.;. . . . . . . ..

••

•

....
•
OF

.i.NO

••
*.
•
X.:·III. ~~~~TPJE .*·:.~~••••• •

• YES

x

318

GEf NEXT

•••••••••••••••••
X

• YES

X

.•.•

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

.x •••••••••••••••• _

111.._

X

·

.·••

UA033

·

•
•
NO..
••
: GE T "lEX T ITEM :X •••••••••••• N~E~TgaPE . " •

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

•
•

U"'J21
• ••• *03 ••••••••••

••.

*.

•*

III...

*..*

l(

J4' i...
.. •..

NO

•

••

:csd~ITMk'fhM

: •••••••• x.:·

:

:

IIIG

*.

.•••.JS.;.••.••..•
.................

*.

.._.

*

•

'~IJU~ ·:.:;~ ••••• x:
:

PROr.ESS Iff'"

:

:

.....
••
.

Phase UF Overall Lcgic Diagram

Chart UF .
·UF •
• AI·

....•

·••••.
••

......'tnT8~~~~~:
81..........
X

I ll,I'f)]

:
• I:ROM T A8l F 1

82 •

• x•••••• ,,~) • •

••.glj~R~~~GI~E~F
·..1:12 ••.......•

It • • • CI • • • • • • • • • • • • • • • 0

••••

X

Il("lu n 2

~

0 • • 0 . It 110

e

0

eo ••

ell

no"

0 •••••••• 0

•

:
:
.'X ••••••••• FROM TAAlE 2. •

t:~::~t~~~i:::.:,

El ..
X

:.l~~~t~~~l~U~.:

..•...f2...........

...... 3······.····

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

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

\l(,n15.

•••

lr016
PRINIT
~
•••• PlBS ••••• YES
.PRIN b~OlOGUE.
•
P~/NID~M~
•
••••
PCBS
•••••••••••• X ~ROCEO~~~ BASE:, •••••••• )( FORGpU~~R~pRoR~ISSEVNG.
••
••
lOCN C TR • n
S~

.. ..

• NO

X

IL(\(\18.
Iltltl 9
• ••••GZ •••••••••••
PRINT STATEMENT
••
lAB~l
•• YES
•
NUMBER
•
··2~ ~~~JE~EN! ••••, ••••••• )( .A~gE~nF\~R~l •••
•••
Gl
••
••••

*. *•• * .*

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

•

00)(:

••••

•
B? :

*•••

• NO

~

.

•••
HI..

0"
•• END

••

~~

OF
PROGRAM

..

*. ••

*. •• •• ••

....x
• •
·.....

IU'I,17
• •••• HZ ••••••••••

.
•

YES
•
•••.••••••• X.

RElE ASE UH
MlO l040 ur

.
••
•

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

• NO

• A7 •

...x
•.1'5
... ...
J2

••

• •••• J3 ••••••••••

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

COMP IL;A •• YES
: II ST COMPILER:
•• ~UBROUTrNE ......... ., X" SU6ROUTINE
•
... WANTEO ."
..
•
'ti.

•

••

NO

..

•

X

........ K3·· •• • •• •••
•
.PRINT LINE WITH •
•••••••••• " •••••• )(: MN~~5~tP~~D :

.....
...
it

·XA •

• AI·

section 3: Charts and Routine

DiI~ctcri€s

319

.....

2bart XA .

Jver~ll

Phase XA

Lcgic Diagram

• l(A •
• AI·

••
•

X
XAN
: •••• Al . . . . . . . . . :
: ••• aH~tr~~
•
SET
•
•
LEVEL OF
: SEVERITY CODE : •••••••• X: 0~~r~9s~~l

XAf'

••••

••••••••••••••••••• •••••••••••••••••••
X
••••• 81..........
•
•
• CONSTRUCT PHASE.

XAI

82···..
)(Ai •••• *B3 •••••••••••
ANY· •
YES •• ENTRlp •• NO
•
P~T OUT
PRJgE~SEO •• •••••••••• X.
'" SSAGE
••

.................:)(.••••••••••• ....•
:",~~~i~~oCrJ~~

•

XAit

•

·

X

••••• Cl..........

*..*

XA7

.....

·······x

•••••••••••••

.•.

.AA •

•

• ••••C2..........

• •••• C3..........

:

:

H4 •

• •••• C4 ••••••••••

: ~UH~~ :
: ~ge~~~s : •••••••• x: ~~li~~E : •••••••• x: ~k~8~~ : •••••••• )(: A~e~f~s :
••••••••••••••••••• ••••••••••••••••••• ••••••••••••••••••• •••••••••••••••••••
",k~~fGE:

:

S~AN:

~?Kf g~:

··.........
...
• 04 •• )(.

••••

,,*

l(

04

••

ALI

-,

., .. •• .....

NO ••
YI'S
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
p~NTR es
,*ooeooo ••
•
•• "OCE SED..
)(
•• ••
·~A •
•
• H4 •

.•.

XA'I ••••• E1 . : . . . . . . . .

XA2~ •••• E2..........

GET T O : :

:

~~~V
•••••••••
8LOCK.

HEAD OF
••••••••• X.
CHAIN.
•

•
•

·

••••• t.t.t ••••••••••

t.t.

l(Al~~ ••• E4 •••••••••••

E3···..

·•••••••••••••••••...•••••••••••••••••.
:

A~UN~R?~h

·*rHP~HAI
A·· •• YFS
•
N •••••••••• X

••
X..
NEW
••

...
•• •• ..

•

SEV~RI
TY
HF.'AOF.R

••

•••••••••••••

x
I t • • • • 1I • • t • • • • • • • • • • • • t • • t • • • • • • • • • • t • • • • • • • • • • • • • • • • • •

)(

X
•••
..NO
•••••Gl..........
G2
••
G3
••
•
•
•• IS
••
••••
• •••
•
GET T O .
•• SK~LET2N •• NO
••
END
•• YES.
•
: •• X: N~~Tc~~I~Y
: •••••••• X••• !N B~~~KNT •••••••••••• X•••• C~~IN •••••••• X: 04 :
)(A3C'

.. ..

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

.

*...

.....
.. .

• YES

X

: •••• ~~~~:~; . . . .:

•
:

.....Jl..........

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

: KA35

•
:
•
•

;

• •
: ••••••••
SKELETON.
•
• •

~CECSES~GSE

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

•••
•• H3 HAS ••••

: · . . ~~l~::t.~~···:

P

.....

x:.

NU"'B~R

••
GOT
•• YES
•
: •••••••• )( ••• ~ NMt~~FN! . . . . . . . . . . .

..................
.....J2..........
K:
.................
.

XA32

NU"'8~R.

TgU~~E~T

....

•

• NO

"x

~

.....J3..........
.................

•••••••••••••••••

• •

M~CA~8E·
•
SK~~h N
: •••••••• K:

• •

•
:

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

*...

~.~.e.e(l

T~u~h~T

......J4...........

••••••• Oc ••

ICA4"

8U 1L0
•
Me SSAGE.
•
T~n N~N
: ••••••••
BUFFER
•

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

x.

PUT O¥T
01 A~~~~GJ.c

...

••

~

••

K4

HAS

••

••

YF.~"

• ....

•
NIJ ...
THIS
••
••••••••••••••••••••••••••••••••••••••••••••••••••••
~ •••••••••••••••••••••• o.o.".".".~t~TcA~t~V,..'.IIlI,l~o't(: 0

*0

320

•• rIA'·

"*

4

.***

•
:

Table TE.

Phase TF Final

Ass~mbly

Pass 1

r-----------------------------------T---------------T-----------------------------------,
I
IMain Processingl
I
I

statement or

Op~ration

Type

I

Routine

I

Subroutines Used

I

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

I ~3cdns text

IIL0024

I None

I

t------------------------------------+---------------+ ----------------~------------------1

IAssigns offsets to labels

IFINEQl,

II~0019

I

~EX~SL

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

IIncrements location counter for
I machine i.nstructions

IILOOl4

INone

I

I

I
I

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

IDetermines code for instructions
Iwhich refer to labels

I

IFIN~Cl

IIL0020
I

I

I

t-----------------------------------+---------------+-----------------------------------i
IInitializes location counter at
Istart of procedure

IILOOlO
I

INone
I

I
I

t-----------------------------------+---------------+-----------------------------------i
IStores size of procedure and
IILOOll
INone
Iresumes
containing procedure
I
I
L_. __________________________________ _______________
~

Table TF1.

~

----------------

I
I

___________________ J

Phase TF Routine/Subroutine Directory

r-·---------------·--T---------------------------------------------------.------------------,
I Routine/Subroutine I
Function
I

t------------------+--------------------------------------------------------------------i
IFINEQl

ILocates label number table entries.

I

I

I

I

I

I

IILOOOO

IIL0003
ILOOlO
IL001l
IL0014
IL0015
ILOOl7
IL0019
IL0020
IL0022
IL0024
LINEXTSL
__________________

IEntry foint from compiler control.
IEntry foint to scan from initialization routine.

Jlnitializes location counter at start of procedure.

I

Istores size of

procedur~

and resurres containing procedure.

I

IIncrements location counter for machine instructions.

I

IProcesses the start of prologues.

I

IReleases control.

I

IAssigns offsets to latels.

I

IDetermines code for instructions which refer to labels.

I

IProcesses end-of-block pseudo-code item.

I

Iscans text.

I

IDeterrrines
multiple statement latel__________________________________
entries in dictionary.
__________________________________
J

~

section 3: charts and Houtine Directories

321

Table TJ.

Phase TJ Final Assembly Optimization

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

Statement or Operation Type

IMain Processing I
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+-----------------------------------~

\Controls phase
IILOOOO
I OPTIMA
I
~-----------------------------------+---------------+-----------------------------------~
IMaintains location counter for
IIL0014
INone
I
Imachine instructions
I
I
I
r-----------------------------------+---------------+- ----------------------------------~

IAssigns offsets to labels

IIL0019

ICOMRTN, FINEQi, NEXTSL

I

~-----------------------------------+---------------+-----------------------------------~

IDetermines code for instructions
Iwhich refer to labels

IIL0020
I

IFINEQl

I

I

I

~-----------------------------------+---------------+-----------------------------------~

IInitialize location counter at
IILOOi0
INone
I
Istart of procedure
I
I
I
~-----------------------------------+---------------+-----------------------------------~
Istores size of procedure for
IILOOii
INone
I
Imachine instructions
I
I
I
r-----------------------------------+---------------+- ----------------------------------~

IReduces number of MVC instructions IIL0027
IOFFSET, OS~RTN
I
~-----------------------------------+---------------+-----------------------------------~
IDetermines offset from a given
IOFFSET
INone
I
Idictionary
reference
\ _______________ I _ __________________________________ JI
L
___________________________________
~

Table TJi.

~

Phase TJ Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine \

Function

\

~------------------+--------------------------------------------------------------------~

COMRTN

IDeterwines whether further optimization is

FINEQi

~ossible.

\

\

I

ILocates label number table entries.

ILOOOO

\Controls phase.
\Entry point to scan lcop from initialization.

I

ILOOi0

IInitializes location counter at start of procedure.

I

ILOOii

Istores size of procedure and resumes containing procedure.

I

IL0012

IProcesses machine instructions, etc.

I

IL0014

IMaintains location counter for machine instructions.

IL0019

Assigns offsets to labels.

IL0020

Determines code for instructions which refer to labels.

IL0024

Gpts pseudo-code item length and updates text pointer.

IL0027

Elides MVC instructions.

ILi00i

Evaluates new ADCON needs.

ILii01

Restores content of containing procedure.

NEXTSL

Looks for equivalent statement labels.

OFFSET (TK)

Sets location counter to zero.

Determines offset from a given dictionary rEference.

I

I OPTIMA
~

I

322

I

I

IL0003

IOSMRTN
L__________________

I

I

I

I

I

I
Scans text.
I
I
Scans ahead for literal offsets.
__________________________________
__________________________________ JI

Table TO.

Phase TO Final Asserr.bly External Symbol Dictionary

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

I
I Main Processing I
,
statement or Operation Type
1
Routine
1
subroutines Used
1
1
~-----------------------------------+---------------+-----------------------------------~
I constructs first: six standard ESD 1LG40i
1f1~OVE, NA.ME, ERROR
,
lentries
I '
I
~-----------------------------------+---------------+-----------------------------------~
IConstructs entries for external
ILGOOl
,MOVE, ERROR
,
Iprocedure labels
1
I
I
.-----------------------------------+---------------+- ----------------------------------~
'MOV~,

IConstructs PR type entries for eachlLG030
Iblock and procedure
1

NA~E

I

I

,

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

Iconstructs entries for external
ILG050
IMOVL, ERROk
,
Ivariables and external entry names I
I
1
~-----------------------------------+---------------+-----------------------------------~
,constructs entries for ccntrolled
ILG090
IMOVE, NAME, ERROR
I
Ivariables and task names
I '
I
~-----------------------------------+---------------+-----------------------------------~
Iconstructs entries for Library
IIL0200
11HEINC
,
Iconversion
modules
" _______________ L _ __________________________________ J,
L. ___________________________________
~

Table T01.

Phase TO Routine/Subroutine Directory

r-------------------T--------------------------------------------------------------------,
I ROUTINE/SUBROUTINE 1

I

FUNCTION

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

ERROR

Truncates over-length external identifier, generates error message.

LGOOl

I

I

Constructs entries for external procedure labels.

I

1

LG030

Constructs PR type entries for each block and procedure.

I

1JG050

Constructs entries for external variables and external entry names.

I.G055

Processes ON-conditions and external variables.

1.G080

Processes external entry names.

1.G085

Processes FILE constants.

I,G090

Constructs entries for controlled variables and task names.

LG093

Inserts name in ESD entry for CONTROLLED.

L,G401

Constructs first six standard ESD entries.

MOVE

Moves ESD entries to card buffers, and puts out buffer when full.

NAME

Generates names for pseudo-registers.

11HEINC
(TQ)
constructs
a string of Library module
names.
L ___________________
_________________________________
___________________________________
J
~

Section 3: Charts and Routine.Directories

323

Table TT.

Phase TT Final Assembly Pa3S 2

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

IMain Processing \
1
I
statement or Operation Type
I
Routine
I
Subroutines Used
1
~-----------------------------------t---------------t-----------------------------------~
IScans text
I1L0002
INone
I
~-----------------------------------t---------------t-----------------------------------~
IGenerates text for RR instructicns I1L0012
IGENTXT
1
1

t-----------------------------------t---------------t- ----------------------------------~

IGenerates Text for RX non-branch
IIL0013
linstructions LM, STM, and S1 Types 1

I EOBHTN, GENTXT, OFFSET
1

I
I

~-----------------------------------t---------------t- ----------------------------------11

IGenerates text for shift instrucI1L0027
IGENTXT
I
1 tic-ns
1
I
1
~-----------------------------------t---------------t-----------------------------------~
IGenerates Text for SS instructions I1L0014
1 EOBRTN, GENTXT, OFFSET
1
~-----------------------------------t---------------t- -----------------------------------1

ISets up trace information and num- I1L0019
Ibers compiler labels
I

IGENTXT
1

I
1

~-----------------------------------+---------------t- -----------------------------------1

IGenerates text for branch and load IIL0020
laddress instructions
1

IF1N~Ql,

1

GENTXT, OFFSET

1

1

~-----------------------------------t---------------t- -----------------------------------1

IInitializes location counter at
1start of procedure

I1L0010
1

IPUNCHT
1

1

I

~-----------------------------------t---------------t- -----------------------------------1

I Resumes containing procedure at end I ILOOll
lof procedure
1

I PUNCHT'

1

1

1

~-----------------------------------t---------------t- -----------------------------------1

IMoves Text into card image

IGENTXT

IPUNCHT

I

~---------------------------------,--t---------------t -----------------------------------1

IPunches cards ensuring that RLD
Icards follow related TXT card

IPUNCHT

ICAkLOU

1

1

I

1

~-----------------------------------t---------------+- -----------------------------------1

IGenerates text for compiler subrou-I1NCLUD
IGENTXT
I
1tine
1_ __________________________________ .11
L
___________________________________ 1_______________ L
~

324

Table TTl.

Phase

~T

Routine/Subroutine Directory

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

I

Function

~------------------+--------------------------------------------------------------------~

CARDOU

Directs card image to load file or punch file.

EOBRTN

I

I

Chains to next input text block.

I

I

FINEQl

Locates label number table entries.

G£NTXT

Moves text into card image.

IL0002

Scans text.

IL0003

Entry point to scan from initialization

IL0010

Initialize~

ILOOll

Resumes containing procedure at end of procedure.

IL0012

Generates text for RR instructions.

location counter at start of procedure.

Generates text tor

IL0013

rou~ines.

~~

non-branch branch instructions, LN, STM, and

81 tyr-e.

IL0014

Generates text for S8 instructions.

IL0015

Processes the start of prologues.

IL0016

Processes the end of prologues.

IL0017

End-af-text routine.

IL0019

Sets up trace information and numbers compiler labels.

IL0020

Generates text for branch and load address instructions.

IL0022

End-of-block routine.

IL0027

Generates text for shift instructions.

I

IOFFSET (TU)
I

Determines offset and relocation pointer from given dictionary reference.

I

IPUNCHT
Punches cards ensuring that RLD cards
follow related TXl card.
L __________________ __________________________________
_________________________________
_
~

Section 3: Charts and Routine Directories

325

Table UA.

Phase UA Final Assembly Initial Values, Pass 1

r-----------------------------------T---------------T------------------------------------1
I
I

Statement or Operaticn Typ8

IMain Processingl
I
Routine
1

I

Subroutines Used

1

~-----------------------------------+---------------+- -----------------------------------f

IScans STATIC chain to beginning of IUAOOl
lexternal section
I

IUA200, UA220, UA230
1

1

1

~-----------------------------------+---------------+- -----------------------------------1

IInitializes scalar variables

IUA200

ITXT~OV

1

~-----------------------------------+---------------+- -----------------------------------1

IInitializes BCD for label

IUA220

IRLD~OV,

TXTMOV

I

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

IInitializes DED for temporary

IUA230

I

I TXTMOV

~-----------------------------------+---------------+- -----------------------------------/

IInitializes address constants.

IUA010

IUA40l, UA403, UA404, UA405, UA406

I

.-----------------------------------+---------------+------------------------------------1
IInitializes symbol table entries

IUA080

IRLD~OV,

TXTMOV

I

~-----------------------------------+---------------+- -----------------------------------1

IInitializes address slots for
I external variables

IUA403
I

IRLD~OV,

TXTMOV

I
I

1

.-----------------------------------+---------------+------------------------------------1

IInitializes address slots for func-IUA401
IRLD~OV, TXTMOV
I
Itions and programmer-defined ONI
I
I
1 condi tion names
I
I
II
~-----------------------------------+---------------+-----------------------------------~
IInitializes address slots for labellUA404
IRLD~OV, TXTMOV
I
I constants
I
I
II

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

IInitializes address slots for entrylUA405
Ilabels
1

IRLDNOV, TXTMOV
I

I

IInitializes file attribute entries IUA406
land files
I

IRLD~OV,

~

I

il
.-----------------------------------+---------------+- ----------------------------------~I

TXTMOV

I

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

IInitializes constants pool
IUA014
IRLDMOV, TXTMOV
~
~-----------------------------------+---------------+-----------------------------------~
IInitializes dope vector skeletons
IUA02l
ITXT~OV
I

r-----------------------------------+---------------+-----------------------------------11

argument lists
lIInitializes
___________________________________

326

IUA025
_______________

~

I

IRLD~OV,
TXTMOV
_ __________________________________
J

~

Table UAl.

Phase UA Routine/Subroutine

Dir~ctolY

r-------------------T--------------------------------------------------------------------,
I Routine/Subroutine I
Functlcn
I
~------------------+--------------------------------------------------------------------~

OUTPUT (UB)

Moves card images to punch and/or load file.

I

RLDMOV (UB)

Moves RLD entries to card buffer.

I
I

TXTMOV (UB)

Moves TXT entries to card buffer

UAOOOO

Entry point from compiler control.

UAOOl

Scans STATIC chain to start of external section, to initialize
scalar variables.

UAOOl5

Return point for branches taken in first scan.

UAOlO

Initializes address constants.

UAOl3

Return point for branches taken in second scan.

UAOl4 (UC)

IInitializes constants pool.

UA02l

Initializes dope vector skeletons.

UA0215 (UC)

Produces text for dope vector skeleton.

UA025

Initializes argument lists.

UA033

Return point for branches taken in last scan.

UA080 (UC)

Initializes symbol table entries.

UAI00 (UC)

Initializes one-Word CSECT 'IHEMAIN'.

UAI00A

Exit from UA to compiler control and UD.

UA200

Initializes scalar variables.

UA220 (UC)

Initializes BCD for label.

UA225 (UC)

Entry to label routines for label variable BCDs.

UA230 (UC)

Initializes DED and FED for temporary.

UA401

Initializes address slots for functions and programmer-defined ONcondition names.

UA403

Initializes address slots for external variatles.

UA404

Initializes address slots for label constants.

UA405

Initializes address slots for entry latels.

UA406

Initializes DECLARE control blocks for files and file attributes
entries.

\

Makes text for file attributes entry.

IUA407

I

Initializes array variables.

IUCINIT (UC)

I

IUCUPDT (UC)

IInitializes arrays of varying strings.

I

I

I

I

IUC0080 (UC)
ITIDY
(UC)
L
__________________

I

I
I
I
I
I
I
I

\Initializes bit arrays.
ICompletes
packing of bit strings in__________________________________
structures or arrays.
__________________________________
J

~

Section 3: Charts and Routine Directories

327

.Table UD.

Pha~e

UD Final Assembly Initial Values, Pass 2

r-----------------------------------T---------------T------------------------------------1

1

IMain Processing 1

1

1
statement or Operation Type
1
Routine
1
Subroutines Used
1
~-----------------------------------+---------------+- -----------------------------------,

IScans STATIC DSA chain

IA1

I

IAUTO

~-----------------------------------+---------------+- -----------------------------------1

IScans STATIC DSA's AUTOMATIC chain IAUTO

IDAT,LAB,STRUC

1

~-----------------------------------+---------------+- -----------------------------------1

IInitializes dope vectors fer data
litems and label variables
1 (unstructured)

IDATLAB
I

ITXTMOV(UB),RLDMOV(UB)
I

1

I

1

I
I

~-----------------------------------+---------------+- -----------------------------------1

IInitializes dope vectors for

structures
1
L ___________________________________

ISTRUC
ITXTMOV(UB),TLD~OV(UB)
1
I _______________ I _ __________________________________ .1I

~

~

.Table UD1. Phase UD Routine/Subroutine Directory

r------------------T---------------------------------------------------------------------.

1 Routine/Subroutine I

Function

I

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

IA1

IScans STATIC DSA chain.

1

1

1 AUTO

I

IScans STATIC DSAs AUTOMATIC chain.

1

1

I

I

IDATLAB

I

IInitializes dope vectors for data

I
i~ems

ISTRUC
1
IUDOOO

IInitializes structure dope vectors.
1
IEntry point

I

I

lIUDEND
__________________

328

and labels.

I
I
I
I
I
I

I

IReleases
control.
__________________________________
__________________________________ JI

~

Table UE. Phase UE, Final Assembly Initial Values, Pass 2

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

statement or Operation Type

IMain Processing I
I
Routine
I

I
I

Subroutines Used

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

IScans STATIC chain to beginning of IUAOOl
I external section
I

IUA~OC,

UA220, UA230

I

I

I

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

IInitializes scalar variables
IUA200
ITXT~OV (UB)
I
~-----------------------------------+---------------+-----------------------------------~
IScans STATIC chain to initialize
IUA003
IUA300, UA320, UA340, UA360, UA365
I
linternal dope vectors
I
I
I
.-----------------------------------+---------------+- ----------------------------------~

IInitializes
I nal strings

dop~

vectors for inter-IUA300
I

IRLD~OV

(UB), TXTMOV (UE)

I
I

I

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

IInitializes dope vectors for inter-IUA320
Inal data arrays
I

IRLDMOV (UB),
I

TX~MOV

I
I

(UE)

.'-----------------------------------+---------------+-----------------------------------1
IInitializes dope vectors for arrayslUA340
lof varying strings
I

ITXT~OV

I

(UB), UCUPDT (DC)

I
I

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

IInitializes dope vectors for inter-IUA360
I nal labe:l arrays
I

IRL0~OV

(Ub), TXTMOV

I
I

(UE)

I

~------------------------------------+---------------+ -----------------------------------i
IIni~ializes

dope vectors for inter-IUA365
IUA300, UA320, UA360
I
I nal structures
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IInitializes arrays
IUA030
IRL~~OV (UB), T~TMOV (GE),
I
I
I
IUCINIT (UC)
I
.-----------------------------------+----T----------+- ----------------------------------~

IInitializes structures

IUA04G

I

I

ITXT~OV (UB),
(Ue)

UA200, Ue0800 (UC),

I

I TI;)Y

I

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

IInitializes one word CSECT
I" IHEMAIN'

IUA100

I OUTPUT, RLDMOV, TXTMOV (all in UE)
I

I

I
I

.------------------------------------+---------------+-----------------------------------i
IInitializes CSECT for STATIC
lexternal variables

IUA1005
I

IOUTPUT (UB), DA030, UA200, DA300,
IUA320, UA360, UA365, UA401, UA406

I
I

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

IMakes up END card and
Iphase

ter~inates

IUA120
I

IOUTPUT (UB)

I
I

I

~------------------------------------+---------------+ -----------------------------------1

IInitializes array variables

IUCINIT (UC)

ITXTMOV (UB), UC0080 (UC), TIDY (UC) I

l ___________________________________ L _______________ L _ __________________________________ J

Section 3: Charts and Routine

Dir~ctories

329

.Table UE1. Phase UE Routine/Subroutine Directory

r------------------T--------------------------------------------------------------------,
I Routine/Subroutine I

Functicn

I

~------------------+--------------------------------------------------------------------~

I AREA
I

Initializes AREA variables.

I EVENT

Initializes EVENT variables.

I
I TASK
I

Initilizes TASK variables.

IUAOOO

Entry point from UA and compiler control.

UAOOl

Scans S1ATIC chain to start of External section, to initialize scalar variables.

UAOO15

Return point for branches taken in first scan.

UA003

Scans STATIC chain to initialize all dope vectors for internal variables.

UA021

Start of scan for arrays and structures.

UA030

Initializes arrays.

UA031

Produces RLD entry for label array virtual origin.

UA033

Return point for branches taken in arraj scan.

UA034

Produces RLD entry for nata array virtual origin.

UA040

Initializes structures.

UA100 (UC>

Initializes IHEMAIN CSECT.

UA105

Return point for branches taken in external scan.

UA120

Makes up END card and terminates phase.

UA200

Initializes scalar variables.

UA207

Lists label variables.

\UA300

Initializes dope vectors for internal strings.

UA320

Initializes dope VE:.ctors for internal data arrays.

UA340

Initializes dope vectors for arrays of varying strings.

UA360

Initializes dope vectors for internal label arrays.

UA365

Initializes dope vectors for internal structures.

UA401

Initializes address slots for functions and programmer-defined ONcondition names.

UA406

Initializes DECLARE control blocks for files and file attributes
entries.

UA1005

IInitializes CSECTs for STATIC external variables.

l __________________ L ____________________________________________________________________ J

330

Table UF.

Phase UF Final Assembly Object Listing

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

I

IMain Processingl
I
I
statement or Operation Type
I
Routine
I
Subroutines Used
I
~-----------------------------------+---------------+-----------------------------------~
IScans Text
IIL0002
INone
I

t----------------·-------------------+---------------+ -----------------------------------~

ILists RR instructions
IIL0012
IPRINIT, RRRTN
I
~-----------------------------------+---------------+-----------------------------------~
ILists RX non-branch instructions
IIL0013
IBX~~N, PRINIT, FRNTOU, PRNTVF,
I
I
I
I
ISECCND
t-----------------------------------+---------------+- ----------------------------------~

ILists SS instructions
IIL0014
I EOBkTN, PRINIT, PRNTOU, SSRTN
I
~-----------------------------------+---------------+-----------------------------------~
ILists shift instructions
IIL0026
IPRINIT, PRNTOU, PRNTVF
I
t·-----------------------------------+---------------+ -----------------------------------~

ILists LM and STM
IIL0027
IPRINIT, PRNTOU, PRNTVF, SECOND
I
~-----------------------------------+---------------+-----------------------------------~
ILists 81 instructions
IIL0028
ICHARVF, PRINIT, PRNTOU, PRNTVF
I
I
I
ISECCND, SSRTN
I
t-----------------------------------+---------------+- ----------------------------------~

ILists branch and load address
I instructions

IIL0020
I

IIL0013,

NA~EIT,

NAMEQU,

PRINIT~

IRR~~N

I
I

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

ILists labels
IIL0019
INA~EVF, NEXTEL, NEXTSL,
I
I
I
I
IPRNTLC, PRNTOU, PRNTVF, STATMN
~------------------------------------+---------------+-----------------------------------~
ILists procedure names
IIL0010
INAMEVF, NEXTEL, PRNTOU, STATMN
I
t------------------------------------+---------------+ -----------------------------------~

ILists ends of procedures

IILOOll

INAMEVF, NEXTEL, PRNTOU

I

~------------------------------------+---------------+-----------------------------------~

IScans ahead for literal offsets;
linserts second instruction byte
linto print image

I SECOND
I
I

I EOLBTN
I

I

I
I
I

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

IGenerates listing of text for base ISSRTN, BXRTN
IABSOFF, ADDEND, NA~EIT, NA~EQU,
I
loffset pair
I
IPRNTVF
I
~-----------------------------------+---------------+-----------------------------------~
INames generated label number
INAMEQU
IDECINT, FlNEQl
I
t------------------------------------+---------------+ -----------------------------------~

IInserts location counter value, andlPRINIT
Ihexadecimal and mnemonic operation I
Icodes in print line
I

IPRN1LC
I
I

I
I
I

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

IMoves variable length ite~ into
Ivariable field part of print line

IPRNTVF
I

IPRNTOU

I

I
I

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

ILists statement numbers
ISTATMN
ISTATNO
I
~-----------------------------------+---------------+-----------------------------------~
IDetermines name and offset from
INAMEIT
IDECINT, HEXINT
I
Idictionary reference
I
I
I
~------------------------------------+---------------+-----------------------------------~
IGenerate listing of compiler
IIL0017
I PRNTLC, PRNTVF,PRNTOO
I
subroutine
I _______________ I _ __________________________________ JI
I ___________________________________
L
~

~

section 3: Charts and Routine Directories

331

Table UF1.

Phase UF Rcutine/Sutroutine Directory

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

I Routine/Subroutine I
Function
I
~------------------+--------------------------------------------------------------------~
ABSOFF
Appends literal offsets to operands in variable part of print line.
ADDEND

Appends signed literal offsets to operands.

BXRTN/SSRTN

Generate listing of text for base offset pair.

CHARVF (UG)

Places one cbaracter in variable field of print line image.

DECINT (UG)

Converts binary to externally coded decimal.

EOBRTN

Chains

FINEQl

Locates label number table entries.

HEXINT (UG)

Converts binary to externally coded hexaaecimal.

ILOOOO

Entry point from compiler control.

ILOOO2

Scans text.

ILOOO3

Entry to scan from initialization routines.

ILOO1O (UG)

Lists procedure names.

ILOOll (UG)

Lists ends of procedures.

ILOO12

Lists RR instructions.

ILOO13

Lists RX non-branch instructions.

~o

next input block.

Lists S8 instructions.

IILOO14

I

Processes the start of prologues.

IILOO15

I

Processes the end of prologues.

IILOO16
I
IILOO17 (UI)

End-of-text routine, and compiler subroutine listing.

I

Processes compiler generated label numbers.

IILOO18
ILOO19 (UG)

Lists labels.

ILOO20

Lists branch and load address instructions.

ILOO26

Lists shift instructions.

ILOO27

Lists LM and STM.

ILOO28

Lists S1 instructions.

ILOO32

Processes SS decimal instructions.

ILi003 (UG)

Prints "*PROCEDURE" followed by entry names and statement number.

IL2005

Identifies operands.

NAMEIT

Determines name and offset from

NAMEQU

Names generated label number.

NAMEVF (UG)

Places a variable nawe in the print line.

INEXTEL (UG)

L __________________

332

~

dic~ionary

entry.

I
I
I
I

I

I
Scans
dictionary for wultiple entry labels.
I
__________________________________ - - - - - - - - - _________________________,J

Table UF!.

Phase UF Routine/Subroutine Directory (cont'd)

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

!Routine/Suoroutinel

Function

!

~------------------+--------------------------------------------------------------------~

NEXTSL (UG)

NM0003 (UH)
PRINIT (UG)
PRNTLC (UG)

Icommon return point in naming

routi~e.

I

IPrints location coJnter value, hexadecimal, and rrn~monic or codes.

I

~Converts

Prints a line.

PRNTVF (UG)

Moves variable length item into variable field part of

RRRTN

Generates

SECOND

Scans ahead for literal offsets; insErts second instruction byte
into print image.

STATMN (UG)

Lists statement numbers.
~

~

location counter to hexadecirral; places it in rrint image.

PRNTOU (UG)

STATNO (UG)
L __________________

I
I
I
I

IScans dictionary for multiple statement labels.

I

R~

~rint

line.

format listing of text.

Converts
statement number to decimal.
__________________________________
__________________________________ J

section 3: Charts and Routine Directories

333

Table XA.

Phase XA Error Message Editor

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

,
I

Statement or Operation Type

,Main Processing,
I
Routine
I

Subroutines Used

I
I

~-----------------------------------+---------------+-----------------------------------~

,Determines whether error rr.essages
IXA
INone
I
lare to be printed
I
I
I
~-----------------------------------+---------------+-----------------------------------~
IScans error message text skeletons IXA8
IXASO, XA70, XA90, XAllO, ZUPL
!
prints them out
I _______________ I _ __________________________________ jl!
lland
___________________________________
~

Table XA1.

~

Phase XA Routine/Subroutine directory

r------------------T--------------------------------------------------------------------11

I Routine/Subroutine I
Function
!
~------------------+--------------------------------------------------------------------~
IXA
IDeterrrines whether error rressages are to be printed.
~

I

I

I

I

I

I

I

I

I

I

IXAO

ISets severity code.

IXAOl

IEstablishes which message types to suppress.

IXAl

Icounts number of error chains to be processed.

IXA2

Iputs out messages if there are no diagnostics.

XA4

IPrints out "COMPILER DIAGNOSTIC MESSAGES".

I

XA7

IFirst scan of message chains.

I

XA8

IScans error message text skeletons and prints them.

I

XA9 (XB)

Iscans to head of next non-empty chain.

I

XA12A

ISelects and prints header for messages of given severity.

I

XA30 (Xb)
XA32

IGets next entry in message chain.
Builds up first part of message in buffer.

(XB)

XA35 (XB)

Accesses message skeleton.

XA40 (XB)

Puts out completed message.

XASO

Moves rressage text to print buffer.

(AB)

XA70 (XB)

Converts binary statement number to character representation, and
moves it to print buffer.

XA90 (XB)

Converts binary numeric value to character representation and moves
it to print buffer.

XA110 (XD)

Moves identifier from dictionary entry to the print area.
Prints a line on SYSPRINT data set.

~

IZUPL

l __________________

334

I
!
I;
I
I
I

I

I

__________________________________ __________________________________ J

APPENDIX A: GUIDE TO PHASES AND MODULLS
---------------------------------------

This appendix relates the logical phases,
physical phases, and rrodules contained
within the physical phases.
The compiler
name is IEMAA.

BC

BC,BE,BF

Initial scan and translation
phase
fer
compile-tirre processol

PHYSICAL
PHASE
MODQLE§

BG

bG,EI,BJ

Final scan and replac~­
ment phase for COITpilLtirre processor

LtI,PN

Error
phase

BC,I::V

contain the
n'essas:;es

DESCRIP'TION

----.------

P,A

Controls
cOITipiler

}\B

Performs detailed initialization

AC

Writes
records
interroediate
SYSUT3

Au

PerforITis
interphase
dumping as specified in
the DUt-~F option

AE

End of read-in phase

AF

Controls system generation compiler options

AG

Closes SYSUT3 for output, reopens for input

running

of

BW

el,

Read-In
routines

r.:;hase

cowmon

CC

Read-In
routines

rhas€::

corrrron

CE

Keyword tatles

CG,CI

Read-In pass 1

CK

Keyword tatles

CL,CM

Read-In

eN

Keyword tatles

CO,CP

Read-In pass 3

CR

Keyword tatles

CS

CS, C'I'

Read-In pass 4

CV

CV,CW

Read-In pass 5

ED

Initialization,
sutroutine package
Declare Pass 2

CI

Format annotated
tiona:ry dump

dic-

AI,AJ

Format
dump

text

annotated

Closing phase
piler

AL

Controls extended dictionary compilation

of

corr.-

AM

Phase rrarking

AN

Controls
normal dictionary compilation

BX

JZ

AS
AV

CL

CO

AK

48-character set
rocessor
Build~3

second
phase directory

prephalf

Resident
phase
for
compile-time processor
Initialization
for cOltipile-time
essor

phase
proc-

diagnostic

Cleanup
phase
for
compile-time processor

on
file

AH

message printout

lED

I
I

r:-

ass L

for

EG

EE,EG

Initialization

EI

bfl,EI,EJ

First pass over
statements

EL

EK, f..L,

Second
pass
over
DECLARE statements

EP

EP

El\~

DECLA~E

Constructs
dictionary
entries for PROCEDURb,
ENTRY and CALL stat€::rr.ents

Appendix A: Guide to Phases and

~odules

335

I EW

EY

EV,EW

EX,EY,EZ

Constructs
dictionary
entries for LIKE attributes
Constructs
dictionary
entries for
ALLOCA~E
and
for
explicitly
qualified based variables.

IIA

IA,IB,IC

Stacks operators
operands

IIG

IG

Processes
array
and
structure arguments and
built-in functions

IlL
I

IL

Preprocessor for generic functions

IIfVi

1M, IN,
IP,IQ

Processes generic funcIc functions

I

I

I

FA

FA,FB

Checks
context
source text

FE

FE,FF

Changes
BCD to dictionary references

FI

FI

Checks validity of dictionary references

I

E'K

FK

Rearranges attributes

I

FO

FO,FP

Constructs dictionary
entries
for
ONconditions

l~ggreg~~~~_~2gica1_Eh~~~

of

lIT
I

Processes function triples

IIX

POINTER and AREA checking

IJD

FQ

FQ

Checks
validity
PICTURE chain

of

and

Evaluates
expressions

JD

constant

IJI
I

,J1, JJ

Structure
pre-preprocessor

IJI

JI,JK,JL

Structure preprocessor

JK

JK,JL,JM

Structure procEssor

JP

JP

Checks DEFINED chains

FT

FT,FU

Dictionary
house-keeping

FV

FV,FW

Merges
second
file
statements into text

E'X

FX,FY

Processes
identifiers
for cross reference and
attribute listing

LA

LA

Utility scanning phase

LB

LB,LC

Generates
triples to
initialize
AUTOMATIC
and CON~ROLLED scalar
variables

Constructs DECLARE and
OPEN control blocks

LD

LD

Constructs dictionary
entries for initialized
STATIC scalar variables
and arrays

LG

LG,LH

Expands DO loops

GA

GA

GB

GB,GC

Modifies I/O statements

GK

GK

Checks parameter matching

GO

GO

Preprocessor for second
check on parameters

LR

LR

Initialization
Phase LS

GP

GP,GQ,GR

Second
eters

LS

LS,LT,LU

Converts
expression
triples to pseudo-code

GU

GU,GV

Precesses CHECK
tion statements

LV

LV

Provides string
dling facilities

HF

HF,HG

Processes
assignments

ILW

LW

Initialization
phase LX

LX,LY

Converts string triples
to pseudo-code

MC

Constructs pseudo-code
for pseudo-variables

I HK
i.-iP

check on pararr.condi-

structure

I

HK,HL

Processes array assignments

ILX

HP

Precesses items defined
using iSUBs

MB
IMD

336

IvlE,

Scans

for

ADDR

£o:r

han·fo:r

func-

tions
and
generates
code for each

OP,OQ

GeLerates
pseudo-co6e
for
further
in-line
conversicns

OS,O'1',OU

converts constants to
required internal form

PA

Puts
eligible
into STA'IIC

PD

.PD

First
S'IATIC storase
allocation phase

PH

PH

Second S'IA'I'IC storage
allocation phase

PL

PL, PJVj

constructs
tables and DEDs

PP

PP

Sort~3

, P'I'

prI, PU, PV

Allocates
storage

lOP
,

I
constructs pseudo-code
for in-line functions

ME

MI
LvlK

ML

MG,MH

constructs pseudo-code
for in-line functions

MI,MJ

constructs pseudo-code
for in-line functions
constructs [seudo-code
for in-line functions

M.K

OS

,FA

I

Processes generic entry
names

ML
MM,MN,MO

Cl\LL
and
Processes
procedure
function
invoca.tions

AU'IOEATIC chain

Reorders BUY
statements

MS

MS, rJ1T

constructs pseudo-code
for subscripts
QF

QF,(!G,QH

Constructs prologues

Nl\

NA

Generates
pseudo-code
for
tranches,
RETURN
triples, etc.

IQJ

QJ,QK,QL

Allocates DYNAMIC StOIage

Generates Library calling sequences for DELAY
and DISPLAY statements

~QX

~A

i

Lists lengths of aggregates

NJ'

NT

OB

NG

NJ,NK

SELL

sYIT,bol

MP

NG

and

DSA's

Generates Library calling sequences for executable RECORD-oriented
input/output statements

NM,NN

Generates Library calling sequences for executable STREAM-oriented
input/output statements

NT

Pre-processor for NU

NU,NV

Generates Library calling
sequences
for
data/format lists

OB,OC

Proce~3ses

functions
variables

OE

OD,OE,OF

constructs Pseudo-code
for assignments

OG

OG,OR

Generates
library
calling sequences

OM

Ol~,

ON ,00

Generates
pseudo-code
for data type conversions in-line

KA,RB,RC

ProcE~sses

addressing

mechanisms
RF

~~l',f~

OPOQ

MG MH

340

AD

LA LV

GO

MS MT

XJ

NA NB

XK

NGNH

XL

NJ NK

XO

There are three resident tables: the
dictionary, the keyword tatles,
an~
the
phase 6irectory.
The dictionary is resident through part of the compilation;
the
formats of the dictionary entries are fully
described in Appendix C.
The
keyword
tables are resident during the read-in
logical phase,
and the phase directory
throughout the cowpilation.

In this way it is possible to hold in
storage only those keywords which
are
required for anyone pass. The keyword
tables are constructed in the following
rr,o.nner.
For ease of searching and modifying a
keyword tatle, it is organized into two
levels and by Keyword length, as shown in
IFigure 9.
The KEYWD routine is called by one of
the statement scanning routines, and is
supplied with a parameter which enables it
to decide which set of keywords to look at
(e.g., statement identifier, eN condition,
miscellaneous).
It does this by using the
parameter to extract the required relative
address
(B(A),etc.)
from the first lev01
directory.
The second level directory Frovides the KEYWL routine with the means of
reaching a Lable containing keywords of
correct l~ngth; the KEYWD routine calls the
KEYIn routine, which scans the next significant item in the source text to obtain
the length used in this look-u~.

The read-in phase is divided into five
passes containing the wodules shown in
Figure 8.
Modules CA and CC contain routines which
are cowman to all five passes. Successive
blocks of routines overlay the areas used
in the first pass by modules CE, CG, and
CI. The keyword tables are held in separate modules (CE, CK, CN, and CR) which IT:U~t
each be less than 1,024 bytes (lK) long.

r--------,

,

I
I
I I
CA
I I
I
Il _________ JI I

> Common Routines

I
r---------, I
Il _________
cc
JI I
I

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

I

I

CE
l ________
J

r--------,

I
I
I
CG
I
lI ________ JI

r--------,

r--------,

I

I

CK
L _________
J

r--------,

!
I
I
CL
I
!l ________ JI

r---------,

r--------,

I

I

CN
l ________
J

r--------,

I
I
I
co
I
Il ________ JI

r--------,

I
I
CI
I
I
Il ________ JI

!
I
I
Cr-"
I
il ________.JI

I
I
I
CP
I
Il ________ JI

Pass 1

Pass 2

Pass 3

• Figure 8.

I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

r--------,

Il ________
CR
JI

r--------,

I
I

CS

I
j

I

lj ________ J

r--------,

r--------,

I

I

CR
l ________
J

r--------,

I
I
I
CV
I
Il ________ JI

r--------,

I
I
I
C'I'
I
Il ________ JI

I
I
CW
I
I
Il ________ JI

Pass 4

Pass 5

Organization of Read-In Phase
Appendix B: Resident Tables

341

r------,

r-------------i

R(A) I
~------i First Level
I
I
r-i R (B) I Directory
I
I ~------i
I
I I R(C> ~--,
I
I ~------~ I
I
I I
I I
I
I I
I I
I
I
I
I
I
I
I r------, I r------, I r------,
Al>1
I Bl>1
I Cl>1
I Second

~------~

I

~------~

I

I

I

~------~

Level
tory

I

I Direc-

~------~

~------~

~------~

I

I

I

I

I

I

I

I
I

I
I

I

I

I
I

I
I

I

~------~

l ______ J

~------~

STLm DC FL1'x' where x is number of
keywords in this table
OC X'112315'

keyword in internal

code

~------~

~------~

.Figure 9.

The third level tables have a prefix
byte containing the number of entries in
this particular table followed by keyword
entries.
These consist of the keyword in
internal code plus the replacerrent character
(keywcrds recognised as
such
are
replaced Dy a single code byte).

DC X'55' replacement in internal
code
DC X'393839'
DC X'5A'

Organization of Keyword Table

FSTLVL DC AL2(STATID - FSTLVL)
DC AL2(ONID -

FS~LVL)

The second level tables contain relative
addresses, which enable thE KEYwD routine
to reference a third level table containing
keywords of the correct length.
If one of
these entries should contain zero,
then
KEYWD will interpret this as meaning that
no keywords of this length exist in this
table.

Some keywords are not represented hy one
word
(e.g.,
GO TO, BY NAME, and clearly,
the mechanism must be modified to cope with
the second word.
This modification is
achieved by OR-ing a 1-bit into the first
bit of the first level.
The presence or
absence of this hit is tested by the KEYWD
routine before the suspected keyword is
compared.
If the bit is absent, the pasa
through thE routine is quick, as there is
no possibility of an extra level search.
If the bit is present, the keyword must be
compared after the additional bit has been
AND-ed out.
If the comparison is equal,
the two bytes following the replacerrent
character are used as a relative address to
reach the next level table.

Kor~~~_2K_gD~~Y-B~gui~iD9_~gQi!i2Dal

£Q!N:arisoD.§
DC X'9726' GO +

~'1000'

DC X'40'
STATID DC FL2'm' where m is smallest
length in table
DC FL2'n' where n is largest
length in table
DC AL2(STLm-STATID)
DC

342

where the
symbols beginning STL are
the s~mbolic addresses of
the corresponding keyword
tables

AL2(STLn-S~ATID)

DC AL2(N XTLVL-*) Relative address
of next level table
The format of these extra level tables
is similar to that fer the third lEvel.
In
this way,
it is possible for national
languaye keywords to replace single wcrds
by two or more words, if so desirEd.

1. abort has occurred

1.

Because of the number of phases in the
compiler, the phase directory is split into
halves.
The first half is constructed
during the initialization of the compiler;
also a list of names of the phases in the
second half is kept in Phase AA. This list
is used to pass status indications (i.e.,
whether phases are wanted or not wanted)
from the first half to the second half.
Phase JZ uses the list to construct a new
directory for the second half.

2

LIST

1. not wanted

o wanted

3

4

LOAD

DECl,

1. not wanted

o wanted

1. not wanted

o wanted
5

The phase directory is constructed Ly
use of the BLDL macro and a build list.
The format of the build list is fully
described in the pUblicat:ien IBM_,§Y~J::.§!!!~~.£Q

6

E:XTF<-EF

1. not want,ed

o

wanted

XREF

1. not wanted

A'IK

1. not wanted

Q~~ati~~~~~.§!!!L-f2~!roJ-R~Qgra~_.§~£vif~~,

o wanted

Form C28-6541.

Each entry in the build list is 30 bytes
long. On returning from the BLDL macro,
two bytes of the name field and ten other
bytes of each satisfied entry in the build
list are used to construct a 12-byte phase
directory entry in the cOllipiler control
routines.
The build list is destroyed
after the initialization process is complete.

7

1.

o

o wanted

1. means U-format

o rreans }-forrnat
records on input

1

1 if track overflow
is presE'nt

Byte Number

2

1 -

3
4

severity
severity
Severity
Severity
where

The format of a phase directory entry is
as follows:

Phase name

2

5

St.atus byt,e

3
4 -

5

concatenation
number
Library identification

6 -

8

TTR of first text record;
where TT is the relative
track numcer, and R is the
block number on that track

9 -

10

Total
amount
required

of

and

The format of the control code word
(CCCODE), which is four bytes in length, is
as follows:

()

o

DUMP

1. wanted

o not wanted

6

CHAR 48

1 not wanted
o wanted

7

MACkO

1 not wanted
o wanted

o

SOURCE

1 not wanted
o wanted

1

CHK

1 not wanted
o wanted

2

BCD

1 BCD input
o EBCDIC input

3

SOUKCE2

1. wanted

storage

Length of first text record

11 - 1.2

2

code
code
cede
code
OOOO=FLAGW
0001.=FLAGE
0010=FLAGS

4

opr

o

not wanted

1. wanted
o not wanted

Appendix B: Resident Tables

343

5

1 AE required

6

1 program check
has occurred

7

1 means first recorc.

has been read
3

0

STIV1T

1 not wanted
0 wanted

1

MACDCK

1 not wanted
0 wanted

2

COMP

1 not wanted
0 wanted
1 rtacro phase now

3

running
1 batch record found
0 batch record not

4

found
5

1 EOF record found
0 EOF record not found

6

not used requirement

7

NEST

1 wanted
0 not wanted

344

This appendix describes the formats of
dictiohary entries during the compi~ation
of a source program.
The appendix is
organized in the following manner:
1.

Dictionary entry code bytes

2.

Dictionary entries for ENTRY points

element ~as a different code Lyte, but in
order to fermit ra~id identification of
dictionary entries,
the code bytes have
been allocated on the following basis:

Bit

Bit

posilio~ yal~~

3.

Code
bytes
entries

for

ENTRY

dictionary

o

o
1

4.

Dictionary entries for
and STRUCTU~E items

DATA,

LABLL,
1*

o
1

5.

Code bytes for LATA, L~BEL, and STRUCTURE dictionary entrieG

o
1

6.

7.

USES
of the OFFSE1 1 and OFFSET 2
slots in DATA,
LABEL,
and STRUCTURE
dictionary entries

Dictionary entries for:
label con~)tant.s
data constants
formal parameters
FILE entries
TASK and EVENT data
internal library functions
parameter descriptions
ON conditions
PICTURES
expression evaluation workspace
dope vector skeletons
symbol table entries
AUTOMATIC chain definitions
OED dictionarv entries
FED dictionar; entries
temporary dope vectors
BCD entries
second file statements

8.

Dimension tables

The dictionary is used to communicate a
complete description of every element of
the source program,
the compiled object
program, and the compiler diagnostic messages between phases of the compiler;
the
text describes the operations to be carried
out on the elements.
Each type of element has a characteristic dictionary entry, which is identified by a code occupying the first byte
of the entry.
In general,
each type of

o

3

1

lieani.!}.9
entry has ECL
entry has no BCG
entry is to be chained
entry not to be chained
not a rrEmLer of structure
merrber of structure
not dilfensioned
dimensioned

*This bit only applies to Phase FT which
constructs the storage class chains by a
sequential scan of the dictionary; later in
the compi ler, i tell.S wi th thi s bit on are
added to the storaye class chains.

In the second half byte, the following
Icodes have the meanings shown,
unless the
Ifirst half byte is X'C':
X'F'
X'7'
X'E'

rreans
rreans
means

data variablE
label variable
structure

The second and third
bytes of every
dictionary entry contain the length,
in
bytes,
of the entry.
If the entry has BCD
(i.e., the first bit of the entry is zero),
this length count does not include the ECD;
instead, the BCD, which follows the wain
body of the entry, is preceded by a single
byte containing one less than the number of
characters of BCD.
Using this general schewe,
the code
bytes alloc~t€d for dictior.ary
entries
appear in the following table. Code bytes
in the tanle which have no corresponding
descri~tion are not allocated.
X'OO'
01
02
03
04
05

06

Statement label constant
Procedure or entry label
GENERIC entry label
External entry label (entry type 4)
Built-in function, e.g., DATE
Te~porary variable and controlled
allocation workspace
Built-in GENERIC label, e.g., SIN

Appendix C: Internal Formats of Dictionary Entries

345

07
08
09
OA
OB
OC
OD
OE
OF
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D

Label variable
File constant

Task identifier
Event variable
Data variables (not dimensioned or a
structure member)

42
43
44
45
46
47
48
49
4A

4B
4C
4D
4E
4F
80
81

Dimensioned label variable

Dimensioned task identifier
Dimensioned event variable

82
83
84
85
86
87

1E'

1F
20
21
22
23
24
25
26
27
28
29

Dimensioned data variable

30
31
32
33
34
35
36
37
38
39
3A
3D
3C

3D
3E
3F

346

Task identifier formal parameter
Event variable formal parameter

8E

8F

Data variable formal paralf,eter or
temporary

90
91
92
93
94
95
96
97

lnvocaticn count dictionary entry

Label variable in structure

Task identifier in structure
Event variable in structure
structure item
Data variable in structure

98
99

Dimensioned variable forrral
or temporary
File attribute entry

paramE:-t~r

9A

9B
9C

Dlmensioned and structured label
variable

9D
9E
9F

Dimensioned
structure
Dimensioned
structure
Dimensioned
Giffiensioned
va.riable

task identifier in

AO

event variable in

A1
A2

structure item
and structured data

Formal parameter type 1

Dimensioned task identifier formal
f;ararr!eter
Dimensioned event variable formal
parameter
Dimensioned data variable formal
parameter or dimensioned temporary

A3
A4

A5
A6

A7
40
41

ENTRY type 1 -- from a PROCEDURE
statement
BEGIN statement entries -- entry
typE:- 1
ENTRY sta.tement -- entry typ~ 1
Entry type 5
Entry type 3
Entry type 2
Entry type 6
Label variable formal parameter or
temp crary
constant
File formal parameter or file
temporary

8A

8B
8e
8D

2A

2B
2C
2D
2E
2F

88
89

ON CONDITION entry

A8
A9

structured label variable temporary

AA

AB
AC
AD
AE
AF

strcictured task identifier temporary
Structured event variable temporary
Temporary or formal parameter
structure
Structured data variable temporary

BO

4

Level

5

count

6-7

Dictionary ref~rencE to t~e
entry type 1 of the containing block

8-9

Dictionary reference of the
dictionary
entry for the
first
label
that
W5S
attached to the PROC£DUk£
statement

10-11

Dictionary reference to the
entry type 1 of the next
PROCEDURE or BEGIN staterrent
in the source program

12-13

The start of the chain
all AUTOMATIC variables

B1
B2

B3
B4
B5
86
B7
B8
B9
BA
BB
BC
BD
BE
BF

co

Dimensioned and structured label
variable temporary

Dimensioned and structured task
identifier temporary
Dimensioned and structured event
variable temporary
Dimensioned structure formal
parameter or temporary
Dimensioned and structured data
variable temporary
String dope vector for temporary
DED2 entry
Internal library function, e.g.,
conversion routines
Compiler label
Prefix ON list item
Parameter lists
Dope vector skeletons
Symbol table entry or DED entry
Error message, table entry, workspace
requirement, STATIC DSA, etc.
Record dope vector (RDV) entry
Workspace requirement entry
Select a member froIT ~ generic family
AUTOMATIC chain delimiter or Dope
Vector Descriptor CDVD> entry
ON condition entry
Label BCD entry
End of information in dictionary
block

C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF

The format of an entry for a PROCEDURE
statement is as follows:

1

Code byte X'80'

2-3

Length

,

14-15 I
16-17 >
18-19 I
j

of

Dictionary references to
three dictionary entries
inaicating storage requirements for workspace

20-21

Dictionary
ChECK list

22-23

Dictionary
refErence
NOCrlECK list

24-25

Dictionary reference of the
first symbol table entry for
this block

26-28

Size of
block

29-31

Offset of the eight words in
the DSA used for addressing
the DSA

32-34

Offset of the storage used
for the pararre~er list necessary in an ALLOCATE- FREE
statement

35-37

Offset
of
the
two-byte
switch which is set on entry
to a procedure and tested at
a RETURN (expression)

38-40

Offset of the tour-byte slot
which
will
contain
tne
address of the first approximation of the target field
(the address of the implied
parameter)

41-42

Dictionary reference of the
entry type 1 of the first
ENTRY statement of the procedure. The Entry type 1
for PROCELURE
and
BNTKY
statements of anyone procedure form a circular chain.

the

reference

DBA

for

Appendix C: Internal Formats of Dictionary Entries

of
of

this

347

If there are no ENTRi statements in a procedure this
slot will contain the dictionary
reference of the
PROCEDURE's entry type 1,
i.e.,
of the entry in which
the slot occurs
43

OPTIONS code byte

44-57

Eight 2-byte dictionary references
to
dictionary
entries for prefix options.
Only those prefix options
which are changed within the
procedure have a dictionary
reference.
The
remainder
are zero.
~he order of the
options in this list is the
same as in the options byte.
(See "Options Code Byte" in
this Appendix)

60

Options change byte.
This
byte contains a one bit for
each prefix option which is
changed within the procedure.
Its format is identical with the normal options
byte

61-63

Offset of workspace used in
BUY statement

64

Optimization byte

65

2*n where n is the number of
parameters
at this entry
point

66 onwards N dictionary references
formal parameter
type
entries

The format for the entry type 1 derived
from an ENTRY statement is as follows:

348

Code byte X'82'

2-3

Length

Level

5

Count

6-7

Dictionary reference of the
next member in the circular
PrtOCEDURE-ENTRY chain

8-9

Dictionary reference of the
dictionary
entry for the
first label en the original
ENTRY statement

10-12

The offset
entry point

13

2*n where n is the number of
par.-ameters

of the apparent

14 onwards n jictionary references to
the formal parameter type 1
entries
The lal:els on a PROCEDURE or ENT.t{Y
statement will be placed in the dictional~y
according to the following format:

1

Code byte X'Ol'

2-3

Length

4-5

Hash chain(STATIC chain)

6-8

Pointer to transfer vector

9-10

statement numl:er

11

Other 1 code byte.
(See
"First code byte - other 1"
in this Appendix.) The last
bit will always be set to
one, unless the label is the
last label for a particular
statement, in which case the
last bit will be set to
zero.

12-13

Pointer to entry type 2

14-16

Spare bytes for final assembly.
The pseudo-code phase
dealing
with
RETU~N
(expression)
will
insert
into these bytes a
code
which rrust be stored in a
specific slot in the DSA
whenever the procedure is
entered via this label.
The
coJe is used by the prologue
construction phase.
Byte 16
in the first label for each
PROCEDURE or ENTRY statewent
will contain t.he nunlber of
latels associatEd with that
stCiterr.ent

of
1

The format of an entry for a BLGIN
statement is similar to the above for the
first 34 bytes. The initial code byte is
X'81',
and the dictionary reference in
bytes 8 and 9 is that of the first label on
the original BEGIN staten;ent, if any.
If
there was no statement label,
then the
statement number occupies this slot. The
presence of a state~ent nurrber or statement
label is indicated by a flag byte in
position 35.
This is set to aN for a
statement number, or to SL for a state~ent
label.
Bytes 36-56 contain the same as
bytes 44-64 in a PROCEDURE entry type 1.

1

4

17

Block level

18

Block count

19

count of containing block

20

BCD length·-1

21

BCD of labl2l

~ntry
type 3 dictionary entries are
constructed either frorr an ex~licit declaration
or from implicit and default
rules. Th0ir for~at is as fellows:

1

Code tytel:. '84'

2-3

Length of entry.

4-5

Dictionary
referenCe
of
entry type 1 of PROCEDURE or
ENTRY statement.

6-7

Dictionary
reference
of
entry type 2.
This describes the value returned
when the label associated
with this entry type 3 is
invoked as a function.

8-10

The offset in the DSA of the
containing
bleck
ot
the
first approximation of the
storage
for
the
value
returned
by
this
entry
point, when it is invoked as
a function.

11

The entry code byte.
(See
"Entry Code Byte" in this
Appendix.)

12-13

The dictionary reference of
an item in the AUTO~ATIC
chain of
the
containing
block. Entry type 3 entries
feature in the
AUTOMATIC
chain of
~he
containing
block.

14-15

switch bytes. The pseudocode phase
dealing
with
RETURN
(expression) inserts
into these tytes the bit
pattern of the code which
will signify that entry to
the procedure was by the
laDel associated with this
particular entry type
3.
Phase QF will use this to
create ~VI instructions.

16-17

Dictionary reference of a
SETS list.
1his will be
zero if the attribute SETS
was not specified. The format of a SRTS list is given
at the end of this section.

18-19

Dictionary reference of the
dictionary
entry for the
label belonging to this
entry type 3.

An entry type 2 describes the data
attributes of an entry point.
The format
is as follows:

1

Code byte X 185 I

2-3

Length.

4-5

Dictionary
en·try type 3

6-8

Offset, i.e.,
the position
of the string dope vector in
the DSA of the block to
which
the entry belongs.
This will be zero if the
item is not a string.

•

reference

of

9

DATA byte
(sf;!e "DATA Byte"
in this Appendix).

10-12

Data information, which is:
1. with numeric data,
the
precision and
sc~ling,
left jUBtified
2. for strings of fixed maximum length,
the binary
version
of the string
length in the two leftmost bytes of the data
information
3. for strings of adjustable
length,
the text reference of a second file
statement
giving
the
expression for the string
length

13-14

Picture table reference,
if
required. The storage allocation phase will
change
this to the dictionary reference of a DED entry,
the
picture
table
reference
being moved into this reference if necessary

Appendix C: Internal Formats of Dictionary Entries

349

20

21

Status byte. This byte will
contain
X'OO'
or X'FO'.
X'OO'
indicates that the
entry was constructed from
an ENTRY declaration which
had parameter descriptions.
X'FO'
indicates the entry
was constructed either artificially or from an ENTRY
declaration which did not
have parameter descriptions.
2*n where n is the number of
parameters. This is zero if
the status byte is X'FF'

22 onwards If the status byte is X'OO'
there are n two-byte references of parameter descriptions~
A parameter description
is a dictionary
entry
for the particular
type of item but without a
BCD.
If one particular parameter is not
described,
i.e.
if there are two adjacent commas in the ENTRY
attribute,
then the dictionary reference is zero.
When the status byte
is
X'FO'
then an entry type 3
is only 23 bytes long.
22+2n23+2n

350

Entry type 4 dictionary entries describe
external entry points. Their format is as
follows:

1

Code byte X'03'

2-3

Length

4-5

Hash chain, later used
as the STATIC chain

6-8

Offset of the load constant
in STATIC

9-11

Offset in the DSA of the
declaration
blocK of the
the
storage
for
first.
approximation of the value
~-eturned.

12-13

Th€ dictionary reference of
an item in the AUTOMATIC
chain
of
th~
declaring
block. Entry tyre 4 entri~s
are members of the AUTOMATIC
chain
of
the
declaring
block.

14

The ENTRY byte. (See "ENTRY
Byte" in this Arpendix.)

15

The DATA byte. (See "DATA
Byte" in this Arpendix.)

16-18

Data information which is:
a) with numeric data, the
precision
and scaling,
left justified
b) for strings of fixed maximum length, the binaLY
version of the
string
length in the two leftmost bytes of the data
information
c) for strings of adjustable
length, the text reference of a second file
statement
giving
the
expression for the string
length

19-20

Picture table address if
required.

21-22

Dictionary
SETS list

23

Status byte. If this
X'OO' the rreaning
san:e as the stat.us
an entry type 3.
byte is X'FF' it is

DECLARE statement number

1

Code byte X'C8'

2-3

Overall length of original
BCD entry

4-5

2*nl where nl is the number
of identifiers in the SETS
list.
If * was specified,
these bytes contain 2*nl+l.

6-5+2*nl

Dictionary references of the
identifiers in the SETS
list.

6+2*nl

n2, the nurrber of parameters in the SETS list.

7+2*nl
onwards

n2 numbers of one byte each.
These are the parameter
numbers and will be in
ascending order.

referenc~

of a
bytE-' is
is the
byte i.n
If tne
irnplit::d

that no parameters were
cribed
24

2*n where n is the number of
parameters. This is zero if
the status byte is X'FF'

25

n dictionary references to
parameter descriptions as in
an entry type 3

25+2*n

Level

26+2*n

Count

27+2*n

BCD length-1

28+2*n
onwards

BCD of identifier

TIN entries. 1hese ~ntrics
are made when an identifi~r
is given the attribute GENERIC.
The rointers ~rE to
the entries which contain
specifications of the various possible attributes

des~

Entry type 5 dictionary entries describe
the entry points which are formal parameters.
They have the same format as entry
type 4 except that:

12+2n

Level

13+2n

count

14+2n

BCL length-1

15+2n
onwa.rds

BCD

This code byte is used in ENTRY type 3,
4, and 5 dictionary entries. 1he format is
as follows:

Byte 1 is X'83'
Bytes 4 and 5 contain the address
the formal parameter type 1 entry

of

Bytes 6 to 8 contain the offset in the
DSA of the declaring block of the
address slot associated with a forwal
parameter
No BCD is contained in

th~

entry

The format for a GENERIC entry point
as follows:

IRREDUCIBLE

2

REDUCIBLE

3

USES

4

SETS

5

SECONDJI.R Y

6

RECURSIVE

7

Has data attribute

8

Not used

is

1

Code byte X'02'

2-3

Length

4-5

Hash chain

6-8

Offset 1 Slot

9-10

DECLARE statement number

11

2n, where n is the number
of two-byte addresses following

12-11+2n

1

This code is used in entry type 1
dictionary entries for PROCEDURE statements.
The format is as follows:

Pointers to entry type 4
or 5, ENTRY labels, or BUIL-

1

REENTRANT

2

ON Block

3

MAIN

4

TASK

5

RECURSIVE

Appendix C: Internal Formats of Dictionary Entries

351

another chain, e.g.,
MATIC or STATIC chain

6

OPTIONS

7

contains RETUHN (expression)
statement

8

ENTRY name is passed as
argument

AUTO-

2-3

Length

4-5

Initially contains the hash
chain. After the dictionary
scan, this is re-used to
form another chain, e.g.,
AUTOMATIC or STATIC chain

6-S

Offset inserted by storage
allocation phase
(as for a
data item)

9-10

DECLARE statement number

11

'Other l' code Dyte
(See
"First Code Byte - Other 1"
in this Appendix.)

12

'Variable' codE::
"Variable Byte"
Appendix)

13

(See
'Other 2'
code byte
'Second Code Byte - Other :2"
in this Appendix.)

14

(See
'Other 3' code byte
"Third Code Byte - Other 3"
in this Appendix.)

15

'Other 4 '
code byte
(Se-e
"Fourth Code Eyte
Other 4"
in this Appendix.)

This code byte is used in entry type 1
dictionary entries.
Format of the Optimzation Byte:

1

Not
eliqible for
library workspace.
in

DSA

2

Eligible for DSA
storage.

3

Needs invocation count.

4

Needs current file slot.

5

contains

6

Not used.

7

Not used.

S

Not used.

in

STATIC

asynchronous CALL.

byte
in

(See
this

-

16 onwards Content determined by variable code byte.
After variable information
2 nytes

Symbol slot

1 nyte

Level

1 tyte

count

1 byte

BCD length-l
BCD

1

352

Code
byte may be X'07',
X'17', X'27', X'37', X'S7',
X'97',
X'A7', A'B7'.
The
last four cases apply when
the item occurred in a parameter list in a PROCEDURE
or ENTRY statement.
In this
case,
bytes 4 and 5 will
contain the dictionary reference of the corresponding
formal
parameter
type 1
entry.
In the first four
cases,
bytes 4 and 5 initially
contain
the hash
chai~.
After t~e scan of
the dictionary,
this slot
will
De re-used to form

with the exc~ption of the 2-byte syrrbol
slot, the general format is the same as for
a structure.

The format is as follows:

1

bytE may be X'OF',
X'lF', X'2F', X'3F',
X'PF',
X' 9F', X' AF', or X' EF' .
'Ih,~
COde

last four cases apply when
the iterr occurred in a parameter list in a PROCEDURE
or ENTRY statement.
In this
case, bytes
4 and 5 will
contain the dictionary reference of the corresponding
formal
paraweter
type
1
entry.
In the first four
cases, bytes 4 and 5 initially cont~in
the
hash
chain.
After the scan of
the
dictionary this slot
.be re-used to forn'
will
AUTOanother chain,
e.g.,
MATIC or S~ATIC chain
2-3

Length

4-5

See above

6-8

Of f set.
Se,,,,
"Format
Variable
Information"
this Appendix

9-10

22

Variable infcrrration.
The
contents of these bytes are
deterrrined by the variable
code byte.
See "Forroat of
Variatle
Information"
in
this Apr:;endix

1 byte

Level

1 byte

Count

1 tyte

BCD length-l

of
in

DECLAHE statement
number.
If the variable has not been
ex~licitly
jeclared,
this
number is zero= otherwise,
it is the statement numner
assigned to
the
DECLARE
statement from which
the
variable was obtained.

11-16

Six code bytes.
These are:
other 1, variable, other 2,
other 3, other 4, and data.
(see "Code bytes"
in this
Appendix for a description
of these bytes.)

17-19

Data inforrration, which is:
1. with numeric data,
the
preciSion and
scaling,
left justified
2. for strings of fixed maximum length,
the binary
version
of the string
length in the two leftmost bytes of the data
informat:ion
3. for strings of adjustable
length,
the text reference of a second file
statement
giving
the
expression for the string
length

20-21

the ~icture table entry
2. If the DED bit is on and
the SYMBOL bit off, this
slot
points at a
D~D
entry.
I f thE. i ten! has a
picture,
tte CED entry
will contain the picture
tal::le address
3. If the SYtv;BOL bi t is OIl,
the slot will point at a
SYMBOL entry.
This again
will contain thE picture
addrEss, if specified

BCD

These entries do not include base elements, i.e., they do not have any data
attributes or LAB~L.
Their format is:

1

Code byte may be
X'2E',
X'3E', X'AE', or X'BE'.
The
last two indicate that there
is no BCD attached.
When
the identifier occurs in the
parameter list of a PROCEDURE or ENTRY
statement,
bytes
4-5 ccntain the dictionary
reference of the
formal
parameter
type 1
entry.
In the case of the
first two code bytes, bytes
4-~ of the
entry initially
contain the
has~
chain.
This is later modified ny
Phase FT

2-3

Length

4-5

See byte number 1

Symbol
slot,
containing
ei t:her Z81:'0,
or one of the
following:
1. If
the SYMBOL and DED
bits are not aD, and the
data iterr has a picture,
these bytes contain the
dictionary refErence of

Appendix C: Internal Formats of Dictionary Entries

353

6-8

1. For structures which are
parameters, or are dynamically defined, the offset froIT. the start of the
major
structures
dope
vector
or
the
minor
structures dope vector.
2. For major structures, the
offset from the start of
AUTOMATIC or STATIC of
the address slot which
will point at the structure dope vector
3.
For CONTROLLED structures,
only that specified for minor structures
in 1 , above
4.
For structures in STATIC EXTERNAL the contents
depend on the setting of
the
"dope
vector
required"
bit
in
the
"other 3" code byte.
If
this bit is off and the
item is a major structure, the slot contains
the offset from the start
of STATIC of the slot
which will contain the
address of the first byte
of the structure.
If the
dope vector bit is on,
the
slot contains the

354

offset frorr the start of
STATIC of the
address
slot which will point at
the structure dope vector.
The offsEt slot is
not used in eith~r of thE
above
cases for minor
structures

These bytes are used by the
storage allocator; they will
finally contain one of the
following offsets:

9-10

DECLARE number,
i.e.
the
stateroent nurrber
of
the
DECLARE staterrent which Froduced the structure

11-15

Five code bytes. These are:
other 1, variatle, other 2,
other 3, and other 4

16

Variatle information.
The
content is deterrrined by the
variacle code byte, and will
always include the information required fer structure
members. Th~ format is described under
"Format
of
Variatle
Information"
in
this Appendix
After variable infcrmaticn:
byt~

Level

1 byte

Count

1 byte

BCD length-l

1

BCD

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

I Bit I
I No. I

I
I

Description

I
I

Set Iiy

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

I 1
I
I
I
I 2
I
I
I 3

Symbol or requires load constant if I Phase EL, FT, or I
label constant
I NU
I

I
Defined on

Phase EL

Mentioned in CbECK list

4

Needs DVD

5

Last member in structure

6

Variable dimensions

7

*
*

8

dimensions
string length for data item

--More labels follow for a label
constant

_____

~

---Major Structure - no member of
the structure has a dimension or
length attribute
which is not *
__________
•___________________________

~

I
I
j

I
I
Phase FO
I
I
I
Various
I
I
Phases FL or LW I
I
Phase EL
I
I
Phases EL and FT I
I
Phases EL End FT I
I
Phase EG
I
I
I
Phase LY
I
I
_________ _________ JI

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

I Bit I
I No. I

I
I

Description

Set by

I
I

~-----+-------------------------------------+--------- ---------i
1
Dynamically defined
Phase EL
I
2

CONTROLLED major structure with
varying strings

3

NORMAL

4

Reserved

5

Formal Parameter

6

INTERNAL

'7

00

=

=

0, ABNORMAL

=

0, EXTERNAL

I
I
I
I
Phases EI and FT I
I
I
I
Phase EI
I
I
Phase EI
I
I
Phase EL
I
Phase EY

1

=

1

AUTOMATIC or DEFINED or siffiple
parameter

j

and
01

8
______

~

STATIC

11
CONTROLLED
_____________________________________

~

I
I
Phase EL
I
I
Phase EL _________ JI
_________

Appendix C: Internal Formats of Dictionary Entries

355

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

I Bit I
I No. I

I

I

Descriftion
I
set by
I
~-----+-------------------------------+------------------------------~
1
I Needs dOpE vector
I Phases EK and EY if variable
I
I dimension entries, variable
I
I string length, or in
I
I CONTROLLED storage;
I
I Phase NU when item appears
I
I in an argument list

I
I
I Needs DED
I Phase NU
I
I
I Needs no storage for the iten I Phase GP
I itself
I
I
I
Correspondenc~ defined
I Phase FV

2
3

4
5

Chameleon

Phase GP

6

Sign bit for first offset

Phase PH for STATIC and
Phase PT for AUTOMATIC

7

Indication of the state of
the value in the first offset
rubbish
0
1 = good value

Phase PH for STATIC and
Phase PT for AUTOMATlC

I
I 8
IL _____

As above but for second
~

address slot
_______________________________

Phase PH
~

_______________ _______________ j

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

I Bit I
I No. I

I

I

Description
I
set by
I
~-----+-------------------------------+--------------------~
1
A constant has been produced
Phase JK
I
for this structure or array
I

00
01
10
11

2
and
3

Not te:r.porary
Tempora.ry tyr:;e 2
Temporary not sold
COBOL temporary

Phase GP, HF, HK,
IM, or LB

4

~ember

of defined structure

Phase FV

5

Packed

=

Phase EL

6

iV.a jor structure

PhasE l.L

No dope vector initialization

Phase GP

A temporary type 2 which has
been incorporated in workspace 1 or RDV reguired.
For
COBOL temporaries this bit
means RDV required
_______________________________

Phase Of

I
I 7
I
I 8
I
I
I
I _____
L

356

~

0 Aligned

=

1

~

_______________ _____ j

I
I
I
I
I

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

I Bit I
I No. I

I

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

I Second addr~ss slot
I
I
I
2
I Dimensioned
I
I
I
3
I ~Ember of structure
I
I
I
4
I Value list for label variables or I
I
I pas for defined iteas
!
I
5
I Initial value if not a'structure I
I
I or LIKE if a structure
I
I
6
I hXTERNAL slot
I
I
I
7
I Defined slot
I
I
I
Il _____
8
I ___________________________________
CONTROLLED fro~ ALLOCATE statement JI
1

~

For a detailed explanation of the significance of these bits and a description of
the extra slots associated with them, see
"Format of Variable Infornati.on" in this
Appendix.

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

I
I BIT
I

I
I
I

1

I
I
I

2

I
I
I

3

I
I
I

I
I
I

4

5

I
I
I

6

I
I
I

7

I
I
I

8

I
I
I

~---------+---+------------+----------+---------+---------+---------+-------+---------f

I CAD or I
I NUMERIC I
I FIELD
I

1

I POINTER/
I OFFSET *
I.

I Sterling I Long
I NON
I Short/
I S'IERLING I OFFSErr

I Cad.
I Binary I Float I Complex I 1
I NumerlC I Decimal I Fixed I Real
I 0
I Field
I
I
I
I

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

I STRINGS I 0 I Adjustable I Aligned I Varying I No
I Char
I AREA I Not
I 1
I
I
I Length
I
I
I Pict.urc I
I VARI- I Used
I
I Packed
I
I Picture I Bit
I ABLE* I
I 0
I
I
I String
Il _________ I ___ I ____________ LI __________ I _________ I _____ ____ LI _________ LI _______ LI _________ JI
~

~

~

~

*AREA, POINTER, and OFFSET data byte settings are:
AREA:
X'02' superimposed on the non-plctured CHAR string data byte entry
POINTER: X'40' superimposed on the FIXED EIN data byte entry
OFl'SE'l:

X'50'

superim~osed

on the FIXED PIN data byte entry
position of the information when the presence
of
other
attributes alter its
address.

Data
items,
labels~
and structures
require pointers to various tables if they
have certain attributes;;
for example, if
they are dimensioned or defined on a base.
Space will be left for information only if
the attribute is present. This leads to an
addressing problem of how to find the

The protlem is resolved by collecting,
into one byte, all the attributes which
require more than one bit to describe them.
This has taken the second place in all the
collections of attribute bytes. The presence of a bit in this byte indicates the

Appendix C: Internal Formats of Dictionary Entries

357

presence of further information. The offset of this information from the start of
the variable information is given by the
presence of the bits to the left of the one
of interest.
Each bit will have a value
associated with it.
The sum of the values
of the bits present and to the left of the
one of interest will give the value of the
offset. This is achieved in the coding by
moving the code byte, masking off the bits
to the right of the one being tested and
the bit itself, and translating the byte.
The information produced by the presence
of the following bits in the variable byte
is as follows:
Bit number 1:
----The second offset slot is 4 bytes long.
The contents of this slot are d~scribed
in this appendix.
The decision to
include a second offset slot in a
dictionary entry is based on questions
about the nature of the identifier.
Refer to figure 9.

r-,

IYI
l_J

implies that a second offset
slot will be given,

r-,
INI

l_J

that it will not.

Bit number 2:
----------The dimensioned

bit.
The slot produced
by this is three bytes long. Tne first
byte will contain the number of dimensions,
the next two the dictionary
reference of the dimension (multiplier)
table

Bit number 3:
----Member-of a structure tit.
This slot
is ten bytes long and has the following
format:

358

1

Declared level number

2

True level

3-4

Dictionary reference of
the containing structure

5-6

Dictionary reference of
the next merrter in the
structure

7

Alignment

8-10

Element length

n~mber

~.tL n U~12~f_~.!..

POS for defined items.
slot will contain the POS
binary intEger.

Bit number 5:
----The--initial value
four-byte slot.

or

The two-byte
value as a

LIKE

bit is a

1. For normal initial value.
The first
two bytes contain the dictionary
reference of the associated 'Initial
Value' dictionary entry. Tne four~h
byte contains X'FO'
2. For INITIAL CALL.
The first three
bytes contain the text reference of
a second file statement. The fourth
byte contains X'OF'.
3. For initial labels.
The first t~ree
bytes contain the text referencE of
a s~t of second fil~ statements.
The fourth byte contains Y'FF'.
If
there is an initial slot but no
initial values the fcurth byte contains X'OO'
4. For LIKE.
The first two bytes contain the LIKE chain.
The third and
fourth bytes contain the dictionary
ref~rence of the liken~d structure
bi~!:!.2!:0b~f_£.!..

The E1TERNAL bit.
This
contains the ESD number

2-Lyte slot

Ei!:_'!}~!!2bef_l.!..

The DEFINED bit.
This
contains the following:

7-byte

slot

1-2

Defined chain.

3-4

Dictionary

5-7

The text reference of a
second
filE
statEment.
After the dictionary these
bytes will contain X'FFFFF.f'
if the base is unsubscripted.

ref~rence

of tase

Bit number 8:
----The-CONTROLLED from ALLOCA'IE bit. This
bit is on for dictionary entries for
level 1 CONTROLLeD data specified in
ALLOCATE stat~ments. The two-byte slot
contains the dictionary reference of
the dictionary entry for the dat~ constructEd from the DECLARE statement

r---------------,
I Entry
I
L-------T-------J

I
V

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

YI Is it data
I
r--~ iteffi?
I
I
L-------T-----·--J
I
IN
I
V

I

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

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

r---------------,
I Is it formallY

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

I
I Is it strucIN
I Is it label
IN
r-,
I
I ture?
~-----·---->I variaole?
~-->INI
I
L-------T-----·--J
L-------T-------J
L_J
L_________ >I<------------------------- Y
YV
I Is it strucIN
r-,
I parameter?
~--------->I ture member?
~-->INI
l~------T-------J
A
L-------T-------J
l_J
IN
I
IY
V

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

I Is it con-

I
I

IY
I
I
~----J
I trolled?
I
L-------T-------J
IN
V

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

V

r-,

IYI
L_J

r---------------,IY

I Is it ex-

r-,
I Is it static? ~--------->I
~-->IYI
I
I
I ternal?
I
L_J
L-------T-------J
L-------T-------J
NI<-------------------------JN
V

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

I Is it string? ~-->IYI
l--------T-------J
L_J
IN
V

r---------------,IY r-,
I Is it struc-

I ture member?
~-->IYI
l-------"T-------J
L_J
IN
V

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

r-,

I Is it defined?~-->IYI
L-------T-------J
L_J
IN
V

r---------------,
I Is it dimenIY
r-,

I sioned?
~-->IYI
L-------T-------J
L_J
IN
V

r-l

INI
.Figure 10.

L,_J
Decision to Include a Second Offset Slot

Appendix C: Internal Formats of Dictionary Entries

359

Basic

elements:

OFFSETl slot not used.
contains
offset
of
element's dope vector from the start of
the EATERNAL control secticn

--OF~~~~2---sIot

The OFFSETl slot is in bytes 6-8 of the
jictionary entry and the OFFSET2 slot is
part of the variable infor~ation.

MajQf_5:!DQ_!!}inoE_~!!.~E!~~~~~

Mai2~ ___~~~~~2~ ___ st~~~!ur~ __~nt~i~~~

OFFSETl slot not used.
OFFSET2
contains offset of structure dope
tor from start of STATIC INTERNAL
trol section (if there is a
vector)

slot
veccondope

Basic elements:
OFFSETl slot contains
--offset o~virtual origin (in the case
of dimensioned ite~s) or offset of item
(when not dimensioned)
from start of
STATIC
INTERNAL
control
section.
OFFSET2 slot contains offset of dope
vector (if there is cne) from start of
STATIC INTERNAL control section

OFFSETl slot:
not used. OFfSET2 slot contains offset
of structure dope vector from point to
which pseudo register points.
(In the
case of the major structure, this value
will De zero.)

Basic elements: OFFSETl slot not used.
--OFFSET2---slot
contains
offset
of
element's dope vector
relative
to
address in pseudo-register.

OFFSETl slot contains offset cf vertical
origin of the array relative to start of
data region. OFFSET2 slot ccntains offset
of dope vector (if there is one) from the
start of the data region.

Const~!!~di!!J~nsi2~~~

as
for
STATIC
INTERNAL except that all offsets are
relative to start of DSA.
as

for

STF.TIC

~Qj~~tabl~_Qi!!Jensi2~~~

major and minor
structure entries: OFFSETl slot not
used. OFFSET2 slot contains offset of
structure dope vector from start of DSA
(if there is a dope vector)

~Qj~~!~Ql~_Qim'§D~i2D~~

OFFSET·l slot not:
used.
OFFSET2 slot contains offset of
dope vector from start of data region.

~~~iE_ el~me~!Q~

OFFSETl slot not used.
slot
contains
offset
cf
elem~nt's dope vector (if there is one)
from the start of the DSA

OFFSET2

OFFSETl slot contains offset of address
slot which contains a pointer to the arrays
dope vector.
(Not used in the case of
CONTROLLED.)
OFFSET2 slot is not present.
~~j2~_~!ruct~Ee

e!}!!:y~
OFFSETl slot contains offset of address slot from start
of data region. OFFSET2 slot contains
size of EXTERNAL
control
section.
(Offset
of
major
structure
dope
vector = 0.)

Minor structure entries:
OFFSETl slot
--not-used:--OFFSET2-sIot-contains offset
of structure's dope vector from start
of major structure dare vector.
360

OFFSETl slot ccntains offset of datum
from start of data region. OFFSET2 slot
contains offset of dcpe vectcr (if there is
one) from start of data region.

11

Other 1 Code
Byte
(See
"First Code Eyte - Other 1"
in this Ap~endix

12-14

Second offset Slot

15-16

Spare for Final Assembly

17

Level

18

Count

19

Count of Containins Block

20

BCD Lengt.h-1

21 etc.

ECD

E:~~~!:~Ql~ __ l.englb.!.

OF£o'SETl slot not
u3ed. OFFSET2 slot contains offset of
dope vector from start of data re~ion.

OF?SE~l slot contains offset of
address
slot which points to string dope vector
(not used in the case of ~ONTROLLED).
OFFSET2 slot not present.

OFFSET1 slot contains offset of datum
OFFSET2 slot
from start of data region.
not present.

OFFSETl slot contains offset of address
slot which points to datuffi (not used in the
case of CONTROLLED).
OFFSET2 slot not
present.

1

Code byte X'OO'

2-3

Length
byte

4-5

Hash chain - STATIC chain

6-8

Offset

9-10

statement
number
(except
when the latel is mentioned
in an ON CHECK list,
in
which
case it gives the
chain to the label BCD dictionary entry, code
byte
X' CE')

up

to

The format is identical to that of a
label constant, except for the cmission of
the BCD. The code byte is x'C3'.

These entries are derived froIT the PROCEDURE and ENTRY statements, and do not
contain any information other than that the
The
identifier is a formal parameter.
format is as follows:

1

Code byte X'40'

2-3

Length

4-5

Hash chain

6-7

These bytes will point to a
full
description
of the
identifier after Phase EK,
or Phase FA, or Phase FE.
These full descriptions are
dictionary entries for the
type of item they are describing.
They do not contain the FCD of the identifier,
but in the slot for
the hash chain there is the
dictionary reference of the
corresponding forreal parameter type 1 entry.

8

Level

9

Count

10

BCD length-l

11

BCD

BCD length-l

Appendix C: Internal Formats of Dictionary Entries

361

For a description of the types of entry
pointed to, see "Dictionary entry for parameter descriptions."

16

Level

17

Count

is

BCD length-l

19 onwards BCD

For attributes specified in OPEN statement the format is as follows:

Code X'B9'
is used for file parameters
and for file temporaries.
~he
format of
the entry will be the sarre as that for
label variables.

1

Code byte X'9S'

2-3

Length

4-5

STATIC chain

6-S

OFFSET1

9-10

DECLARE statement number

11 onwards String of second level markers (without preceding 'CS'
code bytes) one for each
attribute other than FILE,
TITLE and IDENT.

This entry is created by the read-in
phase and is referred to only as the
argument of an ATTRIBUTES marker.

Code X'Cg' is used for
string.

the

1

Code byte X'C8'

2-3

Length

4 onwards

Internally
argument
option

environrrent.

coded form
of
of
ENVIRONr-~ENT

Code X'CS' is also used for attributes
collected from the DECLARE statement.
Code X'OS'
is used for file constant
entries, which have the following format:
Code byte X'C8'

1

Code byte X'OS'

2-3

Length

2-3

Length

4 onwards

4-5

Hash
chain,
subsequently
EXTERNAL
or STATIC chain
depending on whether FILE is
EXTERNAL or INTERNAL

String of second level rrarkers
(without [receding code
bytes X'C8'), one for each
attribute other than FILE,
ENVIRONMENT,
EXTERNAL,
or
IN'IERNAL

6-S

OFFSETl (S~ATIC or
vector offset)

9-10

Declare statement number

11-12

Dictionary
attributes
none)

13

Code byte (similar to th~
"othsr 2" code byte.
Only
internal/external bit used)

1

Code byte X'S8'

2-3

Length

Dictionary
reference
environrr.ent string (zero
none)

4-5

Hash chain

6

DATA tyte

14-15

362

1

transfer

reference
entry
(zero

of
if

of
if

The format is:

7

Data Precision*

8

Scale Fact:or*

Eighth bit:
1 indicates that no conversion is required.
2.

After
the constants processor the
bytes 6 through 8 will contain the
offset of the constant from the start
of the pool of constants.
If a dOfe
vector is re~uested then the offset ot
this frow the start of the constants
pool is eight less t.han that of th.2
converted constant.

3.

Shoule a DED be required, this will Le
constructed by Phase PL.
The two
bytes,
precision(2)
and
scale
factor(2),
will contain a dictionary
reference of a DED dictionary entry.
If the constant requires a dope vectcr
then Phase OS will make a dictionary
entry for it, and the dictionary reference preceding the PCD will be the
dictionary reference of this.

*'l'hese are the apparent precision and factor derived
from the BCD of the constant
( ~3ee Note 2)
9

Type (see note 1)

10

DATA byte (2)

11

Data Precision (2) **

12

Scale Fact:or (2) * *
**These bytes are inserted
by the phase requesting conversion.
If a picture is
required,
these bytes are
used to contain a
picture
table reference (see Note 3)

13-14

Dictionary reference - used
when a phase requires a constant to be converted into a
specific location in storage

15

BCD

The format of the dictionary entries for
task identifiers and EVENT data is,
afart
from the initial code byte, the same as
that for a label variable.

Notes:
1.

The type byte has the following

mean-

ing:

00 - normal

BCD constant.
The first
offset slot must be relocated by the storage allocation phase,
to contain
the offset of the converted
constant from the start of
STATIC storage, rather than
from the start of the constants pool

11 - the BCD is replaced by the internal form of the constant.
The first offset slot is
treated in the same way as
for the code 00
10 or 01 - the constant is required to
be converted into a
specific location in storage.
The second code implies the
converted constant should
be made negative
before
being stored

'l'he forrT,at is:

1

Code byte X'04'

2-3

Length

4-5

Hash chain later
the STATIC chain

6-8

Offset - gives the position
in S~A'lIC storage of the
load constant for Library
routine

9-10

Code bytes - the first code
byte contains a value which
identifies
the
built-in
function and also provides
inforrr.ation about it.
It is
used mainly by [hases 1M and
MD-MM inclusive.
The second
code byte contains further
information about the builtin function
(See
"Second
Code Byte.")

11-12

DECLARE statement number

sixth bit:
1 indicates that the constant requires a DED.
Seventh bit:
1 indicates that
constant requires a dope vector.

becoITes

the

Appendix C: Internal Formats of Dictionary Entries

363

13

Level

14

count

15

BCD lengt.h-l

16

BCD

The

further information
the function

second code byte
information:

the

contains

followin~

1

May oe

2

May have
argument

an

3

Must have
arqurr,ent

an

4

Is a pseudo-variable

5

Indicates to which of the
two tables the offset refers

6

an
array
(or
May
have
structure> as an argument,
but will return a scalar
result

~assed

13

Level

14

Count

abou·t

BCD entries are used when the LIKE,
DEFINED, or POOL attributes are used.
A
short dictionary entry with the format
given below is used. This is pointed at by
the dictionary entry with the attribute.

as an argument
array
array

as
as

an
an

Library routines, other than built-in or
GENERIC functions, are known as Internal
Library Functions.
Their dictionary entry
format is as follows:

1

Code Eyte X'40"

2-3

Length

4

BCD length-1

5

BCD

Dictionary entries for parameter descriptions are identical with the normal
entry for data variable, label variable u
structure,
filE,
or entry points, except
for the following details:
Hash chain contains pointer to formal
parameter type 1. After Phase FT this
pointer is moved to the bytes containing level and count
No BCD is present

364

1

Code Byte X' C2'

2-3

Length

4-5

Hash chain

6-8

Offset

9

Library Code
identifies
the particular Library routine required

10

Not used

11-12

Code Bytes - the first code
byte contains a value used
by phase MG to pick up complete inforrration about the
Library function. The second
code
byte
contains

No block identification is present fer
ENTRY or FILE
The code byte for an entry point
referred to as entry type 6 - is X'86'

Entries for ON statements are made by
Phase FC, and contain the following:

1

Code Byte X'CL'

2-3

Length

4-5

AU'lOMATIC chain

6-8

Offset

9

Code byte as suppliea by the
Read-In Phase

10

Block

The format of an entry in the picture
table in the dictionary.

lev~~l

1

Code Byte X' C8'

11

Block count

2-3

Length = L+13

12

n

4-5

contains
address of
entry in picture chain

6-8

Offset in STA1lC storage

9

Code Byte (after PhasE F~)
(SEe Code Byte descripticn)

10

P
the nurrber of digit
positions in field in nuweric picture.

11

Q
the number of digit
positions after V character
in numeric picture.
Code
X'SO'
represents 0 7
X'7F'
represents
-1, and X'81'
represents +1.

12

W -

13 onwards n dictionary references of
variables cr ON condition
entries

This entry is made by Phase FO:

1

Code Byte X'4D'

2-3

Length

4-5

Hash chain later
AUTO£
I
I

~----------+---+---+-----------+--------+----------+--------+----------~
3
,CILI
T
,
(I
I
I
,
.----------+---+---+-----------+--------+----------+-- ------+----------~

31
4

I

4

,

D

, M ,

U,

I

,

,CI/I'"

.----------+---+---+-----------+--------+----------+-- ------+----------~
5,
5
, E I N I
V
I
)'
I <= , > I
+
I

~----------+---+---+-----------+--------+----------+--------+----------~

61

6

IFIO,

w

,

.,

,

I

,

.----------+---+---+~----------+--------+----------+--------+----------~
7 I
7
, G I P I
X
I ASSIGN , MULTIPLE'
>=
I
/
I
I
, <
I
,
I
I
I
I
I
I ASSIGN
.----------+---+---+-----------+--------+----------+-- ------+----------~
8 I
8
, J , Q I
Y.
I
:
I
I
I REFBR
,
.----------+---+---+-----------+--------+----------+-- ------+----------~
9,
9
I I I R ,
Z
I
II
I
1,='
*
I
~----------+---+---+-----------+--------+----------+--------+----------~
A I
I
I
I PSEUDOI
%
I
I
I
1/1'
I
,
I
I
I VARIABLE
I
I
I
I
I
~----------+---+---+-----------+--------+----------+--------+----------~
B ,
"I
'I'
I
=
'PREFIX - ,
.----------+---+---+-----------+--------+----------+-- ------+----------~

, C ,

'I

I FUNCTION

,

I

,

It'

,

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

D ,

I

I

I

,&

I

I

>

I PREFIX

+

I

~----------+---+---+-----------+--------+----------+--------+----------~

E I

I

I SUBSCRIPT

I

I

I

I'

LITERAL

I

I

I

I

I

I

, CONSTANT ,

I

I

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

F

________
JI
IL __________ '___
I ___ I ___________ I
, ' __________ I ________
<
, __________
**
~

~

~

~

~

~

~

'<-Digits->I <-----Letters-----> I <--------------Operato rs-------------->,

372

8

9

A

D

C

B

F

E

r--------T-------T----------T-------T-----'----T----------T---------T-------------,
I
I
I
IHYBRID I
I
I
I
I

o ITO

ILINE

IA

I QUAL

I

ISN

I

lFL DEC IMAG

I

~--------+-------+----------+-------*---------+----------+---------+-------------i
1

I
I
I AL1Q~~TE I

I
I f~11

I
I£~Ig~

I

I NA~E!

I

i FL DEC REAL

IB

I

I

I SL

I

I FL BIN IMAG

I

1~§§IGN_~~

I

I

I
I

~--------+-------+----------+-------+---------+----------+---------+-------------~

I

2 I EY
3

I

~--------+-------+----------+-------+---------+----------+---------+-------------i
IEB~~

I

Ig~TUI~~

IESQf

I

ISL'

I

IFL BIN REAL

I

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

4 IWHILE
~i

I

IP

ICHECK

I

ICN

I

IFIX DEC IMAG I

~--------+-------+----,------+-------+---------+----------+---------+-------------~

I DI§,ELAY I §QQ~+

I

I ~£;.~!~

I

I GET

I

~

FIX DEC REAL I

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

6 I SNAP

I COL

IR

I

I

I CL

I

I FIX BIN IlvJAG I

~--------+-------+----------+-------+---------+----------+---------+-------------~

7 I

ISIGNAL

I§Q~Q

1!1: DO

I~RITE!

1E.!:l!

I~~~_~Q

IFIX BIN REAL I

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

I
8 ISYSTEM

I
IE

I
I

INO
I CHECK

12nd LEVELl
IMARKBR
I

I
I
lEND ITDO IINTEGER

I

I

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

9 I YiAI1:

I REY~BT I

I12Q

I E~~Q

IF

ILIST DOl

I UNL.Qf~

I EN12

I STG DEC REAL I

I

I

I

.--------+-------+----------+-------+---------+----------+---------+-------------i
I
I
I
I DATA
I
I
I
I
I

I
I A ITHEN

I

B

I

I

~--------+-------+----------+-------+---------+----------+---------+-------------i
IQELA~

I

1!~IT._1~~1211!K

110C~~~

I REWRITE:!

lEND PROG ION

I

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

C
D

ICONTROL I
I VARIABLE I

I
I

I
ISN2

I
I

I
I

I
I

I ARRAY
I
ICROSS SECTION I

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

I NULL

I~XIT

IQ~CL~R~

I§LS~

12~LETE

IOPE~

lEND BLOCKICHAR CONSTANT I

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

E I
.F

IC

IX

INO SNAP I

I

I

ISUB

I

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

ILSTOR
;
I _____________
BIT CONS'IANT JI
________ I ASS!~~
_______ I __________ IfORM~I
_______ I _________ If1Q§~
__________ I _________
~

+

~

~

~

~

~

~

Go Out Of Block

Appendix D: Internal Formats of Text

373

o

I 0
1

2
I 3
I 4
5
6
7
8
9
I A
I B

1 C
D
1

E

I
1 F

1

2

3

4

5

6

7

r----------T--------T--------T-------T--------------T-----------T----------T---------,
I
IFILE
I
I
I DECIMAL
I OPTIONS
I EXTERNAL
IAREA
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
I
I
I
I
I BINARY
I IRREDUCIBLE I INTERNAL
I POINTER I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
I
ILIST
I
I
I FLOAT
I REDUCIBLE
IAUTOMATIC IEVENT
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
I
IEDIT
I EVENT1
I
IFIXED
IR~CURSIVE
I STATIC
I TASK
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
ITITLE
I DATA
I PRIORITY I
I REAL
I ABNORMAL
I CONTROLLEL I CELL
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IATTRIBUTESISTRING
IREPLY
I
I COMPLEX
I NORMAL
ISECONDARY IBASED
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IPAGESIZE
ISKI
I
I
IPRECISION 1
IUSES
I
I OFFSET
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IIDENT
ILINE
I
I
IPRECISION 2
ISETS
1
I
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
ILINESIZE 1 PAGE
1
I
1 VARYING
I ENTRY
IINITVAR 1 1
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
1
ICOPY
I
I
I PICTURE (NUM) I GENERIC
I INITIAL
IINITVAR 21
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IINTO
IKEYTO
I
I
IBIT ATTRIBUTE IBUILTIN
ILIKE
I
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IFROM
ITASKOP
1
I
ICHAH ATTRIBUTE 1
I DEFINED
1
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
ISET
I
lIN
I
IDIMS(INTEGERS) 1
IALIGNED
I
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
IKEY
I
I
I
1LABEL
I
1PACKED
I
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
INOLOCK
IKEYFROM I
1
I
I
1 PACKED
1
I
~----------+--------+--------+-------+--------------+-----------+----------+---------~
I
1FORMAT I
1
IDIMS
I
I
I PICTURE
I
IIGNORE
NAME i I ______________
(NON-INTEGER) i IRETURNS


.----------+--------+----------+----------+--------+--------+----------+--------------i
I
I
IDEFINED
ISUBSCRIPT I
ILITERAL IDEFINED
I
I
ICNVB

I CONSTANT I SUBSCRIPT' I SUBSCRIPT'

I

.----------+--------+----------+----------+--------+--------+----------+--------------1
I
I FORMAT I
I
I
I FORMAT I
I
I

F LIIGNORE
1
<
**
__________ LILIST
________ LI __________ LI __________ LI ________
LILIST'
________ LI __________
LI ______________
JI

Appendix D: Internal Formats of Text

381

9

8

o

c

B

A

D

F

E

r--------T-------T------T------T--------T---------T----------T-------------,
I TO
I LINE
IA
I
I TO'
I SN
I
I
I
~--------+-------+------+------+--------+---------+----------+-------------~

1 I ALLOCATE I

I CALL

I

I

I

ICALL'

IEIO

I

~--------+-------+------+------+--------+---------+----------+-------------1

2 IBY

I PAGE

IE

I

IRETURNIPROC

I

IBY'

ISL

I

I

I

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

3 IFREE

I

I

I

IPROC'

I

~--------+-------+------+------+--------+---------+----------+-------------~

4 IWHILE
5

ISKIP

IP

I

IWHILE'

leN

IP'

I

I

.--------+-------+------+------+--------+---------+----------+-------------1
I
IDISPLAYIGOOB IBEGIN ISORT
IGET
I
IBEGIN'
I
.--------+-------+------+------+--------+---------+----------+-------------~

6 ISNAP

I COL

IR

I

ISNAP'

ICL

I

I

I

~--------+-------+------+------+--------+---------+----------+-------------1

7 I

ISIGNAL IGOTO

IITDO

IWRITE

IPUT

lEND DO

IITDO'

I

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

8 ISYSTEM

IE

I

I

I SYSTEM' IE'

lEND ITDO

I

I

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

9 IWAIT
A

IREVERT l i D O

I READ

I UNLOCK

lEND

IDO'

I

.--------+-------+------+------+--------+---------+----------+-------------1
I THEN
IF I G
I
I
IF'
I G'
I
I
.--------+-------+------+------+--------+---------+----------+-------------~

B IDELAY

I

I

IIF

ILOCATED IREWRITE

lEND PROG

IIF' OR ON

I

C ICV

I

ISELL

ISN2

lev'

I

ICROSS SECTIONI

.--------+-------+------+------+--------+---------+----------+-------------1
I
I
I
I
I
I
I
I ARRAY
I
I

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

D IEXIT
E

I NULL

IBUY

IELSE

I DELETE

I OPEN

lEND BLOCK I

I

.--------+-------+------+------+--------+---------+----------+-------------1
I
IC
IX
I NOSNAPI
IC'
lEND PROG 2INOSNAP'
I
.--------+-------+------+------+--------+---------+----------+-------------~

F LISTOP
:
I _____________
FORMAT
________ IASSIGN
_______ IBUYS
______ I FORMAT
______ I ________ I CLOSE
_________ I __________
JI
~

382

~

~

~

~

~

~

r----------------T----T---------T---------,
II TASK
I lB I
I
I
The triples produced as output from the
translator phase each consist of
five
bytes,
an operator followed by two 2-byte
fields.
Each of the two-byte fields may be
occupied by an operand,
which may be a
dictionary reference,
a code byte or code
bytes, or a numeric parameter.
Two zero
bytes in place of a dictionary reference
operand imply that the operand is the
result of previous operations, and that its
type and location are described in a TMPD
in the tex·t.
The number of operands and the fields
which they occupy depend upon the type of
triple.
The following table contains this
information for all the triples used in the
compiler.

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

ITRIPLE TYPE
IHEX IFIELD 1
IFIELD 2
I
I
ICODEi
I
I
~----------------+----t---------+---------~
I KEYED
I 03 I
I
I
~----------------+----t---------+---------~
I TITLE
I 04 I
IOPERANC
I
~----------------+----t---------t---------~
I ATTRIBUTES
I 05 I
I OPERAND
I
~----------------+----t---------t---------~
IPAGESIZE
I 06 I
I OPERAND
I
~----------------+----t---------+---------~
1IDENT
1 07 1
I OPERAND
I
~----------------+----+---------+---------~
ILINESIZE
I 08 I
I OPERAND
I
~----------------+----t---------t---------~
I INTO
I OA I
I OPERAND
I
~----------------+----+---------+---------~
I FROM
I OB I
I OPERAND
I
~----------------+----t---------+---------~
IKEY
I OD I
I OPERAND
I
~----------------+----t---------t---------~
I IGNORE
I OF I
I OPERAND
I
~----------------+----t---------t---------~
IFILE
I 10,
1OPERAND
I
~----------------+----t---------t---------~
ILIS'l'
I 12 I
I
1
~----------------+----+---------+---------~
1EDIT
, 13 ,
I
,
~----------------+----+---------+---------~
I DATA
I 14 I
I
I
~----------------+----t---------+---------~
I S'rRING
, 15 I
I OPERAND
,
~----------------+----t---------t---------~
ISKIP
I 16 I
'OPERAND
,
~----------------+----t---------+---------~
ILINE
I 17 I
I OPERAND
I
~----------------+----t---------t---------~
1PAGE
I 18 I
I
,
~----------------+----+---------+---------~
I COpy
I 19 I
1
I
~----------------+----t---------+---------~
IKEYTO
lA 1________ I OPERAND
L
________________ I ____
_________ J1
~

~

~~

IIRPL
~----------------t----+---------+---------~
I lC I
I
I

~----------------+----t---------+---------~
I lD ,
I OPERAND
I
~----------------t----t---------+---------~
IKEYFROM
I lE I
I OPERAND
I
~----------------+----t---------+---------~
IFORMAT LIST
, iF I
I
I
~----------------+----+---------+---------i
IUP
I 20 I
I OPERAND
I
~----------------+----+---------+---------~
I GIVING
I 21 I
I OPERAND
I
~----------------+----t---------+---------~
I DOWN
I 22 I
IOPERAND
I
~----------------+----+---------+---------~
I EVENT
I 23 I
I OPERAND
I
t----------------t----t---------+---------~
I I PRIORITY
I 24 I
I
I
~----------------+----+---------+---------i
I REPLY
I 25 I
I OPERAND
I

II IN

I

I

t~~;-~~i;~~;;~---t-;;-t----=----t;~~;i~~--1
~----------------t----+---------+---------i
IMSA
I 28 IOPERAND 110PERAND 21
t----------------t----+---------+---------~
IIMTA
I 29 IOPERAND loperand 21
~----------------+----+---------+---------~
I DEFINED
'I
I
I
ISUBSCRIP'l
I 2E IOPERAND I
I
~----------------t----+---------+---------~
INULL-FUNC~ION
I 2F I
I
I
~----------------t----+---------t---------i
I COMPILER
I
I
I
I
I FUNCTION
I 30 IOPERAND
I
,
r----------------+----+---------+---------~
I COMPILER
I
I
I
I
IFUNCTION CALL
I 32 'OPERAND
I
I
~----------------t----t---------+---------~
I COMPILER
I
I
I
,
IPSEUDO-VARIABLE I 34 IOPERAND
I
1
~----------------+----t---------+---------~
I BUY ASSIGN
I 37 IOPERAND 110PERAND 21

I

r----------------t----+---------+---------i

I ARCO

I 38 I
I
I
~----------------t----+---------+---------~
IPSEUDO-VARIABLE I 3A IOPERAND
I
I
r----------------t----t---------+---------~
I FUNCTION
1 3C IOPERAND
I
I
t----------------+----t---------+---------~
I SUBSCRIPT
I 3£ IOPERAND I
I
r----------------+----t---------+---------~
I I NOP
1 3F 1
I
,
I r----------------+----+---------+---------~
I COMMA
1 41 I
I
*
I
~----------------t----t---------t---------1
IFUNCTION COMMA
1 42 1
IOPERAND
I

r----------------t----+---------t---------i

I COMPILER
I
I
I
I
IFUNCTION COMMA 1 44 I
IOPERAND
I
~----------------+----t---------+---------i
I ACT
I 45 IOPERAND 110PERAND 21
~----------------t----+---------t---------~
ASSIGN 1____
46 'OPERAND
110PERAND
21J
I ICOMPILER
L________________
_________
_________
~

*This triple
format lists.

may

~

have

~

two

operands

Appendix D: Internal Formats of Text

in

383

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

I DROP

I 48 I

I OPERAND

I

~----------------+----+---------+---------~

IASSIGN

I 47 IOPERAND 110PERAND 21

~----------------+----+---------+---------~

1CONCATENATE

I 49 IOPERAND 110PERAND 21

~----------------+----+---------+---------~

IBUY

B

I 4A 1

I OPERAND

I

.----------------T----T---------T---------,
I COMPILER
IFUNCTION CALL'

I
I
I 72 IOPERAND

I
I

I
I

I t----------------+----+---------+---------~
IMINUS

I 73 IOPERAND 110PERAND 21

I ~----------------+----+---------+---------~
I COMPILER
I
I
1PSEUDO-VARIABLE' 1 74 IOPERAND

I
1

I
I

~----------------+----+---------+---------~

~----------------+----+---------+---------~

~----------------+----+---------+---------~

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

~----------------+----+---------+---------~

I t----------------+----+---------+---------~
I MULTIPLY
I 79 IOPERAND 110PERAND 21

lOR

lAND
I NOT

I 4B IOPERAND 110PERAND 21
I 4D IOPERAND 110PERAND 21

I 4F I

I OPERAND

1

~----------------+----+---------+---------~

ILIST'

I 52 I

1

1

~----------------+----+---------+---------~

IEDIT'

I 53 I

I

I

~----------------+----+---------+---------~

I DATA'

I 54 I

1

1

~----------------+----+---------+---------~

ISTRING'

I 55 I

1

I

~----------------+----+---------+---------~

ISTMPD

I 56 IOPERAND 110PERAND 21

~----------------+----+---------+---------~

IPLUS

IGIVIDE

1 75 IOPERAND 110PERAND 21
1 77 IOPERAND 110PERAND 21

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

I PSEUDO-VARIABLE' 1 7A IOPERAND

I

I

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

IPREFIX MINUS

1 7E I

1OPERAND

1

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

1FUNCTION'

I 7C IOPERAND

I

I

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

IPREFIX PLUS

I 7D 1

I OPERAND

I

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

I SUBSCRIPT'

I 7E IOPERAND

I

I

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

IMULTIPLE ASSIGN I 57 IOPERAND 110PERAND 21

I EXPONENTIATE

~----------------+----+---------+---------~

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

ITMPD

I 58 IOPERAND 110PERAND 21

~----------------+----+---------+---------~

IJMP

1 5B IOPERAND 110PERAND 21

~----------------+----+---------+---------~

1RPL '

1 5C 1

I

1

~----------------+----+---------+---------~

ILITERAL CONSTANT I 5E 1

I OPERAND

I

~----------------+----+---------+---------~

IFORMAT LIST'

I 5F I

I

I

t----------------+----+---------+---------~
I UP'
I 60 I
1
I
t----------------+----+---------+---------~

ITO

I 7F IOPERAND 110PERAND 21
I 80 1

I

I

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

I ALLOCATE

I 81 I

I OPERAND

I

t----------------+----+---------+---------~
IBY
I 82 I
1
1
t----------------+----+---------+---------~

I FREE

I 83 I

-

I OPERAND

1

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

IWHILE

I 84 IOPERAND

1

1

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

1 SNAP

I 86 I

IOPERAND

I

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

t----------------+----+---------+---------~
1DELAY
1 8B 1
1OPERAND
I
t----------------+----+---------+---------~

~----------------+----+---------+---------~

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

IDO EQUALS
I DOWN ,

I ERROR

I 61 IOPERAND lfOPERAND 21

I 62 I
I 63 I

1

I

I

I

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

I UPSIDE-DOWN

I

ICV

1EXIT

I STOP

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

ILINE

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

lEND ALLOCATE

I LESS/EQUAL

I GREATER/EQUAL

I 65 IOPERAND 1 I OPERAND 21
I 67 IOPERAND 110PERAND 21

~----------------+----+---------+---------~

I LEFT

I 68 IOPERAND 1iOPERAND 21

~----------------+----+---------+---------~

INOT EQUAL

1 69 IOPERAND 1iOPERAND 21

~----------------+----+---------+-----~---~

1EQUAL

I 6B IOPERAND 1iOPERAND 21

~----------------+----+---------+---------~

1GREATER

I 6D IOPERAND 1iOPERAND 21

1 8D 1

-

1

-

1

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

1
I
I
I 64 IOPERAND 110PERAND 21

I COMMA

I 8C IOPERAND 110PERAND 21

I 8F 1

I

I

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

I 90 I

I OPERAND

1

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

I 91 I

I

I

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

I PAGE

I 92 I

-

I

-

I

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

ISKIP

I 94 I

IOPERAND

1

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

I DISPLAY

I 95 I

IOPERAND

I

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

I COLUMN

I 96 I

-

I OPERAND

I

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

~----------------+----+---------+---------~

1SIGNAL

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

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

I DEFINED
I SUBSCRIPT'
I LESS

1
1
I 6E IOPERAND

I
1

I
1

1 6F IOPERAND 1iOPERAND 21

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

I COMPILER

FUNCTION'
lI ________________

384

I
I
I
I
70 IOPERAND
I ____
_________ I _________ JI

~

~

~

I 97 I

1OPERAND

1

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

IE

I 98 I

I

I

I REVERT

I 99 I

I OPERAND

I

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

lIF
________________

I ____
9A I _________ I _________ JI

~

~

~

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

Ie

I 9E I

I

I

IA

I AO I

I OPERAND

I

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

ISTATEMENT NUMBER I DO 'OPERAND 110PERAND 21

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

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

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

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

I CALL

I D1 I

ICLN1

I OPERAND

I

I

ISTATEMENT LABEL 1 D2 ,OPERAND 1lOPERAND 21

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

1 ~----------------+----+---------+---------i

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

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

IE

I RETURN

I A1 I

1OPERAND

I A2 I

I OPERAND

I A3 1

I OPERAND

I

1

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

IP

I A4 1

1OPERAND

1

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

IGO OUT OF BLOCK I AS 1

1OPERAND

I

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

IR

1 A6 I

-

1OPERAND

1

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

IGO TO

I A7 1

1OPERAND

1

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

1GOLN

1 A8 I

1OPERAND

1

~----------------+----+---------+---------~

I BUYT

I A9 I

1OPERAND

1

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

I BUYX

I AA 1

10PERAND 21

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

IHSELL

I AB 10PERAND 1 1OPERAND 21

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

I SELL

I AC I

I OPERAND

I

I D3 ,

ICLN2

ICOMPILER NUMBER I D4 1

1OPERAND

-

I OPERAND

I

I

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

IGET

I DS I

I

,

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

ICOMPILER LABEL

,D6 I

10PERAND

,

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

IPUT

1 D7 I

-

I

-

I

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

IE'

, D8 I

,

I

~----------------+----+---------+---------~

I UNLOCK

I D9 I

IF'

I DA ,

-

I

-

I

~----------------+----+---------+---------~

I

,

~----------------+----+---------+---------~

I REWRITE

I DE I

I

,

~----------------+----+---------+---------~

I OPEN

I DD I

I

I

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

I c'

1

I CLOSE

I DF I

DE I

-

I

-

t

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

~~---------------+----+---------+---------~

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

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

IBUY
Ix

I AD I
I

AE

I OPERAND

I

I OPERAND

I

I

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

I BUYS

I AF I

-

I OPERAND

I

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

IPROC

I B3 I

I OPERAND

I

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

I BEGIN

I BS I

I OPERAND

I

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

IITERATIVE DO

I B7 10PERAND

1

-

1

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

IDO

, B9 10PERAND

1

I

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

IIF

, BB 10PERAND 110PERAND 21

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

ISN2

I BC I

I OPERAND

I

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

I NOSNAP

I BE ,

I OPERAND

I

I

I E1 I

I CALL'

I

I

I

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

I p'

I E4 ,

J

,

~----------------+----+---------+---------~

lEND PROG

I EB I

I

I

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

lEND BLOCK

I ED I

I

I

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

lEND PROG 2

I EE I

-

I

-

~

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

I F1 I

I END I/O

I

I

~----------------+----+---------+---------~

I F3 ,

/PROC'

I OPERAND

I

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

I FS I

IBEGIN'

I OPERAND

I

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

I ITERATIVE DO'

I F7 ,

'OPERAND

I

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

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

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

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

I FORMAT
ITO'

I BF 1

-

I OPERAND

I co I

I OPERAND

I C2 ,

I OPERAND

I

I

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

IBY'

I

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

IWHILE'

I C4 10PERAND 1 I OPERAND 21

IDO'

IIF'

I F9 ,

OR

ON

I FB I

IOPERAND

-

I OPERAND

,

I

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

I I PREFMT

I FD I

I

,

, ~----------------+----+---------+---------i
I FORMAT'
L
________________

I ____
FF I _________ I _________ JI

~

~

~

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

I WRITE

I C7 I

I

I

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

tREAD

I C9 1

I

,

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

ICV'
L
________________

I ____
CC 10PERAND
110PERAND
21J
_________
_________

~

~

~

Appendix D: Internal Formats of Text

385

o

o

1

3

2

4

5

6

7

8

9

B

A

C

F

E

D

r-----T------T-----T-----T----T----T----T----T-----T----T----T-----T----T------T--T----'
IDCVO 10SMl
IBGPE IBLBS ILCR ILCDR/LCERILM I BCTA' ILH ILA ICLI
/CLC I~R
I I
I
~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

1 IDCVi IOSM2

IEOB

IBLBS'IBCR ISPM ICLR ISLA IBC

ICE

ICL

IMVI

IMVC

ITR~

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

2

IDCV2 IALLOC IPCC

IBUYS IHER ILTR IALR ISLDAIDCF

IAH

IAL

INI

IMVN IPACK

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

3 IDCV3 IDCA3

ICHSM IPINS IHDR ILTERISLR ISLDLIBCTA ISH

ISL

101

IMVO IDNPK

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

4 IDCV4 IDCA4
IADR IRWA
IBCTRILTDRI
ISLL IBCT IME
ISTC ISSM IMVZ IIGNOREI
I
I
~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

5

IDCV8 IFREE

ISN3

IAPRM INR

ILNR ILPR ISRA IN

I~M

ISTH 1ST

INC

I

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

16 IDROP IBUY

IBCIN IUSNG lOR

ILNERILPERISRDAIO

I

lEX

IXI

10C

ICONV

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

17 IEQU

I SELL

ISTOP IEDIT IXR

IS~D

ILNDRILPDRISRDLIX

ISTE ILA'

IXC

ICONV'

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

8 IPROC IPROC'

I

I

IBGNP IFMT
I
ILST

ILR
I

ILDR ILER ISRL IL
I
I
I
I

ILD
I

ILE
I

IDCF2 IZAP IUSSL
I
I
I

I
I

I
I

I
I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

9 IBEGINIBEGIN' IBGNP' IFMT
ICR ICDR ICER ISTM IC
ICD ICE IBCT' ICP IDRPL I I
I
~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

I A I PASS I ADV

I DROB' I FMT'

I AR

I ADR I AER I BXE I A

I AD

I AE

I

I AP

I CNVA

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

B IEOP

IPLBS

IPLBS' IEDIT' ISR

ISOR ISER IBXLEIS

ISD

ISE

liSP

ISINL

I

I

I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

C IEOP2 IPCBS

IPSLD IERRORIMR

IMDR IMER ISLl IN

IMD

IME

ISN2

IMP

ICNVCl I

IIGN21

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

ID IIPRM I IPRM'

lABS

IPFMT IDR

IDDR IDER ISN

ID

IDD

IDE

IOSM3 IDP

ICNVC2 I

IIGN41

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

E IEPRM IEPRM'

lABS'

I

ISVC IAWR IAUR ICLl IIC

lAW

IAU

IEQU'

lED

IIGN~I

ICNVC3 I

~-----+------+-----+-----+----+----+----+----+-----+----+----+-----+----+------+--+----~

F LIITDO
IITDO'
_____ L
______ LIALIGNI
_____ L _____ LIBALRISWR
____ L ____ LISUR
____ LICN
____ LlEAL
_____ LICVB
____ LICVD
____ LIBSW
_____ LIEDMKICNVC4
____ L ______ LI __ LIIGN81
____ J

6.

TEXT FORMATS IN

Pseudo-code

P§EU~2=f2~~

Desig~

Pseudo-code is essentially a symbolic
representation of machine code, designed in
such a way that it is possible to directly
transform it into executable machine code
by an assembly process.

The forrrat of the
units is as follows:

various

pseudo-code

Th~~~=EYte __ ~Di~~

this ccnsists of a
one-byte operation code followed by a
two-byte literal offset, and it appears
immediately
after
the
symbolic
representation of the instruction to
which if refers.
Five=~yte __ uni!~

A unit consists of a one-byte operation
code followed by, normally, a two or fourbyte field and on the other occasions by a
variable length field.
The bit pattern of
the operation code indicates the type of
unit which it heads.

there are four basic
five-byte units which have the following formats.

Bytes

I

By having most units either three or
five bytes long, the scanning of pseudocode is a fairly straightforward process.

386

2

1

2

r-------T-------------T-------------,
I OP
I 1
I
R2
I
I
I

Ri

I

I

I _______
CODE L _____________
0
DICT REF
L
LI _____________
JI

Bytes

L Rl, JOE+24
1

2

2

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

Bytes
1

~

2

2

r-------T-------------T-------------,
I L
I 0
Rl
I DR (JOE)
I

I OJ?
I
I
I
I
I
R3
I
OFFSET
I
IL _______
CODE
I _____________ I _____________ JI

L _______

~

~

_____________

~

_____________ J

r-------T-------------,

IL _______
OSl-Jl
I _____________
24
JI
~

Bytes
1

2

2

r-------T-------------T-------------,
I OP
I
I
I

L Hl,JOECR3)

Bytes

Rl
I
R2
I
I
I
CODE
I _____________ I _____________ JI
IL_______
~

1

L _______

r-------T-------------T-------------,
I OP
I 1
I
R2
I

~

_____________

~

_____________ J

r-------T-------------,

IL _______
OSlV12
I _____________
R3
JI

HEX
I
I
I
I
CODE
I _____________
0
I _____________
DICT REF
lI _______
JI
~

2

2

r-------T-------------T-------------,
I L
I 0
Rl
I DR (JOE)
I

~

~

~

Using these units with, if necessary, a
three-byte unit, it is 'possible to symbolically represent any possible RR, RX, RS or
sr instruction.

L Rl,JOE+24(R3)
Bytes
1

L _______

VariaEle~gj:~!!i!:.l

the

2

2

r-------T-------------T-------------,
I L
I 0
Rl
I DR(JOE)
I
~

_____________

~

_____________ J

r-------T-------------T-------------,

format of

IL _______
OSt<3
I _____________
24
I _____________
R3
JI

this is:

~

~

Bytes
1

2

r-------T-------------T-------------,
I OP
I
I
I

I VARIABLE
I
I
I FLAG
CODE
I _____________ I _____________ JI
IL_______
~

~

With a specially designed variable field
described by a two-byte flag, it is possible to represent any SS instruction with
this unit.

Alternatively, JOE might be a base register in which case the dictionary reference would be replaced by a symbolic
register. The two forms are distinguished
by setting the flag bit of the first
symbolic register equal to one when a base
register is intended.
Rl,0(R3,R2)

L

Bytes
1

2

2

r-------T-------------T-------------,
IL_______
L
I _____________
1
Rl
I _____________
R2
JI

The first byte of the two-byte flag
indicates the format of the variable field
and the second gives the length of the
total unit.

~

~

r-------T-------------,

IL _______
OSM2
I _____________
R3
JI
~

The following examples illustrate the
basic forms of an RX instruction and the
way in which they are represented
in
pseudo-code.

When a branch instruction is generated
which branches to a compiler generated EQU
value, bit two of the second byte is set to
one to indicate that the second field is in
fact an E~U value.

Bytes

L Rl,JOE

Bytes

1

1

2

2

r-------T-------------T-------------,

Il _______
L
I _____________
0
Rl
I _____________
DR(JOE)
JI
~

1

1

2

r------T-------T--------T---------,
IL______
BC
I _______
01
I ________
HEX
IEQU
VALUE I
_________
~

~

~

J

~

Appendix D: Internal Formats cf Text

387

Bytes
1

1

1

2

r------T-------T--------T---------,

I
I 1
I
I R2
I
I BC I
0
I HEX
~---------i
Il ______ I _______
0
I ________ I _________
DICT REFIJ
~

~

The following exam~les illustrate the
basic forrrs of an SI instruction and the
way
in which they are rerresented in
pseudo-code:

~

CLI EETA,X'FF'
Bytes
1

2

2

r-------T-------------T----------~--,

CLI
lI _______
The following examples illustrate the
basic forms of an RS instruction and the
way in which they are represented
in
pseudo-code:

I _____________
0
FF
I _____________
DR(BETA)
JI

~

~

CLI BETA+4,X'FF'
Bytes
1

2

2

r-------T-------------T-------------,
CLI
I _____________
0
FF
I _____________
DR(BETA)
lI _______
JI
~

~

BXH Ri,R2,ALPHA
Bytes
2

1

r-------T-------------,
Il _______
OSMl
I _____________
4
JI

2

~

r-------T-------------T-------------,

Il _______
BXH
I _____________
0
Ri
I _____________
DR(ALPHA)
JI
~

~

r-------T-------------,

Il _______
OSM2
I _____________
R2
JI
~

Alternatively, BETA might be a base
register in which case the dictionary reference would be replaced by a symbolic
register.

BXH Ri,R2,ALPHA+24
Bytes
2

1

2

r-------T-------------T-------------,

I

BXH
l _______

I _____________
0
Hi
I _____________
DR (ALPHA)
JI

~

~

r-------T-------------T-------------,
OSM3
I _____________
24
I _____________
R2
lI _______
JI
~

~

Alternatively, ALPHA might be a base
register in which case the dictionary reference would be replaced by a symbolic
register as in the RX instruction.
SI.A Ri,6
Bytes
1

2

2

r-------T-------------T-------------,

Il _______
SLA
I _____________
Ri
I _____________
6
JI
~

~

The following exam~le illustrates the
form of an RR instruction and the way in
which it is represented in pseudo-code.

Basically, an SS instruction consists of
two base registers and a length byte.
Since this does not conform to the format
of other items of pseudo-code, it is necessary to represent an SS instruction with a
variable length field, the length of which
is specified in the s~cond of two flag
bytes immediately following the operation
code.
This variable form of pseudo-code will
be used to convey items of information
internally between co~piler phases, at the
same time maintaining the items in the
guise of pseudo-code.

The first bit of the FLAG indicates
whether
or not the unit represents a
machine instruction. In the former case,
the format of the instruction is:
Bytes

AR Rl,R2
1

388

1

1

Bytes
2

2

lOP

I

AR
lI _______

lICODEI
____ ____

I _____________
Ri
I _____________
R2
JI
~

1

2

2

2

2

I
I
I
I
I
I
I
I
I FLAG I LENGTH I Fl I F2 I F3 I F4 I F5 I

r-------T-------------T-------------,
~

1

r----T----T------T----T----T----T----T----'
~

I ______ I ____ I ____ I ____ I ____ I ____ JI

~

~

~

~

~

~

The format of the FLAG is:

ALPHA+3(14), BETA(6)

Zl'.P
Bytes

Bi!:

Q~~

E.£!:2

1

1

1

Always zero

l ___ i _____

2

F2=dict. ref.

F2=sym reg.

3

F3=dict. ref.

F3=sym reg.

4

F4 not present

F4 present

5

F5 not present

F5 present

1

1

2

r---T-----T----T-----T---------,
IZAPIX'10'1 10 113 5 IDR(ALPHA) I
~

____ i _____ i _________ J

2

2

r--------T----'
I DR (BETA) 1
31
l __

------i--__ J
MVC

ALPHA(6), BE1A+l1

Bytes
Not used

6-8

1

1

1

1

2

r---T-----T--~-T-----T---------,

lIMVCIX'08'
___ i _____

The 1"1 field is identical to the length
field in the S8 machine instruction.
The
field contains one or two lengths which are
each one less than
thE
corresponding
lengths used in Assembler Language. The F4
and £5 fields contain literal offsets.

I ____
10 i I _____
5 IDR(ALPHA)
_________ JI

~

~

2

2

r--------T----'

I DR CGETA) I ____
111J

l ________

~

AP

ALPHA+3(14),EE1A+ll(6)

Bytes
1

1

1

1

2

r---T-----T----T-----T---------,
lAP IX'18' 1 12 113 5 IDR(ALPHA) 1

l ___

,

~

_____

~

____

~

_____ i _________ J

222

r--------T----T----'
IDR(EETA) 1
31
111

In compiler functions, the format of the
FLAG depends on the opera'tion code. Thus:

l ________ i ____ i ____ J

r------T------T--------T----T----'

Il ______
CONV I ______
FLAG I ________
LENGTH I ____
Fl 1____
F2 JI
~

~

~

~

The format of the FLAG is:
~it.§

Bot.tL~~!:2

~2~h~!2~

Alternatively, ALPHA and/cr BETA might
be base registers,
in which cases,
the
dictionary references would be replaced by
symbolic registers and the FLAG byte wculd
be set accordingly:
MVO

Always one

1

ALPHA(14), 11(6,Rl)

Bytes
2 and 3

Fl=dict. ref.

Fl=TMPD operand

4 and 5

F2=dict. ref.

F2=TMPD operand

6-8

Not used

1

1

1

l ___

~

_____

2

The FLAG in the IGNORE item does not
contain any information.

2

1

r---T-----T----T-----T---------,
IMVOIX'28'1 10 113 5 1DR (ALPHA) I
~

____

~

_____

~

_________ J

2

r--------T----'
I Rl
I 111
l ________

~

____ J

The following examples illustrate the
basic forms of an SS instruction and the
ways in which they are represented in
pseudo-code.
ALPHA(7),BETA

MVC
Bytes
1

1

1

1

2

r---T-----T----T-----T---------,
IMVCIX'OO'I
8 I 6 I DR (ALPHA) I
l ___

~

_____

2

r---'-----,

IDR(BETA)
I
l ________ J

~

____

~

_____

~

_________ J

Fields that may hold a dictionary reference or register nUITber have, at this
time,
the possibility of holding a literal
offset.
The presence of an offset is
indicated by the first bit of the field
being set to one, and earlier flags being
set to 'register.'
Appendix D: Internal Formats ot Text

389

Where a standard set of assigned registers is to be used for a section of code,
e.g. in the construction of prologues, or
during
the
generation
of
addressing
instructions, it is possible to generate
instructions with registers in absolute
code, instead of the normal pseudo-code
two-byte symbolic registers.
(See "Text
Formats in pseudo-Code" in this Appendix.)
sections of absolute code are preceded
by ABS markers and followed by ABS' markers. The operation codes are the same as
the normal pseudo-code instructions (see
"Text Code Bytes in Pseudo-Code" in this
Appendix), but the instruction formats differ, as shown in the following examples:

Shift Instructions
Bytes
2

1

1

r------------T---------T--------,

IL ____________
OP CODE
I _________
Ri
0
I ________
OFFSET JI
~

~

Other Instructions
Bytes
1

1

1

r------------T---------T--------,
IL____________
OP CODE
I _________
Rl
R2 I ________
B2
JI
~

~

2 1 2

r------------T---------T--------,

I ____________
DIeT REFCE
L

I _________
OSM2
I ________
OFFSET JI

~

~

RR Instructions
Bytes
Bytes

1

1

1

r-------~-T-----------,

1

1

2

r---------T--------T---T------------,

IL _________
OP CODE I ___________
Ri
R2 JI
~

IL_________
OP CODE I ________
MASK
IBi
DICT REFCE JI
___ I ____________
~

1

~

~

2

r---------T--------,

I _________
OSM2
L

Bytes
1

1

1

r------------T---------T--------,

IL ____________
OP CODE
I _________
Ri
X2 I ________
B2
JI
~

~

212

r------------T---------T--------,

IL____________
DICT REFCE I _________
OSM2
I ________
OFFSET JI
~

~

I ________
OFFSET JI

~

Note that the OSMi/0SM2 markers and their
following offsets are all opticnal; note
also that the OSM2 byte does not have a
register fcllowing it, as in normal pseudocode, but a literal offset.
The first bit (bit 0) of the byte
containing the base is used as a flag.
If
this bit is a one, the following two bytes
contain,
in their low order position, a
twelve bit offset, instead of a dictionary
reference.
After Phases RA and RF all instructions
in the text will be in absolute code.

Bytes
1

1

2

1

r---------T--------T----T-----------,
IL_________
OP CODE I ________
LENGTH I ____
Bi I ___________
DICT REFCEIJ
~

1

~

2

~

1

2

r----T-------------T------T---------,

IL ____
B2 I _____________
DICT REFCE I ______
OSMi I _________
OFFSET JI
~

~

1

2

r------T--------,

IL______
OSM2 I ________
OFFSET JI
~

390

~

Any expression occurring in an attribute
must be put into a form which is acceptable
to the translator phase. This means that
it must look like a source statement. To
comply with this, all expressions dealing

with
array
bounds,
string
lengths,
DEFINING, and INITIAL value iteration factors are converted into assignments to
function references.
These functions have
a special meaning. They are not entered in
the dictionary, and their dictionary references are to a region in the communications area.
The pseudo-code physical
phase dealing with each particular function
generates in-line code instead of a function reference.
All the statements of this type are
generated in the source text after the end
of the original source program. They form
a second program and are referred to later
as the "second file."

11

Code byte X'5E'

12

Code byte X'OO'

13

Code byte X'OO' for lower
bound,
X'Ol'
for higher
bound

14

Number
of
the dimension
whose bound is referenced

15

Right parenthesis

16

Triple operator code X'46'

17 .•.

Expression for bounds
Statement terminating
colon

The statements generated have the following overall format:

1

Code byte SN2

2-3

Dictionary reference

4

Options byte

5

Statement type markers

6 onwards

Statement body

Multiplier function stateme~ts are used
to denote copying of a section of one dope
vector into another. The format is:

The dictionary reference is the reference of a second file dictionary entry.
This is described in Appendix C.
The
options byte is that for the options operative in a prologue, i.e.
no interruptions
are accepted.

The format of the second file
for array bounds is as follows:

statement

1

Assignment statement marker

2

Code byte X'OO'

3-4

MTF code bytes X'0010'

5

Compiler call marker

6

Left parenthesis

7

code byte X'OO'

8-9

Dictionary reference 1

10

Triple
X'44'

11

Code byte X'OO'

operator

code

1

Assignment statement marker

12-13

Dictionary reference 2

2

code Byte X'OO'

14

Triple
X'44'

3-4

ADV code X'0002'
15

Code cyte X'SE'

S

compiler pseudo-variable
16

Code cyte X'OO'

6

Left parenthesis
17-18

Offset 1

7

Code byte X'OO'
19

8-9

Dictionary
array

Triple
X'44'

20

Code cyte X'SE'

10

Triple
X'44'

21

Code byte X'OO'

reference

operator

code

semi-

code

byte

code

cyte

Appendix D: Internal Formats of Text

391

of

operator

byte

operator

byte

22-23

Offset 2

24

Triple
X'44'

25

Code byte X'SE'

26

Code byte X'OO'

27-28

Length

29

Right parenthesis

30

Statement
colon

operator

code

byte

terminating semi-

This statement requires the number of
bytes specified by the length to be moved
from the dope vector of the item at dictionary reference 2, starting at an offset
of offset 2, to the dope vector of the item
at dictionary reference 1, starting at an
offset of offset 1.

The string length statement is used to
initialize the maximum length slot in a
string dope vector. The format is:

INITIAL value statements are used to
initialize a vector of storage used to
contain iteration factors.
It is implied
that the value of the expression must be
converted to type integer. The format is
as follows:

1

Assignment statement marker

2

Code byte X'OO'

3-4

IDV code

5

Compiler pseudo-variable

6

Left parenthesis

1

Assignment statement marker

2

Code byte X'OO'

7

Code byte X'OO'

3-4

SDV code X'0004'

8-9

Dictionary reference

S

Compiler pseudo-variable

10

Right parenthesis

6

Left parenthesis

11

Triple operator code X'46'

7

Code byte X'OO'

12 •••

Expression

8-9

Dictionary reference

10

Right parenthesis

11

Triple operator Code X'46'

12 •••

Expression
Statement
colon

Statement terITinating
colon

semi-

The dictionary reference is to the item
being initialized.
The integer is the
number of assignment statements of this
type, and for this variable, that have been
generated before this one.

termination semi-

The dictionary reference is that of the
item whose dope vector is being initialized.
If the expression is defining the
length of a string being returned by an
internal function, then the dictionary reference is that of the entry type 2 belonging to the label.
In Figure 6 the reference is to B or C depending on whether
the statement appeared in a PROCEDURE/ENTRY
statement, or an ENTRY attribute. If the
392

item is a data item, an external procedure,
or a formal parameter entry point, then the
dictionary reference of that particular
item appears in the statement.

I
A statement is generated for a variable
Iwhich is declared BASED with its associated
Ipointer given, and for a variable which is
Ian OFFSET with its associated base given.
IThe format of the statement is similar to
Ithat of the INITIAL value statement except:

3-4

PEXP code (BASED) X'0016' or
BVEXP code (OFFSET) X'0017'

12

Expression (which must be a
single dictionary reference
of the associated pointer or
base)

The dictionary reference in bytes 8-9
that of the BASED or OFFSET variable.

scale, mode, string type
etc.
of the temporary
result.
The format of
this byte is identical to
the similar byte in the
dictionary and the DED
used by the Library subroutines.
routines.
(See
"Data
Byte"
in
Appendix C.)

is
Bytes 3-4 P,Q

describes the precision
and scaling of arithmetic
type results

Bytes 5-6 BASE

in one
forms:

second file statements are generated
when
an expression is associated with
DEFINED, but the expression does not contain any iSUBs. The format is:

1

Compiler assignment
ment marker

2

Code byte X'OO'

3-4

ADF code;
X'OOll' for base only

1. "Reg by value" register containing the
result - no index or
offset is allowed.
2. "Reg by value" register containing the
base address of the
result stack
3. Offset from beginning
of current temporary
storage for
results
held in the temporary
storage stack
4. Dictionary
reference
which
specifies the
base address of the
result of a subscript
calculation

state-

X'0012' for subscripted base
X'0013' for base with iSUB's
5

Pseudo-variable marker

6

Left parent:hesis

of the following

Byte 7-8

NDX

in one of
forrDs:

the

following

Base7and subscript list
1. Symbolic indexing register for EASE type 2
and 4.
2. The nurrber of bytes
required in the temporary core stack for
BASE type 1

Right parenthesis
Statement terminating semicolon

9.

PSEUDO-CODE PHASE TEMPORARY RESULT

DE§QBl~!QRS -lTE~Ri-----·-----------

Bytes 9-10 OFS

All information on temporary results is
contained in this stack. Each item in the
stack consists of 10 bytes. A maximum of
200 items is allowed.
By"te 1

By-te 2

Flag 1

Code 2

describes the addressing
method contained in bytes
5 through 10. 2 bits in
this byte are also used
during
the release of
temporary results
describE's

the

radix,

Strings
ways:

are

which is a literal offset
to be inserted in the
base address. When used
with EASE type 1
the
actual temporary offset
is the sum of the offsets
and the number of bytes
required in the stack is
the sum of the contents
of OFS and NDX
described in the following

If the string is of fixed length less
than 256 bytes, it is given storage in
the core stack. This type of string
has a dictionary entry if it is passed
to a subroutine.
Appendix D: Internal Formats of Text

393

If the string is of variable length or
longer than 256 bytes, the storage is
bought and sold when required.
This
type of string always has a dictionary
entry.
If the string has no dictionary entry,
it is described by the usual CODE
bytes, the temporary core offset in
BASE, and the byte length in NDX.
If the string has a dictionary entry,
it is described by the usual CODE bytes
and the dictionary reference IN BASE.
The dictionary entry describes
the
location of the string which may be
either the temporary area offset and
size for the first type, or a BUY
statement for the second type.

The 'top' of the stack is indicated by
two pointers: PSTK and LSTK. PSTK points
to the 'physical' top of the stack, which
is the last item added. LSTK points to the
'logical' top of the stack, which is the
next item to be released.
The difference
is necessary because the temporary storage
stack may not be released in the same order
as the description stack. When an item in
the description stack is released, the
corresponding temporary storage reay not be
at the top of the stack storage. As the
storage stack is always released in order,
the description is flagged and the LSTR is
reduced by 1 item. When the corresponding
temporary core is released from the top of
the storage stack, the description is con:-pletely removed from the 'physical' stack.

r-----T-----------T-----------T----------T-----------------------------------------------1
I
\
\Whether F71
I

I

IFLAG \

FS

I

F6

\ applicable I

Comments

I

~-----+-----------+-----------+----------+----------------------------------------------.~

X'OO' Dictionary
Yes
reference
X'02' Dictionary
No
STRUT2 output -- must SELL dictionary ref.
reference
X'04' Dictionary
No
RBPEAT function result.
reference
X'OS' Dictionary Dictionary
No
SUBSTR function result.
reference 1 reference 2
X'20' Dictionary Index
Yes
Arithmetic subscript, or SDV for varying
reference
register
string subscript.
X'41' Symbolic
Dictionary
Yes
Non-adjustable fixed string subscript, with
register
reference
DROP in STRUT2.
X'49' Symbolic
Dictionary
Yes
Non-adjustable fixed string subscript, without: \
register
reference
D~OP in STRUT2.
I
X'80' Register
No
Item in register -- F7 cannot exist.
\
X'CO' Workspace
Yes
I
offset
I
X'Cl' Workspace
Dictionary
Yes
SDV for adjustable fixed string subscript.
I
offset
reference
I
X'CS' Workspace
Dictionary
No
SUBSTR pseudo-variable result.
I
offset
reference
I
.-----~-----------~-----------~----------~----------------------------------------------~
INote~
1. Since F6 cannot be used for both an index register and a dictionary
I
I
reference, bits 2 and 7 of the FLAG byte cannot both be 1.
I
I
2. Many other bit configurations in the FLAG byte are meaningful and could
I
be used for future applications.
I _______________________________________________________________________________________
L
JI
.Figure 12.

394

Temporary Descriptions in Pseudo-Code -- Use of TMPD Triple Fields FS and F6

b.
c.

Descriptions are passed between pseudocode phases using two or
three
TMPD
triples, with the following formats:

r------T----T----T----T----'

String
length
for coded nonadjustable strings (maximum length
for varying strings)
Picture dictionary reference for
data with picture

4.

F5 and F6 are at present used as shown
in Figure 12.

5.

F7 can be used by adding X'10' to the
FLAG byte in all cases which give a
meaningful result (see Figure 12).

I TMPD I FLAG I F2 I F3 I F4 I
.------+----~----+----~----~

I TMPD I

I

F5

F6

I

.------+---------+---------1
I TMPD I
F7
I
I
L ______

1.

~

_________

~

_________ J

FLAG describes
F6, and F7.
Bit
Numb€!r

o and 1

Y.el~~

01
10
0

1
3

0

1

4

0

1

5
6

0
1
0
1

7

~i!!g

10.
00
11

2

the use of fields FS,

0
1

F5 contains a dictionary reference
F5 contains a temporary
workspace offset
F5
contains symbolic
register with address
of item
F5 contains
register
with value of item
F6 does not
contain
index register
F6 contains index register
Two TMPD triples are
used
Three TMPD triples are
used, and F7 contains
an offset
Normal setting. String
utility STRUT2
drops
symbolic register in F5
if used for input
string utility STRUT2
does not drop symbolic
register
Normal setting
Result of an invocation
of SUBSTR or REPEAT
No SELL is required
User of this description
must SELL dic~
tionary
reference in
F5.
Set
by string
utilities for adjustable string result
F6 does not contain a
dictionary reference
F6 contains a dictionary reference

2.

CODE
contains
the
data
byte
(describing type, radix, scale, mode,
etc. )

3.

F3 and F4 contain:
a. Precision
and scale factor
coded arithmetic type data

LIBRARY CALLING

SEQQ~~f~~

Inte£!!~L__1ib~~~L_ro~:!:in.§.§ are used for
such things as data type conversion, where
there is no explicit reference to the
routine in the PL/I source program.
The
arguments are handed to the routines in
registers. In pseudo-code form, assigned
registers a~e used, and special markers,
IPRM and IPRM' are used to indicate the
calling sequence to the register allocator
phase. Internal library calls appear in
pseudo-code as:

IPRM
L
L

1, (ARGUMENT 1)
2, (ARGUMENT 2)

L
15, IHE-------(ROUTINE NAME)
BALR14, 15
IPRM'
The second byte of the IPRM item is used
a flag byte.
The settings are as
ifollows:
~as

Bit 0

Must be zero

Bit 1

END, or RETURN statement net
in
BEGIN
block
calling
sequence

Bit 2

END
st.atement
sequence

calling

of

Appendix D: Internal Formats of Text

395

f~!~rnal li~~~~Y_£2g!in~§ calls
correspond to explicit references to functions or
I/O statements in the PL/I source program.
The arguments to the routines are placed in
workspace, and register 1 is set to point
to the first argument.
For pseudo-code
form the calling sequence is freceded by an
EPRB marker and followed by an EPRM'
marker.
Thus,
the library calling sequence
appears as:

MVC

WSP (N),

between fhases RA and
RF)
ADR

PS

The two byte operand
contains a register
for
use
by final
assembly for addressing branch destinations
beyond
4096
bytes frorr the program base

ADV

PS

Used

(ARGUMENT 1)

EPRM
LA
1, WSP
L
15, IHE------BALI< 14, 15
EPRM'

(ROU~INE

NAME)

The second byte of the EPRM is used as a
flag byte.
The setting is as follows:
Bit 0

in

2nd file
statements
to indicate that the
eXfression has been
calculated and that
the following code is
only concerned with
assignment
to
the
variable, or its dOfe
vector, which is the
subject cf the second
file statement
assignm~nt

A calling sequence to a PL/I
procedure

ALIGN

PS

Indicates that 4 by~e
alignment is required
in the code at this
point

ALLOCATE

R,T,PS

Replaces the
ALLOCATE

APRl-1

PS

The table in this section gives first,
the phase in which the term is used;
and
third, a brief description of the meaning
of the term or abbreviation.

Indicates the library
calling sequence for
VDA
or
controlled
storage

ARCO

T,PS

The phase in which the term or abbreviation is used is given in the second column
of the table.
The key to the code used is:

Provides
space
to
allow
insertion of
argument
conversion
triple

I AREA

11. DESCRIPTIONS OF TERMS AND ABBREVIATIONS
USED IN TEXT DURING A COMPILATION

R

PS
T

After the Read-In Phase
During the Pseudo-Code Phase
A triple or translator input
code byte

Replaces keyword

AR~A

ARGUMENT f.';ARK R

Marker used by phases
GK and GP to indicate
he start of a function argurr.ent

ARRAY CROSS
SECTION

R,T

Reflaces the PL/I '*'
used to specify an
array cross section

ASSIGN

H,T

Marker which precedes
an assignment statement

Used In

Term or
AbbE~:YIati2!}

Rh~~~

Desc£1ptio!}

A

R,T

Character string forn;at item

ABS

PS

Indicates the
of
absolute
(Appendix D7)

ABS'

PS

Indicates the end of
absolute code

ADI

PS

Addressing
instruction

396

keyword

ASSIGN BYNAME R

Precedes an assignrrent statement with
the BY NAME option

ATTRIBUTES

Marker which precedes
a dictionary
entry
containing the attributes which have been
specified on an OPEN
or CLOSE statement

start
code


I
IIZDSA
ZCOMM+94
FA
UD
riead of STATIC I
DSA chain
I
II
IIZCPOFF
ZCOMM
PD
UA
Offse~ of
I
II
+100
first
I
II
constants pool I
II
within static I
IIl ______ ________ __________ __________ I ______________
internal.
I ______
I IZCOBOL ZCOMM+86

GB

JI

II
II

~

I~QTE:

I

412

~

~

~

~

Bytes ZCOMM+60 to ZCOMM+332 are used internally
be assumed to be zero at exit from that phase.

~______

wi~hin

_ ____

~

______________ J

the Read-in phase and cannot

.Table 3. Communications Region. Bit Usage in ZFLAGS

f

r--------T----------T-------T----------T------------------------------------------------,
II BYTE I OFFSET I BIT I BIT NAME. I
DESCRIPTION
I
II NAME I
I (HEX) I
I
Bits are set on, on encountering: I
I ~---------+----------+-------+----------+------------------------------------------------~
I I ZFLAG1 I ZCOMM+16 I
80
I ZDEFFL
DEFINED attrihute
I
II
I
40
I ZAWAFL
ALLOCATE statement
I
II
I
20
I ZSECFL
Secona File stat:.t"ment
I
II
I
10 I ZDIMFL
Dimension attriLutE:
I
II
I
08
ZCHKFL
CHECK/NOCHECK prEfix
I
II
I
04
ZONFL
ON, SIGNAL or REVERT statement
I
II
I
02
ZSTRF'L
Structure
I
II
I
01
ZDECFL
DECLARE statement
I
I
I
I
III ZFLAG2
+17 I
80
ZLII<:FL
LIK.b attribut,e
I
Ii
I
40
ZINTST
STATIC INITIAL
I
II
I
20
ZQ,PCFL
OPEN/CLOSE staten'ent
I
10
ZGTPFL
GET/PUT statement
I
I
I
08
ZGOTFL
GO TO statement
I
I
I
I
I
04
ZTEPFL
TASK/EVENT/PRIORITY ofticns, ~EPLY statement
I
I
I
02
ZPICFL
PICTURE attribute/format item
I
I
I
01
ZISBFL
i8Ufl defining
I
I
I
ZFLAG3
+18 I
80
ZCONTG
PACKED(NONSTRING) attrioute
I
I
40
ZSETFL
SETS attribute
I
20
ZOSSFL
DELAY, DISPLAY, WAIT statem~nt
I
I
10
ZARGFL
Arguroent list
I
I
08
ZINLFL
INITIAL Label
I
I
04
ZDIOFL
DATA directed I/O
I
I
02
ZRECIO
RECORD I/O
I
I
01
ZINTAC
AUTO/CTL initialization
I
ZFLAG4

+191

80

ZFREE

FREE statement

I
40
STM256
More than 256 statements
I
20
FILEFL
Files present
I
10
SPARE
I
08
ZPUTFL
PUT D~TA
I
04
ZGETFL
GET DATA
I
02
ZPTRFL
Pointer Qualifier
I
01
ZRODFL
STATIC DS? Fntry
I
I ZFLAG5
+20 I
80
ZFTASK
TASK/EVENT/PRIO~lTY option on a CALL
I
I
statement
II
I
L~O
spare
II
I
TO
II
01 LI __________ LI ________________________________________________ J
I L________ .LI __________ LI _______

Appendix F: Communications Region

413

APPENDIX G: SYSTEM

GENERATIO~

For full details of the system generation process, see 19~_Syst~~£}~Q_-2E~E~~i~9
system: system_Gen~E~!i2~, Form C28-6554.
During the system generation process, a
control section named IEMAF is assembled
(see Figure 13) containing a table consisting of five fixed-point values aligned on
full-word boundaries, immediately followed
by a bit string field that is twelve bytes
in length. The five fixed-point values are
related to the coropiler options LINECNT,
SIZE,
SORMGIN
(start), SORMGIN (end), and
CONTROL
COLUMN
(PAGECTL),
respectively.
Bits 1 to 39, and 43 to 46 in the string
are used to specify the default status of
the options.
Bits 47 to 91 in the string
are used to specify if an option keyword is
to be deleted or not.
A "1" in the bit
string means "yes" and a
"0" means "no".
The remaining bits in the string are spare
bits not currently in use.
Figure 14 shows
the bit identification tal::le associat.ed
with the control section.

r---------------------------------------------~----------------------,

IEMAF

START

I

I
I
I
I
I
I
I
I
I
I

DC F'60'
DC F'99999'
DC F' 2'
DC F'72'

DC F'O'
r---------------------------------------------------~
DC B' 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
DEFAULT
I

I

I

0 0 0 0 0 000 '
SWITCHES
I
I
r----------------------~
DC B' 10 0 0 0 0 0 0 0 0 0 0 0 0 010 0 '
DELETE
I
~----------------------------J
I
DC B'IO 0 0 0 0 0 0 0 000 0 0 000 '
SWITCriES
I
I
r--------------~
DC B'IO 000 0 000 0 0 0 0 0 0 0 0 '
I SPARE..
I
DC B'IO 0 000 000

I

r-------------

J

I

DC B' 10
0 0 0 0 0 0 0 0 0 010.0
0 0 0'
SWITCHES
L ______________________
_____________________
______ I
~

~

~

L ____________________________________________________________________ J

.Figure 13.

,-414

The IEMAF Control Section

r---T---------------T---T-------------------------T---T------------------,
Parameter
IBitl
Parameter
IBitl
Parameter
I

IBitl

~---+----.-----------+---+-------------------------+---+------------------~

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
L ___

~

ATR
32 I OPLIST
NOATR
33 I NCCPLIST
BCD
34 I STMT
EBCDIC
35 I NOSTMT
CHAR60
36 I MACRO
CHAR48
37
NCMACRO
DECK
38
N~ST
NODECK
39
NONEST
EXTREF
40
Not used
NOEXTREF
41
Not used
FLAGW
42
Not used
FLAGE
43
COMP
FLAGS
44
NCCOMP
LIST
45
LIBRARY OPTION, RLAL
NOLIST
46
LIBRARY OPTION, COMPLEX
LOAD
47
DELETE=ATR
NOLOAD
48
DELETE=NOATR
XREF
49
DELETE=BCD
NOXREF
50
DELETE=EBCDIC
SOURCE
51 I DELETE=CHAR60
NOSOURCE
52 ~ DELETE=CHAR48
SOURCE2
53 ! DELETE=DECK
NOSOURCE2
54 i DELETE=NODECK
OPT=O
55 I DELETE=EXTREF
OPT=1
56 ~ DELETE=NOEXTREF
Used for Model 57 I DELETE=FLAGW
91 systems
58 I DELETE=FLAGE
Used for Model 59 I DELLTE=FLAGS
91 systems
60 I DELETE=LIST
MACDCK
161 1 DELETE=NOLIST
NOMACDCK
162 I DELETE=LOAD
EXTDIC
163 I GELETE=NOLOAD
NOEXTDIC
164
DELETE=XREF
_______________
___ I _________________________

.Figure 14.

~

~

65
66
67
68
(; 9
70
71
72
73
74
75
76
77
78
79
80
81
82

DELET~=NOXREF

DELE1E=SOURCE
DELETE=NOSCURCE
DELETE=SOURCE2
DFT,F:TE=NOSCURCE2
DELETE=OPT
DELLTE=LINECNT
DELETE=LINELNG
DELS~E=SIZE
DELE~E=SORMGIN

DELETE=DUMP
DELETE=STMT
DELETE-NOSTMT
DELETE=MACRC
DELETE=NOMACRO
DELETE=COMP
DELETE=NOCOMP
Used for ModEl
91 syst~ms
Used for Model
91 syst~ms

83

~

84
85

DELETE=MACDCN

8E

DELE~E=NOMACDK

87
88
89
90
91
92

DELET~=~XTDIC

DFLETE=PAGEC~L

DELbTE=NOEXTLIC
DELETE=OPLIST
DELETE=NCOPLIST
DELETE=NES~

0ELETE=NCNEST
bits 93-96
not useu

___

I __________________ J

~

Bit Identification Table

Ap~endix

G: System Generation

415

The mechanism of dynamic storage management is described in the puclication !~~
§ystem/l~~Q£er~ii~g __ §yst~~ __ E~{I __ biQ~~~Y
RrogE~~_.!:2.9i.~MaD~2;1.L Forw Z28-6591
P~rt
of the code required to implement
the storage management is generated as
prologue and epilogue code by the compiler.
This Appendix contains annotated examples
of prologues and epilogues for PROCEDURE,
BEGIN, and ON blocks.

PROLOGUES AND EPILOGUES
Example in PL/I
A:I: PROCEDURE(X,Y);
DECLARE Y CONTROLLED;

ON OVERFLOW C=O;

B: BEGIN;

END;

AB:IJK: ENTRY(Y,Z)

RETURN (EXPRESSION)

END;
A

SIZDSA
STATIC

BC
DC
DC
DC
DC
STM

*

*
*
*
416

15,16, (0,15)
Al1(1)
CIA'
F' SIZE OF DSA'
A(STATIC CONTROL
SECTION)
14,11,12, (13)

LR
BAL
MVI

10,15
8,GETDSA(0,10)
SWITC.i-l(13),X'Xl'

BC

15,COPRAM1(0,10)

BRANCH ROUND FOLLOWING
LBNGTH OF BCD
BCD OF ENTRY POINT

CONSTAN~S

ADDRESS OF STATIC iNTERNAL CONTROL SECTICN
(ONLY COMPILED FOR EXTERNAL AND eN PROLOGUES)
SAVE STANDARD REGISTERS IN SAVE AREA OF
CALLER'S DSA
SET UP FIRST PROLOGUE bASE
CALL ROUTINE TO GE~ DSA
INSERT RETURN (EXPRESSION) SWITCh
(ONLY COMPILED IF THE~£ IS A RETURN (EXP)
AND THE ENTRY LABELS HAVE DIFFERENT DATA
AT'l'PIEUTES)
BRANCH TO COPY OVER PARAMETERS

r

I

ADPRIl'-'~

*
GETDSA

*

BC
DC
DC
DC
STM

15,10(0,15)
AL1(1)
eli'
A(A)
14,11,12(13)

L
LA
L

10,ADPRltJ:(O,15)
8,IP(0,10)
1.1, S'IATIC (0,10)

L

0,SIZDSA(O,10)
15,32, (0,11)

L

*
*

LOOP

IP
COPRAtJ:l

EALH
LR
LA
SR
A
ST
LA
BCT
BCR
HVI
L
ST
LA
SH
LH
ST
L
ST
L

14,15
14,13
0,7,(0,0)
15,15
14,0(0,11)
14,ADVEC+4(15,13)
15,4(0,15)
0,LOOP(O,10)
15,8
SWITCH(13),X'X2'
14,0(0,1)
14,X(0,13)
14,4(0,1)
0,10(0,0)
14,0
14,0(0,14)
14,Y(0,13)
14,8(0,1)
14,TARGET(0,13)
lO,A •• • A(O,ll)

BAL
BCR

8 , COl-1MON ( 0 I 10)
15,10

,MVI

96(13),X'aO'

BALR
:LA

10,0
9,ADDAREACO,13)

ST

9 f ADVEC(Ov 13 )

L

*
I *

II ~m1MON
*
I

*
*****
*
*
*
*
*

BrlANCH ROUND FOLLOWING CONSTANTS
LENGTh OF BCD
BCD OF ENTRY POINT
FIRST PROLOGUE BASE ADDRESJ
SAVE STANDARD REGISTERS IN SAV~ AREA OF
CALLER'S DSA
S£T UP FIRST PROLOGUE EASE
SET RETURN REGISTER
SLT UP STATIC DATA POINTE~ (ONLY IN
EXTERNAL PROCEDURES AND ON PRCLOGUES)
GHO=SIZE OF DSA
LOAD GR15 WITH ENTRY POINT OF IHESADA
(UNLESS DSA IS IN STAT1C, wHEN ENTRY POINT OF
COMPILER'S 'GET DSA' HOUTINE ~ILL BE LOAD~D)
CALL ROUTINE TO GET A NEW DSA
POINT GR14 AT NEW DSA
SET LOOPING VALUE = 7
CLEAR INDEXING REGISTbR
BUMP GR14 BY 4096
STORE GR14 IN ADDRESSING VECTOR
BUMP INDEX REGISTEk
ON RETURN REGISTER
INSERT RETURN (EXP) SWITCH
PICK UP FIRST ARGUMENT ADDRESS AND
STORE IN A IN DSA
PICK UP SECOND ARGUMEN~ ADDRESS
B~ANCH

POINT GR14 AT PSEUDO-REGISTER OFFSET OF
AHGUMENT AND PICK IT UP
S~ORE OFFSET IN Y IN DBA
PICK UP ADDRESS OF TAHGE~ FIEL~
AND'STORE IN DSA
LOAD GR10 FROM ~RANSFLH VECTOR SLOT
FOR ENTRY POINT A IN STATIC.
B~ANCH AND LINK TO COMMON PROLOGUE
BHANCH 10 THE APPARENT ENTRY POINT
FOH A
SET DSA TASKING FLAG (ONLt COMPILED
IF TASKING IN COMPILATION)
SET UP COMMON PROLOGUE BASE
SET GR9 TO POINT ~c ADDRESSING AREA
AT END OF DSA
AND STORE IN ADDRESSING VECTOR.

THE FOLLOWING CODE APPEARS
ONLY IN THE CASE OF RECURSIVE PROCEDURES
L

1 L~ , PR ••• A (12 )

l3T
LA
SR

14,92(0,13)
14, PR ••• A (12)
14,12
14,88(0,13)

~3T

LOAD GR14 WITcl THE CURkENT DISPLAY
VALUE E'OR A
STORE IN DISPLAY UPDATE, IN DSA
G.t{14
OFFSET OF DISPLAY PSEUDO-REGISTER
STORE IN DISPLAY UPDATE IN DSA
-'

*
*****
*

*
*

INITIALIZE ON SLOTS (IF ANY)
0(13),X'8F'
IDENTIFY DSA.
COpy SKELETON DOP~ VEC~ORS (IF ANY) FROM STATIC INTERNAL
SECTION TO REAL DOPF VECTORS IN DSA. (THERE IS ALWAYS A

eON~ROL

A~pendix

H: Code for Prologues and Epilogues

417

*
*
*

SKELETON FOR A REAL DO FE VECTOR), AND R~LOCATE THE ADDRESSES WITH THE
ADDRESS OF THE DSA FOR THOSE DOPE VECTOaS REFERRING TO VARIABLES
IN THE DSA.

*
*
*

FOR EACH VDA (VARIABLE DATA AREA) REQUIRED BY THE
PROCEDURE THE CODE BETWEEN THE LABELS VDAl AND VDA2 IS
GENERATED

VDAl

SR
SR

*

7,7
0,0

CLEAR STORAGE ACCUMULATOR ACl
CLEAR SECONDARY DOPE VLCTOR STOWAGE
ACCUMULATOR AC2

*

FOR EACH VARIABLE IN THE VDA, THE FOLLO~ING CODE IS
GENERATED (BETWEEN LABELS VARl AND VAR2).

VARl

EVALUATE EXTENT EXPRESSIONS (DIMENSIONS AND STRING LENGTHS) AND
STORE RESULTS IN DOPE VECTOR IN DSA.
ALIGN ACCUMULATOR ACl ON CORRECT BOUNDARY FOR VARIABLE
BUMP ACCUMULATOR AC2 BY SIZE OF SECONDARY DOPJ~ VECTOR (IF VARIABLE
IS DIMENSIONED AND VARYING).
RELOCATE ADDRESS IN VARIABLES DOPE VLCTOR RELATIVE TO START OF
VDA.
BUMP ACCUMULATOR ACl BY SIZE OF STORAGE REQUIRED FOR VARIABLE
ADD ACl AND AC2
AR
0,7
L
15,36(0,11)
LOAD GR15 WITH ENTRY peINT IHESAD3
GLT VDA
BALR 14,15
LA
1,8(0,1)
BUMP VDA POINTER PAST FLAG AND CHAIN SLOTS
POINT GR7 AT FIRST SECONDARY LOPE VECTOR.
AR
7,1
L
14,DV •. VAR(0,13)
FOR EACH VARIABLE IN ~EGION, RELOCATE
ADDRESS IN DOPE VECTOR.
AR
14,1
ST
14,DV •• VAR(O,13)
FOR EACH DIMENSIONED VARYING ITEM IN REGION, INITIALIZE
SECONDARY DOPE V~CTORS.
SET UP PROCEDURE BASE
LA
10,PROCBASE
CODE (IF ANY) TO SET UP SOME ADDRESSI~G MECHANISMS IN E
ADVANCE FOR USE IN PROCEDURE
15,8
RETURN FROM COMMON PROLOGUL.
BCR
CNOP 0,4
15,8(0,15)
BRANCH ROUND 8CD OF BNTRY POINT
BC
AL1(2)
DC
C'AB'
DC
14,11,12(13)
STM
SAVE REGISTERS IN CALLLR'S SAV£ A~2A
10,PROBAS(0,15)
S~T UP FIRST PROLOGUB BASE
L
BAL
8,GETDSA(10)
BrtANCH AND LINK TO GET DSA AND TO SET
UP ADDRESSING VECTOR
SWITCH(13),X'X3'
SET UP RETURN (EXP) SWITCH IF THEhE IS
MVI
R~TURN (EXP) AND DATA ATTRIBUTES OF
ENTRY LABELS DIFFER
15,COPRAM2(0,8)
BC
BdANCH TO COPY OVER PARAME~Eas
BC
15,12(0,15)
BRANCH ROUND FOLLOWING CONSTANTS
AL1(3)
DC
LENGTH OF BCD
C'IJK'
DC
BCD OF ENTRY POINT
A(A)
DC
FIRST PROLOGUE BASE
14,11,12(13)
STM
SAVE REGISTERS IN CALLEq'S SAVE AR~A
10,PROBAS(O,lS)
L
SET UP FIRST FROLOGUE rAS~
8, GETDS.Z\ (0,10)
BAL
BRANCH TO GET DSA A~L SET UP
ADDRESSING VECTOR
SWITCH(13),X'X4'
MVI
SET RETURN (EXP) SWITCh
14,0(0,1)
L
PICK UP FIRST ARGUMENT ADDRESS
0,10(0,0)
LA

*
*
*
*
*
*
*
VAR2

*

VDA2

AB

*
*
*
IJK
PROBAS

*
COPRAr-~2

418

SR
LH
S'r
L
ST
L
ST

*
*
*
*

PICK UP PSEUDO- REGI,s'I .t':;t\ OFFSE'l OF
ARGUfvjENT AND STORE IN DSA.
PICK UP ADDRESS OF SECOND }\RGCMENT
AND STO:RE IN Z
PICK UP ADD:qESS OF TAli.GE'I FIEL:J
A.ND STORE IN .oSl-\
L,
LOAD GRI0 WITH ADDRESS OF .FIRST BY'I'E
0.1" PROCEDURE
8,COMMONCO,10)
BRANCH AND LINK TO COlvJ.fv:ON PROLOGUE
BAL
15,AE ••• AB(0,10)
BHANCH TO APPARENT ENTRY POIN'i Ai"
BC
TIUS IS THE APPI~RENT ENTRY POINT OF A.

THE FOLLOWING IS AN ON aLOCK PROLOGUE WHICH IS
ON BLOCKS EXCEPT IF BLOCK SPECIFIES SYSTEM
8']:1-1

LR

LOOP

COMMON

*
*

14,0
14,O{O,14)
14,Y{O,13)
14,4{O,1)
14,ZCO,13)
14,8(0,1)
14,TARGET{O,13)
10,A ••• ACO f ll)

14,11,12(13)
10,15

CO~PIlFD

FOR ALL

SAVE REGISTERS
SET PROLOGUE BASE

SET UP STATIC INTERNAL DATA POINTEH
L
11,STATIC(0,10)
LOAD GR15 WITH ADDRESS OF IHESADA
L
15,32(0,11)
LOAD GRO WITH SIZE OF DSA
L
0,SIZDSA(0,10)
CALL IHESADA TO GET A DSA
BALR 14,15
LR
14,13
LA
0,7(0,0)
SR
15,15
SET UP ADDRESSING VEC'IOR IN
A
14,0(0,11)
ST
14,ADVEC+4{15,13)
DSA
LA
15,4(0,15)
BCT
0,LOOP{0,10)
BC
15,COMMON(0~10)
BRANCH TO INITIALIZE DSA
DC
F'SIZE OF DSA'
DC
A{STATIC INTERNAL CONTROL SECTION)
BA:LR 10,0
CODE IS GENERATED HERE FOLLOWING SAME PATTERN AS FOf~
A BEGIN PROLOGUE (SEE BELOW) COMMON SECTION.
LA
10,ONSTART

ONSTART

*

EPILOGUE FOR AN ON BLOCK
L
15,IHESAFA{O,11)
BALR 14,15

*

PROLOGUE FOR A BEGIN BLOCK
14,BEND
LA
BALR 15,0
CNOP 0,4
14,11,12(13)
STM
BALR 9,0
15,32(0,11)
L
0,SIZDSA(0,9)
L
BALR 14,15
14,13
LR
0,7(0,0)
LA
15,15
SR
14,0(0,11)
A
14,ADVEC+4(15,13)
ST
15,4(0,15)
LA
0,LOOP(0,9)
BCT
15,COMMON(0,9)
BC
F'SIZE OF DSA'
DC
9,ADDAREA(0,13)
LA

B

LOOP

LOAD GR15 WITH ENTRY peINT TO EPILOGUE
ROUTINE AND BRANCH AND LINK TO IT

SET UP RETURN REGISTE~
SET UP ENTRY POINT ADD~ES8
SAVE REGISTERS IN CONTAINING BLOCK'S DSA
SET UP PROLOGUE BASE
LOAD GR15 WITH ENTRY POINT TO IHESADA
GET A DSA

SET UP ADDRESSING VECTOR FOR DSA

SET GRG TO POINT TO ADDRESSING AREA
A~pendix

H: code for Prologues and

F~ilogue~

419

AT END OF DSA AND STORE IN ADDRESSING
Vl:!.C'TOR
THE CODE GENERATED HERE IS THE SAME AS THAT FOR A PRCCEDURE PROLOGUE
EXCEPT THAT A DIFFE~ENT CODE BYTE IS MOVED TO THE FIRST BYTE OF THE
DSA; GR10 IS NOT RESET; AND THE BCR 15,8 IS NOT GENERATED.
ST

*
I *
I *

9,ADVEC(0,13)

EPILOGUE OF A BEGIN BLOCK
L
15,IHESAFA
BALR 14,15

I*

LOAD GR15 WITH ENTRY POINT OF
EPILOGUING ROUTINE AND CALL IT

BEND

RETURN (EXP) STATEMENT EXAMINES THE LOCATION 'SWITCH' IN THE DSA
SET BY THE PROLOGUE TO DETERMINE THB CONVERSION ~EQUIRED ON
THE EXPRESSION. IT THEN ASSIGNS THE CONVERTED EXPRESSION TO
THE TARGET FIELD FOR WHICH THE LOCATION 'TARGET', IN THE DSA,
POINTS TO EITHER ITS DOPE VECTOR (IN THE CASE OF A STRING)
OR THE STORAGE. ROUTINE IHESAFA IS THEN INVOKED.
END STATEMENT (WHICH IS THE SAME AS A RETURN STATEMENT)
L
15,IHESAFA
BALR 14,15

*
*
*
*
*
*
*

In

compilations specifying OPT=l, if a
or BEGIN block has a DSA which
requires less than
512 bytes of storage,
such storage may, under certain conditions,
be obtained from STATIC storaoe or froID
library workspace.
To obtain a~STATIC DSA,
the block must satisfy these conditions:
PROC~DURE

1.

The block
recursive

must

not be re-entrant or

2.

The block must not be nested
depth) within an ON block

3.

The block must
TASK options

(at

any

I
The address of the Dynamic Prologue
Isubroutine and the Epilogue subroutine are
Iplaced in the STATIC internal control secItion, at offsets 40 and 48 fron the start
Irespectively.
Since the STATIC Prologue
Isubroutine always follows the Epilogue SUDI rou'tine, which is of fixed length, a
third
laddress slct is not required fer it.

not have the MAIN or

A block which is ineligible for a STATIC
DSA, and whose DSA will never be actlve
when any new DSA is required, is allocated
its DSA from library worksface.
Each block requiring a DSA either in
STATIC or in library workspace calls one of
two compiled subroutines, instead of IHESAD, to allocate the storage.
Either or
both subroutines, if required, are compiled
onto the end of the program,
and are
prefixed by the corrments
'STATIC PROLOGUE
SUBROUTINE'
and
'DYNAMIC
PROLOGUE
subroutine'
respectively.
Entry may be
made to the STATIC prologue subroutine at
one of several points.
Any block using one of these prologue
subroutines will also use a compiled Epilogue subroutine, which will be called for
the END statement of the block, or for a
RETURN statement without an expression.
420

I(The same Epilogue subroutine serves both
ISTATIC and library workspace DSps.)
If
Ithere is any core to be freed, the Epilogue
Isubroutin~ will call IHESAFA.
The Epilogue
Isubroutine is also compiled onto the end of
I the program,
and always irrrrediately preIcedes the STATIC Prologue subroutine if
Ithis is present.

*

DYNAMIC PROLOGUE
L
LTR
BC
L
LTR
EC
LR
SR
L
ST
ST
TN
PC
L
B
ST
L
LA
~;T

SUBROU~INE

5,PR .. IHEQLWF(12)
5,5
8,90(15)
u,PR .. IHEQINV(12)
6,6
4,90(15)
13,5
2,2
3,PR •. IH~QSLA(12)
13,PR •• IhEQSLA(12)
3,4(13)
O(3),X'80'
1,52(15)
3,4(3)
36(15)
13,8(3)
4,PR .. IHEQINV(12)
4,,1(4)
4,PR .. DI£QINV(12)

s~r

srr
ST
MVI
S'I'

BH
L

BH

4.,84(13)
2,80(13)
2,8(13)
76(13),X'OO'
2,96(13)
14
15,32(11)
15

L

£:oR

*
*

END SUBROUTINE
STA1'IC PROLOGUE 8UEb:OUTINE
L

*
*

END SUBROUTINE

L'IR

EPILOGUE SUBROUTINE

L

2C

Tl'1

BC
L
L'rR
Be
C

BC
L
srr
Tl:Vl
BC
L
B
8'r
Llvj
BR

rv:VC
LA
3T
ST
rvNI
ST
LR
L
ST
ST
SF
ST
ST
ST

1(13) ,X'80'
8,60(15)
2,,80(13)
2,2
7,60(15)
13,PR •• IHEQSLA(12)
7,60(15)
13,4(13)
13,PR •• IHEQSLA(12)
0(13),X'80'
1,50(15)
13,4(13)
34(15)
2,8(13)
14,11,12(13)
1L~

BR

*

15, A •• ItlES1\FA
15

4,PR .. IHEQI~V(12)
4,4
11,86(15)
7,PR •. IHEQLWO(12)
80(4,3) ,80(7)
4,1(4)
4, PH •• IHEQItJV (12)
1~,84(3)

76(3) ,X'OO'
3,8(13)
13,3
3,PR .. IHEQSLA(12)
3,4(13)
13,PR •• IHE~SLA(12)
2,2
2,80(13)
2,8(13)
2,96(13)
14

i,ND [mBROUTINE

Appendix H: Code for Prologues and Epilogues

421

(P)
The messages produced by the PL/I
Compiler are explained in the publication
IBM_System/160 O~~~!iDg_§Y~!~~ __ E~~I __ lEl
'Ihe
Forn- C28- 6594.
Progr~~~§r's~id~,
following table associates a message number
with the particular phase and module in
which ti1e corresponding message is generated.

Message
NumQ'§~

Logical_Ebas~

L".iodul~

IEMOO01I
IEMOO02I

Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read

CA
CA
CA,CP
CA
CA,CL
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CA
CG
CA
CA,CL,CT
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CG
CL,CP
CL,CP
CO
CO
CO
CP
CC
CC

IE~10003I

IEMOO04I
IE1'10005I
IEMOO06I
IEMOO07I
IEIvlOO08I
IEMOO09I
IEIvlO010I
IENOOllI
IEl'IlOO12I
IEMOO13I
IEMOO14I
IEMOO15I
IE1'10016I
IEMOO17I
IEMOO18I
IEMOO19I
IEM0020I
IEM0021I
IEM0022I
IEM0023I
IEM0024I
IEM0025I
IEM0026I
I ElvlO 02 71
IEM0028I
IEM0029I
IEM0031I
IEMOO32I
IEM0033I
IEM0035I
IEl'IlO037I
IEM0038I
IEM0039I
IEM0040I
IEM0043I
IEM0044I
IEM0045I
IEM0046I
IEM0048I
IEMOO50I
IE[\I;0051I
IE1"100521

IEMOO53I
IEMOO54I
IEMOO55I
IEM0057I
IEM0058I
422

In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In
In

IE!101721
IEM0180I
IEIv10181I
IEM0182I

Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
I<.ead
Read
Read
Read

IEM0185I
IE1'-'10187I
IEM0191I
1EM0193I
IEM0194I
1E1'-'10195I
1EM0198I
IEIvl0202I
IEM0207I
IEM02081
IEM0209I
IEM0211I
IEM02121
IEM0213I
IEM0214I
IEM0216I
1 E11. 0 21 71
IEM0220I
IEIvl0221I
1EM0222I
1EM0223I
IEN0224I
IEM0225I
IEM02261
IEM0227I
IEM0228I
IEM0229I
IEM0230I
IEM0231I
IEM0232I
IEM0233I
IE!-10235I
IE110236I
IEM0237I
IEM0238I
IEM0239I
IEM0240I
IEM0241I
IEM0242I
IEM0243I
IEM0244I
IEM0245I
IEM0247I
IEM0254I
IEM0255I
IEM0510I
IEM0511I
IEM0512I
IEM0513I
IEM0514I

Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Read In
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary

CO
CO
CL,CM
CL
CO
CO
CO
CA
CO
CO
CT
CS,CT
CL
CL
CT
CL
CL,CS,
C'T, CV
CT
C'!'
C'I'
CT
CT
C'l'
CT
CL
CG
CG
CC
CL
CP
CP
CP
CP
CP
CT
CT
CT
CT
CT
CT
C'l'
CT
CT
CT
CS,CT
C'l;
C'I

CV
CS
CS
CS
CV
CS
CV
CV
CV
CV
CV
CV
CW
CC
CG
LH
EH
EH

EG
EG

I:crv:0515I
IEM05161
IEM0517I
IEM0518I
1E1'(05191
IEM0520I
IE111105211
lEM0522I
IEM0523I
IEIv10524I
1£1<105251
IEM0527I
IEM0528I
1EM0529I
IEM0530I
IE£V!05311
IEM0532I
IEM0533I
IEM0534I
IEM05351
IEtv:0536I
1EM05371
lEI-lOS 381
IEr-~05391

IEMOS40I
IEM0541I
IEr.~05 421
IEl'10543I
IEJ.V105441
IEr105451
IEM0546I
IBM05471
1E1'105481
IEIv!05l.J 91
IEM0550I
IEM0551I
IEM0552I
I EN'! 0 5531
IEM0554I
IEM0555I
1EM05561
IEM0557I
IEM05581
IEM05591
IEr10560I
I Et-tlO 5 611
IEM0562I
IEM056.3I
I Et-tiO 5 641
IEE05651
IEt-t10566I
IEM0567I
IEM0568I
IEM0569I
IEM0570I
I Et-l 0 5 711
IEt-tl0572I
IEi'-~0573I

1Et10589I
IEM0590I
IEM05911
IE~i059 21
IEM0593I
IEM0594I
IEM0595I
IEM0596I
IEM0597I
IFM0598I

Dictionary
r·icticnary
Dictionary
Dictionary
8ictionary
Dictionary
:Jictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
j)ictionary
Dictionary
Dictionary
Dictionary
[;ic+.:ionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionat·y
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary

EG
EG
EG
EG
EG
EG
EG
EG
EG
EH

EI
EJ

EH,EI,.i.'J
121

EI
EI
EI
EI
EI
EI
EI
EI
I:;J
EJ

EJ
EJ
EJ
EL, EK , El";
EL.,LK ,.t.M

EL, El\, EJ'I]
EL, EK, Ll,j
EL, E1< , EIVj
EL,.c;K,E.~

EL, EY , P.·Lv!
EL, EF ,.E.M

EK, EL, ElVl
EL,i:K,bfJ]

EL,EK,EE
EL, EK, L1Vj
EL,EK,EM
EL,.2h, .dlJ
EL, £1<, LI"j
EL,.t.:K, Uvj

EL, LX:, .d~
EL, EK, l:..lV;
EL,EI',l...M
E:K, EL, Elv;
~K,EL,E!'I:

£K,EL,It-tJ
EK, EL, flY]

EK,EL,LM
EP
EP
EP
EP
EK
EL
EL

EW
~w

Ew

EW
J:'W

EW

EW
EW

Ew
EW

Appendix I: Diagnostic I\Jessages

423

1E£105991
IEM06021
IEM06031
IEl't.06041
1EM06052
IEM06061
1Ef·106071
1EI~106081

Im·'106091
IE~106101
IErv~06111
v

IEi 106121
IE1'~062 31
I EIv: 0 6 2 41
IEIV106251
lEN06261
1EM06271
IE~i06281

lE1'-106291
I E1'<1 0 6 301
I El-l 0 6 311
IEM0632I
IEM06331
IE~10634I

IEM0636I
IEIVW6371
1 EI'1 0 6 381
IEM06401
IEM06411
IE1'10642I
IEM0643I
IEIVl06441
IEM06451
IEM06461
IEtIJ0647I
IEN0652I
IEM0653I
IE~W654I

IE£l10655I
IEfvl06561
IEIVl0657I
IEM0658I
IEN0673I
IE1106741
IEIV106751
IEM0676I
IEM06771
IEM0683I
IEM0684I
IEN0685I
IEM06861
IEM0687I
IEM0688I
IE~10689I

IEr>'106901
IEtv'10691I
IEM0692I
IEM06931
IEH0694I
IE1'-10695I
IE1':0696I
IEl"106971
IEtvi0699I
IEfvl07001
IEM07011
IEM07021
IEf\W703I
IEM07041
424

Dictionary
!Jictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionury
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionar'y
Dictionary
Dictionary
Dictionarv
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictional:y
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary

.t:.w
FV,Fw
FV,Fw
FV,Zw
FV,H·J
FV,Fvi
FV,Fw
FV,FW

FV,FW
F'V,FW
FV,F'~

FV
j:"V,FW
FV,FW
FV,Fv.
FV,FW
FV,Fv.
F'V,FW
FV,Fw
FV, FvJ
FV,P1(.;
:F'V, F'v;
EY
.2~Y

EY
EY
EY
.EY

BY

EY
EY
BY
EY

BY
BY

FE.
FE
FE
FE
FE
FE
FE
FE.
FF
FF
FF
FF

Fl
PI
FI
FI
PI
.FI

Fl
FI
FI
FI
FI
E'I

1"1
1"1
PI
PI
PI
FI
FI
j:'I

FI

0 51
Imlj07061
UEt<07071
IEI"~07

lErv~07081

IEi~07091

lEk07101
1EI';;07111
IEM07121
I EI\'l3 71 3 I
IEM07151
IEM07181
lE~1Q7191

IEM07201
lEM07211
IEM07221
IEfvi07231
lEM0724I
IEM0725I
I Etv107 261
IEM0727I
IE~1107 281
IEF0729I
IEF0730I
IEM0731I
ID10732I
IE~<07331

IEL0734I
IEfV:0735I
IEl-W7361
IEIJ107 371
lEM07391
I Etv'iO 7 401
1EM07411
lEM0742I
IEl-;0745I
IEIVJ0746I
IEM07471
lEM07481
I Etv'107 4 91
IEIV:07501
1E1'107511
IEt"l0752I
IElVl07541
IEM0755I
IEM0756I
IE1'-10758I
IE1'l07591
IEt--107601
IEM07611
I:2F0762I
IEr'107691
IEE0770I
IEM0771I
lEl,]07781
IEIV107791
IE~:07 801
I EI't. 0 7 811
1£[.... 07821
IEJy~07 8 6 I
IE1'107871
IEM07901
IEM0791I
IEIYj07921
IEtvl0793.I
IE~fJ07 9 41
IEM07951
IEIY107961
I EI'-lO 7 971

Dictionary
DIctionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dict.ionary
Dictionary
DJ.ctionarv
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dicticnary
Dicticnary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dictionary
Dicticnary
Pretranslator
PrE:trcmslator
Prc-translator
Pretranslator
Prt'.;tr.::...nslat.or
Pretr0.nslat.or
Pretrans 18. tor
PrE.'trc.mslator
PrE: t.ransla 'Cor
P~E:'translator

Pretrc..l1sla.tor
Pretriinslator
Pretransldt.or
Pretrc;,ns 10. tor
Pr(;tr~·:
Translator
Translator
Translator
Translator
Tre:nslator
'Translator
Translator
Translator
Translator
Aggregates
l~g9rega tE:S
Aggrega1:.ES
Aggregate Preprocessor
Aggregates
Aggregates
Aggregates
Aggregates
Ag141781
1EELI1841
1EM41871
1EM41881
1EM41901
1E1".:41931
1EM41961
1EM41991
1EM42021
1Er~42051

1EM42081
1EM42111
1EM42121
1EM42141
1EM42171
1EIVt4 22 01
1EM42231
IE~42261

1EM42291
IBM42321
1EM42351
1EM42381
1EM42411
1EJ:.142441
1EM42471
IEIvi42481
IEJ.V142501
IErt;42531
IEM42541
1EM42561
1EM42591
1EI'~42621

1EM42651
1EiYj42711
IEM42771
I E1Vl4 2 8 01
I EJ.Vl 4 2831
1El·i42861
1EI.:i4 28 91
1EM42921
I Elv14 29 51
1EIv~42961

1EM42981
1EiY142991
1ElV!4301I
1Efv!4304I
1EM43071
1Er'~4 3101
1Etll43131
1El"143191
1EM43221
1EI-.i43251
1EM43281
1EIv143311
I ElV.i 4 3 321
1E1'<143341
1Eivl43371
1EM43401
IEM43431
1EM43461

428

Compile-time
Compile-time
Compile-time
compile-time
compile-time
Compile-time
compile-time
Compile-time
Compile-time
Compile-timE:;
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
compile-time
Compile-time
Compile-time
Compile-timE'
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-time
Compile-t.ime
compile-time
Compile-time
Compile-time
Compile-tirr,e
Compile-time
Compile-t.ime
Compile-time
Compile-time
compile-time
compile-time
Compile-time
Compile-time
Comoile-time
compile-time
Compile-tirr,e
Compile-time
compile-time
Compile-tirre
Compile-time
compile-time
compile-time
COIPpile-tirr.e

Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Proces:::;or
PrOCE~ssor

Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Compile-tin~e Processor
Comoile-tin~e Processor
Compile-time Processor

BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
bC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC

1EM43491
1EM43521
1E~43551

1EM43581
IEM43611
1EM43641
I Er,'i4 3 6 7 I
IEM43701
IEfv143731
1EM43761
1EM43791
1EM43821
1EM42831
1EM43911
lE~'J43941

1EM43971
1EM44001
1EM44031
1EM44061
1EM44071
1EJ.Vi44091
1EM44121
1El"~4 4151
1Ef'l:44211
1E~44331

IEfv144361
1Et-144391
1EM44481
1Er-]44511
IEt-J44521
IEIv344541
1Elv:l44571
1EM44601
1EM44631
IEr-~4 4 69 I
1EM44721
IElVJ44731
1EM44751
1EM44781
1EM4481I
1EM4484I
1Ef\'I44991
1EM45021
1ml14504I
1EM45051
IEM45061
IEH4508I
1EM45111
1Er-:45141
I Et-:; 4 5171
1EM45201
1EM45231
1EM45261
1EfY.:45 29 I
1EM45321
1EM45351
1Erll45381
1Et-':45471
1EIvJ45501
1EM45531
1EfYJ45591
1ElVi4 5 621
IEIv145701
1EI'1145721
IEfYi45741
1EM45761
1EM45781

Compile-time
Corr:pile-tirre
Compil e-tiIT'e
Corr.pile-tirre
Compile-time
Corr,pile-tirr,e
Compile-time
Compile-tirre
Compile-time
Compile-tirr:e
corrpile-tirre
Compile-time
Corr,pile-time
Comoile-time
compile-tirre
Compile-time
Corrpile-tirre
Compile-time
Compile-time
Compile-tirre
Corr:pil e-time
Corrpile-time
corupile-time
Con:pile-tirre
Compile-timE:
Compile-tirre
Corr:pil e-time
Corr.pile-t,ime
Corrpile-tirre
corr-pile-time
COIt'pile-tirr.e
compile-time
Corr,pil e-tirre
Compile-time
Compile-time
Corrpile-time
Corr.pile-tirr.e
Compile-time
Compile-time
Corr.pi 1 e-tirre
Con,pile-tin,E
Con.pilp-till f:..'
compile-time
Compile-time
Corrpile-time
Corr.pile-tirre
COH'pile-t,irre
Compile-time
Compile-time
COIT,pile-time
Compile-time
Compile-time
Corr.pile-tirre
Compile-time
Compile-tin:e
Coropile-tin:e
Compile-time
Compile-tirre
COllipile-time
cOlllpile-time
CQl'[ipil c-time
Compile-tirre
Compile-time
Compi le-t.ime
Compile-tirre
Con:pile-time
Compile-tirre

PrOCE'ssor
Processor
Processor
PrOCEssor
Processor
PrOCE:ssor
Processor
PrOCE:ssor
Processor
Processor
f'rocessor
Processor
Processor
PrOCf"ssor
Processor
Processor
PrOCE:ssor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Proce~:;sor

Processor
Processor
Processor
Processor
Processor
Procef;sor
Proce$sor
Processor
Processor
Pr:oc(;sso~'

Processor
Processor
Processor
Proc€,ssor
Processor'
PrOCE.'ssor
Processor
Processor
Processor
Processor
Procf-ssor
PrOCE·ssor
ProcE;ssor
PrOCEssor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor
Processor

BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
BC
DC
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BG
BC
BG
BG
BG
BG
AS

BC,BG
AS
AS

BC
AV
BG
BG
BG
BG
BG
BG
BG
BG
BG

declared.
Each
procedure
is
assigned
a unique nurober.
The
identifiers in the non-procedural
text are given the procedure nurrber
1. The built-in function SUBSTR is
given the procedure number o.

This
appendix
describes,
for
the
Compile-time Processor Logical Ph~s~, the
internal formats of text and tables, coromunication region use l
Operating System
interfaces and compiler control interfaces.

HASH-CHAIN-POINTER: The dictionary address
of the next item on this hash
cnain.
This address is zero if nc
item follows.
The internal format of text used by the
compile-time processor is
EBCDIC.
As
source input is read into storage, nonmacro text is moved directly into text
blocks after
translation
to
internal
format.
Encoded compile-time statements
and line numbers are also placed in text
blocks.

TYPE: A byte which gives the attributes of
the entry.
The bits (if on) have
been assigned the following meanin~Js :

1
2:

3

4
5

6

The compile-time processor uses a set of
chained dicticnary entries. Hashing techniques are used to add an item to the
dictionary or to search for an entry.
A
compile-time processor dictionary item is a
variable-length item with the following
skeletal format::

7
8

VALUE/VALU~-POINTER:

If the item is fixed,
this
contains the value proper
stored as a five-digit packed decimal number. Otherwise it contains
a pointer to the value stored in
IVEs. The definition of value for
the various kinds of entries is
given celow.
For a fixed macro
variable, this contains the value.
For a character variable,
it contains a pointer to IVEs containing
tne value.
For a procedure,
it
points to the text-block location
of the code.
For a label,
it

The fields defined in this skeleton have
the following meaning and usage:
LENGTH: The length of the EBCDIC name.
If
the item has no name
(e.g.,
a
constant) this field is zero.
PROC NO.: The number assigned to the procedure in which the identifier was

Byte 1

Word 1

Byt:e 2

Byte 3

fixed
character
bit
entry
label
INCLUDE identifier
iterative DO
constant

Byte 4

r----------T----------T---------------------,
I LENGTH I PRoe NO. I HASH-CHAIN-POINTER I

~----------+----------~---------------------i
Word 2 I
TYPE
I
VALUE/VALUE-POINTER
I
~----------~----------T---------------------i
Word 3 I
FLAGS
I
COUNT
I
~---------------------~---------------------i
Word 4 I
POINTERS/PARM-TYPES
I
~-------------------------------------------i
JI
Word 5 IL ___________________________________________
EBCDIC NAME ------>

I
Word n

I

r-------------------------------------------iI
I ------> EBCDIC NAME
L ___________________________________________ J

Appendix J: Compile-time Processor

429

pOinter to the immediately
ing INCLUDE is kept.

points to the text-block location
of the label.
If references to the
label are found before the label is
discovered, the value pointer temporarily points to a chain of IVBs
with a description of every GOTO
transferring to this label.
This
information is processed and dlScarded when the label is found.
For
an
INCLUDE identifier,
it
points to the beginning of the
included text.
FLAGS: This set of bits provides additional
information about the use of the
item.
They are used as follows:

1
2

3
4
5
6

7
8
9
10
11
12

special entry bit
DECLARE encountered
(Phase
BC)
procedure body encountered
(Phase EC)
parameter
used to indicate a procedure
called by Phase II scan.
DECLARE encountered
(Phase
BG)
unused
ACTIVATE bit
"in-use" bit
"indirect reference" bit
"undefined" bit for rnultifle
declarations
left-hand side (LHS nit)

This field occupies a half-word.
COUNT: For a procedure entry, this field
contains a count of the number of
parameters for the prcc~du~e.
For
INCLUDE identifier it is zero initially,
and subsequently contains
the initial line number assigned to
the included text.
POINTERS/PARAM-TYPES: ~or a procedure,
the
field contains an encoding of the
type information for each formal
parameter.
Two bits are reserved
for each parameter.
One indicates
fixed;
the other indicates character.
If neither bit is set,
this
indicates that the entry declaration did not specify attributes for
the parameters.
For a label, word 4 contains two
pointers to dicticnary items.
One
points to t~e dictionary entry for
the immediately errbracing iterative
DO.
The second half-word contains
a pointer to the dictionary entry
for
the
irrme1iately
embracing
INCLUDE.
This provides a method of
checking the legali~y of GOTOs.
For an INCLUDE identifier, 0nly the
430

embrac-

During Phase I, word 4 is used for
larels and si'mr1e var iables to hold
two pointers.
These form a
bidirectional chain of all labels and
variables having the same procedure
nUITber which have been used but not
defined.
This information is used
only is Phase I and can ther~fore
be overlaid.
EBCDIC

NAME: A variable
length
field,
containing the EBCDIC name of the
item.
If the item has no name,
tHis field is not included.

To hold character and bit string values,
some t€xt blocks are organised into subblocks of 32 bytes each.
Of these 32
bytes,
27 are used to hold values or parts
of values.
The first byte is used to told
a copy of the last charact€r in
tne
preceding IVB.
This copy is wade to facilitate backup.
The last four bytes consist
of a condi~ion code of one byte followed by
a 3-byte chain pointer.
A set of these
sub-blocks,
chained together,
is used to
Ihold a value.
ThE condition byte is 27 for
all except the last sub-block in a value.
In this last condition code byte the first
bit is set to 1 to indicate "end-of-value."
The remaining bits are a count ot the
significan~
bytes in the sub-block.
There
is a maximum of 27 significant bytes in an
IVB.
The chain address is used to point to
the next sub-block in a value.
The meaning
of the chain address in the last sub-block
in a chain depends on hew the chain is
being used.
These
small
chained
referred to as "identifier
or IVBs.

sub-blocks are
value blocks,"

Text blocks are allocated to hold IVBs
as the need arises.
Those IV~s not currently in use are chained together into an
availability chain and are re-used when
needed.
An example of a character string value
held in IVBs is shown.
The charact~r
string, wllicf1 starts wi th P.E and ends with
CD, is 28 characters long.
Two IVBs are
thus required to hold the value.
The
string AB .•• C is ~ut into the first
IV~,
while ~hc last character, D, is put into
another IVE.
The conditien cede byte of
Ithe first IVB is 27. The second con~itio~

r--------------T---T-'
r------------T---------T----'
I?AB
C I 0 I---->ICD/////
I 100000011
? I
L______________ ___
~

<----28------>

1

~_J

3

L____________ _________ ____ J
~

~

<---28-----> <---1---> <-3-)

code byte is 10000001.
The first "1"
indicates end-of-value, while 0000001 is a
count of the significant characters in the
IVB.

1
2

3
4

Besides holding charac~er-string values,
IVBs are used in rrany places by
the
compile-time processor to hold information
which must be chained from a dictionary
entry and which is of indefinite length.
These uses are noted elsewhere.

5

l-IXBD
CHARACTER
LIT
Indirect reference (i.e., points
to a dictionary entry>
Character string value does not
"belong" to the 8tack and bhouid
not
~e
erased when stack is
popped.
(Shared with Phase bG
scan. )

Bits 6-8 are unused by the interpreter.
Th8Y are res£rved for Phase PG scan.
Compile-time statements are handled in
two parts.
During Phase BC, each statement
is recognized and syntax checked.
An
encoded form of the statement is then
placed into the current text block. During
Phase BG these encoded statements are executed by an interpreter.
All expressions are encoded in postfix
Polish. A stack is used during Phase II to
hold all operands. Conversions are done in
Phase BG.
Thus the expression
ple, is turned into

(A+B)

IIC, for

All instructions generated by the Phase
BC code generators begin with an operation
byte. Depending on the operation, it rr~y
be followed by zero or more bytes of
information which are intrinsically part of
the instruction. Each instruction may have
either or both of the characteristics S~ACK
and FIXED. The definition of these characteristics follows:
1.

exam-

CII

A B +

To be more explicit, it is turned into the
instructions
PUSH A;
PUSH

B

S~ACK.
These instructicn consist only
of the one-byte ol-;erator.
'l'hey taKe
their operands, if any, from the Phase
II stack. TheSE operators correspond
in general to the PL/I arithmetic and
string operators. Depending on wlJether they are unary or binary, they us~
the tOP one or two items on the stack.
Before these operands ~re used,
they
are converted, if necessary, i~.El~£§
to the required type.
After the items
are used they are po~[ed from the
stack. The result of the operation is
pushed onto the stack.

ADD;
PUSH C;

The conversion, the pOFPing, and the
pushing are all iruplied for a stack
operator.

CONCAT
The PUSH operator pushes its operand
onto the phase II stack. This stack consists of 150 full wor¢s in scratch storage.
The first byte of eacri call is a status
byte; the last three bytes hold the value
if the item is FIXED, a pointer if the item
is CHARACTER or BIT, or an indirect reference to a dictionary entry if the indirE!ct bit is on.
The bits of the status lyte
following meaning if set to one:

have

the

2.

FIXED LENGTH.
These oper~tions are
followed by a fixed number of bytes -usually two. These bytes, which usually refer to a dictionary e~trYI
serve
as
the
operand{s) of the
instruction.

The table Lelow shows the operations
that arp to encode macro instructions. The
operand description indicates only the general operand type ~or a variable-leng~h
item. The count byte is omitted.
Appendix J:

Corrpil~-time

Processor

431

r--------T-------T------------------------------------T----------------------------,

I MNEMONIC I TYPE

I
OPERAND DESCRIPTION
I
FUNCTION
I
~--------+-------+------------------------------------+----------------------------~
IA+B
STACK BINARY; OPERANDS, RESULT FIXED
ADD
SUB

STACK

BINARY; OPERANDS, RESULT FIXED

MUL

STACK

BINARY; OPERANDS, RESULT FIXED

DIV

STACK

BINARY; OPERANDS, RESULT FIXED

STACK

UNMIN

STACK

UNPLS
ASSIGN1.

I

UNARY; OPERAND, RESULT FIXED

I

IA*B

I

IA/B

I

I-B

I

I+B

I

IA=B (assignrrent)

STACK
FIXED

UNARY; B CONVERTED TO TYPE OF A

NOT

STACK

UNARY; OPERAND, HESULT BIT

AND

STACK

BINARY; OPERANDS, RESULT BIT

A&B

OR

STACK

BINARY; OPERANDS,

AlB

CON CAT

STACK

BINARY; OPERANDS, RESULT CHAR

AilE

EQU2

STACK

BINARY; OPERANDS, RESULT VARY

A=B (equality)

STACK

BINARY; OPERANDS, RESULT VARY

A>B

STACK

BINARY; OPERANDS, RESULT VARY

A
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                     : 2003:06:02 18:34:56-07:00
Modify Date                     : 2009:09:06 09:08:01-07:00
Metadata Date                   : 2009:09:06 09:08:01-07:00
Producer                        : Adobe Acrobat 9.13 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:43bfc9c2-4366-406f-a2f5-045f1461b654
Instance ID                     : uuid:6a6508b0-8ecb-44df-ba03-4489b07b2bf9
Page Layout                     : SinglePage
Page Mode                       : UseOutlines
Page Count                      : 452
EXIF Metadata provided by EXIF.tools

Navigation menu