GY20 0567 1 CALL 360 PL1 System Manual Vol Jan71

GY20-0567-1_CALL_360_PL1_System_Manual_Vol_1_Jan71 GY20-0567-1_CALL_360_PL1_System_Manual_Vol_1_Jan71

GY20-0567-1_CALL_360_PL1_System_Manual_Vol_1_Jan71 GY20-0567-1_CALL_360_PL1_System_Manual_Vol_1_Jan71

User Manual: manual pdf -FilePursuit

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

DownloadGY20-0567-1 CALL 360 PL1 System Manual Vol 1 Jan71
Open PDF In BrowserView PDF
--===.-----

--

------ --=====:"= . -

Application Program

CALL/360 - OS PL/I

System Manual - Volume I
Program Number 360A-CX-45X

The CALL/360-0S PL/I compiler (to be used with
the CALL/360-0S system on an IBM System/360
Model 50 or higher) is described in the four
volumes of this publication. The publication
is addressed to system programmers and program
systems representatives who require a detailed
knowledge of the compiler. It contains a
general overview of the compiler and detailed
information on the compiler and runtime routines
and macros that perform required functions.
Additional information required to und~rstand
CALL/360-0S PL/I compiler operations is provided
in several appendices.
Volume I contains a general description of
the compiler, a section on compiler operations,
and a directory to compiler routines.

GY20-0567-1

PREFACE

This four-volume publication is addressed to system programmers and
program systems representative who require a detailed knowledge of
the CALL/360-0S PL/I compiler. It contains a general overview of the
compiler and information on the compiler and runtime routines and
macros that perform required functions.
Additional information required to understand CALL/360-0S PL/I compiler
operations is provided in several appendices (see Volume IV). Appendix
J contains tables of macro/module calls and summary listings of
CALL/36o-0S compiler and runtime routines, indicating where each routine
is described in this publication.
The reader of this manual should have access to the CALL/360-0S PL/l
Language Reference Manual (GB20-0100) and the CALL/360-0S Terminal
Operations Manual (GB20-0181).
Terminal Equivalence
Terminals which are equivalent to those explicitly supported may also
function satisfactorily. The customer is responsible for establishing
equivalency. IBM assumes no responsibility for the impact that any
changes to the IBM-supplied products or programs may have on such
terminals.

second Edition (January 1911)
This edition, GY20-0561-1, is a major revision obsoleting GY20-0561-0.
It applies to Version 1, Modification Level 1, of CALL/360-0S and to
all subsequent versions and modifications until otherwise indicated
in new editions or Technical Newsletters.
Technical changes to text are indicated by vertical lines in the left
margin. A revised illustration or chart is indicated by the symbol
• to the left of the caption.
Changes are continually made to the information herein. Therefore,
before using this publication, consult the latest System/360 SRL
Newsletter (GN20-0360) for the editions that are applicable and current.
Copies of this and other IBM publications can be obtained through IBM
branch offices. A form has been provided at the back of this
publication for readers' comments. If the form has been removed,
address comments to: IBM Corporation, Technical Publications
Department, 112 East Post Road, White Plains, New York 10601.
©

Copyright International Business Machines corporation 1910, 1911

CONTENTS - VOLUME I

section 1 - General Description •
Philosophy.
Objectives.
Facilities.
Approach.
Compiler organization •
Data Organization •
Naming Conventions.
Compiler Limitations.
Compiler-Time and Runtime Error Messages.

10
10
10

section 2
compiler Operations •
Overview.
Phase 1 •
Entokening.
General Statement Processing.
Declaration Processing.
Input/Output Statement Processing •
Expression Processing •
Code Generation •
Phase 2 or wrap-Up Phase.
Support •
Executive Interface •

12
12
12
13
14
15
11
23
29
33
35
36

Section 3 - CALL/360-0S PL/I Compiler Routine Directory •
Introduction.
Part 1 - Controllers.
Statement Category ($CATEG)
Phase 1 Initializer ($CCONT).
Controller ($CNT)
Phase 2 Initializer ($WCONT).
Part 1 Logic Diagrams •
Chart 1.
Statement Category ($CATEG)
Chart 2.
Phase 1 Initializer ($CCONT)
Chart 3.
Controller ($CNT)
Chart 4.
Phase 2 Initializer ($WCONT)
Part 2 - Entokening •
Increment Scan Index. ($ASIDX)
Entoken ($ATKN. $ATKN2)
Search-Insert ($FIND)
Get Non-Blank ($FNB).
Part 2 Logic Diagrams •
Chart 5.
Increment Scan Index ($ASIDX)
Chart 6.
Entoken ($ATKN. $ATKN2)
Chart 1.
Search-Insert ($FIND)
Chart 8.
Get Non-Blank ($FNB)
Part 3 - General Statement Processors •
Assignment Generator ($ACGEN)
PROC Generator ($APRC. $APRC2).
BEGIN Generator ($BEGIN).
On-Unit Specification Analyzer ($BONSA)
GO Generator ($BRNB. $BRNB2).
CALL Generator ($CALL).
IF Generator ($CIF)
ON Generator ($CON)
REVERT Generator ($CRVT).
STOP Generator ($CSTOP)
DO-Loop Triad Builder ($DEXP)
DO Generator ($DOG. $DOG1).
RETURN Generator ($DRET).
END Generator ($EDGN, $EDGN2)
Process End of ELSE ($ENDES).

31
31
31
38
39
41

i

1
1
1
2
2
4
1

43

45
45
46
41
53
54
55
56
59
61
62
62
63
12
14
15
16
11

19
80
81
83
84
85
81
88
89
92

93
94
96

Process End of ON ($ENDON) • •
• •
• ..
Expander ($EXPND) • • •
• •
END Expand ($EYFND) • • • • • • • • •
Part 3 Logic Diagrams • • • •
Chart 9.
Assignment Generator ($ACGEN)
Chart 10. PROC Generator ($APRC, $APRC2)
Chart 11. BEGIN Generator ($BEGIN) • • .
Chart 12. On-Unit Specification Analyzer ($BONSA)
Chart 13. GO Generator ($BRNH, $BRNH2)
Chart 14. CALL Generator ($CALL) •
Chart 15. IF Generator ($CIF)
Chart 16. ON Generator ($CON)
Chart 17. REVERT Generator ($CRVT)
Chart 18. STOP Generator ($CSTOP)
••.••
Chart 19. DO-LoOp Triad Builder ($DEXP)
Chart 20. DO Generator ($DOG, $DOG2) • • •
Chart 21. RETURN Generator ($DRET) • • • •
Chart 22. END Generator ($EDGN, $EDGN2)
Chart 23. Process End of ELSE ($ENDES)
Chart 24. Process End of ON ($ENDON)
Chart 25. Expander ($EXPND)
• '• • •
Chart 26. END Expand ($EYPND)
Part 4 - Declaration Processing • •
Attribute Analysis ($ABAL) • • • •
Attribute Node Creation ($ANCRE).
Label Processor ($BLPRC).
DCL Generator ($DCLGN) • •
Locate Identifier ($FSYM)
Locate Variable ($FVAR) •
Part 4 Logic Diagrams • •
• • • •
Chart 27. Attribute Analysis ($ABAL)
Chart 28. Attribute Node Creation <$ANCRE)
Chart 29. Label Processor <$BLPRC) • •
Chart 30. DeL Generator ($DCLGN) • • •
• • • •
Chart 31. Locate Identifier ($FSYM)
•••••
Chart 32. Locate Variable ($FVAR)
Part 5 - I/O Statement Processing •
GET Generator ($BGET) .••
PUT Generator ($BPUT) • • •
Data Specification ($DDS)
I/O Specification ($DIOS)
O/C Specification ($DOCS)
Format List Generator ($FLG) • • • • •
FORMAT Generator ($FMT) • • •
Format Item <$FORI, $FORI2) • • • • • . •
Format in Data List Processor ($FPDL)
OPEN/CLOSE Generator ($OPEN, $CLOSE).
Part 5 Logic Diagrams • • • • • • • .•
Chart 33. GET Generator ($BGET)
Chart 34. PUT Generator ($BPUT)
Chart 35. Data Specification ($DDS) • • • • •
Chart 36. I/O Specification ($DIOS)
Chart 37. o/C Specification ($DOCS)
Chart 38. Format List Generator ($FLG)
Chart 39. FORMAT Generator ($FMT)
Chart 40. Format Item ($FORI, $FORI2)
••
Chart 41. Format in Data List Processor ($FPDL) ••
Chart 42. OPEN/CLOSE Generator ($OPEN, $CLOSE)
Part 6 - Expression Processing. • • • .• • • •
Argument Operand Processor ($NATTP) • • •
Call Generator ($NCALL) • • • • • • • • •
Cross-Section Dope Vector Build ($NCSDV).
Expression Processor Controller ($NEXP)
Dimension Multiplier Generator ($NMULT)
Convert Operand ($NOPCV). • • • •
• • • •
Operator Stack Processor ($NOPRT)
• • • •
Operand Set-Up ($NPRE). • • • • •
• •••
Generate Triad ($TRIAD, $STRD) • •
•
0

97

• •
•

~

• • ••

• • _

•

•

•

•
•
•
•
•
•

•

•
•
•
•

• • _ •

98

• 100
• 101
101
• 102
• 105
• • 106
• 108
• 110
112
• 113
• 115
• 116
• 117
• • 119
• 123
• 124
• 130
• 131
• • 132
• 133
• 134
• • 135
• 137
• • 140
• 141
• • 143
• 144
• • 146
• • 146
• 148
· 158
061
· 162
· 163
• • 166
· 167
• 11>9
171
· 173
· 174
• 175
• 178
• 179
• 180
· 181
183
• 183
· 185
• 187
• • 193
• • 195
197
• • 202
• 203
• • 205
• 206
• 207
• 208
• 209
• 211
• 213
• 217
• 218
• 220
• 223
• • 224

Part 6 Logic Diagrams • • • • • • • • • • • • • • • • •
Chart 43. Argument Operand Processor ($NATTP)
Chart 44. Call Generator ($NCALL) • • • • • _ • • •
Chart 45. Cross-Section Dope Vector Build ($NCSDV)
Chart 46. Expression Processor Controller ($NEXP)
Chart 47. Dimension Multiplier Generator ($NMULT)
Chart 48. Convert Operand ($NOPcv) • • • • • • • • • .. •
Chart 49. Operator Stack Processor ($NOPRT) • • • • •
Chart 50. Operand Set-Up ($NPRE) • • • _ • • •
Chart 51. Generate Triad ($TRIAD, $STRD) • • • • • • • •
Part 7 - Code Generator • • • • • • • • • • • • • •
optimize Operands ($OPMZO) • • • • • • • • • • • •
String constant Dope Vector Initializer ($SCDV) •
Triad Code Generator ($TCODE) • • • _. •
Triad Operand Processor ($TOPR) _ • • •
Adcon Register Assignment ($VASGA) • • •
Computational Register Assignment ($VASGC) • •
Register Table Initializer ($VCLR). .. • ... _.
storage Address Assembler ($VDSAC). .. _.
Temporary Storage Management ($VGTMP) • • • • • •
Instruction Assembler ($VINSA) • • • • •
Part 7 Logic Diagrams • • • • • • • • • •
Chart 52. optimize Operands ($OPMZO) • • • • •
Chart 53. String Constant Dope Vector Initializer ($SCDV)
Chart 54. Triad Code Generator ($TCODE) • • • • • •
Chart 55. Triad Operand Processor ($TOPR) . • • • • •
Chart 56. Adcon Register Assignment ($VASGA) • • • ..
Chart 57. Computational Register Assignment ($VASGC)
Chart 58. Register Table Initializer ($VCLR) • • • • • •
Chart 59. Storage Address Assembler ($VDSAC) • • .. •
Chart 60. Temporary Storage Management ($VGTMP) • • • •
Chart 61. Instruction Assembler ($VINSA)
• • • • •

iii

Chart 11. Segment Management ($WBACK)
Chart 18. Segment Management ($WC'1'CT)
Chart 19. segment Management ($WEXP) ...
Chart 80. segment Management ($WSTEP)
Chart 81. Error Message Editor ($XERR) .. •
Part 10 - Executive Interface • • •
• .... _.
SVC Director ($SVC) • • • • • • •
• • .. _.
Chart 82. SVC Director ($SVC) . . . . . .

iv

. . . .. . .

•
•
•
•
•
•
•
•

1J41
1J1J2
1J1I3
IJIJIJ
IJIJ5
1J50
IJ50
IJ51

FIGURES - VOLUME I

Figure 1-1.
Figure 1-2.
Figure 1-3.
Figure 1-4.
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure

2-1.
2-2.
2-3.
2-4.
2-5.
2-6.
2-7.
2-8.
2-9.

Figure 2-10.
Figure 2-11.
Figure
Figure
Figure
Figure
Figure
Figure

2-12.
2-13.
2-14.
2-15.
2-16.
2-17.

Figure 3-1.
Figure 3-2.
Figure 3-3.

A Layout of Main Storage for
CALL/360-0S PL/I
Functional Organization of the CALL/360-0S
PL/I Compiler, Phase 1
Functional Organization of the CALL/360-0S
PL/I Compiler II Phase 2
...
Layouts of User Work Area.

···· ···
··

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

· ·

Internal Compiler Logic.
The Entokening Process •
OPEN/CLOSE Processing.
GET/PUT Processing
Format List Processing.
Data-Directed I/O Flow of Control.
List-Directed I/O Flow of Control.
Edit-Directed I/O Flow of Control.
Relationship of the Code Generated
for the Data List and Format List.
Simplified Logic Diagram of the Expression
Processor Controller ($NEXP)
Simplified Logic Diagram of the Operator
Stack Processor ($NOPRT)
Expression Processor Tables.
Code Generation.
Tables Used by $TCODE.
Tables of Instruction Assembler ($VINSA)
Wrap-Up Routines
Storage Allocation During compiler Wrap-up

·

'.

· · · · '.

·

··
'. '.
· '.
· · · ·· ·· ,.· · ··
·
········
Attribute Conflict Matrix.
Classification Masks
'. · ·· ·· ··
· Example
Format List Generation
·

v

··
·

·

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

3
6
7
9
12
14
18
18
19
19
20
20
23
24
25
29
30
31
32
33
34

·· 136
137
· 176

CONTENTS - VOLUME II

Section 4 - Runtime support Summary.
Library Interface Services (LIBINT).
I/O Management Package (IOMP) • •
I/O Record Format. • • • • •
Stream-Oriented I/O. • • • •
Handling of Interrupts Package CHIP)
Management of Object Program package (MOPP) • •
Library Computational services (LIBCOMP) •
Total Conversion Package (TCP) • • • • • •
Structure of Total Conversion Package.
Conversions - Type Arithmetic. • •
String Manipulation package (SIMP) •
Arithmetic Function package (AFUNC).
Definitions. • • • •
Module Description • • • • • • • • • •
StlIlIIllary.

•

•

•

•

•

•

• •

•

•

• •

.. ....

13
18
19
20
21
24
26
21
21
32

•

Mathematical Function Package em-UNC). '. •
Definitions. • • • •
Module Description • • • • •
Summary. • • • • • •
Aggregate Manipulation Package (AMP)
Definitions. • • • •
Module Description •
summary • • • • • • •

35
36
36
38

Section 5 - Runtime Routine Directory.
I/O Management package • • • • • • •
Close (IBECLOSE) • • • • • • •
Data-Directed Input (IHEDDI) •
Data-Directed Output (IHEDDO).
Perform Calculation of the Subscript Values for an
Array Element CIHEDDP) • • • • • • • • • • • • • • • • •
Edit I/O Director CIBEDIO) • • • • • • • • • • • •
List- or Edit-Directed GET Initiation and Termination

.

(IHEIOA)

• •

• • • •

• •

• • ._ •

39
39

40

.

• • • • •

1
1
1
2
3
6
1
8
8
11

• • •

41
43

45
41
48
49

• •

output Initialization with or without Skipping (IHEIOB) • •
Output Data to the Buffer Area and Communication with
CALL/360-0S (IHEIOD) • • • • • • • • • • • •
Get Data Field from Input Buffer (IBEIOG) • • •
Perform SKIP(w) Function for SYSPRINT (IHEIOP)
Edited Horizontal Control Format Item (IBEIOX)
List- and Data-Directed Input (IBELDI) • • • •
List-Directed output (IBELDO).
• • • • • • • • •
Open ( IBEOPEN) • • • • • • • •
• • • • • • • • •
Reset Disk Files (IHERSET) • •
• • • • • • • •
Handling of Interrupts Package •
Program Termination (IBEDUM) •
Table of Error Messages and Indicators (IHEERN) • •
Error Routine (IHEERR) • • • • • • • •
On-ENDFILE and REVERT Initializer (IHEONREV)
Management of Object Program Package • • • • • •
Output Director (IBEGPUT) • • • • • • • • • • •
Initial Prologue, Expand DSA, End Prologue, Object
Program Initiation (IHESAD).
• ••••
GO TO Interpreter (IHESAF) • • • • •
Library SVC Director (IHESVC) • • • •
Total Conversion Package • • • • • • •
F/E-Format Input Director (IHEDIA) _
, A-Format Input Director (IHEDIB) •
C-Format Input Director (IBEDIM) •
F/E-Format Output Director (IHEDOA).
A-Format output Director (IBEDOB) • • • • • •

50

52
53

.

."

54
56
58
59
60
62
63
64

65
68
69
10
11

13
14
15
16
18
80
82

84

C-Format output Director (IBEDOM) • • • •
Character string to Arithmetic (IREDCN) • • • • • •
Arithmetic to Character String (IREDNC).
Zero Real or Imaginary Part (IREOPA) • •
Complex External to string Director (IREVCS) •
Character String to Character string (IREVSC).
Arithmetic Conversion Director (IREDMA) • • • •
Float Intermediate to Packed Decimal Intermedi~te
(IHEVFA)

• •

•

•

• •

• •

•

•

• •

•

•

•

• '.

86
88
90
92

93
95
96

• • •

Float Intermediate to Fixed Binary (IREVFB) • • • •
Float Intermediate to Float Short or Long (IREVFC) _ •
Fixed Binary to ;!!.,f.oat Intermediate UREVFD) . . . . . . . . .
Float SOurce to Float Intermediate (IREVFE) • • • •
Packed Decimal Intermediate to Float Intermediate
(IBEVPA)

•

• •

• • • • •

•

• • •

• •

•

• • ..

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

• •

99
100
101
102
103

• lOll

Packed Decimal Intermediate to F-Format (IREVPB) •
Packed Decimal Intermediate to E-Format (IREVPC) •
String with Format to Packed Decimal Intermediate

105
• 106

• • • • • • 107
• • • • • 108
109
• 110
111
• • • 113
• • • 115
• 116
Speed. • • • . • • • • • • . . • •
• 116
Accuracy • . • • • . • • • • • . .
• 116
Ar Area

Communications Area

Terminal 1'0 Buffer

Terminal I/O Buffer

Objcct Program

Object Program

Line Number Tablc

Static and Constants Storage

Address Constant Area

Re\ol'atablc Library Work ,Space

Runtime Library

Non-Rdocatable Library Work Space

Statk Array ,mg String Storage

Disk I/O ButTers

Compiler's Variable
Size Workiu!! Storal!l'

Compikr\ h,cd-Sile
Wor!..mg Storagt'
/

Available for
-p_Arca Relocatabll:
Dynamic Storage
C-Arca Relocatablc CrArcaLoad Table

i

1

Sourcc Program
~-----

--------------'4------

Dunng ('ompilation

Figure 1-4.

- - - - - E n d of Work Area
During Execution

Layouts of User Work Area

9

NAMING CONVENTIONS
Runtime library routines are named IHExxx where xxx is a three- to
five-character mnemonic indicating the routine's function. Phase 1
and phase 2 compiler modules are named $xxx where xxx is a one- to
seven-character mnemonic indicating the routine's function.
Note:

The CALL/360-0S PL/I compiler and runtime modules follow the
naming conventions stated above.
For clarity, these conventions
are used throughout this manual. However, there are some
exceptions in the member names assigned to certain routines
when stored in CALL/360-0S PL/I system libraries,. These
exceptions are noted in Figure J-4 and under "CALL/360-0S PL/I
Runtime Library" in Appendix J of Volume IV.

COMPILER LIMITATIONS
Because all tables and the object program are kept in main storage
during program compilation, compilation may be terminated because the
user work area is too small. This is the only valid (that is, sourceprogram related) reason for termination of compilation. Compilation
may also be terminated if the CALL/36Q-OS PL/I compiler discovers an
"impossible" logic path or because a program interrupt occurs. such
a condition is due to either a machine error or an error in the
CALL/360-0S PL/I compiler.
Before compilation is terminated because of insuffic1ent work space,
CALL/360-0S PL/I requests additional main storage from the Executive.
However, for a given computer size, there is a maximum work space that
the Executive can provide. At present, on a machine having 512K bytes
of main storage, a user work area can be up to 112K bytes in size.
(See Appendix I for details on the maximum size of a program to be
compiled on a 512K computer.)
A programmer, by specifying an out of range value for the subscript
of an array, may destroy the contents of his static array and string,
disk buffer, or dynamic storage area. complete storage protection
is not provided for these areas. As an example, assume that an element
of an array A is specified outside of the area for which the array
has been declared. That is, a program may contain the following
statement.
A(I)=10:
Assume that, when this statement is executed, the current value of
I is outside of the range declared for the subscript of A. This
specification can cause data to be written in one of the three areas
mentioned above. An error message is generated only if the value 10
would be moved into an area other than one of those three.
COMPILER-TIME AND RUNTIME ERROR MESSAGES
During the compilation process, the CALL/360-OS PL/I compiler modules
analyze source statements of the program being compiled. If incorrect
use of the language is detected, an error message identifying the error
condition is printed out at the terminal.
(See Appendix F of the
CALL/360-OS PL/I Language Reference Manual for a description of
CALL/360-0S PL/I compilation and execution error messages. These
messages are also listed in Appendix H of this manual.)
A severity code is associated with each compiler-time error message.
If any statement causes a message having severity code 3 to be
generated, the compiled program is not executed.
10

If an error condition arises during program execution, an error message
is printed (unless the programmer has indicated alternative action
by means of an ON statement). Error conditions are of two types.
Some cause execution to be terminated immediately, but others permit
execution to continue.

11

SECTION 2 - COMPILER OPERATIONS

OVERVIEW
The CALL/360-oS PL/I compiler is a one-pass, two-phase campiler--onepass, since it processes each statement completely before going to
the next; two-phase, because it is separated into two parts, phase
1 and phase 2.
Phase 1 takes one pass over the source code and translates source
statements to object code. During this pass, the entokening routines
translate the source stream into intermediate syntactic units called
tokens. The tokens are an unarranged, concise description of the
source statements. The expression processing routines transform these
tokens to another intermediate form called triads. Actually, triads
are the original source-program operators and operands rearranged so
that the specified operations will be executed in proper order. The
triads are converted to final object code by the code generator segment
of phase 1.
After phase 1 has processed the last statement, it issues a request
to the CALL/360-0S Executive to bring in phase 2. The Executive
overlays phase 1 with phase 2. Phase 2 performs wrap-up and loads
the library routines.
Figure 2-1 depicts the internal compiler logic of phases 1 and 2.
As noted above, each statement is completely processed before proceSSing
of the next statement begins.

Get a
Source
Program
Statement

fnad,

fokem
per
StJtemenl

PCI

~tJl':IlIL'''1

Obl C(1
( ,)dc

-

PHASI: I

1
PHASI: 2

Figure 2-1.

Internal compiler Logic

PHASE 1
After initialization of the compiler work area, which is performed
by the Phase 1 Initializer ($CCONT), control is transferred to the
Controller ($CNT). The Controller directs the entokening of statements,

12

analyzes most label prefixes, and directs control to statement
processors and code generation routines.
The usual sequence of events is:
1.

The Controller calls the Entoken routine ($ATKN) to entoken
a statement.

2.

The Controller examines the statement tokens to determine whether
the statement is a keyword type or assignment statement. If
it is a keyword type, the first token of the statement, excluding
any possible label prefix token, determines the keyword type.
The Controller directs control to the statement processor which
handles that keyword type. Any statement that is not a keyword
type statement is an assignment statement: the Assignment
Generator ($ACGER) is called.
Note:

Assignment statements may begin with keywords (for
example, IF=1)-. These statements are recognized as
assignment statements.

3.

The called routine processes the tokens of the statement to
create triads and then returns control to the Contreller.

4.

The Controller then directs control to the code generation
routines to produce object code from the triads.

ER'1'OKENING
The primary function of entokening is to convert the syntactic units
of each source statement to tokens. Each token is one word long.
The syntactic units that may be encountered are:·
•

Identifiers

•

Keywords

•

Delimiters such as + , (

•

Constants

•

Comments

* = or

=

The token created for an identifier or keyword references the dictionary
name list entry for that item. If there is no dictionary name list
entry, one is made. (See the Search-Insert routine ($FIND) for
details.)
The tokens created for delimiters (with the exception of the left
parenthesis token) are self-contained. That is, there are no pOinters
to other items in the token word. A left parenthesis token points
to the corresponding right parenthesis token. When a constant is
encountered, a constant attribute entry is created and the generated
token references this attribute. No tokens are created for comments.
Entokening is controlled by the Entoken routine ($ATKN). The Scan
Index routine ($ASIDX) is used to advance to the next source character.
The Search-Insert routine ($FIND) is called to search for a dictionary
name list entry and to create an entry if there is none. The Get NonBlank routine ($FNB) is called to advance to the next non-blank source
character. The relationship of these routines is shown in Figure 2-2.

13

$CNT
Phase I
Initialize!

SATK'\i

$F"IB

Entoken

Non-Blank

$FIND

SASIDX

Search-Insert

Scan Illde"

( Jet

Figure 2-2.

--

The Entokening Process

GENERAL STATEMENT PROCESSING
General statement processors are called by the controller ($CNT).
If a keyword is found in a statement, $CNT calls a statement processor
as follows.
Keyword

Routine

PROC or PROCEDURE
BEGIN
GO or GOTO
CALL
IF
ON
STOP
REVERT
DO
RETURN
END

PROC Generator ($APRC)
BEGIN Generator ($BEGIN)
GO Generator ($BRNH)
CALL Generator ($CALL)
IF Generator ($CIF)
ON Generator ($CON)
STOP Generator ($CSTOP)
REVERT Generator ($CRVT)
DO Generator ($DOG)
RETURN Generator ($DRET)
END Generator ($EDGN)

If no keyword is found, the statement is an assignment statement.
The Assignment Generator routine ($ACGEN) is called to process this
statement.
(The statement processors listed above do not include those
which handle I/O or declaration processing. These routines are
discussed later in this manual.)
The processing performed by each of the routines listed above is unique,
but, in general, the routines examine tokens and build appropriate
triads. The statement processors also check for logical consistency.
The keyword routines and the Assignment Generator call the Expression
Processor controller ($NEXP) to process:
•

Assignment statements (called by Assignment Generator)

•

Expressions such as A=5 in the statement
IF A=5 THEN GO TO HFILE;

•
14

CALL statement entry names and argument lists

Other routines discussed together with the general statement processors
are:
Routine

Caller and Function

On-Unit Specification
Analyzer ($BONSA)

Called by the ON Generator ($CON) to
check the legality of an ON-condition.

DO-Loop Triad Builder
($DEXP)

Called by the DO Generator ($DOG) and the
Expander ($EXPND). Its function is to
build the triads which initialize the
DO index. increment the DO index. and
test for DO-loop termination.

Process End of ELSE
($ENDES)

Called by the Controller ($CNT) when i t
detects the end of an IF statement. (Note
that an IF statement mayor may not be
terminated by an ELSE clause.) This
routine resolves branches to the end of
the IF statement.

Process End of ON
($ENDON)

Called by the Controller ($CNT) when it
detects the end of processing to be performed
as the result of an ON-condition.

Expander ($EXPND)

Called by the Assignment Generator
($ACGEN) when it detects an array
expression. This routine generates
one DO triad for each dimension of the
array.

END Expand ($EYPND)

Called by the Assignment Generator to
end the range of DO's created by the
Expander ($EXPND).

DECLARATION PROCESSING
Information about an identifier is contained in its dictionary name
entry and its dictionary attribute entry(s). These entries are in
the dictionary name list and dictionary attribute list respectively.
An identifier may be used or declared differently in different blocks;
thus. there may be more than one dictionary attribute entry per
identifier. However. there can be at most one dictionary attribute
entry for an identifier per block.
A dictionary attribute entry is constructed for an identifier when
its attributes are specified either in a DECLARE statement or by the
identifier's contextual usage. The contextual usage may either cause
a new dictionary attribute entry to be created or cause a description
to be added in an existing dictionary attribute entry.
Note:

Dictionary attribute entries are also made for constants. These
entries are formed in a section of the token table and are
discarded after the statement has been processed.

Four types of declarations are allowed:

•

Explicit

•

Implicit

•
•

Contextual
Tentative

15

An explicit declaration is made when a label appears on a statement
or when an identifier appears in a DECLARE statement (except for those
entry names that are not also parameters).
An implicit declaration is created for any use, in an arithmetic
position, of an identifier that is not followed by a left parenthesis
and which has no previous declaration in the scope of usage.
contextual declarations are made for identifiers used in file options
in GET, POT, OPEN, or CLOSE statements and for declarations of nonparameter entry names in DECLARE statements~
A tentative declaration is made for each parameter encountered in the
processing of a PROCEDURE statement; for a scalar not followed by a
left parenthesis, when i t is used in a position of a label and there
is no other declaration in the current block (such as GO TO A, where
A has not been encountered previously); or for a scalar followed by
a left parenthesis, when it is used in an arithmetic position and there
is no previous declaration in the scope of usage.
The four declaration categories listed above do not correspond directly
to those discussed in the CALL/360-0S PL/I Language Reference Manual.
The language reference manual discusses only implicit, contextual,
and explicit declarations. The tentative type was added because of
the one-pass nature of the CALL/360-0S PL/I compiler. It is only
significant internally. The contextual definition of the entry name
not a parameter in the DECLARE statement is also at variance with the
CALL/360-0S PL/I Language Reference Manual. Again, this is an internal
convenience, since the declaration will become explicit when the
procedure with that name is' encountered. Classification of an
identifier as explicit, implicit, or contextual indicates its scope.
A more complete discussion of declarations is contained in the language
reference manual.
The routines of the CALL/360-0S PL/I compiler that perform declaration
processing are:
DeL Generator ($DCLGN)
Attribute Analysis ($ABAL)
Attribute Node Creation ($ANCRE)
Locate Identifier ($FSYM)
Locate Variable ($FVAR)
Label Processor ($BLPRC)
The DeL Generator ($DeLGN) is called as the result of a DECLARE
statement.
It directs the analysis and encoding of attributes for
identifiers in that statement. In doing so, it calls the other
declaration processing routines as subroutines.
$ABAL analyzes and encodes an identifier'S attributes: $ANCRE creates
a dictionary attribute entry: and $FSYM determines whether a dictionary
attribute entry has previously been created in the block for this
entry. If a previous declaration conflicts with the present
declaration, an error message is issued.
As noted above, the Attribute Analysis routine ($ABAL) is called by
$DCLGN to analyze and encode the attributes of an identifier. It is
also called by the PROC Generator ($APRC) to process any RETURNS
attributes. The results of this routine are placed in the attribute .'
table ($ABTBL). This table should not be confused with the dictionarY
attribute list (A list).
(For the format of the attribute table, see
Appendix A.)
The Attribute Node Creation routine ($ANCRE) is also called by either
$DCLGN or $APRC.
Its fUnction is to create a dictionary attribute

16

node using the information placed in the attribute table by $ABAL.
If the identifier is dimensioned, a skeletal dope vector is built.
If the array bounds are constant, the dope vector bounds are
initialized. If the array bounds are variable, code that will calculate
the dope vector bounds at execution time is generated.
The Label Processor routine ($BLPRC) is called to process all label
prefixes. It creates a dictionary attribute entry for the statement
label or entry name and resolves any tentative declaration previously
made (for example, as a result of a GOTO statement).
The Locate Identifier routine ($FSYM), although grouped with the
declaration processing routines, is not used solely for declaration
processing. Inputs to this routine are an identifier token and a block
number. $FSYM determines whether the identifier has been previously
declared or used in the block indicated or in a block which is internal
to the indicated block.
The Locate Variable routine ($FVAR) is not referenced by other
declaration processing routines. It is called by the CALL, OPEN/CLOSE,
GET, PUT, or Format List Generator when certain variables are
encountered.
It is also called by the Expression Processor Controller
($NEXP) for each variable which i t encounters. This routine is used
to locate the most recent or the current dictionary attribute entry
for a variable, and, if there is none, to create a definition for it.
If there is more than one dictionary attribute entry for an identifier,
the most recent entry is the entry with the highest plock number.
INPUT/OUTPUT STATEMENT PROCESSING
CALL/36o-0S PL/I programs have the ability to transmit or receive
stream-oriented data (that is, data in the form of a continuous stream
of characters). This form of data contrasts with record I/O, which
is not supported in CALL/360-0S PL/I. Data may be transmitted or
received from two types of devices: remote terminals and disk units.
A program may address only one terminal, namely, the one at which the
program was entered. An unlimited number of disk files may be
processed: however, only four may be open at the same time. For both
terminal and disk, the data stream may be specified as list-,
data-, or edit-directed.
The I/O routines process the OPEN, CLOSE, GET, PUT, and FORMAT
statements.
(GET, PUT, and FORMAT are used to address both terminal
and disk: OPEN and CLOSE pertain only to disk.) The relationships
of the I/O routines are illustrated in Figures 2-3, 2-Q, and 2-5.
Details are given in the paragraphs which follow.

17

SOPEN, SCLOSl:
OPENICLOSE.
Generator

$OOCS

Ole
SpecificatIOn

Figure 2-3.

OPEN/CLOSE Processing

$BPUT

$BGFT

PUT
Generator

GET
Generator

1

$DlOS

I/O
Speci Ilea lion

1

SFPDL
Format 111
Data List
Procc~sor

'------

1

$DDS

Data
Specification

Figure 2-4.

18

GET/PUT Processing

SFMT

SFPOl.
Fonnalll1
Data ust
Processor

FORMAT
Generator

•

SFLG
Format
List
Generator

•

SFORI
Fonttat
Item

Figure 2-5.

Format List Processing

In processing I/O statements, the compiler generates calls to library
runtime routines. The library runtime routines associated with
list-, data-, and edit-directed types of I/O are shown in Figures 2-6,
2-1, and 2-8.
D-dta-Directed
If0 Code

Input (All FUllct,ons)

t

Termination

"utput

+

...''".a::I

ItIEDDIB

]

Initialize and
Perfonn Input

IIIEDDOC

d

Place
Semicolon
III Stream

.§
IIIlIODA
ImltJlize
WithllUlSltip

Figure 2-6.

l

..

14-

...

llIEDOOA
Scalar OutputWhole Symbol
Table

1t1l:IOOC'

IHEOOOB

Imlldhze
WithSktp

Array Element
Dutput.()nJy One
Symbol Table Ent'}

"-

4-

Data-Directed I/O Flow of control

19

Ust·Directed
I/U Code

Initialization

1

Input

t

Output

~
~
:3

~
IHEIOAA
Initialize

IIlELDlB

mEIOBA

Read One Variable ~

Initialize
Without Skip

......

Termination

.

None

~

IHELOOA

!

Output One
Variable

~c
.~

IIIEIOAT
Check for
Extra Input

Figure 2-7.

{!.

IHEIOBC

f4-

Initialize
WithSJc:ip

List-Directed I/O Flow of control
Input

In" ..lizauoo

Edit-Directed
I/oeode

Q

g
~
!

!

IDtt ..bze

Format Director

IHEIOAT
("hed., for

Extr. Input

!!

Q

.5

IHEIOBA

IHEooDY

f40

ImtaaillC
Without Slip

IHEDlBZ

IIIEDIAY

IHElOBC

A(w) Format

Input

EFormat
Input

Imtialize
WithSlup

IHEllDfA

IHEDIAl

CF_
Input

FFormat

A Format Without
Width SpeCIfication

IHEDIOA

Ie

•

All Other Formats

IOllUt

~
IIIEIOXA
X Format
Input

None

c

I-

IHI:D10A

Tenninatron

Output

~

!'!

IHEIOAA

~

IHEIOPB
SKIP
Format Output

~

IHEIOXC
COlUMN

Format Output

,...

-

IHEDOBZ
A(wl Furmat
Output

IHEDOMA
(' Format
Output

-

IHEooAY

-

lHEooAl
F Farmat
Output

E Formlt
Output

IHEIOXB

r...

Figure 2-8.

X Formlt
Output

Edit-Directed I/O Flow of Control

The Phase 1 Initializer ($CCONT) calls the OPEN/CLOSE Generator ($OPEN,
$CLOSE) when it encounters an OPEN or CLOSE statement. The OPEN/CLOSE
Generator calls the O/C Specification routine ($DOCS) to scan the
statement and determine which options are present.
(Available options
are the INPUT, OUTPUT, FILE, and TITLE attributes.)

20

If the statement is CLOSE, code is generated to:_
1.

Obtain the location of the file control interface block (FCl:B)

2.

Call the library runtime Close routine (IBECLOSE).

If the statement is OPEN, space is obtained in the initialization table
(I table) for a file control interface-block (FCIB) if the file was
not previously opened or declared. When phase 2 of the compiler
processes the initialization table, i t will move this FCIB to static
and constants storage. Code is generated to:
1.

Obtain the location of the FCIB

2.

Generate instructions to transfer around the rest of the code
generated for OPEN if the file is already open

3.

If the TITLE pointer is null, generate code to move the filename
into the title field of the FCl:B. Otherwise, call the Expression
Processor Controller ($NEXP) to generate code t~ evaluate and
move the title expression into the title field of the FCIB.

4.

Generate code to call the library runtime Open routine (IHEOPEN).

Except for PUT DATA and GET DATA statements, processing of a GET or
PUT statement causes the following object code to be generated:
1.

A call to an initialization routine

2.

Instructions to put the location of a data element descriptor
(OED) and the variable into the file control block (FeB). If
the I/O type is EDIT, instructions to put the location of a
format element descriptor (FED) into the FeB are also generated.

3.

A call to a routine which reads or writes a data item.

Steps 2 and 3 are repeated for each item in the data list. After all
items have been processed, code to call a termination routine may be
generated. The OED's are generated at compile time and are moved into
the static and constants area when phase 2 of the compiler processes
the initialization table. If possible, the same procedure is used
for the FED's. If an FED is too complex to evaluate at compile time,
instructions to evaluate i t at runtime will be generated.
If the statement is a GET DATA or PUT DATA statement, a symbol table
is built; one item is entered for each item in the data list.
(See
Appendix E.) If no data list is present, a symbol table entry for
each identifier in the block will be generated at epiloque time. A
symbol table entry consists of a DED and the EBCDIC name for an item.
In addition, code is generated to call the appropriate library runtime
routine(s).
Both the GET Generator and PUT Generator call the I/O Specification
routine ($DIOS), which scans a statement and locates FILE, SKIP, DATA,
LIST, and EDIT keywords. These generators also call the Data
Specification routine ($DDS) to process the data list for every
statement other than a GET DATA statement. For all statements except
GET DATA and PUT DATA, each item in the data list is processed as
follows:
1.

A OED is constructed.

2.

Code is generated to put the location of the DED into the FCB.

21

3.

Unless the I/O specification is EDIT. a call to the proper
library runtime routine is generated. If the I/O specification
is EDIT. a branch and link is generated to part of the code
generated to process the format list of the statement. This
code will put the location of the proper FED in the FCB and
call the proper library runtime routine.

These three steps will be repeated until the data list is exhausted.
If the statement is PUT DATA. an entry will be made in a symbol table
for each item in the data list and a call to either lHEDDOA or IBEDDOB
of the Data-Directed Output routine will be generated for each symbol
table.
The $FLG. $FMT. $FORI. and $FPDL routines handle the format lists for
edit-directed I/O.
$FPDL is called by the GET Generator ($BGET) or
PUT Generator ($BPUT) to process a format list for edit-directed I/O.
The processing of a format list will cause the generation of code (to
be called as if it were a subroutine). Therefore. the first function
of $FPDL is to generate a branch around the code for the individual
format items. This branch will be directed to the beginning of the
code which will be generated to process the data list. Then. $FLG
is called to direct the generation of code for the individual format
items. On return from $FLG. $FPDL generates a branch back to the code
generated for the first format item. At object time. this branch will
be executed if the number of scalar data items in the data list is
greater than the number of associated items in the format list. Then.
$FPDL resolves the branch around the code for the fo~at list.
$FLG performs the syntax analysis and code generation for a format
list. For each format item. it generates the following code:
1.

Save the location from where called.

2.

Put the location of the FED into the FCB.

3.

Call the appropriate library runtime routine.

4.

Return to the location from which called with a branch and link
instruction. This location will contain code generated for
the next item in the data list.

$FLG calls $FORI to analyze and generate any code necessary for
expressions in a format specification and to create a FED.
$FMT is not called by any I/O statement processing routine. When the
Phase 1 Initializer ($CCONT) encounters a FORMAT keyword. $FMT is
called to create a remote format list. The generated code is similar
to that generated for a format list in a GET or POT statement. Like
$FPDL. $FMT calls $FLG to process the format list.
The code generated for a format list is driven by the code generated
for the data list as illustrated in Figure 2-9. In this example. the
data list contains two items and the format list has two entries
describing these items.

22

OAT A-LIST COOF

FORMAT-LIST CODE

..

Set up FCB with pointer to
first item and its DI· D

Set up FCB with pointer to
second item and its OED.

.

Set up fCU wIth pointer to
first item's 1·1:.0. Complete
Initialization of l'el8. * Call
library runtime routine to
outpu t item I.

Sct up H'B with pointer to
second item', FED. Complete
initialization of FCIB. • Call
library runtime rou tine to
output item 1.

*Note: This code will not be generated if the fields describmg the format item are
simple constants (for example, (5,2)).

Figure 2-9.

Relationship of the Code Generated for the Data List and
Format List

EXPRESSION PROCESSING
certain common syntactic units are processed by the routines grouped
as expression processing routines. Generally, the function of
expression processing is to generate triads from syntactic units which
are represented by tokens. Expression processing is invoked by calling
the Expression Processor Controller ($NEXP). A call is generated in
any of the following cases:
1.

By a statement processor to evaluate an expression. For example,
the following statement contains an expression to be evaluated:
IF Al-"

""*"..~

..

*'
..

#>:

•
•
•
.....

.•

•••• X uo·
INITIAL
*1~C/'lj-J(t.lL..I.."T rL*
*..: :,
VALU"

.*• •• . . .
~

~***

•

PA SS (ONT~nL
TO PHASr I
C!)l.NlSI8

*-----------.
I"!'

OPUT

l~fRRA

• lie NM 18L

*

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

v
•••••••••••••••
*'f'l\.St8
•

.•-------.•
,put tilSVCA tN'
• tl~ itM TAL

•

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

V

• • • • t,rt: • • • • • • • • •
..

(l:

III

s:nR AlL
"UIL 1- IN

"HlI,."Cl-N HAtUS-

• L

"'

Chart 2.

Phase 1 Inieializer

•••

It:

•

*

..

..............
t

46

•

•.--~----------.
SH FOLLOW I ,'c,*
*
NOTf
'«

*
* TAl>LS' *
•
ICONTI
*
********* •• ****

*1;1:$10<**.****

V

•• fNt'

*SbMNlS OF ALL.

*

,,+.;.~

V
•••••• **.***$\~ :-

V

*- ....... x

KfY~OPD~.

'"

r- n •
*

• ••

P~/~

MANUAL

.~S'tMS

ft.d

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

••

V

'*

••

*------------*
*' l.:.IfC,U tlf'o:Ji ..
..

;) 11"11

•

*.•

..

*-------------*
* ..
f IAbU: ..
••
•
•••• *.•
1.1,.,)

•..... **-l'**$ •••

••
•

..

..

-$A..-H.(.l

•

~

: •••

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

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

•

YE~

V

•ORHET

.·

x.~TART

••

j(.

b\jTUKE:j'~

•

•

PTR TO •
•

o

...

SET

lA~.,Ill

•••

oX 010

BEFOH.fl

•

V

CC 155

0

• NO

loLl ,",7

•

"200

•0

•

'v

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

•

V
•••••••••••••••
..

• NO

...............•
•
•
..
.)1: 1 LAdtL
• !Ii,.l H.H uf~

- YES

• NO

• NU

l..l.lU)

•

-•"

OF REAL.

JOKi-N Ll51

V
• ••• * ••••••••••

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

•

-

-- -

•

_..
..............

•o

•

..A1K~

It

..

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

...............
......
. .-------------.
..
~Ll~U

••

.....

004 •• X_TYPE Of TOKEN-

_NU

o

••••••••• *ts6

-tC300

II<

•••

V
• • • • -NU
• CSSsOFf'? • *X• 80 •••••2•

....
......

•

UUMMY=NU?

.yt)

.

V

-

.. ..............
!>T~It.Mt::I"1

:

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

••
Lol:.r!l'''IE
..
*"U,Il"Kt:;a.Ol TKIAu*
•"
•

lloloi::StLlu1

~XT

• PKUC. SIMI

•

•

~w\~2R~UN

•

~kOLt5~

•

11<$ • • • • • • • • • • • • •

..

:

_C) ••• Xt
l4HEl
••••••••••••• 03 •
• •
• POINTER-PTR •
• •
••
.. PTR=PTR.2 •
• ••

..

.. •••
* x.*-------------.•
*t~

.X CU

eC200

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

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

..

'ItuLj., Li'-4I,{Y ..
t uk t I k~ T ..
L !Nt
..

••
..

••••

..

;)1:1 PTt( Tli ..
TfJK~N

..-

•

PTR.l;~I9KEN

-•••••••••••••••-

v

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

••

•lit • • • • •Ll• •~I• • • • • • •
•

*~.

"'''* ••••

...'ott:""Ic.. U

UU"'MY=YcS

...

.. I)UMMY

V

¥$7f.** • •

..

••

y

y

• ~t 1 :a.Ll1,'IIf: Tu.
*llM. i-'t.dr.. l LK •

••

•-••••••••••••••
• LABEL ••_
•• SlllTCH-OFF

·................-

V

••

• •
• •••••
••• •
•
• • .,0
••

to

:01:- _

S I4T.
•
•• ••••••••••••••

•• " ... +C< ••••••• "..'"

·

O~MMY
IiKO
i:OUKI:.

•
..

*.I\v~.;<*.*

••

••

v
•••••••••••••••
•.. <.it:.Nt.RA H: •..

V

1001, .. " . . . . 0'- . . . . . . . .
.. ;a.I;V/~

.

*ERkOM.

....

•

.... '"4:,. .... 4-~ ... " . . .

CC155.

•••••••••••••••"
..'8l'.. •• X-l~I
.-------------*
~T"T NOT •
•
- ~KUI.EllUKE , •••••••••••••••

1;'1&> . . . . . . . "' . . . . . ..

•• ,.,II\I"c!

.

• A ................. .

.

·Nu
•

..
•••

0

•

*x ul.

•••

•

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

•

0

..
•

..
•

LRtATL U

•

.

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

..•

lAdle. E"'fkY' •••••••••••••••••• X. SrI $lLtNE
fUKt.INl

•

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

..
•

(C 155

•

• *** •

*'

••

. ...

•••• X 01-

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

'C550
TOKEN TO
PTR=OTHF.R

••••
..X A7 ••
0 bO
••••

-

.. YtS

v
...............
•·
• •••
•..
.•.. .•...•..
..

...UM(4y=~u

•••• K iiI,.

•••••••••••••••
Chart 3. Controller (Page 1 of 6)

47

H S r EllS MANUAL

~LI1
$C~r

..

••

................
.$t~Uu~

~

.

•

• 0.

.-------------.••• 03 .. • •*So •
•
'fl."
•.. •.. •••L* •••• •
"'
~
'"

.A~ •••

A.
..

~hUL

lN~

~t

....... .........
l.Il~-u,.,'T

.. • •

~L201l

.....

~X

• OYES
•

CSS=ON

'l'

Sf ATo"ENT?

•

0

•

•

**
••

L~~=THtN

UNIT?

.. •

•

*~

...
...

..

•YI:S

GE"'ERAT~

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

oNU

PTRH-) TOKEN

•

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

·•

v
••••••••••••••

•

*••••••••
••

...

..

•
lABEL
"
•
SW ITCHeDN •
.LAbEl PTII*PTRO
PTR-PTR+2 •

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

... • . .. •
.

CClOC!

• PIR-)TOKfN A • ••••
• *
•• '2*X
" KE~~alD? • ox• 041* •
••
*o
* * ••••
"

•

:d~:hr~ ~VMf~LJ:

•0

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

•

*1'10

..

• YES

V
•.5CATEG
••••••••••••••
•

V

« ••••••••••••••

.

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

••
•
••

Ill~[Nl

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

EL~I:

• OH Eit" CATEG'

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

·• x•••••••••••••••••.
. *..

Lcao

L",L£,l

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

..thULS
•
.------~------.
• A~¥ •• X.
~lt
•

..

•

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

..

tuLLUnlNb
,,,Ult,

..

•

•

~TMT

*

CG222

• *x*•••
*
4.4.
*••• •
•
•YE!)•
*NU

[1'1 10KI:N
LlH elSE? •

•

..

•

V
*••••••••••••••

lll40

•••• •
•• •
X u;l •
•

*•••I '

••

•..

L~~=ELSE

••
..

•

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

••••i ........_ ...
.....
.....
..
.... .......
. .. ..
~L~:,

..
• Hb •• X.

PTK:PTK+l

•••• A CO.

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

48

Chart 3.

Controller (Page 2 of 6)

v
CC300
• ••
*YES ••••
•
.. * STATEMEI'IT? •* •• 041*•..
••••
•
•
*

AS~[GI'INENT

*X

0

• *NO
•

CC300
• • • • • YES •,•••
IF UNIT • ot

•• PkOC Llll ••
•••••••••••••••

-

.

.------------:
G~Ir~~NT:
•••••••••••••••

·

-

V

v
•••••••••••••••
-SBLPRC
•

~

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

-

•• ••

,·SCUEG

• ns

• Uf'IlI.. I..H

•

~
.X •••••••••••••••••

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

:

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

"'Yl!t.

•

v
1:CS.a
• ••
•
.NO
•••
•
• •• tSS-ON? •• .X•• C6.••
••
• •••
• • •YES•

• fOR C;UIIIIENT •

•

(.

1111 I III I

.......
2.......•
•

..

l..(.~"""..

.".=-- :
.

r*.
•••••..............•

.......... ~O •• ..-oN -R1In&TOI •
•• •
•
•

• YES

v
................
•• ",AIL"
•

•

.. ..,

•

ttJOO
• • • • >YES ••••
•
• ox• 0" ••
• nm=~m • • : ••1·
•• • •
0

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

• "0

~

••

..

V

CCHit

•••••••••••••••
_HilT
•

••••••••••••••••
•••
_-----------.
uEN •
* ............... •A: "'~~f=:JUk : •.•••••••• ·oC5. ••••.-------------*
..
.
•
•••••••••••••••••
•
•••••••••••••••
• • •Ii'"
•

·......

.

·SAC~EN

ASSI~N

>
0

.••••••••••••••• x..
CCHO

Ll.ltO~

0
0

••

• OfH ••••
.X AO •..
?
• .
• ••••
Nu

•
••••
• ••
·L6 *'
• •

- -

..-

0

TUlI.lN .. lJt.l

--_

0

I)U~.

•

• .YES •••
o • •
.X n.
WANTED
• • •

...

- - .. •

V0

.

V
...............
.ERROR
•

CC575

.-------------*
:SEE t8W1MTNG:

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

• NO

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

. .••••. 2•••••••

••••
•••• •• 1::~~~-----~-:
:!!~~~-------:
• 82 •• :Hl:
'DBS Z TdL. : ••••••••••••••••• X:~ENT~?25sFRON:
• It·
•••...............•
•..............•
••••

•• J(

.

TLLEGAL
ASSE"8lEfl f2

ON-UN IT NUll

V

CCI~O

•••••••••••••••• ••••
•••
• • 86 ••
••••
k~~rr

TI~L~

. ....

..•••••••••••••••
-

Chart 3.

-

• >ves •tC300
• .X••••
0" •
lijm 'IN?
• •••••
I·
•
•
• • •"10•

••

Controller (Page 3 of 6)

SWITCH

•

~

•

I-

y

..
eClon

•• ••••••••••••••• • •••
.-----------_..
• PROt £ND Of •••• o••
'E~nu~

~

n~
• • 1.
••• ••••••••••••••
• ••••

PL/.

4

~YSTeMS MANUA~

itNT
L.VtO\l

•
•••
•.Au •• • •
* • ••
•••
•

•

•

..

·.
.*
......
.
•••••••••••••••
t.t440

• >YES

~lk~T
t:A~".aNUI

•• ••

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

• • •••••••••
.'
••

~O

•

•• At

b~'

•

•

~CYWUKU

CUDt

~u

v
•••••••••••••••

;
..................

•

..

•..

tit:h Loic.N\."

•••.... "-

.....

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

• t'A~J ul:l.L '\NU*
tAU", L. h~tI..) !N •
.. r"ulL.LlUL
..

••

·

~

.

• A•••••••••••••••••
l. ... 'tu~

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

.. PfH. + 1 •

~

•••••
".;t*"' ........ .t
• _____________

.•

•• l.JtLvl\

..

•..

..• .•

.hi ..

uti' ..

.. L Lt..l "'H.

HilS)

•••• •

•• 4 .. "" •• "'.,. • • • • •

[KtC.-hU?

••

..
••

.........

• •VE~
•

.•

AI .. ~

• ••
.""
I KtALI"

u~N~~All~

",,",L (,t..h

..

IN
1

.

v
..............
.
•
•

... tN! RAft ~IIIU •
• Uf PR~OIiUL •

•••••••••

• tUR (;URII~NT •

..

•
bLOCK
•
•••••••••••••••

• • •n~•

v

;

•••••••••••••••••••
•
flKSI
•

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

*--T-------.
• • 1\'t.",L

..

*vLi''-K''l L trit. ..

..

•

\ow"L

t..xEC·Yt~

..

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

•

• • • • • • • • • 11-4 ••••

·.x.................. ...

·•x•••••••••••••••••.

••
•

· ..

. . ....

.

•

.•••
. .•...............•
tC"'I>~

.•••••••••••••••-

• 'X• 1J6••

..

..

V

t.t.4~2

't150
.... t:~ •• e •

...
..

I-

•

.. Nu

..

dKANtH UN

•

TUlIc" rv~t •

· ..

;

*nOGN

.cs ......-----~-------.
su fUt.lowIHG-

•

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

•
••

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

-*

•

..

NOTE

•

..,-",,,0

~CJ90

• •• t5
• TOl\ct. • *A••••
•
C!II'
•
• • IYPc-f,,"U1 • • ••••
•
•

••••
•• •x t6 ••
•

l•

••••

• • NU
•

..........•....
.
.............
.
·
.--------..
.
.
. ..=...tl.'.
•
.. •
• •...•..•••••...•:
: .•....•••..
·
.
.
...
.
••
...............
.............•.
• -,....
••
•• ••

CCU2

'Yt~

(;U90

-S8eGIN.

•••

Gf~il'OA

JURtN

npf·II~"I'"

·

•

jkJ

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

··
··

11,11\lfl • tI rote ..

so

• •••••••••••••It

*

....•.......":......
....
•

• ttll

Chart 3.

Controller (Page 4 of 6)

• ...

:D7: •• X:FIRSTN~XEC. -: •••

Ct4""
•• ••
-tAPRt.
• ••
•
...---------.
fOllI'"
•
......................
X:
~:f~:ml
:
.....
:
01:
• •• "l't-I'
• • ...11.1• •
•
• •••
"
• •
.Yl~

•

••
~

CUM

•·SAlPqC

••

*oa ••• x*
•

•

•

...

...

LAdEl

P.tI;CES50Oll

CC500

•

•••• X 80 •

*

*

5.

•

I'Ll I SYSTEMS MANUAL

tl.l.T

•
•• • •

·•••
... A:.------------.:....••••.
~~¥:............

••

.M.ALL

:A~:

•

~~Nt~~~~K

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

C~S9a

• ...

~ t~ ••

·....
. .-.-----------. . .
. ....
~t~!~............

••

'.bkhti

'Al~

•

..

•

•

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

LCJ~O

• s*

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

~~~l~

••

...

CC504

••••
.00
• A AO 0

UO 1

• o •Nd

•

•

o

•

••••

•••
'X AO*
• ••• 0
•

..

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

o

\.~il'"

~lUP

o

•

• •••
•••• ~ Lu ..

.-------------* . •
..,l ... l ... ATIJI< •
••••••••••••••••••
• •• •••

t.~~ •••
..
X.
•
II..

• • •NJ
•

0

•

••

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

fw(..:.t,,6t

*'wKLT

· .

~

•

•

•

•

•

*-------------.•••• .X . *
uLNtkAtu~
•
.~.
................• "V4

• A~ ••• ~.
•
•
•

~,"lUkh

0

AI 0 0

•
00
••••

• TYPE-RETURN?

•

••

•

•

• o 110
••

·.

~ .... ~Q9

••

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

..

•
•
vLI'4LkA TU" •
•
•••
•••••••••••••••• ••••

••

o

• •••

~~=i~............
·.tLu~~
*-____________
•

'A6* •• X'
• •
•

~L~~L

~LNLkAIO"

~LJ9U

•*••• e

•••• X

~~

•••••••••••••••••••• •• •••3'

•

•
•

•

o

• .'"• .12 ••

•
•

• ••••
• 0*

m8Nl~y8UG

•o

•

o
o

•*

•

•••••

•

•• ~

A~ ••

••••

NO

•

•
••
•

C('509
0

*YSS •••••

o. A5'

• • •••••

•N.J

••

• .YES

•

· .. · .X A6.

NO

~'~I"
"l:~

•••

•
ex

•

A'.

• •••• •
••

tt515

•••
• •• TYPl~H~SE? •• • •
•••
•• ••
•

o

•

••••

Nli

0

•

0

"'~!>1-4:

•

•
•

AI •0

.0.

o

''(e)

TY~~~M~U1

•

j.

...

•

/',LI

•• ••

L~J~u

*$OPEN
•
• •••
.----------~-.
*A!JI ••• A.
t,.Pt.'"
•• .... l.bo

•

• OK
•

•

• •
•• •••6'

CC5Z8
• ••
• TUKEN
.YES ••••
•••

C~510

·Yt~

••

•• •

•

•

Ce'lZ4
• • • • 'YES •••
•
• • TOKEII • 'X• Alt.•

••••

ox•

•

~n

•••

'YES ••••
.X AS •

• •0

•

• ••

Ll..l90

• •••

• •

TOKEII

• NU

••

•

TYPf.-I:LSE?

tC~08
'Yl:~

TO~tN

IYP[·"H?

j*

••

o

• 110

$$

'.L~IUY

bO

0

••

•

•
••

'Y~~

TUHN TY?l -

LLj~~

• •••
•••• A ~Q

l. .... ~lb

••

•

••

••

•

..~~Ul

• ~ X.*-------------.
• ..
vut
•
..
..
ut."Lk14tOK.'
•
•••
•
•
••••••••••••••• •••
.~&

• ·110
••

• •••

•• X- wLl "'-I'4tKAtOH.* ••• X ("b •

•

tC!60

CC5S0

TUKtN TYPE.
OTHER

·-

••••
..X AT •• •••6_

• • • • .ytS ••••
• .x• AJ••
TOKEN
• • o'
• • • • e ....

IYP~-K~VERr1

•

• NU

•
• ••

•

o

• ••

...
.
• • •

eYE::.

•••

OK AJ'

•
• 'NO
••

·

•

.

•••

CL~lO
.YE~

••••

• 'A• '
....>

<
..,,<

~

S

>=
=
~

<=
-.:=

(
)

·•·

·
·, -

(The blank delimiter is not needed after the entokening process;
therefore, it is not represented in the list of delimiters for which
token table entries are made.)
Constants are of three types: character-string, fixed-decimal, and
floating-decimal. Since comments are not significant syntactic units,
they are skipped during entokening.
Whenever an identifier token is formed, a search is made of the
dictionary name list (N list) to determine whether a name entry is
present for that token. If none is present, an entry is created.
The token type and a pointer to the name entry for the token are then
added to the token table.
Whenever a constant token is formed, a constant attribute entry is
created which contains a pointer to the name and the attributes
determined during entokening.
Each non-left parenthesis token contains a priority indicator which
is a combination of the parenthesis count and the normal priority of
the operator.
The Entoken routine balances parentheses by maintaining a push-down
(last in, first out) list of all unbalanced left parentheses. Whenever
a right parenthesis occurs, the top left parenthesis is removed from
the list and its token in the token table is made to point to the right
parenthesis. This list is kept in the unbalanced left parenthesis
56

tokens. The left parenthesis token at the head of this list is pointed
to by ATLPRN (see ·Local variables·). The unbalanced left parenthesis
tokens are chained together by pointers within the tokens.
Upon adding a semicolon token to the token table, the entokening of
one statement is complete. The Entoken routine returns to the CALL/36oos PL/I Controller.
Errors Detected
EXTRA 1)1, IGNORED. (5)
I I I I
NOT SUPPORTED--CBANGED TO • I '.. ( 6)
IDENTIFIER TRUNCATED TO 8 CHARS. (1)
EXPONENT MISSING. (8)
CONSTANT NOT SUPPORTED--DECIMAL USED. (9)
DELIMITER OR SEPARATOR MUST FOLLOW CONST.ANT. (10)
BIT STRINGS NOT SUPPORTED--CBARACTER USED. (11)
I
NOT SUPPORTED--BLANK ASSUMED. (12)
•F SUPPLIED BEFORE I J I . (13)
•
'ILLEGAL DELIMITER--IGNORED. (14)
INCOMPLETE COMMENT OR CHARACTER STRING CONSTANT. (103)
LINE NUMBER NOT FOLLOWED BY BLANK. (106)
STRING TOO LONG--FIRST 255 USED. (115)
Local Variables
ATLPRN
ATCLNT
ATCMMA
ATNMLG

Last Unbalanced Left Parenthesis
Parenthesis Depth Count
Comma Count for Current Parenthesis Set
Length of Identifier

Program Interface
Entry Points
$ATRN.

No formal parameters.

$ATKN2. No formal parameters.
Used for initial entry only.

Entokens one statement.
Entokens one statement.

Exit Conditions
Normal exit only.

One statement entokened.

Routines Called
$FNB
$FIND
$ASIDX
$SVC
$XERR

$WEXP
$WCTCT

Get Non-Blank
Search-Insert
Increment Scan Index
SVC Director
Error Message Editor
Segment Management
Segment Management

51

Global Variables
N List
T Table
$PTR
$SCNX
$CBRFG
$TAREA
$LLINE
$TSOFF
$PSCRT
$TSOFF+4

Dictionary Name List
Token Table
Token Table Pointer
Scan Index
Building Character String SWitch
Trans1ate Area
Last Line Number Painter
Address of Byte within Source Line
Scratch Adcon Pair
Address of Beginning of Source Line

comments
Each translate for a certain type of character advances scan index to
that character.
Logic Diagram
Chart 6 shows the detailed logic diagram for the Entoken routine.

5&

TITLE:

SEARCH-INSERT ($FIND)

Program Definition
Purpose and Usage
Using an EBCDIC character supplied as input, Search-Insert searches
the dictionary name list (N list) for the presence of an entry for
the identifier and, if one is present, returns a pointer to it. If
no dictionary name entry is present, one is created and inserted.
Description
Each entry in the dictionary hash table points to the head of the list
of dictionary name entries which hash to this location. This list
is maintained in sorted order, from low to high, with one- through
four-character items appearing before all five- through eight-character
items.
The EBCDIC form of the identifier is hashed to obtain an index to the
dictionary hash table (H table). A pointer L (for last entry) is set
to point to this location in the hash table. An index P is set to
the contents of this hash table location or the location of the first
dictionary name entry in the list. This will be zero if there are
no items in the list.
The hash algorithm consists of taking the first four characters of
the identifier, padded with blanks if necessary, and dividing by a
constant. The remainder is used as an index into the hash table.
If an identifier is equal to the one in the name entry pointed to by
P, it is assumed to be the required identifier. If the identifier
is less than the name entry, a new entry is created and placed in the
list between Land P. If the identifier is greater than the name
entry, L is set to P, and P is advanced to the next entry. If P points
to the name entry, the entire list has been searched and a new entry
is inserted after L. Otherwise, the process continues as before.
This method of searching creates ordered name lists for faster
searching.
Errors Detected
None
Local Variables
FINME

Name to be Searched

Program Interface
Entry Points
$FIND. Needs an identifier for which to search.
in characters. P3 has its address.

G6 bas its length

Exit Conditions
Normal exit only.
entry.

Returns a pointer in GO to the dictionary name

Routines Called
None

59

Global Variables
H Table
N List

Dictionary Hash Table
Dictionary Name List

Logic Diagram
Chart 1 shows the detailed logic diagram for the Search-Insert
routine.

IOn

TITLE:

GET NOH-BLANK ($FNB)

program Definition
Purpose and Usaqe
Get Non-Blank is used to advance the scan index to the next non-blank
character in the source proqram. Durinq this process, it skips blanks
and comments.
Description
A search is made for the next non-blank character in the current source
line. If it is a new line character, Increment Scan Index is called
to advance to the next line, where the search continues.
If the next non-blank character is a slash, a check for a comment must
Upon exit from this
routine, scan index is pointing to the next non-blank, non-new-line
character in the source program.
be made and, if present, the comment skipped.

Errors Detected
INCOMPLETE COMMENT OR CHARACTER STRING CONSTANT. (103)
Local variables
None
Program Interface
Entry Points
Nonstandard entry.
$FNB.

Cl return, C2 entry.

NO formal parameters.

Scan index in P5.

Exit Conditions
Normal exit only.

Scan index in P5.

G2 destroyed.

Routines called
$ASIDX
$XERR

Increment Scan Index
Error Message Editor

Global Variables
$TAREA

Translate Area

Logic Diagram
Chart 8 shows the detailed logic diagram for the Get Non-Blank routine.

61

PART 2 LOGIC DIAGRAMS

The detailed logic diagrams for the routines that perform entokening
follow.
PLII SYSTEMS MANUAL

SASIDX

..

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

··.... .. .
•

··......

..
*-NO
.. SCAfi INDEX -) ..

SOURC.E = NEW
..
lINt:?"

tAl·X

•........

4r()O.X

'AstDX

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

*oo ................ X*AOO
:

·

..
..

..

'fES

" ..
·...............
.·..............
,.

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

C.. A~G[
CI-'APACfEP.,
POSt TlO"l

•

1 10 SCAN*- .................. X*HFTURN
INDEx
:
. . . . . . . . . . . . . . . ..

•
•

..

•

/I

.. YES

ASOtO

.

• YES

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

ANOTHER LINE
LEFT?

"

··...... . .
Asaso

*'3*,l(

x

•••

• )( A'l*

COMPlllTlnN
COMPLETE?

·

•

_

.N2

• V~S .......

•

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

• C2* • • )(.
..

SFT SCAN
•
_INDEX Tn EflF "

..

·

*x

lA'iT TUICFN

0.
.. .....

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

•

SRANCH ON

..

•

TFRlUNAT&

..

CMAR.

•

•

TUNSLATE

"

• •0

NO

COMPILATION
.... tOMPLE TE"O?

·

•

.. YFS

~

-CREAn DUMJI1Y ..

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

• EN!;) STATEMENT*.. 6. SET SCAN ..

PfR.

..

·..................
.·..............
y

NEW LINE
TOkEN

.
~p

v *••••
• •••••••••

• f-ORGFT LAST.

•
•

•

v
..............
.

NEW U""E1

NO

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

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

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

• YFS
oo . . .

•

ASOfiO

:11: •••••••••••••••• :

v

o\SOOjO

..

RfTlJJtN

•
•

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

."(

·:...............
.
7§~i!~ ~!E :
...............

..
··.... ..

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

..

45011
..

*-YES

.. END Of SOURCE ..

PREViOUSLy· ••••••••

REACHED?-

·

•

.""

.......
i ...........
*FkROR
*-----------*
PROGRAM
•

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

., INCW.PtETE
..
'&-5

..
..

v
·......•..•.•.•.
.:
·................
nos AND
:~~A~E:w~l~=
_SET

..

·• x ................. ...

•
................
:

.....•.........
RETUMN

Chart 5.
62

V

L tHE TOKEN-

4SMa

II!)".),

•

V

·

v ".....
.*" .....

:

"

• ... s

:
f-f)~(~StNG :
• LINE- NUMfIIFR •

•

..-

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

.
,p,

•

..

"06 ••• lf*Skr p 10 F'IR5Y •••• '# f)f"
•
•
•
NiJN-9! lI.~"
•
•
0\-

;

y

.ViC;; ........
.. ...r\::K~~~2~s '" .! f}';!

. ...
.
·
.""
-

.............•.
·.................. ...
y

___________ ••
•4- •• • ••X Cl8.••
• ••••
••
• ••

•
••

• NO

.••••
.

V

ATlOO

.66

•

• I SCN "IOXI

•

•

•

•

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

•

ATit8"
• • • • .YES ••••

· . ...

• •• SOURCE • "'? • .X• ••
••
• ••••
• • •NO•
D~

AH80
• • • • .YES ••••
• SOURCe I.'? ••
.X 08 ••
••
• • • • • ••••

•

:z

•

•

• • • • eYES

orOKEN START

•

=.

••

SI-AN I NOtX •
••••••••••••••••
•

v
...............
•

•

e

:• p~mYWJ,:
UNE',.
••••••••••••••••
•
v
•e•••••••••••••••
8RAfIICH ....IN •
•
• StAN I!'iDEX
SOURC~

••

••

• • •NU

• ••
:z

• ••• •

•

••• •

• ••

•

••

•

• • •
••••

• YES ••••

• C6••
:'1 • .K
•
4.
• • ••••

• • • • eVfS

SOURCE = CAP

OR SMAll

• • ALPHA • •
••
• NO

AT520

••••

AT560
e • • •
.YES ••••
•
• •• SOURCE ? ,<, -• . ••. Cl8-••
••
• ••••
• • NU
••
:z

UltRO
• ••
•••
.YIS : ••••
SOURCE • ,-"
.X 08 •
•
• ••••
• •
•e

. . ...

·

• "'0

• • • • .YES

• ••

•
snuRtF •

••
e

AT640

•
.YES ••••
SOll+tCE • '.'1
.X 01 •
•
8·

• • SOURCE
•• •
• NO

-> •••• X co.

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

•• ••

Ij*

• •• SOURce. '.'? •• .X•• 811.••
••
• ••••
• ••

• NO

v
•••••••••••••••
••
••

•

• NO

Ar600

• .YES ••••
• •e SOURce. '.'7 • .X•• C68·••
••
• ••••
• ••

••••••••••••••••
.-------------.
•• x.SET
NON-BLANKO
.'fN~

•

...:..
.....

•

• "'0

v
• ••
•
.YES
•

v

•••

.-......

U500

•

•••••••••••••••••
• NUlldE" AND

• • • • .YES

• •• SOURCE '.'7 • .X• 085. •
••
• ••••
• • •NO•

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

• I!'iSERT Nt"
• L1!'iE TOKtN

.X 05 •

• • •NO

v
•••••••••••••••••
•
11'11 JlALI ZE •

AHOO

••• •
•

.YES ••••

7

.

V

•

SOURCE • 'OR'

••

v
•••••••••••••••••
•
CALCULA Tt •
• ADDRess Uf •
•
SOURce
•..............••

v

·

fLG Off

Anoo

• .?~.

· -• ..!i.
•
-• • • • • • ••••••
•

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

•

••••••••••••••••
•
• INnlAlIlt •
•
LU(;AL
•
•
VARIAdUS •
•••••••••••••••••

•••••••••••••••
•
•$:
•

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

• CHAR SUING.

•

St40IlENJS
••••••••••••••••
••

••

AT400
• •• •
. Al •
:00:-. '=L- • -: ....
•4OC8ea
_ . . . . S8IIRCE
. . .« •••• .U·
•
•• •
•• ••
-NO
• NO

v

~KEt

•

•

•
•.... - •

•
• NO

••

• • •
••••

•• ••

•
SOURtf.

•
••

,,'?

U480

••••
ex 08 •
• • 5·

AT62~

.VES ••••
= '.'1 ex tl •

•• •
•
9.
••••
•• ••
e NO
•

••

•
• •• SOURCF
•

e
s

• .rES
';"

•• ••
• ~o

AT680

••••

••
ex Rl ••
•• •••q.

AT200

AT6f>O

••••
* ex• Bl ••
• • 2.

••••
..x• C4 •*
••••

••••

•••

SOUQCE
OTMfR

· ...

••

•••••••••• X. DO-

Chart 6.

Entoken (Page 1 of 9)

•••••

63

~L/I

SYSTEMS MANUAL

SAlKN , UlKNl

INTER,.AL
ROUTINE AT225

ALPHA

AllOO

•••

•

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

•.. •••••••••••••••
•..
ENTER
• ••••••••••••••• •

.TRANSLATE fOR.

..

..

BLANK

•

RlNU:
:Sl
•.• X:• oe rmm
n.
NEW LINE
•
•••••••••••••••

••

• ..

v
••••••••••••••••
•
• SET POINTER *
fNO Of *
*
*• TOSEGMENT
•••••••••••••••••

• ••
"YES
<

LENGTH

'i 1

• •......•.

OR =

.. • .

.
•

.. NU

.. •
•

ATZT5

•

V

Ht.AL

.

KtYWORD?

•

AT 280

•
NO

v

• .YES •••
• OX• AT.•
. .... •
•

•••••••••••••••
•• OBTAIN NEW •..*

.

..'TOKEN

.

SEGMHn*

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

v
••• ••••••••••••••
•
INITIALIZE •
•
FOR NEW
..
•
SEGMENT
•
•
•

Y

•••••••••••••••
*ERHOK
..
*-----------*
•
IUENT! F IFR •

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

·

• TUO LUNG J7 •

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

·

.

• X •••••••••••••••••

A1205

V

v
•• •••••••••••••••
RETURN
• •••••••••••••••

••••••••••••••••
'f INO
•

*------------*
• P"Tlf INO 10 •

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

IN DICI

..

·•••••••i•••••••..
.. WNSTRU~T
TOKE~ fUR
•
• IUENTI~IER

J'

•
•
•

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

...

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

41220
Y
•..••••••••••••••
.
..
...AI ..••• X-•••••••••••••••
.
..
..
.
1U ••••••••••••• 67 •• X.PLjtE NUOt IN.
•
•
t
..
..

....•••••••••••••••
.~

CHA~~l

VwUttU (.1.,hJf: ..

..

..

.. TOKEN t.l S T

..

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

• •
..
•

..

•• •NU

•

.-------------* .. ..
•
*' • i .
•
• ••••
•••••••••••••••

•

SEbM~T

•••• *'

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

8~

•

•
I·
••••
ATiOO

64

Chart 6.

ATIOO

*YtS
*IR-AT225"
••••
TA8LE FULL?
••••••••••••••• x. 6fT ANOTHER •••• ~ 86 •

Entoken (Page 2 of 9)

Pl/l SYSTEMS MANUAL
SArKN , SATKN2·

..

NUMEKlt

.....
•

.

*Al •• X.PERIOO. dL~K,.
• •
• ALPHA. OP & •
•••
•
h~ LIN
•

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

.

SPA';~
C.UN~ TA'I1

oFLR

0

.........

o
o

.

SOU~LE

•

..

PERIOD 1

.......... .
NW.

•

•

. ..

o

•.

"

•

·""
"

. ..

* ••••••••

*------------•

.. ..

I

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

AT332

...............•
.ERROR
.-___________
*

• YES

L?

• SOURCE
•
0

..
.•
0

c

B OR

v ..

0

41352

'II

• •• ..

* ................ X·"ONOTCONS
TYPE •••• XC"'.
IHPLE ' 9 .
•
•

•

• NC

.

, • ........
•
.YES

=

••

1

~O

••

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

•

e

•

..X C3 • •

..

•••••••• "•• ** ••••

•

0

Ii

.~.j;

11' . . . . . . . . . . . . ..

"..•

L'CSTA!~

·

y

••

....
....

.. NO

.'

•.

..

. . . . . . . . . . fI • • • • • •

•

SCA~ INOEX = •
.SCAN INOH ••

..... ".........
•

..

C) •••

.

.

OR
•
0
0
•••• x 80 ..
*SIT INTO CO&E*
.. 4*

I~
X.EXPON~NTATIO~

..

V
••••••••••••••
*

• (,oET "'f'iDIHt:"- ..
•

UTHER

••

~

~t:~MtNT

•• x

SOURCE

.

o

* ••••

• .tt .. I1 ............

SOUR:e-n

A132~

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

"'k-AI12'
..

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

AT335

.. ••••••••••••••• o..

0

·YES

• SOURCE

0

ovtS

• •

.. .

NO

"

-~

v

.YES

0

ATTKI.UTf

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

y

Y

OUdTAI"

o

o

*to... KoStAN INOEX

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

v

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

•

••••••••••••••••
•••
•
•
BRANtH ON' •
o •
•
SOURtE
•
•••
•

•

0
•
•

• "YES
•
.. • " SOURCE
=
ALPHA?
•
• • .. .. "
• NO

TRANHT FOR 0

·
....,

TEST StAN
INOEK ->
SOUIItE

••

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

•

0

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

AHOO

"

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

• •
0
oao
••• xo0
o •

"..

ATTK I B~.ITi:

•

..

.... U.Jf:

•

• • • ~ . . . . . . . . Jl:I"I • •

·•x•••••••••

·.•

:0 • • • • •

""j:O
~
• • • • • • • • • • • • • -11)
~E!

)l\.tlt:TA~

HT~I~JhS
~

Ii

.

•

..

PtU:",l~luN

...

•••• X au.

·

..

•

•

*

15;0>1 •

01 HO

V

•

TEH SCAN

=.. .. ....

....... r;r*V........

ATH2

....

~.,

. ....

.. •
.S:A~ (~~~X
.C6 ••• ~.S~AN INJEx ••••• X C3 ..

..

•

............
•
*•.:;...0

•

~~f~Kc

il':'Kluu AS

P)(~C

AND SCA .. c

•

~~.

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

• UI~ITS

....

.
0

*SH

..

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

.

• J( • • • • • • • • • • • • • ~ • • •

•

..

~.

• U~E NUM6ck

·

.

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

..•..

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

•
•

~

...

1

...

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

4.

• • • • • • • • • • • • • • 111

•

••• •

..

l"'O~X

->

SUU~CE

.

•

y

..

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

•

v

oYES •••
•
• *JC• co.•
ALPHA?
• •
• ,.
• • •••
SOURC~

~

•

• NO

~OUR(;E

OTHER

'::h.art 6.

=

••••
.. "

•• X :3 •

Entoken (Page 3 of 9)

••••
•

4•

65

PL/I SYSTEAS AANUAL
SUKN , SUKNZ

..... .........
~

••••
•.80••• X.• SKIP PAST •••
• •
.PLUS OR AINUS.
••••
•

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

v
••••••••••••••••
•
•
JEST SUN •
• INDEX ->
•
•
SOURCE
•...............••

BIIANCH TAKEN
IF SOURCE.
OTHER

··
ii

•••••••••••••••
• • • • .NO
*ERROR
•
•
.-------.
• *................... ":'8
S~TrOVE :
• •• SOURCE
DIGIT ?
•
•
••
••
•
• •
a

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

w ..

• YES

v
...............
•

v

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

••••
• * -

SET ADDRESS •
:C3••• X: ~T~~i~t~T :

~KIP PAST
•*
••• UPONENJ
*
••••••••••••••••*

•••

•

ENTRY

v

•••••••••••••••
•• SEJ FLOAT •**
•
FLAG
•
•••••••••••••••

.

-

*

*

v

•

•

• ••

•

•*

•

• .n\

SCAN INDEX -> •
SOURCE
aELIMIJER OR •
•
SEP?
•

..........

•• ••
• NO

v
...............

••

*NO
*
*
*
PKHISION > 6
*
*
*
*
*
*
YES

•

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

_ERROR

•

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

•.•......

• ILLEG CHAM •
• AFT CNST 10 *

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

••

:X ................ :
v
•••••••••••••••

v :
:.............

:...
•• *

*

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

•

*

DUPLICAT~

•• C6 •••• ATTRI8S. FOP.
tnNSTANT
•
•••• *• CONVERSION
*

*SET LONG SIT *

•••

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

·

.

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

•

•

•

•

ii

*

*NO

•••

• • •

• • IMAbINARV? • • .X••••C3*•
* •• •
• yeS

••••

••

.............. xe
•

C~

1·

•• ••

• *PREmm
*

••

•

•

*
NG

AT2l0
·YE~

I ..

•

*

••••••

• .X 87 •
* • 2·
••••

••••
ATlSa
V

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

••• HAKE

AT220

••••••

HAXfMUM •••• X 87 •
PRtoCISION •
* 2.
••••••••••••••••
• ••••

•

66

Chart 6.

Entoken (Page 4 of 9)

PL/I SYSTEMS MANUAL
SUKNZ

5

SA n:N ,

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

.

..

AT"'OO

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

•

••••
..

•-SI-••
- X.-

-AI •• X-S'A~ INOkX ~ • _StAN I~OkX +1.

BRANtH ON
JRANSlATE
r.~:mm

U~IO

•-

•••• :•••••••••••••••:

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

••

••

•

•••
.YES
- • - SCANJNDEX.
.t1-X
1 -> DUReE A - ••••••••••••••••••••••••
• - • • • Q TE? • -

-- --NO

v
•••••••••••••••

•

•

-.

••

.UIHAI~ SPALl.
*ruk ATTKIIiUTE.
* NODt.
*

•

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

AHIO

v
*--------.

-

LUUNT

.

tHARAtTER =
NEil LINE

•

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

v
................
•-• loll lolIELETAL *•*
ATTRIIiUTES •
•••••••••••••••••
•

•••••••••••••••••
SU 8UILOlNG •
•
• tHARACTER •
•
FUIr. ON
••••••••••••••••••

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

v
•••••••••••••••
• USIOX
•

•

•

..
.TKAN;LATt. fOR_

-

•

" 5 ••• x.wUOTE UI<

•

v

V

_

...
* •.• Ii,_

v
.•••••••••••••••
..
-ADO Ih

L~~bTH.

.. f-Ok ~AH.T uF
•
$1,""'\1
..

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

v
.-.............
.=•.
·..............-.

..

...

X
..

..
..

2

•

•

BLANK

.

·.

V

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

.SCAN INDEX + •
-I -> SOURCE

.

AH02

..

•••

...

.SET EMBEDDED •••• X 0\5• QUOTE FLAG.
•
•

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

•

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

.---------*
:
INi~D~~AN :
•................•

NEil -

....•••••••••••••••..
LINE

-

-

•-STRNGS
NO 81T
AllND ••
III
•

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

AT40t

.SCAN INDEX • •
-SCAN INDEX + •

v
•••••••••••••••••
.ADD TO COUNT •
FOR QUIITE ••• ••••••••••••••
•

•_ERROR
•••••••••••••••

.STRIN" LEN(;TH.

.......i.......

. -•
••••••••••••••••

- YES

v

-

-

-• - .• • -

•• ••
- NQ

••••••••••••••••
• INIT IALIlE ••

·

V

• • • ·NO
•
INO~X.
•
I ->.19¥ CE A * ..•••...
• •- S~AN

.*05 •

•

• SCAN INDEX +
I -> SOURCE

• AN OR

•

v
••••••••••••••••
•.SEJ
BUILDING • 'HARACTER •
FLAG OFF
•••••••••••••••••
••

.NO

SY"~OL?

_

•

* •.•••.••

n~

v

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

.ERROR
.------------*
•
NO
•

...............
.CONCATE'IH OP.

•

116

•

v
•••••••••••••••

AT402
• • • • .NO •••
• A5.•
OF SOURCE • .X
• •• ENDREACHED?
• • •
••
• •••

·1·.
-:sm I=CH : :
.•.............•.

•

·-

• YES

·• x•••••••••••••••••.
:x ................ :
vAT:~: ••••i.......
ar:1Z•••• i.......
.....•••••••••••••••.
:
:................. x:
! 82_·
••••
•
AT322

•_ERROR
-------------.-

•-

sm~p~m

•

•

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

•

CREATE
•
•_••• _
CHARACTER.
C~~f~T
: •••
TOKEN

•

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

• •••

AT480

- • •• X-HIERARCHY
OBTAIN OF -•
*08
• •
• OPERA TOP
•

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

·:................:....:...
Y

fi2~f~1V~1

4T220

8'*'.

NOD£
• • 2.
••••••••••••••••
• ••••

Chart 6.

Entoken (Page 5 of 9)

67

6

PL/I SYSfEMS MlMUAl
UTIIN , '''TKH2

ATl22

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

•••••
••

••

-ao • •• X-OUP
DATA OESC. , PRECISION •
•

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

*
••

*

v

*

"T2ZO

• • YES ••••
• .X• aT••

• STR1NG
• .VARIA LE 1 • • : ••l·
•

• _NU
•

-

V

U120
•*•*
*
• • • • .YES
.NO ••••
*
* *x• 81••
GR
• •• FIXED 1 • * ••...••••••• X •* PREtlSIDN
9 1
•
••
•
• • 2•
•
•
• • •NO
• • •YES

-

- ....

-

y

AT220
• • • • -NU ••••
•
GR • .X• &7 ••
• •• PREtlSlDN
15 1
• 2·
• • ••••
••
•
• •
YES

Y
...............
•
•

.

AT220

•••• ••X•••
•• SET TO 1!> _
81 ••
••
•• •••••z*
•••••••••••••••

V
107220
...............
•• ••••••
•
SET TO.,
•••• x 87 •
•
•• •• •••2...............

••

PL/I SYSTIIIS MMML
SAra. , SAhllZ

Ar~oo

••••••••••••••••
••••
• •
•
•
*Al •• xt
• •
•

•••

•

~ON~t~u~T

LEfT

PARENrHt~IS

rOKtN

•
•

•

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

AT520

•
•••
•·81 •• •
••••• •
•

•

••

T

..---------.
..............•

An25

•

:

••

v

• PUINTeR IN •
i.l:fT
•• PA~I:NTHESIS
••
•
TOKt:N
•

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

V

SEE

FO~~~ING

•
:

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

• YES

•••••••••••••••
• PUT rOKeN •

•• •••••••••••••••
•
ENTER
• ••••••••••••••• ••

.ERROR

• •••••••••••••• x-

ATiOO

AT220

•••••••••••••••
·IR-AT522
•
• •••
•*-------------*
•••• •
X 81 ••
•
•
••••••••••••••••
• •• •••2-

UTU RIGHT

PARE"';IGNOREO

••••
.. :• Bt.-•
••••

v
•••••••••••••••••

.GET TOP ENTRY.
:INs~m :~~EN:
REMOYE IT •
•• ••••••••••••••

v
•••••••••••••••
•: p:M~f~~~~S •:
• rOKt:N POINTER.
•••••••••••••••••

v
•••••••••••••••••••
• RESET tD"I!A •
COU"T
••• ••••••••••••••
••

v
•••••••••••••••••
••
1""RUSt
•
•
lEVEL
•
••••••••••••••••••

v
...............
••
•
• BUilD RIGHT ••
• PAREN TOKE.. •
•••••••••••••••••

•••••••••••••••
••• LeRU tUMMA •••
•• tUUNT ••
...............

y

v
••••••••••••••••
•• PUT IN lEFT •••
"PAREN
•••••••••••••••••
••

V
ATl20
•••••••••••••••••
• •.••• .
a.
INUEX + •••• X 87 •
•
1
• • 2.
•
• ••••
................

v
•••••••••••••••••
:• p2mm~ls:
lFVEt.
•
••••••••••••••••
•

PAKI:NrH(~IS

S~A~

.~LA~

INO~X

TOK~"

v
•• •••••••••••••••
•
RUIlAN
• ••••••••••••••• ••

Chart 6.

Entoken (Page 7 of 9)

69

PLII SYSTEItS IIAHUL

SATIt"'SARNZ

LESS 011 IOTA

A~5~O

••••

*

* • •

SCAN

•••

•

..

..

•

•

INO~X ~

••••••_ .._ .

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

'YES

•

..

..

•

-

ATS.8_"
....

• Al 1 -) SOURCE
• • • AN I • • ' ( ' OR • ••••••••••••••• X:S£T 2~~~ATOR : ••••••••• :

.•

->'7

•.

•

IoT480
.NO

.SEt FOI.LOIoIIIt6.
NOTt

*

-

-

• • -:

O~

-

1

•

-

SOURtE TO

•••• X 08 -

V

·

lhOtX

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

•

1

•

•

••
NO

••••

PERIOD TOKEN
ILleGAL IGNORlN5 112

ATIQO

•••••••••••••••• ••••
•-SCAN
INDEX

....

....

-01 •

V

AHOO

..••••••••••••••••
=.... .....
. ..
• SCAN INUEX ••••• X 86 £'A~

·ns ••• ..-•
INDEX + • •
1 -) SOURCE
.x Al •
N~ERIC7
• • 3.

··

:...............
~~2~lf :
: ...~.

U~

•StAN

v
...............
*ERROR
•
*----------*
:m
:8~~0I0I1N5:
•
•
..............

V
AT480
...............
: t~=t~ ~AN: :....

NOT UIIIAIIY.
NUT ALLUWeD

A1300

•••••

••
.
.
...
-•••- .• • •
.. .
.

SCAN INDEX.
1.~ f2V9CE

. ....

....

..•••••••••••••....x..•
",sao
V
...............
•
•
:DJa~::
................"

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

- •
:'1...

•_ _

• YES

.NO

v
...............
*£11_
•
*

•

PERIGO

=. . .

-StAN INDEX ••••• X 86 •

1.

1
• • I••• ••••••••••••••
• ••••

ASTERISK

.•

AT600.

.....

. eND

••••

..

....

A"'80

~~A~~~2~X.~1 • .: 08·.
. . . 5.

.. ....
'.'1
.....
•
:C6... •

•

• • •YES•
y

••••••••••••••••
• SCAN INDEX = •
..
• SCAN INDEX • •
•...............•

·1.

...............
..
.. ....
V

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

AT480

• tHANGE INDEX.
•
•
..
TO
•••• X 08 ..
• EXPONENTATION.
• 5_

....

PLII SystERS IWIIIAL

J

'ATK" , IA(KNi

AT680. • •
ATt£~............
AT480
•
• eYES
••••
•
• •••
•••
•
•
•
•
•
•
•
•
•• 81 •• • HlERARCHY • ••••••••• ::C1 ••• X: C R: iOUNT : ••• ~ D~••
••••• • • O?
••••••••••••••••••••• ••••
•• •••
.NO
~CREASE

y

.•-------.•
•••••••••••••••
·ERIIOR
•
• UNBAL PAREN •

•
UJ
•
...............

y

•••••••••••••••••
ADII NEC RIGHT •
•
• PAUN USNG IRe
•
AT225
••••••••••••••••••

OTHER

:X •••••••••••••••• :

..

¥
•••••••••••••••

AT690

••

••

AT660

•••

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

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

.......
i.......•
•
•

:

SAr~D~~AN

V

AHOD

z. • .

••••••••••••••••
• ••••
.SCAN INDEX
.SCAN INDEX + •••• X 86 •
•
1
• • 1••••••••••••••••• ••••

•

:

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

••

•

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

·ERROR
•
.-------------.

.C4 •• X.
IllEGAL
•
••
.OElINITER .14.

eADD Sel'lltillON.
• TUUN TO 1I ST.

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

•• ••
• NO

x:•

•••••••••••••••
RETURN

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

••
•

y

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

•
•••••••••••••••••
•
• !JIITAIN

MORE.

• SPAt:E FRON •
• SVUEM ISVCbl.

v

•• •••••••••••••••
••
EXIT
• •••••••••••••••
•

Chart 6.

Entoken (Page 9 of 9)

71

~"51E"~

Flil

.A"U~l

,FINe

•
••

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

•

'F 1M'
•
••••••••••••••• •

.......l •••••••

• =
•
,
mTU'H
~f=E:
•
... ASH LIST
,

•

FtI~TfR

p

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

o

• vrs
P

~Ull7

•
NO

•

••

•••

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

0

•
•••••
• •
:•
••••••••••••••••••••

•
• •• , ••••• :04••• ': O~I~Nhhgl'

••••••••••••• x:
o

• •••

•
••
•••••••••••• AC •

•

• • NO
•

•

2'

••••

.

v

•••••••••••••••
•••••
••
••
OC5 •••• C8TAIN SHO~T 0
••
• ~A"E NOOE •

......"........•

••••

v•o•••••••••••••••
•
!'O¥E '''''fd 0

:•

tT~'"

:...

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

v·

••••••••••••••••••••
:CI:
.. x!• m~IIUCE7~i8 :•
•
•
••••...............•

·

v

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

:'0

• 0..
NTH TO :
.C7 ••••• NE.! ENTMY • •
•

••

p

•

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

y

•••••••••••••••
a HUKill
•

•

:•
•

AOnR~SS

Of

~~=['"l~MS

:, ...........•..•••:

Pf.I'ITEa
•
•••••••••••••••

72

Chart 7.

Search Insert (Page 1 of 2)

• ••••••••••••••
METUR~

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

o
0
o

0

~

••• 0
C1:

•••

.L/I
IF

•••
••

....• •

o

ItA.IIAl

. .
. · .. .

fI!."C

• •••••••••••••••••••••••••••••••••••••••••••••• X • •

ons

.

• A", •

• •
•••

~VSTt~~

I~[

.",

• ..

•••••

o

UNG

IUEhT If N'.1

• )(
•

•

C~

••••I·

•

•

•

.. YES

•

• ~r.

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

JLt:NTU·Jfk
S~OM

..

T '1

•

v
••••••••••••••••
••••••••••••••••
•••
• Tr LCNl. •••••••••••••••el •••
• x.• NOCf: !\IMtE.•

•

~.!KIP

•

~A'-E

~CCE

•

*•e.............•

•

•

•

•

•

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

.. YES

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

.. . •

it

....•••••••••••••••....
• ,,-cet:-:

•

f..'ME.
..

o

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

..
•

*

.. -

•

•

* •

0
0

• ")••••
•
CI!.

• YES

•••• •

.. • •
NO

•

.V.f=S

•
·c·
•
•
* . • •NO •

.*

1= I Cfie:

v.

•
•
••

V

••••••••••••••••
••
to ••
•
Nf IT IIODf •
..•••••••••••••••

.

••••••••••••••• X. AQVANtE

*

• "VIS : ••••
•• C6 •
• • : ••£.
•
• • •NO

-)t'

.V
.
• **

•
• *• eND

•*

OF

*110

usn

...

•

• 'lES

...

• ••• ca·•
• •••••
*

....

••

••••••••••• : Of.*

••••

Ii

·.

• ••
.YES ••••
••
•
"••.
...
••
• •
1• •
••
•
••••
• " tiD
••

..

-.-

C~

~

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

fl090

Y

•••• ttUUIIfII P lIS ••
OCSO •••• NMe ENTity 0
• •
0
POlliTEtt
•
•••...............•
...

v
...............

••
••
• .tV.N(f fO 0
•
NUf I\otee
..
...............
*
*

•

..

•*
*

............... •
v

...............
IInu...

•

•

• • • • *"tS

.. •

..
.
•

•
.............
....
1(:
....

S,",ORf "CeE'

•

Chart 7.

• ,.0

••••••••

...
C

i ••

Search Insert (Page 2 of 2)

73

PL/I SYSTEMS MANUAL
.FNI

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

•• .FN8
•
• ............... •.
•x••••••••••• ~ ••••

...

v
•••••••••••••••

.
.TRANSLATE FOR.

.

....

• •
*Sl ••• X. NUN 8"~NK ,
• •
~
~S~ LINE
..

*

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

.......i .......

.*

.. ........

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

• Cl·X

FN030

•
•
RAN " OJ •
..
•• ,IIANI'
NAT
•
~

..

~f:RM

.

. ..

.

•

v
••••••••••••••• .
•
•........ ,.. ,x: RETUR"I ...

............_--

~AT

eTC
..
•• **tHAR
•••••••••••

v

. .. * • . .YES.. . ••*.
•
.. • hON-BLANK? .X.. el*.. •
.. •
• • *.*
.. • NO•

II •••••

.

.*• •••***2.*.*.*.
seAN
..
• INDEX-SCAN
•
INDEX+l

..

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

:x .•.•.•..•.......

...

V

FN037

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

*..

.

••
"TRANSLATE ••••
• C4* •• X. AND ACO NEW.
• •
•
LINE
..

NEW LINE

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

FNO.iO

V

•••••••••••••••*
.
:*-------------.
H·yM~AN : ......... .
-SASIOX

.

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

..*•.........It.•
. * • • • .YES..
.SASIOX
•
. .. NEw LINE? .. •.............. x:*-----.. -------*:
.
..
*
..
FN050

IN¥~o~it~

•*

*

• •
NO

•

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

• * • • .NO

.. " s6tRWl~'i~
•
••
• • •YES•
SCAN

• •.......

? •

v

••** •••••••
•*
SCAN

• •*** *
•••• x ~l.
•
* *

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

•

•

*

***

h

**"*****2****** _•

*£K~OR

*------------.
!comWH;\i:
•
•
*****.*********

v

** *•• ************
RFTttR.N

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

74

Chart 8.

Get Non-Blank

....

FN037

.NO

* .. •VE5

*.*.•

• INOEX=SCAN
..
Ir.OI:X+l

•

*. ENO OF SOU~Ci
* .. REACHED?

<-

• c.lt*•
,

11-'.(

*.*

PART 3 - GENERAL STATEMENT PROCESSORS.
CALL/360-0S PL/I general statement processors are described in this
subsection. The routines are discussed in alphabetic order. according
to their mnemonics. as shown below. Detailed logic diagrams for the
routines appear at the end of the subsection.
Assignment Generator ($ACGEN)
PROC Generator ($APRC. $APRC2)
BEGIN Generator ($BEGIN)
On-Unit specification Analyzer ($BONSA)
GO Generator ($BRNH. $BRNH2)
CALL Generator ($CALL)
IF Generator ($CIF)
ON Generator ($CON)
REVERT Generator ($CRVT)
STOP Generator ($CSTOP)
DO-Loop Triad Builder ($DEXP)
DO Generator ($DOG. $DOG2)
RETURN Generator ($DRET)
END Generator ($EDGN. $EDGN2)
Process End of ELSE ($ENDES)
Process End of ON ($ENDON)
Expander ($EXPND)
END Expand ($EYPND)

75

TITLE:

ASSIGNMENT GENERATOR ($ACGEN)

Program Definition
Purpose and Usage
The Assignment Generator prepares an assignment statement for analysis
by the Expression Processor Controller.
Description
The assignment symbol in the aSSignment statement is changed from an
ordinary equal sign to an assignment type equal. This allows the
Expression Processor Controller to translate the whole statement and
perform the assignment.
If the statement is an array assignment. the statement is expanded
and reprocessed by the Expression Processor Controller. Then the
expansion is terminated.
Errors Detected
ILLEGAL ASSIGNMENT STATEMENT. (15)

ERROR AT • ___•• (16)

Local Variables
None
Program Interface
Entry Points
$ACGEN. No formal parameters.
in statement.

Expects $PTR to pOint to first -token

Exit Conditions
Normal exit only.
Routines Called
$NEXP
$CERR
$EXPND
$EYPND
$XERR

Expression Processor Controller
Compiler Error
Expander
ERD Expand
Error Message Editor

Global Variables
T Table
$PTR

Token Table
Token Table Pointer

Logic Diagram
Chart 9 shows the detailed logic diagram for the Assignment Generator
routine.

76

Program Definition
~"-

Purpose and Usage
The PROC Generator analyzes the syntax, creates parameter declarations,
and generates triads for PROCEDURE statements.
Description
PRoe Generator checks to make sure that a label is present on the
PROCEDURE statement. If a parameter list is present, tentative default
attributes are created for the parameters. If RETURNS attributes are
specified, they are analyzed and used in creating these attributes.
If no RETURNS attributes are supplied, default attributes are created
using the procedure name.
The code generated for an internal procedure consists of a branch
around the procedure and the prologue code. Entries for the block
are made in both the program structure table and block information
table.
If the procedure is the external procedure, a second entry pOint is
used. This bypasses the main analysis, because the only information
pertinent to an external procedure is the possible presence of the
OPTIONS (MAIN) attribute.
Errors Detected
ERROR AT'
,
(16)
' __ I
WHERE ' , ' EXPECTED--SKIPPING TO '
(32)
LABEL MISSING. (46)
ILLEGAL RETURNS ATTRIBUTES, DEFAULT RETURNS ATTRIBUTES USED. (41)
ILLEGAL OPTION ON EXTERNAL PROCEDURE STATEMENT. (48)
MULTIPLE DECLARATION FOR ' __ '--TBIS DECLARATION USED. (56)
Local Variables
APBIT
APFIB
APTRD
APATT
APRET
APPRCT

Attribute Bit Mask
FIB Pointer
Dummy Name Token
Pointer to ENTRY Attribute
Pointer to RETURNS Attribute
Type of Procedure (0 = External)

Program Interface
Entry Points
$APRC. No formal parameters. Expects $PTR to point to token
following PROC. For internal procedures.
$APRC2. No formal parameters. Expects $PTR to point to token
following PROC. For external procedures.
Exit conditions
Normal exit only.

$PTR points to semicolon.

Routines Called
$ANClU:

Attribute Nods Creation

$A1!..~

A~~rih~te An~:~Bis

$:G':'R~"\D

Get Next Triad Entry
77

$BLPRC
$FIND
$WEXP

$XERR

Label Processor
Search-Insert
segment Management
Error Message Editor

Global Variables
T Table
$PTR

P Table
B Table
A List
$CLBLS
$DCI~E

Token Table
Token Table Pointer
Program Structure Table
Block Information Table
Dictionary Attribute List
Label Switch
Name of Current Identifier

Logic Diagram
Chart 10 shows the detailed logic diagram for the PROC Generator
routine.

78

TITLE:

BEGIN GENERA'1'OR ($BEGIN)

Program Definition
Purpose and Usage
The BEGIN Generator checks the syntax of a BEGIN statement and generate.
the initial part of the prologue for the block.
Description
If a label is present on the statement. it is processed. The syntax
is checked by insuring that a semicolon immediately follows the word
BEGIN. Entries for the block are made in the program structure and
block information tables. A triad for the initial part of the prologue
for a begin block is created.
'
Errors Detected
ERROR AT

e__e

(16)

Local Variables
None
Program Interface
Entry Points
$BEGIN.
BEGIN.

No formal parameters.

Expects $PTR to point to token following

Exit conditions
Normal exit only.

$PTR points to semicolon.

Routines Called
$BLPRC
$GTRIAD
$WEXP

$XERR

Label Processor
Get Next Triad Entry
Segment Management
Error Message Editor

Global Variables
T Table
$PTR
P Table
B Table

Token Table
Token Table Pointer
Program structure Table
Block Information Table

Logic Diagram
Chart 11 shows the detailed 'logic diagram for the BEGIN Generator
routine.

79

TITLE:

ON-UNI'l' SPECIFICATION ANALYZER ($BONO)

Pr~ram

Definition

Purpose and Usage
The On-Unit Specification Analyzer checks the ON-condition for legality
and returns a code indicating the type of unit.
Description
The type of token is checked and its keyword code obtained. If not
legal for an ON-condition, a message is given. If the code is for
ENDFILE, a check is made for (filename) and a pointer to the filename
is returned.
Errors Detected
ERROR AT'
• (16)
FILE NAME MISsING. (40)
, NOT FILENAME. (41)
UNRECOGNIZABLE ON-CONDITION. (44)
Local Variables
None
Program Interface
Entry Points
$BONSA.

No formal parameters.

Expects $Pl'R to point to condition.

Exit Conditions
Normal exit only. $PTR points to token following condition.
G2 indicates type of unit detected:
G2 = 0
G2 = 4
G2 = 8
G2 = 12
G2 = 16
G2 = 20
G2 = 24

Register

Unrecognizable
ERROR
FIXEDOVERFLOW
OVERFLOW
UNDERFLOW
ZERODIVIDE
ENDFILE (filename)

Filename pointer stored in $FILON.
Routines Called
$FVAR
$XERR

Locate Variable
Error Message Editor

Global Variables
T Table
N List
$Pl'R
$FILON

Token Table
Dictionary Name List
Token Table Pointer
on-oni t Flag and FCIB Pointer

Logic Diagram
Chart 12 shows the detailed logic diagram for the on-Unit Specification
Analyzer.

80

TITLE:

GO GENERATOR ($BRNR, $BRNR2)

Program Definition
Purpose and Usage
The GO Generator syntactically and semantically analyzes GO TO
statements and generates code to perform the indicated functions.
Description
Five situations may occur during compilation of a GO TO statement:
1.

Forward references to statement-label constants.

2.

Backward reference to statement-label constant in same block.

3.

Backward reference to statement-label constant in containing
block.

4.

Reference to a statement-label variable in same block or array
label.

5.

Reference to a statement-label variable in containing block.

The second and fourth situations present special cases. A branch to
the statement referenced (or to the GO TO Interpreter (IBESAF) if a
statement-label variable) is required.
In any other situation, the GO Generator leaves sufficient space in
the object code file to insert instructions. Information is placed
in this area to allow proper code generation later. The proper code
is inserted into this area when it is determined which of the three
remaining situations exists.
Errors Detected
ERROR AT'
'(16)
"TO' MISSING AFTER 'GO' (36)
ILLEGAL STATEMENT LABEL--STATEMENT IGNORED (37)
Local Variables
None
Program Interface
Entry Points
$BRNH.
TO.

No formal parameters.

$BRNB2. No formal parameters.
keyword GOTO.

Expects $PTR to point to keyword token
Expects $PTR to point to token following

Exit conditions
Normal exit only.

$PTR points to semicolon token.

81

Routines Called
$CERR
$FSYM
$NEXP

$GTRIAD
$XERR

$AREXP

Compiler Error
Locate Identifier
Expression Processor Controller
Get Next Triad Entry
Error Message Editor
Array Expression Error

Global Variables
T Table
$PTR

A List

Token Table
Token Table Pointer
Dictionary Attribute List

Logic Diagram
Chart 13 shows the detailed logic diagram for the GO Generator
routine.

82

TITLE:

CALL GENERATOR ($CALL)

Program Definition
Purpose and Usage
The CALL Generator analyzes the syntax and directs generation of the
triads for a CALL statement.
Description
Before passing the entry name to the Expression Processor Controller
for processing. the CALL Generator ensures that the entry name is
properly declared and that the syntax of the statement is correct.
entry name of $RESET that is not declared as an entry point is
defined to be the special CALL/36o-0S feature CALL $RESET. In this
case the identifier following the left parenthesis must be a filename.
A triad is generated to call the Reset Disk Files routine (IBERSET)
to execute the reset operation. The address of the file control
interface block (FCIB) is passed in R13.

An

Errors Detected
ERROR AT'

•

(16)

• NOT ENTRY NAME.

(17)

• NOT FILE NAME. (41)
Local Variables
None
Program Interface
Entry Points
$CALL.

No formal parameters.

Expects $PTR to point to entry name.

Exit Conditions
Normal exit only.
Routines Called
$FVAR

$NEXP
$GTRIAD
$XERR

Locate Variable
Expression Processor Controller
Get Next Triad Entry
Error Message Editor

Global Variables
Z Table
T Table
$PTR

Triad Table
Token Table
Token Table Pointer

Logic Diagram
Chart 14 shows the detailed logic diagram for the CALL Generator
routine.

83

TITLE:

IF GENERATOR ($CIF)

Program Definition
Purpose and Usage
The IF Generator analyzes the syntax and directs the generation of
triads for an IF statement.
Description
The IF Generator directs the translation of the logical expression
in an IF statement and tests the result and generates a conditional
branch to the ELSE clause. An entry is made for the IF statement in
the program structure table and the compound statement switch is set
so that a THEN clause is expected.
A check is performed to insure that a THEN clause follows. If the
word THEN does not immediately follow the expression, a search is made
to·find it. If it is not present, a null-statement THEN unit is formed.
Errors Detected
ERROR

~'
,
(16)
'THEN- CLAUSE MISSING, NULL ASSUMED.

(39)

LOcal Variables
CITBEN

Name THEN

Program Interface
Entry Points
$CIF.
IF.

No- formal parameters.

Expects $PTR to point to token following

Exit Conditions
Normal exit only.

$PTR points to token following THEN.

Routines Called
$GTRIAD
$NEXP
$XERR

$AREXP
$WCTCT
$WEXP

Get Next Triad Entry
Expression Processor Controller
Error Message Editor
Array Expression Error
Segment Management
Segment Management

Global Variables
T Table
$PTR
P Table

Token Table
Token Table Pointer
Program Structure Table

Logic Diagram
Chart 15 shows the detailed logic diagram for the IF Generator
routine.

84

TITLE:

ON GENERATOR

($COlO

Program Definition
PUrpose and Usage
The ON Generator generates code to establish ON-condition addresses.
It also analyzes the syntax of the ON statement and creates an entry
in the program structure table (P table) for the ON statement.
Description
The conditions for which ON statements are allowed are the following:
ERROR
FIXEDOVERFLOW
OVERFLOW
UNDERFLOW

ZERODIVIDE
ENDFILE (filename)
ON Generator makes sure that the on-unit is an unlabeled statement.
The Controller makes sure it is a legal unit.
since all temporaries in the on-unit use special temporaries. each
on-unit is handled as a procedure block and creates a new entry in
the temporary storage table (S table) which is removed upon completion
of the on-unit.
When an ENDFILE on-unit is encountered. the following special steps
occur:
1.

Space is obtained for the on-unit parameter list in static and
constants area. The address of the parameter list is saved
in the block information table (B table). (For the format of
the on-unit parameter list. see Appendix B.)

2.

The number of ENDFILEs encountered for the current block (B$FILE)
is incremented.

3.

Code is generated to initialize the on-unit parameter list,
including the 20-byte on-unit adcon area. address of FCIB.
An ENDFILE table entry is initialized in the END Generator.
(See Appendix B.)

q.

Code is generated to call the On-ENDFILE and REVERT Initializer
(IHEONREV) at entry-point IBEONUN and pass the address of the
on-unit parameter list in R13.

Errors Detected
ERROR AT .___
(16)
LABEL ILLEGAL HERE--IGNORED. (45)
Local Variables
None
Program Interface
Entry Points
$CON.
ON.

No formal parameters.

Expects $PTR to point to token following

85

Exit Conditions
Normal exit only. $PTR points to first token of the on-unit in the
ON statement or to semicolon ending the ON statement. (For details
regarding on-units. see the CALL/360-as PLlI Language Reference
Manual.)
Routines Called
$BONSA
$G'l'RIAD
$CATEG
$ NCONS
$XERR

$WEXP

On-unit Specification Analyzer
Get Next Triad Entry
Statement Category
Constant Processor
Error Message Editor
Segment Management

Global Variables
STable
T Table
$PTR
P Table
$CSS
B Table
$FILON

Temporary Storage Table
Token Table
Token Table Pointer
Program Structure Table
Compound Statement Switch
Block Information Table
on-Unit Flag and FCIB Pointer

Logic Diagram
Chart 16 shows the detailed logic diagram for the ON Generator
routine.

86

TITLE:

REVERT GENERATOR ($CRVT)

Program Definition
Purpose and Usage
The REVERT Generator analyzes the syntax and generates the code
associated with the REVERT statement.
Description
The conditions for which REVERT statements are allowed are:
ERROR
FIXEDOVERFLOW
OVERFLOW
UNDERFLOW
ZERODIVIDE
ENDFILE (filename)
For ENDFILE condition, code is generated to call the On-ENDFILE and
REVERT Initializer library subroutine (IHEONREV) at entry point IHEREVT.
The address of the file control interface block (FCIB) is passed to
the subroutine in R13. All other conditions store revert code directly
into the DSA for the particular type of on-unit.
Errors Detected
ERROR AT •

(16)

Local Variables
None
Program Interface
Entry Points
$CRVT. No formal parameters.
REVERT.

Expects $PTR to point to token following

Exit Conditions
Normal exit only.

$PTR points to semicolon.

Routines Called
$BONSA
$GTRIAD
$NCONS
$XERR

On-Unit Specification Analyzer
Get Next Triad Entry
Constant Processor
Error Message Editor

Global Variables
T Table
$PTR
$FILON

Token Table
Token Table Pointer
On-Unit Flag and FeIB Pointer

Logic Diagram
Chart 17 shows the detailed logic diagram for the REVERT Generator
routine.

87

TITLE:

STOP GENERATOR ($eSTOP)

Program Definition
Purpose and usa(je
The STOP Generator analyzes the syntax and generates triads for the
STOP statement.
Description
The functions of a STOP statement are performed by a branch to the
prolO(jue of the external procedure.
Errors Detected
ERROR AT

w_ _ w

(16)

Local Variables
None
Program Interface
Entry Points
$CSTOP.
STOP.

No

formal parameters.

Expects $PTR to point to token follOWing

Exit Conditions
Normal exit only.

$P'l'R points to semicolon token.

Routines Called
$GTRIAD
$XERR

Get Next Triad Entzy
Error Message Editor

Global variables
B Table
T Table
$PTR

Block Information ~ble
Token Table
Token Table Pointer

Logic Diagram
Chart 18 shows the detailed logic diagram for the STOP Generator
routine.

88

TITLE:

DO-LOOP TRIAD BUILDER ($DEXP)

Program Definition
Purpose and Usage
The DO-LoOp Triad Builder is used to build the triads required for
an iterative DO-loop to initialize the DO index, to increment the DO
index, and to test the DO index for loop termination.
Description
The elements of the DO statement along with their attributes are set
on entrance to this routine in $DOLBS (the DO index), $DORBS (the
initial value), $DOBY (the increment value), and $DOTO (the final
value). If the increment was not specified in the DO statement, the
constant one is substituted. Only the required portions of the DOloop control code are generated. Dummr statements are constructed
from the elements of the DO statement by placing the operators and
operands in the operator and operand stacks. The stacks are then
processed to form the required triads.
Errors Detected
None
Local Variables
DEFLG

Increment type flag:

o = constant
1

= variable

increment
increment

DETEST

Used to resolve FIB's to the code that tests for the
end of the loop. contains the head pointer to the
FIB·s which branch to this code.

DEPLUS

Used to resolve FIB·s to the code that tests for the
end of the loop if the increment is plus. Contains the
head pointer to the FIB·s that branch to this code.

Program Interface
Entry Points
$DEXP
Calling Conditions
All communication is through the global variables.
Exit Conditions
Control returns to the caller immediately following the invoking call.
No specific output values are returnedRoutines Called
$WEXP

$NCONS
$ NOPRT
$WC'l'CT
$GTRIAD

Segment Management
Constant Processor
Operator stack Processor
Segment Management
Get Next Triad Entry

89

Global Variables
$CSS
$DISPL
$NTCUR
$PRIOR
$DORBS
$DOLHS
$DOSWT
$DOBY
$DOTO
A List
C Table
P Table
X Table
Y Table
Z Table

compound statement Switch
Displacement from Variable Table Address to Fixed
Tables
Number of Last Triad Generated
Operator Priority
DO Statement Right-Band Side
DO Statement Left-Band Side
DO Statement Switch
DO BY Clause
DO TO Clause
Dictionary Attribute List
Constant Table
Program Structure ~ble
Opera tor Stack
Operand Stack
Triad Table

Logic Diagram
Chart 19 shows the detailed logic diagram for the DO-Loop Triad Builder
routine.

90

TITLE:

DO GENERATOR ($DOG. $DOG2)

Program Definition
Purpose and Usage
The DO Generator generates triads to perform the functions indicated
by the statement. checks the syntax of the statement, and creates an
entry in the program structure table for the statement.
Description
If the specification is empty. a noniterative DO entry is created in
the program structure table. No code is generated for this form of
a noniterative DO statement.
If the specification contains only a WHILE Clause, an iterative DO
entry is created. The address of the test instructions is established,
and the logical expression is evaluated and tested.
If an assignment to an index variable is given, the address and type
of the index variable are obtained and saved. The initial value
expression is evaluated, and its type and address are saved.
Any BY or TO clauses are then evaluated and their values are assigned
to temporary variables. If more than one clause of each type is
present, an error is generated. If no BY clause was given, a BY value
of 1 is provided, unless no TO value was given (in which case the
assignment is noniterative and special analysis follows the assignment).
The DO-Loop Triad Builder routine ($DEXP) generates the setting,
incrementing, and testing instructions associated with the DO.
If a WHILE specification is present, code is generated for the logical
expression and the value tested. After this, or if no WHILE was given,
the program structure table is pushed down and a return performed.
All iterative DO's are repeated unless only an assignment and a WHILE
clause are present. In this case the iterative DO is nonrepeating.
Code is generated only for those sections of the DO that are present.
The triad table for a complete DO will look like this:

Inc
Test

Neg test

Loop

calculate address of index variable
Calculate starting value expression (exp1)
Calculate TO value expression (exp2)
Calculate BY value expression (exp3)
Assign exp1 to index variable
Define address - Push down temp level
Add exp3 to index variable
RFIB
Compare exp3 to zero
FIB if negative go to Neg test
Compare index to exp2
FIB less than or equal to loop
FIB end of loop
RFIB
Compare index to exp2
FIB greater than or equal to loop
FIB end of loop
RFIB
Calculate WHILE clause
FIB false to end of loop

91

Errors Detected
ERROR AT'
,
(16)
ILLEGAL 'oO"INDEX. (22)
ILLEGAL 'WHILE' CLAUSE. (25)
DUPLICATE'
• CLAUSE. (26)
ITERATIVE '00' REQUIRED. (38)
Local Variables
OOTYPE

Check for Proper 00 Terminator

Program Interface
Entry Points
$OOG.Expand 00 statement.

Expects $PTR to be set to token after DO.

$DOG2. Expand 00 specification in I/O statement.
to be set to token after DO.

Expects $PTR

Exit Conditions
Upon encountering a semicolon token or a right-parenthesis token.
Both exit points leave $PTR set to token that caused exit.
Routines Called
$NEXP
$DEXP
$GTRIAD
$AREXP
$XERR
$WCTCT
$WEXP

Expression Processor Controller
DO-Loop Triad Builder
Get Next Triad Entry
Array Expression Error
Error Message Editor
Segment Management
Segment Management

Global variables
T Table
$PTR
P Table
$DOLHS
$OORHS
$OOTO
$OOBY
$DOSWT

Token Table
Token Table Pointer
Program Structure Table
00 Statement Left-Band Side
DO Statement Right-Hand Side
00 TO Clause
DO BY Clause
00 Statement SWitch

Logic Diagram
Chart 20 shows the detailed logic diagram for the 00 Generator
routine.

92

TITLE:

RETURN GENERATOR ($DRET)

Program Definition
Purpose and Usage
The RETURN Generator analyzes the syntax and generates the code
necessary for the RETURN statement.
Description
RETURN Generator makes sure that the RETURN statement is not contained
within an on-unit and that, if imme~iately contained in the external
procedure, it has no return express1on. If it is in a begin block,
it is treated as appearing in the containing procedure.
The return expression, if any, is calculated and stored in the dummy
parameter passed for the return value. Code is generated to branch
to the procedure block·s epilogue.
Errors Detected
ERROR AT·
• (16)
RETURN STATEMENT ILLEGAL IN ON-UNIT. (51)
RETURNS ATTRmUTE ILLEGAL IN EXTERNAL PROCEDURE--SRIPPING

TO

.

••• .

(52)

Local Variables
DRTKN

Return Assignment Tokens

Program Interface
Entry Points
$DRET. No formal parameters.
RETURN.

Expects $PTR to point to token following

Exit Conditions
Normal exit only.

$PTR points to semicolon token.

Routines Called
$NEXP
$GTRIAD
$AREXP
$XERR
$WBACK

Expression Processor Controller
Get Next Triad Entry
Array Expression Error
Error Message Editor
segment Management

Global Variables
T Table
$PTR
P Table
B Table

Token Table
Token Table Pointer
Program Structure Table
Block Information Table

Logic Diagram
Chart 21 shows the detailed logic diagram for the RETURN Generator
routine.

93

TITLE:

END GENERATOR ($EDGN, $BOON2)

Program Definition
Purpose and Usage
The END Generator determines which, and how many, DO, BEGIN, and PROC
statements are being closed and whether any IF statements are being
determined. It also generates the triads and performs the housekeeping
associated with the closings.
Description
If no label follows the word END, then the statement on top of the
program structure table is being terminated. If a label follows END,
then each statement down to and including the statement with that label
is terminated. If a label prefix is present on the END statement,
its processing must be delayed until the last group or block is ended.
When a begin or procedure block is being closed, some work, besides
generating the epilogue code, needs to be done. If the external
procedure is being closed, compilation is completed and it is necessary
to finish housekeeping tasks such as establishing static storage and
library linkage. Once this work is completed, the object program can
be executed.
At the end of an internal block, all declarations made in the block
are removed from the dictionary attribute list (A list). This is a
simple procedure for variables but more complex for entry names and
statement-label constants. At the end of each procedure, all
temporaries for the procedure are removed from the temporary storage
table (S table).
If the dictionary attribute list shows entry names or statement-label
constants tentatively, rather than explicitly defined in a block being
closed, it is necessary to search for an explicit definition in the
immediately containing block. If no explicit definition is found,
the tentative definition is changed to an explicit definition in the
containing block.
If this tentative definition is for a FORMAT statement label, no search
is made of the containing block and an error message for an undefined
format is generated. All explicit entry-name or statement-Iabelconstant definitions are removed from the dictionary attribute list.
Each ENDFILE on-unit encountered in the block being ended requires
eight bytes in the DSA for the block to build the ENDFILE table. This
area is initialized by a call to the IBEONUN entry point of the OnENDFILE and REVERT Initializer (IBEONREV) at runtime.
Errors Detected
ERROR AT •

(16)

• AFTER 'END' ILLEGAL--IGNORED.

(21)

tiiDiFINED FORMAT. (28)
ILLEGAL USE OF'
'. (29)
SOURCE STMTS AFTER END OF PROGRAM IGNORED. (101)
SEVERE DIAGNOSTICS, EXECUTION PREVENTED. (108)

94

Local Variables
Last statement Switch (0
Entry Point Code
FIB Around Symbol Table
Block End SWitch:

EDLAST
EDENTY
EDFIB
EDBLKT

X '01'

X 'qO'

X '20'
X 'SO'

=

No)

RFIB Around Block
External Procedure
Begin Block
Symbol Table SWitch

Program Ihterface
Entry Points
$EDGN. No formal parameters.
following END.
$EDGN2.

No formal parameters.

Expects $PTR to point to token
Does not use token table.

Exit Conditions
Normal exit.

$PTR points to semicolon and also end of compilation exit.

Normal exit only.

One iterative DO closed.

Routines Called
$CERR
$BLPRC
$ENDES
$ENOON
$GTRIAD
$ TCODE
$FNB
$SVC
$XERR
$WCTCT
$WEXP

Compiler Error
Label Processor
Process End of ELSE
Process End of ON
Get Next Triad Entry
Triad Code Generator
Get Non-Blank
SVC Director
Error Message Editor
Segment Management
Segment Management

Global Variables
$PTR
T Table
P Table
A List
N List
$CSS
B Table
STable

Token Table Pointer
Token Table
Program Structure Table
Dictionary Attribute List
Dictionary Name List
Compound Statement Switch
Block Information Table
Temporary Storage Table

Logic Diagram
Chart 22 shows the detailed logic diagram for the END Generator
routine.

95

TITLE:

PROCESS END OF ELSE ($ENDES)

Program Definition
Purpose and Usage
The Process End of ELSE routine does the processing necessary at the
end of an ELSE unit.
Description
If necessary, the address of the end of the IF statement is defined.
The program structure table entry for the IF statement is removed and
the compound statement switch reset.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$ENDES.

No

formal parameters.

Exit Conditions
Normal exit only.
Routines Called
$GTRIAD
$WCTCT

Get Next Triad Entry
Segment Management

Global Variables
P Table
$CSS

Program Structure Table
Compound Statement Switch

Logic Diagram
Chart 23 shows the detailed logic diagram for the Process End of ELSE
routine.

96

TITLE:

PROCESS END OF ON ($ENDON)

Program Definition
;

Purpose and Usage
The Process End of ON routine does the processing necessary at the
end of an on-unit.
Description
The address of the end of the on-unit is defined and the entry in the
temporary storage table made for the ON statement is removed. The
program structure table entry for the ON statement is removed and the
compound statement switch reset.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$EDDON.

No formal parameters.

Exit Conditions
Normal exit only.
Routines Called
$GTRIAD
$CERR
$WCTCT

Get Next Triad Entry
Compiler Error
segment Management

Global Variables
P Table
$CSS

Program structure ~ble
Compound Statement Switch

Logic Diagram
Chart 24 shows the detailed logic diagram for the Process End of ON
routine.

97

TITLE:

EXPANDER ($EXPND)

Program Definition
purpose and usage
The Expander determines the dimensionality of an array expression,
generates the DO statements for the expression, and builds a list of
the temporary variables used for the indices.
Description
This routine is called after the Expression Processor Controller has
detected the presence of an array expression. A pointer to the asterisk
subscript or array name that caused detection of the array expression,
a subscript number (called SUBNUM in the logic diagram), and the pOinter
to the dictionary attribute list entry for the array are available.
The subscript number is set to zero if an array name caused detection
of the array.
The Expander proceeds to remove from the triad table any triads
generated by the Expression Processor Controller prior to detection.
It determines if this is an array or a cross-section reference.
For each dimension, a fixed-point temporary variable is obtained for
the bounds and a DO statement is generated.
If the expression is an array, the number of dimensions is checked
before proceeding. If it is a cross-section, the subscripts are scanned
for the next asterisk subscript. The subscript number is properly
advanced during the scan.
The generated substitution list is in the form of a token list from
the left parenthesis for a subscript to the right parenthesis.
Errors Detected
None
Local Variables
EXDIM

Number of Dimensions in Array

Program Interface
Entry Points
$EXPND.

Expects $EXPNS and $PTR from Expression Processor Controller.

Exit Conditions
Normal exit only.
Routines Called
$DEXP
$GTRIAD

$WCTCT
$WEXP

98

DO-LoOp Triad Builder
Get Next Triad Entry
Segment Management
segment Management

Global Variables
T Table
Q Table
$EXPCT
$EXPNS

Token Table
Subscript substitution Table
Expansion Count
Expression Processor to Array Expansion
Routine Information

Logic Diagram
Chart 25 shows the detailed logic diagram for the Expander routine.

99

TITLE:

END EXPAND ($EYPND)

Program Definition
Purpose and Usage
The END Expand routine generates the END statements necessary to
complete DO-loops generated by the Expander routine.
Description
For each dimension in the array expression, a call is made to the END
Generator to complete a DO statement. After each entry, the temporary
variable used for the DO index is released and the corresponding entry
in the subscript substitution table is set to null.
Errors Detected
Itone
Local Variables
Hone

Program Interface
Entry

Points

$EYPKD.

No

formal parameters.

Exit Conditions
Normal exit only.
Routines called
$EDGN
$WCTCT

END Generator
Segment Management

Globa1 variables
$EXPCT

Q Table

Expansion Count
Subscript Substitution Table

Logic Diagram
Chart 26 shows the detailed logic diagram for the END Expand routine.

100

PART 3 LOGIC DIAGRAMS

The detaiJ.ed logic diagrams for CALL/360-0S PL/I statement processors
follow •

••
•

............... •
............... •
'leGEM

•

v
··...............
.
,...............,
•

,..

, .. PTtl+l

,

•

.

, -) .!9~EN

•

,

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

&C040

·YES
•

A

..

..

-> ..

x:......H•••••••:
• (t'ANGE P

AI~i~::f2T

v
..................
*SNfXP

'NO

P -) TOIlEN A
'if?

..

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

•NO

,

..

......... .

,

..

*--------*

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

..
•

,

EKP '.OC
-CNfRLJ\

..

,..

.. YES

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

..
..

seT P TO

•

TOKEN
fOllOWING

.N~

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

PAR~At~~SI 5

ASS I~ME~T AN
AftRAY?

:

AC040

->

TOKEN A
I.'?

•••

.X e2"'....

·

*x n.

....

..

.. yes

. ,,...

• YES

P

.......

. ...

..
..

·NO

...............
*--------*
.·,...............

IC050
Y
*,EXPND
•

EXPANOEK

..
..

:x •...•...•....... :

................
*-------.
...............
Y

At020

_ERROR

..

..

8AO ASSIGN ..

:

STMT.iS

:

v
* ••••• *••••••••

.----------.
PROC. •
.SNEXP

•

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

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

EX-P

CHTRLR

•

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

v

*Sl. . . X. SET PTR TO
•
..
.. SEM I COLON

.
··........ ...............
..............
v

-SS-X.

RETURN

Chart 9.

...

"V~S

:~~~~. _______ :

• ............... X. ERROR AT •
.16

.

•
•

ERROR?

•

• •0

*

..

•••• lI' B8"'"
.."

•

*"' . .

*'

v
...............
.----------. . .
··.................. . .
• $EYPND

..

•

* ••• X

ENO EXPAND

Er7.

Assignment Generator

101

PLII nSTI"S "ANUAl
$APRC ,

....

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

,P021

.•

• ••
.eo

UPRC2

..

.
•

• P -) TOKEN A
••••• • • 'a' ? • •
*
•

.APIlC

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

• ••••• e ••

• • •NO

v
...............
:*..............
IlImm :•.

v

••••••••••••••••
•
•
'EllfR'" E
•

...-----.

..AIAL

.III(AN('H AROUND.

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

PRDCEDlJRE

•

•

,.
AP012·

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

V

•

.YSS•••••••••
•
••

ON?

• • •NO

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

v
...............
• ERROK
•

*--------.

•
:

MISSING
lAIIEl .46

IP040
•

•

•

.

..

.. .
. ...

• "YES

RETURNS • • •••••••••••• x
PTR - > TOKEN
.X
• •• lEGIl
•
A ; ?
....
•
•ATTRIBUTES?
•
•• ••
• .. .. •
.. NO
.. 110

lAbEL ~ITCH

.A2 •

...

• • ..
·yeS
••

•

·ERROR

•
:

:

B~"

..

•

••••••••••••••••
••• •.MAKE
PROGRAM •

.OZ ••• X.STRUCTURE AND.
• •
.. alOCK INfO ..
...
*TABlE E~TRIES'

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

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

V
•••••••••••••••
•.
•..

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

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

.......
¥•••••••..
"ERROR

•

AP071

·: lHi'.WS:.

mlG.:¥TS:

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

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

AP075

'P050

.....

:BlA~~R~~~gER

..x ..........•.......
••.••••
i. ••..••*
•

•

.. ' . .
..
. ..ABEL ..
...............

.

•

• CREATE DUMMY •

•

ESTA8lI SH

O~AUlT

.

•

ENm'Nm

..

•

. ••

.

. .. ..

'P200
"YES ••••

• • •

••

•..•NO

EXTERIIAl
BlOtU

..ANCRE

y

•••••••••••••••
•• CREATE •**

•

:

P~OlOGUE
••• ••••••••••••••
••

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

PTR ->TOKEN A
.X AO ..
'.' ?
. . . 2-

••

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

AP~!2 ••••i ........

:BS: •• X:

:

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

•

:TaOmi~or~

•

:

• • *-------.
Allrl'I~DE

•

·
:

••

v

.. • • • • .YES• ••••..
.
.. •
. . Oo" ..
••
•
..
.. .. ..NO

:X ............................... :

eXee • • • • • • • • • • • • • • e

'P2i2••••i ........

.:

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

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

: ATtmVTE

.
• '8lPRC

y

V *.....
•••••••••

AP030

••••

•••

:

...............
•
•
y

• FIIIISH AND

•

ATTRIBUTES

•

:•

AP08~

••

:C6:
.. x:
• •

..............:.
m~RA~

AP080
•••••••••••••••
• •••••••V* ••••••
*
*
•
•
A8ImIsU~oR : ••••••••••••••••• k:
.SOV CREATION •
.STOPA~E TORlE.
*
•
•••••••••••••••
•• •••• *ENTPY
••••• * ••••

••

TmmRY :

..
.......... X:. .80:

•••

AP027

.......¥.......•
•................•

••
:

102

Chart 10.

GENERATE
P~Yi~E

•

AP075

••••
•

: ••• ~ DZ:

•••

PROC Generator (Page 1 of 3)

APOS5.

v

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

RETURI'I

APce •

.X C6 •

PLII nITI!!S IlANUAL

2

tAIIIC I .AP1tCl

....
.
" • •s'Lm'l

........._...

*"0 ....
:...:

J

...-"1 • .

.,111............
ss •*...................
PTA • 1
:
• • •

A'III............
R :

-_......-

....

:

:

•

• • • • "ves

•
•
•
•
.YES

•

'P260

•• ••••••••••••••"

•
••• TOK,gE~J'T AN ••••••••••••••
x • D'lfxt~rfON
N
S
••
•• L
O.
••
•
• • •NO•
• • •NO

XT
••••••••••••••• x:sK~~~2
• RIGHT PAREN :•
•
•

V
••••••••••••••••
•
: ,Y'U6UTE :

v **
•••••••••••••

•

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

AP250
.ERROR

..

APZ10

....• _........•

........¥•••••••

"• •

.•

"
.NO
IDENT I - N7

SK~P

• •"
•

•

•
••

"

:*------------*
D~tmHvE : .......... .

NODE
•
•• .............
.•

•• TO NEXT ••
•• R OMItA
OR ••
GNT PAREN
•...............
•

ni

.ERROR

.

:PARlmfft16:

...............
156
"
•" ••••••••••••••

AP~U**.**" •••**"
: T~~UHvE :

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

" " "YES

:

FLOAT

"

D~~mm&N:

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

:X ................ :

.

V

AP225

V
•••••••••••••••

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

"
:
"

..............•-

:&4:"X:PAA:~R~~~lESS:

•••

CREATE
TEWIAxTolve

PARAM~TER

V
** •••••••••••••

AP220

"
"
"
"
" A ETEP"
: ••••••••••••••••• 1:SETA&~~E~S
:

" DECLARATION"
•••••••••••••••

•" ••••••••••••••"

:X .............. ..
V

V

··•
••••••••••••••••"

AP230

*.*.***.* ••
..••••
..
• INSERT I'IT('I *

•••••••••••••••
•.PTR • PTR + 1.•"

:.

ATl~I'UTE

4P??S

**. •

.:... ....R4:
*
~

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

...

·

• •
.YES
•
• PTR ->TOKEN" A • .X• 80.•
"•
• • ' , ' ? • * ••••••
• • NO
•

·.

. ..

AP027
•..•••••••••••••• .....
• • • • .YES
..
•
••••••••••••••• X.PTR
PTR + 1•••• X 80.. •
A
• •• PTR -)TOKEN
'It ?
•
•
•..............•.. •••••1·
••
•
• ••

•

•

~

NO

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

AP270

• SK{'

it

TO NEXT •

•
OMMA all
•
• R GHT PAREN •

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

.

it

••••••••••••••••
-......... ...
• TOKENS .32 "
•••••••••••••••••

·ERROR
•
ILLEGAL

Chart 10.

--.

PROC Generator (Page 2 of 3)

103

Pl./I nSTllIS "'HUA&.
U'AC , tA'RCZ

•••

_............••.
......J.......

.
.IANKa
...... ...............
....

. ..
.. v . ..

APii%............ A¥005
•
..
*••
•
*• •........ ....•. X:laOI~~2or~~
:,• •. •~ 86:•
•
.. • 1~U9 .• '*
. •..............
. . ..
.

.. •

. ..

TOKEN
1."1
GONTAI

·NO

.

.

.. Y1!S

.. ..

.. .. .. .

... ... .

.... NEXT,J*KEN

.

*,,!S

•

.......... K

.NO

..x ................ .
II' •

104

Chart 10.

PROC 'Generator (Page 3 of 3)

PLII SYSTEMS MANUAL

.BEGIN

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

•

:

.aEG1N

.. • •
••

:

.• .
.• .

"

.NO

L.8ELO~'ITC~

...

•

...

••••••••••

• YES

.......
i.......•
·.UPRC
*
--.
: Pf2m s :
•.................•
:x ................ :

• ·
•
·.

1E010
•

"

...

" .YES
•

• • PTA i~TD~EN

""

A ••••••••••

•

• NO

v

•••••••••••••••••••
:
•:raDnmor~=
••••••••••••••••
v

•••••••••••••••
• EAIIOR
•
*--------*
: AJ'NMG=~g :
•••••••••••••••"

·

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

...•...i.......•

•• MAKE

E~l'ty

8(.~lK
:• INP¥:.

I NOO

lION:"

••••••••k••••••

v

•••••••••••••••••
: pkBfal~E :

TRIU
•
••••••••••••••••
•

•

v

.

.•••••••••••••••
•
tRiATE
*

:sT~l:G~Rm,\Y:"""""""

•••••••••••••••
Chart 11.

BEGIN Generator

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

.x:• ••••••••••••••• ""
~ETURN

"

lOS

PLI t IYlUM IIAIIIIAL

_SA

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

•
'~ONSA
• ...............
••
••

-

••

•• • •
• flO

••

•

•

. •
-Clt'ION
. ...

V

80010
• • ·ves ...
• TOKEN KEYWORD • -x• 81.•
•
7
....
•• ••
.NO

110050

·

....

80060

..

•

•

·•

.

...

•

8Oi£!....2.••••••
*• A3*• •• X.• TYPE. 0 ••

E

••

•

. • •........
.YES

•• ••
.. NO

..

v
...............
• ERAOR
•

.

8001.::

•----------*
cM~~S~.
:... •~ C8:•
• ••

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

.
A¥~A~MJR L ....... :
..................
:
.. PARENTHESIS.

.•

....'
.

~NDI'ION

=6

: •••••••••••

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

.YES

f1AOeeAFrO~D

.. ..

TYPE

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

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

.....

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

•

•

..

•

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

................. X:

TYPE - 1

.

: •••••••••• X

.. flO

t,

v
...............
.
.

..

flO

•• ••
-flO

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

..
• ..

••

•
.
..
..
••

• ...............X:

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

.. .. v.

.YU ••••
. . X 80 •
let
• • 2.

.. v . .
..
.YES
•

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

.. C~aIT!ON •••.............. x:•
• • .. OVERFLOW?
.. •

•

...
..

·..

..

.. .VES•

C~~~IT!ON
UfiDERFLOW?

.

..

tVP-E. 2

•: •••••••••• x•

..

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

.. NO

• • .. .. • •
.NO

•

.

.
.. .

..

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

.
3
...
....••••••••••• X
...............

•.............. x. TYPE

.

• • .YES
CONDITION

•

•
*•
.

..

• • ZER~ar~IOE?

e

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

..
•

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

TYPE· 4

•
:

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

• * *NO

.

.

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

V
................
•
•
•

NOTE:

•

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

••••

.. .

•••

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

80025
•

:NAigN~I~l~R : ••• ~ A3:

•

*

V

8[1014

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

..*C8• .. x*pn
•

s

PTk + 1.

'*

v
...............

80015

,.*
• RETURN
•• **...........** ,.
106

Chart 12.

On-Unit Specification Analyzer (Page 1 of 2)

tao". o o .NO
••••• •• •PT. ;t.JOKEN • * .•••••••
:10._
o

0

_...

•o

•

0

.•

• YES

.......
i .......•
o
o

•

o

0

_1'TII • PTII + t-

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

eo06O

• .YES
•••••••••••••••
••
•
• ••
..
D~~721~lbij : ... .~ AO:
• ..• l"E~~mER1 •• •.............. X:.-------------*
.
•o
•
•
•••••••••••••••
• • •NO
•

. ...

FVA~

• •

•
. •
• • RIGHT PAITOK;N 'TO' ''"" •.............. x:1It-------------.
M~!!r2aO.lg : ... ~ P3:
III
•
• ••
. '"
'"
•••••••••••••••
'
"
'
"
'" YES
•

.

.NO

·.......i.........

•• PTR • PTII + I.'•"
'•••••••••••••••
"
'"

'"

BROlO. '"

••
••••••• , •• ·8-3·X
..
"
.. .
................
**
..

•

iii

•

..

• • • • • • • • • • ii1 • • • •

.,

IO.NT

'"

BRUD
·Ntl

*

TOKeN?

.

••••• •

.~

Di.·

••••

'"

'" YES

v
*-------------*
'" A~L BLOCKS '"

•••••••••••••••
• ,FSYM
•

•

••

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

••
'"
•

'" '" '"

•

.
•

••

........ .

'" YES

. .. .
8RI00

.. '" •

.

.. • '"

. ..
'"

'"

6RllO

.

•

..

i*

'"

?ifI

*;fI«<*

• '"
'40

.

...

• •
••••n-•

·. ...

IS IT A LAsel
VAUABLE?

•NO '"

••••

'X 80 •

1ft

'" '"

.. '" '"

.

,"YES .....
..
TOK~N
.X Cl '"
... SUb>CRJPT? ",. : ••
..

.YE~

'X

.. NO

.•••••••••• '.'.fI •••••••••.•••• , •• x.x ••••••• •••••••••
"

~

8;.0'0

V

:

'~~~~'Ilf

: :••••

• CO~STANT
:.e~~'~ll~~~

• 2.
...:'" ••••

. . . . . JII • • • • • • • • • •

•

108

Chart 13.

LA8EL

BRlI;

•••• X '2 •

GO Generator (Page 1 of 2)

,.., , SYSIIIIS IlAllUAL

2

"RNH' "RNHI

BR100••

••••• •• •
:80.'

•••

••

•
•• ••
• 'NO
•
•• ••••••••••••• X ••

• • •YU
BR~U ••••i •••••••
•••
'.NEXP
..
•:Cl."X:
• 111-------------.
TYPE LABEL :

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

v
...............
••
•
:PTR • PTR + 1:•

•................•
,

.K •••••••••••••••••••••••••• I

• ••
'VIS

•••
.. • PTA

,
•••••

••

';'t .IOKEN

•
• • •NO•

.......... .

•••••••2•••••••

•••
•
•:85:"X:TaDm~M~~
• •
•
:
•••...............•
,,

,

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

dUU

••
•

I

•••••

:

.......¥•••••••

............... ••
RETUKN

..

109

Chart 13.

GO Generator (Page 2 of 2)

PL/t InTlItS MflllAL

SCALL

••

•

-

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

..........
stALL

CAO!O
..

..

•••

••

'I'

••

•

• 0110

•
. " -)TOK£II,.
i>TR +l '"
.1)1..
• ••
?

"

~
• ••
•
•
·Hi

• .* ->TmN,+l

••
"

•

.•••••••.

.~

.It 01.

• • •YES

•........

• "
YES

•

.....
• * •

•

•••

•"

eat

" 110

·

.

• )1' • • • • • • • • • • • • • • • • •

rA~t2 •••• i •.... *_
CAoa6
•••
'eRROR
•••
•:1)3 •••• ~:.-------------*
•
ToUiIGft.. : ... : IT:~

J .......
·:81:....X:...............
------••

CAtls•••

..'YAR

...

•

.

IaTJIR2~E:

*

••••.............. •,

•••

• ••

•
•
·"ES
• • DfC IRED .Y~S : ••••
TENTA~IVE AND "~81.
• • VtUtt\E, .............. X • ENTRY
"
2"
• * TYPE?
• • ••••
••
"
•
•
• •
• •

•
••

.NQ

.NQ

·
V

.

• X••••••••••••••••••••••••••••••••

............... ."*.

CA025
• • • • .YIS
:!~~~!- _______ :
•
• •• i!~"l'lV' ••............. aX: £~~Rr=nc : ••• : A":
••
•
..............
.• •••
• • •NO

..

tA~I~ •••.i.......

------.

•• RROIl

•

•

•

lLLEGAL

: EN RY1~

:

.......J........

CA~lZ••••i.......

....................:••
••••
• • •

:17 ••• X:T~eOC~:

tAO"

•

•••• .......¥....... •
•.U.X.
••
•••••

...............
RETURN

110

Chart 14.

~

CALL Generator (Page 1 of 2)

.**

PL/1 SYSTENS MANUAL

2

$CALL

-

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

:11 •.. X: RfSEllYSEO

:

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

v
CA060
• ••
•
.NO ••••
•
PTR +1 -> , • .X• OJ••
• •• TOKEN
A
1•
• • 'C'• • •
• •

. ....

• VES

:X ................
•
• • • .NO •••• •

•

•
• 03••*.
.X
•
• 1* •
••••
•
•

• • PTR +2
->TOKEN AN
• IDENTifiER 1

••

• • •ves

.......
i.......•
••FIIAR

*-----------*
• SEARCH IIODE *

fILE
•
••••••••••••••••
•

•

• v• *
•
*NO
•

• _ liAS F&~~&~AME

--*

•

• -VES

••••••••••••••••
tERROR

CA015

..
• •••

•* •.............. x:.-------------.
=~~EA ~l\E : ••• ~ ~r.·
••••••••••••••••• ••••

-

v
...............
*-GEN INSTR. TO.:Cmcl~fRf~T :
•

RU
•
•••••••••••••••

• •
•
* .VES
•
TOKEN • •.......
• • 15 ANEXT
COMIIA?
•
••
•
• -NO
•

-

V

•
• -- - ••••
•
• *
••
•
_.e.
-- ---- -••••
• *
-••••
REMAIN,NG
TOKEN
CORREC 1

CA060

*NO

.X 03 •

-••••••••••
VES
X.

Chart 14.

I-

87 •

ICA035

CALL Generator (Page 2 of 2)

III

PL/l SYSTEMS MANUAL
SCIF

... ..
..

•

...............
:
:
. . . - •••••••••••••• x: ~mN~~lg :
•••••••••••••••••
(1044

.YIS
••.. • ..
*SO.X
PT~Tii~~9K~N
• • ••
*

••••••••••••••• •
,elf
•
••••••••••••••• •

_

•

• NO

.-----------.•
~

•
•

LOGICAL

EXPRE~~ION

•

C10"5

•••••••••••••••
.--------.
·EAROR

..

•
•

FOlLOIHNG

v

• •••••••••••••••
••
RETURN
............. . •

-.

•

SEE

..

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

.. .. •
•
. .• •

V

(1050

•••••••••••••••
• 'Nf:XP
•

•

•

•

NOTE
•
•• ••••••••••••••

·NIl

•

LEGAL

tXp~fSSION?

•

-

•••••••••

.. ns

.

••

v
.
...................
.- . .•••••••••••••••.
....

. •••••••• x.&j
.* •
••

'1 ~ 1.0",,"01. _NO

•

JklAO NOT
USINU STKING
UM"Akt Of

.•

. ..

Lib?
•

.-

.

•Y'=S

v
.................

..•
•

•..

..

•

: PTK • 1-

_x.PT~

.

•

-

CIOI>O
•

. - ••

.

••

•
• • PREY InllS

>
• PTR -> TOKEN • • ............. x TOKEN !DENT "X••••
•
81.
TOKeN • * •••••••••••• x
• • PTR ->• 15'?
•
CONSTANT A
•
=
'THEN'?
•
•
•
..
.
)
.
?
••
•
-•
•
>
.. •
••
>

.

Kt::MOVt: U:ST •

..•••••••••••••••
'LLHI'ARE TRIAD.

*NO

.-.

~

-

.

.

-YES

YES

•

.....

.. YE:S

'1U

.A •••••••••••••••••

LI02u

V
...............
..
•..-EIU

..

..

v
................
••
•
(..R.tATt.

v

................
• ->
•

•••••••••••••••>

•

v

•

AuVANCt PT"-.

TO TOKEN

...

..

•

> ••• X BO-

: •.....
•••••••••••••••

! t~S~t~~lg~

112

Chart 15.

.. PARENTHESIS·

•••••••••••••••••
>MAKE PTR - 1 >

•>

• >THT. S.trCH >
..
=- THEN
•

•

.. .

• .NO

TOKEN

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

USED 139

v

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

->

•••

'X 83-

• •.:1::' C'1 • . . . .•••..
•
• YES

.

NmSl~XuSE

•

•••••••••••••••
COMPOUNU

•

.. ADVANce PTR ..
• ••
•
TO
....
..
.COll.RESPONDING •••• X 8).
•
RIGHT
..
•
•

THEN CLAUSE

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

•

PTR

•

v

fl8 Tt. H~E •
'1.AU~t

•
•

.

•

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

.. LOllfOI T IGNAt •

•

>

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

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

..

fOLLOlllNG
WTE

CI010

TOtC.E"·
• THEN'

•
•

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

·
•

•

Ii

RETURN

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

IF Generator

•

>

•••

v
•.. ••••••••••••••• •
• • ••••••••** •••• •
iU·TtJf.t~

~

1

. .... .

•• •••••••••••••••
.CON
•••
• * ••••••••••••••

. ••

• sou
..

v
••••••••••••••••

•
..
•

·

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

v
•••••••••••••••
•

v
•'ERROR
•••••••••••••••

•

·...
•

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

.-----------.
STATfMENT •

..

.-----------.
.. TOKEN .16 ..

..
•

..

ILLEGAL

C55

= ON

.. . •

•

•.

..

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

CATEGORr
••••••••••••••••
••

•

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

..

• ADVANCE PTR •
.TO SEMICOLON ..

'LATe~

•
..
•
•

v ***
• •••••••••••

V

..

• ANAL HE UNIT.
•
TYPE
•

•

PUSH DOWN
PROGRAM
STRUCTURE
TABLE

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

• • NO•

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

.-----------.

C0100
•••

.YES
..

• ..
•
PTk -> TOKEN
.......... *CO••• X..
';'7.
•• ..
..
•
..
......

C0035

·.~ONSA

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

•

. ...
..

•

.••

cnzoo

.YES ****

TYPE ENDF ILE

..

•.

.•

..

*

•

.X 60 ..
.. 2·

••••

.. NO

: x ...................... :

•

.
• ·..... ..
C0100

.. .X. •••co.

• YES

•.
*

UNIT

•ASSI GNMENT7
•
••
- NO
••

•

V

v
••• ** ••••••••••
..

v

• •••••••••••••••
••
..
RETURN
• .**•••••••••• ** •

..

•..

C0100

• ."0 •••
• .X• co.•
P -> TOKeN
1
.. •
•
. 'SY&Tf:M'
•.
•

.. •
•

. . .*.

•

"

• rES

• •
••

• •• TYPE
•

•

·

*

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

"

.

TYPE = 07
UNRECOG NIZABLE

·.

. . ..

. • .........."**04*X" .

..

_YES
..

oo*

. ..

" ~O

..*•• ******.*****"
"GENE~ATE

CODE.
"
TO ESTAS. •
"uN-UNIT AOOR."
*FOR WND TYPE"

••••

.. **

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

..

TOKf~

A I; '1

• ..

..

*

*

" ••••••••

.. NO

v

*
·NO

. . .. .
PTR + 1 ->
TOKEN A ' ; '1

*

.. NO

..

.YES

PTR ->

•• • ..
..

v

cozoo

••••

• SET SYSTEM •
•
..
••••••••••••••• X.ENOFILE FLAG •••• x 60 •
•
•
$fILON
•
•
2-

t:NoF IlE
1

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

• YES

•

OBTAIN
..
• ON-UN IT BAA •

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

. . . . . . . oo.o ... oo

x

• YES

: x •••••••••••••••• :

.
•.

••

***
.. ..

*YES

•

TYPE = 01

·.o • • .ooo . . . .

.• •

•

V *•••••
• •• * •••••

C0130

*GFNERATE COD~*
.. TO BRANCH ..

*C6 ... x*
..

***

"

..

..

AROUND

CONDITION
UI'II[T

..

..

..

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

V
***************
-ERROR
..

C0150

'*..*-------------*
SEf
FOllowYI\jr..
*"

NOTE

..

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

NO

·

V

C0010

v

.

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

***************
.. GEN COuc TO ..
..
ESTAIj SYS
•
.. ACTION FOR ..
•
t..OND TYPE
•

..

MAKE

*

.. TF:MPORAkY ..
-STORAGE TABLE_

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

QN-UNlT MUST
RF UNLABLD

*'
fNTRY
*
***************

H5

v

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

:x.o • • • • .ooo . . . . . oo • .o • • :

v

**"'*** ~*~*09'*.**
*

•
*PTk
*

:=

PTt< +

'"

..•

..
11< • .o.X
.:.
..
~

*** •• *********""

*** *
80.

.**

..

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

"**

"

DEFINE
* • *
ADDRESS OF * ... X 04*
•
ON-UNIT
..
..
..
*
* ***
***************

·

•*PTP
•

=

PTP

.
*

+ 2*
*

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

: x •••••••••••••••• :
C0032

v

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

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

Chart 16.

ON Generator (Page 1 of 2)

113

PLII SYSTEMS

MANUAL

SCON

.*...•••••••••••••••.
C0200

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

** .. --GENERATE CODe.•*
'CO ••• X- TO STORE
• •
*A(FCIBI INTO.
••
• PAR AM TABLE -

.. GET BLOCK ..
*BO •• X. INfORMATION ..
..

•

..

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

..

..

TAtiLE

..

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

.
.

V

..

*VES

ON-UNIT
*
ENCOUNTERED
IN THIS BLOCK ..

..
•

•

.. ..
?

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

..

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

.. NO

Ii

.

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

.GET SPACE Fa ....
..
ON-UNIT
..
..
PARAMETER
..

*

LIST

•

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

·

v

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

.

• SAVE AllOR. IN.
• bLOCK INFO . . .

..

TABLE

..

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

:x ................ :

·

•• *•••• Ii*•••••••
..

..
..

..

InCRtMENT

NUMBER Of
ENDFIlES

COUNT

..*
•

..

•

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

Ii

.

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

"GENERATE COOl.
*ro ESTA.L1SH •
*ON-UNIT ADOR.*
.. t-UR E:NuFIU: ..

~********.*****

Ii

.

***************
...ubTAIN
SPA;;E ..

.. FOR ON-UIIIIT •
:ADCO~v1~~A 20:

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

..

Ii

.******* •••****..
.. GEtIi (ODE: Tn ..
*STORE ADR OF ..
'uN-UNIT ADCON.
•
(c.eNT I
..

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

v

..:;< *******.* •• *::.*..
..

..

..

..

*

..

• ••

AREA INTO •••• X
• P~KAM TABLE"
..

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

114

Chart 16.

*

co.

* •• ..

ON Generator (Page 2 of 2)

(0}30

***********-***
CAll TO *
****
*.. G~NO~-UNIT
..
* ..
• INITLZR R13 •••• X C6 •
'SET TO PARAM *
* 1..
T8l
..
****

PL/I SYSTEMS MANUAL
SCRVT

**

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

*

SCRVT

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

y

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

·S8LNSA

•• -----------*
ANALYZE
•
ON-UNIT
•••••••••••••••••
••

o
•

•o

••

•

S~MICOLON

• • •NO•

OYES

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

ii

CRIl50

·•

?

.•

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

•
•

•

S~IP

TO
SEMICuLUN

•
•

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

ii

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

·ERROR

*------------.
41 ERtlOk AT - 41
'1b
•••••••••••••••••
41

41

:K ••••.•••••.••••• :
CR010
o

•

*

•

•

* ."u
••
• * ..•.•...
CO"DITION JK?
•
••
••

• * •YES

••

-

• *• TYPE
• ..

• -YES

• * .............. x.-GENEkATE
TO

· -.~NDF

?

ILE

•••••••••••••••
41
•

CR040

*••

CALL.
•
*
•••• X 88·SUBROUTINE - .
..
..
.PASS A(FCIeJ 41
•••
REVE~T

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

• NO

ii

•••••••••••••••
••
••
• STORE REVERT.

• CODE IN DSA •
••••••••••••••••
•

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

..

. ••

CR040

ii

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

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

.-

·BS-X.

Chart 17.

RETURN

REVERT Generator

115

PL/l SYSTEMS MANUAL

scnop

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

·
••

fCSTOP

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

• •
... P

•

••

..

• • • • .YIS
->.t9,fN A ••••••••••

.• • -•
-NO

-:'0................:
-...............Y

CiOZO

- AI/VANCE JlTR Sfal~~CIH

.........i..........
-EkROIl

TDm~G~6

..

...............
..x ..•••.••••...••.•.
:

:

V
...............

CS010

....
....
...................
.GENEIIUE CODE.. tALL .DUIIP ..

••..

116

Chart 18.

Y
...............

..
.
............... ..
RETUIIN

STOP Generator

PllI SYSTEMS M_L

IDe.p

............... •
............... •
loti..

•

y

••••••••••••••••
• PRIOR TO •••
'SET
.,
lERO
•
•••••••••••••••••

•

•

D~-V!tIAILE

·NO
•

'. •GE2~hm? •
• •
YES

DS2t••••••••••••

•• _LD ~PNO. ••

•••••••••••• "'X:O f 1:R l~oltTH:

•••••••••••••••
•
*
y

~

•••••••••••••••••
:vIR
lal~.rOF:
., RIGHT HA'tO .,

:•••••••••••••••
~~~:D N¥b l :
•

.,
•

INITlALIZE
THE 00

•

•

: •••• !1~! ••••• :

V.RtA8LE
.,
•••••••••••••••

DEC"

..

., •• • *'
*'34*X

.,

'"

.

.YES

•

BY CLAUSE

•

ii *••••
••••••••••
UNOPRT
•

.,

.

PRESENT?

•

*....... ..

DEa8

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

*-------------*
• •
• r.FN TRIADS •••• X 84_
.,., FROM STACKS".. ., ..

~o

·................
·................
v

-SET BY VALUE •
..
TO ONE
.,

:x ........ " ..•..•.• :

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

DE10

..
..
•

V

GENERATE
BEGIN DO
TRIAD

.,
•
•

v
·...............
.
• GEN FIB fRO.
*F OR 8RNCH TO •
*INST TO TEST •
•
LOOP TERM •

•••••••••••••••
v
•• *.* ••••••••••

·

• GEN DEF INE
• ADR TItO TO
•
SAVE 4DR
•
ICONTJ

.
•
•
"
"

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

v
.•.............
...............

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

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

*
•
".SUILO OPER £: "•
·'HOPRT.
• •••
" OF INST TO •
.-------------.
•
"
.INCREMENT DO •••••••••••••••••• x. OPND STK W ................... x. GEN TRIADS •••• X BO •
:
VARIABLE
:
:EXp~OT~AANCRE:
: FROM STACKS:
: •• ~.

Chart 19. DO-Loop Triad Builder (Page 1 of 2)

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

117

2

PLII SySTEMS MANUAL
SOEXP

...

•

•••
*So ..
••••• •

oe40

DUO

•

•••

• • •
. • • • 01.•

..

II

•
•
.~O
'00'
• • •• X'*r TKt

~

•YES•

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

••

...

*NO

••

•

_BRANCH 0"4 BY ..

...

·

•

.YES

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

IS STRING

·

.

•

-

•

....
•

......

CONSTlNT?

. ...

·

•••

• *x• 03-•
..

•

•

W I:xPR •

0 ~6~t)FnR

*

•

END OF lOOP ..

• WITH -

. . .0

INCR •

v
....•..........
.-------------*
•
•
...............
·S,.OPRT

VALUE TYPE

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

.GEN RFtB TRD •

•

:x ................................. :

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

DE20

V

•

.elD OPND &. OP.
'" FOR TST FOR ....................... x. S TKS W eXPR •
• TO 'ST fOR
..
• looP HID W + ..
•
tNCR.
.. END fCONT)
•

DE2e

..

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

•

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

'"
•..·SNOPRT
-------------*
•••• •
GEN TRt lOS * .... X C6'" FROM STACKS*'

11&

Chart 19. Do-Loop Triad Builder (Page 2 of 2)

.REP TST TPO .,.
"'FtB TRo TO SR.
• ON TRUE TO •

'"

•

•

END OF lOOP •

•

INCREMENT
VALUe A
CONSTANT?

lOOP wi TH '"
•

+ INCR

v
...............
•
•
................

TEST TRD •

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

y

••

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

•••
•
.REP

.C, .... x*w FIB TRD TO •
.• ..
.SR ON TRUE ro.
••
• END OF LOOP •

·................
.~

-

• GFN TRlADS •
FROM STACKS.

+ CDNST ANT

v

:

• •••1...........

v
.·•.....•......•.
.•
.·...............

OE44

*YES

•

Oft & OPNO*

TTK$

:

:

Y

.8~ 0

• . . . . . . . . . .DJ ••• Xtr

• • NO
•

V

VALue TYPE'"

..

•

•

TEST

D£44

• ·YES

NEGATIVE?

•

tNO

OE19

,~ ~Nrk-WE

..

•v
•

...............
...............
:W

'NO

=

•

GFN TAIAD

t
•
-REP TEST TRD ..

•••

• VALUE TYPE· • .X• 00*•
• •VUIA8LE? • • •

STRING?

•

•

v
.•.............

OHO
_YES

VAl.UE TYPE

*SNOPRT

.. FROM STACKS.

•

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

•

..

to

to

..

1'.0

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

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

..

•

OPNOO
W&EXPR
•
P 8. W •

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

••

.. VALUE TYPE

t

.YES
..

INCREMENT

••••••••

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

.

CONSTANT?

•NO

v
•••• ** •••••••••

•• *

·NO

•

•

* .X• 45.*

•

YES

:.•••..•.•••.•• x:

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

.GENERATE RF lB.
.. . . .
•
TRIAD FOR
••••••••••••• 08.X.
• stART or 00 •
•
••
.. LOOP 600V •
••

DE30

v

"'••*.-•........ ·
ExJT

•

•••

•

Pl.1I SYSTENS NMUAL

_ , SOOG2

••

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

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

tDOG

:

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

SDOG.

:

v
...............

•-SET ENTRY. 2-•

: TER"I~TOA :
.......l:••••••

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

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

V

Y

00005

•
••
••................. X:,O
•:E~l:~NTR1.~~T:
• ~ij
•
•
•

..............p-:.•
•

•

•
••

P -) TOKEN

00050
-NO

••

• • •YES
*

•

•

•

AI.·
••••

TE:~~nOR?

•

••••

• •
• •:

• *NO
• •........

110 TYPE DO?

• ••
•

YES

._. ••••••••••••.

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

-GENER38

DO~ll

•

••
••
.05* •• •
PTR" P
••
•••••••••••••••••••••

alTERATIVE DO •
•
ReQ
•

1(.

·

.

• X •••••••••••••••••

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

• • • *,.0
•
•
LUa
SWITCH • •........
••
ON?
•
••
• • •yeS

V

00010

••••
•
•
•
•
PUSH DOWN •
:86
••• X:NOHz'
T~ AT U==
•••
.~RUCTURr.TBL.

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

00015

•

•

•

00017

. ...
••

••••
eYES
•••
•
•
•
P -) TOKEN
••
•

....
*87 •

• * •

PROPER

TERf4JNATDfI 7

*

aX 05.

•

•

•

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

*

V-

SKI P TO
PROPER
TERMINATOR

.

*NO

110

STATEMEtH1

•

•

*........ x

•

• YES

• NO

00020

•

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

•
*GENI:R 16
•
•
* .................... x*1 LLEGAl. TOKEN.
•
•
•

v
·................
..

.·...........•...
.STORE POINTER.
.TI1 LAREL IN P.
•
TA8lE
•

·.. x .................. ...
v
•••••••••••••••
•
RETURN
•

............... ·
Chart 20. 00 Generator (Page 1 of 4)

...............
...............
ii

RETURN

119

""I _

I

SYST!tIS IIMIU&L

.aa~,

ooaI...........
....,
:
: .....
-• •
••............
sliNl!Q\/AIo.:···!
•'M'• • '
OooSO • • • • •

DGOtO

....

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

"X:SK .,.

.~Illt~'

0"

• • •YES

U:

.. -......•..•.••.x:...............
•IN..
:
• •
o

v_

o

••l.IDk2¥Pt~L
J
sl

_"

•

1

•

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

YES

..•............
.·...............
HiDE •
v

DOSU
...J.......•
o

._.lEltO·

Jr-

• AOOI

*

-

• ••EXP
• FIGURE OUT

•
•

•

*

v
• ..

0

*W

...
..
• •
"DAY
E.X9fl.£S-SlON?

•

•
•

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

DOZZ5

=~A~

• _!• 8~•

•
..
..• .
•
•

•

*

JY:~

.VIS

VARJAaLf'l

-................

••

oJ LLEGAL IN 00_

................
*GENE.t05

•

001:1............
.,.ENER22.
LIPI
•
*-----------*
,im••., ................. X:IL.LEGAL
TOKE-:-

D0061...
...
•
*tIO
E'PRf~S

•

*----------*
• ..... Iy EXPR ."

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

• •••.••••••.•••• X:--o;ruMO-:
•••••••••••
•
*INCOMPATI8lE •

ONO

YES

DOUi••.J•••••••
-c;eNER22

••

V

•

• AUGNlI' VAR •

•

OF.

L

·:...............:.. ......
·....................

v
...............
----*
...............

•

•

ITftm~ , :
TABLE NODE :

..

••
• • •YES

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

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

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

.......i .......

·•...............•-

DOI45

*
•
:S.KIP pmE~tGHT:

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

00135

V

:

00010

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

·GENER16

•

• •••

• • .-----------* • •
:A7: •• X:ERROR AT '_' : ••• : Bt••

001~

V

TEI~I:.lg.

: ••• •~ A':•

v .
.•.............
•
.SAVE TYPE AND.
: Lff:llg:¥ :

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

SIZE

•

·...............
TYPE .
V

.. SET
TO •
• THAT JlEOUIAED4'

.BY LEFT HAND.

: •••• Il{~ •••••:

...............
...............
V

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

• SP\lEXp.
.. seT P TO
• ------------.
.. POI NT TO
• FVAL STRING .................... X.
TOKEN
•
VAL EXPR
..
•
FOLLOwllrtG
..
•
.. EXPRESSION

120

Chart 20. DO Generator (Page 2 of 4)

DO~

•
• •••
•
..
•
•••• x 80 •
..
.. 3.
•
• •••

PLII 5 YSTE"S "JIIUAL

'DOG t lDOGa
DOGIO• •

•

•

•

•
••

• ••

•

• YES

001Z0

•

••

.........

,.

TO

•••••••2•••••••.. '
41------------*
:D~:] ~~ t~~~, :
•
•

"ES?

:It

•

•

.. vES

. ......
U0010

.YES •••

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

•.

... ,.. .... "'.,. ...... :
"'

= vf;S
SET.
SOOBY
..

.

• Xe • • • • • • • • • • • • • • • •

.·..•............
.·•..............
*TO

..

FOR

..

·

OO~8

V

*

P -'TOK!? .... ' ; '
.X Ab ..
0" ••• ?
. . . . 1.

*Uti$' TO ClSF . . .

.. USIKG LAST

·..................
·................
"'BY

D02~0

• *•••••• "',.

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

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

YES

•••••••
2••••••••
'GEM~RZ6

GE~ERZ6

:

•

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

.. •
yes

.. YES

DOlze

••ot!X;"

;

'NO

•

• •

•

......- _-- -.

...
...
....... •••••••• •x-rm ,ei;'RFSSJON"

•

°NO

BY • YES?

f)()ift ............

•

•

V

·..

• .NO

V

-=

Jfl010

"'NO

P -) TOKF'I
'WHILE" ?

YES SET '"

FOR SOOTO

..

•

=

••••
•

*....

0

8b ..

J*

*.*.

•

'" YES

·

.

• X . . . . . . . . . . . . . . . . . . . . . ,. • • • • • • • • • • •

...................
-..............
•
V

V

00100

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

.INEXP

•

··.................
*------------*
'"
fYAt FXPR •

DU.?lli

0

..
MAI(E
.....
.... ONREPlAl'ING _ ••• .K 81 ..
P Tql ENTp Y *
• 4.

*
...

"'*.'"

• ONO
• •........
•

•

YES

v
...............
·................••

•
•

• GE~ERATE USE •
• OF TEMPORARY •

:x ••.•.•.•.••.•••• :

......••.......
:
! ... : so:
:
•••••
................
v

•

SAVE

E~~~~Sf~8N

00080

•

• ••

lij~5::1r.oN:

Chart 20. DO Generator (Page 3 of 4)

121

..
011250

••••

'"

•

.
..•

••

00015

.yes ••••
• • •- •
T KEN
•
•
•
"0. *
*T
R
*x• •
*
OR?
•••• '"
• ,

'"

II •

••

• NO

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

•

•

P

• ·NO

->
TOKEN •
·NH't.~·?

··.... ·I"
00225

'" '"
••• '"

•

YES

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

•

••
••

·YES

P+l ->tOKEN A
?

*62 •

'"

• .X:t
• ••

-

*

00010

....

•

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

• • NO
•

................
- _--------.
. ....

00240

Y

00250

*GENER25

•

•

•••• X 80.

....

WHILE NOT

*FlWO BY PA-REN*

...

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

...

...

• ••

...

P = P .. 2

•

v
*------------*
* VAL OF
•

•••••••••••••••
*SNEXP
•

.•..............•
.LOGICAL EXPR ...

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

00221

V

... GEN TO TEST •

"LOG EXPR & IF... FALSE 8R TO •
... END OF lOOP •

•••••••••••••••
v *••••
••••••••••
...

SET P TO

...

•
•
...

TOKEN
FOlLOwthG
LOGICAL

•
...
•

................
.. eXPRESSION

*

.•........

• YES
P -) TOKEN A

• J' ?

•

• NO

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

00235

Y

• MOVE P TO PT •
TO TOKEN

*•

FOlLOWI NG

*

•

• It IGHT PAREN •
•
OF WHILE
•

v
..•............
..-------------.
·................
·GENER16

•

• ILLEGAL WHILE.
•

E XPR

•

:x .•••.••.•..•.•.• :

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

00230

y

00015

*..• •x 871. •

...........•...•
• ADVANCE PAST

.. LEFT PAREN

•
122

Chart 20. DO Generator (Page" of 4)

•

••••

Pl.ll SYSTEMS MANUAL
SDRET

.

..
...*..X:TaOl@~~lDr~~
..
D~065

o
..
o

•••••••••••••••
lukET
...............

0

•

:DO:••

0

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

v

•••••••••••••••
.ERROR
•
*-------------*
•
ERROR AT - •
tl6
••• ••••••••••••••
••

•
..
..

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

..

v

..

• * ••••..•.

0

.

DR02~

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

.D2*X

• EXPR THAT Of.
•
RET ATTR
0

o

•

••
...
•
..
• •

•••••••••••••••
OSNEXP
•

0 ·Nt.

kHukN INSlD~
UN-UNIT?
•

o

:

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

.. •
•
ESTABLISH
OSl ••• XO
RETURN
•
0
• ASSIGNMENT

•

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

••••

. ..

+-----------.
lNSU UN •
UNIT
•
•• ** •••••••••••••
,

lL~

uk025

•

•••
*x• 02.•
•••• •

••

..
..
•
•

•

.•

. .

·•..

•
••

->TU~EI~

•

..
•

KHUkN IN
tXTtkNAl
PMIC. ?

..

• .. •YES

•

• .. .. •
.. YES

...

..

*.*

..

••••••• ¥••••• **

.. .

*.*

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

*-------------*
* ERROA. AT - * .... ..x 85 ••

n •

EPILOGU~

DR029

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

.

Lik065

• *x. bl.•
..
• • ••• •
*NO

GENERATE
BRANCH TO

• ••••••••••••••• X:SKIPpI~E~IGHT:

V
.*.*.* •• ** •••• *
• ·NO ..••• •• DR062
•
*
• TO NEXT •..•
• • PTk ·c· ? A •• OX• 00.•• ••.B5 •••
.. X.MOVE
•.. TOKEN •.
.
..
••
..
•••••••••••••••
• • ..YES
Ok03~

..

•NO

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

TO~K~E~~GHT

• Nu

.. •

...

• *x• A9*•
•
•

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

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

:x ................ :

~P021

DP080

• ADVANCE PTR •
.. TO TOKEN
•
F(JLLOWIN~
•
•
• EXPkESSION •

'~l

¥

...
• • •

·YES

........Y-......

V
•o •••••••••
****.•

V

•••••••••••••••
*EKkO""
•

••

IN EXTERNAL
BLOCK?

• VE~

DR030

V

•

"NO
PU ->TOKEN A

..

*E~ROR

·
..

.16

• ••**.*

OR062
• ••

.*....
.*.

.*••••••

.••.
...
•

".? * ..* *x.. 00**
***
.. ..
*
•••••••••• X·02.
. ..
•

YES

...

..

DR 0 

IS "TR

..

IDNTFR ?

* ....... _...

TYPE

]S LABB.
ENDED IN

...
. ...
..

.. STACK AT ALL? ..

•

= BEGIN?
•

·NO

E0325

·.

•

.. •
Yf\

•

· ......

·YES ••••

·NO

TOKEN AN

.• •

NO

EG300

.

•PROCEDURE?

•

E0040

•

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

*GENER21"

.NO
..

*X 19_

v
..............
.
.. ...............
..

¥•••••••
..•••••••
..............

..

..

+ 1.

..
•

..

:x ........................... :

...............
••
••
·..••............
V

E0020

.. LAST •

*

YES

IS THE

..

•

·NO

..

STATEMENT

LABELED?

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

••

.. YES

................
------ -----.
v

*$tlLPRC

....
P"ROCESS
LABEL

..

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

..

..

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

E0040

.. •
..
• "9* ... X.
••••
:

LA ST = NQ

..

............... ...
V

'"
•
BRANCH ON •
•
•
...................... o. ....... X. TV'E ON TO' ..... X CO:
:OF P~iXLESTRC:
• ••••

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

124

..

:x .................... :

EDOZ5

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

Chart 22. END Generator {Page 1 of 6}

TYPE :::: OTHER

YES

..*A5*.. •• X*ILl
*------------*
..
END lA8Et . . . . . . . . . . . . . . . . . . . X.PTR = PTR
t
..
..
..
..

3·

· ......

• NO

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

.. IS LABEL

•

·YES ••••

TYPE ""
•

*X A3 •

•

NO

•

*x• A5.•
• •

.. YES

.. ENDED ON TOP
OF PROG
STRUCTURE
..
TABLE?

'"

TY'E ""
........................ X.
EP "" 1
...... X ..,2 •
• ITERATIVE DO? '"
2.
..
'"
•
•
• • fiII •
.., •••••••• **** •

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

..

BO •

'" 2.
••••

•

•

.,

.)It

'"

• •

V

INITI_lIZE

.....

DO?

•

EOOOS

·YES ••••

a

EX IT COMP ILER
ERROR

.X BO '"
.. 3·

* ..

PLIl SYSTEMS MANUAL
SfDGN & SfDGN2

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

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

E02Z4

IEDGN2

...• ...·
:"2
... ·

•

•

................•
POP teSS

•

•
•

END 7 .

..... .•

ANY

• ..........

.
v
·...............
.
·........•.......
•

•
••

'"

..

·................
·................
TO DO

• ••

•

TOKFNS

VES

V

RETURN

_____:

EOl4O

•••••

................ ...
:!!~!

·

ON-UNIT 't

............... .•
............... -

•••••••••••••••• X:'NO tl~ijsllSE

.YiS

• ·110
••

: ••• !

'"

8Z:

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

......

6=~u~~'

~ 82:

£0240

.
..:... ...
...............
:!~!..«2~

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

EDf,U ••

•
GE,.ERA'E
•
• BR,.. tH "CK •

•

•

•

x:

_____ :

·• .J._......• •
.•..............• •••

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

V

.•

·GfNERl6

• ................ X..-------------*
ILLEGAL
•
•

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

• YIS

• .NO
*

·

E0204

•YES

ELSE OMIT?

VI-S

TO TRI AD

•••

•

*tH.l.NGE DEF INE.
.lOOP ADDRESS •

•

EooO'

'NII

v•
"'.

••

•

· ';1"
•

• *x••••81*•..
,CSS?
•
• •
• • •••

•

'PTR

ED23~

'NO

·• x.................................. ..

•• •

- NO

-NO

'"

• * NIl
•

E0240

-

• *............. x •

l"ST SfMT 10

••• •
• •••.•.•.. •·sz.x

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

•
tVes

•

.YES

LOOP AODR "
TAUD 1

•

TAaU! E'fTRY •

•

'"
•

NON-ITERATJve
DO ?

•

ftENOYE'

•

••••

v
...............
••
.
•...............•
INIT AND
GCURR P

•

.SO .. X.

- •••••••••••••••

•
•

'"

:

•

E2r~IN

E021Q

:•••• ~

A~

.......i .......
•• GENERATE END.•
•
I TERATtvE •
• REPEATING DO •
•
•

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

:x •..•••.•••.••••. :
V

E0210

•

••••••••••••••••
•••
•
•
•
GE~Efl'TE

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

: ' 7: •• X:IRA:caO~~EEND:
••

•

OF lOOP

••

•

•

ED22~

· .•••.

.'1 5

ENTity EDGN .,

• • •itO

...............
· .
...............
Y

•

..

POP less

REMOVE P

•

.....

.X 80.

•

•••••••••••••••• x*

: fABLE ENTRY:

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

E0230

RETURN

•

•

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

Chart 22. END Generator (Page 2 of 6)

125

PHI SYSTEMS MANUAL
IEDGN ,

SEDGN2

£0300.

.0.

o

o

000

...

•

ED320

.YES

o

•*80•.. • .

0

•••

•

..0

*X AU

•

•

• "NO
•

0

v
·...............
.
................
..

OBTAIN

..

.. INITlAl•
_UATION NOOE •
•

0

v
.................
•
..
OEflNE
.. AODRESS Of
..
EPll.OGUE

0
..
..
..

................
o

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

E0325

•

...................
V

£0330

:A3 ....
.....
.......•.......:.....••..•••.•..•.• X:.................:..
..

..

..

..

..

X:SLfi~ ~S14~H

..

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

E0320
..

..

.GENERATE END ..

Brog~Em~D

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

E0334

V

..

GET SLOCK

..

*A4* •• x*GENERATE CALl ................... X. INfORMATION ..

..

..

..

TO $DuMP

..

•

TABLE ENTRY ..

...............
......................
ED335

..

.. ANY ON-UN) TS
ENCOUNTEREDelf ILE 1

·NO
..

.
v
...............
•

....

..

..
*FREE BLOCK'S •
C5 ••• X.
TEMPORARY
..
.. ..
..
STORAGE
..

* •••••••••

YES

o
•

..

·ns
o

0

MULTIPLY

•

.. NUMBER Of •
*ENOFll.eS BY 8.

o

NEED SYMBOL
TABLE?

0

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

v
·..•............
.
.GET SPACE IN
• DSI-STA.TIC
.. FOR eXTRNl
..
8lK

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

••

...
..

o

NO

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

E0342

•

•
•
•
•

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

V

OBTAIN

•..

•

•

o

•

•
•
..........._........ X. SET SYflt80l
..
.TABLE SVITCH ..

.•

ED347

••• * •

....

•

•

................. ..ft..

*Cl ••• X* PREVIOUS
•••• X 80 •
•
..
.SLOCK NUMBER"

·NO

BEGIN BLOCK?

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

o
•

0

• YES

.......
i.......•
•
• CRTE I T A8lE.

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

eOl35

•

••••

.. ENTRY USING •••• X C5.

• IOA OF

..

os.

BSON

IN.
•

•

..

• ••

·.......i........
•

GENERATE

•

.PANCH AROUNO •
.SYMBOl TABLE.

..***••••••••••0

•

:x .................. :

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

E03"-1

V

.. INIT IAllIE
• ADDR.ES.S OF

ED342

..
..
•
•••• X (1 •
• SYMBOL TABLE"
..
•

126

Chart 22. END Generator (Page 3 of 6)

PlIl SV5TEMS MANUAL
$EDGN , SEOOH2

E0395

ANY
DEFINITIONS

*NO

•

lEFT?

.............. X

•

.

*'

*

ENDED

* *YES

•

.

EXPLICIT
DEFINITION?

*

•

•

..

•

*

••••

....
*

*x

*'

•

AO •
5.

*S3

*'
.. x*

•

YES

'NO

*

NEED SYM80L
TABLE?

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

•YES

•

v
.·•.............
..•
·................

V

*'

REMOVe
DEFINITION ..
FROM A LIST.

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

..

....

.X 80 •
•
6-

•

•

• YES

................
·
....
.
E0360

*'.
• *'

••••

* •

·

.

ED4Z0
·NO

·NO

EXTERNAL

PRot fOUR E1

• ENO SYMBOL

•

•

•

TABLE

: x............................... :

...

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

...............
*'
·.....•.......... ...

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

E0347
·NO

* •

*x

NEED SYMBOL

..

lABlE?
•

•••

•

80.

•••

YES

V

E0341

*' GENERATE *.. • •••..
• SYMBOL TABLE •••• x BO.
•

ENTRY

*'

..

•

V

ED4Z5

*

•

-GENERATE REST.

*'

*
*

OF CDOE

*

;,

·SFNa

•

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

*'

•

GET

•

NON-BLANK

•

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

• YES

•

END OF
SOURCE?

*

• • • 4o 404o . . . . .

·

• NO

.......•.......
.·...............
-------------.
.
v

*GENERI07

•

• E XTRA SOUR.CE •

*

*

:X •••••

ED900

•

•

;,

4o • • • 4o . . . . 4o.

4o:

•

·NO

*

SEVERE ERROR?

•

•YES

•

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

* •• 4o .4o •••

*

4o • • •

X.

•

•

• SEVERE ERRORS ..................... X.

•

Chart 22. END Generator (Page 4 of 6)

*

EX IT PHASE 2

••

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

y

·GENERI08

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

•

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

....•..........
TE~~I~ATE

127

PL/I SYSTEMS MIINUAL
SEDGN , SEDGN2

...

*

.

* * *
..*AlI ** *

• ..

ED360

* .VIS :••••

. ..

I "PLlt IT

.X 83 •

•
*'IlEFINlflDN?
..••
o
.. •

***

0

.0

ow

..

..• •

.

...

ED360

.. .X.. 83 . •

. ....
.YES . . . .

PARANETER?

*

••

.. •

4_

"NO

•••••••
2.......•
*
.. aUCH ON
.. DUINlflDN

•
..

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

•

'YPE

.

.

"

v

•

*

..•
.

..

• YES

.

*

.-NO

DEFJIIiIJTIOl\f
•••••••••••••••••••••••••••••••••••••••••••••• x.
TENTATIVE AND
........................ .
.. TYPE 'Z EMTRY? ..
.. USED BIT OfF? •

•

-

*

NO

*

.. . . ..

*YES

."....
....

E0380

.. *...

. ...
·YES

..

•

OEFINITIO..
.. TYPE. FILE?

..

•

£D36O

•••

"
OS*

•• x 83 •

CAll & RESET

•

..

4*

.. NO

:x ................ .

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

•

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

• YES

.. .= . .
.
DEFINITION

.. TYPE

LABEL? •

.

•

.. NO

BLOCK l'

-

* ..

•

..

. ..

EDl6-5

1=ORMAT

•

OEF INITI0N?

•*

•

•

•

................ X

ED3&0

*GENER28
•
*----------*
•• ••••
•
UNDEFINED •••• X 83 •
FORMAT

•

•

4.

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

'28

Chart 22. DID Generator (Page 5 o'f 6)

••

•

•

*

USAGE

.•

BLOCK?

*

*

• NO

.YES

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

-

...............
V

ED367
•

•
• D
*TO
•

.

E0370

D~~Laft.IION

YES

V
•••••••••••••••
•

..

•

..

It-

-NO

ED360

DEFINITION
TYPE = OTHER

E0360:

.YES
*GENER29
..
"*
• ••••••••••••••••••••••••••••••••••••••••••••••
• *-------------*
• ...
oS ••• X.
I "PROPER
•••• X 83 ••
X * IN EXTERNAL

*

••••
• *
•• X 83 •
.. 4·
••••

V

ED380

M

•

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

•
*NO

EOl60
• •••

*

DECLARATION
COMPATIBLE?

•

•

•

lYE •
•
•
TIDN
X 83 •
OUTER-. 4.
LOCK
•
• •••

*•••

•

..

•

••••••••

YES

V
•••••••••••••••
RESOI. YE
•

•
•

•

E0360

*

• ••
•
•

: ... ~ 8:••
• •••
•••••••••••••••

:

TENTATIVE

e~f~A~~l~~

•

• OECLARAT JON.

PLII SYSTEMS MANUAL

6

$I!OGij t $EDGNZ

.....**••••••••••••.
•
•
*GE T OUTER eLK*8-0 •• X* NO FROM ILK •

'"

•

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

INFO T8l

••••

•

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

v
·...............
.
...............

•••
•
:c 1:.. x~8IAA~t:ic~l:

v
...............
+-----------*
·................

•

• SET CURRENT •
_SlOCK NO TO.
_THAT OF OUTER_

•

BLOC I(

•

•

_HeooE

SO FAR

V

.GENERATE END •
.C2* •• X. OF SYMBOL •
..
TABLE
..
•
•

•

•

*NO

-REMOVE BLOCK •

...............
., INFORMATION·

*
•

v
...............
...............
*
*•

YES

·

.

*

•

'"
RESOLVE
•
.BRANCH AROUNO •
• SYMfliOL TABLE ..

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

'" TABLE ENTRV •

•

.

v
••• *•••••••••••

•
••

RESTORE P

• *...••...

BEGIN BLOCK?

TABLE ENTRY.

*

'"

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

v
·...............
.
•

UK

E0391

•

*GEN ALL CODE •

•

...

*

:x •..•••.••••. •••• :
'"

FOR BLOCK
ENDING 1
•

'"

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

•

ED391

OUTER BLOCK
HA<; TABLE?

*

'"

.. NO

•

.X C2.
•
•

........
•••

'"

............... x*

Chart 22:. END Generator (page 6 of 6)

BEGIN BLOCK?

*YES

• Y~S '" ••• '"
'"

·. .

E0224
·YES ••••

*NO

'" NEED A SyMBOL

.X 90 •

.

•

NO

V
•••••••••••
*•••

•..

•
**
••2.

*

f0224

••••

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

RESOLVE
•
•
•
• SRANCH AROUND •••• X 80 •
BLOCK
•
•
2.
•

'"
C 1-

129

PL/l SYSTENS NANUAL
.ENDES

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

•
•• .ENDES
• ............... ••

• •

• ••

•

- .•
-NO

v
...............
•
•

.

-

.
................
• DEF INE END OF•
• ElSE ADORESS -

:x •.•.•••••.•••••. :
V
...............

EN010

•• PUP

•

PROGRAN •
- STRUCTURE *
*
••• **•••••••••••
CSSJ
*

*TABlE (RESeT

.......i.......

•
•*• RETURN
................ •*

130

Chart 23.

Process End of ELSE

PLIJ Sl'STEMS MANUAL
SENOON

...............
•• aENDDN
•
• ••••••••••••••• ••

• v• •
•
-YES
•

fNI05

•••••••••••••••••• •••••
TO CALL * .•• x 8 ••
• •• ERROR UNIT? •• * .............. X.•• seT IOUMP
•• •.** •
•
•
••
...............
•
• • •NO
• V• •
...............
•
·YES
••
• •••••
•
•
•
CALL •
•••• X 114.
• • END fiLE UNIT • ••••••••••••••• X.• SETIHEERRN
•
•
•
••••
•
••
•
...............
•
• •

ENI<:~

f(I

.NO

v
...............
••
• ser ro
•................•

••
•

.cALL •

1HEERRR

-.

V
.................
•

ENIOS

•••

: . ' :•• x:GEhERAli aN- :

•

•

.•

..

EPfU.Gllfi

•

~~~u=:.:

·

v
...............

.

•• •A1IICH
;c.c$U.ve
•
AR_.

•

IiN-jJ,n J

•................••
;
...............

:• P~::t~:M:•
.fABLE IkESEf •

:••••iiU.....:

v
...............
•
•
: rU~~my :
•
•
...............
•

srORAGE

•

v
•• •••••••••••••••
RETURN
•••
•

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

Chart 24.

Process End of ON

131

PLII SYSTEMS MANUAL
SEXPND

••
•

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

................ •
$EXPNO

•

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

.. . *-----••

..OEXP

*BOO .. XO

•
•
•
•
•

•

.pur

TEMP PTR •

:•
TABLE
•• ••••••••••••••

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

v
•••••••••••••••
·:PUI
.:

V

•*NSUB=D

i~~MN

pzPTR •

molO~fi~TE~~R:

.SUBYTITUTION •
•
TABLE
•

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

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

v

v
•••••••••••••••

v
...............
•
•

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

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

•••••••••••••••
•
PUT LEfT
•
*

PAK~N IN
SUbSLRIPT
*
*SUbST ITUTION
•
lAdlE

v

OdTAJN

..

•

POINTER TO

•

•
••

'FOk DIM

V

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

•
•

..• .•
. ...
*

*yr-oC;

***

*x

Tnl(Etj A

'I' "

R6 •

N~

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

•
•

• *•••••••

P -)Tl}K.E." A1I.

'.' ?

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

•
•
mpM~Ec~?~~A:

COM~A'

v
••** •• *.*.****.**••
••• P = P t - l ·••

EX025

* *••••

*

•••••••*V•••••••

•••
•
..

.

•

eX040
•

...............
.. v . ...
5F 1

Chart 25.

.•

TO

OR RIGHT
PARE,..

fX052

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

•

•
.NO
NSU8 >=
DIMENSION OF
*X A'S.

••

•

•

v
•••••••••••••••
•
•

132

CROSS
SECTION?

V

:A5: •• X:Ge~~R~~~E~SE :

**.

.•

E)(050'

·VES

.. UPPtR dUUNO ..

EX025

..

••

• SUBNUH + 1

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

*s_ I P

+ 1.
•...Nsua""'Nsua
SUBNUM =
•*

•
•
•
•

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

•

IN PRDG
STRUCT TABLE

:!Mm5m~

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

exOIO

~UT!'
ITERAjIV~ DO

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

v
.................
• RESET TRIAD
•
LIST TO
• BEGINNING Df
PAIUIAL
•
• EXPRESSIDN

•

SEE NOTE 1 •

•• ••
• YFS
V

*'t •••••••••••••

..

p = p +

1

;:1(1'125

..• .•. .•
..

**.

..... x A" •

•'" *•••••••••••••

.....

I'LIt snTI-' MANUM.

""'NO

•
:• •••••••••••••••
""'flND
••

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

.......t.......
••
••
••• N • II.PCT •••

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

.......t.......
••• F.,F TABU'••

••
••
...............
Q

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

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

:!!£!~----:

:mm
,~~ P':
...............

·

.......
t·.......•
•
•

•

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

N'N-i'

~
• • • 'YIS
:
• • II ) 7 •........
•
•
~

• • • •,m
~

•• ••••••••••••••• ••
•
•
~"URN

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

Chart 26.

END Expand

133

PART 4 - DECLARATION PROCESSING
The routines described in this subsection are concerned primarily with
creating and finding definitions (declarations) of variables. Four
types of declarations are allowed:
explicit
implicit
contextual
tentative
Understanding of these types of declarations is essential to
interpretation of the declaration-processing routines. The types are
discussed under -Declaration Processing- in Section 2.
The routines concerned primarily with declaration processing are listed
below and described in alphabetic order according to their mnemonics
on succeeding pages. Detailed logic diagrams for the routines appear
at the end of the subsection.
Attribute Analysis ($ABAL)
Attribute Node Creation ($ANCRE)
Label Processor ($BLPRC)
DCL Generator ($DCLGN)
Locate Identifier ($ FSYM)
Locate Variable ($FVAR)
Some attribute entries are processed in routines described in other
subsections (for example, PROC Generator). However, such routines
are not concerned primarily with declaration processing.

134

TITLE:

ATTRIBUTE ANALYSIS ($ABAL)

Program Definition
Purpose and Usage
The Attribute An~ysis routine is used by the DeL Generator to prepare
a bit mask and table of option list pointers that represent the
explicitly declared attributes of an identifier.
Description
Each attribute that it is possible to explicitly declare for an
identifier is assigned a bit position in an attribute bit string.
This bit string must be long enough to contain one bit for each
attribute and for each optional list. If the bit denoting an attribute
is one, the attribute was present; if zero, the attribute was not
present. Each attribute list is assigned a pointer that points to
the left parenthesis token of the tokens that describe the list. Thus,
the attribute table consists of the attribute bit string and the
pointers. If an attribute was specified without its list, a
corresponding bit is set but the pointer for the attribute list is
zero. (For a description of the attribute table, see ·Compiler
Variables· in Appendix A.)
When an attribute is encountered, an attribute conflict mask for the
attribute is obtained. This conflict mask is the row of the attribute
conflict matrix (see Figure 3-1) that corresponds to the attribute.
By performing a logical AND of the attribute bit string and the conflict
mask, it is possible to determine whether the new attribute conflicts
with any previous attributes. If not, the bit for the attribute in
the bit string is set to one. If the attribute is of the type that
may have a list, a check is made to see if one is present. .If not"
and the list is only optional, processing advances. otherwise, the
pointer for the list is filled and the list is skipped.
This routine finishes processing at the end of a continuous, unfactored
set of attributes.
Errors Detected
ERROR AT I
I
(16)
ILLEGAL LIST AFTER ATTRIBUTE'
'FOR IDENTIFIER I
FOR IDENTIFIER I
I
ATTRIBUTE-'- 'CONFLICTS WITH-PREVIOUS ATTRIBUTES. (59)
--LIST MISSING AFTER ATTRIBUTE ' __ ". (60)

(58)

Local Variables
ABTB

Attribute Conflict Matrix

Program Interface
Entry Points
One entry point accepting a pointer ($PTR) to a token in the
token table.
Exit Conditions
Exit upon detection of a comma, semicolon, or right-parenthesis
token. $PTR points to this token.

135

.S!

!

I

:;

a6 it ""s

II ~

X

File

X

Input

X

X

J:

~

l t!

I

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

I

i

X

X

X

~

.3

i
•• ..
(;Q

Jb' :i i..

!

i&
a

IlII

t

>C

tJ

<

:

&.

X

X

X

X

X

X

Oatpal

X

X

X

X

X

X

X

X

X

X

X

X

X

X

I'IiIIt

X

X

X

X

X

X

X

X

X

X

X

X

X

X

S'tIICic:

X

X

X

X

ASI_'k

X

X

X

X

L*f

X.

X

X

lit

E~

Retuns
CJIaraau

X
X

X
X

X

X

X

ilDIl
flDet

X

X

X

X

Compb

X

X

X

x:

Real

X

X

X

X

x

x x x

Eaay . . . . . . .

x

x

.X

x

I"IecWeD

X

X

X

X

.....

X

X

X

X

X

X

X

X

X

X

X

X

X.

X

X

X

X

X

X

X

X

lit

X

X

X

X

X

X

X

X

X

X

X

X

X.

X

X

X

x x: x x
x x

x:

x x

X

X

X

X

X

X

X

X.

---

X

X

X

x x x x
X x: x x.

EatIy

X

x
X

!

X

X

x:

x

x

X-·

x x

x
X

x
x

X

X

X

X

X

x

x

x

X

X
X

X
x x x x
x
x
x- x x
x
X X
x
x x
x x
x x x x
x
x x x x x x

x

X

X

X

X

X

X

x
X
X

,

Pigure 3-1.

Attribute con£llet llatrix

ROutines called

Error

Meaaa~

au. tor:

Global variables
A List

Ifa8Ie of CUrrent Identifier
Dictionary Attribute List

$AB'1'BL
T '!'able

Attribute Tabl.e
Token '!"able-

$DCRME

Comments

Ease of access of conflict masks depends on convenient ordering of keyword codes. order desired is continuous codes in the following order:

FILE
INPD'l'
OUTPUT

PRINT
S'l'ATIC
AO'l'OMA'l'IC

LABEL
ERVIROlUtER'J.'
RE'l'URRS

CHARACTER

ENTRY

FIXED

FLOAT

COMPLEX

REAL

Logic Diagram
Chart 27 shows the detailed logic diagram for the Attribute Analysis
routine.

136

TITLE:

A'rl'RIBUTE NODE CREATION ($ANCRE)

Program Definition
Purpose and Usage
The Attribute Node creation routine translates the information in the
attribute table ($ABTBL) into a dictionary attribute node. However,
it does not enter this node into the dictionary attribute list.
Description
Because file and entry name declarations require special handling,
the first distinction made after entering this routine is whether or
not a variable is being declared. This distinction is made using a
logical AND of the attribute bit string and a classification mask.
This classification mask and other classification masks used by the
Attribute Node creation routine are shown in Figure 3-2. (For a description of the attribute table, see ·Compiler Variables· in Appendix A.)

M.... Clauifications

Mask J: Not Arithmetic Cia..

x

X

x

X

X

X

M.... 2: Enlly Claw
Mast 3: Pi.. A...

X

X

X

X

X

Ma... 4: Not Vlriable Cia..

X

X

X

X

X

M.... J: Mode and Scale

X

X

X

X

X

X

X

X

X

X

X

X

X

X

Ma.... : Mode
Malk 7:

S~

Figure 3-2.

X

X

X

X

Classification Masks

If the declared entry is not a variable, it is determined whether a
file or an entry name is being declared. In either case, space for
a dictionary attribute node is obtained, special attributes are encoded,
and transfer is made to the section of the routine that encodes the
common attributes shared by all declarations.
Since entry name declarations may have entry name declarations within
them, a push-down list is maintained which indicates the processing
state when a nested entry name declaration was encountered. This entry
name declaration list allows this routine to be pseudo-recursive.
The contents of the list entries are:
1.

Pointer to the entry attribute node being processed (P$SENT).

2.

Number of parameters previously processed (P$ZNP).

3.

Pointer to last parameter attribute node processed (P$ZPRM).

4.

s~ate

5.

Pointer to current position in entokeninq of parameter list (P$ZETK).

of processing (RETURNS attributes or parameter list (P$ZSP».

For convenience in storage, this push-down list is kept in the program
structure table. The top node of the push-down list is kept in the

137

local variable ANPDL. (For a description of the entry name declaration
list, see Appendix B.)
If a file declaration for SYSrN or SYSPRrRT is made, a search is made
to see if there is a corresponding external definition (in block zero).
If not, one is created that is the same as the definition just made.
If so, the new definition is compared with the corresponding definition
for consistency.
If a variable is declared, space is obtained for a dictionary attribute
node. The size of the space depends on whether the variable is
dimensioned. If it is, the dimension list is analyzed at this time.
Checks are made to ensure that all the specified bOunds are legal.
If necessary, code is generated to eval uate the bounds at execution
time. A skeleton dope vector is established for each dimension
variable. All bounds of constant value are initialized into this
skeleton dope vector.
If the variable is arithmetic, any preciSion, mode, or scale defaults
are added. The arithmetic attributes are then encoded and transfer
is made to the common attributes section (see below).
If the variable is character, its string length is evaluated in a
manner similar to dimensions. Any string attributes are established
before taking care of the common attributes.
The common attributes section establishes attributes such as scope,
type of declaration, and block in which information was declared.
All actions to complete the attribute node are performed.
Errors l)et:eeted
ERROR AT'
'.(16)
I~ USE OF ' _ " A"I"l'RIBO'l'E. (20)
ILLEGAL RETURNS A'l"i'RIBU'l'ES--DEFAULT RETURNS A'l'TRIBU'l'ES USED. ( II 1)
USE OF'
• HERE CONFLICTS WI'l'B PREVIOUS USAGE. (51)
PRECISION A'l"l'RIBUTE IS rLLEGAL--DEFAULT USED. (62)
ILLEGAL PARAMETER ATTRIBUTES FOR'
'. (63)
ILLEGAL SCALE FACTOR FOR'
'--IGNORED. (64)
NOT ALL DIMENSION EXPRESSIONS ARE CONSTANTS. (65)
FOR STRING'
j
LENGTH NOT A CONSTANT. ( 66)
•
'BAS IL~GAL LENGTB--225 USED. (67)
, - . BAS ILLEGAL '.' DIMENSION OR STRING LENGTH. (68)
ATTRIBU'l'E FOR FILE'
• CONFLICTS WI'l'B PREVIOUS DECLARATION OR USE. (69)
IMPROPER ARRAY BOUND:-(104)

Local Variables
ANAPT
ANTPTR

Register G3
ANPDL and ANPLEV
ANDVL

Internal Routine Return Point
Entry ValUe of $PTR
Address of Attribute Node
Entry Name Declaration List Pointer
Dope Vector Length

Program Interface
Entry Points
One entry point.

Only input required is an attribute table and $DCNME.

Exit Conditions
•
Normal exit only. output consists of a pointer to a dictionary
attribute node in register GO.

138

Routines called
$ABAL

$CERR
$NEXP

$STRD
$GTRIAD
$ NCONS
$AREXP

$XERR
$WCTCT
$WEXP

Attribute Analysis
Compiler Error
Expression Processor Controller
Generate Triad
Get Next Triad Entry
Constant Processor
Array Expression Error
Error Message Editor
Segment Management
Segment Management

Global Variables
$DCNME
$APARM

A List
I Table
J List

Name of CUrrent Identifier
SWitch Determining Whether Identifier is Parameter
Dictionary Attribute List
Initialization Table
Dope Vector List

Logic Diagram
Chart 28 shows the detailed logic diagram for the Attribute Node Creation
routine.

139

TITLE:

LABEL PROCESSOR ($BLPRC)

Program Definition
purpose and Usage
The Label Processor defines the address of a statement label or entry
name. It also resolves any tentative declaration previously made.
Description
Locate Identifier ($FSYM) is called to find any declaration in the
current block of the identifier pointed to by the label pointer. If
a previous declaration has been made, a check is made to see if it
is tentative. If not, a multiple declaration exists (which is illegal).
If the declaration was tentative, a check is made to ensure that its
usage was compatible with the type of declaration being made.. All
tentative declarations within the proper scope are resolved.
An attribute node is made for the declaration. The definition is added
to the dictionary attribute list and the address of the label is
defined.•

Errors Detected
MULTIPLE DECLARATION FOR W
w_-THIS DECLARATION USED.
USE OF w_re HERE CONFLICTSwITB PREVIOUS USAGE. (57)

(56)

Local Variables
None
Program Interface
Entry Points
$BLPRC. No formal parameters. This routine determines whether it
is to define statement label, FORMAT statement label, or entry name
by the value in $CLBLS.
Exit conditions
Normal exit only.

Register GO has pointer to attribute entry.

Routines Cal.led
$FSYM
$GTRIAD
$XERR
$WEXP

Locate Identifier
Get Next Triad Entry
Error Message Editor
Segment Management

Global Variables
$CLBLS
A List
N List
T Table
I Table
$CLPTR

Label SWitch
Dictionary Attribute List
Dictionary Name List
Token Table
Initialization Table
Label Pointer

Logic Diagram
Chart 29 shows the detailed logic diagram for the Label Processor routine.

111n

TITLE:

DCL GENERATOR ($DCLGN)

Program Definition
Purpose and Usage
The DeL Generator directs the analysis and encoding of attributes for
identifiers in a DECLARE statement r and adds the attribute entries
to the dictionary attribute list (A list) upon completion of encoding.
During this process r code is generated r if necessaryr to allocate space
for data and to construct dope vectors.
Description
The attributes explicitly declared for an identifier are maintained
in a bit string r one bit assigned to each attribute. If an attribute
has been specified r its bit is one; otherwise r the bit is zero. Before
beginning any attribute analysis r the bit string where the attributes
are accumulated is initialized to zeros. The Attribute Analysis routine
($ABAL) is called to analyze the attributes immediately following the
identifier. On return r any factored attributes are analyzed r one
factoring level at a time.
The DeL Generator keeps track of the factoring in effect by maintaining
a push-down list of pointers to the right parenthesis token starting
the factoring level. When the right parenthesis is reached r its pointer
is removed from the push-down list and the attributes following it
are skipped.
When all the attributes have been analyzed r a check is made to determine
whether the identifier was previously declared or used in the current
block. If so, and if it was not used only as a parameter specification r
a flag is set to indicate possible multiple declaration or use before
declaration.
At this point, the Attribute Node Creation routine ($ANCRE) is called
to translate the bit string and a table of pointers to option lists
into a dictionary attribute list entry and the necessary code. The
entry just creat~ is added to the dictionary attribute list unless
the error flag is set; if set, the new definition is checked for
compatibility with the previous declaration.
After an identifier has been completely encoded, translation of the
next identifier in the token table begins.
Errors Detected
ERROR AT'
• (16)
STRUCTURESNOr SUPPORTED--'
'IGNORED. (18)
PREVIOUS DECLARATION OR USE-oF'
'. (21)
Local Variables
Push-down list kept in left parenthesis tokens in token table:
DCPDL
DCPTR

Push-Down List Head
Temporarily Saved Token Table Pointer
Possible Error Flag
Check for Compatible Definitions

DCERR

DeDEF
Program Interface
i

Entry Points
$DCLGN.

No formal parameters.

Exit conditions
Exit after translating all of DECLARE statement and reaching a
semicolon token.
Routines Called
$ABAL

$ANCRE
$FSYM
$XERR

Attribute Analysis
Attribute Node Creation
Locate Identifier
Error Message Editor

Global Variables
$PTR
T Table
A List
N List
$CBKNO
$DCNME
$APARM

Token Table Pointer
Token Table
Dictionary Attribute List
Dictionary Name List
Current Block Number
Name of Current Identifier
switch Determining Whether Identifier is Parameter

Logic Diagram
Chart 30 shows the detailed logic diagram for the DCL Generator
routine.

142

TITLE;

LOCATE IDENTIFIER ($FSYM)

Program Definition
Purpose and Usage
Locate Identifier finds the definition of an identifier that occurs
within a block with a block number greater than that one specified.
Description
The dictionary attribute list for a given name entry is searched until
a definition is found which had last usage or declaration with a block
number greater than or equal to the block number specified for the
search. This determines whether the identifier has been declared or
used in the block or in a block which is internal to the indicated
block. If one or more definitions is found, the one with the greatest
block number is returned along with a success indication. If none
is found, a failure is reported.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$FSYM. No formal parameters. Needs pointer to a token table identifier
entry in G1 and block number specifying where the declaration must
be in G6.
Exit Conditions
Normal exit only. Returns a success indicator and, if successful,
a pointer to the dictionary attribute list entry in GO.
Routines Called
$CERR

compiler Error

Global Variables
T Table
A List
N List

Token Table
Dictionary Attribute List
Dictionary Name List

Logic Diagram
Chart 31 shows the detailed logic diagram for the Locate Identifier
routine.

TITLE:

LOCATE VARIABLE ($FVAR)

Program Definition
Purpose and Usage
Locate Variable is used to locate the current definition of a variable
and, if none, to create a definition.
Description
If the input consists of a pointer to a dictionary name list entry,
the dictionary attribute list for that name is searched for the current
definition. If an arithmetic identifier is being sought, the search
encompasses all blocks. If a label. identifier is being sought, only
the current block is searched. If the definition found is of type
label, the mode of search is set to label for use by further searches.
If a definition is not found, a definition is created depending on
the mode of search and the contents of the token table. The results
for the various modes of search are as follows:
label

a tentative statement-label declaration is made
in the current block.

file

a file declaration is made in the outermost block
(as well as an external declaration).

arithmetic -

if the token following the identifier in the token
table is a left parenthesis, an entry name is
declared. if it is not, an implicit variable
declaration is made.

entry name -

a check is made to determine whether a block adcon
area (BAA) must be allocated.

Any created declaration is added to the dictionary name list and the
pointer to the definition returned.
If a previously used declaration is returned, no check is made to
insure that it meets the requested mode.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$FVAR. No formal parameters.
entry in G3.

Requires a pointer to a token table

Exit Conditions
Normal exit only.
entry in GS.

Returns a pointer

Routines Called
$WEXP

144

segment Management

to

a dictionary attribute list

Global variables
T Table
A List
N List
$NIDSI

Token Table
Dictionary Attribute List
Dictionary Name List
Identifier Search Indicator

Logic Diagram
Chart 32 shows the detailed logic diagram for the Locate Variable routine.

145

PART 4 LOGIC DIAGRAMS
~or

The detailed logic diagrams
processing routines follow.

the CALL/36o-0S PL/I declaration-

PL/I SYSTEMS KANUAL

SABAl

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

.............
SABAL

... "

.YES

........
*.41.) ..

"

..

TOKEN
Jut:NTlFHR?

..

A6-015

Aa~~;.* ......... ..

Ai\QO$. •

,.•••,. . .

•

·

...

*'

..

...

•

..•••• . .

.............•. ....
* ... .oX

............................. )1*
OS-lAlN
..
.KEYWORD CODE:"

..

...

AO "
.. 2-

••
..

"

*C.3*)(

..

..

·· .......

·

.......

.·"" •

(3-

.. .
plW~~~H:!i~~ ..
....

* ........ .

tOKE'"

.
."'"

·

*x..

'3..

y

............... ··
B;ETVRN

V

.

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

v
...............
·................
:!!~~:--------:
•

EkROM AT -

•

•

.16

•

...............
,;

RETURN

Chart 27.

146

..

Attribute Analysis (Page 1 of 2)

..

...

..

...... x AO ..

..

.. 2**
••

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

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

"x:

...............
...............
:
:
..........•....
•

*C6 •• ". $10 P TO END ..
....
.OF ATTPI&UTES*

.x ..................... ..
A8Q10

If:EYIfGRO?

ABtl19

•••

.. viS

.

.

..

~OR

otMEKSION.

•

•

................ JC:KEY~3:~1~ODf : ••• ~ A~ ••

... .·............,.....
.....................

· .....
...

..

•Yi S

.""
A8015

TOKEN
SEMU:OtOH7

..

III

·'is

•••

_NO

..

...

* ................. )I.SET com:

*
*NO

... YES

T01(I;N UsMMA?

•

. . . . . . PAfI;ENTHESlS1

1t6()1"

-NO

*x

..

.YES

JOKEN LEFT

NO

•

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

..

•

*.*•

._.• • • • ---• •

A8019
.NO

-

- -

•

....

* *X*

*AO.

••••• • •LEGAL CODE?.
• •
• YES
•
••

.....

-

C6

**

1·

• ••
• NO
*

* x9mAm~G
*
•*

-•

A8150

•

•

*

TO MASK
*
••••••••••••••••
•

•YES

••

if

•

*•

-

if
•••••••••••••••
..

·ERROR

..

• •••••••••••••• X.AOO ATTRIBute.

••••** •••••••**
*•
*•
.MOVE TO NEXT •
*
TOKEN
*
*•• *.*****••***

·

•
A8100
• * • • .NO
••
*·Cl*X
- • * LIST TYPE • .........................
•• * NOATTRIBUTE?
•
* • • •YES-

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

A6005

• •••

*-------*
.. ..
PRE VlOU 5 *••• X A3 *
*• ATTkl.
'59 •
• I.
..•••••• *** ••***... ****

*

v*

-

Ammm

••

• • •NO•

A8I00

• *x••••
•
Cl.
• • •n. •
• YES

-

-

v ***
•• *•••••••••

if ** •••
••••••••••
_ERROR
•

·

A8140

*-------------*
ILLEi~h LIST:
•••••••••••••••••

....

if
••••••••••••
**...
..

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

• SET T AFTER - ••• X A3
• PARENTHESIS.
•
I.

•
•.HOVE TOKEN
TO NEXT -

if
•• •

• ••

•U •ST

-

••

•*
• - NO

•

****

A6005

•••*

• •
• ••••
* *

-

*------------*
•
NO 1I ST
•

--

•

if

•••••••••••••••
.
.
.. SET PROPER

..

·

•

A8005

..
..
.lIST POINTER •••• X A3 •

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

TO NULL

..

•

1.

•

-

.

. ,.•
***It

*x•

A3 '"

****

YES

if

***.**t-********

-

-

•
08TAI~ ~AS'-.cn'lFLICT
•
FOP LIST
•

***********"' ••••-

•*

-

• * ••••••••

• .. 0

ATT1\1l\UTE
CONFLICTI .. G?

•

....
....

A800~

.toW
OPTlnNAL •
TYPE
ATTRT8UTE?

* *-

* PRESENT .60 •
•
*
•••••••••••••••

.-

PARENTHESIS'

*'LIST

•

if
.***•••••••••••

.ERROR

-

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

.YES

.YES
OPTIONAl •
TYPE
*x A31. ..
ATTRIBUTE?

•

·-

A8100

•••
• *• TOKEN A '(11 •• .X•* Cl.••
•*
• •••
• • •NO *
*

LI ST

v *** •
• ••••••••••
* SETRIGfoIT
T TO
•
•

A8005

.. .. .. *

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

••

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

if
.*• •••• *****
••••
*

..

-

•_ SET
PROPER
POINTER
TO

:

• ... •YES

A8155

*

V

•••
*.*.********'"
·ER~OR

ABO OS

****

*-------------*
" A3 '"*
'"
CONFLICT •••• 'x
•

ATTRIBUTE~

*

...
,.e.g
*
*.*.*********.*

'"

I.

****

v
***** •• ***.
•••••
•
_ SfT PROPfP •

*

-

*ATTRIBUTE BIT-

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

V
•• ** ••••• ******

ABD05

'"
*' .***
'"-ADD ATTRIBUTE ••••
*' *X A3 '" •
'" TO 8[T MASK'"
* 1.
• ••••• *•••• ***• ****
.*

Chart 27.

Attribute Analysis (Page 2 of 2)
147

PLII SYSTEMS MANUAL
UNCRE

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

................ ·
............... •
SANCRE

AN070

:oo: •• x: ol~=~~l~EO :
•
•
.VARI ABLE NODE.

•

v

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

.:

8Y~~NN2 ~~T :
•
AlL CONSr •
*DI PEN SITS ON"

PUSH DOWN
LIST EMPTl:

··........ ..• ·
ANOIO

•

MASK 4 AND
ATTRIBUTES

*A2 *

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

"O'S?

*

'NO

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

=

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

.·...............
...............
v

AN425

·

•

_NO

MASK 2 AND
ATTRIB-UTES ::
'O'S1

·

•

•

••••

•
CALCULATE
.SPACE NEEDED
•
FOR DOPE
•
VECTOR

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

•

_ YES

YES

•

.OBTAIN ENTRY.
,.
,.
................ x.
NAME
..... x AO •
•
ATTRIBUTE •
•
9.
•
NODE
•
• •••

. ....

AN015

"

,.

•

.

'O'B?

=

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

•

ATTRIBUTE
NODE

•

•

..

•

...............
V

AN01l

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

.OBTAIN SPACE.
FOR STRING •
• DOPE VECTOR •

*

• • MASK 3 AND .NO
•
• OBTAIN FILE.
•
•
................. • X.
NAME
•••• x AO •
ATTRI8UTES

AR ITHMET Ie OR
STRING

•
•
•

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

8*

•
..

• •••

80TH IN
tCONTI

•
•

• YES

AN060

· .....

AN070

•

•

• YES

DIMENSION 81 T
ON?

.X 00-

..-

·

v
·...............
.
·..............."

v
...............

AN600

•••

:

•

...............
CO~m~R

·INlTlllIZATN •
• STORAGE AND

*

ERROR

• OBJECT CODE •

• NO

·.................
v

•

OBTAIN

•
•

.

..

·UNDIMENSIONED·
• VARIABlE NODE.

•

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

•

··........ ..•
ANO&2

*A6 •

•

•

·· ...••••,...

• YES ••••

•••••••••

•
"ARK INIT •
DOPE VEeT •
-DUMM' 6. FREE •
.08 J CODE DOP E.

*

• X AO •

•NO

•

v
..............
.
...............

AN20a

•

MASK 1 AND
ATTRI8UTES •
'O'S ?

•YES

·NO
•

.

lotHT
PREViOUSLY
PARAMETER?

•

YEer

•

:x ......••.•...••. :

· ......
AN125

AN017

••••••••••••••••
•••
••
ONS •
•*C
ALL·
MrS-YES.
•• ••••••••

·YES ••••

CHARACTER BIT
ON?

•

•NO

.X AO •
2.

,..

•

AN310
• YES
•
•
••••
•
.ESTABLI~H ANY.
•
•
• 1.ABEL BIT ON?
••••••••••••••• ,,: ArTktlll~ES : ••• ~ 8~ ••

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

.

•

•NO

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

v
.• ...............
............... •••
"

148

V

c~mb
ERROR

-chart 28. Attribute Jlode Creation (Page 1 of 10)

A"212••••:.......

IN090
• •••

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

.AN081

80.

•:08'•••
* x:·-----10------$
• •
EVAL BDUNO : ••• ~ Ag ••

N.II SYSTEIIS MANIIAL

"HeRE

AN£U•••••••••••
80x:-iViL lliA.--:

•••
-ANOIl
. : AD· ••

••

elGTH, IF ONE •

••••••••••••••••••••
v

• •

••

.YES

•

• TOKEN AT 'J I'• • •........
•• ••
• NO

•

v
••••••••••••••••
•-SKIP TO RIGH'-••
•••••••••••••••••
•

PAREN

•

.......i .......
*------------*
:e-ItOtl AT ,., :
*GENER16

•

·•••••••••••••••.
·•x•••••••••••••••••.
AN128

•

•

ANI31
•••••••••••••••
•
• • ••••
*oaT.IN
SPACE.
e•••••••••••••• x: &s=Es~~l'gR :••• ~ A6:
• DIMENSIONED
• •STAING?• •
••••••••••••••••• •••
•
• VES

•

•"2

V

AN127

••••••••••••••••
•
• SET POINTER.

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

TO SOY PART •

-OF ARRAY DOPE-

•

VECTOR

•

AN132 •
•••
• .YES
•
••
•
• • •
•
•
• •••••••••••••••••••••••••••••••••••••••••••••• x
••
• ••
• • NO
••
• NO

*A6*X
EXPRESSION A
•
••
CONSTANT?

..

4H140

•
•
•

•

•

*ND

DOES LENGTH

HA~~Nl¥A~f?A

•
• •
•

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

•

•
• iEgfR:lE TO •
••••••••••••••••
FIi8MR

x:

YA[uA :

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

v
•••••••••••••••
OGENER67
•

.-------------.
\m~rL :
••••••••••••••••

:
•

• YES

.......i.......
•
•

•
•

AUTO :
:• Sf8IU
DOPE VECTOR •

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

.......i.......
*GENEA66.
• -----------.
L~=l~A~

.......L......
•
•

•
•

•...•.•i .......
••
•
:• m ~mw":••
•••••••••••••••

·

.

• X•••••••••••••••••

.......i.......

•
*PUT L
X:Ut

•

AN310
. .••

€!t111-1 :*••• •~ 81.•
:
: ••••••••••••••••• SEJokE!!tTH : •••••••••••••••••
AlNTRyUTE
•
•
•
•
• •••••••••••••• ••••
...............
...............
!*

x:

Chart 28. Attribute Node Creation (Page 2 of 10)

149

Plll SYSTEMS MANUAl

UNCltE

·....... . •
AN090

*AO '"
'" " ' . .

•

••

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

.YES

00• ................. x:*AN091
*-----10------·
:

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

NEXT TOKEN
' : '1

•

·
NO

v
...............
·................

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

AN095

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

'" STORE UPPER '"

'"

BOUND

fSTEMS MIoIIt/At

6

U!IC'IE

....-................,.
• •

*

•

:"Q•.• X:vAml~ 9~PE:
••••
•

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

AM~50

•
.YES
• IS VIlR TYPE :s= •
CHARAeT ER
STRtNG?

*' ........................................................................................}(

•

•

·

•

.

. ....

STATIC?

•

• NO

•••

!GET TI~~~E I ~OR:
• AiRAY SPACE.

*x e6.
.,..

·

YES

v

AN385

IS VAR TYPE
EN-TRY?

.

AN360

•
'"
•••
.GENERATE CALL.
•
...
• . . . . . . . . . . . . . . . X.TO IHESAOB TO •••• X C4*
•
GET SPACe
•
•
•
• DYNAMICALLY·
•••

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

......

• YES

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

AN355

·NO
...

*

•

R At18~f~PlEX •• ~ A~"

·

....

•

-YES ••••

..

:-".

'X CO •
. , . , T-

• • •YES•

AN330

'"

AH365

.~

'DIMENSIONS
• 01

•

• NO

o I ~ VAR TYPE "'..

•

• NO

AN390

*

..

·

•

TERMINAL

F llt:?

Af\l360

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

..

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

... •
...
OBTAIN
•
.C4 ••• ".SKELETAl SOy'"
'" •
•
NODE IN I
•
••
•
TABLE
•

.. USE SPECIAL.

. . . . . . . . . . . . . . . X.

Fets FOR

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

•

.TERMINAl TYPE.

·

.

V
••• * •••••••••••

AN395
• YES

• NO

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

v
.................
...............

......

.. FOR FCIB IN ..
.. STATIC &
..

•
..

CONSTANTS
AREA

•

·••. .•

AN385

••

•
..

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

•

COUNT SDBUF

... INITIALIZE

*C6."
•
.. •

*'

•

....

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

Chart 28.

Attr~bute

Y

•

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

TRy ................... X.
E.
..

•

•

•
..

IN-SERT fC18"

AOOA. IN

ATt'UaUTE
NODE

Node creation (Page 6 of 10)

.

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

.YES

•

...

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

NUMBER OF
PARMS = 01

SET Z~~gR TO :

*

•NO

•

·• x............................................. ...

INitIO

•..••••

•••• x Cit •

•
..

.................. x:.

•

•

N 1 ..

AN4l0

. ....
•

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

v

INCREMENT
DISK FilE

•

*CS •• X.SKELETAl SOy •••• X C4 •
•
•
•
NODE
• • S*

..
..

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

V

AN 362

• 08TAIN SPACE*'

•
5.
• •••

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

AN396

V

• OBTA[N BAA
•
FoR BLOCK

ANlttO

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

•

C4 •
s*

153

PL/I SYSTEMS MANUAL
SAHeRE

•
........ ... •
• •
IN330

."0"

.. ...

•

*

DI MENS10NS

= 01

•..............
.. •••••••••••••••••••••.••••••.••.•••••••••• :cO •••
......................
AN365

-NO
..

••••
•
.. ..
.. PL'C.E LAST
..
x:~~~l~~klE~ ~N:

.. YES

...............
..
.. .. c; ....
.
.
.
.
............... ....

,,,31t0

..

*NO

.

STATIC?

•

..

..

STATIC?

................. . ..
..
.. ....
.......•.......
V

.OBTAIN SPACE

IN STATIC

..

INltlO

.. ••• *
*....... ..X C45.,.

•

V

..

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

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

AN380

CALCULATE

..
OTHER
..
••••••••••••••• X.MUlTIPLIEPS
-SUllO SIZE OF.
..
ARRAY
..

• NO

.. YES

....
•

AN310

.YES

••••

••••••••••••••• X:OBTr~No~~ACE : ••• ~

*

...............
.......•.......'*

ANltlO

..

AN375

AN312'

*GENER.ATE CALL..
..
-TO I HESA08 TO* ..... X 06;.
.. G(' SPACE
•
•
•
• DYNAMltAll Y .
• ••

V

•
IJSE fiRST
•
.DIMENSION TO :(I

• FINISH SIZE •

..

OF ARIUY

•

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

v ...
·...........
.
...............
"'

*OBT41N SPACf :(I
•
1N ARllAY
...
:(I
:(I

STOQAGe FOR to

ARPAV

*

. .

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

SPACE ANO

•

BOUNDS OK?

• ~n

v
.................
.-------------.
·...............
*

·GENFRIC"
•

:(I

tJ4PRIlPfR
ARRAY SOUND

:(I
:(I

".

.

·

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

............... ...
'~315

V

,.

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

:(1:(1

*06* ••

••

*

•

x*

SET ELEMENT '"

-AND -'RAAV OED.

. ......

AN-'+10

·NO

STRING A/tRAY?

.

•

••••

.X C4 •

•

5·

• YES

·.•.............. ....
Y

AN162

: po?=JriNTO : .... ~ C5* •
• STRING LENGTH.
:(I
6•
'"' SADV
•
• •••

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

154

Chart 28. Attr.bute 11_ Cnation (Paqe T of 10)

PLII 5 YSTEMS MANUAL
SANCRE

.•••. .
••••
*AO •.. •

HAVE

eNVIRONMENT

•

... .

AH030

. ............ao.x

_NO

.

ATTRIBUTE?

•

•••

.'••

..

•

..

••

.

AN040

• .ves

DISK FILE?

••••••••••••• X

•

,

•

•

¥R

•,

.

AN320
••••

,, .:• B1,'.
••• *

...

V

•
CHECK fOR ..
.PROPER L t ST &*

..

1~r.¥J

·NO

AN320

:•••••••••••••••
f~J ¥I~~
: :••••

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

•

" YES

v
·...............
.
.. SET PROPER

•

SPrc!IFYEO?

'NO

.. YES

BIT

••

..

•

OU¥PUT

*••• X

:::~~~;~.:!~::

:..1*

alto .,

:x ................... :
AN028

•

.

•

..

.. .....
AN030

·NO

PRINT

ATTRIBUTE?

·

..

•••

*x

SPECIFtED?

ATTRIBUTE

•••••••••

·

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

•

•

•
•• •••
• • •••••••••••••• x.*-----------$
ATTRIB
•••• x 85.

ANY CONFLICT

•

WITH NAME 1

•

AN042

*GENER6-9

• YES

•
•
.•.............
seT PRINT

•

••

•

.. YES

v
·...............
..
..

..

OUTPUT

•

..

.. YES

•

'NO

INPUT OR

80.

•

•

•

·

CONFL Ie TS •
••• ••••••••••••••
•

.,

••• •

• NO

. .....

v
••• ** ••••••••••

AN030

• YES

COMPATIBLE
WITH ENV?

..

·

•

•••

*x
•

•..

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

seT PRINT

*-ATTRIBUTE I-f •
•
SVSPRINT
•

80•

• NO

·• x•••••••••••••••••.

...............
..............•....:
*------------. • • :B5: •.
................. ... •••...............•

AN020

V

*GENER20

•

•

AN030

•

ILLEGAL USE ••••

OF ATTRIS

•

• ••

x 80-

•

•

Y

AHOItZ

•

•

x:t8~~T~O:05~J
• IN BLOCK 0

•

ANOit"

AN3Z0
•••••••••••••••
• CREATE A •• •• ••• •
•
••••••••••••••• XtlOEfINITION IN •••• X Bit •
•
BLOCK 0
.,
•
,.
••••••••••••••••• ••••

,
• •
•

YES

,
•

•

OEF

AN320

1£~T IONS

·NO

•

•••••••••••••••* •• ••••
* ••••.•..•••••• XUSAGE
* ••. X 84 "
"" CONFLICTS • ... 5.
*GENER57
4t- ____________ •

· ....
...........x:

AGREE?

• YES

•

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

. B~
"
••

••••
AN320

Chart 28. Attribute Node Creation (Page 8 of 10)

156

PllJ SYSTEMS MANUAL
SANCRE

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

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

AN440

•
•
• ESTAS ENTRY '"
• AO ... X.ATTRIB (EXCPT.
•
•
.FOR R.ETURNS f..

•••

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

PARM

LIST)

.....•.....•.•......
4Nlt15

'"

•••

·YES

••

:80. . . . lEGAiy~~~URNS

•

.LINK NODE TO •

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

.00 •• " . ENTRY NAME
•
..
•
PARAMETER

•••

•

lIST

..
..

•

• NO

·••
·
•

NPARM

=

0

•

v

PTR

(CONT)

TYPE

•

*. •

CREATE
*92 ••• X*
DEFAULT
..
•
'"
RETURNS
••
* AlTln BUTES

•

•

· v .
·...............

AN010

••

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

•• ••• •

.NPARM = NPARM*
•
+ 1
•

..... X A2 •
•
•
1.
•
• •••

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

· v .
·................

AN443

**.* ••••••• ** ••
• EARlY ATTRI8 •
• AND RETURN
•
TypE
•
•

•

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

V

'•"

"rTRIB

• PO) 'trER ON •
• TOP Of PUSH •
OOWN LIST •
•

..

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

AN429
•

...............
to

.. CHANGE LAST.

• ILLEGAl RETS •

•

• CREATE PUSH •
• OWN ENT WITH.
NPARM f.

•

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

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

v

v

·GENER.41

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

•

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

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

.••
.

v "' •••••
**•••• *••

V

AN460

.N~

'"
LINK AlTR
•
.PHRY TO RET
• SLOT Of ENTRY.
... NODE (CONT) ..

'*

*.

........

THI S TOKFN

• I '1

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

*••••
*x C6 •
*'

• YES

••

•••••••••• X. 81.

. .......

·NO
RETURNS LIST?

•

•••

*POINTED TO BY.
• TOP Of PUSH •
..
DOWN LIST •

*x B2.

.

YES

v *••• *.
• ••••••••

V
AN010
•••••
* •••••
** ••• • •••
• SABAl
•• -------------*
..
•
AN:AlVZE RETS •••• X A2 •

•
CHANGE
..
.RETURNS TYPE •

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

ATTRJB

•

•

AN441j

v
·...............
.
·...............

AN429

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

1.

Of TOP Of

•

PUSH DOWN

*-

•

•

LIST

•

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

AN460

.*

*....
• • •

.'1 E5

. ..
PARAMETER
1I 51 PR.ESENT?

'*

.

'"

•

.-.

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

·SABAl

.. ..

. . . . . . . . . . .C6 ••• X*MOVE TO NEXT.
TOKEN
•

.-------------*
ANAL PARM

.06 ••• X.
•
'"
•

:0:

ATTRS

..

• • ••••••••••••••• *'*

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

• NO

.

V
* ••••••••••••••

AN445

••
•

•

•

F III IN

•

..

NUMBER OF

•

• S7 ••• X.PARAMETERS IN.
•
•
• EN-TRY NODE
.,
CNP"RM~
•

TOKEN')'?

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

•

..........•....
...............
V

4-N41 0

• POP THE PUSH.

• •••

•

•

•

•

• •••

•
•

•

ON LI ST

•

CRESET CUR ..... X C4 •
AlTRls NOOE.
•
5PTR)

.

.

•••••••••

•

......
.
.
.
'"

•••

.X Db.

YES

: x.................. :

................
.........•.......... ...
ANlt70

V

u*.

AN41S

•

•
..
• CREATE NUll.
*C9 •• x* PARAMETER
••

•••

156

Chart 28. Attribute Node Creation (Page 9 of lO}

NO-DE

AT COM"'A OR
P,f!REN?

..RI GHT

NO

TOKEN', '?

•

·YES ••
•

·NO

. .*..
ANOlO

.YES

u.

•
•
oooo X 00.

•••

.

*x 42 *
• * •'* •• *I.

NO

·................
...............
v

.Sf( IP TO COMA.
•

•

*

OR RIGHT
PAREN

•

•

•

..-------------.
.............. ..*••.
.·.............. ....
V

·GENER16

ANOIQ

...

:ERROR AT '_' : .... ~ Af ••

PLfI SYSTEMS """UAL
SANCRE
AN081

10

ANO't

.

•••
••••••••••••••• •
•.80....
••
X.
ENTER
•
.•••
•••••••••••••••

•••
• •• •••••••••••••••
ENTE R
••
•*DO••X.
•

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

• ••
.YES

•

..

EXPRESSION AN
••••••••••••• X
ASTERISK?
•
..

PREVIDUSlY

•

•

•

..

•

AN096

•••••••••

••

• ND

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

• NO

.•........

it

•

·YES

.. eXPRESSION A....
INTEGER CONST

.•

OR PRE

•

•

..

*x

...

-EVALUATED? ..

•••

..
Alt.

..

• ••

NO

•

..

..

EVAL NexT
eXPR

..

:AST~k~~~AhlM

:

• .YES
•

• • •NO

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

...............
*-----------*
................
.
*SNEXP

*GENER68

:x .•••.••••••••••. :

it

..

IDiHT

PARAMETER?

'NO

AN085

• -YES..

.• . . .

..

·................
it

it

..

SAY

.. EXPRESSION

..
..

•

WAS A
VARIABLE

..

• GENERAT E A .
• S TORE LOWER ...
• BOUND INTO •

..

..
..

:. e2:s.¥s~1~~.:

=x ............................... :

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

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

*A4* •• X-MOVE TO COMMA"' •••••••••••••••

..
x*..

...................
...............
RETURN

..

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

•
ALL
•
·CONSTANTS-NO •
• SET BIT FOR: •
:oIMe~~18N OFF:

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

..
• C4 ••• X,* BOUND VALUE •
... •
.t NTD SKELETON'"
••
• DOPE CCONT • •
•

•

•

PUT LOWER

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

-..•••.••2........

:vEf~~!KmAlE : •••••••••••••••
VALUE
•••••••••••••••••
••

Chart 28. Attribute Node Creation (Page 10 of 10)

it * ••••
••••••••••

AN096

y

:x ...........•.... :

...............·
••••••••••••••• ·
V

x:
•

RETURN

157

PlII SYSTEMS MANUAL
SBlPRC

...

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

. •••••••••••••••
5BLPRC

..

BL020

••••••••••••••••
• •••
•
.. BRANCH ON *

...

.coe •• x.

..

•

•

* •
•
•.'0*'(
**

DECLARATION.
TVPE?
•

..

••

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

-•

"'(F~

A"~

*

.

• ......

Bl J:I(

O"I:~

J.t6\1F."

.,-

••

~J

v

.

Al040

•••••••••••••••
*$FSVM
..
-------------.
*SEE
FOLLOW[NG*
*
NOTE
*
*
..
•••••••••••••••

•

V

*'

•

FNTRY?

*

* *
.
•

..

..

..

.. *x••••
. 81 ....

eND

.

SUCCESSFUL ?

.. .

..

* 2"
••••

...

* *
·S3*X
.. *
**

.. Y£S

.. . • *

..

--•

[S

.

-

*

TYPE FOUND

A IAIIEL?

•

BL020
•••
• •
* .VES
DECLARATION
* *
•
TENTAT[VE OR
.X CO.
CONTEXTUAL? * *
•

••

* * •NO•

•

•••

V'
BlOOt,
•••••••••••••••
• ERROR
..
• ••
•*-------------*
• •
MULT DEC '56•••• X (5.
.
................

..

158

Chart 29.

*

.

.DJ

•

..

•• )(.C4l~ JLATE P6A.*
*SP~~~

...........

.X

~fFOFO

..

·••

v

.•

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

Its_

•

OijTA[~

BAA

•

•••••••••••••• lit.•

?

*
*
*
* YES

V

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

. *x. ***(}O*.

••

rYPf = OTHFR

- *

*

•

"fHAI~

• T4RI

i:

I

f~TPV

••
•

..

*••••••••••••• 4t.•

*••

·...
.

81023

if

.

•*fRROR
•••••••••••••••
.------------••••••••••• C4* •• x.y
MPROPER.. PREY •

CAll RESET

* *

•

US~GF

•• ** •••••

.S7

..

'"

* •• ***

YES

• •

* *

..

..*................
4<

.. NO

••

C~.

•

*NO

....

...

•••

:x. '"' ............ .

8LOH

.

*'

•••
"3*

"114'

USEO BIT Off

• [S BLOCK• • NO• * •
*
• X
DECLARED
• * CURRENT? * • .. •
•• ••

•

.. v . .
*Y-FS

..

8L050

"I OR6

. ..

* *
NO

*

V
•••••••••••••••.
. .... .. .*...
..
..
..
.
-x

• YFS
IS TYPE FOUND

•

LOCATE [.0.
FOR CURR BlK.
USE LBl PTR

-

.. ..-.

....

*B~ •••

.-

•

--•••••••••••••••.

X.OEFINE LABEL.
•

AOOR

...
.*.

V
***••••••••••••
..

Bl004

•

•

•

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

·..................•.. .....•••.
V

.
..
•

COMB[~E

.
•

.X""...

8lQ34

* •.. •X 05*_

DE~[N[TIONS'

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

Label Processor (Page 1 of 2)

f'L~:a4

v................

"lO"

..

-C5* •• X* P~EV[OUS
* •••
• •
.. DECLARATION.
•

..

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

•

REMOVE

•

•

2*

•

*~.*

**..
..
•

.1~*

..

•• X.
•

M'!!;-f(E

..

~[FJNtfYO~

EXPLICTT

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

.
..

RFTURN

PlIl SYSTEMS MANUAl

1.

fBlPRC

.. .. --

8LOljO

•••
*81
•••

•

•

•

81070

• • YES

-

ENTRY NA"E
DECLARATION

•

--. - -

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

-

·
..

.•..............
...............
'''''SEQ: r Nom: •

•

• IN

....
·................ ....
Y

•
•
•

-DefINITION Tn ••••

~

04 >

•

I-

•

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

..

•

ofe r InNARV.

v
• OBfAIN "',lnE •..

RlOll

...

OICTtDNARY.

-

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

•••••••••••••••..
ADO

..

v

v

••••••••••••••••
•>OBTAIN
LAaEl _
•
ATTRIBUTE
-•
..
NODi::
•••••••••••••••••

•

ENTRY

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

• NO

·

-

IN ENTPY ••••••••••••••• x.-nBTA
ATT~I~UTf
..

fOR. l1ET!JR~~ ..
AfYRI ~UTi:C;
..

v
...............
•
•
...............
•
•
•
•

CP~Afr-

O-ffA'" T
ftfTlJ"tH.c;
ATTfJ'''UTES

•
•
•
..

. ....0',...
....

V

otl

---

l'Ur'; .. Al
InO(I(?

·

Chart 29.

·K

-•

Yf~

........... ...
V

•
•

,,~,

.;...-

~foJ1.t

~

R.fTUR~
• • • • 0,'1 . . . . . . . . . . .

Label Processor (Page 2 of 2)

159

PlIl SYSTEMS MANUAL
SOCLGN

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

..**..

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

* •

••
••
$O(.lGN
• ..............** •

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

ZERO

•
BIT*
STRING USED.
.BY SU8xOUTINE*

.60* •• X*ATTRldUTE

*•• •

.co* •• X*PREV JOUS PTR. •
• *
= NO
•

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

•••

:$

•

Ii

••
*•• *.*.*.*.***
*$AtiAL

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

SEE
fOLLOWING

•
•

*••• *.*NOTE••••• *.***

v
••***.******•
•..***INIT
IALILt *
..

LOCAL

...

..

VARIAlSlfS

•

*

*

POINTER TO

*

.. YES

>

••• *

*x* B1 •'"
•

2'

*

•

*

.

J( 0.10

*.****,e....-*
*:0*"':0
*r QR,)* ............... 11'*

*

PREVIOUS
OECLARATION?

*

TOKN AfTR
IDENT

•

'NO

****

ANAL ATTRBS
GIVE AS PARAM

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

oe02s

PREV I OUS
OECLARAT ION
OR USE?

*

•

•• '

_1

I

•

*

• YES

• x ................. .
lIe003

•

•

PTR ->TOKcN
IDENTifiER?

•

•

•• •*•
* NO

DC035

•

*

...

•

•

***
• 'X* 1>0'*
* • •

.YES

..

***

* *

.

••

•
*

V ...

ocoso
*vt:S

*
*

PTk ->TOKEN
1(' ?

* * •NU

•

..........

.

PUSH DOWN
LI sr EMPTY?

•

*

•

*

>YES

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

•

.

eXPLICIT

*

*-

LIST

[l(.~"" ~

.

OECLAKATION?

*

;

*~:b:**~"'>I<':'

•

¢:tR~OR

*Yf$

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

,
I

NO

C

*

-'L

• * ............. '

•

*

**•• ****** •• ***
•.OF PUSH DOWN *•
*

*vtS

PARMIETER?

NO

*POHH TO TOP

•

*

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

•

*--.JoA14:AfoI'
----- -- ! ..... f\
''::>~

•• )(*

• NCJ
: X ....... .- . . . . . . . . . . :

.

Oe200: :

*NO

*

PTR ->TOKEN
£.ON, T ANT?

••
.. ** ....

*
* *x* (,02** ...
•
****

* *ns

.

Ii

..

..

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

>:-

_18

..

De037

•

PUSH DOWN.

*-

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

V

*

'NO

• * ........ .

END OF LIST?

*
*

.. YES

: X .................. :

V
*.*••••••••••••
PT~

•

ADO

•

PARENTHESIS •••• X A8'

*

RIGHT

TO.

•

*
LJST
•
.************.*

.TO PUSH DOW-N
•

160

oe031

Chart 30.

•

...

• ••

• ••

..

•

OC020

Ii

•*$FSYM
••***.**.***.*..

*.*
*-----------* *
*
•
SEe NOTE 1 * ••• X CO*

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

r

1$
0A'HME rEP,


)Frl

0(025

.**••••****.*.. *
TO NEXT *
•..*MO'IJE
ELEMENT IN ..

IMPLEMeNTEO

*

•'"

*

STRUUURES

*'

****************
*------------*
* GIVE P AS A *

·

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

4-

**.*********"...*

*.)AljAl

:SEE ~g~~iJ"lNG:

"..

IJ{ ,125

*StT PO~SI8l~ ..... X B1 •
.. EkROK FLAG *
"" 2::

v

v
•-----------*

*·ERROI(
•• *.**.*.*.**.*

V

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

*****.*>1-.******
SET PTR TO *
'"
•*>rOKEN
PTC. Tll *
*8"( PUSH DOwN *
'lIST ENT (PI'
*•• ** •• ********

•

***

•

DeL Generator (Page 1 of 2)

51

~-

~1

SYSTBIS _ L

.OCLGN
• • •
•
• .YES
prR ->rOKEN •

OC200

.....

•
•
•
• CO •
•
•
•

..... •

COMMA OR
SEMICOLON?

DC025
•••

•••••••••••••••>

•
..
•••

..
..

..*81 .. •• X..-------------*
SEe
..
FOLLOWING
NOTE

••

.. ..

..~NCRE

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

•

. .
•

FOLLOWING
NOTE

•
•

NO

Of 030

pUE~fmlS

EMPTY
DECLARAT IIlN
SKIPPING H6

:

.... .
•*** •

•• )(

(-4 \

v ***.
•••••••••••
..

>ERROk

*---------*
..
ILLEGAL
..

E~o(GR?

TOKEN 116 •
••• ••••••••••••••
•

• YES

••

•
•

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

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

*

V

.

>SKIP TO COMMA>
:

• 'NO
>
POSSIBLE
-........
•
•
••

OCOBO

•
• • •••••••••••••• x.*-------------*
SEE
•

..

•••••••••••••••
>
>

CJlEAH ATTR
NODE FRuM BIT
STRG ENCODING

0

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

'ERROR

V

OC215

••

V

DC205
.YES

"P?

>

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

•

v>

prR ->rOKEN

••

•
..

• > NO
••

..

..

OC030

.

:x •.•.......•..•..
v ..

.

•

.*
********* ..
• "' ............... •*C4*X
• * pn ->TOKEN .. •............ • *** ...RFTUPN
CUHPATlBlt
•
;.
?
Ot';LARATlDN? •
••• * • •
• *•• *•••• ** ••
.. •
••
• > .. ..NO
. • •NO • •

..

•

oYES

.YES

}(

.

Il<,*,*

.. • •

V
•••••••••••••••
.ERROR
..
*-----------*
..
PKt;VIUUS
..

0(,090

..

DECl. '21

CC290

••

•

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

4'1'1>

••

.).

.. .

·~o

•

->TOKE~

?

.. •
*

.....' ..

*)(

..

•

At<

I-

*.

••••

YES

.

v

v
...•••••••••••••••
*

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

••• DElEH OLD •••
.. Off INIfION •
•••••••••••••••••

'PUP THE PuSH •
OGWN LIST ..
•

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

:X •••••••••••.•••• :
OC027

V

uCOj~

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

.ADD ATTRIB<.ITE.
•
•
..
HOUt TO
•••• X C4*
.. DieT IUNARV ..
..
..

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

Chart 30.

...

DCL Generator (Page 2 of 2)

v

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

•'SKIP

TO NEXT •*

:~~~~lUra~;NQ~:

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

tOMMA TOKE~ •

......... .
•

161

SY5T£~S

Pl II

MANUAL

$Hvl'1

~:f " • • • • • • • • • • • •

........ .........
t
................
•

•

*SH=6tCK iI TO •
• S~I"T LO(ll(HG •

*tH=dlC-k ." TO •

• ~'CP t.{(tcM~ •

........ 0 •••••••

.................
•
un
•
.................
~

• '-POIlI1£lI TO
• NA"f £Nl~Y
H:PDlNTf~ TO
• OfFHlITIGti

..
•

P--T1

•
,.
•
•

...

•

• * ...•.•••:U:
• •..'X•: ~HNI~ :•

..

.

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

*V-ES

• •

~(

V

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

••

• B.BL~CKL5eD •

:•
•
................
: m: f~mT"

o

• • • • ,""ES
o

LIO.8 ?

•

.. •

•

.

•

0

•••

..-.

•

0

H

\H lESS THAll:

-e

1111

;
................

..

,.

•• oEf-IN-ITJON •..

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

.fOtJMO

•

·...................
·..............
~

IS 4tUtNTf.l ..
• n:; ATT-Pt.8l!H- •
..
ENT-RY
..
•p

-

.........

162

Chart 31.

11~

-

.......

Locate Identifier

•

.. ~ '3'

I,

•

.......2....... •
A!TUM

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

•
•

PL/I SYSTfMS MANUAL

SFVAR

FVm ••••••••••••

•• •••••••••••••••
•
$FVAR
• •••••••••••••••
••

• •

•

•••
•
•

BRANCH ON

••

:BO: •• X:YAR\~fitlErYPE:

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

•••

FYlOO

•• ••

••••••••••••••••••
seARCH TO•••••••••••••••••••••••••••

•
* ...•..•..•.••• xeSE'

·...............• AlL BLOCKS 00.

•• ••
• Nu

• • ••
-NO

v
...............
•
•
•

RHURN

•

: Lm5~Tfs(JF :
•

IItSULT
•
•••••••••••••••

•

--

••

-.

.VES
-

fV120
•
•
*SEf SEARCH TO.

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

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

ALkxlt~KS

: •••••••••••••••.•••••••• X:•

EXTERNAl 20 •
•• ••••••••••••••

•

-NO
'0

••

v
...............
•

RETUAN
• •••••••••••••••
••

·

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

.

.

j:Vl~! ••••i..•••••

...•
•
•
•
• ••••••••••••••• X:~~IRS-lt~ w. ................. ~.X:T~E~&~~I~my:
•
•
...............

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

•

•

-•
...
•

• • • • eYES
'AI«
•
OEF1'1 nIC"S
•••••••••
FOR N".. E .
•
ENTlI"? -

-- ..
• '110

.

~

flO,.

••••

•• : at· ••

FOIIIIII

•

••••S•

...............
· v .
*•

GET FllIST
-DEFINirtON

•
•

0

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

•

FUJI NAIIIE

•

•

••••
NOT .OU"D

•

•

Chart 32.

Locate Variable (page 1 of 3)

B1 * ~
2"

......

•• 1(

163

PL/I SYSTEMS MANUAL
",VAil

..

•
••

•••
•.81 ** •

FY141
• YES

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

••••••••• ~ •••••••••••••••••••••••••••••••••••• x

DEfINITION
VARIABLE?

•

*

•

••

FVllt5

••••
•• •
X A8.
• •

•

....

-

--

.. •

..

-

. V .. .

FVlf>O

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

-YES
IiI:CLARATION
USED?

••

••

*

. ..

.. •

*

•

.

.

·

** •.

.

.. V .. ..
.
•
••.

•

• -........

.
. ..

.

v -* ••
.*•••••••••
"• INCLUDE PARA".

·

.. AREA H. bAA.
•
SIZE
..

.

•••••* ••• _•••••

:X ................ :

..

V

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

.

*.**** •••*.* •
•••
•
• OBTAIN BAA ..

·

.AND SAve ADDR.
.IN OlifINlTltJN.

"SET NUMBE" OF.
* PARAMS
..

•

.

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

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

v

•

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

¥.*. *¥
~

.A8
.. ..

•*.

......•.**.....*'

FVllt5
III

..
•• X.

•

*'

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

*' .. .. SET
•••••••••••••88 •• X.bLOCK

SET SEAKCH
TO LA8EL.

.MOU~

V

FV150
••••

..

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

•

•

•

.....

LAST
USED
USED 81T

*
•
..

& •

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

.......•..v -....
• ..........-....

•

..

164

Chart 32.

RETURN

Locate Variable (Page 2 of 3)

..
• • ..n
V

.
•

.

..

0

*

.. '10

*

V

0

***

....
• *

FVI50

.YES

•

BBO

"X
.. • •*..•

*

• * .••••. ,

••

FV150

*

* ..

*N1

* oX•

SI"ARCH "(JOE
fILE?

..

* *'

•

* ons

SEARCH MODE
ENTRY?

*

0

0

.

*

·

BSo

*

YES

FV150

·• ·
• ·

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

*u
MAKf
* ~
*
• OECLlllATION * ••• ' 88'

**'

FILE

•*

U

********$**•• **

•

.. VES

YI::S

v

*

*

•

••

V

.NO

NtXT TOKEN
• ('1

'W

•
.NO
• • NO. OF PARAMS • ......... X
•
ZERO?
•

..

...

V

SEARCH 'lODE
AR ITHMFT It?

•

•*

...................
V
• ..
FV150
• ••
..
••
• ·NO .. *
..
.NIl
*
. ·X.. R"...
I:NTRY A PARAM • * •••..•...... X • NeeD BAA
?
• .
.
.
• .. • ..
•• •••
.. YES
• YES

.. ·NO .*FV150
••
• •
oX 8S'

• • • • ..
.. yes

. **
•

•
•........
INITION
• •* DffENTRY?
•
••
•
• • NO
••

.. .

• ..

•

POSSIBLE TO
CHA~GE
• DECLARATION?

*NO

FILE OR lAbEL

•

V *.
.**' •••••••••••
..

FV)~3

*'

CH~NfiE

.*
..
._ ••••••••• * •••
'"

DFClARATtON

TO

f~TRV

FV237

*' **'••• ..
•••• x 05 ~

..

~

3*

..~~

Pl/l SYSTEMS MANUAL

.)

$FVAR

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

•••
•*OO*
*•• X*INSERT
•

NHD TO
~RCATE A
OEFINlTlON

*

.....
.*...

• ViDe

.*..

FV28D

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

•
*
•
'Bl* •• X*

.

..

V

..

.*.••

LAtlEL?

•

·YES
*

CREATE
TENTATIVE

lAHEl

..

PARAMETER
LIST?

*

• *

* •• .o .......

• • •YES

*

*..
2*
.. ****

LIST

**

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

•

•,.

'OtfINITION TO •••• X AB •

..

**

y

FV1~5

V

*

ENTRY *
INTO LIST *

*

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

**
*

.....*.****-*******
.. . .****
ADO
.
..

*x Ill*
• • * •••

*

•*

•
•

• DEFINITION *
•••••••••••••
**

FV28D

I!> LOCAh
VAk. TYPt =

*

..

**

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

*

.

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

.. ..
.. B~ANCH ON ..
"Ai •• x*
LuCATt
..
*VAkIABlE TYPt.
.. ..

••

ACr:I)II~T

*PARA~S

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

J=OR •*

I N BAH

*

•

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

• Nt,

: ~ ................ :
FV26D

FV232

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

·

v
*.*************
•'SET
•
SCAN NODl.

·

~OCAH

••

..

FV2JO

.. LOCAlt: VAktSl

TYPE =

•

.YES
..

ENTRY

·.•
I

*

•

•

•• *

*x* C9**

•
•

•.** •

TO FILE
CREATED

V

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

.YES
..
..
* IS
*
AND * ••............ x*• OBTAIN
INSERT
_
TYPt '
• •• YAk.F ILO

TOKtN LI~T
NAMi

.. YES

..

•SUtlSCkIPTtD? •

·.
•

*x•

•••

Cq**

**.

.*

v

•***************
.. INCREMENT •
*
•
DISK FILE ..
-COUNT - SDBUF'
•*****,..*********•

.
.

'NO
,. ..... .o • ~ ...
PRINT?

~YSTEM

*

•

"" YeS

Nl.

v

v

v

••••••••• **
•.***
••
•
CHATE
•
•

•

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

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

SET PRINT
ATTtUBUTE

• CR eATE ON *
'I~ITIALIZATN ..
.. t:NTf..Y IN I •

••

DEFAULT'
ATTRIBUTE
ENTkY

*

•**

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

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

•

..

•

*TA~LE

ICONT) •

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

·• x....................... ...
v

FV210

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

*•

AuORES~

• STORt INTO
• DeFINITION

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

•

ObTAIN

STO~AGE

•

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

Chart 32.

•

~

•

X Btl

•

2.

**.*

FV1~C

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

*'..

..

Rb ..

.fOP

;*

..

**'**
.. ..
fILE NAME*.o •• X HS *
•*'

AND caDES"

..

****

*

1=**************

r=V2

FV150

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

..

..

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

V

V

~vJ50

4-.;.~:c.

INSERT NODE
..
INTO
..
• Ol~ T WNAkY •

FV217

~

**** .. **.***.****..
*ObTAI~ DUMMY.
.FCIB
* .... *

••

**

2*

~o

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

**
*C9* • .oX.
* * ,.
*** *

*

****

*

***

*** ... ,.*x 00**
*****************
***

Locate Variable (Page 3 of 3)

OBTAt~

ATTRIBUTE
F~TRY

$:

165

PART 5 - I/O STATEMENT PROCESSING
The routines described in this subsection process the OPEN, CLOSE,
GET, PUT, and FORMAT statements. These routines are discussed in
alphabetic order according to their mnemonics, as shown below. Detailed
logic diagrams for the routines appear at the end of the subsection.
GET Generator ($BGET)
PUT Generator ($BPUT)
Data Specification ($DDS)
I/O Specification ($DIOS)
O/C Specification ($DOCS)
Format List Generator ($FLG)
FORMAT Generator ($FMT)
Format Item ($FORI, $FORI2)
Format in Data List Processor ($FPDL)
OPEN/CLOSE Generator ($OPEN. $CLOSE)

166

TITLE:

GET GENERATOR ($BGET)

Program Definition
Purpose and Usage
The GET Generator analyzes a GET statement and directs the generation
of triads for the statement~
Description
This routine directs the identification of the options in a GET
statement, namely, the file and data specification options. The I/O
Specification routine ($DIOS) scans the statement looking for the
keywords FILE, DATA, EDIT, LIST, and SKIP. Pointers (the file, data
specification, and skip pointers) are set to indicate the location
in the token table of the corresponding keywords.
Upon return from I/O Sped. fication, a check is performed to see if
the file option was present. If not, the default file of SYSIN is
provided.
If the type of input is DATA, GET Generator proceeds to generate a
symbol table triad for the data list, if one is present.. If no data
list is present, a marker is placed in the block information table
so that a symbol table for the block will be generated at epilogue
time. A triad is generated to perform a call to the Data-Directed
Input routine (IHEDDIB).
(For a description of the symbol table, see
Appendix E.)
If the type of input is LIST or EDIT, triads are generated to call
the List- or Edit-Directed GET Initiation and Termination routine
(IHEIOAA) to initialize the operation. A switch indicating the type
of I/O statement is set and the Data Specification routine ($DDS) is
called to process the data list. On return, if the type of input is
EDIT, the Format in Data List Processor routine ($FPDL) is called to
process the format list. A triad is then generated to call IHEIOAT
to terminate the operation.
Errors Detected
ERROR AT '
(16)
FILE NAME NOT INPUT FILE.
(31)
ILLEGAL USE OF'
'IN DATA INPUT LIST. (33)
'SKIP' OPTION ILLEGAL HERE.
(34)
ILLEGAL FILE DESIGNATION. (43)
Local Variables
BGNAME
BGPTR
BGSYM

Default Filename or FCB Address
Token Table Pointer to Semicolon
Symbol Table Triad Pointer

Program Interface
Entry Points
$BGET. No formal parameters, but
-table ($PTR).

require~

a pointer to token

l!.xit. Conditions
Normal exit after translation.

$PTR points to semicolon.

167

Routines Called
$DIOS
$CERR
$FVAR

$DDS
$FPDL
$GTRIAD
$FIND
$XERR

I/O Specification
Compiler Error
Locate Variable
Data Specification
Format in Data List Processor
Get Next Triad Entry
Search-Insert
Error Message Editor

Global variables
$PTR
$DSKIP
$DFILE
$DDATA
A List
N List
'l' 'l'able
$BIOO'Y
$FCB

'l'oken 'l'able Pointer
Skip Specification Pointer
File Specification Pointer
Data Specification Pointer
Dictionary At~ribute List
Dictionary Name List
Token Table
I/O Statement Type Indicator
File Attribute Entry Pointer

Logic Diagram
Chart 33 shows the detailed logic diagram for the GET Generator routine.

168

TITLE:

PUT GENERATOR ($BPUT)

Program Definition
Purpose and Usage
The PUT Generator analyzes a PUT statement and directs the generation
of triads for the statement.
Description
This routine directs the identification of the location of the options
in a PUT statement. namely. the file. skip, and data specification
options. The I/O Specification routine ($DIOS) scans the statement
looking for the keywords FILE. DATA, EDIT. LIST, and SKIP. Pointers
(the file, data specification. and skip pointers) are set to indicate
the location in the token table of the corresponding keywords.
Upon return from I/O Specification, a check is performed to see if
the file option was present. If not, the default file of SYSPRINT
is provided.
Triads are generated to call the Output Initialization with or without
Skipping library routine (IHEIOBA or IHEIOBC) to initialize the
operation without or with a skip respectively. A switch indicating
the type of I/O statement is set and the Data Specification routine
($DDS) is called to process the data list. On return, if the type
of output is EDIT, the Format in Data List Processor routine ($FPDL)
is called to process the format list. If the output type is DATA.
the triad is then generated to call the Data-Directed output library
routine (IHEDDOC) to terminate the operation_
Errors Detected
ERROR AT '
(16)
ILLEGAL FILE DESIGNATION. (43)
FILE NAME NOT OUTPUT FILE. (49)
NON-PRINT FILE--'SKIP' OPTION ILLEGAL. (50)
LIST MISSING AFTER'
". (11)
Local Variables
BPPTR
BPNME
BPFIB

Pointer to Semicolon Token
Default Filename or FeB Address
FIB Around Symbol Table

Program Interface
Entry Points
~BPUT.
No formal parameters. but requires a pointer to token
table ($PTR).

Exit Conditions
Normal exit after translation; $PTR

poin~s

to semicolon.

169

Routines Called
$NEXP
$DIOS
$FVAR

$DDS
$ FPDL
$GTRIAD
$FIND
$NCONS
$AREXP
$XERR

Expression Processor Controller
I/O Specifiction
Locate Variable
Data Specification
Format in Data List Processor
Get Next Triad Entry
Search-Insert
constant Processor
Array Expression Error
Error Message Editor

Global Variables
$PTR

$DSKIP
$DFILE
$DDATA
N List
A List
T Table
$BIOTY
$FCB

Token Table Pointer
Skip Specification Pointer
File Specification Pointer
Data Specification Pointer
Dictionary Name List
Dictionary Attribute List
Token Table
I/O Statement Type Indicator
File Attribute Entry Pointer

Logic Diagram
Chart 3q shows the detailed logic diagram for the PUT Generator routine.

110'

TITLE:

DATA SPECIFICATION ($DDS)

Program Definition
Purpose and Usage
This routine generates and directs the generation of triads to perform
the operations required by the data list in an I/O statement.
Description
If an element in the data list is an expression that does not begin
with a left parenthesis, the Expression Processor Controller is called
to evaluate the expression. If the expression is an array expression,
code is generated for it as though i t were a repetitive specification
from lower bounds to upper bounds by the Expander routine. Otherwise,
a check is made to see if i t is a legal expression type (e.g., not label).
If a left parenthesis is the first token in an element, whether the
element is an expression enclosed in parentheses or a repetitive
specification cannot be immediately determined. This question is
resolved through a scan that provides a pointer to a comma if the left
parenthesis began an expression, or to the token DO if the element
is a repetitive specification.
If the element is a repetitive specification, the DO Generator is
called to generate triads for the DO specification,. The specification
is then reanalyzed starting immediately from the right of the left
parenthesis that began the repetitive specification. When the DO
specification is reached again, an END statement is generated and the
END Generator is called.
If the statement is PUT DATA, items within the expression are scanned
and a symbol table entry is formed for each unsubscripted or subscripted
scalar (Appendix E shows symbol table entry format),. All contiguous
unsubscripted scalars are entered into the same symbol table while
a separate symbol table is constructed for each subscripted scalar.
Each symbol table is preceded by a call to the Data-Directed output
library routine (IHEDDOA for unsubscripted scalars or IHEDDOB for
subscripted scalars) followed by a branch around the symbol table.
The triads generated for one or more contiguous unsubscripted scalars are:
Call of library routine IHEDDOA
FIB (Forward Internal Branch)
Symbol table entry 1

Symbol table entry n
RFIB (Resolve Forward Internal Branch)
Note that a symbol table consists of a series of entries in generated
code and is not a compiler-time table.
The triads generated for a subscripted scalar are:
Call of library routine IH~DDOB
FIB (Forward Internal Branch)
Symbol table entry 1

Symbol table entry n
RFIB (Resolve Forward Internal Branch)
171

For other types of statements, instructions are generated to set up
the FCB for the operation. If the operation is EDIT. a branch and
link to a format subroutine is generated.. This subroutine is generated
by the FORMAT Generator when it processes the FORMAT statement. If
the operation is LIST. a call to the List- and Data-Directed Input
library routine (IBELDIA) or the List-Directed output library routine
(IHELDOB) is generated. If the operation is GET. the expression is
checked for consisting of only a scalar before the code is generated.
Any expansions and any implied DO's are ended. When the right
parenthesis of the data list is reached, a return is made.
Errors Detected
ERROR AT •
(16)
ILLEGAL I/O EXPRESSION--SKIPPING TO '___
(75)
ILLEGAL DATA Otn'PUT ITEM. (76)
EXPRESSION ILLEGAL IN 'GET' DATA LIST. (77)
Local variables
DDFIB
DDDATA
DDARRY
DDSYM

Branch Around Symbol Table
Data List Type SWitch for PUT DATA
Array Switch
Symbol Table Address

Program Interface
Entry Points
$DDS. Needs data specification pointer ($DDATA) and statement type
indicator ($BIOTY): no formal parameters.
Exit Conditions
Normal exit only.
Routines Called
$FVAR

$NEXP
$EXPND
$DOG
$EDGN
$EYPND
$GTRIAD
$SCDV
$NCONS
$WCTCT
$XERR

Locate Variable
Expression Processor Controller
Expander
DO Generator
END Generator
END Expand
Get Next Triad Entry
String Constant Dope Vector Initializer
Constant Processor
Segment Management
Error Message Editor

Global Variables
T Table

$DDATA
$BIOTY
$FCBAD

Token Table
Data Specification Pointer
Statement Type Indicator
FCB Base Address

Chart 35 3hows the detailed logic diagram for the Data Specification
routine.

112

TITLE:

I/O SPECIFICATION ($DIOS)

Program Definition
Purpose and Usage
The I/O Specification routine is used by the GET Generator or PUT
Generator to scan a statement and locate the file. skip. and data list
sections of the statement.
Description
Each section of a GET or PUT statement consists of a keyword followed
by tokens enclosed in parentheses. The SKIP and DATA keywords do not
require parenthesized tokens. and the EDIT keyword requires two sets
of parenthesized tokens.
This routine checks each keyword for the proper number of parenthesized
tokens following it. No checking is performed on the tokens between
the parentheses.
Three pointers can be set by this routine: $DFILE. $DDATA. and $DSKIP.
$DFlLE is set to point to the FILE token; $DSKIP is set to pOint to
the SKIP token; and $DDATA is set to point to the EDIT. LIST. or DATA
token.
Errors Detected
ERROR AT "___ '
(16)
DUPLICATE I
I
DESIGNATION--LAST USED. (70)
LIST MISSING AFTER I
"e (71)
DATA AND FORMAT LIST MISSING. (73)
FORMAT LIST MISSING. (7q)
Local Variables
DIERR

Error Switch (0

= OFF)

Program Interface
Entry Points
$DIOS. No formal parameter but expects $PTR to point to token at which
to begin scan.
Exit Condition
Normal exit.

$PTR points to semicolon.

Routines Called
None
Global Variables
T Table
$PTR
$DSKIP
$DDATA
$DFILE

Token Table
Token Table Pointer
Skip Specification Pointer
Data Specification Pointer
File Specification Pointer

Logic Diagram
Chart 36 shows the detailed logic diagram for the I/O Specification routine.

173

TITLE:

O/C SPECIFICATION ($DOCS)

Proqraru Definition
Purpose and Usage
The o/C specification routine is used by the OPEN/CLOSE Generator to
scan a stntement and locate the file, title, and input/output attribute
sections of the statement.
Description
Each section of an OPEN or CLOSE statement consists of a keyword
followed by tokens enclosed in parentheses (except for INPUT and OUTPUT
keywords).
This routine checks each keyword for the proper number of parenthesized
tokens following it~ No checking is performed on the tokens between
the parentheses.
Three pointers. which point to the file list, title list, and input
or output token. are set by this routine. If a token in a particular
category was not present, the pointer is null.
A flag is set if more than one option group is present in the statement
(that is# for a multiple OPEN or CLOSE). This will inform the calling
routine to return after processing the current option group.
Errors Detected
ERROR AT •
(16)
DUPI.lCATE -.- • DESIGNATION--LAST USED.
LIST MISSING AFTER'
•• (71)

(10)

Local Variables
Error Switch (0 = OFF)

DERR
Prograw Interface
Entry Points

$DOCS. No formal parameters but expects $PTR to point to token at
which to begin scan.
Exit Conditions
Normal exit.

$PTR points to either semicolon or comma.

Routines Called
$XERR

Error Message Editor

Global variables
T Table
$PTR
$DFILE2
$DTITLE
$DINOUT
$DOPT

Token Table
Token Table Pointer
File Token Pointer
Title Token Pointer
Input/Output Token Pointer
Option Group Flag

Logic Diagram
Chart 37 shows the detailed logic diagram for the o/c Specification routine.
174

TITLE:

FORMAT LIST GENERATOR ($FLG)

Program Definition
Purpose and Usage
The Format List Generator performs the syntax analysis and code
generation for a format list.
Description
Because the code generated for a FORMAX statement may call the code
generated for other FORMAT statements, it is necessary to ensure that
any temporary results obtained for replication factors use locations
that cannot be changed during the execution of another format or
calculation of data list elements. Therefore, another level of
temporary storage definitions is created during the processing of the
format list.
Each format specification (except A without a length) creates a format
element descriptor (FED). Each descriptor is one word long and contains
a halfword integer value followed by two one-byte values.. These three
values are obtained from the expressions within a specification. This
routine generates code to place the address of the FED in the file
control block (FCB) and to branch to the proper library routine. A
complex format specification consists of two E and/or F format
specifications. Besides putting the addresses of each of the FED's
in the FeB, the type (E or F) is also placed in the FeB. Thus the
library receives only one call for a complex data item.
Since the code generated for format lists is driven by the code
generated for data lists, the format list code must return to the data
list after performing each data specification and, in this process,
tell the data list code where to continue in the format list. This
address and the FeB address are kept in the format adcon area ($FORAD).
If a remote format is referenced, three addresses must be passed to
$FORAD:
1.

Address of FeB

2.

Return address to format list

3.

Return address to data list

To resolve extent of replications, a variable called FLSWT is used
to specify n item forms, and a variable called FLPLEV (parenthesis
level) is used to specify n format-list forms. Figure 3-3 shows an
expansion of a format list into code.

175

Format List

(F (3), (2*N) A(10), 5(F(3), SKIP, 3 E(lO,3)))

Code Generated

Spec F (3)
Change FMT address and return
Q2

DO-loop for 2*N
Spec A(lO)
Change FMT address and return
Branch to Q2

Q

4

DO-loop for 5
Spec F (3)
Change FMT address and return
Spec SKIP
3

Q

6

DO-loop for 3
Spec E(lO,3)
Change FMT address and return
Branch to Q6
Branch to Q4

Figure 3-3.

Format List Generation Example

Errors Detected
ERROR AT '
(16)
ILLEGAL USE OF '
(29)
ITERATION FACTOR NOT PARENTHESIZED. (78)
, ILLEGAL FORMAT ITEM--SKIPPING TO '
(79)
, INCOMPLETE FORMAT ITEM--SKIPPING To-'
'. (80)
ILLEGAL COMPLEX FORMAT ITEM--SKIPPING TO , - - , (81)
, NOT FORMAT LABEL--SKIPPING TO'
• • Cs2)
Local Variables
FLPLEV
FLSWT

DO Level
Replication Switch

Program Interface
Entry Points
$FLG. No formal parameters.
parenthesis of format list.

Expects $PTR to point to left

Exit Conditions
Normal exit only.

176

$PTR points to right parenthesis of format list.

Routines called
$DEXP
$EDGN
$NEXP

$FORI
$FVAR

$GTRIAD
$NCONS
$XERR
$AREXP

$WEXP

DO-Loop Triad Builder
END Generator
Expression Processor Controller
Format Item
Locate Variable
Get Next Triad Entry
Constant Processor
Error Message Editor
Array Expression Error
Segment Management

Global Variables
T Table
$FED
$PTR
$ FCBAD
$FORAD

Token Table
Dummy FED

Token Table Pointer
FCB Base Address
Format Adcon Area

Logic Diagram
Chart 38 shows the detailed logic diagram for the Format List Generator
routine.

117

TITLE:

FORMAT GENERATOR ($FMT)

Program Definition
Purpose and Usage
The FORMAT Generator directs translation of a FORMAT statement into
triads. It also generates the triads necessary to take the FORMAT
statement out of the normal flow of control.
Description
Because this statement may be referenced during execution of other
statements (GET, PUT, and FORMAT), temporaries used in the statement
may not be used by any other statements.
The first instructions generated perform a branch to the statement
which follows. Next the label on the FORMAT statement is defined and
the location from which the format was entered is saved. After
completion of the format, a return is made to this location.
Errors Detected
ERROR AT •
(16)
UNLABELED FORMAT STATEMENT,.

(30)

Local Variables
FMTFIB

Branch Around Format Triad Pointer

Program Interface
Entry Points
$FMT.

Expects $PTR to point to token following the FORMAT statement.

Exit Conditions
Normal exit only.

$PTR points to semicolon.

Routines Called
$BLPRC
$FLG
$GTRIAD
$TCODE
$XERR

Label Processor
Formal List Generator
Get Next Triad Entry
Triad Code Generator
Error Message Editor

Global Variables
T Table
$PTR
$CLBLS
$ FORAD

Token Table
Token Table Pointer
Label Switch
Format Adcon Area

Comments
No checking is done at compile or execution time to insure that formats
are not used recursively.
Logic Diagram
Chart 39 shows the detailed logic diagram for the FORMAT Generator
routine.

178

TITLE:

FORMAT ITEM ($PORI, $PORI2)

Program Definition
purpose and Usage
The Format Item routine is used by the Format List Generator to analyze
and generate any code necessary for expressions in a format
specification. It creates an FED and returns the address of the FED.
Description
Expressions in the parentheses following the format type specification
are evaluated. If constants, the value is placed in a dummy FED.
If expressions r space in the object program is obtained for an FED
and the value is stored in the FED space.
(The FED space is initialized
with any constant values.) If all expressions are constants, the FED
is defined as a constant.
If the type specification is not E or F, there can be only one
expression. If the type is F, there can be up to three expressions.
Any expressions not present are set to zero. An E specification may
contain either two or three expressions. If only two are present,
the third is set to the value of the second plus one.
Errors Detected
ERROR AT •
(16)
FORMAT ITEM HAS INCORRECT NO. OF FIELDS. (83)
Local Variables:

None

Program Interface
Entry Points
$FORI. No formal parameters. Expects pointer to left parenthesis
of specification in G2 and type of format in G4.
$FORI2.

No formal parameters.

Defines only a constant FED.

Exit Conditions
Normal exit. G2 points to token following right parenthesis of
specification.
Normal exit.

G2 not touched.

Routines Called
$NEXP
$ NCONS
$GTRIAD
$AREXP
$XERR
$WEXP

Expression Processor Controller
Constant Processor
Get Next Triad Entry
Array Expression Error
Error Message Editor
Segment Management

Global Variables

T Table

Token Table

$FED
$FEDC
$FEDNM

D~FED

FED Constant Flag
Number of FED Fields

Logic Diagram: See Chart 40.

179

TITLE:

FORMAT IN DATA LIST PROCESSOR ($FPDL)

Program Definition
Purpose and Usage
The Format in Data List Processor is used by the GET Generator or PUT
Generator to process a format list for edit-directed I/O.
Description
This routine advances the token pointer passed to the left parentheSis
of the format list. A branch around the format is generated, and the
address of the format is defined. After the format is translated by
the Format List Generator ($FLG), this routine directs the generation
of code necessary to branch back to the beginning of the format.
If the last format item was a data type specification, two triads
loading the adcon registers are removed. A branch to the beginning
of the format is generated. otherwise, the return address register
and FCB register must be loaded before branching back to the beginning
of the format.
After the format is completed, the branch around the format is resolved,
and the address of the format is saved.
Errors Detected
None
Local Variables
FPBRNH

Branch Around Format Triad Pointer

Program Interface
Entry Points
$FPDL. Register G2 has pointer to left parenthesis of data list in
I/O statement.
Exit Conditions
Normal exit is to four bytes after call.
Exit immediately after call if no data list is present.
Routines Called
$FLG
$GTRIAD
$TCODE
$WCTCT

Format List Generator
Get Next Triad Entry
Triad Code Generator
Segment Management

Global Variables
T Table

Token Table

Logic Diagram
Chart 41 shows the detailed logic diagram for the Format in Data List
Processor routine.

180

TITLE:

OPEN/CLOSE GENERATOR ($OPEN. $CLOSE)

Program Definition
Purpose and Usage
The OPEN/CLOSE Generator analyzes an OPEN or CLOSE statement and directs
the generation of triads for the ~tatement.
Description
This routine directs the identification of the location of the options
in an OPEN or CLOSE statement. namely. the file. input/output. and
title options. The O/C Specification routine scans the statement
looking for the keywords FILE. INPUT. OUTPUT. and TITLE. Pointers (the
file. input/output. and title pointers) are set to indicate the location
of the token list of the corresponding keywords.
Upon return from O/C Specification. a check is made to see if the file
option was present. If not. an error condition exists. Triads are
generated to load the address of the file control interface block.
For CLOSE. a triad is generated to call the Close routine (IHECLOSE).
For the OPEN statement. triads are generated to test the OPEN/mode
flag in the FCIB and. if open. branch around the rest of the code that
will be generated for the OPEN statement.
If the input/output pointer is active. a triad is generated to set
the appropriate file code bit in the FCIB. An error condition is
detected if the INPUT or OUTPUT specification in the OPEN statement
conflicts with that of a previous usage.
If the title pointer is null. an initialization entry is created that
will use the filename for the title. If the title pointer is active,
the Expression Processor Controller is called to evaluate the title.
A dummy attribute for the title is created that has the address of
the FCIB and target attributes of string and is eleven characters in
length.
The Expression Processor Controller generates triads that move the
eleven-character title to the FCIB. A triad to call the open routine
(IBEOPEN) is generated. For both OPEN and CLOSE, another option group
can exist (that is. more than one file can be opened or closed).
In
this case, the entire process is repeated for the next group.
Errors Detected
ERROR AT •
(16)
FILE NAME MISSING. (40)
• NOT FILE NAME. (41)
ILLEGAL FILE DESIGNATION. (43)
USE OF'
• HERE CONFLICTS WITH PREVIOUS USAGE.
ILLEGAL TITLE DESIGNATION. (110)

(57)

Local Variables
OPSW
OPPTR
OPTKN
OPTITL

OPEN/CLOSE Switch
Save Area for $PTR
Dummy Token Area for Title
Title switch

181

Program Interface
Entry Points
$OPEN.

No formal parameters.

$CLOSE.

No formal parameters.

Requires a pointer to token table ($PTR).
Requires a pointer to token table ($PTR).

Exit Conditions
Normal exit only.

$PTR points to semicolon.

Routines Called
$DOCS
$FVAR

$NEXP
$GTRIAD
$ TCODE
$AREXP
$XERR

O/C Specification
Locate Variable
Expression Processor Controller
Get Next Triad Entry
Triad Code Generator
Array Expression Error
Error Message Editor

Global Variables
$PTR
$DFILE2
$DINOUT
$DTITLE
$DOPT
T Table
$TITLE
I Table
A List

Token Table Pointer
File Token Locator
Input/Output Token Locator
Title Token Locator
Option Group Flag
Token Table
Dummy Title Attribute Entry
Initialization Table
Dictionary Attribute List

Logic Diagram
Chart 42 shows the detailed logic diagram for the OPEN/CLOSE Generator
routine.

182

PART 5 LOGIC DIAGRAMS
~OT.

The detailed logic diagrams for the rOQtines that process GET.
OPEN. CLOSE. and FORMAT statements follow.
PLII SYSTEMS """UAL

seGET

.

• •••••••••••••••
••
•
.aGEI
•
•

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

8G2!~ ••••••••••••

.:co:.. .-----------.
.tlrueFOR:
••

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

..FSYM

:**• :GE E.&~Of:'
STORE' •
:••• :SXno,L I~A~~& :

•

X:FN~

.00 •• X.

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

v
...............
•
•
...............

v

••••••••••••••••
•
OGENERATE CALL"

.---------.
'SOIOS

•

..'0.......•....•.
L,att.ARV " •
.PASS AOORESS •
•
OF Fe'8
•

• SET PTU TO •

•

OPTNS

• v• •

••

•

•

• • •NO
••••••• ¥..•••••

'YES

• •••••••••

SKI' POINT.R

• • NULL?
•••

•

••
:
•

••

"•

...............•:
"~~y~1

•

................
•......i •..•.•.
RETUfttf

•

•

.v.
• • ..,5
•••••••••••••••
•
•
______:
••
ryz:UJ ••.••.•.••..••.•

v
...............
•:lLm
--------4
O:T:ET :
•
......•
.......•
·GENERI~

'0

~!~~!!

•

6:P~;

p

~

.

.

X:

•
•
•
• ••
•NO

NOl,l:PUT

8G036

•••••

: ••• ~ C5:

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

•••

.K •••••••••••••••••

y

• • .ves
• • flll.Jr •• ....... .
••
•
• ••

.

TYPE. INPUT

••

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

y

• • • • eVIS

·

lGOID

•

PAItN?

• ·110
••

•
BGiZt••••!.......
:.OC'
...•••• X.ATI
: SAUI,PIll
TO :
ENTIlY •

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

•
...
Y FILENAIII!' •
•
• • OHL
EIltLO
ED IN
'X COO

•••

.* • •

• • • • *Hi ....
••_ pg*U·PIl<
.: DO·.
lOAn. i
2••
•
••••
•
• •

IGlOO

•

*'----------.
:omE~ ~a~:
'GENEAU

•

y

L......

BGi£~....

N 1Ft,

•

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

U

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

•

•

• YES

................• ..•••.
··...............
:SUPPHa.I
co:
.. ...

86D17

•

Y

,GOZD

YSlN : ••• ~

••.....J......•. •••

• AiLGET • • •
·...............
ON···
•
• •••
• S¥

Chart 33. GET Generator (Page 1 of 2)

TIL

•••• X 00.

183

PLII SYSTEMS MANUAL
SBGEl

................
.....
:80•..

........•............
8&100

BG055

••

...

GENERATE

•

•

AND ALIGN

•

••
•
GENERATE
•
*00 ... X.INSTRUCTIONS ..
*TO START liD ..

*..

X:rv~:~r ~=ge~D:

•••

•••

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

: •• ~ti~~ll~=••:

v
...............
•
•
....•..........

................,.,
.
...,
.
V

BG057

., *..,
.,

..
•
•

*81* •• X.ADVANCE TOKEN-

••

•

POINTER

.,

*

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

v
....••.........
.-----------*
...............
*SFSYM

SET 1/0
STATEMENT
TYPE

*

.

.YES

..

.. FIND ArTRIS ..
.. ENT FOR VAR ..

*

•
•
•

DATA SPEC PTR
TO 'LIST' 1 •

•

*

*

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

•

*

• NO

...

.NO

LEGAL
vARI ABLE?

.

•

•••

*• *x*., A4.*..

.

DATA SPEC

.. Yf\

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

•

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

.. INPUT L[ Sf

SYMBOL"
*

ENTRY .,

• FOR VARIABLE ..

*

:•••.••.••..••. x:

*GENERlb
•
..•• .. *----------.
:A5: •• X:ERROR AT '_' : ••••••••••••••• X

*

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

·

..

8G051

.YES

•

..

•

•

••

•

•

• ) '1

*

TOKEN COMMA.

..

•

•

•
•

•
•

*

TRANSLATE
DATA LIST

•

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

•
•
••••
•
RESOLVE
•
•
•
•••• X DO •
• SET ADOR OF"
•
1•
• •••
• SYMBOL TABLE.

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

•

•••

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

TO RI GHT.
•
•
PAREN OR
..... X A5.
COMMA
•
•
•

__

••*

•*

*

Cltu-t 33. GE'l' Gene"ator (Page :I of 2)

y

·SODS

. . . . . . . . . . . . . . . . X. BRANCH AND

•

•••••••2•••••••

,...

..
•

*NO

•• SK IP
..
•

..

DATA LIST
PRoe

..-------------.
..............
...............

*

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

• YES
•

•

FORMAT IN

:x ••.•....•.•..... :

*NO

NEXT TOKEN A

....

YES

•

8G130

................ x. MOVE PTR TO •••• X 81.

NEXT TOKEN
1,11

•• .o • • • .o

.

*SFPDl

..
•

*

8G071

..

v
..------------.............
..
...............

V

EATE
•*CR
... TABLE

..

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

•

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

BG060

*GENER33
..
.,•*• *-------------$
*A4* •• X. ILLGL DATA ........... .

'NO

POI NTER TO
'EOI1'?

V
•••••••••••••••

......•........
RETURN

v
...............
...............
CO~mlR
ER.ROR

•*
•

:..

PL./1 SYSTEMS MANUal

SSPut

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

'8PUT

•

·••- -•

• aVES

••

.ao-x

•

•

-

TYPE ..
OUTPUT?

••

• ........ .

• -NO
•

TYPE = INPUT

...............
-...............

v
...............
·................
•

OPTIONS

V

8P045

·sOIOS
•
.-------------.
• SET PTRS TO •

·GE"NER49

•

..

•

*-------------*
• NOT OUTPUT ...

•

F llE

: x .................... :

.

....

*YES
FILE POINTER
EMPTY?

•

••

'NO

•••••••••• B3.X

·

.

BP060

· ·.

•

•

•

•

NO

•
.YES
ONLY FILENAME.
ENCLOSED IN
......... .
J)ARENTHESES?

•

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

SK.IP OPTION
PRESEr..JT?

.* •

YES

·

·

•

V
*••••••••••••••

·GENER43

·

·

.

EXPRESShJN
PRESENT?

•

•

V

SUPPLY

•
•

•

:x ..................... :

................
-------------.
·................
•

•

..
•

.. .
...

FILE A

•

•

·

•

V

aYES

PARA~HER?

..

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

FIND ATTRIB •

·

•

EVAL fXD PT •
E XPR
'"

•.. STORE

•

• FOR fILENAME.

•

•••• X 8a.

.Wl TH VAL ONE.

YE S

·SNEXP

V

·SFVAR

••••••••••••••• X. SET UP FED

•

V

B P010

:SYSPRINT FilE:

BP035

BP09C

•

...............
.-------------.
·................

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

BP030

V

spoeo

•

·

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

:x .......................... :

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

•

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

·NO

• DESIGN IGNRD •

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

BP055

.-------------.
•
G£~ERATE
•
•
•
................... )(.
SKIP ON
•••••••••••••••••• X.INSTRUCTIONS •••• X B9.
.NONPRINT FilE.
.TO INITIALIZE.
•
•
•
•
.wITH IHEIOBA •
• ••

YES

3P020

•
.------------.
• IllEG FILE
•

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

BP075
'NO

FILE P~INT
TYPE?

NO

·GENER50·

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

•

.X 83.
..
•

•

ADDRESS

..

•

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

spoeo

•••

•

VAlUE •

I N FED AND
SET UP

•

•

V-

GENERATE

•

.S8* •• X.INSTRUCTIONS •
••
.TO INITIALIZE.
••
.WITH lHEIOBC •

NO

v
·...............
. ... .. . ................. .. .
•.....•.........• ••• ................... ....
BP090

••
•

3RANCH ON
FILE TYPE

• •X
••••
•

•

*
BO.
•

•

V

•

• •• *

.B9* •• X.SET 1/0 TYPE •••• X 80 ..
•
•
•
COOE
. . . 2.

Chart 34. PUT Generator {Page 1 of 2}

185

PL II SYSTEMS MANUAL

IBPUT

.....
.. .. ..•••••••••••••••.
.....................
*80 .. X.BRANCH ON 110.
•
..
..
TVPE
•

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

•• ••

8'125

'-YES
•
•
• *•••••••••••••• .SFPDL
*-----------.
TYPE·
fOR"'T IN *••••••••••••••.•.•••••••••
• • 110EDIT?

••

le*
..

..

••
• ·NO

DATA lIST

•

Pa.oc

•

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

.. ..

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

•

•

..

•

I/O TYPE
LIST?

.•

V

BPl)O

eVES

. . .

DATA

.SODS

•

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

•
•

•
•• •
DATA LI ST
PRESENT?

o

•

OX 02-

.

....

•

•
•

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

'-VIS •••••

•
-NO

•

. .•

DATA TYPE

1101

.. YES

v
·................
.•
•
·...............-

.......
i .......•
-GEttER?1

...----------*
*L
1ST MISS ING •
•
•

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

TRANSLATE
DATA LIST

•

BPUD

...

•

*-_...

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

·NO

liD TYPE'

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

-GENERATE CALL-

0

• TO lHEDOOC

•

.

.

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

••
•

a.art 34. PW Genentor {Page 2 of 21

.......i .•.••..

...............
RETURN

••
•

••*

••••••• ¥.......

...............·••
RETURN

PL/I snTEM5 MANUAL
NJOS

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

SDOS

..

'DO·"

• o

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

··........ .. .
00010

IS P

·A2 -

•
•

-NO

o

TOKEN

A • ('1

••••

•

0

••

,.

. ...

0 NT

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

••••

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

........
......
.:
·• ,.•
..• ......" ....••

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

•..ooa
.•....!.......•
....
: ---------*
TE=~.sT :
•
•

•

0

:AD¥~~At~reH:

*A3* •• K_LIS T TOKE . . . . .
•
•
..
T-) TOI(EN •

•

0

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

.ADVANCE TOKEN.
•
POINTER
•
•

0

.. ......
• YES

TOKEN AN

tOENflFIE":?

•
•

•NO

•

T -)TOKEN A
• J' ?

v

-

••......1.......•

•

co-..

~

:Mi~

................. .. . ·
DDO...

•
• ••••
••••• •••• •••••• x.allIET ,ttl TO •••• x AO •
•

•NO

.

: fem-'DijJ"
.. - :

•••

.X

.

·"es

"

AJ.

YES

: •................

..

•••

U

••*------6-----••
•
•

V

000L5

00015

DDtU
....i.......
.IA-Ill
00.

.X AO •

o
•

CONST

• • •YES

-

->

• ••
.NO

T-I ->T"I= .• • 0
•
. •oa" . . . .
•

.. Move AFTER •
-LEFT P.KEN (, •
VARS

.X A3.

• • •••••

• • •YES

v
·...............
.
-

00015

.~

T -) TOI(E:N •

•

• lNIT LOCAl.

· ..•..

·

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

: l fT 'AREM:

1•

: ••

_

•

....

••••:........

00015

: 8ACIF¥L TO : •••; .3:

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

:otllGJ:ft..t.eFT:

• ••••

•
"NO

r

•

o

-)TDKEN A
If· ?

-

•YES"

•

..

- •••••• x

v

•••••••••••••••
: PAr~~'Jrs : ....•.....•
•.SKIP TO RIGHT.
0

...............
o

0

187

Chart. lS. Data

Spec~fication

(Page 1 of 6)

PL/] SYSTEMS MANUAL

SODS

•

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

DOO""O •
......NO

•

•

......
. .
•
•
*110 •
..
..

•

NEXT TOKEN
COMMA OR
R !GMT PAREN?

•

•

•
•

..................
*JR-171
00.
.------,,----*

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

..
..

YES

:x ................................. :
Y
•••••••••••••••

000"2

•
0
.SAVE
INFO Foa.
o POSSIBLE
•
•
ARRAY
•

:.~~:~~111=

••:
O~

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

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

-NO

.

t 101

INPUT

_ __

••N E " .
-eS-SION •

~

.
v
................
*-----------.
.. YES

-SNEXP

•

.................,.
.. ASSl GM"fHT

•

•

0

·• x...................................

.

.

ARRAY

.

,EXPRESSION?

$

.

.•

000,"

·NO

.

•

•

............... X

••

..

•

..,

.., .......... .
••

.

-c.~2Jtat

•

•.

• yes

YES

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

00%0

V

•• REMOVE

ANY ..
IN:

...............
:GEN~:l tg~

.. EJ(P-RESSJON

•

·

...

.It. •••••••• _ ••••••

........
i ......
.
• IA-111
DO.
$------6------·

.

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

0

00045..

• •

•

.YES

•• l!""ijitbm • ........................
•

I/O TYPE?

••

--

••

-

-JIll

v ........
.......**
*SfXPNO
•
•:SEE
---------*
:8\kOWJN~

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

......J.......

-•
-•
:Ult,JMU&..=

...- ............
.................

.
.......,.......
V

DDnD

------:U.UftLsijl' : •••
*GI'ND"

•

. . ....

•

v
...............
..
..

................
.---------.

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

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

..
:

..

ARRAY-YES

....-exP..

: ................... x:

~

AI...

;..r

Evll.tlON : ••••••••••••••• X...

.. ..
...
v

•

...

_NO

OAT.. PUT,.

.. •

.. •

• ns

..

..

....

.. ······~··· •••••

...

. . . . . . . . . . .11.* A(l •
•

]*

•••
ODI5'

-

Ciau"t is. l>Ka SpecificaU.= (Paqe 2 of fi}

.-ft.".............
.
=yr....
..

l"n R TO"

l(:DA?2f:,

: ..~!.....:

D0100

....

..
•
~ A~."

••••

" ' " SYSTEIIS ~M"'IIA~

_5

DDU:............

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

eIR-IS6

AO.

~-----6-----

• '0 •• K*

•

·
.
•
eYES

ARRAY?

•

..
••
•

•

••••••••••••• X

.. .

OD110

• -NO

IS THJ 5 A

•

ND

•

PARAMETER?

•

••

•••

ex
•

Alt-

~

•

... YES

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

::::::;:......:

00150

V

.... :
00200:

*___________ e • • •
• ••..•.••••••..• X:Jhb~~~
Y~l~ : .. -! Ag. *;
•
•••••••••••••••• ••••
••
.YES

CONSTANT?

•

NO

•

•

-YES

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

UNSUBSCRIPTED

--•

__

SCALAR?

•

·......-••...." .. ·
•
00170

•NO

•

•

•• •
.YES
• •.......

IS THIS'
PARAMETER?

•

• -NO
•

••

•

..

.YES

eYES

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

o

•

·

.......
:.......•
•

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

ii

•

END SYMBOL

TABLE

.•..............•
•
GENERATE
•
*BRANCH AROUND.SYMBOL TABLE •

•

•

:x•.....•.••..•••• :

·................
ii

D0160

•
RESOLVE
...
_BRANCH AROUNO-

•

ii
•••••••••••••••

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

·•

v
·...............
.:

·

•

•

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

...

•

•

:

0

=2

•

•

...

V

OD210

DDlI:
••••i ...•......
...

: •••••••••••••••••

: •••••••••••••:

-

••••••••••••••••• ••••
•
0-1
•••• x A3 •
••• •••••••••••••••• •••••5·

:TAgrESI=8~B

.......2.......

ENTRY'

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

PUT ADDRESS ...

...

GENERATE

.SYMBOL TASLE •

_SYMBOL TlBLE •

•

••

• NO

• NO

OD172

• •••••••••

= 1 ?

x:
•

:I~

ATE·
CI8~ND:

.li~ll.:

...............
•
•
• "ND GENER.ATE •

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

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

:.¥:.~I::.llk.:

V

•

RESOLVE

: NEWTllrr't : .................. X:y~t~~HT~

Chart 35. Data Specification (Page 3 of 6)

i~'

•

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

..x:• .............• ••••

ooroo

•

IINE.ATE

Lt:i~RJO

•

•

•

: ... ~ A~••

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

,.

PLII SYSTEMS IIAIIUU

4

fOOS

e._.ODl.ot.............

....................
•:AG._
• .X:8Rt?;V
•
•
¥~..I/O:

• •

00155

•

-,..,• •

••

v

OOl:~............

• aYES

. .•.

•

1/0 Sf"' TYPE
• = PUT LISt? ..

DD200
•
••••
GEN!aATE
•
•
•
.................. X.tl6RUV CAl.i. •••• X 40 •

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

•

*

-,..,

·

•

..

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

• V __

•

•

Jfi£LDOB

DOI30;
aYES

•

•

•

...

~/~uiT~~IIy;E
. . .

••••

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

•••••••••.....•. x:

* _roo
-

•

=

•

*:

••

: ••• A~.
•
• ...

...............
----6------_

*IR-156
liD S'''' TYPE
:t OlHEa

D0200:

•

f.l:ERAlf:
8RLJN~ t~O
•
FO""'AT

5.

40-

*--

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

................. x.
•
: :

OOl:~............
..
•

•

•

EXPRE~~tON

.

-NO
A

.

SCALAR?
•

00200
• •••

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

•

_GENER'll

..

:-ExP'ill-lN--:.... ; -.0*.

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

•

*G-ET DAtA liS"

•YES

•

5-

v
...............

•-aRANCH ON J 10*•
..
STAtEMENT •
•
TYPE
••••••••••••••••
••

. • •1/0 STMT
•

*

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

00200

• *YES

.• .
••

•

..

..

GENERATE

•

....

..

..

*

• 1«1

• • • • ·VES
•

••

*

110 Sf"T TYP E
' •••••••
"" GET EDtT? •

*

•

·.

••

*1«1

I/O STIlT TYPE
•

110

•

TYPE
••••••••••••••• X.lI8RARY CALL •••• X AD ..
.. GeT LIST? •
•
IHElDI.
•
•
5-

OTHER

Chart 35. Data Specification (Page 4 of 6)

..

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

..

...............
EXW·
•
...............
COIIP
Ea

oR

•
•

PLII SYSTEIIS IIANUAL
SDOS

...• •
•"'0·

DD200
0

•• •

ARRAV •

•••• •
•
0

•

ONO

• •........

YES?

•

•YES•

v
...............
*-------------*
*SEYPtfD

•

:

:

·................
F~~p~sfo2F

...............
·· v ...
•
•
...............
.. ARRAY,. NO

•

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

·..... ..

00210

•••

*A3.

..

•

..

..

IS P -)TOKEt.,

.....

.•

00220

..

*NO

A ','1

* .................... X

IS P

..

•
TOKEN A

·

•

.................. ....
. .
..........•........ ....
V

.. ADVANCE TO
• NElCT TOKE~

.

00010

* ..... X
..

..

·

.

.

.YES

..

END OF DO?

*SEDGN2.

••••••••••••••• x.eNo GENFftATOR*

. . . .

•

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

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

D02bO

. . . . . . . . ..

I/O?

00230

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

•

• NO

.NO

..

.

..

IS P ->TOKEN

YES

PUT DATA TYPE

A2 ..
1-

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

')'1

.. yes

....

00250

..

-NO

V

V

*••.

• SKIP TO NEXT •
• SPEC I FICA TI ON.

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

•
YES

.

..

o .. 21

V

•••••••• x

•

•

')1

•

'I(

••

...

...
A3 •
•

..-------------.
.............. . .
·.....................-.....
. ...
·GENER16

-YES

00210

...

...
~IIOVE P TO'"
... TOKEN AFTEJt

-fRROR AT

00110

•

• ••

• • • • • • X A3.

• NO

.......i .......
•*GENERAT-E END ...•
:£N9:v!AT~NT

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

;,

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

RESOLVE 8R, •
AND CALL
•
IHEOOQA
•

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

:x ................. :
00225

;,

•• •••••••••••••••
• RETURN

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

Chart 35. Data

Specif~cation

(Page 5 of 6)

191

PLIl

SYSlEMS MANUAL

SODS

.. ,...,.

IR-156

*~.*

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

.AO X.

•• *

ENTER

IR-ITl

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

*

.NO

EXPRESS ION

TRIAD?

•

.............. X

.. IOENTIFIER?

,..

·

•

.VES

EXPRESS [ON

•

•

YES

*
.4o ..............
.
X.

•

•

••

ERROR REf URN

*

ENTER

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

.

• 'NO

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

DATA OUTPUT?

RETUf(N

IDENTIFIER

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

•NO

v
•• * ••••••••••••

.•

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

*00 X.

•

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

*

..

•

·

.

•••••••••

YES

*NO

•

.......... x

0=1 ?

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

•
*

• YES

.YES

• * .................. x*•

EXPRESSION
SUBSCRIPT?

•

'"

RETURN

SUBSCRIPT

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

v
......•........

··

••

*

• END CURRENT.
.SYMBOL TABU: •

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

•

~O

•

v
•• *.* ••••••••••

··

*N2
*

..

•

•

FUNCTION
REFERENCE?

. . . . . . . . ..

*•

.
•
•

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

•

•

0=2

YES
: X ....................... :

·

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

*YES
LEGAL

BIF?

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

.

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

v •••••
••••••• ***
ERROR RETURN

*•

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

VARIABLE

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

* *NO

·

RETURN PSEUDO

•

•

v

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

•

RETURN

PL/I

SYST~KS ~

.DIOS

•
•• •••••••••••••••
50105
• ••••••••••••••• ••

v
•••••••••••••••
•
SET FilE,
•
•
•
•
•

Ll ST A'Irt Ol TA

FILE

01030

•

•

•
• 'YES
••• • • •
•·Cl
•
• •••••••••••••
••
FILE PtJlNTER
Dl·)(
PH
.'
••• • • • NULL? • •
••
•• ••

...

DATA SPEC • • •
AND SKIP
•
POINTERS TO •
NULL
•

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

•

v

•

SI»E: •

?

~U~L

••

•

NO

v *....
..........
•

•••••••••••••••
••••
•• A2 • •• X'• SET ERROR •••
•
•
•
flAG Off
•
••••
••••••••••••••••

.'FS

DATA

~n

v
•••••••••••••••

.

.URO~

*fRI"q
•
.-----------~•
'SFJ:
•
•
F1l ... 0Ilt f 'fr.
•

.-------------*
•
SEE
•
:
FO~b~:ING :
•••••••••••••••

II

•

~JT~

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

....•••••••••••••••
v

..

•

..

•

BRA.NCH ON

•

'43 •• X'TOKEN KEYWORD'

DUP I)a.T/\ ,P~"
DFSJG 117"

•
•
•
TYPE
•
••••
••••••••••••••••

:x ................ :
••

01030
eyES

V

••

••

•

••

.SPE~.

•NO•

..*..

01025

• .X••••
01.•
•
•
• ••• •

.YES

*VFI:i
TO~F.H

..

V

..

01040

01 03~

••••
• •

.X A1 •

•NO

. **. •

•

•

• ('1

.C6.X

• 2'
••••

••

NE)(T TOKEN

•

.

~r025

• ·YES
•

•

*••

···D".....•
•••

9

••••

•NO

=

•

•• t

.w

.

'Lf~T'?

•

• ••
'YES
•
•
TOKEN KEYWO
• • TYPE
= snp ? •
•
•
•

• SET OIT& ••'"
POI ... TE.IU
•••••••••••••••••
..

NO

TOKEN KEYWD
TYPE' LIST
AND DATA ?

••

: X •••••••••••••••• :

V
...............
.

ot:'l'O

•••••••••••••••
••
•••
•
SET FILE
POINTER
•
•
•
•
•••••••••••••••

•
• OX••••
•
TOKEN KEYWORD
Cl'
• •• TYPE.
FILE? • •
•
••
• •••
• ••
•

.•

V

01033

~1

.-**.

•

~ElT

GS *'
2"
• .. t:f-

TPH~

It: '(

, f .?
..

nb~

•yr

•

~

: ................ )1':

V

•
••
..

•

••

'YES

• X (1 •

TOKEN KEYwO
TYPE· NON
IDENTIFIER?

•

•

•NO

*

~

..

'YES

••

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

..

•

•
•

•

.~*.

..

..

..

•

•

.

.0'1£ TO

..

.07 •• X.CORRESPONDING ••••
•••

•

RtGHT
*
................ .

• PARENTHt5IS -

JI01f
.h.

*•••

~FTURN

....

• NO
...
.............. X* Bl •

•

2'

DI080

·.
* •••

TOKI'N KEYWOi

*************lI:t
. * .•••••......•. x**ERROk
*-------------**

"Nu

OIC Specif.ication

00010

(Page 1 of

2)

**.***~**.*

•• (*

RnURN

*************(*

*

•

to

195

I'LII ,;ysnlls

~ANUAL

51)OeS

"

...... . .. " "
00040

.... .

*BO ..

.. ....
.....

OYES

..
.. .. ..

.

."

.. Nt:.

v

OU~L.

..

C1f-Il,ATi ON"

.70

..
..

7

........ .

.. NO

V

*-----------*
..
..
'~Pt

..

• ••• ****.*.*.1t*
.E~RO~
..
.fDi:-------------*
.. EkkOR AT - ..

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

*Er<.t\uI\

*-

.

.. ..

..
·YES
>
ERhOR FLAG or.

• • •••••••• ·CO ..

INf'UTIOuTPUT
PTR NULL ?

. ..

00010

*

'16

..

..
>

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

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

:x ................ :
v

·..

DO~28

....... *****.***
**
.. #*** ..
SET
....

'"
..
**********40****

........ ..
*r~

D~030

-

..

ec "

..

.

v

..

..

*•• * •••• _••••••

00015
.,

. ..

..

•

v ..

.

.NO

AT LtFT PAPEN

.. .

?

..

.. .
*

* * .•.•....

..

.. YES

v

.***.***********..•
.>RIGHT
..
* • .-.*•• *.* •••••

**r~
.. • ...~*******.*lj'"
r...k.
..
fOLlLJidNb

....

ERRO~

FLAG ON

• NO

•..

$----------*
..
Sll:.
*

*o

SET

:X ................ :

.. ..
..

Null ?

"

..

..

1*

°YES
Tnl!. PiJHHk
........ .

'"

·

....

>INPUT-OUTPUT ..... x
..
flit(
"'..

v

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

...

NOTE
..
*.* ............
.

ADVANt~

TO ..
PAREN • •

..x ................. ..
V
****** ••••••• **

00017

'"

..*MOVE

DUPLICAH

UHE

..

u11

...............
.-------------.
.
...............
V

FL320

.GENER19

.f:

..
lLlE(al
... FORMAT

•

••••

* ..• ...x

s,ec"
•

•

BO •

s*

• •• *

197

' l l l SYSTEMS MANUAL

SFlG

...

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

.

Fl035

FL~£2 ••••••••••••

•••••••••••••••
*•
PTlb·PTR+l
• • •
••
••••
•••••••••••••••

'•"
...
*AO ... X.

.BO ... X.

•

v
...............
.------------.
·SNEXP

•

PTP.-PTR+l

..

• •
•

EVAl AS FXO •
INT
•

•

'"PTR

•

•

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

•

.YES

PTR -)TOKEN

1;1

'tt?

•

*

FL260

•

*

·

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

* *...................... X.·CONSTANT-YES
DUMMY FEO-O
•
NUMBER-l

•
•

*

•

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

·NO

v
...............

*
'"

ADVANCE PTR

•

FOLLOWING

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

•

TO TOKEN

•

EXPRESSION

'"

•

.. • P ->TOKEN
'Jot OR

•

I

•

*

•

• NO

V

·GENERLb

F L240

•

•
•

ILLEGAL
TOKENS

• • •.-

•

•

•

5·

••••

FL300

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

•
•

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

...............
.-----------.
.•..............•

v

FL235

V

·GENER80

'" ADVANCE PTR •
•
TO RIGHT
..
• PARENTHESIS·

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

...

.SEE FOLLOWING.

•

•

NOTE

•

..x ................ ...
ii

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

··•••••••••••••••

FL038

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

188

PTR""PTR+L

*P

*
AO •

Fl060

..... X C6 •
•
•
L·

Chazt 38. I'onoat Liot Generator (Page Z of SI

.Fl322

••••
..X 83 •
•
5••••

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

.

FLItOO
•

·YES

->TOKEN •

'e'?

•
•• •
•NO

• NO

V

•

• NO

•

FL250

.YES ••••

.GENERATE CALL.
•
•
• TO LIBRARY
•••• X A8 •
•
ROUTI HE
•
•
5.
•
IHED08Y
...
• •••

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

• ·YES ••••
• AO •
P ->TOKEN = • *x
'RI?
••
* •••••4_
*
*

*

·................ ..".

.•••••••••••••••
------------.
•
•

FL040

•

P ->TOKEN ..
'SKU"?

*

......... .

YES

**

• YES
PTFI. -)TOKE",!
A I I'?

=·NO..

SIC II' 11

•

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

.

F l500

*

*'"

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

·SFQRl

V

FL277

•

• •••

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

•

FORNAT ITEM •••• X "2 •

...

FL402
_ •••

...

B=FIRST FED ..... X AO ...
ADOR A=P
•
•
3.

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

...............
.-------------. . .

FL275

...

•

5-

PLII SVSJEMS MANUAL

IHG

·... ................
.------------.
.•
•••...............

....
.....
. . ..
...............
Fl:~l*.** ......*.*

• AO ... X.
.. ..
•

P·PTR+l
PTR=PTR+2

••

*'FORI

...............•
V

FL420

•••
•
•
•

ONO

. ..
P -)TOKEN AN

'E' OR IF'?
•

FL410

•

•

.80 ••• X. FORMAT nE" •

•
..

o

GENERATE

•

AT 8

•

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

.oo ........... 81 ••• X*STORE ADDRESS*
oo. •
.OF FED IN FeB.

•

••

•

YES

·YES

PTR ->TOKEN =
'('1

v

•••

•
GENERATE
•
.STORE TYPE OF.
.FED [N FeB AT.
•
8
•

.X BO.
••

.

•

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

. .....

•

NO

:x .................... :

··.......i ........
·................
•
RIGHT PAREN •

•

................
·................
v
•
-------------.
.SEE FOLLOWING.

fl"'40

·GENER81

•

NOTE

FORMAT

I TE",

SKIPPING

.

•

• YES

....
....
•

.o.oX

•

NO

BO ..

•

5.

•

•

.•..............•
P=A

.oo .. X

• •

•

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

•

•

PARENTHESIS·

TOKEN

•

v
...............
··................

.-------------.
.GENEIH6

.ERROR AT '

•

'*

V

• ADVANCE !itTR
.TO NEXT COMMA.
•
DR RIGHT
•

v
...............
·................

V

'1

•

FL430

• GENER 16
•
.-------------.
ILLEGAL
•

Fl445

.' t

•••

.X AO.

• NO

•
RIGHT PAREN •

•••

·· .......

fPTR ->TOKEN

•

ADVANCE TO

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

S1.

Fl402:

.YES

81.

•••

•••

*x

•NO

•••

V

TOKENS

Fl420:

.YES

FL445

•

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

Fl450

..

·· .......

•

•

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

................... X.

.

*

FPTR -)TOKEN
A' )'?

YES

.

•

Fl3Z0

llLEG COMPLEX

•

PTR -)TOKEN A
Il t 1

•

FL425

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

...... •••• •••••• X*S:cSECOND fED . . . . . . . . . . . . . . . . . X
•
ADDRESS
•

S=SECOND FED
LOCATION?

• ADVANCE TO
•

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

.

• NO

•

-

, ••••

.

oo ...... ..

................... ......
...............
FlZ80

'*

*'

••••

• S7 ••• X.ADVANCE AFTER .................... X.RESET COMPLEX ..... X .A.3 •

•

Chart 38. Format Ll.st Generator

•

• RIGHT PAR EN •

(Page 3 of 5)

•

CODE

••

5.

199

~YSTEMS

Pl/'

MA~UAl

SFlb

·.... . .
.
FL 500

IS

THlS II.N

PTR=PTR+l

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

ON-UNIT?

4'

..
•

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

""10

*AO '"

•

··•

•

4"**

..

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

.. YES

v

i-

*.* ••• *** ...... .
*GE"IEP,Z9

..

:

:

*****.*** •• >t-***

*
*.-------------.
rLlEGAl USE *••• X
OF ,_,

*

*SFVAR

..

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

·
*

Bl~

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

.

LOCATE
'V,f,RIABlI::

..

***.$

'"
..

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

Fl 5 15

..

..

FL5Z0

*

IOENllf=IER A
FOPMAT LABEl? '"

*

'"

,.~

..

'"

•••••••• X.

Fl5Z5

•

•••

..

ADVANCE TO
•••• X 85.
.. RIGHT PAREN"
•
...

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

***

NO

.

. ..........

•

Fl550

..
l')ENTrHER

•

"'DO.

'"

·

•

f. (540

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

• YES

A

*NO
..

LABEL
vARI ABLE?

·

..

4.5*

*)(

YES

v

*.*****.*******
*SNEXP
'"
*-------------*

·
:

LASEI

.

EXPR

:

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

FL550

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

..*AS** •• X** ADVANCE TO •*

• '" * RIGHT PAREN •
**.
•
************* .. *

V

F lSZ~

***._.** ••• *•• *
•*
'* • •• GENERATE
A
*85* •• x*
LINK TO
*
* * * fORMAT
•
STA TEMENT
** ••••••••
*••••*

*

V

Fl530

•••••• **.* •• *.*
*GENERa2
*
*-------------*
* • *
• I. NOT * ........... *B6*X
!FORMl.T LABEL:
* • '*
********.*.** ••

•

•

FL5bO

*NO

*
*

FPTR+l

;>TOKEN AI)'~

·

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

............... x:
•

·..**............

.. YES

. '" .•.................• ..*••.
.*.
. ....
V

*B7 ••• X*

* •

•

PTR=PTR+2

FL320

••••

x

:0:

•

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

Chart

3"8~

Format Ll.st Generator (Page 4 of 5)

BO

5*

*

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

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

H 530

•

•

*GENERlb·
."'.
ADVANCE PTR •
TOp~~~~T
: . . . . . . . . . . . . . . . . . X:ERROR AT I_' : ••• ~ 86:

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

PLII SYSTEMS MANUal

SFLG

...- . -.. - - . • •........
-•••. .• • • -•
• •

Fa..250
•••
.. ..

FL320.

•••••••••••••••
.PREPARE DUMHV.

•

•

CO=~r.~E$

:

-

'YES

*KALFWDRD FED •
+'0 •. X. WlITH '1-1
..

.80 •

:

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

SNT-FA~SE?

_NO

v

.••••••••••••••••
-------------.
-•••••••••••••••.•

·...............-•

.....................
...................-

·.....
.. ................
.-------------.
..

.•
•
·-........,.. ··...............
..... .........

·
.·... .

• ,FORI

•••••••2•••••••

•••

•

• FORMAT ITEM 2-

Ii

'Li11

•

•

.. GENERATE
•
*".c . ,K.STORE ADDRESS.
'"
•
.OF FED IN FCB"

•U
•

LOAD FCB
ADORE 5S

•

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

·.•..................
Fl322

•

•••

.83.

•
•

_

.SEDGNZ

• B2 ••• X. ENO DO-LOOP •

V

~ l.l80

Y

1o-l.:HS

••

..

•••

SWT-FALSE

• ••

','1
•

v
·...............
.

fl325

•

•

.

.ves

PTR -)TOKEN A

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

·

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

•

•YES

1·

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

Fl322

•

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

•

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

•

• ••

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

FL315

•

•

*.*

•*
YES

v
·...............
.
...............

....
• •
.
.
. ...
Fl320

• YES
SPEC TYPE. •
TOKEN A
I;' ?

•

•

...• B4**' •• x.CBTAIN
•
•

.

•

V
••••••••
**•••• •*
.$BLPRC

...·

.
.

•
PTR'"'TOKEN '*
.LIST POINTER.
+1
•

..

FMOIO

·

•

v
•• *..*••••••••••

•

*-------------. ..
................. X.M[SSING LABEl ..... X
. . .

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

•

RETURN

'*

PL/I SYSliNS NANUAL
aFoal

•• •••••••••••••••
•
.FUIII
• ............... ••

.

v

~DOZO

.S, ••• X*

•

•••••••••••••••
;

.:•---------.•
DBrmr.~!~ED:

• .YH

VALuE A
CDNSTANI1

• .. .
••
• •
l'ou

..

• * ••••••••

ru

TUkEr.

•

• fULLUwlNG
• EXPRESSIUN

•
..

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

• ..

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

• ••

••

.. ..

•••••••••••••••
•• NEoAP
•

v ..

V

••••••••••••••••
• •••
•
• ADVANCE PIR •

••••••••••••••••
.• PTR·P1R.l ••
••
••

. • • ..
->JOK~N

PTI<

·..

A')' ?

.. •
•

.. ..

.. V .. ..

...

FOOltO:

A

•

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

.. •

FIl020

•••

EXP PKOC

: "k~fO~l~ : ..• : bl:
• HALFWUku I"'''
•
..
•
fED
•
• ••
•••••••••••••••

V

fOviO

•••••••••••••••••
••
PLALL

• ••• •

•

..

•

HAL .. ~(JRU

•••• J(

•

DUMMV t-t::D

*

aU.

••• •

•

•

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

•

••

v
••••••••••••••• • ••
•*ERROH
*-------------.
•
•
Ar - •••• •
x 12.
EPRO~

'16
•••
••• ••••••••••••••
• •••

YES

v

••••••••••••••••
N8F:
:•• mMms
FED
*'•
••••••••••••••••

FOO27:

.

F0030

•

••

·• x•••••••••••••••••.

•

..

T"'I~D

.. ·ns

tXP"fS~ION
~

yeS

FOkIlAT?

•

L

*

.f. . . . . ~#~.*~7'* ••

•*

••

••••••••••••••• '(.GENERATE A(lt. •
•

•*•••• "'1- ••• IC=*-:'''.*••

..
•

12& TO lED

NO

·• x••••••••••••••••••••••••••••••••.
Fnaj~;

V
..............
.
PLACE VALUE •*

IN NUMtU:iC.+l ••••••••
*RYH OF DUlloIY.

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

•

.. P4RENTHESIS •

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

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

•

•

•

•••

RIGHT

v

C~

.

..

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

• .NU •••
• • L~~WM? * *x•• •••
• •••
••
• ••
••

0

••

•

o
•
• OBTAIN WORD'
• FOk FED IN •
..
STATIC
•
•
STOkAGE
•

•
CNTaLR
•
••••••••••••••••
•

V

Chart 40.

YES?

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

..

• • NO

•

CONSTANT •

.(..3.X

...Nt:XP

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

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

*

v
••••••••••••••••

v

•

NUM8Ek =
NUM8ER • I

*•

•••••••••••••••
•:~~~AMmNgl :•
•
F~",
•
••••••••••••••••
•

VALUE Ih

FlJ017

v

•

.:

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

:SKtb,,~~ ~tJT

• NO

•••••••••••••••
*•.PTA
.. PTE( + 1.

F{}Oi~

PTk&~T~+l

• .. •
• ns

•
HDRAGf
•
•••••••••••••••

FrOitO

••••• •X 80•..
•• ..............•• ..••••2 •

·N'.." .X• J)2... ••• •
.. • PTII ->TOKE"I
?
','
•
.. • •••• • ••• •

v

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

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

.. ..

•••••••••••••••
:• VgIAt~DIt?~O •:
~IATIC

.
.

FUO~O

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

"YE~

FEll

•

•
s ••

•••••••••••••••
• GENERATE
•

FnO?O

• ••
• STORE IN
•
•
•
*WUMhEK+l 8YTE •••• x 91*

: Of AbhB ttT :

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

Format Item (Page 1 of 2)

•••••

203

PL/I SYSTEMS MANUAL

SfOJU

•"••
.YES
•
" 'E' UR 'F' ? •
••
•
•• •••

FO~b7

••

0

•••
*ao "•
* •
•••
0

P-)TlIH" A

0
• • • • • • • • • • • • ,.)t'

• ..

• . • MIl
..

0

0

•.

NUMBtR=I?
0

•

0

.. NO

.• ....... ,. ..

HES

""

•*

•

.. .

"

••

"

•

FOOHA

eYES

> 3 I

.

...

0

•
••

0

..

SEE

..

1'OLLOIo I$;

NlI"B£1<

•

<

3

•
NOTE
•
...............

••

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

.. • .YES

"

o

UN fUKMAT
~ ..tC

lI'i.

•• ••
.. NO

:x•...•..••..••••• :

Foa.7

•

..

v

•o

..

••" •
• A7_•
CONSTANT.YES? • ox
*8,.*"
• •••
•• "
• • •YF.S

-.

•••

·fIf~

o

,U"Ul

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

••••
82.
"

*X

• NO

.f:lUtOM

-82*,..X*

• V • ..

NIIMR€k

...............
" ..-------....
1'1)055-1.

••

0

...

• *x• t'''''*•
•
• • •

·

Y

" •

0

n.

F[1051

.YES

• , ?

"\lUMP-itt

~(j

•

• " .. •

0

--

v•

..

Fa051

.X &4.

*YfS

•
" " Mr"'Hf.R  is generated.
When the scaling flag is nonzero and the operand and desired types
are both fixed, a multiply, divide, scale positive complex, or scale
negative complex triad is generated to change the scale of a non-source
constant operand to the desired scale; if the operand is a source
constant, the desired scale is set in its attribute entry and the
constant will be scaled to this value when converted by $NCONS.

218

Errors Detected
OPERAND INCOMPATIBLE WITH REQUIRED ATTRIBUTES. (lOS)
Local Variables
NOTM

The operand and result type masks EXCLUSIVE OR's
together.

NOSGN

Contains the operation required to scale the operand
(that is, multiply, divide, scale positive complex,
or scale negative complex).

Program Interface
Entry Points
$NOPCV. Register P3 is the address of the first word of the operand
area describing the operand to be converted. Registers G2, G3, and
G4 contain pointers to operand stack, token table, and operator stack
respectively.
Exit Conditions
Control returns to the calling routine immediately following the
invoking call. No specific output values are returned.
Routines Called
$ NCONS
$STRD
$WEXP
$WCTCT
$NCALL
$XERR

Constant Processor
Generate Triad
Segment Management
Segment Management
Call Generator
Error Message Editor

Global Variables
$NLFLAG
$NLOPN
$NOPI
$ NOPR
$ NOPTR
$NOSF
$ NOTKN
$NOTM
$NRL
$NROPN
$NRPR
$NRSF
$NRSLT
$NRTM
$ NXFLG
$ NXOP
$ NXTKN
$NYOP
A List
N List
Z Table

Fixed-Point Scale Flag
Left Operand Area of Expression Processing
Field of $NO
Field of $NO
Field of $NO
Field of $NO
Field of $NO
Field of $NO
Field of $NRSLT
Right Operand Area of Expression processing
Field of $NRSLT
Field of $NRSLT
Operation Result Attributes and Description Area
of Expression Processing
Field of $NRSLT
Communication Flag
Stack Triad-Building Operand Area First Word
Stack Triad-Building Operand Area Second Word
Stack Triad-Building Operand Area First Word
Dictionary Attribute List
Dictionary Name List
Triad Table

Logic Diagram
Chart 48 shows the detailed logic diagram for the Convert Operand
routine.

219

TITLE:

OPERATOR STACK PROCESSOR ($NOPRT)

Program Definition
Purpose and Usage
The operator stack Processor is used to process, in order, all operators
in the operator stack whose priority is greater than or equal to the
operator pending addition to the stack. The triads required to encode
the operator and its operands are produced.
Note:

The comma in an argument list and the exponentiation operators
are exceptions. The comma is processed when the right
parenthesis token is encountered; the exponent operator is
processed when an operator of lower priority is encountered.

Description
The operator type at the top of the operator stack is used to branch
to the section of code which controls the processing of that operator.
These sections are: infix +, infix -, multiply, divide, exponentiation,
compare operations, assignment symbol, comma, and parenthesis.
The tokens defining the operands of the operator are located at the
top of the operand stack. The resultant type of all prefix operators
influencing an operand is contained in the stack entry. Scale and
conversion triads are formed, when required, to adjust the operands
such that they are compatible with each other and their associated
operator. The triad is then generated for the operator and its two
operands. The two operands are removed from the operand stack and
replaced with a token describing the result (that is, triad number,
type, scale, and precision). The operator stack is popped-up and the
process repeated for the operator at the head of the stack, if its
priority is greater than or equal to the priority of the operator
pending posting to the stack.
Errors Detected
ARRAY EXPRESSION ILLEGAL. (23)
ILLEGAL USE OF '
(29)
ILLEGAL SCALE FACTOR FOR'
"--IGNORED. (6q)
ILLEGAL OPERAND FOR OPERATOR '
(89)
OPERAND OF'
'MUST BE BIT STRI~. (91)
ILLEGAL ASSIGNMENT. (93)
INCORRECT NUMBER OF ARGUMENTS IN SUBPROGRAM. (94)
ARGUMENT "___ " INCOMPATIBLE WITH PARAMETER IN SUBPROGRAM CALL.
INCORRECT NO. OF SUBSCRIPTS FOR ARRAY. (96)
COMPILER ERROR. (100)
OPERAND INCOMPATIBLE WITH REQUIRED ATTRIBUTES. (105)
Local Variables
NXPARM
NXBINF
NXARGC
NXARGN
NXHTYP
NXPQ
NXRS
NXNAME

220

Used in processing argument list. Contains pOinter
to current parameter attribute entry if parameter
attributes are declared.
If nonzero, a built-in function is under process.
Argument counter. Used to count arguments when
processing an argument list.
Number of arguments in function reference
Highest type of all arguments in an argument list
Largest precision minus scale of any argument of the
list
Precision minus scale of last argument of the list
Entry point number of library routine

(95)

Program Interface
Entry Points
$NOPRT. The priority of the operator pending posting to the operator
stack is in $PRIOR. Register G2 points to the top of the operand
stack. register G4 to the top of the operator stack.
Exit Conditions
Normal exit.
Control returns to the caller four bytes following the
invoking call.
Parenthesis return. When parentheses are closed off (that is, a left
parenthesis operator removed from the stack)p control returns
immediately following the invoking call.
Routines Called
$NATTP
$NCALL
$NCONS
$NLSIB
$NMULT
$NOPCV
$NPRE

$TRIAD, $STRD
$WBACK
$WCTCT
$WEXP

$WSTEP
$XERR

Argument Operand Processor
Call Generator
Constant Processor
Library Search
Dimension Multiplier Generator
Convert Operand
Operand Set-up
Generate Triad
Segment Management
Segment Management
Segment Management
Segment Management
Error Message Editor

Global Variables
$DISPL
$ERROR
$NAARG
$NCPXP
$NESTK
$NFLAG
$NIDSI
$NLOL
$NLOPI
$NLOPN
$NLOPR
$NLOSF
$NLOTM
$NLTKN
$NPVF
$NRL
$NROL
$NROPI
$NROPN
$NROPR
$NROSF
$NROTM
$NRPI
$NRPR
$NRSF
$NRSLT
$NRTKN

Displacement from Variable Tables Address to
Fixed Tables
Parameter List for Error Message Editor
Count of Number of Array Arguments
Save Area for Arguments and Right-Hand Side of
complex PseudO-Variable
Address of Current Expression Stack Entry
Fixed-Point Scale Flag
Locate Variable Type
Left Operand String Length
Expression Processing Result
Left Operand Area of Expression Processing
Left Operand Arithmetic Precision
Left Operand Arithmetic Scale Factor
Left Operand Type Mask
Expression Processing Result
complex Pseudo-Variable Flag
Field of $NRSLT
Right Operand String Length
Expression Processing Result
Right Operand Area of Expression Processing
Right Operand Arithmetic Precision
Right Operand Arithmetic Scale Factor
Right Operand Type Mask
Field of $NRSLT
Field of $NRSLT
Field of $NRSLT
Operation Result Attributes and Description Area
of Expression Processing
Expression Processing Result
221

$NRTM
$NTCUR
$NRRN
$ NXFLG
$ NXPI'R
$NXTKN
$NYTKN
$NYTM
$ PRIOR
$PTR
$TAILS
A
C
N
Z
V
Y
X

List
Table
List
Table
Table
Table
Table

Field of $NRSLT
Number of Last Triad Generated
Field of $NRSLT
Communication Flag
Stack Triad-Building Operand Area Third Word
Stack Triad-Building Operand Area Second Word
Stack Triad-Building Operand Area second Word
Stack Triad-Building Operand Area Type Mask
Operator Priority
Token Table Pointer
Table of Pointers to End-of-Segment Control Word
for Expandable Tables
Dictionary Attribute List
Constant Table
Dictionary Name List
Triad Table
Expression Stack
Operand Stack
Operator Stack

Logic Diagram
Chart 49 shows the detailed logic diagram for the Operator Stack
Processor routine.

222

TITLE:

OPERAND SET-UP ($NPRE)

Program Definition
Purpose and Usage
This routine is used by the Expression Processor controller to move
the top entry of the operand stack to an operand area and to extract
its type, sign, scale, precision, and length attributes.
Description
The top entry of the operand stack is moved to the indicated operand
area. If the operand is a dictionary attribute pointer, the attributes
are obtained from this entry. In all other cases the attributes are
obtained from the stack entry itself. If the operand is a parameter less
function, triads are generated for this call. This result replaces
the operand.
If the operand is signed and of CHARACTER type, triads
are generated to convert i t to a FIXED integer. When $NXFLG is nonzero
and the operand is a string, the attributes FIXED REAL (9,0) are
substituted for the operand's attributes; the operand is flagged for
conversion by the Convert Operand routine ($NOPCV).
Errors Detected
USE OF'
'HERE CONFLICTS WITH PREVIOUS USAGE.
INCORRECT NO. OF ARGUMENTS IN SUBPROGRAM. (94)

(57)

Local Variables
NPSGN

Used to save sign of operand when conversion from string
to arithmetic type required.

Program Interface
Entry Points
$NPRE. Register P4 contains the address of the operand area to be
set up, G2 the operand stack pointer, G3 the token table pointer, and
G4 the operator stack pointer.
Exit Conditions:

Return is to the calling program following pOint
of invocation.

Routines Called
$WCTCT
$NOPCV
$NCALL
$XERR

Segment Management
Convert Operand
Call Generator
Error Message Editor

Global Variables
$ERROR
$NFLAG
$ NOPTR
$NOL
$NOPI
$ NOTKN
$NOTM
A List
Y Table

Parameter List for Error Message Editor
Fixed-Point Scale Flag
Field of $NO
Field of $NO
Field of $NO
Field of $NO
Field of $NO
Dictionary Attribute List
Operand Stack

Logic Diagram: Chart 50 shows the detailed logic diagram for the Operand
set-Up routine.
223

TITLE:

GENERATE TRIAD <$TRIAD., $STRD}

Program Definition
Purpose and usage
The Generate Triad routine is invoked to generate a single entry in
the triad table (Z table}. space for the entry is obtained and all
fields of the triad entry completed.
Description
The operator and location of the two operands to be placed into the
triad entry may be specified on entrance,. If not specified, the
operator from the top of the operator stack, the opez'and descriptions
in the left and right operand areas, and the result type field are
used.
If an operand is a constant, the value of the converted constant is
searched in the constant i:able (C table) and the operand replaced with
a token pointing to this constant table entry. If an operand is a
triad reference, the last-use field of the triad i t references is set
to the number of the triad currently being generated.
Errors Detected
None
Local Variables
TRSGN
TRZPTR
TRZP

Sign to be
Address of
Pointer to
the origin

placed on the generated triad
the current triad table entry
the current triad table entry (relative to
of the user's area)

Program Interface
Entry Points
$STRD. At entrance $STRD, register GO contains the triad operator
positioned in the leftmost byte and the type of the triad result in
the rightmost byte. Registers P3 and P4 contain the addresses of the
operand areas containing the descriptions of the left and right
operands, respectively. The sign of the triad result is set plus.
$TRIAD. At entrance $TRIAD, the operator is assumed to be sitting
at the top of the operator stack which is pointed to by register G4.
The left and right operand descriptions are assumed set in $NLOPN and
$NROPN. The result type and sign are contained in $NRTM and $NRPI.
Exit Conditions
Return is to the calling routine immediately following the invoking
call. Register G7 contains an operand token which points to the
generated triad.
Routines Called
$WEXP
$ NCONS

224

segment Management
Constant Processor

Global Variables
$NLOPN
$NOPI
$NOTKN
$NROPN
$NRTM
$NTCUR
$NXFLG
A List
Y Table
Z Table

Left Operand Area of Expression ?rocessing
Field of $NO
Field of $NO
Right Operand Area of Expression Processing
Field of $NRSLT
Number of Last Triad Generatea
Communicat-.ion Flag
Dictionary Attribute List
Operator Stack
Triad Table

Logic Diagram
Chart 51 shows the detailed logic diagram for the Generate Triad
routine.

225

PART 6 LOGIC DIAGbIlIS

The detailed 109'ic diaITRY PT
•
WI TH •

OFORM OPERANU •
o o. • TOKEN fOR
*A6* •• X'
fIIUMBfR OF
•
o •
.ARGUMENTS IN •

•••••••••••••••
TRIAUO

FOLLOWING

v

V

O.

..

0

GEt. E~O CALL
TN lAD .. ,FUNt
NAM~ rOKEN AS
OPND

.ARGUMENTS IN •
o~ALL f() hlCEO
e Ht~ t\!UMUlH. •

.ARGUMENT~

NC05

o ••••
o
OK 80 •
• •• •••1·

ONO

*••••**~uTE
••••••••••

v
•••••••••••••••
• NUMBER OF" •

OAOVANCE

•

•••••••••••••••
..*
..••• ••• x.*SSTKO
e---_____
seE
•

EACH ARGUMENT

CALL

0

• o ca~2yMi~10? 0
o
0
• • •yes
NCIO

NCOOK

V

v
* ..............
.
*•

PfF~R~NCING

•

TRIAD

*•
*
•* ••••••••••••••*
UHE END CALL •

v
••••••••••••••• •
HIT
•
••••••••••••••• •

Chart 44.

Call Generator (Page 1 of 2)

227

2.

PLII SYSTEMS MANUAL

$NC;ALL

***
* *

*'0
*
* *
***

* .. ..

... .
*

.

NC;075

*NO
*
*
FLAG SET ON? ..
*

.. .. *YES

..............
*
..
* ••••••• :;to:..
U& :
...............
**

*.STRD
*
X; ~=D '~i

....
..

*

.

v
...............
oO$STKD
•

oO-------*
.. FilII AXG LST •
• TRD I toNTI ..

..•••••••••••••••.
v

.•

.. fOR OED OF ..
:ARG
Of:

•
•

.
.

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

ARGUME"T ..
• FROM TUP Of ..

·.................
~TACK.

v ..

.1'10

·
·.

N(Ot;

:$
POP uP
• OPERAND STACK.

130 •
..

.. .NU '1t075
.....

....

YE~

.. ..

••

V

.. ..

ARGUM~NT AN
ARRAY NAME?

.. •

• ..

.. ..

'IIr •
•

SUCK

..

•
_
•

NEOO;

.. SI:.1 PftEflX

T~5~sfX~~·

•

..

•

.AB •• X. OPERATO~
•••• Cl.
.INDICATOR TO.
•
•
•••
..
LERO
•
• ••
••• a •••••••••••

•

•

Nfll'

• YES

..

•• •
• NO
• •

-

0

• • •...0

~

•

••••
•

-

• *x 80 •
• 3.
••••

NE24
.yES

TOKEN TYPE =
.. lEfT PAREN ?

.•

co ..

• ".
••••

NE14
• YES

.. •

••

•>

••••
>
•

• 'X

••

NEO;

..

...

Chart 46.

>

TYPE =
• RIGHT PAREN ? •

0

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

•

tiO •

V

•
• •TOKEN

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

..

>

?

v

OPERATOR

>POINTER FP~
•
~PERA~O

• ~O

• TA8LE
POINTER.
0

o••••••••••••••••

•

"fO.

ro~fN'

0

llf

PLAC.E hULt.
o• OPERAND
IN

-

1

0

OP STK
'E."ANENTLY
~i;T TO NULL
OP

•

..

s

..
•
•

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

IH

50

..•••••••••••••••
.. • ... ..
•
SET
•••••• Cl'
..•••••••••••••••.. ...

~fl15

V

ANU •

OPtMAfIIlO
!IITAi:K!) TI..!
tMPTY

V

.. >YES ••••NfZ7
> •
• •
TOKEN TYPE
• *x• .
IF-IER
• ]OENT
NA"t ?
••
• • ••••5'
•
•
• NO

v
................
..

..

•

-

NEZ6"
•
•TOKEN TYPE •=OYES• ••••
.
•
*X 63 •
ATTRIBUTE
.
POINTER ?
•
..
••••
• ..
0

..

.
•

••••
• ..

• *x

>

DO "$
3-

** ••

•••• •
•••• •

>
NO
........... X. 00-

~

Expression Processor Controller (Page 1 of 11)

231

51 :!:EH:7 Kt tiUkL

,lit,. j .

~"

eX,
1

****

V
••• *•••• «.... *••

••

OELI MlrER
•
fYPE
•
......... *-•••••••

• •

-• ..

,.

..

*~oo

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

$A4· •• X.

..

!l!u

•••

•
*.~..

BRANCH ON

PARENTliES IS
LEVEL I.ERG?

NO

NE1.2

••••
.. ..
..

~E48

** ...
• ·X.. B2 .

·YES

•
.****
•• *~.*****>II
*~*** ••••• *.*.*... ••••
*VES
•
rG.
.. *** ..
f'RIORrrY
*
• S3 * •• X... AO~~NCc r~ ••••
.. ..x A8 • • .C3 ~ ., • *rOKEN
> STACK *~ .•.. ~ ......... x*
TOP ,-'F
* ..... X R3*
.. ..
• NEXf TOKEN.
• l~
*
PRiOR[TY?
*
.,
.1PFRAT,JR
*'
*
*
•
•
. . . . . ** •••••••••• **.*
**.
*'
SfACK
*
***
•
•
**.*.*--***** •••
* * •NO •

*GENERlOO.

.....

H

~TACK

NE46

• • co... *cz
•••• .. • .
..
•
•
.. ••• • . .. .

V

~E2Q

NE

..

ZUD'

.. YES

y

•••••••••••••••
FOil"
•

•
•
•

END Of

UPRESSIUN

eXPRFSSION •
SUCK ENTRY"

•

~FW

FOP

•

• EXPRESSION •
•••••••••••••••

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

V

. . ...............
HE48

:...

FOW!¥~I!fi;

:

V

"'f2.~

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

•••
..HOPRT
•
ell •• xe~-----------.
S~E
•

.....
•

•

•

INCREA\E

•

.02 •• x_ PARtNTHESIS •
_COUNT 8Y ONt •
- _

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

:

V

",fl..

:...
:•••••••••••••••
~2~f~~~~Irs :
.OJ ••••
fO
•

..

•••

.

•

TDK~~

~PE~ATJK

•

•

V
................

"F2~'

-------------.
EXP" RSlT •
••••••••••••••••
•

.

HH9

• ' ... 11£

••

•• •
• NU

-

..

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

NESI>

Y
• ••

V
..•...........

••

.G~~Ek86

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

£AROA
•••••••••••• *O!i*)(-NAlFRNU EXPR •
•
.-

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

••

~

..

F~r~Y

NOR-MA.

t

(TT

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

..

n].*

• •••

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

..-------------.. ... .

·•
.Y~~

•

~F7~

•

~ktF'X"

:O~J'~~'~:Ig'

• EXTIl ATTo< \JF.

NULL?

....
: ...

V

• MOVt

•

• • RESULT

•

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

•

.• • v • •

•

STAC(

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

..••

'.

................
------------.
•
•
...............

·'NOPCY
•
••••••••••••••• x. CONyt ReSl' •

·· --

• TO IlfllD TYPE •

.. NO

.

·

• x ••••••••••••••••••••••••••••••••
NE50

• ••

•

•

NES8

·yt:s

Rt:~ULr

~UN'TANf?

•

•
•

•yes

Y
••••••••••••••
*

(;ONSTANf

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

.NO
•

• ATJ~nUTE • •

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

•• ••
• YES

V
. ..•..•........

Nt59

•••
• •x u;.•
•••• •

• aNeON

•

•

•

.-------------.
•
SEE
•
FOllOWllIG

NOTE
•
•• ••••••••••••••

~f5q5;

'''It-;?

• 'YRJAD
•
• ••
.FORM NULL lRO •••• X os.
- fON OPNO
•
•
•

$-------------. .. ..
••••• 41 ••••••••••• •••

Chart 46.

••

•

~ESUlf

•• •
• Nu

• •
• ••

•

•

e/iV! CONS

SMCH _Ii CONS

TBl

V

••••••••••• "'* ••••
.RETURN V4LU(- •

• . . . . . . . . oo . . . . . . . . .

•

lOX. OF cn,..ST "NT ............. .

•
•

Tn tALL ING
MOUTI ~E

•
•

•••••••••••••••
Expression Processor Controller (Page 3 of 11)

233

PL/I SYSTEMS MAhUAL

.NElI'
NE23
•••••••••••••••
••••
• •
.SET TOKEN PTR*•
.~o

•• X.

'~OP~RANO

•

• •
•
STACK
•
••••
...............•

..x ••••••••••••••••••••••••••••••••.
Y
...............
•• PLACE TOKEN ••
• IN OPtMAIIIO •
SlM.K.
•• ..............
•.•

NUl

!'lUll

••••••••••••••••
••••
•
•
TMIAU •

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

.

A~O

*,),1

•

•

......

(LkEN JU

•

*r,pt-t.:ANu:, TAU'-

.

NE2J~
V
.............
.
:•••••••••••••:... •• X.:PLAtE
V~lFtx :
UPEMATuK
•

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

:*

:

~ilr~~~A¥~S

tlXtU KtAL

ln~~~t~,~~

:

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

~~

:•• *

:A~~Axt~u~Tl~K:

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

v
...............
••
••

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

P.JSH DUWN

t ••• X tlO •

• OPt:M~ STACk-

•

234

Chart 46.

III~jO

••••• •

•• •••6.

Expression Processor Controller (Page 4 of 11)

'l'UI 5.'t$!J£.IlIS

s

~

'HE,P

...

...

..

/tU?

.

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

..~.A~

•

X.S~r

•

0

.

F~LlU.(~G.

•

•

~uTf

~.

~

.•

/jf7~

" "NO. "'$
•
TQ;(fN t lfF!
.X•
. ..'AAEN 1 • •••••DC!6·•
.
~

*.hO • •• .------_._----.

.•

., ..

• • • fJ • • • • • • • • • • tt

YE5

NE12
V
...............
••••
• •
• SET IOENJ ••
tCI •• X.SEARCH INOI • •
• • oro ARITH TtPE*
••••................•

SEARCH
DICTIONARY
fOt(
IIItNrIfll;t('S
ATTRI8 ENTRY

v
...............
• fURM OPERANO •

y

•••••••••••••••
•• PUSH DOliN ••

•
TOKeN FOR •
• IOENT FROM •
*ATTRIH ENTity.
•
PTM.
•

~tlb)

!~t
•••

•.. l:
•

~E'

~~~~5~T~~cU
rOKt:N

V

v
................
•
•

~

•••••••••••••••••
••
uPNu

•

•

'D~

: .•••••...••...... X:lg~~N~f~O~ij~ :
(C(JhT J

•

•

~~:*.

V
................

NE24S

•'FOR

• •• ••• •
SUBSClllPro

•

TABLE

·

. .....

-SUBSTITUTION •••• C 02 •

O'''OIClTUK TU •
UPNO Sf A(.K

FORM

I CO/HI

• ••••••••••

v
•••••••••••••••
•• !'IIEf 1< UP ••
•

•

•

• expll.eSSIO~ •
• STACK ENTR' •

•

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

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

:

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

NfiS

••••••••••••••••
••••
• •
•
OVtRANO

m~m~ON

:

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

•

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

•

•

3.

• •••••••••••• >t •

v
•••••••••••••••••••
•
PUSH DUliN •
• OPERANU STACU
••••••••••••••••
•

•

•
•

..

. .. . .

•

IOtNTIflER A

. FUNCTIUN?
.. •
..
•
•

NElq
•

.ns

V

•

•NO

•

IO~NTlfIE~

•

AMRAY?
•

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

-

..

•.

-• .. .

NElf,

• •••••
RO •
• •••••••2- •
.
. ••••
••
• NO
••••.. '..•• X:•AX•••
••••
NE60

DCl IN
HrERNAl.
BLDCK ?

oYES

.. .

tlOO

·,..u ••••
.~

AN

••

110 -

6.

••••

•

'tf')

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

N~ lu

~

• SAn TOK.N •
'UBlE pfR TO •

.. ARRAY "AM~
TOKEN
•

..

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

V

. ....

....••• ,.:$; ••••••••••• v ..
: ~~~;NJ5x~g : ... ; co:

•
..
•••••••••••••••
~hart

46.

*••

Expression Processor Controller (Page 5 of 11)

235

~YSTL'4S

;' .. /1

"'jNu~L

~NE).!;

.... ,
~jI

, . '.

he 36

• 't'r:£
?~r~~~['~f;

•••

• .~• ~8:•

. ..*

*" •••••••••.
t.....
... .....
'"
.

11i~:"
••• *~~$ .. tI • • f'.f'i-

r..;::~0

....
-eo .. X'-'

..

•

AO'VANll: :-11

~

N~Xl

•.OG •

..

•

.. ~l'P HI;
L
• • • • 11 • •

•
'f.
•• ~

......
. .•••••••••••••••..
*81
•

•

•• x*

"

•

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

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

.

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

• JOK~N TYPE· •
• RtSEl SCAN •
~

••

l'

AP ... o\v

SfACK

..·.... .
0)

?

?

• • '10
•"

..

.

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

.
.t
..
.. , •.
~r ~

·Yk~

•

TOf(Er. 'YPt.:

/OtNT. NA"f

••

••

Ii
. • " • . • "'''1•
. ASStl.~C;T~H • "
. ••••
•
" • ......
•

"E"~O

·

C.OIl~lAr.Y

.."

SUBSCR/ PI

..

••••
" ••• 6010••
PAiu"'? •
•
•'m

10K til JYPk

Ii

••

~(l

SUCK
• •• EXPkESSI'If\t
?
.
"•
..

•
.....

• V• •
•
-YfS
•
"•

.. .•

.•
•

..
•

.X 1:2

0-

JUKU. TVP.

• •lfFT

EXPECTED

1*-

"HI>

·'W'l ~

fOk~"

?

~I>

..

.

••• Rl-

uPk~UllR

.~

•

"I!>HI PAkEI\i?

..

....

• • AO ••

•..0

•

•.-•
• •

N08

•

ilU 1111 Ttk?

.

" • ..

• "••• •
• • "

OYH
ARRAY
ox 81.
SEC T [0"

"

rOK.N lYPE •

•

•

"CROSS
STACK

N:J

••
•

•

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

...
• •

.

STACK
.............
..•

"E~1

.Y~~

•

•

.

..

..

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

,«3~
V
"He
·utkERluQ
..
• ••
•
CM~LK ~kK
•••• x ~O.
*lYPt ~1 P~~L.
•
..

(

v
•••••••••••••••
•
BRANCH UN •
:• EXPRESSION
HWmo~~ :
•

V

SIlAM.• tt ON
tUK£N TyPE-

•

STK

*........

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

"fH

80$

.-----L~------·
GET 1ST ~ON •

~,y.

..

TU'~h

*NE1T

~t*

• •
•

* •• __ ................... x.

STACK

ARC;UIIE"T t 1ST

•

7'

. . . ....
. . ....•..............
NE1~

•
•

N;IJ

V

·•........•..•••'A..• . . .... ....
.
•••••••••••••••
.
•••
..
•••

aYES ••••

flAk ~""T~t,) I ~
LEVEl l~"n?

•

r~

*•••

Nu

• VrS

••

··

,

*x

82 •

•

J*

*08 •• X. SAVE
..
•
.TAlilE

TUk~N

•

P'11~Tt-P.

...u

••

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

•••

V
NF30
...............
..
• ••
*-------------*
'
"
•
.. MAlfOKMEO •••• x eo-

~~37

·uE~ERd7

•

~XPRESS[ON

..

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

..

*.*

*

..*............
V

•

SET fOK

seN.

'If 7c

• •••

.. INOX TO 15f.
..
•
.. E~TRY OF
•••• x Ct ..

...............
*SUBSCPT
•
~9L SURsr.
..

..
C).
• •••

'\'.,:

~

236

Chart

Let 6

.

Ex~ression

Processor Controller (Page 6 of 11

PL/I SYSTEMS MANUAL

_HEXP

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

.......

1"t.~8

••
• SO
o .. •
••• •

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

:AO·.~X:
Bft'~rl~~
• •
•
,YPE
•

••••

:):

• ..

•

•

u~n

.. •

BJ••

•

o

..

~tC

no

.....
~

•

•

..

•

.. UlFORMEU
• tAPItESSlllfoI

.

~

UEU~HEI<

PARE~.

.. RIGHT

•
TOII~N
•
..................

•

•• ••
• YES

•

*

•

•

•
..

L1sn

*

.....

"
~.
• ...

...

NHb

•" •

.NO
TYPE TOP OF
•
UPRESSION
"'X (;2 •
5TA(;K ARG
•
•
2--

• NO

TYPO = UTMER

liE31

•

:A~~t~i~KT~eH:.,.~ BO~ •

9

• C.3 ••
•• X
• 2"

~

Hf30

.E~PRHSIO/'i

NHO

.....

tES

...

NE~4

•• \11.

.X 81 •
• 6"

•

••

Y

• • •NO

..) ~ ••••••••••• X

..

••••
• •

·.................. ...

NUb

~

.
•

..

•

• . . . . . )1 • • • ) • • • • •

• •OHIMlTcil• ·YES ••••
• • TYP • • ? tOUlli •• .X•• t86·••
•
• • ••••
•
• •UYES .....

"
••

.....

•

NE8l

LEYEl =
ASSIGll STATE

.. •

1

$

•

.YES
"

••

...........*••••

.....
•
"
•
•
seT ARRAY
•
•••••••••• OJ •• X'OIMe~SIO~ Tn •

• .. * IERn
•
••••
••••••••••••••••

• YH

..

v
.................

NE78

* *YES 'tIt_*..
•"
• 08 •
Al(KAV " .X
• • l.EVt:1.
ASSIGN ?
• 6"
..
"
••••
•
•

•• ADYANC< TO ••
PARAH uFO
•
•• SOB PROGRAM
...........•

.....

o

••

.~HT

a

~

",

~

•

·•••••••••••••••.. ..).
V

.ADVAN~E

NESI5

•••
•
• ....... * ••••••••
RETlJ~~

·D~

EXPRESSI~~

NO

NE625

CO~MA.

•

NE82

*

_COUNT FLU OF •••• X 85 •
sr~.
•
8,.
ENTM.Y
•
.. •••

U:IIEl. TYPE

>TUP EXPR

...............·•
". RELEASt All
.STACK ENTP ,
•• FNTRI8 • • •
NE815
•
• ·NO ••••
•
••
• FUNCTION
IOUS
•
'*
•
• •
•03·)(
• TOKEN
••••••••••••• X •
aUILT-IN
••••••••••
= ARC.
eX: 04 '*
'* •*" TYPE
1
' •
•
7.
LIST 7
ALLOWING
•
•
• URRAY
• -• • •
ARGS?
•
•
•
•••
••
'*
•
•
•
•
• • •VfS
• • •YES
• • •NO

V

• ••
•
••

o

N£986

Yf~

•

•

Y

• *NO

..

y

NE998
• • • • .YES •••
o •
TYPE • ASSIGN •
•
EXPR
*x 03.•
• • STATE OR
7
•
•••••
•0
• ••

A

CO~MA

V

.-----11-----.
•
:

PRE~

. ....

•. ••••••••••••••

•••••••••••••••
.NE77
80 •

0

•

•

•
•

.•••••••••••••••..

GET 1ST
•
NON-H~R IN :

•

•••••••••••••••

NEP 1 ~

....

INCREAH
•
•
•
COHMA COUNT •••• X 04 •

8Y

O~F

..

..

7-

NO

v
•••••••••••••••
•
8RANCH ON •

"1£90
TYPE = UTHER

•••••
09 ••
• 10.
••••

N~988

•• ••••••••••••••
SET TYPf H •

.TYPE AT NEXT •

•• X

•
..

..
..

.eXPRESS SUC,,"

: ••••~i¥i~••••:

CROSS
•
•• ••••••••••••••

LOWER

•

EXPRESSION

•

NE96

•• ••

• • ••*
• NO

=

OTHER

.SECT

CROS~
nop~ vee.

•••••
• ** ••••••••*

.....•••••••••••••••.
•...• .....
..
•••••••••••••••

* •••• •

...
• •

NE98A

TYPE

•OSNCSDV
•••••••••••••••
*-------------.
.. FOR'"
•

NE998

•
.YES
JYPk s ASSIGN
OR EXPRESS ION
.X 03?
•

•

S~CT

v

• ••
eYES ••••
••
• 80••
•
= AR.RAY • ex
• • rVPE
.. .. 10e
ASSIGN 1
••
• ••••
• • NO
••

• ••

TOP nF
TO ARRAY

•

•

•• X 05.

•••••

V

NF989

**07 • •• X.*

..

•

PLACE ZEPn
TOKEN INTO

*•

.UPERAND STACK.

v

••••••• *.*.****
•

SET

•

UTTRI"UTES 1M
*UPNO 5TACl( TP*
• REAL FlU!) •

INTEGfP
..
•.. ••••••••••••••

,
................

~E23'

. ....

..
1tI* ••
..•
ADVANCt
•
..
..
•
ASTEMISK
•••• X 81 •
• COUNT 8Y ONF.
* 4*

..

•••••••••••••••

Chart 46.

Ex~ression

Processor Controller (Page 9 of 11)

239

•a

"F.9&l

u*

..

•

~s rEF

•

~OUN,

•

~

:)i:
..~

..

~.

¢

~

•

"'~*

•••

V
If!I • • •

•

NEXT

•

••

••

·

•• **•••••••••••"

•

"'~984

.YES

•••

..

...

ENTRY • RIGHT • *x* A5**
PAREN?
.....

•

*

..
•

•

.. ADVANCE: TO

"

..

~

• JO REAL FI XED.

MANY.

SECT
Rtf

(;RU~,

IN

CO'~A •

•

.

VF<',

*•

SR.NCH ON

................
.. TYPE

AT

TOP ..

.OF EXPR.ESSrON.

..

V

STACK

NEll

·•••••••••••••••. ....
~

..

"

•••••••••••••••••• ••••• •
•••••••••••••••• x.• PUSH uOWN ••••
•
STACK.

•

* ........ .

Ii ***.
•••••••••••

"
..

•
INTEGER
•
•••••••••••••••

'OPERAND

f1R RJG'iT
PARE~?

"'FRS

*:~~lR~~lk19Am*

NE983

roo

·NO

• TUKEN A

"

v

FOllO~ING

••• •••
• X..-------------*
SEt:
•
• ..
•
..
••
•
HOlt
•
•••••••••••••••

*

•
..

*•
SUtlSCRIPT*

PlCE JOKrN

•••••••••••••••

..

NEXT TDKFN

•"••••••••••** ••"

•••••••••••••••

·~f~CM96

."

.

•••••• *•••• **.

••••••••••••••••

*YfS

"

"

*SU8ST TSl IN *
HOP OPNO SIK •

NE'iSIt

•"

?

•

"E86

v
•••••••••••••••

••

•

••••
*x• 60 •..
• 2*
••••

••••••• *Ii•••••••

1'110982

F~M

•

"

••
• ADVANCf TO ..
..
•
NEXl
•
.a3 ••• X. SU8~CHtPT ..
• •
• SU8ST TABle.
••
•
ENTRY
•

•••

PREVIOUS

• NO

V
..•..•.•...•...

NEl6
·NO

TOKEN A COMMA
• OR tFFT PAREN "

•

~

•

•
•
..

PTA TO.

..

UBU ENfRY
•*•••••••••••••

•

:;.

~o

TOKEN
TOKEN

""

:•

•

.

""

•

!2 •

.¥$.)

•• SAVE

..-

:~u~~¥ll~}~~N

.~

Ii
•............
**.

*••••

.. ADVANCE TO

4·

PAREr; ~EVEl
l.;;"'c. l'

't'
~

.. NO

NEq~

.

toVES **-""

0

(~DO

I SK

lERD?

~l

*

.~.

..
*YF~ ••••
.. TYPF = A~PAY ....
..
CRnss SECTI11~
*x C7 ..
..
?
. . . . q.
•

TVPfc

*

•'"-IC

·YES

TABU:?

•

•

TYPE

*•••

•
.
...
.•
=

••
*x

SUBSCRIPT
SUBS II TUT [l1N
•

....

.

..

flO •
()*

..

'" I

= r)fHf-R

:x ............................ :
NE90
V
NEon
•••••••••••••••
•••
*GfNER86
..
• •••
•*Oq •. . x**-------------*
..
1144lFlht"'EO
...... .oX AS .. ..

..................... ....
..

240

Chart 46.

..

.. EXPRESSION

Expression Processor Controller (Paae 10 of 111

..

..

1.

11

Pl/l SYSrERS MANUAL
SIlt.P

...• •• ............... •
• •• ............... •
...
NEl7

•• 0

x*

ENTER

•

:x ............... .
v
...............
•* POP *•

:

EXpmuON

:

*
*
•••••••••••••••

• •
••

•

** ••
• NO

1\I~11!i·

V

•
• *YES
•
•• •........
15
AN
• • EXPRfSSION7
••
*
• *1\10
••

••

JYP~

.

.

.

.X •••••••••••••••••

v
...............
•• RETURN ••
•
5 Ill' •
• SlACk ENTRY •
•...............
•
AUI)RE~

v
•
•• •••••••••••••••
EXIf
............... ••
*

Chart 46.

Expression Processor Controller (Page 11 of 11)

241

PI It

,)Y<;l~/Io!",

""M'I/At

u.Nlll T

••••••••••••••• •
fNMUl
••••••••••••••• •
T

•

. .........•....
• FORI! ~Fl TVf •
"C~T

rnN Of •
•••. •••••••• ••• ~:• H:f1 Twe/~~"
:
•
I r.C'NTI
••••••••••••••••

.. •,.,n

.V

·;
•••••••••••••••

•
"~C.

•
"OP'

................

•
•

•

•

YF(.TOP FOR

..............:
··

N1'I20

,
................
•

.:1'4•: •• X:*-------.
fCLlUINE :
·.STftO

..

: ••••fil~••••.:

··

··
·
;
............... .

.

•
,_n
•• ............... •

242

Chart 47.

Dimension Multiplier Generator

ntM

•

••••• 84.

•

...............

v
•••••••••••••••
•
•
:• O£~I
~~'0lI
AlIU" IlIM •
•
'•.

••

NIOlf)

• CURP 40A...

.

H'U
• AOOP OF 01"1 •
'~ULTPl~ WIIN •
H u n (CCNT! •

. ...

.•••••••••••••••
• ,ppav rope •
•

• ••

•

Pl/l SYSreMS
IIlOKIi

M~HUAL

.. ................ ...
. ••••••••••••••• .
• • • • .YES
................
•
•..
EXIT
• •• k'~
I~E~ ~gT • •............ x:
C.CNV DESIRED? •
•
•

.. •

.

.
••

••

HOO~

.. •

..••

-Cl*X

•••••••••••••••

NI;

·.•
• . .•

...
• •

•

1'<001

.

..
• •IS uPcftAND Tu·NO
..
8~ CONvtKTED
• •••••••• *8Z·X •
•
T~ ARITh
•
TYPE?
•
•
•

."••

..

..

••

NOOl

:

•

•••••••••••••••

•.

•
••

..

.

?

• • •YES

•

• •••••••••••• **

EX IT

.•..

·· .. . .
.NO

• YES

•

••

..
*YES
OPERAND AND •
.X 01.
RESULT SCALE
EQUAL?
•

• •
..
• •: B~ ••

.. • FLAG SET TU ·Nu
..
• ·b3 •
SCALE OPERA'ID

• LtHGTH TO ..
• £lRIG VALS FOR.
OPEkAND
•
•

••••

• •••*•••• **.*.*

.............

•• ••

Nu30

*NO

•

• • •YES•

••

• *..........*DI*X.
.. *
•
• •

TYPE
FIXED?"

..

.
. ....
••
•

RE~~bIL~YPE

............. ·

• SH I;PI:RAND •
.. TYPE .. NO
•

..

OPERAND AND

YCS

.*...•.¥•••••••

..

..

.. • • .. . *NO

. ••.. . OPERANI.>
•

•

..

*.•.•..•.

•

•

.. •

..

•.

..

• •••••••• *•• ***
*

.
* ••. x***
rs*
..• ••••••••• *.......
*••

.NO

•'"
• OPERA'ID SCALE.
••••••••••••••• X.NOSGNsOlvtOf
> kESUl T
•
SCALE?
..
•
OP

.•

• .. •YES

"'..

:X ................ :

.....•••••••••••••••.
.....
.
•

•

PLUS

•

* ••••••••••••••

•

.
. . ....

NODI
• ••
.NO
•••
..
.
kESUI.T TYPE
.X 6Z.

.••
•

.•

• fLLAT AKITH.?

••

••

.

PRECI~IO"

••

..

•

•

•

kESUI.T

·.
?

••
•.**.*••••• ****.••

..

•

Nu05

•••• •
••••

.. • OPERAND A ·Nu•
• X C1.
SOUI
RESULT SCALE

•
""NT!
•
................

NUOI

..

• *NO

COMPLEX?

.. YES

V
••••• * •••• ** •••

•

RtSULT TYPE

YES

v

NODI

•••••
>b • .X el2.
.
• •
• • •••
.NO

"OSGN~MULT • •

•

•• ••*
.. YES

•

.. YES

•

••
•

..
*NO
• .. OPEkAND TYPE • •••••••• X
•
ARITH.?
*

•
•
• SET ~IGN OF ..
• A'o •• X- OPEI TO •

•

v ** ••
• ••••••••••

•• ••

V

NUOO

•

.
•

•

•

******** .... **",t..v

*

'"
~OSb~
••••••••••••••• X*COMPL~X
..

•

"Jf"

...., ..
= ..* ••• **
•
X At

~rAL~*

np

*"

*

**·.*******>:I*It*

'lJ

~

:; ..

~.~~

• YES

V
..***** ••• *******..

1'1101"72

..**

•
NOSGN =
• • ~
.COMPLEX SCALE •••• X AD ..
'"

POS. OP.

•

'"***.* •••• ****.**

•

2*

.***

v

•.**************••
• SET OPND
• SCALE & PII~NT :

.. ordlONARY
• ENTI. CONY
, SCALE lFT

.
.
...
• •

OP64

..

V=MAXNQOF

i8:t¥

OPND TO RSH
TYPE & SCALE

v
........•......
.------------.
•"
.•
•..............

.

v
.•••••••••••••••

.. SET RESUt.. T
..
TYPE TO

~~Ml

•

"

•

•

: .... :• co:•

..............•

•
PUSH DOWN •
*OPERAND STACK.

•.

v
...............
•
•

•
•
..

POPUP
OPERATOR
STACK

..
..
•

•
•
................

OPOO
• ••
•'12~1
• •OPERATOR
~l .VIS : ••••
< OR .X Al •

•

•

• STACK
'RIORITV?

• •• •

• • 1•
••••

.......... x:••••B-i."

•

NO

••

••••
o'u

Chart 49. Operator Stack ProQessor (Page 3 of 17)

PllI SYSTEMS MANUAL
SNOPRT

MULTIPLY
OPERATOR

...............
......
.. ..
...................
OP70

*SNPRE

,.,

,., • *-------------*
*Al ... X. SEE NOTE 1 ..

NOT-E 1, RMVE

RGT OPNO fROM
STCK & EXTRCT
ITS ATTRI85

v
...............
•
·...............
.•
*SNPRE

..

*-------------*
.. SEE NOTE 2 ..

NOTE 2, RMVE
LF T OPNQ FROM
STCK £. EXTRCT

ITS ATTRIBS

v
·...............
.
.. SeT RESULT"
•
TYPE TO
..

...............
• HIGHEST TVPE '"
'" OF OPERANDS

$;

v
................
...............
SIGN FROM

...............

• YES
..

.. SET RESULT"

..

..

* ........................... x

RESULT TYPE

.. OPERATOR &
.. rwo OPERAND.
..
SIGNS
..

..
..

.

FIXED?

..
TO SUM OF
..
.. QPNO SCALES ..

• NO

D~r~ •••• ~........

OP71

**.****
••• * •• **..
.YES
..
IS RESULT.
* • * SET RESULT •
* ••••••••• os ••• X.PRECISION TO •
SCALE BETWEEN

.. SET RESULT
..
• PRECISION T3 ..

..

HIGHEST

..

* OPERAND
* PRECISION
*****.** •• *****

•

OD15

CONVERT RGHT
OPND TO
~ESUl

T TyDE

*

NO

QP12

*GENERb4

.

....

:o~t~~~blp~~~):

* ••• ***.** ••• **

•• **** •• *••• *.*•

•
•*36 •••• X.·$NIlPC\(
.------------*
SEe NOTE 3
*

* *

••• ;!it

v

V

*•••• *••••• ****

3,

.

:66 AND -b6?

•

~OTE

..
..

...............
SET THE

. . . . . . . . . . . . . . . . X..RESULT SCALE ..

• -------------*

·
•

•

•

SCALE FCTR

.

.

QP75

•

N01E 4,

CONI/ERT LEFT
8PND TO

RESUL T TYPf

v
•••••• * ........
.
.SNOPCV
*"
.-------------'"
: SEE NOTE 4 :

·

••• *** ••••••• "'.

..•• **** ••• ** •••••

·

••••••• *V•••••••
..

.

V

*~******.*
*$TRIAD

••• **..

.. SET R=SULT
.. SCALf ZERO

OP60

• -----------* .. '"
•
GENERATE
* ••. x D6 .,.
•
MULTIPLy
* ••••
* 34'"
-RIAD
'"

•• **.*•••••••••

Chart 49. Operator St~.:::k Processor {Page -4 of 17)

..
OP71

• • .c<-

•••• X D5.

*

.~

RESULT TYPE
COilolPlEX?

•

OUT OF RNGE ..

•• * ••• *••• ****.

* •••••••• *** •••

.....
...

•

***

...

.

.

'IES

.

ii
* •••••••••••• **

OP7a

*

B6:

SET ENTRY

OP812

* •*
*
***.

•
.. PO IN1 NA"1E TO* ••• X 08
.fI XED COMPLEx.
5•
*HUL T ROUT I NE"

• •••• *•••••• * ••

...............
............
. . ...............
,.
.

.. . ·

*______ oo

....k ...... snNIJ'f'E)

_..

*al.Jt
.. • •

..

*

...
...
..................
•

Of- U'NnS-

..

:•

...................... ..-..... .

.•

..

-~
..

....... _ ••••••

•

~

..

flOAT?

...

-YES.

...

.. •
....ESut T SCAlE ..
*02...... • LEFT OP •
•
•
• StAlf-RIGttl •

....

.

.. *w
*

• Sfl RE5Ull

•

..

.

•

. .

.

RESUlT TYPE

CmrPlEI?

.

*'

..

IS RESUl.T

O'I'ES
..

.
. ..

.

seaE BfTWfEtt
.66 AND -667 •

•

*........ .

-NIl

...............
.
.
...............
V-

1lP95

•
*'

"OP' SCAL£+J28 •

o

~

...
..

...............

..

..ec.ISIOIO to ..

..

.
..................
...

*O'PER-.tJOIt UW ..

.

....*x as.. _...................
DI'&55

*

MSUt' TYPE

;

*-SMOPev
.. SEE- HOlE 5-

•

..v

.i.......
·........
.
..................

..
,.

...............
*--------.

01'&2

•

.. Twa OP£RAIttO- ..

srG8S

.
*NO

*

v

..

FUEIl't

·.tNOK.V
.. set lItO}l

...............
................
.... !i.e"
RESut.T
S JGN FROPt

•

v
................
*-------*
...................

................

..

.YES-

NIl

RESULT tyPE

•

..........i .........
!t.tl~n i~~E

.

RES-UL T TYH
C01t"lEXt

. v .. • ....es
•
.
.
.•

oo-------*

.. SET RESUlT

•

*

v
...............
.,.
.. SfE NOTi Z

• ..

.... • . . • ..

fJP&1
...

0 ...0

.. •

*GENE""
•
• SCAlE FAC'IR .-

*-----------.

......... .

*'

OUT Qf Rtt&E •

.. NO

...............
.... .......
v-

.. SE

..,.RE

..
....

T"

OP&1

•••
to.-...
*. ___ x 81.
AlVIDE TRIAO"

..

....................

i

OP60

·SNOpe.,
.. SEE NOTE'"

,.

V-

DP85S

*---------.•*'

••
*STR1_0
..
....
--------*
... .••..
*&5* •• x*GENERAtE
..... x D .. ..

.* * •
..D5 .... X.
.-

...............
:x ..................... :
.. ..
.
.. . .
•

*---------*
• SEE NOTE S •

..
..
...............

•

.NO

RESULT '''~
COJltPLEJt?

•

•

*

..x ....................
NDlE 4" A. .
sc.u~ 10

19-1FT "Me +
LFT SCALE}

. •*

.

..

•

... . .....

RESUl T TYPE
FLOAT?

.. NO

e

...

.•
..

OPU
...

e.•••

...

85.
•

.. YES

. ...............

0I'8SS
...

. ex-.

·YES

•
-

;

.......
2.........
*.tNDJI'C.V

OP85

....

SET RESUlt
.. SCALE lERO
*-

•

••

05 •

•••

.-

e

••

1lP86
•

SET

V
an

PJ

•

...............

*NAM TO- C."PLX ..
*DIY ON IASIS ..
.. OF RESUlT •

..

TYP'e

..

•••••••••• X. OZ.

...............

f)P872

V

••••
•
•
.FORM

•

AilS LIST.08 •• X. FOR CAll TO •
•
•
•
COMPLEX
•
•••
•
ROUTINE
•

•••••••••••••••

...............
·................ ....

DP90

Y

0P60

•-------* ••
• SNCAt.L

•

• •••

• GEM TRDS TO ..... Jl 06 •
•
3.
• CALL CGfW I t .

Chart 49. Operator Stack Processor (Page 5 of 17)

Pl/[ SYSTEMS I1.NUll

6

lNOPRT

"'*." ••••••••••••
·.*. .-----------_
..

.BO"' ••

COMPARJ50/l,
DPERATOR

*.

•

;Or

."....
..
~Al

~

P·REC TO
HIGHEST

X~
•

·J.NOPCV

•

.C~$ •

•
...

'"

*OIlERAND PREC 1<
••
** ••• il< • • • II<II

EQUAL?

•

·................

V

•

•

SET RESU.LT

V

OCIS

• seT UP ARG
*
.STK FOR CALL •
..
TO STRNG
•

•

• C3 ••• X. TYPE TO 81 T •

• ..

•

•NO

•

•••

.X C2.

.K
• C2.*

STRING LENGTH

• ••••••••• *••••

OC075

· .....
*..

.YES

YES

OPERATOR

•

TO ARtTH

OC065

RESULT TYPE
CQ'4PlEX?

......... .

•

·
•

. . . . ................
.
. . ... ."'...
. • • • ·......."'.........
.
. ...*. ...
·NO

'NO

· .....

STRINGS?

•

...

• .Y ES •••
• .X• B4.•
Bn

OPERA~IOS

.•

• • • • • • • • • • • • • 1t •

•••

• *1.• 64.•
• •

Dell

•

• 5NOJl'C V
'"
.-------------;J!
••
*•

....,."".........
..

• *.........."' •••

SE~

'"
1f

·YES

OPEU.~~S

if

•..

RESULT

• lr(*

oell

~

•• • • •
•*OO4lX
5'£C.1 At
••• • • TY'ES'
•
• NO

$:

""•• * ••• *.*.,. •••

•• **........... 1<

•••••••• "' •• * •••

'"

•

RESULT

,

Dcaa

*SNPRE

•• SET

oe14

O::'06~

• • • • • • "' • • • • 41 • • •

••

* STRING
•
• It"' ••••••••••••

ROUT •
•.COMPAftE
•••••••••••
* ••

• NO

: X............... * ...... :

V

OC02
•

SNP~E

•

•

·...............
*-------------*•
'" SEE IIIOT E 2

• *It:

·GENER89

...

.B4 ••• X. SEE NOTE J

...

V

• •••

..

•

•

*••• ** ••••••••••..

V
•••••••••••••
*•..

OP60

..

*-------------'"
•
'" SEE NOTE 7
..... X

..

• ••••• **V•••• * ••

... SET RESULT
•
• SIGN TO SIGN ...

...............

·................
...............

.-------------.

•

Db •

.*••

J.

seE NOTE 8

SC .... tE lFT
OPt-lO TO RSl T
TV?E & SCllE

•

••

*'

. .•....•
OC'30

·NO

•

OIiE O?ND

•

•YES

.

*D6*X
STR ING &
•
.. .. OTHER ARttTH1

·
.

Ot32

•••

•NO

..

•

..

•

.......... .

· .....

OC065

•

.X 06.

ATfR18S

*

•••• X C3.

·YES

.... •
'"

•

IDENTlCAl1

• ••

DC30 • •

::~~~~T5 &

OF OPERANDS.

.

•

OP60

V

• SET RESULT
•
•
TYPE TO
...
• HIGHEST Type.

OPERAND

OC01~

·.................. .....
·SNCAll

~

.SET RESUL l- TO ..... X 06 *
• ERROR TOKE,...
•
3.

*

• Of OPERATOR
•
TOKEN
•

•

..............

*SSTRD

. ......
··'"
................ ....

.

••••••••if * ••••••

OC04

.,.

. ................
...

..

_

·

•••
* ••••V,. ••••••
• _____________ •

'JCll

« ••••••••••••••

-NO

80TH O~NDS

·

NCN-ARl TH?

(: rES

..

•••

*x tc*
•

...
'"

·•••.
••

. . . . . . . . . . . X. 84.

Dell

• ..- .... <

. .....
...
.....

.VE S

.

RE3Ul T TYPE
lRrTHMETtC1

:('I

••

'"

N8
~~

...

'"

•••

.X 80"..
...

'*

NOTE 3, OPNDS
rotOT

C0\1PATlB1E

WITr! O?ERATOR

NOTE

-;~

GEN

TRIAD TO rES1

COMPlRE

RESULT

•

....... .(. 00*

OC14

10T~

CIJNVAT

.... ,
!.

S.tUE R<;;r
Tr; ~Sl T
TYPE ~ SCJ,lE

ant)

Chart -D. Operator Stack P.rocass:;,r (pagoC' 6 nl 17)

2£1

PlIl SYSTE"S MAi';UAL
SNOPAl

................

oc~o

•••

-.PRE

..

...81 .. •• X_*------------.
SEe NOTE 1 ..

.... .
......

A~yT5p~ ~la..

...

...............

STC< £ EXUCT
ITS ATTA]8S

v
...............
*-----------*

*-SNPRE

..

.. SEE HaTE 2

..

NOTE 2, REM
lFT OPND FROM

••
•
••••••••••••••••

STCK , ExneT
ITS ATTRIBS

·.................
v

.. SiT aESUll

..

NOTE ~TOPNDS
COMPATIBLE

·................
..
SIGH TO
..
• OIl-ERIrOR s reiN-

WITH OftERAfOR

·...................
v

.. SET RESULT
..
-TYPE HIGHEST ..
-OPERAND TYPE ..

...............

................ ..
..
.. ....
............•..

•

•

. ...
RESULT TYPE
81T STRING?

..
..

V

..

*----------*
.. SEE NOTE 3 ..

··•......•......... ......
·................ ....
V

0'60

• SET RESULT TO.", •• X 06 •
•
3.
• ERROA TOKEN.

252

••••

.. PERFORM OP

..

.

...............
--.............•..
-GENER91

.STRJAD"

*------------.. ..
••••••••••••••• X.GEN TRIAD TO •••• X-

-NO

OC48

OP60

OC~3

• YES

c.."lart 49. Operator Stack Processor (Page 7 of 17)

..

06 ..
3-

PL/I SYSTEMS MANUAL
$NO'RT

P=2! ••••••••••••
T
•

•••

•

•

..... ......
• P

HESIS •

:co:
.. x:
•• 'T8~

LEFT PAREN
OPERATOR

......
:C1· •. )(:

•••••••••••••••
BRANCH ON
EXPRESS ION *
:Sl
•.•
X:
~~:iEI2~o2F :
•••
•
STACK
•
•••••••••••••••
;II

•

•

NX41

TYPE

• *x• C2: ••
••••

=

lRG Ll ST?

• • 10.

• • NO
•
•

•

O~~c.¥~R

•

STACK

•

.....•••••••••••••••.

•

..

•

V

PHoa

....................

....

POPUP.

• C2 •• X. EXPRESSION
..

•

STACK

•••••••••••••••• X.
•

...

• • •NO•

..

COHM ••
.COUNT BY ONE •

•••••••••••••••••••

..-------------*
..............
...............

•

PN10

PN40

•

*NO

*GENER96.

ARRAY"

. ...
DIMENSION·

•

• tOMMA COUNT?

•

*'

................
·...........,.....
V

PN04

*SNPRE

•
.------------*
seE NOTE 1 •

L~~T6p~D ~iSM

•

STCK &. ExTRCT
ITS lTTRIBS

................ X. INCORR NUMB •
..
..
OF SBSCR
..

'"

YES

:x......................•........ :
V

'N12

•••••••••••••••
.'NPRE
•

·••••••••••••••••.•
*-------------*
SEe NOTE 3
..

•

V

• • • • • • • • • • • • 11• •

NOTE Z, GEN
'iUll VAlue
FOR NEG VAL

"NO

• •••••••••

OPNO SIGN

•

•

NEG?

•

_iMOpeV

.•..............•
•

YES

................
·•*---------.
..................•
;;

4ISSTRD

•

•

..

'*1I •••••

*

) TRIolO TOKEN 0
!\II
RESULf TO ..
"01~'UNO 5"1 ACIf"

•
•
................
:x •..••••••.•.•.•• :
MOrE 3: FOR'"
to MUL r
,iBSUn n

THlAD

MULTV~~li;A

Chart 49. Operator Stacl< P""_",,r (.?aI]e , of l7)

i .•.••••*

...•................•
.,NMULT

.-------------*
SEe NOT! 5 •
~

V

. . . . . . . ..e-••••••

•

•

.-------------*
... SEE ~OTe '" •
*

••

SEE ..arE 2

PAREN

•••••••••••••••

.

PN10

TYPE
SUBSCRIPT
LIST?

•NO

••••••••••••••• •
EXIT RIGHT
•

" .••••••••••••••••

= "~
• •••••••••••C3•
•
••• X.AOVANCE

* EXP

•

.:

_t... ..............

•

·YES .....

exp

V

. . . . . . . . . . . "11 • • •

>II

•

••

:

ACK ..

PN065

PNOO

•••

02T

V
$ ••••••••

• .lNiI,..E

***•••11

..... ............

••••

BO •
•*•.• ..x 1'·

... - - - - - - - - - - - .

"

$

• •••

•

SEE NOTE 1

•

)

oil

..

9

PlII SYSTEMS MA,.UAl
$NOPflT

•

•••

..

• •
.eo.x

EXPONENT AT I ON
OPERATOR

'"

• W"'S

••

NXOO

•

PENO~NG

OPERATOR •• ?

•

•

NO

•

.X 65
•
1.

*

•
.NO
RIGHT OPERAND
REAL FI XED
•••••••
TYPE?

*

•

NO

.·...............
-------------.
.
v

·SNPRE

•

NX10

'"

·................
'" SEE NOTE

•

••

1

.

•YES

•

•

seE NOTE 2

RIGHT OPERAND •
SIGNED?

•

•

•

OPERAND

RIGHT OPERAND •
ZERO?

•

··
·

• X BO.

......
.
. ....

OP60

..'"

•

TO RES TYPE.

ERROR TOKEN.

*............... .

•

3.

*

•

x.

·

exp ROU •

.·................ .... .
·....•........... ....

V

-------------.•
.. CV lFT OPND •••• x
•

01.
•

•
•

OP60:

ADD RESULT
•
•
...
SIGN TO END "' .... x 06 ••

• CAll TRUD.

•

3.

NO

..............
...............
'"

·

NO

SeT RESULT

'" TYPE FLO ... T

·SNopev

TO RES TYPE.

.........

*••••••

*

•
•
•

•

*'

•

..

i....... ..*

NX028

•

..
seT ENTRY
•
•
•
.POINT TO Re ... l •••• X 67.
*fLOAT INTEGER.
•
•
... EXPQN ROUT.
• ••

•••••••••••••••

v
.............
.
...............

..

.··...............

.·................ .....
•

.CALl

• ••••••••••••• *

NX12

..
..
•

.•.............

V

..
*-------------.
• GEN TROS TO to

V
••••••••••••••
*.•

V

.. SET RESULT.
•

NX029

*'
: RESULT TYPE:
• ........*........*

·SNCALL

: X..................... ;

...............
...............

NX028

...
"'PRECISION TO
.S1* •• X*
HIGHEST
•
•
..
OPERAND
••
...
PRECISION

.MODIFY ENTRY'"
•
POINT FOR

•
.YES
•
•
FIXED RESULT
•
• SET RESULT.
PREC < OR =
................. X.FlR EC TO (PREC •
91
.lFT OP +1) • •
• RIGHT OP +1 •

•

•

• SET RESULT TO •••• )( D6
•

...

• CV RGT OPNO •
•

·................
.................
·
.

•

V

·SNopev

YES

..... *... *V••*••••

NX 16

...•...........
*------------.
·................

NX025

V

.COMPlETE ARG ..
*STCK FOR CAll"
.TO EX PON ROUT.

V

•

•••

.·...............
.·..............

NX06

·YES

...............

·. .
'" · .....

*

NO

*-------------*
.CONVERT RIGHT.

.TO REAL SHORT.
•
FLOAT GEN
..
• EXPON ROUT
•

"'NO

·

•

.SET ENTRY PT •

.•.......•.....

• •••••••• x

·SNCON

v
·...............
.

v

• SET RESULT.
..
TYPE TO
•
'"
HIGHEST
•
"OPERAND TYPE '"

.TO ARG STACK .-

NO

v
..............
.
.·..............

V

• INTERCHANGE •
.LEFT &. RIGHT.
•
OPERANDS
•

·................
ElTHER
OPERAND IN
ERROR?

·

LEFT OPERAND
FLOAT?

·................
·...............

• SET RESULT
'"
'"
SIGN FROM
•
• LEFT OPERAND.
•
S tGN
•

•

•••

v

•

NX02

x.

.YES

SET RESULT.
.TYPE TO FLOAT.

v
·.....-........
..
...............

••••••••

.o . . . . . . . :

•

*

••

·YES

·.·...............

.-------------.

•
·...............
.•

...

•••••••••• Ol ••• X.ADD LEFT OPNO.

NX03

*••

NO

•

•

RIGHT OPERAND
CONSTANT?

N~Sl •••• ~ •••••••

V

• • • • • • • :Cr • • • • • • •

•

.NO

·

. .....

.YES

:X .............
•

.o. . .
••

RIGHT OPERAND
.X C1*
INTEGER?
••
•

•

• SNPRE

.o

• ••
••
• •
X.C1.X

... YES

•

•

.

v
..
....
. ...............
...............

OP62

•

·YES ••••

·U •

• •••••••••

STRING?

•

.......... ..• .· ......
.

.YES

FIRST TM

SET RfSUl T '"
SCALE TO
•
(SCALE LEFT '"

QPI • RIGHT
OP

*'

..

.·...............
y

• PLACE LEFT
•
• OPERAND AND •
• ITS OED IN ..
.OPERAND STACK •

•••••••••••••••

v
...............
...............

:SET ENTRY PT :

:

:I2T~~~k ~~~5~:"·········

•

254

Chart 49. Operator Stack Processor (Page 9 of 17)

ROUTINE

•

PL/I

10

SYSTEMS MANUAL

SNOPRT

...............
• • *------------.
....
.. .
..................

NX48

NX26

••

*SNPRE

*80* .. X. SEe NOTE 1

COKJIIIA,
OPERATOR

*oo.x

ARGUMENT LI ST

•

•

•
• **"*
•
• OPERAND

•

•

>

••

.NO
SCALE.
RESULT

SCALE?

••

•

.....
...
.....
. ...............
'"
................
.COUNT BY ONE

*

................
------------.
•
·................•

·

.

.·...............
.•..............•

v

NX20

*A1 •• x.AOVANCE

•

•

CO~MA.

V

"IX22

·SNPRE

•

BRANCH ON
..
• E)(PRESSION •
.. TYPE TOP OF •
STACK

1t

..

•

•• •

:)( ................... :
OP62

PENDING

•

TYPE",

.. .

ARG

•••

.X C1.

.

LIST?

------------- •
• CV RGT OPNO •

•

•

$:

*

•

·SNOPCV

•

•

•

...

.

oil • • • • • • • • • • • • • •

...............
• SET RESULT ...
.(PREC-SCAlE) oil
• TO OPERAND
•
.'PREC-SCAlEJ •

:X ..................... :
NX50

•

• SET NUMBER OF.
• ARRAY AR.GS TO.
•
ZERO
•

CV lfT OPNO •

TO RES TYPE •

.·................
...............
•

V

-GENER2q

COMMA NOT

•

SEE NOTE 4

•

•••• x Db •
1)1
•
3.

.SNATTP

•
YES

POP UP

OPERATOR
STACK

.X AO •

• 11·

.
.
•

•
•

...............
...............
V

*

•

NX41

oil

•••

.MOVE OPERAND.

•
•
.STACK POINTER•••• X (:6.

...............

*C6 ••• x* SEe NOTE '5

•

• ••••••••••••• *

V

NX42

•

•

... TO PREVIOUS'"
•
ENTRY
•

...

•

• ••

NX48

L~~T5p~o ~~aM

•

• OPERAND STACK.

STC' & EXTRCT

ITS ATTIU 8S

OPERAND

•

PRECISION>
RESULT ItREe?

..

·NO

••

*

•

•••

..

.X 00 •
•

•••

..

• • •YES

........ ......
..
. ....
...............

NOTE 3, GEN
TRDS TO MUl T

.·............... ...

DIMS MUlTiPlR

*

V

OP60

•*

•

...............

OP60

'NO

**.** ...i ....* ••

•
•

...............
.
..
. ..-------------..
. .... ·...

·...............

•

·
·

.MOVE OPERAND.
*STACK PTR TO •
.. FIRST ARG •
•
ENTRY
•

..

V *......
•••••••••

v
·...............
.
·................
POP UP

SEE NOTE 3

..........
NX60

•

OPTR AT TOP
OF STACK A
CO"MA?

v
·...............
.

v
-------------.•

• SSTRD
•
.-------------.
..

•

• PART OF lIST.

•••••..

*SET RESULT TO •••• X Db •
ERROR TOKEN.
•
3*

-

'NO

YES

v

·

..

•

................
-------------.
·................

V~

INIT RSlT

NO

TYPE = OTHER

**

OPERAND

1·

:C3 .... x:11~~~~~~clE~\:
•••
.TO lOWST VAlS.

TO RES TYPE.

·
......... .
· ·.

I PREC-SCAt E»
RE SUlf
(PREC-SCALEJ?

85 ..

V

NX41

•••••• *••••••••

·SNpotUlT

NXZ4

...

..
•

oil

v
·...............
.
·................

"YES

..

•

NO

NX40

•

• *x• *•

• NO

·SNOPCV
•

NX51

.YES •••

OPERATOR A
COMMA?

v
................
-------------.
·................

.X 80.

LI ST?

•

·..*•••••••••*••.

*'.."' ••••••••••• •*

•

SUeSCRIpT

.

V

• SET RESULT •
.. SCALE TO
...
*DPEq,AND SCALE.

.COUNT BY ONE.

....................
...............

CROSS SECT

•YES

• ••••••• $ ••••••

.Cl ••• X.REDUCE COMMA.

•

. v .
·................

NX26

= ARRAY ·YES
•

·

•

..........
.•

•
TYPE

•

•

• SET RESULT.
.TYPE TO REAL •
.F UEO INTEGER.

...............
•

•

v

••••• * •••••••••

•

SEE NOT E 2

....................
NX40

•

*......... .

LFT OPNO By

I\IX48

• SET RESVL T •
...
•
•
PREt. TO
..... x 00.OPERAN[) PREC.

• ••• •• *••••••••
~

*• •••

NOTE 4, GEM
TRO TO ADD
RGT 13'MO TO
COMPUTED
saSCK

Chart 49. Operator Stack Processor (Page 10 of 17)

255

M~HUAl

"l/l SYSTEMS

11

SNOPRT

•

NX60

•••••••••••••••

••••
••
..*.0
* •• X.NAME
.. MDYE T01I'

·•

•••••••••••••••
: oe~:A¥bR :
STACK TO

I~TEGER

-NO

v

"

-

-NO

v
•••••••••••••••
·SNCAll
"
•

................ .-.
·................ ...

y

NX999
NX72
• • • • .YES
..*SET RE SUl T TO*. '" •
* TYPE' 41
••••••••••••••• ". REAL FIXED •••• X AZ•
..
•
..
•
*•

Y

Chart 49. Operator Stack Procee.or (Page 13 of 17)

- .- I\IX9996f

........

"'YES ••••

FUNCTION

CAll 1

"'..

• NO

..

*x

OJ ..

.. lit-

..

.

............ X. A1 •
• 14 •

••NX996
**

PtTl SYSUMS MANUAL

14

tNo»r

NX996

•••

"*1.1"
"

...
"

..

""

..

..

..

• ••••••••**••••

.

"YES

RESULT TYPE

FIXED?

"

" NO

"

....

....
"

.................. x*

"

""

................

.................. X*·

aA.ANCH 0,.

.. ResUlt st IE "

""
..

IlZ "
" 13·
N)(72
•

NX12

"YES ••••

• • •

SIZE=O?

....

-XAl"

"

"13-

•NO

•

.

·

* .................. x

SIZE = 41

·

•

................. ....
..............."
:03•.. X:
•"
.... ..."..............." ....
....
............•..
...............
...............
...............

NX9996

"VES

NX9996F

"

NX 7 2

"YES

"

RESUl T

"

"SET RESULT

Ht:~~~ ~~l)

COMPLEX?

"

: ....

!"

"

~~."

"..................
NO
"1.2
""
x*
" 13-

NO

NX72

NX9991

SIZE" 81

"YES
"

NX12

..."
"
..
.. SET RESULT

••••••••• *(4 ... x*
"

"

PREC TO

"MtNr9, MAX
"
PQ-14"X QJ

"
"

"
"

"
SET RESULT"

••••
"
..

..
..

"
Q ""
..

"13.
••••

.................... X.SCllE TO MAX •••• X A2 "

·

•

NO

...............

•..............

NX999F

161

SIZE

• YES
•

·

• YES
::0:

•

................... x.
•

•NO

•

SIZE

•
•

SET RESULT
PREC TO
MINI9. MAX

: .. 1~~:1'*lL~...:

: .............. :

.................
·................

................. . ..
................. ....

NX9993

•

NX72

..

•

·

...

NO

................. . .
·................ ....
NX7Z

NX9994

..

24?

•

..

•

••••

. . . . . . . . . . . . . . . . x. SET RESULT
•••• X Al •
• LENGTH TO 6 .
• 13.

• NO

...............
....
... ..... .

NX9995

SIZE

••••

•

••••

................... X. SET RESULT
. . . . . . . . . . . . . . . . . . . . X.SET BUILT-IN ...... x A2 ..
.LENGtH TO 255*
•
FLAG TO 2
•
• 13.

201

• YES
SIZE

NX12

..
..
..
•
•
•
•
•
...................... X. SET RESULT
•••• X A2 •
..
.SCALE TO ZERO.
.. 13.

= 28

Chart 49. Operator Stack Processor (Page 14 of 17)

NX72

·................ ....tJ.·

......................... X:

l~~G'~sV~ T4)

: .....

~

._IIT

IS

JlL/I SYSTEMS MANUAL

v
•••••••••••••••
*
*
-SAYE K1GHEST ..
.. A1TRI8 TYPE •

•
•
...............
.. OF ARGUMENT ..

NX97
NUMBER OF

'"

••

•

...............
...................'"
NX97

"'..

.ARG FOR CALL ..

'"

.................

'"

'" ADJUST

ARG

...

..

.

V

..

x*'"

'"

8RANCH ON ..
TYPE'"

.FUNCTIO~

.

NX993

• TYPE:::::

'"

*A4* •• X.CONVERT TYPE '"
'"
'"
.MASK BY FU-NCT"

*.

•••

YES

'"

oo ....................

•

...............
.'"...•............

NX78

*GEMER94"

..

AR~ PA~~~~ER • • ~ .1.3:

..

'" '" *----------**........
*A3* ... X* WRONG "Of

"'NO

*............... x

ARRAY?

*ARG CONY VAL ..
•••••
*•••••••••

....
........•...... ....
V
•••** ••••••••••

• NO

NX82

.. .
.. ...

.YES
..

..

TYP"E ..
ARJTHMETlC?

·

*x AO ..
. . . . lb.

·

-

.... .. ..
...
:SE~L~gt\~-l~ : •.• ~ ~2.·
..
..

NX82

.YES ••••

FUNCT ION SUM
OR PROD?

-NO

NX80

. ......

..

..

. .-....
NX991

·1ItO

•••

•

.X 44.
..
..

FUNCTION
POLY?

*X C4 •
• • lb.

·

• NO

••••

• YES

...............
...•..........*.. ....

Nl(87

~X9G131

·NO

..
·
.................... ....
................. ..... .

TYPE. STRING

•

NX992

•

••

NX99ZX
•••

·

•

YES

FLAG TO 1

NX81

•

'" 16.

-NO

v
...............
:
...............
:A:8R~QaitO~8

•

LENGTH OF

•

•

CONVERTED

..

•

STftlNG

•

·................
V

•
•

•

ADD SECOND
AItG TO

OP-ERAND

...................
NX992x

•
•
..
•
. . . . . . . . . . . . . .C9 ••• X. SET RESULT

..

: ....iZ:l~•••• :

Chart 4-9. Ope.;oator Stack Processor (Page 15 of 17)

..

••

•

NX991

•
•
•
...... X Cit •

.lENGHt TO 255*

: ••••••••••••• :

•

'*

'*

••••

•

•

.................... X.SET BUILT-IN •••• x B3 •
•
FLAG TO 3
..
• lb.

.SET BUILT-IN •••• x li3 ..

FUNCTION CHAR
.X C9 •
WITH ONE ARG?"
•
..

..

•

•

V

.. -....
• YES

'*

NUM.8ER OF
ARRAY ARGS?

'*

'*

• 16.

••••

PLlt

SYSTEMS MANUAL

16

SHoPRT

...............•.....
NX82

.....................
.. •
.. BRANCH ON ..
"'AD ... X. FUNCTION
'"
'" '"
.. CHOICE TYPE ..

NX855

•

.YES
TYPE

=-

81

•

• *...................... X

0 OR

.YES

ARGUMENT
COMPLEX?

·
~O

NX98

·

• YES

··

*................ X

·.

A~3~~~~

..

•
•
...............

. . . . . . . . . . . . . . . . X*CQMPLEX ARGS

'" NOT ALLOWED

•

10:

.. YES

NO

.

.............................................................. x. x........................................................... ...

.• ........••

.. ••......••

NX87

Nx991

"'YES

'NO

COMPLEX?

·

*x

TYPE = 01

.X (4*

IS ARGUMENT

·•

.. YES

NO

•••••••
*.*•• *.*
*GENER95"
*-------------**

"'NO

AltOWeO?

·
·

•

TYPE = 41

• *..................... X

tS

83.

NO

......................
V

NX87

..
..
.CHOOSE ENTRY"
*S3 . . X. PT ON BASIS ..

TYPE'" 12

.. ..
•••

•

•••

*SNlSIB

·
*

NX93

... ...

• X B3*

·

V
*...........
*•••
.. FORM
INl tNE ..
BUllY-IN
•

•••• *

..•

.. •
•
*C4 ... x.

*

"85 •

..

FUNCT ION

TOKEN FOR

ENTRY

•

•

•

*.*•• *•••••••• *

•

V

NXS7

*.*.* •• *.***.*.•

"GENER95

NOT AllOWED.
•

**.* •• **.**.* ••

..

•
83*
*.*

..

NX991F

NX64

*N~

:"'** *
.X 5Z '"

.NO

....

ENTRY A

·..*..

·

•

YES

V

.

•

·

•

.X AO ...
.. 11.

*•••

YES

NX64

*•• *•• *•••

.SET ARGUMENT"
•
.CONVERT TYPE •• 'OooX
.YO ARRAY NAME.

•• •••••••••••• **•

••••

"'.

PSEUDO
VARIABLE?

FUNCTION TYPE
ARRAY?
• • 11.

YES

*>:oCOMPlEX
-------------.
'"
ARGS *.oo.X
>:0

.

SEE NOTE 1

• .
...... ....... . ·

ARGUMENT TYPE
COMPLEX?

I!I<

***

NX991

..

*••• ****** ••• *.

NX87

NX85

..

NO

-NO

•

TYPE ;:: 8

..

ARG TYPE

• -------------*

*X 83*
....

·

OF HIGHEST

NX90

NX81

NUMBER OF
ARGS ONE?

*

..

V
...........
** •••

· .....

·YES

...............

*

..
82

11.

•

·NO
* •ENTRY
COMPLEX.
PSEUOO
VARIABLE?

*.*.

•

·

•• 'O.oooo'Ooo'O

·

YES

.

v
** •••••••••••••

~~ny'~8g

RUNTIME lIB

REgS

•

SET COMPLEX.

PSEUDO
•
• VARIABlE FLAG*
•
TO 20
-

.*.*•••••••*•• *
:Xoooo • • oooooooo ....... oo.oooo :

NX99IE

V

*.*** ..***
••••••
.SET ARGUMENT •
•

·08.X

*CONVERT TYPE •

- NON-CONVERT
TO
..
..
•

•

•••••••••••••••
v
...............
.------------. . .
·:
.:... ...De:
·.NATTP

•

l~f=ilut~~

• • • • !II • • • • • • • • • •

Chart 49. Operator Stack Processor (Page 16 of 17)

... . .
• • ••
.. •

• ••

~

. ......
N)(991F

·YES ••••

ARE PSEUDO
VARIABLE
ARGUMENTS
VALID?

• • •NO

•

...............
V

*)(
•

AO *
11-

NX991F

*--------------• ••••*•
:oP~'~¥Ti~~"':·· .. ~ t~.·
•
* ••••
·GENER105

...............

261

SYSTe~S

Pllt

MANUAL

17

SNOPRT

.......... ..

.. • ..
..
. . :*...
:••' '. .SUmwT
.. • •
..
NX93

NXQ91F ....

*AO ..

FUNCTJ ON

_NO
•

fIXED FLOOR.
CEll, OR
..
*rWNC RTNS?*

"

·,~~~s:'3JO~F .V~S

**.*

*x

85 •

:.l~·

*80 ..

StACK

.. YES

*...........................................................

PNZ5

* *........... ..

ARGUMENT A
COHSTANT?

.

"

,.

:x ............................ :
V

NXb4

******.********.. *.**
*-------------*
..
CONVT ARG
*•.• ..X B2 • ..
·SNeONS

.•••• ****** ••• **,. .*.*
*W/OUT SCALING.

.

.. 11.

.
..

.........•.....

. ...
• ••

ILLEGAL

•

•

•

..•.•..i ••••...

.-------------.
·STRIAO

•

*GEN SUBSCRIPT"

•••••••••••••••

•
•
•••••••••••••••

NOTE 1, GEN
TRD TO AOD
VI RTUAl

v
.".............
..

•

TRIAD

V

·SSTRO

•

•

•

SEE NOTe 1

ORIGIN WORD

TO

sasc_

• ADD RESULT.
•
TOKEN TO
...
.OPERAND SlACK.

•"••••••••• *••••"

v
...............
.-------------.
··................
·SSTRD

•

.. SEE NOTE 2

..

ARRAY

................
·.................
..

*-------------*•
... SEE NOTE 3

•

............. ..

•YES

........•......
...............
v

Y

·"SIRO

'NO

ELEMENTS
LABELS?

•

PN30

•

NO

...............
.------------*
•
•
...............
•
*

•
*
*****.*.****.*.

PN20

•••••••••••••••

*GENER23.

.. .o ............... x.*-------------*
. . RAY EXPR •••• ..X 05...

SIGNED?

PN28

• CONVERT SCAtE.

TO ZERO

-yes

REFERENCE

"

•••• ******.*.****
.SET ARGUMENT *
..

ARRAY

NO

V

NXQ91fO

'=It••••••••••••
:.TTRII9¥es
OF:•
ARRAY
:DJkUIllTMM

X.

" ND

*VES

•

e". . . . . .

NOTE 2, SetT
DOPE VEe TO •
OF • TOKENS

...
SET
• IDENTIFIER
...
SEARCH

•

,.. LABEL TYPE

,..

•
•
.INDICATOR TO •

: x ........ _.......

·

·

PN20

• •••*•• *•••••••

...............
• DOPE VEC ADDR.
" & ATtRI8 TO ...
OPND STCK

V

•
•
• seT SPTR TO •
.05 ••• X. TOKEN TSL
•
'"
...
*ENTRY I CONTI •

"ADD tRSS SECT.

•

oO . . . :

.
....,................

.

v
•• *••••••••••••
•

·...............
v

NOTE 3,

ORIGIN INTO

CROSS SECT

DOPE VEC

•

"•

AT WHICH TO •

...............
•
•

•

CONT fOR
ARRAY

•

EXPRESSIONS •

.. ......

V
•••••••••••
*•••

··

PN35

•

*

PN065

••••

PUSH DOWN *••• x C 1 *
.OPEIUND STACK.
•
8.

• • •• ••• • • - •••••••••••••••• _•••• _.................. x*

•*•••••••••••••

262

Chart 49. Operator Stack Processor (Paqe 17 of 17)

PlII SYSTEMS MANUAL
SNPRE

................ ••
..•

.. • ..
NP45
•
•
•·ERROR
•••••••••••••••
•
. *•••••••••••• • NO OF PARA" ••••••••••••••• X..------------.
"'tIO'o"
OPERAI

• NU

NP30

•

•• ~tKAt\ltJ AN

*YI:S
..

alf"ltsUTt: PTK
1
•

•

.

••

OX

..

•

NP32

•
• ·bj.X
••• • •
••••
.0.
•••• • • •

• ."tS ••••
• . Bu •
1
• •••••••2-•

~l~NeaJ

•

··
~l

Nt.

• t-L.Au

~E

Ii

...

..

OX

•

• •••

..AK ITH

IYPF 1
..

r)(IT

~n

T TO ·NL
•

C.uNVt.t(f TO

•••• X C1 •
•
.. 2.

•
I:.NTKY
•
.........••..••

1

....•••••••••••••••..

v

V
NPItO
•••••••••••••••
•• eXT OPNDS •• •• ••• •
• AIIKlbUTtS
• ~KuH ~PNO

IH~

.. • •

"'''bv

~TCK

I

.• ...............
................

.
• ••••
05.
• •

·Yt:S

OPt:f\ANU

..

•••••••••••••••••
TO •

.. ..
.Sf fNTPY ~A?'.
*04* •• X*TO TIME; ~FT ..
.. ..
• lE~GTtt rr Q ..

6
..
•••••••••••••••

• ••••••• **.* •••

• St:T ENTRY •
_NAME TO DATEi.

•••••••• X

.SO
-

•VI::S

LN~IH

..

~..

:X •••••••••••••••..•••••••••••••• :
Ii
................
*SN(ALl
..

·

LPEKANIJ A
~TKl~b ?

.

..

•

..

•••

• ••

.................... ...

.* • .-------------*
..
•••••••• X.C5* •• x.
GH~ C.\ll
•••• 1(
••

•

..

TRIADS

..

...............

NP30

NP'O

-!ltU

..

..

..

*..* .*Sf

•

•

...

~1.

.n~

••

••• x.

~p~n\

THf

.,

ATT~.

V~L

..

RrT •••• -

..*.............
T~

.. ATTPIIiIITr)

....
'"

••• ..
(~*

..

II • •

YE:~

,
...............
.. ,
..
• SI uPIltL

AnitA_

~.

...............
*kI::ALC-"

*oPt.lO
..

A~

I.t-lb.

STRNt..

h.l.J~T»

•

...............
..
....
.
.•••••••••••••••.
v

..

..

Tu -sa:.

• lNVt-o( fbi

..

..

.." ................ ..

..

................
v

............•..•
•

Chart 50.

Extr

Operand Set-up (Page 1 of 2)

263

2

PL/I SYSTEMS MANUAL
$NPIIE
NP32

•••••••••••••••
••••
•.ao••• X.• aRANCH ON •••
••
.OPERAND TYPE •
••••...............•

•

- --

. .-

v
•••••••••••••••
•••
•••••••• • -C1 X.
EXIT
•
••••• ••••••••••••••• ••
•
•
•

_ OPERAND
TYPE -YES
•

-• -•

= ARU~"EfIC

•

•

NPitO

• .ND
•

•V••
•
•
.YES
OPERAND TYPE •
CHAR STRING

-• -•
s

?

••

••••••••••••••••••

• SET RE SULT
••••••••••••••• X. AlTiUB TO
•
• flXEij. REAL
•
19.01

•••••••••••••••

y
...............
-$NDPtv
•
*-------------.
.
•
seE NOTE 2 •••••••••••
••
••
•••••••••••••••

OT"f~

V
................
•

"'P42
*tRKOk

""46

• •••

•• -------------*
• •
s"Ef JltUT£ 1 * ••• x 02 •
•
•
•...............
• •• •••i-

Chart 50.

•
•
•

• NO

OPtRAfo
213

The end prologue operator triad is used to initialize tables for the
generation of the chain of code required to evaluate variable lengths
and bounds, to allocate variable-length data areas, and to initialize
dope vectors for the variables of the block. Space is reserved in
the code area sufficient to branch to the first element of this chain.
The address of the first byte of code for the block is saved so that
this prologue chain may be completed when the end of the block is
reached. Code is generated which closes the block's prologue.
The left operand is the pointer to the block information table
associated with the block. All other fields are null.
The begin DO and end DO operator triads are used to define the code
bounds of an iterative DO-group. The Instruction Assembler processes
the register table (R table) to generate code to store the expression
values contained in registers which still have active usages. These
values must be retained in their temporary storage until the associated
end DO is reached. All operand fields of these triads are ignored.
The return operator triad is used to generate code to return from a
subprogram. All operand fields of the triad are ignored.
The dope vector element multiply operator triad is used to form the
dope vector for an array cross-section. Code is generated to form
the product of the two operands. The right operand always refers to
a multiplier from an array dope vector. The operand field is the
dictionary attribute node pointer of the array. The right operand
sign field indicates the dimension number of the multiplier required.
If the left operand is an attribute node pointer, i t too refers to
a dimension multiplier from the dope vector and its sign field indicates
the dimension number of that multiplier. Dimension multipliers are
halfword quantities. In all other cases, the left operand is a fullword
value as specified by the operand and its sign field has the usual
meaning.
The dope vector store operator triad is used to form the dope vector
for an array cross-section. Code is generated to store the right
operand into the halfword left operand.
If the right operand is a
dictionary attribute node pointer, the operand refers to a halfword
field of an array dope vector. The operand field is the attribute
node pointer of the array. The right operand sign field indicates
the dimension number of the dope vector element required. The sign
field of the triad indicates whether a multiplier (q), upper bound
(0), or lower bound (2) is required. The left operand is always an
address in static storage of a halfword dope vector element.
The scale complex positive and scale complex negative operator triads
are used to scale fixed-point complex operands. The left operand
defines the complex operand; the right operand, the constant table
(C table) pointer to the power of ten by which the left operand is
to be multiplied or divided. The sign fields and the type mask have
the usual meanings for arithmetic operations.
The halfword subscript operator triad is used to generate DO-loops
for the expansion of array expressions.. This triad is used to refer
to the upper and lower bound fields in an array dope vector. The left
operand is the dictionary attribute node pOinter to the array. The
right operand is the offset to the dope vector element within the dope
vector. All sign fields are always plus.
The store code address operator triad is used to generate code to store
the current value of the code location counter into an adcon for use
by the Error Routine (IHEERR) at runtime. All operand fields of the
triad are ignored.

27q

Errors Detected
CONVERSION ERROR--SCALE FACTOR TOO LARGE. (84)
COMPILER ERROR. (100)
Local Variables
None
Program Interface
Entry Point
$TCODE. The pointer to the current triad table entry is pointing to
the last triad for which code is to be generated.
Exit Conditions
Control returns to the caller immediately following the invoking call
except when the size of the user area is too small to continue. In
this case an SVC 6 is given and control does not return. Registers
at exit are the same as at entry; no specific output values are
returned.
Routines Called
$ NCONS
$NLSIB
$OPMZO
$SCDV
$SVC
$TOPR
$VGTMP
$VINSA
$WBACK
$WCTCT
$WEXP
$WSTEP
$NCVT
$XERR

Constant Processor
Library Search
Optimize Operands
String Constant DOpe Vector Initializer
SVC Director
Triad Operand Processor
Temporary Storage Management
Instruction Assembler
segment Management
Segment Management
Segment Management
segment Management
Constant Conversion
Error Message Editor

Global Variables
$ACODE
$ASC

$ COMAn
$ ERROR
$GBQF
$NBIF
$NCCUR
$NLINE
$NPVF
$NTCUR
$NXFLG
$PADD
$PARAM
$PLNG
$PREG

$PSGN
$PTKN
$PTR
$SEVCT

Pointer to Next Available Byte in Object Code Area
Offset to Next Available Byte in Static and Constants
Area
Address of Communications Area
Parameter List for Error Message Editor
Table of Switches
Built-In Function Flag
N List Current-Entry Pointer
New Line Flag
complex Pseudo-Variable Flag
Number of Last Triad Generated
communication Flag
Core Address of Operand
Address of Library Parameter List
String Length of Operand
Register Address of Operand
Operand Type Flag
Operand Token
Token Table Pointer
Total Number of Error Messages Produced

275

$TAILS
$VLPAK
FREPTR
NOERMSG
A List
B Table
C Table
N List
M Table
o Table
R Table
Z Table

Table of Pointers to End-of-Segment Control Word for
Expandable Tables
Doubleword-Aligned Work Area
Pointer to First Available Word in Compiler's
variable Data Area
Number of Error Messages (Communications Area)
Dictionary Attribute List
Block Information Table
Constant Table
Dictionary Name List
Symbolic Instruction Table
Operation Code Table
Register Table
Triad Table

Logic Diagram
Chart 54 shows the detailed logic diagram for the Triad Code Generator
routine.

276

TITLE:

TRIAD OPERAND PROCESSOR ($TOPR)

Program Definition
Purpose and Usage
The Triad Operand Processor routine processes the two operands of a
triad to determine the core address, core sign, register address,
register sign, and length of each. This information is placed in the
adjacent operand areas indicated by register pq.
Description
Both operands of the current triad are processed. The type
identification of an operand is used to determine where its addressing.
sign, and length information can be obtained. This information and
the operand token are stored in a data parameter table,. The left
operand is placed in the first entry of the table; the right operand
in the second.
(For a description of this table, see $PTO under
"Compiler Variables" in Appendix A.)
Errors Detected
None
Local Variables
TOFLG

If zero, the left operand is being processed;
otherwise, the right.

Program Interface
,
Entry Points
$TOPR. The address of the triad is in register P5,. The address of
the operand area in which to store the left operand is in register
pq.
Exit Conditions
Control returns to the caller immediately following the invoking call.
All G and P registers other than P5 may be destroyed.
Routines Called
$NLSIB
$ NCONS

Library Search
Constant Processor

Global Variables
$CBKNO
A List
C Table
Z Table

Current Block Number
Dictionary Attribute List
Constant Table
Triad Table

The follow fields of the data parameter table are set.
$PADD
$PLNG
$PREG
$PSGN
$PTKN
Logic Diagram:

Core Address of Operand
String Length of Operand
Register Address of Operand
Operand Type Flag
Operand Token
See Chart 55.

211

TITLE:

ADCON REGISTER ASSIGNMENT ($VASGA)

Program Definition
Purpose and Usage
The Adcon Register Assignment routine searches the adcon register
portion of the register table (R table) and selects a register for
assignment.
Description
The adcon register portion of the register table contains an entry
for each adcon register used in the object program. Some of the
registers are permanently assigned and cannot be selected by $VASGA.
A volatile register may be specifically inhibited or have a symbolic
assignment, in which case i t will not be selected. A simple reference
count is associated with each register and effectively causes the
available registers to be assigned in rotation.
Errors Detected
None
Local Variables
R$ARRC

Reference count for adcon register assignment. This
count is increased by one and associated with the
selected register each time a register is assigned.
In choosing a register, the one with the lowest previous
count is selected.

Program Interface
Entry Points
$VASGA.

No formal parameters.

Exit Conditions
Control returns to the caller immediately following the invoking call.
Register G2 contains a pointer to the register table entry for the
selected register.
Routines Called
None
Global Variables
R$AD
R Table

Pointer to Adcon Register Portion of Register Table
Register Table

Logic Diagram
Chart 56 shows the detailed logic diagram for the Adcon Register
Assignment routine.

27-8

TITLE:

COMPUTATIONAL REGISTER ASSIGNMENT ($VASGC)

Program Definition
Purpose and Usage
The computational Register Assignment routine searches the computational
register portion of the register table (R table) and selects the best
register or pair of registers for assignment.
Description
The computational register portion of the register table is divided
into two parts, one for fixed-point registers and the other for
floating-point registers. The type of register to be obtained is
determined by a flag set by the calling routine. Registers are arranged
in pairs of even-odd numbered addresses. Either a Single or a double
register may be assigned; the option is indicated by a flag set by
the calling routine.
The register table entries consist of a principal assignment and a
list of synonyms.
 to obtain assembled
addresses of source program constants and variables and the Temporary
Storage Management routine ($VGTMP) to prepare compiler-generated
constant addresses. It also prepares literal operands and local label
references.
When all components of the machine instruction have been prepared,
the object code is generated directly in the user·s area of memory.
After the code is generated, control converges into two paths; one
path determines the register effects for register-to-register
instructions; the other, for instructions involving main storage
locations. After the appropriate action is taken to maintain the
register tables, control returns to the beginning of the cycle. The
next symbolic instruction is then procured, and the cycle iterates
until terminated by a result pseudo-operation.
Addressing
Storage addresses must be assembled as a base register and a
displacement value not exceeding Q095. Internally in the compiler,
the storage addresses of constants, variables, temporary storage, etc.,
are maintained in the form of a base code which represents the class
of storage (address, static, dynamic, etc.) and the displacement
relative to the base allocated to that data.
In the object code, certain registers are assigned permanent base
values to facilitate the addressing problem. Three registers address
the first three pages of object code; one register addresses the base
of the static and constants storage area; another, the address constant
area; and another, the dynamic storage area for the block currently
being executed. Four other address registers are volatile~
Since data may be allocated displacements which exceed that addressable
by the permanent base register for that storage class, supplementary
instructions may be needed to load one of the volatile address registers
with a base value sufficient to enable the desired data to be addressed.
This function is performed by the Storage Address Assembler routine
($VDSAC). In general, the Instruction Assembler presents the base
code and displacement representing the storage address of an operand
to $VDSAC, which returns an assembled halfword containing a base
register number and appropriate displacement that the Instruction
Assembler can then insert as required into the machine instruction
being generated. Any supplementary instructions necessary to set the
base register contents are generated by $VDSAC. The total number of
generated instructions depends upon the allocation and addressability
of the data involved.
In addition, certain classes of data present special addreSSing
problems. Parameters used by CALL/360-0S PL/I subroutines are passed
as addresses. Hence, references to parameter data require an extra
level of indirectness in the addressing.. A special flag associated
with the data indicates whether it is a parameter. If it is, $VDSAC
generates the coding necessary to accomplish the indirect addressing.

29Q

subscripted data require an extra index to achieve the correct
addressing. For RX format instructions, the extra index may be
specified directly in the Xl field of the instruction. For SS
instructions, $VDSAC generates coding to combine the base value and
index value into a single register, since these instructions can only
be singly indexed. However, SS instructions are generally generated
to manipulate string-type data, which is addressed indirectly through
a dope vector. Accordingly, when processing S5 instructions, the
Instruction Assembler tests the operand type. If i t is a constant
or already subscripted, normal direct addressing is used.
If it is
string-type data, the Instruction Assembler sets flags so $VDSAC will
generate the index-combining instructions used for subscripts.
pseudo-Operation Logic
Load Multiplier: If the operation is fixed-point, this pseudo-operation
assigns a double register pair for the register operand and loads the
storage operand into the odd-numbered register. If the second operand
is already in a register, an attempt is made to use one of the adjacent
registers, if possible, to form the register-pair.
Load Dividend: If the operation is fixed-point, this pseudo-operation
assigns a double register pair for the register operand, loads the
storage operand into the even register to establish the Sign, and
shifts the even register into the odd register to establish the proper
magnitude.
If the second operand is already in a register, an attempt
is made to use one of the adjacent registers to form the register-pair.
Load complex: TWo registers (either fixed or floating, depending on
type) are assigned and loaded from the real and imaginary parts of
the storage operand, respectively. If the storage operand is already
in registers, the load instruction is suppressed.
Store complex: The two registers assigned to the register operand are
stored into the real and imaginary parts of the storage operand,
respectively.
Transfer: To save space in the symbolic instruction table, common
instructions are shared between instruction sequences. The transfer
pseudo-operation directs the Instruction Assembler to continue its
processing at the symbolic instruction pointed to by the operand of
the transfer.
Save: The register operand is saved in temporary storage, and the data
parameter table entry given as the second operand is modified to contain
the temporary storage address for the remainder of the current
instruction sequence.
Define Label: The current object code location counter is entered in
the local label table against the symbolic number of the label. If
a reference was previously made to this label, the assembled value
of the label is placed in the storage operand of the referencing
instruction.
Load Multiple: A pair of registers is assigned to the register operand,
and the storage operand is loaded into them with an LM instruction.
Store Multiple: The pair of registers assigned to the register operand
is stored into the storage operand with an STM instruction,.
compute Subscript Address: The pseudo-operation is given a subscript
displacement, which IIlay be either in a register or in storage and may
be either positive or negative. A subscript displacement is the
computed displacement of an array element from the virtual origin of
an array.
(See -Dope Vectors· in Appendix E for a description of the
295

computation of an array element address.} It is also given an array
virtual origin. which may be either in a register or in storage. The
pseudo-operation selects the optimum instruction sequence to load the
subscript displacement positively into a fixed register other than
general register zero (which cannot be used to index) and add the
contents of the array virtual origin to it.
In the usual case. the
subscript displacement is positively in a register (which is sometimes
register zero) and the array address is in storage. The instructions
then generated are either:
A

r.array

LR

r.O
r.array

or
A

In processing the result of this operation, special flags are set back
into the associated triad and register table entry to indicate that
the result is a subscript address. The flags cause future storage
references to the subscripted data to be double-indexed in order to
achieve the desired subscripting.
Assign Double Register: This pseudo-operation causes a double register
pair to be assigned to the symbolic computational register specified
in the first operand.
BEGIN or END Block: The table entry for the adcon register which is
assigned to address the block's dynamic storage area is updated to
indicate that the register now addresses the base of the particular
block being processed.
Begin DO: The level of temporary storage assignment is increased by
one. Code is generated to store all registers containing active
intermediate results into temporary storage at the new level.
End DO: The level of temporary storage assignment is reduced by one.
Save Volatile Registers: This pseudo-operation is used prior to the
generation of calls to object-program library routines. It causes
the generation of code to store fixed registers 0 and 1 and floating
registers 0 and 2 (registers which are volatile across library calls)
into temporary storage if they contain active intermediate results.
Forward compiler-Generated Branch: Nested procedures, THEN clauses,
DO-loops, etc., require the compiler to generate a forward branch.
Since the address of the branch point cannot be computed in advance,
this pseudo-operation reserves eight bytes of srequire the compiler
torage for the branch instruction to be inserted later. The branch
point may not be addressable by any of the three registers permanently
assigned to cover the object code.
In this case, the branch must be
resolved by loading an adcon from a table in the adcon area and then
branching. Hence, two instructions may be needed when the branch is
resolved, and an adcon register will be required. Accordingly, when
reserving the space, an adcon register is assigned and its number is
stored in the reserved area along with the condition code to be used
in the final branch. The reserved area thus has the format:

DC
Be

AL4(O}
condition, 0 (O,adconreg)

When multiple branches are made to the same pOint, a chain of pOinters
is linked through the first word of each reserved area. When the
definition of the branch point occurs, all references to i t can be
resolved by following the chain.

296

Resolve compiler-Generated Branch: This pseudo-operation assembles
the address of the current code location counter. This operation may
involve generating a load instruction if the code location is not
addressable by any of the three permanently assigned cover registers.
The assembled address (and load instruction, if needed) is then placed
in all the forward compiler-generated branches which refer to the
current location. The references are found by following a chain of
pointers established in the reserved areas (see -Forward compilerGenerated Branch- above). The layout of the reserved areas after
resolution (if no additional cover is needed) is as follows:
BC
BC

condition,branch-point-displ(O,codecover)
condition,branch-point-displ(O,codecover)

or. if the branch point is not directly addressable.
L
BC

adconreg.code-cover-tableCO.adconcover)
condition,branch-point-displ(O,adconreg)

Remainder: This pseudo-operation is given two symbolic registers as
its operands. The even-numbered register adjacent to the one which
is currently assigned to the second operand is assigned to the first
operand. This operation enables the register containing the remainder
of a previous fixed-point division to be recovered.
Load Index Register: A flag is set to prevent the Computational Register
Assignment routine C$VASGC) from assigning absolute register zero~
the operation code is set for a fixed-point load. and processing
continues as for a machine operation. This insures that the storage
operand will be loaded into a register capable of indexing.•
Source Label PseudO-Operations: The Instruction Assembler has the
responsibility for the final resolution of references to source program
labels. These references are of three kinds: assignment statements.
branches (GO TO statements). and linkages to remote FORMAT statements.
Further, in the first two cases, the references may be either to a
label within the current block (intrablock branch) or to one in an
encompassing block (interblock branch). Remote FORMAT statements must
be within the current block.
For assignments and interblock branches, information about the label
is conveyed to the object-program library routines by a special twoword constant which has the following format:

o

2

4

6

8

r---------------------------------------------------------,
I
Displacement of Branch Point
I Displacement I

Byte

I
Wi thin Code Area
I Block Adcon I
I
I Area Wi thin I
l
__________
JI
Area
I - - -___________________________________________
I Adcon
~

The Instruction Assembler builds such constants as required and causes
them to be added to the object program by calling the Constant Processor
($NCON). The processing performed by the source label pseudo-operations
must take into account the fact that the location allocated for this
constant may not be directly addressable by the register which covers
the object-program constant area, and that an extra load instruction
may be required whenever a reference is made to the constant. An
additional consideration arises in the following case:

297

A: PROC;
DCL M LABEL;

B:

PROC;

C:

GO TO M;

M:
END B;
END A;

At statement C above, i t is impossible for the compiler to know whether
the identifier M to be used in resolving the GO TO statement is the
statement-label variable declared in block A or the label of some
statement internal to block B. To insure correct resolution, the
Instruction Assembler must determine whether the operand of a GO TO
is potentially a statement-label variable in another block. If so,
the Instruction Assembler must generate the code necessary to address
it, since the allocated address may not be directly coverable. In
the final resolution, the addressing instructions may not be needed
if the identifier is a label within the current block. However, this
case is not determinable in advance.
The processing performed for the various conditions may be summarized
as follows:
Backward Assignment: The statement-label constant is formed,
allocated, and addressed. A doubleword load and store is then
generated:

LD
STD

reg, constant
reg, label-variable

Backward Intrablock Branch: To a statement-label variable: The
location allocated to the statement-label constant is addressed
and assembled. A conditional branch using the complement of the
desired condition is generated to branch around coding which is
then generated to call the GO TO Interpreter (IHESAF), using the
address of the statement-label constant as a parameter.
To a statement-label constant: The address allocated to the label
is obtained and assembled; a conditional branch instruction is
generated using the assembled address.
Backward Interblock Branch: The statement-label constant is formed
and allocated. Processing then proceeds as for a backward
intrablock branch to a statement-label variable.
Forward Assignment: If the rightmost operand is a potential
statement-label variable, its address is assembled, and any
necessary cover instructions are generated. The address of the
leftmost operand is assembled, and any necessary cover instructions
for i t are generated. A twelve-byte area is then reserved in the
object code. A floating-point register is assigned, and operation
codes for LD and STD are generated for it. A flag of zero is set
as the first byte of the area (to distinguish assignment from GO
TO>, and a chained pointer is established in the remainder of the
first word to link together all references to a given label. The
completed area has the format:

298

(addressing instructions for right-operand]
[addressing instructions for left-operand]
DC
ALi (block number)
DC
AL3 (pointer list)
LD
reg, right-operand or LD reg,O
STD
reg, left-operand
Resolve Forward Assignment: At the end of a block, those
assignments for which definitions are available are completed.
For the case where a tentative definition of the right operand
was the correct one, the resolved instructions are:

NOP
LD
STD

o
reg, right-operand
reg, left-operand

For the case where no tentative definition was made, or where the
tentative definition was overridden by a later declaration, the
necessary ,statement-label constant is constructed, allocated, and
addressed. Depending on whether or not the constant can be directly
addressed, the resolved area has the format:

NOP

o

LD

reg. label-constant
reg. left-operand

STD
or
L

LD
STD

13,cover-constant (0, adconarea)
reg, label-constant
reg, left-operand

Register 13 is inhibited from assignment during the construction
of other storage addresses in the sequence so that i t can be used,
if needed, to obtain cover for the constant when the sequence is
resolved.
Forward Branch: If the operand is a potential statement-label
variable, its address is assembled, and any necessary cover
instructions are generated. Next, a conditional branch using the
complement of the desired condition code is generated to branch
around a 14-byte area which is then reserved. Into the reserved
area are placed the tentatively assembled operand address, if any,
a flag byte of 1 (to distinguish GO TO from assignment), the current
block number, and a linked pointer (to chain together all references
to a given label). The area has the format:
[addressing instructions for operand, if needed]
[conditional branch to *+14, if needed]
DC
ALl (1)
DC
AL3(pointer link)
DC
ALl (current block number)
DC
ALl (reserve block number if potential statement-label
variable)
DC
AL2(assembled operand address)
DS
6C
Resolve Forward Intrablock Branch: At the end of a block, forward
branches to those labels which have been defined are resolved.
An intrablock branch is indicated when the block number that was
stored in the reserved area matches that of the block being
terminated. Depending upon whether or not the branch point is
directly addressable, the resolved area has the format:

299

BC
HOP
NOP

NOPR

15,branch-point-displ(O.codecover)

o

o
o

or
L
BC
NaP

NOPR

13,code-cover-adc~displ(O,adconarea)

15,brancb-point-displ(O,13)

o
o

Resolve Forward Interblock Branch: An interblock branch is
indicated when the block number that was stored in the reserved
area does not match the number of the block being terminated.
In this case, the GO TO Interpreter must be called_ If the operand
was an actual or potential statement-label variable, its assembled
address is already positioned in the reserved area_ If it was
not, a statement-label constant is constructed and allocated, and
its address is assembled. Depending upon whether or not the
constant is directly addressable, the resolved area has the format:
HOP

o

L
L.
BALR

13,label-constant-displ(O,constant-area)
15,=A(go-to-interpreter)
14,15

L

13,constant-cover-displ(O,adconarea)
13,label-constant-displ(O,13)
15,=A(go-to-interpreter)
14,15

or
L
L
BALR

Backward Format List Linkage: To a statement-label constant:
Processing is the same as for a backward intrablock branch, except
that the operation generated is a BAL instruction, using register
14 as the return address register.
To a statement-label variable:
LR
A
BALR

15,6
15,label variable
14,15

The following coding is generated:
Place code base in R15
Compute branch address
Link to remote format

Forward Format List Linkage: An area is reserved as for a forward
branch, with a special flag byte of 2 to indicate a format list
reference. Since format list linkages are always unconditional,
no conditional branch coding is generated for either forward or
backward references.
Resolve Forward Format List Linkage: The resolution is the same
as that for an intra block branch, except that the branch instruction
is a BAL using register 14 as the return address register.
Result pseudO-Operations: Result pseudo-operations terminate the
sequence of symbolic instructions and cause relevant information
to be posted in the register table and in the triad for which code
was generated. They are principally used to indicate the
disposition and type of intermediate arithmetic computations.
The various result types are:

300

Real: A pointer to the current triad is placed in the register
table entry for the register assigned to symbolic computational
register zero, and the address of this register is placed in
the register-address field of the triad. The complex result
bit in the register table entry is reset. The long/short,
fixed/float result bits are left as set by the effects of the
various individual generated instructions. The storage-sign
bit is transferred to the register-sign bit position in the
triad, and the last-use count field of the triad is transferred
to the register table, to be used in determining when the
register will next be free for reassignment.
Real, Short: The effect is the same as real, except that the
short precision result bit is set in the register result field.
Real, Long: The effect is the same as real, except that the
long precision result bit is set in the register result field.
Complex: The effect is the same as real, except that the complex
result bit is set in the register result field.
Complex, Short: The effect is the same as complex, except that
the short precision result bit is set in the register result
field~

Complex, Long: The effect is the same as complex, except that
the long precision result bit is set in the register result
field.
Mask Type: The effect is the same as real, except that the
result bits in the register result field for long/short,
fixed/float, and real/complex are set from the corresponding
positions in the triad type mask.
Real Part: Symbolic computational register zero represents
a double register pair containing complex results, of which
only the real half is to be retained. The odd-numbered register
is freed, both registers are marked as single usage, and synonyms
are removed from the even-numbered register. The remainder
of the effect is then as described above for real.
Imaginary Part: Symbolic computational register zero represents
a double register pair containing complex results, of which
only the imaginary half is to be retained. The even-numbered
register is freed and its synonyms are removed. Both registers
are marked as single usage, and the odd-numbered register is
used as the result register for the remainder of the processing,
which is the same as that described above for real..
.
Null: Non-arithmetic instruction sequences generally terminate
with a null result, which stops the generation of instructions
without changing either the triad or the register table.
Errors Detected
None
Local Variables
W$CVN
W$GVN
W$PVN
VNEFF
VNINST

C register save area
G register save area
P register save area
Register effect code multiplied by q (halfword)
symbolic operation code from symbolic instruction (1 byte)

301

VNMOD
VNOPC
VNOPSV
VNOPl
VNOP1C
VNOP1G
VNOP1K
VNOP1L
VNOP1R
VNOP1S
VNOP2
VNOP2C
VNOP2G
VNOP2K
VNOP2L
VNOP2R
VNOP2S
VNOP3
VNOP4
VNSAVE
VNSINS
VNSSTG
VNTOPl
VNTOP2
VNTOP3
VNTOP4
VWORK
$VLBLT
$VLS
$VSART
$VSCRT

Modifier for operation mode (halfword); 0 = long float,
X· 0010' = short float, X I OOFO" = fixed
Machine operation code of pseudo-operation number
Cfullword, value in third byte)
Save area for operand information, used during
construction of SS instructions (4 words)
Code for symbolic operand 1 (byte)
Storage address for operand 1 (word)
Register table displacement for operand 1 (byte)
Encoded syntactic token for operand 1 (word)
Length of operand 1 (halfword)
Pointer to register assigned to operand 1 (word)
Parameter and sign bits for operand 1 (byte)
Code for symbolic operand 2 (byte)
Storage address for operand 2 (word)
Register table displacement for operand 2 (byte)
Encoded syntactic token for operand 2 (word)
Length of operand 2 (halfword)
Pointer to register assigned to operand 2 (word)
Parameter and sign bits for operand 2 (byte)
Symbolic operand 3 (index register) (byte)
Symbolic operand 4 (base register) (byte)
Save area for register Cl on internal subroutine
linkages (word)
Address of next symbolic instruction to be processed
(word)
Temporary storage address allocated for scratch usage
(word)
Symbolic code for operand 1 type :

•• X

'-',.:I-

'"

'

't'E~

,
· .........
..
.',,,,,.""

.. SET SIGN Of ..
• RIGHT OPERAND*

.. TO ITS REG

•

*'••• ***SIGN
•••••• * ••..

.

l,d.G8 . . .

..

"lfFT OPEk/lNO

·n-~

IN A k~GISfEF!

**..

·

..

•• *.*"" •• lI<***"••,

.. ~I::T SIGN (of-..
(
. . . . . . . . . . . . . . . . X*LEfT tlPI::;RAND " ••• '
,.,

..

If)

I

T~

..

:~~~!H~~*~!~~:

• NO

. .
·

*F LAb St. T SG*Nu

"" uPt:kANDS MAY
I}f
.. JNTt:R.(.HANbI:O

•

7

"

·

..

..

•

"" •••

/0 • • • •

YES

y

.

****** ••••• ****

.. lNT-EkLHANl>r '
:

uPt:kANDS

:

.*** •• *••• ****~

:x ................ :

.:116!.(:.,

t

XII

4'*. ,..."'.*"'''' ... ' '_ ..

Chart 52.

304

Iv'"

nZ25

•* .
:e,,:x . .
..

Optimize Operands

,

f-~

II

.. ................ •..

•..

$SCDV

•••••••••••••••

..

v
................
..
..

..

bl:T INH

•

• TA"Lt ~Nr~Y ..
_fOH. oPe Vlt. T ..
•
IN!1
•

•••••••••••••••

·

¥
................

.

.. MVE LNGTH & ..

*A1l0k

ufo

',",NST.

.. F"QM UJNS T

•

•
{'''NT!
..
•••••••••••••••

it

...
..•••••••••••••••
r"
I"'IT ..

.. Tt:l

TAblf
...................
.
t::~"tlV

Ii

.

..

.

. . . . . . . . . . . . . .111.

.. GI:f 8 dYHS ..
.. Lf .;)fATf(~
•
.. SoTLHA\.Jt: fuk •

..

{J~PL-

VECTOH. ..

....... ~ .. #* •• *.* ••

Ii
................

•

• PL(.E ADOk OF •
..
• OPt. VE{.TGJt IN.

TABLo
..• INITENTRY

..

...............•

it

••••••••••••••• ..
EXIT
...
..•• •••••••••••••••

Chart 53.

String Constant Dope Vector Initializer

30S

1'10/1 S\!sTEMS MANUAL

ffellOE

............... ••
••
• ............... •

•

•

o

•

TC46
*YES . . . .

o

•

..

o

v
TCA96
•
.YES ••••
•
•
DPEUf§; •1 •'" .~• Al.• • NULL'
••
• ••

•••••••••••••••

*CSVC6·

• WORK ARlit TOO •

C~"t~UEO?

....

.---------.

•
•.
..............

................... X:SEE ~b\~DWING:

v
......•........
· "
•

..

•

V

...............
ENTRY

••

TRIAD
.Vi S
O~E~~l?R 1'" OR

..

•

END TRIAD
.n-BlE HI l ' •

•

•

·.................
v

·

v

•••••••••••••••

.. RESET TRIAD ..
.. T&t.. PTRS TO •
1ST ENTRY •
•

•

eXIT TO

.

vo
•

"

•

•

.X C1 •
• 19*

•

·....

•

• oPEm~R.
MULT C801 1

A1 •
4·

•

>0<.

•

oX:~g~~NE5u~~~~D:
•

BY 1

TRIAD
OPERATOR·
END- CALL
1l21?
_ NO

•

-

"

V
* ••••••••••••••

•

·•

AO
T"fOR
OPERA

"

·

•

....•
....

TCOO

·YES

"

"

15·

•

•

•

•

•NO

•

•

•

TRIAD
OPERATOR
DEFINE

:

eR'~~oON

: • .o~:

•

OPERATOR

•

..

•

• .YES

TC800

..

""
-NO

-

0

TCl>6

••••

• Drvl~t
OPeT~~a~,.,
1861 ? •• • :•
•

•NO

o
•

•

•
U."

••••

••

••

=

Tcoa
•

..

.. ...
.-

•

0

..
• .o ••••••• .oX".
00.
o 0

Chart 54. "l"riad Code Generator (paqe 1 of 31)

••••

TCB76

oPE~~JAR.

.YES ••••

..:

• :RANCH 1100):.

o

.YES . . . .

suumT •• ox:.1%*
81
• NO

• • 22.

••
• NO

0

D6·.

:.ll*

••••
••••

•
•• .o •••• .o.o. x:•A~
••

o

TRIAD 0 ' "

••

D1 " •

• 22-

.VES ••••
....
.X • • •

ADOkESS 196)1

•

....

.x0

o

Te3l

PARM Tal

•

" "

.X C1 •
• 22·

TC&O
.YES •• ,..

NO

INTO INSTR

306

· ....

=

-

.)( 81 •

* *

•

•

v
...............
•
• •••
·................ ...co:

• 19·

" NO

•
"

....

.YES ••••

SU8SCRIPT
1881 ?

• NO

"

•

•NO

Te72

•

TRIAD
OPERATOR z:
ARMW

"

.X Al ..
• 21·

• .X• 81 ••

•
?

TRIAD
OPERATOR

"

PRot OPNDS Of
TRO TO Ple
AOORSNG INFO
(CONT)

•

Tt08

TCASO

.SEE FOlLOWING.
•
NOTE
..

v

"

"NO

ADD t84-)

•

•
•
...............

· .....

.VES ••••

.ves ••••

•

•

.------------.
·STOPR

• .X••••
• A1 ••
•
• 5·
••••

·YES

•

•• ~ Il.·
••••

Te20

TCAOO

.*..•••••••••••••••.

•

"
NO

o

•

•••• •

* .X

;;0

.8EG'~IC~LL

V

TC02

•••

~:5R(lgr?

•

• NO

.•..............
....
:A4·.

TC70
.YES ••••

T~IAD

Tt76

"

* .! ~~ ••
... *

"

"

·YES

TRI40
OPERATOR

•

• ••••11:11:••••• •

•••••••••••••••••

"NO

•

:**••

ONO

· ••••.

• OPEmag.

:~~O NI~~ ~:I:o:

Teu

"o

TCU
.YES . . . .

•

•
ONO

...

'N1l

• ADD END Of

0

.X

.YES

••
• •
NO

•

"1 •
• :.i¥·

UClIIlE

nsfEllS

""1

z

IlMUAL

trCOR

•
Ta..
• • • • •'1 5 :""'
•••
•. .00
• ·iht~- ex •
• • o. I . , • • •
..
•• ••
• NO

... ·

n·

·

....
• • U••

y

•• •

0

-: ·DtRl-

• •n

0

\0
0

ONO

o

· ..• •
• .X

• V • .yeS . .TCBOa
..
TRIAB
• • DPEYfiD
• .~ ~!••
F
ftD
• • INII tit21 A%
••••
•• ••
o ND

••

o

0

0

•

· i HO ,
•

•

•

•

• • •

• X AI •
• OPEUm.
• STORi ADDRESS •
• 240
Cl201 ?

•

0

0

• ••••

0

n

••
o

o

OPEma~

0

•

• ALIGN 1l21t) 7 •

•

•

•

••••
0

*x

•

11 •

• 26••••

V•

•

•

0

••

0

0

0

DPEUMB.
pnmu~

0

••

•
00

• v• •

o

TCG50
.YES ••••
Cl·.

..:
• TlTLrT1t"R.
r;21 ?
...• n.

••

·

DPe

• • •NO

..

....

TC06

TRIAD OP •
OTHER

'fO.

24.44

• •

""!JF

0

DP~maB =
0

0

•

eYES ••••
0

• •

45 •
• 29• *x••••

·NO

• ·NO
•

•• •

••••
*x• Cl ••

TC010

• 26••••

o NO

o

TRI AD

• *YIS : TCB04
••••

o (136)?•

•

0
·NO

11.-

• 0LraiU'D~.LL • 0: u.o
•

•

0

y
••

0

0

•• ?196f AJE.. :'U·
•
•

TCA99

TCB60
eYES

• 0'1RAijADR. OR •••
•• A5 •

TCA98

0

DO E VECTOR
MULT C164) ?

•

• • • • .YES . .TC,HOD
..

0

~

••

r.. ...

·NO

0

o ND

0

0

0

0

•

(...

TCC.O
eYES ••••

• •• REoPEmaK.
*:• :~ •
• •TUIIN 1l601? • ••••

y

•

•

0

0

....

.~

0

0

oNO

0

•

•

• *:••••~~••

••, fl.·
,'..,
:""'.

• • ••
.110

TC150

TCB12

IS

0

zeo

eYES ••••

•
• • YIS : ••••
•OPERA1'OR
TRIAD
END BLOCK
• o ClUI?0 0

0

TCOl

*'1S

lcon
• •
~n· ""IS ....
-: fr§
-ht:·
:..

TC152

•••
.X Cl •

•

•• ••
·110

·..

••••

.NO

o •

• NO

o

:.1:·

. ....
••

0

TCB20
0

• eYES

BEGIN DO
• US6) 7 • •

0

eYES

0

•
•
• • DPEUMB.
o

:c...

0

TRIAD
D.ERATIIII •

• NO

0

E..

• OND
•
o

••
0
.X DL.

• END DO 1152/7 0

TC835
eVES ••••

TelTO
0 eYES ••••

·
•

•
o

. .::"

• •

ONO

0

*I i1.·

•o

"... • •O . T •
0 :- •
L

0
°ND

•

•

0

• •TRIAD• • .YESo . .TCBH
..
•
OPERATOR·
RESOLVE
*x .6 •
• m:ttO • • :.I!*
o
•

0

o OPERA
TR~
•
•

0

o

l.r."' 0 ·

•

••

TC.56

eYEI· •••
...
0

0

LNit
o

0

0

0

•

TC'"

oYES

o

•••• o • ~IAD
fOIl :'O:X

•

0
·NO

•

0

....

•

••

•

• •TA AD• • .ySS

2"f~A'OR

TCOOO
: ••••
.X 8l •

~NiG I i9:~~~~· :.::•• •NO
••••
•
a

.......... X: CO:
•••

TCIl5
0 eYES ••••

autuM· E '.: iJ".
9'•
............
...
x:

• !Y"TY\oI

•

• NO

o

0

:..".

••

10:

•••

Ch.... 54. Triad Code Generator (paqe 2 of 311

307

Pll J SYSTEMS MANUAl.
STeODE

NUll OPERATOR

................
*....................
1CA96

•••

.5 QP14Z-o

•

• .. .-------------*
.Al .... x*DTRMN EFFCTV •

•

..

•

SGN OF OPND •

*NO

* * ............ ..

LEfT OPERAND
NULL 1

•

*YES

·................
v

•
•

MOVE RIGHT
•
OPERAND TO
•
• lEFT OPERAND.

••••••
*••••••••*
•

.

TCA965

TeA91

QPERAND
HALFWORD
ADDRESS?

•

V

*,10
•

.

*YES
•
................ X

OPERAND TYPE
COMPLEX 1

•

YES

.

•

NO

•

••••••••••••• *•

NO

V

Te12

•
SET
•••
.. I NSTRUCT ION ..... )( B7 •
• SEQUENCE TO"
• 19.
•
MSNUlt
•
• •••

•••• *••••••••••

..

·YES
•

OPERAND SIGN
NEGATIVE?
•

•

•

·

...............
...............

. ....

Tel2

SET
...
.
INSTRUCTION •••• X 81 •
• 1'9.
SEQUENCE TO.
M)NULR
•
• •••

.......•....•...

Chart 54. Tr1ad Code Generator (Page 3 of 31.

Tel2

•
•
••••
•
SET
•••
. . . . . . . . . . . . . . . . X. INSTRUCTION •••• x 81 •
• SEQUENCE TO.
• 19*
•
MSNUlH
•
... ••

NO

~
••• *** ••••••
*••

•
•
•
•

308

.

·................ ....

Te12

SET
...
.
INSTRUCTION •••• X 81 •
SEQUENCE TO.
• 19.
MSNUlH
•
• •••

...............
1ft

................

•

Te12

.YES."
• •
SET
....
.............. X
OPERAND SIGN
••••••••••••••• x. INSTRUCTION •••• x B1 •
•
NEGATIVE 1
.. SEQUENCE TO"
.. lq*
•
•
MSNULeN
..
• •••

. ....

.•••• *••••••••••
..
•

.

: X............................. :
•

'L/I SYSTEMS MANUAL
STtOOE

8EGIN CAll
OPERATOR

.......... .
*A1 ..

•
•
·................
.
.. ..............

·~O

..

.. ENTRY NAME AN ..

. ..
·............--....
·................
tNLI HE
SUILT-IN
• FUNCTION 1 •

................ x*-seT 8UItT-IN ..
..

FLAG OFF

..

.. YES

v

..

-SET BU-JL T-Jr~ ..

..

FLAG ON

..

...

...............
...............

fe17

DOES ENTR V

POINT HAVE

• YES
..

.. SET RET VAL
..
-AOtON

..
..

• •••••••••••••• X. POSITItl."'l TO ..
ITS OWN ARG
..
*ZO+(NO P-ARMS ..
.. LIST?
..
..
*41
..

.

•

• NO

·................

...............
...............

v

.. INITlAlllE
..
..
INSTR
..
• PARAMETER fSl*"

..

...............
•

ADDRESS

..

• YES

•

................. .....
...............
..

V

•

,..

•

•

• ••

•

-

•

*

...............
...............
V

•

SET RET

VAL •

:ADE8~ ~~~MTO

NO

*'

Page 4 of 31)

VAlUE ",DeON •

................ ...•
V

lers

-4"..

*' •

Te125

...............:...• :

: ................ :-C5: ... X:S~t

• ADD+INO PARMS.
.4).

Chart 54 .. Triad Code Generator

.

1'( 18

..

..
..
..
..... x -cr;.
..
..
..
•
• ••

.FORM ADDRESS •
•
OF RETURN
•

• ARGUMENTS 1 N •••• X 138 •
..
PARAMETER
•
• 19*

T.. 8lE

SET UP

v
·.................
.
................
·
.

TC12S

.. SAVE NO OF

..

.. AOOR SNG Of
fNTRY POINT A
................. X.
PAR'" -AREA
PARAMETER 1 ..
.. THR-U ENTRY
....
.. POI NT AotON
..

f5M~U;~l

.TRIAD NO •

•••

-PARMS.1

NO*

*'

•

88· •
19.

* •••

309

PL II

SYSTEMS MANUAL

srCODE

TelOO

_A1 '"

'"

'"

'"

•

...•••••••••••••••.

.. ................
*----------*
'"
''"" NOTE

'"

"'YES

'"

* •

:X ••••••••.•••••••

....
• •
....

...............
...................

• FuNCTION ? III

••

V

TCAOO"

•

• • $------------.
••

GENERATE CODE

.SVINSA

..

••••••••••• Cl ••• X.SEE fOLLOWING.

TO INlT:AlIZE

• X .1.0 '"
'"
III 6.

BUll T-IN

TCA02

•••••••••••••••••••
:00:'.
x:~e~ ... ft~g:f~l :
•
•
•
LIST
•
•••••••••••••••••••

*

•••
SET
*CO* •• X. INSTRUCTION *
.SEQ TO MSARGN.

1CA06

,.

ENTRY POINT
A.N INlINE

TCAOOH

-svINSA

*sO* •• X*SEE FOLl.DYING.

END CALL

OPERATOR

.....•••.. . .
•

....•••••••••••••••.

•••••••••••••••'"

. . *.'"

STRING DOPE
VECTO'l

••

•

~OTE

•

.•

IS TITlf

•

"

• NO

'"

R.ETURN TYPE

STRING?

...............
·................
'"

...............

.... .'" . .
..
. ...

...............
•
•
·...............

.RETURN VA.lUE ..

. ..........
T(A005

*

.NO
'" FUNCTION HAVE '"
A RETURN

VALUE ?

•

*x

...............
·...............
it

TCAOOC

·SVGTMP

(3.

• *C3·)(

.GET TEMP FOR.
•
RET VAL
•

•

•

•

.·...............

...............

.

••• *•••••••••••

·..........••.... ....
...............

*

•

*-------------*'"
"'SEE FOLLOwiNG'"
'"
NOTE
•
*
•

•
SET
•
• INSTRUCTION·
.SEQ TO MSCALX.

...............
................... ....
V

TCAOlt

ADD DOPE
VECTOR

TO CONSTANT
TABLE

.YES

.•

INITIAL VALUE

.

ENTRY POINT A

•

PAR.A'4ETER 1

•

• ........ .
•

.·...............
------------. .. .
. ...
it

ASSIGN TEMP ..... X 80.
FOR 0 V

•

...
. .. ..
TCAOO~

..

•

•

•

ENTRY POINT
FO~ MIN OR
MAX

•

·NO
•

.•
?

•X

co.

n*

¥ES

·................ ...
·................ ...
V

•

•

SET

1CAOO"

....

INSTRUCTION •••• X Cl •

• SEQ TO "SMAX.

Chart 54. Trl.ad Code Generator (Page 5 of 31)

•

•

TC017:

.SvINSA

•

••••

•

•

•

.. .. .-------------* •
• C7 ••• x. GEN LINK 10 •••• x
•

• NO

310

NU

V

TCAOI

·SNeON

...........•...

.

.•..............•
.·..............

v
...............
...............

*'

1CA05 •

•

T LAO It

..
SET
••
•
ENTRY POINT A
••••••••••••••• X. INSTRUCTION •••• X (7.
PARAMETER?
..
.SEQ TO MSCAlP.
•
•

•

•
•

.·............... ...
................ ...

.
...
.YES

• SET REGI STER •
• ADO FLO IN
•
-TR lAO TO NUll-

...............

Tfll

..
SET
...
..
• INSTRUCTION •••• x ~7 ..
•
SEQ TO
•
• 19.
•
"SClIST
•
• •••

v
·...............
.
.·..............

v

_FORM INITIAL.
• VAlUE FOR RETVALUE STRNG '"
•
DOPE VEer
•

••••

.

• 1f • • • • • • • • • • • • • • • • •

.:co •••••••••••••

·................

*

;

• SAVE ADO OF •
.RE T VALUE I~ •
• TPI AD VALUE.
•
ADD flO
..

'"

•••• X S1 •
.. 19.

·

V

TCAOOE

•••

•
seT
•
• INSTRUCTION.
.SEQ TO "SCALP.

:X •••••••••••••••• :

v
*s,VGTMP
*-------------*'"
"'GET T EtotP fOR •

INSTRUCTIO~

•

..
·YES
•••
FNltt1 POINT A. •
•
lI8RARV
.X DO •
ROUTINE 1
•
•
•

•

SeT

.SEQ TO ",SCtIS.

• NO

'" YES

RET VAL

TC 4005

..'

..

~------------.

TUl

4DORESS

GENERATE tODE
TO STORE
A:fTURN VALUE

.......................... x-TEMP REQ FOR '"

·

·SVGTMP

......... .

·................ ....
V

•

'" DET SIZE OF •

... YES

·

•

..

• NO

"'Ne

'"

.

SWITCH SfT ')

'iUBPROGR.AM

...............
·...............

TCAOOK

•

II<

C6

•

••
*.

30.

V

SET"
*

:s~~Sla~I!R~p:·········

•

.

o

PLfI SYSTEMS IIANUAL
$TeOOE

... ••

TCAOO

••••••••••••••••
••••
•
•
•
BRANCH ON •

•••

*80*X

*AO •• X* BUll.f-IN
•
••
• FUNCTt-DN 10 •
•••
.,
NO
.,

•

•••••••••••••••

••

••

1401 'I
-0

v

TCCOO

•

·. .

• VES

1~11

•

·

lD NO

•

••

• *x• Al ••

L

-SOUND (8) 1

•

•

·

•

...............

• •

•

•

7_

••••

·. .
'" ....

TtAl2

·yeS ••••

•

-e

10 NO •
•

COMPLEX

•

•

•

•• •••9.

•

•NO

o
• NO

*x

81 •
. . . 1.

•

tD NO :: CPUt.
YAR
(52)?

*.••••
•

pseuoo

·

10 Nll = ASS
('0 I ?

··

....

*x

"'.

•

01 '"
1-

*x

10 NO ::

·

C~. '"

·

•

.. .
••••

IMAl..

·

•

.
•

....

AOO INITllN(;
COfliSTANT TO
rO",CjT TASl-E

.. 12·

v
................
.·..............
• $V

INSA

..

.-------_. ---*

CHAR BUilT-IN
FUNCTION

.. GEN CODE TO •
*INIT IlP VHT *

...............
•
.-------------.
.·...............

T((60

• • 10.

• 'VGTM-P

.$NL 1)18

•

..

..

...............
•

NOTE

•

.SEE -FOLLOW]NG.
•
1\I0lf
•

*(6 ..... X.SEE FOLlow1 NG.
•

NO

....

•

•

GE:T TEMP FOR
RETURN DOPE

ADO STRING
MOVE ROUT INE
Tn qUNTIME
l I!' -REQ

VEe TOR

NO

]0 NO '"

SUBSTR.
SU8STR.
PSeUDO VAR

.yt-') ••••

112,761 7 •

TCA42

NO

~OTf

.X Al .,
•
• 1]·

v
...............
.-------------.
·................
·4VGTI4P

v
...............
...............

•

•
SET TRIAD
.. VALUE ADO
.Ft ELO TO ADO
.OF RET VAt Uf
•
OP VE:C

• GET TEMP FOR.
•
RET VAL
•

•
•

•

..
•

'NO

. .••••.
.. .••••....
...
•

.X C3 •

·
· . ·. .
· ·. ....

*x

••

C7 •

e_

· .••••.
· ...
. ........... 'Ox:
...
TeC70

.. YES ••••

·"E~

I D NO .. CEIL
(161 ?

....

• •
.... X 01 •

...............
. .-------------.
· ...... ·...
.

rcclto

TCA1S

~O

•NO

STR t",G TO
ARITH (92)

••••

.YE:S ••••
•
•
•
PSEUDO IIAIf
.X: 81 ..
(68»?
. . . . 10.

•

·

..

T(C5';

•

eYES ••••

•

••

NO

• to NO :; IMAG

• NO

ID "110 .. FLOOR
*x A4 •
tlZ.?
" ' . . S.

C1 •

• • 10.

1

TCA?O

....

•

Ttt30

....

RrAl

164)?

•

...............

••
.SNeON
...
.------_.
-----*•
.03 .... K*SEf FOU.OwING.

.... ...
•

.X Al •
• lZ*

* ••••••••••••••

10 NO =

TCAl6

• .0

*!

TttlO
.YES ••••

•

NO

• YE.)

.X Al ,.
" ' . 8-

10 ~~8i ~tG'"

NO

TO STRING
(88) ?

.YES ••••
.. ..
..
PSEUOf' VAIl
ox 01 ..
=:

(60)

· ......

• y~ ~ : ••••

.

10 NO :: ARITH.

. . . 10.

rCA 34

·

•

.......

·

• Y~s ••••
?

18~1

T('C50

•

.. [0 NO

•

MOD

TtC80

•

1561'

~,]

.

:.~:.

• .ves ••••
• 01 •...
NO : T101f • .X
1
• ••••
• Uo
• •

NO

10 NO :. REAL

•

•

10

•

•
•
.X A4 •
10 •

TtALa

(21t)

TO -:

TCAllt

NO

-

••••

•

• YES ••••

....

o

*c.z·x

·VES ••••

TC4-60

eYE S ••••

..• •
• .
••• ·

'Ctsz

·YES ••••
o •
•
I &.J NO .. 01 M
.1( C 1 '"
1161 1
•
1.

~o

s£rs~~5

•

•

•

·

•

.X C1 •

(lt81?

TCA52

10 NO .. H
.. BOUNO (121?

10

•••••••••••••••
•
•

:

•

eYES ••••

•

T~12

TCAlS

·.

NO

•

.

NO

• NO

NO

:a

9_

••••

•
•
SET
•••
[0 ~i ~ONJG •••••••••••••••• X. INSTRUCT[ON •••• 1 a7 •

TCA.8

•

•

ex A1 •

••

eYES

eYES ••••
•

•

•••

• *x• C6*•
•••

10 NO •
CHARACTER

TCA70

tD NO • TRUNC

••• •

. . -.

eYES ••••

10 NO "" DATE
{BOI ?

.X C1 •
• 11-

•

...

••
80.

. . . . . . . . . . . . 1(.

Chart 54. Tn.ad Code Generator (Page 6 of 31)

NO

v
·...............
. ...
...............
-fORM CONSTANT.

...............
...............
:;,

•

..

*'

•

• TO lNIT RET •••• X 03*
.VAl ST"R DOPE.
•
VECTOR
•
• ••

•..
•

*

TelZ

••••

SET
....
INSTR.UCTlOFlt
X 87 •

* •.• •

• SEQUENCE TO.
..
IUMCHAR
•

19.
• •••

C2:

311

PllI SYSTEMS MANUAL
STCODE

HBOUND
BUILT-IN
FUNCTION

lBOUNO
BUILT-IN
FUNCTION

·

TCA5Z

•••••• *••••• *.*
• FOrtH OfFSET.
• Al •• X*
OF lBOUND
*
•
•
• WITHIN DOPE •
•

•

VECTOR

.

TCA53

•
•
•••

* VECTOR
..
•• *** ••••••••••

................

·................
...............

TCA54
·YES

•

.

. . .

..

..

•

SET

••••••••••••••• X. INSTRUCTION ...... x 87 •
• SEQUENCE TO.
• 19.

•

MSBNDP

•

••

."'.

• •••

·................ ...
V

.

V

•
•
•

.* ••

Chart S4. Tn.ad Code Generator (Page 7 of

TC 12

SET
...
'"
INSTRUCTION •••• X 87 •
SEQUENtE TO'"
,.. 19.

•
"'SOl'"
•••••••••
**•••••

n)

•

• •••• *.* •••••••

·.*.•••.•.••..... ....

TC12

_

SET
,....
INSTRUCTION •••• X B1 •
• 19*
SEQUENCE to *
MSaNO
•

...............

•

v
*••••••••••••••

•• *••••••••••••

* ....

•• •• "'' ' MSABS
•••• '''* ••• •*

• •••

TCl2
••••

•
SET
•••
ARRAY A
.................. X'" INSTRUCTION •••• x 81 •
•
PARAMETER 7
•
• SEQUENCE TO.
• 19.
• •
•
MSOIMP
'"
••••

.. ADO AOOR Of •
-DOPE VEe ORGN •
• TO UP t LOW •
• SND OFFSET •

•
OF DOPE
•
• VECTOR OR IGIN.

Te12

••••

SET
••
'"
• .{. INSTRUCTION
X B1 •
• C;EQUENCE TO.
• 19.

...............

•

·
.
................

v

• ADD OFfSET OF.
• LBOUNO TO ADO.

~

'"

TCA62
"'YES

• NO

·................

312

.01

.LOWER SNDS IN.
• DOPE VECTOR '"

• NO

•
•
•
•

TCAlO

••••

••

TCI2

.* ••

•••

...............

.*•••••••••••••*

TCA60

: X ...................................... :

•

ARRAY A
PARAMETER 7

•

•••

•

FUNCTION

* • • FORM OFFSET.
.C 1 •• X.OF UPPER AND •

.. •
.. FORM OFFSET.
*B 1 ... X. Of HBOUNO •
'" ..
• WITHIN DOPE ..

...............

•••

ASS BUll T-IN

FUNCTION

....................

.

TCA48

•

DIM BUILT-IN

.* ••

'L/I SYSTEMS MANUAL
HtOOE

SIGN BUILT-IN
FUNCTION

TC.l.34

·.... .
•••

.'1.
•

•

•

-................

OPERAND TYPE

••

·•••••••••••••••. ....r:.·
·•••••••••••••••. .... •••

TCA36
-HO

FLOAT 1

•YES

•

TC12

TeAZO

••••

'"

SET

•••

X:s~tSf~u~IAg~F:···~

•*Cl *• •
•

•

•

·NO

ARGUMNT IN A •
FLDATING
•••••••••
•
REGISTER?
•

•

V

Tel2

SET

TCA24

•

•YES•

•
•
...............

TCl2:

SET

••

••

• INSTRUCTION •••• X 81 ••

.SEQ TO MSSGRN*

•

*

ONO

* 19.
••••

•

•

'NO

• ••••••••••••• X

ARGUMENT J N
tOilE?

••••

•

•

•••

• INSTRUCT ION •••• x 81 ..
.SEQ TO "'SMOD.
• 19.

·•••••••••••••••. .... .
...............
v

•

•

·................. ....
..

•

SIGN PLUS?

*'

•

• YES

*

••••••••

•YES

...............
•
• ••••
................... ....
V

TCl2

,.
SeT
•••
• INSTR.UCTION •••• X B1 •
"SEQ TO MSSGNR.
• 19.,

FLOOR

BUll T-11I1
FUNCTION

:X •••••••••••••••• :

·...'" . ·
TeA38

•

•••

.A4"
••

.

·•••••••••••••*. ....

TC12

.YE,)

lRGUI1ENT J'fPF
FL OAT 1

'"
.

SE:T

•••
••••••••••••••• x. INSTRUCTIO~ •••• x B7 ..
• SEQ TO MSFLR.
• 19.

SIGN PLUS 7

•

·................
·..................
V

rr A40

.~

••

n.A.405

•

• A6.X
...

••

V
........
* ....... .

Tel2

•

.................... ....
SE T

.....

... II'tSTPUCTIGN * ..• X 67 ..
"Sf 0 TC M$SIGN.
.. 19-

SE'
..
I~STRUCTI..l"4 •
"~F,;j TO ~SFlA.;(.

••

•YES

l,All

•
•

·... . ·

·.........................

'NO

·............... ....
•

.

·
.
................
..~

•
..
..
..

V

.... *.* .... ** .. $:

rtl'

SET
...
..
I~STRUCfI1i"4 ...... 1( 137 II<
SEa ro
*• •• ....
19*
MSS IG~N

·NO

AR",J~ENT"

fA.

.

r A['

")

"

'(F ...

·................... .... ·......· .. ..
...............

T!:.A41

TRJ AD

OPERATOR A

* ...............

. ....
....

DIVIDE

,

'" YE';

[Ell BuILT-IN
FUNtT 10"4

........................... .

V

rep

'"
SET
•••
x. INSTRUCTION •••• x B1 •
.SEQ TO MSTRUX.
• 19.

•c1

..

...

·YES
•

ARGUMENT TYPE
FLOAT?

••

V

•

*

Chart 54. Tn.ad ~~odl?' Generator

(Page 8 of 3:1)

.................. ....

TCA4~5

SET

•••
"1SCLFX*
*
•

...............
•
•

Trll

•
_...
. . . . . . . . . . . . . . . . . X. IN~TRUCTlU1I1 •••• x 87 ..
_SfQ TG ""~CflL*
• 19.
SET

NO

·................

• r .1.44

•
-

·

•

•••••••••• X. B7 •
• 19"

Ttll

.....-.........

rCA4L' . . .

INSTRUCTION •••• X .6 •

~f:J

f[1

•

• ...

313

PLII SYSTEMS MANUAL
STCOOE

COMPLEX
BUILT-IN
FUNCTION

TRUNt
BUll T-I N
FUNCTION

.

TCA.10

....

•*A1..
• *
'"

•••

•

'"

...............
•
•

._

.NO

•

ARGUMENT TYPE
FLOAT?

...............
•

TCI2

••••

SET
•••
••••••••••••• •• X. [NSTRUCTION ..... X 87 •
• SEQUENCE TO.
• 19.
•
MSTRUN
•
• •••

•

•
.
·..
o

•
•

YES

v

TC12

•• SET SECOND •0
ARGUMENT
•
•
REGISTER
..
.ADDRESS NUlL •

...............
'*

*••• •X

SEQUENCE TO '"
"'STRUX
•

•••

...............

·................*...
....
SET
•• INSTRUCTION

TCAl23

*

0

•

...............

TC.127

.NO
• SfT SIGN OF
SECOND.
'"
SECOND
•
•
'"
ARGUMENT IN
••••••••••••••• X. ARGUMENT TO •••• X C3 •
CORE?
*ITS REGISTER.
•
•
•
SIGN
•
• ••

• YfS

V

......•........
...............

TCAI2

•••
·C1 •
• • •
•••

87 •
19.
• •••

...............
V

TeAI23

•• •
•

'•*

DETER"I NE

• C3 ••• X.

•

•

EFFECTIVE

*

•
•

*SIGN OF FIRST.
•
ARGUMENT
•
•••••••••••••••

··...............
.
................
V

1CA125

o

•

SET RESULT.

•

•

SIGN

•

·...............'" ....

TC129
ONO
ARGUMENT
!IGNS EQUAL

•

o

• ••••••••••••••• X.•

...............

Z•

:

•
•

YES

·................ ....
V

*

...............
*•

•

314

Chart 31. 'friad Code Generator (Page 9 of 31)

TC12

SeT
•••
INSTRUCTION •••• X 87 •
SEQUENCE TO.
• 19.
MSCPX8
•
• •••

Te12

'*

•

SET
•
INSTRUCTION •••• X 87 '"
SEi¥~~~~ TO:

:.!%•

PL/I SYSTEMS MANUAL
STCODE

COMPLEX
PSEUDO
VARIABl f

10

I MAG PSEUDO

RUL BUILT-IN

................•

....•••••••••••••••. ....
.................... ....

VARIABLE

REAL PSEUDO
VARIABLE

FUNCTION

Tt'\14

TCC55

••••
.. ..
..

.....................
SET OPERAND ..
*81 ... X. OFFSET TO •
.. •
•
FOUR
•

Tt12

.. • •
SET
...
.
• Cl •• X. INSTRUCTION •••• x 87.
•
•
.SEQ TO MSREAL.
• 19.

...............
...............

TCC50

••••
•
•
.MOVE

v
...............
*
•
...............

*Nl

*

ARGUMENT TYPE

......... .

•

...•...........
...............

T((52

:... :.............: ....
...............

• •
• SET OPERAND.
.l4 •• X. OFFSET TO . . . . . . . . . . . . . . . . . X
•
•
•
lEllr.
•
•

• *.

•

*

.

Tt12

••••
SET
•••
•• C3 •• X. INSTRUCTION •••• x 87 ..
••
•
• SEQUENCE TO.
• 19.
••••
•
MSIMAG
•
• •••

v
..............
.
...............
•

MOVE

•

.SUBSCRIPT REG"
.. OF ARG TO •
.TR lAD SUB REG*
FIELD
•
•

:X ..................... :

•

ARGUMENT A
PARAMETER 1

•

TCA16

•

SET OPERAND •
OFFSET TO •
EIGHT
•

T((56

•

Yf!lo

ii

*

*

·

................
·.•..............
•
•
•

•
SeT TRIAD •
REGISTER
•
•
.FIELD TO NULL.

IMAG BUILT-IN
FUNCTION

LONG?

•

C.ORE ADO •
• 01 •• X. OF ARG TO •
.. •
• TRIAD VALUE.
•••
•
ADO FIELD •

.VE!)
•

•

••
•

·Ne

. . . . . . . . ..

..

•NO
Te125

• SET TRIAD VAL•
•
ARGUMENT
...................... X.ADO TO OPRNO •••• X 88 •
.OFFSET + OPO.
• 19.
• SU8seR IPTED 1 •
• •
•
CORE ADD
•
• •••
•

. . . ....
ARGUMENT A
PARAMETFR?
•

.................
................

·

rr: 125
••••

• .X•
•

*

88 ..
1 q ..

Yf ..

.....•.........
.·.............. .....
V

*

Te125

•

*SE T PARAMETER.
•
•
.FIAG OF TQIAO* ••• X B8 ..
•
ON
. . . . lq •

YES

:x ................... :

·................
V

Tce57

• ASSIGN WORD •
• Of ADCON S TOR.
•
fOR ADO
•

...............
•

CONSTANT

•

v
...............
...............
• S, TRO VAL ..
• ADO TO ADO OF.

:S~fG~A~~C~~b

..

ON

:
..

................

• NO

•

ARGUMENT

SUBSCRIPTED 1 ..
. . .

•

•

..

•

seT

•

TCl2
••••

•••

••••••••••••••• X. INSTRUCTION •••• X 87 •

• SEQUENCE TO.
•
14SIPV
•

·

•••••••••••••••

.. yes

.. 19*
• •••

·...............
. ....
:
:.... :
V

•

SET

l~~~:~P ~

TC 12

•••

•
MSIPVS
•
•••••••••••••••

Chart 54. Tn.ad Code Generator (Page 10 of 31)

r~.·

• ...

315

11

I'LII SYSTEMS MANUAL
STeODE

SUBSTR
BUILT-IN
FUNCTION AND
PSEUDO
VARIABLE

................•
••••
.....
. .
.
•••••••••••••••

................
.....................
·SVGTMP

•

..*Al .... X.GET
*--------*
TEMP rOR ..
..

..

•

•••••••••••••••••

...............

• YES

..

..

SET

••••

..

• •••

....

..

•NO

NSSUB]

it

..
TO INI T
•
• STRING DOPE ..
•

* ••••••••

•

oooo . . . . .

LNr~HobJ~lO
.. VECTOR TO It ..

.SNeON

..

~

•

V

TCCIt]

..

VECTOR

...............
40-------------.
.·..............

•..........•...
..
.. ...
x:
: ••• A6:
.•.............
*SET OFFSET TO-

•

*FORM CONSTANT.

..

• ARml=mS~ 1••............•. x: m~~uH''m :•.. ! r~..
. . .

RET VAL

...............
•
•
...............

Te12

..

...............

..

ARRAY?

•

.GET TEMP FOR ..

•

•••••••••••••••

ARGUMENT AN

V

·SVGTM-P

..
TO ADD OF
..
.. DOPE VEe TOR ..

•

•

• LENGTH TO 9 •

...............
.-----------.

TCC82

.. SET TRI ADS •
'" VAL ADO FLO ..

• ....
0

••

:x ................................. :

·................

fIRST

.01 •• X. SET RESULT

•
.. LENGTH TO 6 •

•

v

•

TC~:~ ••••••••••••

• Cl •• X. SET RESULT

.. DOPE VEt TOR ..

.

••••
.....
. .
..•
•••••••••••••••

TCC70

TCC~O

•••

TIME BUILT-IN
FUNCTION

DATE BUILT-IN
FUNCTION

•

.SEE F01.l0WING.

•

• ••

NOTE

..

.. YES

v
......•........

.. OfT
..

Fa

FF5£T

..

ADD CONST TO
INIT DOPE
VECTOR TO
CONST TIL

OPE"
Ii ..
..

.. VEe
.. TO

: ••• ~li •••••• :

..
• •
•..• •

TCC43

·'6*X

•

•* •

...............

..

ARGUMENT A
••••••••••••••• X. INS
.. P-ARAMETER 1. ..
: SE~

•

..

...... ......
..

•

• NO

..

V

·SVGTM9

..

:.1:-

ION •••• X 87 ..
TO:

...............
•

'•*
•

•

~!1:XEI 193
MSSUB2

•

v
...............
.•.............•.

.-----------.

•

.SNLSI8

VECTOR

•

r~.·

•

• •••

•

..

....
..=

TC12

• !~•••

INIT OOttE Y •

••

v

•

••••

."YES

DATE 8UILT-IN

• NO

..............
.• ....
..
SEILTI
..............
. :.IZ-

TCll

..
............•x:...
•

..

SET

•••

••••••••••••••• X. INSTltllplON •••• X \11 •

.. • FUNCTION ., .. •

..

.
06:

•••

TCC~

Chart 54. Triad Code Generator (Page 11 of 31)

NOTE

·SVINS"
•
----------'*
• GEN CIIDE TO •

..

311

•

.SE E FOLLOW I NG.

•

ADD Of DOPE.

V

TC12

•••

: ••• ~

ADD FLO TO

*

...............
...
.·.............

. ....

...............

:•

•••

...............

•
•

.........i ....._
SET

....
•
*
*06* •• X-GENER.ATE CALL.
•
•
• TO IHESADE ..

v
•••••••••••••••
•.SET
•
TRIAD VAL.

v

•

•

.GET TEMP FOtt •
• DOPE VECTOR •

••••••••••••••••

• SET TRO ARG
•
TO DOPE
• VECTOR ADD"
•
OfFSET TO
•
LGTH FLO

TCC84

..•••••••••••••••.

••••

..

...........•........
...............

................
.------------.

TCI2

TeC44

• YES

FIRST"

:

TO:

PL/I SYSTEMS MANUAL

1Z

nCODE

AR lTHMETIC TO

STRING

CONVERT

...............
·...
. .-----------.
.
•••••••••••••••

...............
.....................
*SVGTMP

•

•

•

••

•$,U •.... X-GET
*-------------*
TEMP FOR •
•

•

STRING 0 V

TeC30

rCC12

TeCla

•••

.SVGTMP

.CI* •• X*SEE FOLLOWING.
•
•
•
NOTE
•

*..
•

•

•

*

•

.,

OPERAND A

*SVGTMP

•

•

·SVINSA

.,

•

.,

.-------------*
.SEE FOLLOWING.

...............

.. DOPE VEe TOR •

NOTE

*

*

:x ••.•.••.......•. :

........•.....•
·................
•

...............
.-------------*
.*..............•
·SVGTMP

*------------*

GEN CODE TO

...,.................

.,

•
SET ENTRY
•
POINT TO
•
STRING TO
., AR ITH CONVT
•
ROUT

-SET ENTRY PT •

INIT DOPE V •

•

.............•.
• ................. .
................ ...
TCC22

*NO
•

•
•
*SET ARGUMENT.

TCC 12

•

*.* •

x:R~ai~TI~ ~I~N:···~ (1:

YES

••

-

.,

•

.................
.CONVERT ROUT.

...............

.

.

• C5 ••• X. TO ARITH TO •

• GEN CODE TO •

•

•

•••••••2•••••••

V

TCC19

•

.,

.GET TEMP FOR •
•
TARGET
•

MOVe SOURCE
TO DUMMY lRG

v
...............
*-------------*
·................

•

•

Y

TCC31

•• 00 I NIT CONS• TO CON TSl •

CORE 1

NOTE

CREATE DOPE
VECTOR FOR
STRING
CONSTANT

v

ARGUMENT IN

•

.SEE FOLLOWt NG.

~

TCC14

*YO INITIALIZE'"

•

•YES

·'StOV

...............

v

-.FORM CONSTANT_

·SVINS'"

* ........ .

•••••••••••••••*

·............•••.
·.....•..........
·SNeON

•

v
..------------.............
..

GET TEMP FOR
SOUtlCE TO BE
CONVERTED

• GET TEMP FOR -*
• CONVTD RESl •

*NO
*

CONSTANT?
•

v
......•........
*-------------*
·.........•......

•

*

•••
**01 ** •

•

•

STRING

...

•
•
•

'Ix ................................ ..

...............
V

TCC20

.-------------.
·SNLS[8

•

.·..............
.SEE FOLLOWING.
•
NOTE
•

· .....
...
TCC19

·YES
..

ARGUMENT CORE
SIGN PLUS? ..

.

..

.

•••

*x

..

ADO ENTRY
NAME TO

C5.
..

...

RUNTIME LIB
REQ"T

.. NO
....
•••••••••• X. Cl.

•

*

TCCll

v

•••••••••••••••

•••

SET TRIAD

VALUE ADO

:&IEk~TT~At3B

*

•
•
:

•••••••••••••••

·•••••••••••••••. ....
;

rC12

: JNSTiGlTJON : ••• ; 11·•
• 19.
• SEQ TO.MSCVT.

••••••••••••••••• ••••

Chart 54. Triad Code Generator (Paqe 12 of 31 i

JI1

13

PllI SYSTEMS MANUAl

STeODE

CONVERT
OPERATOR

•
........ . ·
TCA80

'"

.................

• YE~

*A 1 "

....

..

·

•

s~~p~O~~E~T

:

...............
" ....
'" '" ..
·• ............. x:...................
'"
.. ....
~

JARbE:T TYPt
F\.OAl ?

•

'"RGEl TYPE
FLOAT?

~~~EC~~V~:T : ••• ~ ~~••

•••• ••••••••••••••*•

.)EARtH
'S(.ALI'iG CaNST
T ... CO~ST TBI

.X 80 •
" ' . 14.

••••

•

.
·................

·

v
·...............
.

V
................

.
•...............•
...............

.....•.........

.....
"' .........
•
•

...... ..

Y

fACTOR

...............

·(5·X

...............

TCA,937

..

·

'"
•

*GfNER84"

.

.

*------------*

TCA87

•••

SCALING VALUE

ONE?

..

TCA92A

"

•

• NO

.................

':)CALE VALUE
NEGATI VE?

SET StAll NG.

'"'"

•

INSTRUCTION •••• x C5.
TO DJVIDE
•
'"
•

...............

·

• NO

y

f~~1~fl~I~2

TO MULTIPLY.

TCA87

~
•

•••

.X 01.
•••

·· .......

·

TCA878

•••

.X 01*

NO

...............
........•......

TCA92K

*••

•

SOURCE TYPE:
F UEO?

•

.............•.
'"
.:..• ...
:
'"
. ...
...............

•

• YES
•

•NO

•

•

•
. .·
•

V

TU923

•

•

...............

••••

. . . . . . . . . . . . . . . . X. SET CONVERT ..... X- 88 •
• TYPE TO 12 •
• 1 ••

•YES

TCA923

••••••••••••••••• •••••
:• f~~E ~Y;:T :•.... ~• f:.·

·................ ....
Chart 54. Tr.l.ad Code Generator (Page 13 of 31)

1 (;A923

••••

................... ......

•

SOURCE TYPE
DOUBLE ?

•

• . . . . . . . . . . . . . . . . x.• SET CONVERT ••••• •X 88••
•
• TYPE TO 76 •
1"'.
•
• •••••

.NO

C5:

....

A5.
,.,

TtA87

•

'"

· .....

• .YES

•

• .................. x.•

•
*••. '"x 80
•
1"'.

YES

•

•••••••••••• * ••

·YES

·

TARGET OR
SOURCE TYPE
tOMPLEX1

••••••••••••••• X.SCAl E FACTOR •••• x CS.
•
TOO LARGE
'"
'"
'"

CONSTANT

...

TeU78

•

• YES

•

RA88

•

• ••

*NO

••

..

•

•

TCA87", •

....
"FORM SCALING ..
*A5* •• X*CONST AIIIT 10•••
"
..
.. ABS HeALE ..

.. ORM ]NSTR
PARK TABLE

TCA86

*
•••• X
•

•
VALUE TO
*r
ARGET SCU E"
•

•
•

*fNT FOR seAL.

. ...

SET SCALE

:II

• SCALE fACTOR ..

SCALE VALUE
TOO LARGE?

V

'" ;:ofT CONVERT •
'"
TYPE TO 4
..

..
SET SCALE
..
.. VALUE TO
..
.MINUS SOURCE ..

VALUE}

·................ ....
...............

v

• *** •••••••••••

.. SET tONVERT ..
..
.. TYPE TO 24

318

•

"OTF

• NO

•••••• **v•••••••

•

'"

TCA88

·

•

•

·YES ••••

.. VF\

..

•

.. .

TCA88

••

·SNeON

•*DI •••
*' ){.SEE
.-------------.
FOLLOW] NG •

NO

'NO

T[l8b

••

..

•
•
................

••••••••••••• •••• •••••••••••••••••••••• ••••• •••• x:

'lOURCE 1 YPE
FLOAT ?

...............

lCA81S

TeAS'

•

Pl/l SYSTEMS MANUAL

srcaDE

..... .

TeA88

•••

.80 •
.. •
•

•

•

•

.

·NO

SOURCE TYPE
DOU8lE 1

..... oo ..

oo . . .

•

• 't'ES

·................
·................
v

•
SET 48 TO •
• CONVERT TYPE •

·

• X ... oo

TCA89

.

. . . . oo .. oo . . . . . . oo • • •

·

.

'NO

SOURCE TYPE
tOMPlE X 1

·oooo ... oo.oo ..

·

... YES

v
·...............
..
·................
•
ADD 12 TO
..
• CONVERT TYPE.

: x........................ :

TARGET TYPE
DOUBlF- 1

•

• • • oo • • oooooo

·

'I'E 5

...............
· v .
·................
•

ADO 8 TO

•

• r JNYERT TYPE.

:x ....
'tA91

·

oo • • oooo.oooo ... oooo:

.

'.0

TARGET TYPE
COMPLEX 1

•

·oo . . . . oooo • •

·

YES

v
·...............
..
·................
•

ADD Z TO

•

• CONYER T TYPE •

:xoo ......... oooooo . . . . . . . . . . . . :

................
·
....................
TCA9l3

* •
*S8
* •

oo ..

•
X.

V

ADO SIGN Of

*

SOURce OPND •

.TO TRI AD SIGN.

·............•... ....
V

TC12

*SET INSTR SEQ.
•
TO Y AI. UE
.oo

...............

•

..

ASsot WITH.
CONY TYPE

Chart 54. Triad Code Generator (Paqe 14 of 31)

•

•

....

•

x B1 •
.. 19.
• •••

319

15

PL/I SYSTEMS MANUAL
sTCOOE

....................
...................

•
•
.AOV TO ADCON ..
• CO . . . X. AREA ADO OF •
•
•
.. NEXT PARM ..

ARGUMENT LIST
OPERATOR

.... . .
....

TC90

. ........

•

*

T(99

•

.~

T(98

*

•

•• •
• NO

TC94

•

*YES ••••

•....... .

ARGUMENT A

...

STRING?

·

•

·................
•
•
•

SAVE ALL
•
INSTRUCTION·
PARM TABL E •

...............
ENTRIES

·

ARG AN
EXPRESSION?

•

•

•

v
...............
...............
•*

•

•NO
•

V

TC987

·

....

• .X• A5••

ARG A LABEL
CONSTANT?

• YES

•

• .X• AO ••
•
16·
•• •••

ARG A STRING?

• 81.
BUILT-IN fLAG
.X CO.
•
....
SET ON ?
....
•

• • •YES

.YES ••••

•

16.

TC91
.YES ••••

. ....
* .X•
•

•

•

A3 •
16.

NO

TC903

*•

SET UP
•
DEASSIGN
•
POINT fOR
•
*Tf MP STORAGE •

*

• • •••••••••••• X •

ARG A
CONSTANT?

· ·

•

*

.

TC911

•

•
·YES ••••
ARG SIGNED OR"
•
•
PARENTHESIZED
*X A4 •
?
16*

*NO

....
.....

*' *'

*'NO
•••
*'••••••••••
••
X. C6.

YES

TC905

.. ......

• • YES

.

STRING
.. SUBSCRIPTED?

•

TC98F

..

•

•

·

••••

·NO

••••

.X l4 •

CONSTANT A
OED 1

.X C2 '"
.. 16.

• • 16•

·

• YES

NO

..

TC992
.YES ••••

....

*.
.X

ARGUMENT
CONSTANT

•
C2 '"

. . . lb.

·

•

•

· .••••.
TC911

TC992

...............•.....
Tt90l)

Y

...............

•• •
.SET REGISTER.
••C6 •• X. ADDRESS TO •
NULL
•

•• *' *'
•••••

*'

NO

•...•..•...•...

TC988

TC999

• YES ••••

....

• •

ARG REQUIRE
DUMMY?

•

*

.X Cl •
. . . 16 •

•
NO

.

·

:X •••••••••••••••• :

TC907

·YES
•

.................

......

*'.
ENTRV POINT A
PARAMETER?

*'

•

·................ ....
y

Tel25

ADVANCE TO.

...............

:
•

320

...•...•.......

V

...
• MOVE ARG TO •
*88* •• X. INSTRUCTION •
•
•
... PARM TABLE •

•

~i~~ +~il~
ENTRY

. ...

•••••••••** ••••

• NO

....................
TC985

TC985

·YES
•
•
•••
•
.RESTORe INSTR.
•
•
BUILT-iN FLAG
••••••••••••••• X. PARK TABl.E
•••• X 88.
SET ON ?
•
ENTRIES
•
•
•

•

..

: ... ~ t~...
•

Chart 54. Tr1ad Code Generator (Page l5 of 31)

• •••

•
•

·
NO

·................ ....
...............
V

•
•
•
•

Tt12

•
••••
•••
ION •••• X 87 •
T O . . 19.

.•............• ••••

••••••••••••••• X. I
• S

Tell

*'

SET
••
INSTRUCTION •••• X 87 •
SEQUENCE TO.
• 19.
MSARGN
•
• •••

T

PLII SYSTEMS MANUal
STCDDE

.... . .. • •
1C99

.

•

•••

*AO ..
• • •

•

• ·yes
.

ARG SCALAR
VARI ABLE ?

•

.

16

• .YES
*..................... ..

I.RG REQUI"RE
DUMMY?

• ••

•NO

• NO

••

•

*................. x

••••

.

..

•

•

•

..

...............•
................•

••
*e1 •• XIII
••
•
••••

...

C2-

..

• ••
·YES

V

TC999

TC991

CONSTANT"

ASSIGN TEMP
FOR DOPE
VECTOR

*........ .

15_

•••

*x

•

• YES

C6 ..

. .....

ARGUMENT

·NO
•

USE?

••••
TC905

·'(f~

DEASSIGN
:II
LAST

POI~T

...

........... x...

•

••

•

RESET

• ••
.*
• •
.*Ol*X

•

DEASSIGN
POINT

..
•

••

..

•

STRING
SU8S-CRIPTFO 1 •

•

••• •

:x ................. :

..........•....
......•.....•..
V

TC992
•

Y~')

. . . . . .

..

•

•

·...•••• .• .• ·
TeCH
•

*.3 ..

·

•

•••

•

*Yi::S ••••

•

....
•

*x

....

•NO

TC917

V

..

•

..

DETERMINE

•

•

•

SIGN FOR
ARGUMEJI4T

.•

•

C6 ..
l~.

-

.......... .

•NO

·'SVGTMP

•

:SEE

•

•

.

ARG A LABEL
CONSTANT?

•

V

·• x •••••••••••••••••.

...............
.
.
...............

•NO

................. ....
..•........•...

·..............•.
•

......
....

NOTE

GEN CODE TO

MOVE ARG TO

GEN CODE TO
STORE LABEL
CONST INTO
TEMP

..x

·SVINSA

(6 •

a

X c'b

.. 15·

•

* •••

...............
• ·*-------------.
.
._
............... ..

1[997

ADD CONST TO
INtT DOPE
VECTOR TO
(ONST TABLF

• 15·

•

TEMP

•

r(905

T(ll

• DETRMN INST.
•
•
.SEQ FR." SGN &•••• X 81 •
• TYP OF lRG &'.
• 19.
• ENTRY PI ATTR.
• •••

.------------*
.SEE FOLLOWING-

•

.....
TC905

•••••••••••••••
·SNeONS
•

.SV INSA
•
.-------------.
••••••••••••••• X.SEE FOLLOWING.

NOTE

V

TC993

T(986

..

•

.SEE: FOLlOWIN&*
•
NOTE
•

ARG

.

*..

...............
.-------------.
.·..............
.SVINSA

•

V

TC905::

TC996

•••••••••• *••••

• YE (,

•NO

_SAVE AODRESS •••• x tb
•
OF TENP
•
• 15.

~g~~owl NG:

Gl:T TEMP FOR
'iTR ING DUMMY

-A5 •• X*ASGN TcMP fR •

••••••••• :

:

•

•

ARG

VARIABLE TO
8E MOVED?

v
.............
··.................: ..........-:..:

v
...............
.-------------.
.•..............•

..

·YES

•

•

V

• SVGTMP

DUMMV

..

GEN CODE TO •
INIT DOPE V •

·YES

•

...............
·....
. .-------------.
.
T(94

•

•

STRING
SUBSCRIpTED? ..

•

...................•..
........•...........
•

•

1C90')

•

•

VECTOR

•
•

NO

EXPRESS ION
POSITIVE IN
CORE 1

*A4 •• X.

•

v
...............
.-------------*
·.*..•......•.•..
·SVINSA

.SET UP LENGTH-

*...........................................................• C2 • .... X.OF
STRING FOR.
•
INJT DOPE •

ARGUMENT
.. SUBSCRIPTED' ..
..

•

•NO

•

• NO

•••••••••

•

V

T[905

•

• •••

• GE:N (OUE TO •••• x C6 •
• INJT DOPE V • 15 •

v
...............
·...........•.... ...
·SVGHIP

•

•

••

*-------------.
•
-SEE: FOLlOWING •••• 'lI:

Chart 54. Tr~ad Code Generator (Page 16

'f

31

NOTE

• ••

•

01.
..

321

17

PLII SYSTEMS MANUAL

STtODE

ASS!~~'.r

OPEnTliR

•
•

...

.

...............

• ••

•
•••••••••• X:•A,3:

.. NO-

•••••••••••••••••
•
•

•
•
•••••.••••••••• X~y~~T5&;~Ri~:
.. YES

•••
Tt"
Tt.57

V

V

Tt12

•••••••••••••••
•
• ••••

....

: INSTi&lTJOH : ••• ~ 81*"
-SEQ TO ",'REG"• 19.
•••••••••••• 4! ••

.

..

•

.

It"..
••

..
.YES

.....
..

..

•

..

:A3:X • S,q¥~R~~~E
•

v

•

•

LABEL
COftlSTANl 1

322

.

TC40

••••

.
...............

r~·

..

·NO

RIGHT OPERAND
PLUS 1

•

•NO

............•..
·................ ....
•..

SET

.
* ...

•

.•···· .

TIt.IAD SIGN
NEG 1
•

•

SET

NO

1C 12

•••

...................................................... X. INSTRUCTION •••• x 87 •
•
.SEQ TO KlASCP.
• 19.

Chart 54. Triad Code Generator (Page 17 of 31)

..

V

SET

1(12

"'...

·········)(:s~rJ~~11~~M:···: ~~

•

. i......... ....
............... ....

T~~l ••••

................ ...
................... ....

TC42

·YES

.

••••• ...... •••• 'OXIlt INSTRUCTION ..... x 81 •
-Sf Q TO N,BREV*
• 19.

SET OPERAND.

TVPE TO
COMPlE)!'

• *............................... .

.. YES

·.......i........
·................
•

Ttll

. ....
..

....

•YES

leU

·YES

•

SET

? . . . . . . . . . . . . . . . . . X:S~~S~~~~I~T:···~

• RIGHT OPERAND •

*

..

NO

•

..

...............

TC45
•

•

PLII SYSTEMS MANUAL
STCDDE

...

.....

•

••

• .NO

.. * ••••.••.•••• x

*AO.
RIGHT OPERAND
.. . . . .
PLUS?

•••

••

• .. •YES

•

•
...

Tel6
..

•

...............
...............

•

.. LEFT OPERAND

••

II

Tell
•

.YES
..

•

seT

..

TCll
••••

....

..

HALFNORD
••••••••••••••• x. INSTRUCTION •••• x B7 •
AOOR?"
..
SEQ TO
•
• 19.

•

••

•

•

MS5HALFN

..

DIVIDE
OPERATOR

• •••

• NO

...............

... .

TC12
TC.'
• • • • YES
•
..
••••
•••
.NO
seT
. . . ..
• LEFT OPERAND .... •........... ... x:• tN~la~610N
: ••• ~ y~•• •*01 •• • OPERANDS
FlOA'f?
• •BYTE ADDR? ..
.. MSSBvTEN
•
• •••
•••
•• •
•••••••••••••••
•
• NO

.

•

....
.................. ....
V

..

TC12

.

••••• 'II! •••••••••

..

SET

....

-SEQ TO "'SASRM*

.

.

.. INSTRUCTION •••• x 87 ..

.. 19.

................ ....
...............

TC35

•

.YES
..

..

..

••••••••• •••••• x.

..

ADDR?

..

"'SHAlf

..
..

.•
·NO

·

YES

•
.YES

x

RIGHT OPERAND • .........
IN CORE ?

.. 19.

• •••

YES

•

Te12

SET
....
..
INSTRUCTJOP4 ••••
87 ..

seQ TO

·

LEFT OPERAND
.......... X
IN REGISTER? •

•

•

.. LEFT QPERANIJ
HAlFWORD

......... .

x

·
v
·...............
.
• NO

.
· ..

•
• LEFT
..

................. ....

.

·NO

OPERAND

BYTE AOoR 1

..

..

••••••••••••••• x.

Te12

SeT

.•.............
•
•
...............
•
•

•
•

..

INSTRUCTION •••• x B1 •
TO MSASRP.
• 19.

...............

•• SEQ

.. YES

V

....

• ••••

...............
..

SET RIGHT

...

•

OPERAND

•

.REGISTER AoOR •
*
NULL
•

: ................... :

TCU

SET
•••
INSTRUC nON * .... X B1 •
seQ TO
•
• 19.
"SSBYTE
•
• •••

...............
.-------------.
·.•...•.......•..
V

TC615

*SOPMlO

•

.OtT EFft:CTIVE.
• SIGN OF OP •

·................
·................
v

• SeT .R:£SUl T
...
StGN

•
•

·................ ....
·................ ....
V

•

seT

TCl2

•••

• IHSTRUCTlON •••• x 81 •
• SEQ TO MIDIV.
• 19.

Chart 54. Trl.ac1 Code Generator (Page 18 of 31)

323

19

PLII SYSTEMS MANUA,

STCODe

ADD AND

SUBTRACT

OPERATI ONS

....................
....................

...............

TC13

TC08

.....................
-SOPHID

•

•

..

..*81 .. .. X.SEE
*---------*
FOLLOWING.
..

•

NOTE

•

•

• RELEASE All •

•

•

•

*Cl ... X. ENTRIES OF

•

TRIAD TABLE.

............... .
v

......•........

DET EFFECT IVE
SIGN OF OPNDS

exn

AND OPTI 141 ZE

ORDER

Te 10

.

Tel05

..

·

Te105

.....................
..

.ADJUST SIGNS"
gb~~Mllf

: ............

.. .
:84:X ..
..
Tell

..

..

•

.

TC.16

·

·YES

OPERAND TYPE
COMPLEX 1

•

·

* ............... x

·

RIGHT OPERAND
PLUS?

.

·

•

·• x ••••••••••••••••••••••••

................
..•....•.......
*..
:A7:.•
.................. "••....• :B1.... ...............:
••

SET·

•

x:s~SS1~~11~:

V

·SVINSA.
•
•
*------------*
x:G~~N~¥RE s~gR
••••
..

................• .•...•
....
•• •
..................... ....
TC125

V

*88 •• x* AOVANCE TO

...

324

• NExT TRIAD

V

.•.............

•••••••••••••••

*...

•

'NO

TC02

* ••• x ...4 •

•

Chart 54.. Triad Code Generator (page 19- of 31)

•

1.

•YES

•••.
.
·
•
.• • . ...•
·
:x ................. :
.·............... . .
·.*•••••••••••••. ...
TtlIJ5

Te12

·NO

•

RIGHT OPERAND
IN REGISTER? ..

Tel03

*
•
*

.

.• •........

OPERAND

•

V

oo • • oo . . . . .

•YES

IN RfGISTER 7 •

••
••
SET
• INSTRUCTION·
.SEQ TO MSSUBR.
•••••••••••••••••

TC14

..

.. INSTRUCTION·
• SEQUENCE TO ..

..

.

• LEft

•

v

TC12

•••

..
SET
••
..
• INSTRUCT ION •••• X 81.
.SEQ TO MSSUBC.
•
•

••••••••

·................
JIISADDR

•••

·................ ...
..
. ...
...............

lel8

.. YES

•

.. .

·YES

• NO

NO

SET

•

RIGHT OPERAND
.X &1.
PLUS 1
.....

·NO

..

•

...

RIGHT OPERAND
.X A4_
PLUS ?
•••

YES

•

•••

• • •

................................................... x

•

•

.....................
:A4:.. x: TO

·NO

*NO

LEFT OPERAND
PLUS 1

..

•

*

*x

A4.

YES

V

TCII

•

•••

INTERCHANGE •••• X B4.
OPERANDS
•
•
•

Pl.II SYSTEMS MANUAL

ZII

STCODE

COMPARE
OPERATORS

....••••.• .• . •
••
TC46

..

-NO
..

ARITHMETIC

*Al ..

...............
:
TO:
...............
.. " . •

TeS8

..

OPERANDS

TYPE?

•

..

*•••..••••••••• x*

•

.. YES

v
................
·S(PMlO

...............•

•

•

•

TC52

• ••••••••••••• X

OPERANDS
COMPLEX?

..

•

•

•

••

• "YES
• *••••••••

RIGHT OPERAND
PLUS?

•

• oNO
••

o

-

_ NO

...............
ii

·YES

RIGHT OPERAND

OPNDS &.

:.1:*

• YES

o
OPTIMIZE
ORDER

..

INSTRUCTION •••• X BT ..

0

DET SIGNS OF

••••

....

SEa¥~~~~

••• • •
*82*X
••

..

*------------*
*St:f: FOLLOWING*' NOTE
..

Tel2

•

SET

• •••••••••

PLUS?

•- CHANGE SIGN 0•
•
OF LEFT
•

...............
•
-

-

OPERAND

•
0

-NO

·

....

·NO

• *••••.•••

W.ERE OPERANDS

.

.

V
•*•••••••••••••

TC50

.. INTER.tHANGED? ..

TC5,,"

.CHANGE RESUL T.
'"
SIGN TO
..
.INVERT > AND ..
• < TESTS
•

...............

:x •••..•....•••..• :

.•••••••••••••••.
...............

TC,," 15

• CHANGE RESUl T*

..
SIGN TO
..
"INVERT> AND ..
TESTS

o

.YES
PLUS ?
•

:x •..•.•••....•... :
TC41

·

.........
..
.

..

ADDRESS?

TCI2

SET

••

•
: ... ~ y~••

...............

PLUS 7

-- --

•

!~a~:~~II~~
MSCCr-.

•

• •••

*x

82-

.. YES

• ••••••••

•

-

•
•
•

..

V

Tel2

SET
...
•
INSTRUCTION •••• X 87 ..
• 19.
MSCRN
•
• •••

SEQUENCE TO.

Tell

..
SET
...
•
• INSTRUCTION •••• X 87 •
• 19.
• SEQUENCE TO.

•

NO

................
.
. ....
...............

TC48

.·............... ....
...............
Y

•

lEFT OPERAND

..

..
"NO
.. RIGHT OPERAND ..
HALFWORD

• •.............. x:•

.. YES

ii

<

.·................ ....

TCS6
-NO

LEFT OPERAND

..

.. YES

..

:x ..•..•...•.••••• :
•

Mscep

•

• ....

.'"................. ....
V

•
•
•

Te12

SET
•••
INSTRUCT ION "' ••• X 87 •
SEQUENCE TO"
'" 19.

: ••••=l~~t••••: ••••

...............
..
. ....
:
: ...
...............

TC49
..

..

V

SET

l~~~~~~ly~
MSCHLF

TC 12

....

..

..

~ ~~."
• •••

-Chart S4. Tr1ad Code Generator (Page 20 of 31)

325

21

Pl./J SYS TfMS MAHUAl.
STeOD£

-MULTIPLY
OPERATOR

.•

Te20

.....

...

•

•

..

-NO

..
•
.. RIGHT OP ERANO •
• Al ..
HAlFWORD

_

•

..

..

ADDRESS?

.. YES

•

................
------------.

Te21t

•

•

•

OfT OPNOS

•

SIGNS

•

..

OPERANDS IN
ADJACENT
REGtSTE::RS?

•
..

•

••••• ** •••••••••*

•

v
·...............
.•
•
•
•
................
•
•

SET RESULT
SIGN

•

YES

IN EVEN
REGI STERS?

•

OPERAND • . . . . . . . . . .

I ..

*YES

•••••••• x

•

•

•

·NO

•

·

'1\10

• LEFT OPERAND

•
•

•

RIGHT
.. ~ PARAMETER

YES

•

;

.SOPMZO

• 'NO
•
••

OPERAND F t xeD
......... .
TYPE?
•

............. oo • • • X

·

.NO
..

......... X

••

YES

•
·...............
..
·................
• I NTERCHA'NGt ..
..
OPERANDS
..

:x .................. :

·

••••••••v* ••••••
.. DEl OFFSET
•

•

.

Te225

•
•

·

.----------.51:1: t-OlLOWING.

.

·
•

•••••• *••••••*•

•
•
•

SET

•

.... . •
TC26

Tt 12

...

.*••

•

••

DETERIiIIr..E
SIGNS OF
OPERANDS AND
OPTIMIZE
ORDER

.

lto.lSTRUCTlON ..... x B7 ..
SfQUENCE TO.
• 19*
M-SMPYP
•

•• *••••••••••••

NOTE

* ••• **•••••••••

••••••• ¥•••••• *
•

.
.

•••••
** •• *••***•
·SOPf410

•
\iii !THIN DOPE •

VEC TO DIM
.. MULTIPLIER

V

•

·...•............

TC255

•

ij

SET

TC12

•••

• INSTRUCTION •••• X B7 ..
.. SEQUENCE TO.
• 19.
•
M$MPYH
..
• •••

....................

·................
v

·
•
•

Te2a

..

.

•

. .....

OPERAND TYPE
COMPLEX 1

•NO

TC26

•••

.X C6.
••
•

·.....•.......... ....

Te22

•
•
•
•

V

SET
...
.
INSTRUCTION •••• X 81 •
SEQUEfCE TO.
• 19*
MSMPYR
..
• •••

..............*.

326

TeI2

Chart S4 w Triad CoCle Generator (Page 21 of 31)

* ••••••••

•YES

· v ..
·...............
••• *•••••••••••
•
•

INTERCHANGE •
OPERANDS
•

-

:x................. :

·................. ....

Te27

.........•.....
...............

TC30

·NO
•
RIGHT OPERAND
IN CORE?

DETERMINE
•
RESULT SIGN •

• ·YES

•NO

* ••••••••

.

••• *••••••••• * •

•

..
.YES

*C6.X
LEFT OPERAND
•
••
IN CORE ?

V

Te12

..
SET
•••
• INSTROCTION •••• x 81 •
.. SEQUENCE TO"
.. 19.

,. "'' PVC

• ..•••

• ••••JII......... .

•
•

oo . . . . . . .

x.
•
•

TC12

..
••••
SET
•••
INSTRUCTION ..... X 87 •
SEQUENCE TO.
• 19.
MSMPYN
•
• ••

*

PLII SYSTEMS MANUAL

22

STCOOE

AND OPERATOR

OR OPERATOR

.
....
................

••••••••••••••••

....................
..• AI ••• x.OPTIMIZE
*-------------.
ORDR.
•

..

OF DPNDS

TC72

•••••••••••••••
·SOPMIO
•
.. .-----------.
• 81 •• X. OPT ORDR OF •

*SOPHID

•

•

•

•

OPNOS

TEST COMPARE
OPERATOR

....•••••••••••••••. .... · . . •
...

TCTO

TC68

•

SUBSCRIPT
OPERATOR

...............

TC 12

•
••
SET
•••
.Cl •• X. INSTRUCTION •••• x 87 •
.. •
• SEQUENCE TO"
• 19.
•••
•
"SSURT
•
• •••

""

TC60

•

•

..-

-01.
•
••

.YES

•

·................ ....
V

•
•
•
•

IC 12

SET
•••
INSTRUCT ION ..... X 87
SEQUENCE TO.
• 19.
MSOR
•
• •••

...............

*

V

TC12

...............

SET
...
.
INSTRUCTION •••• X 87 •
SEQUENCE TO.
• 19.

...............
•

HSANO

•

•NO

•••••••••

v
·..............
..

·................ ....
•
•
•

..

RESULT SIGN
PLUS?

•

CHANGE

•

• OPERATOR TO •
.INVERT > AND.
•
(TESTS
..

**••

.

·

• lC • • • • • • • • • • • • • • • • •

·................

T(62
OEF INE
ADDRESS
OPERATOR

•

fORH

TCBoe

.

•

...............
•

CONDIT ION
COOE fOR

•
•

:*.. •

V

.N~

.... . .
LEFT OPERAND
• A4.
.. .- •
TVPE NULL..,

•

·
.
...............

reBO

.-* •••••••••••••

• MOVE CURR VAL.
. . . . . . . . . . . . . . . . X. OF CODE ADD
.C NTR TO CURR"
..
TRIAD
•

•

* .... X
..

•
•

..

.·............... ....
........... ...
V

~

•

•

lb •

• ••

OPERATOR

•

•

•
•

TC 12

SET

•••
INSTRUCTION •••• X 87 •
SEQUENCE TO.
• 19.
"UTEST

.- *

••••

.- YES

v
...............
...............
• HOV CUR VAL
• OF CoE ADD
• CNTR TO OF$T
• ADO IN lFT

•

•

•

QPND

•
•
•

BRANCH TO
SOURCE LASH

........ ..
. ......
.
TC12S

TL.B03 • •

.Ab.X

•

DOES TRIAD
OfF A 8RANC~
LA.BH

•

"'NO

•

7

V

•

SET

Chart 54.

88 '"
19'-

Te12

....

...............
•

.-x•

INSTRUCT ION •••• X B7 ..
SEQUENCE TO.
• 19.

MSRFt B

Tr~ad

·..........•.....
...............

fCB76

•

•

•

•

•

DETE-RMtNE

•

*06 •• X.COND CODE FOR.
•••

•

•

BRANCH

•

INSTRUCTION ..

YES

·................
•
•

••• *

•

• •••

Code Generator (Page 22 of 31)

·................ .....
V

•

SET

Te12

...

.

... INSTRUCT ION •••• X B 1 •
• SEQUENCE TO.
.. 19.
•
MS8REV
•
• •••

*.**.* •••••• *.*

327

1'1.11 SYSTEMS MANUAL

arCODE

COIIIIm: OR

SnfEM~AT
LAIEL

_.

Tca96

••

•

•

..
:C1·. •
..
TCB08

.

••••

••••
-NO
.. •
• t.fFT OPERANO •
*Al ..
LABEL
. . . . . . . . . . . . . . . . . . . . . . . . ..
.. • •
tONSTANT?
•

• • •YES•

•
•
...

•

•

TRIAD.,

...............

•

•

V

*'0 THIS LABEL*

v
...............
•
•
•
...............

•

:HI2'~Y Rr,f~E:

:.1:*

•

CHAIM

•

..... x:...............:
TI:810

V

~

:c~:

row~ul

...............

....• : ciftJfr' :

·................*-..
....
V.

=~~

BACKIfAIID
INTERNAL
BRANCH

UOt!RM.u

M_eH

.................•
.....
*".. ..
•

•

...

•

l-CBSit

•

•

•••

$E1- 'n~'

-NO

.

X*OPIlNO
ro •
• 'uaR ADO
VAt. Of •

~m.222.w=

• YES

................. ....
V

TCI2

..
SET
•••
.. INSTRUCTION •••• X B1 •

...............

: SE=~' TO-: :.1%.

v
.•..............
.•
...............
.. SEl lEft OP ..

:

·~DT~S~gt=

.. WITH TRIAD

:
•

·• x•••••••••••••••••.

·................

rca55

V

..

OETEIUUNE

•
•

,NDHION •
DEFOR·

•

...............

•

AMtH

•

·.......i........ ....

'tl2

•
•

SET

•••

INSTRUCTION •••• X 87 •

:.....
SE2¥Er1i~ TO:
U........ :':Z•

328

'612

• IllSlllUCTION
SEt
..
••••• 81 •
• SEQUENt£: YO.
• 19_
•
...r:-18
•
• •••

• .
..
......
..
.
:a'.." • l.EfJ.Y:Rf">.• *••••••••
..

fr.114

...

...............

Chart 54. Triad Code Generator (Page 23 of 31)

rCBIO

•

*.... •x

................

rC12S

•

.. OPERAND Of
•
.HE Xl REFRNCE

-ADDR eNTR IN •
• TASLE ((.ONT •

...DD STIlT LBL.
•
•
-REF CHAIN FRKe .... X 88 •

tCONT)

.-............... ...
................ ...

.PLAc.e CURREN'.
.V ALUE OF CODE.

................. ....
:1~8~'A TgL~HN!

TC812

-YES
•
•
FI~laDPhl:s • •••••••..•••••• x:PhFACEosrAx~l:
TO ANOTHER
•
*CNTR IN TAIADt

v .
.•.............
•

................ ....
...............

.. NO

...............

...............

••

• • •NO

V
rca.69
¥
TCll
• • • • ·"ES
•
. *................ X:.... l~a~~I'w
SET
•••
• LABEL
:...: r,*·
• . OEF INfO? .
• MtaRE S
..
. .••
• . ••

V

•

•
Cit.

•

PUI SYSTaJS 1 1 _
STQIDE

....................
...............
TeB3S

...

•
•
.PLACE OFFSET •
*'1 •• X. TO AOOR IN •
•
•
• INSTRUCTION.
•••
•
PARM TBl
•

•

SET CODE

• *••••••••

•
'NO

·
·•

T(846

COMPLEX?

• YES

YES

...............
...............

-YES

TC99

• SET UP INS1.
• •••
.PAR" TBL FOR.
•
•
RIGHT OPERAND
••••••••••••••• X. PROC OF SUB •••• X AO •
• SUBSCRIPTED? ..
.STRNG BY ARG.
• 16.

*

• •

•

•

OP

•

• •••

it

•••••••••••••••••
•
ADO 22 TO •
• CODe SELEC r •
•
• INDEX •...

...............

NO

:x ................. :
TC8356

•

•

RIGHT OPERAND
• I N STORAGE?
...

•

•

:x ................. :
•

•
.YES
• RIGHT OPERAND •

*x

REGISTER SIGN

8& ..
• 25_

•

PLUS?

*

NO

· •
..
•

TeB41

.

.· ......

TCB"'15

°YES ••••

.

•

••

•

•

• •••••••••

OPERAND TYPE

• •
•

•

•

•

*NO
STRINGS?

•

•••

•
OPERANDS

.. ...............
."
.
...............

• Cl ••• X-SELEC.T INDEX •
... •
..
TO 2
...

..............
.
*-----------* • •
................. ...

..

_NO

_'VCT"P.

• ••

RIGHT OPERAND
••••••••••••••• X.GET TEMP FOR •••• X Cl• A REGISTER? •
• RIGHT OPNO •
•
•

•••••••••

•

NO

··................
it

.•..............•
.AOO 2 TO CODE.
.SELECT INDEX.

• YES

.·

TCRItZ

.· .....
TC~3611)

•

*NO

LEFT OPERAND
A PARAMETER 7'"

•

•

•YES

•••

*x ca_
•

•

TCB36 • •

V

TC8395

•

ADD 20 TO

•

...

•

INDEX

•

•

• CODE SHECT •••• X

...

...............
......•........ ....

it

.

·

.YES
•
•

os.
•

•
...

•
...

...

...

••••
•
•

ADD 12 TO
••••••••••••••• X. CODE SELECT •••• X 80 •
•
INDEX
...
• 25.

NO

·
....

.•••••••••••••••..

TCB39

.YES

•

TCBl1

TtB40

*C6.
LEFT OPERAND
•
•
•
A REGISTER?

•

...............•
·............... ...
•

.·... .
......

:x ..................... :

LEFT OPERAND
• A PARAMETER ? •

•

•

••••••••••••••• X.ADO b TO CODE •
.SE1.ECT IND'EX •

...

•••••••••••••••

•

• NO

................
·
...
. ....
TC8365

V

•••••••••••••••

Chart 54. Triad Code Generator (Paqe 24 of 31)

...............

TC831

•
•
*ADD OfF SE T TO.
•
•
*CS ••• X.LEFT OPf.A.ANO •••• X 80 •
....
•
ADDRESS
•
• 25.

TC839'
•

•

•

V

*

...............

TCS37

••••
*• •••

RESET
•
..
•
*OS* •• X. "pARAMeTER •••• X BO •
••
.FLAG ON LEfT.
25••

•

•

OPERAND

•

25

Plll SYSTEMS MANUAL
STeDOE

...............•

TC831

••••
•
•
*SET

INST

•••

I

CT.

:80.... X: c~5~
•

~T :

..

•••••••••••••••
v
...............
•------------*
...............
*SVINSA

•

•
GENERATE
•
_INSTRUCT IONS.

•

*

*

*

*

.. .
Tt 125

-NO

FED TYPE CODe

••••

*x B8 •

19•REQUIRED?
• • •*'•••
*• •*
• YES

•

*

...............

• YES

•

F FORMAT
TYPE?

•

•

seT

•

le12
••••

•••

*.... •X 87
•
19.
• • •••

••••••••••••••• X. INSTRUCTION
-SEQ TO MStPXB.

*'

•••••••••••••••

• 'NO
•

E FORMAT

·................ ....
y

•
•

Te12

SET
•••
INSTRUCTION •••• X 81 ..

...............

..

seQ TO

..

MSCPX 12

•

•

..

*'

19.

• •••

,

......•......••. ....
................ ....
..
..

TCB36

.....
.YES
.. •
• RIGHT OPERAND •
•
SET CODE
•
•
•
................. • X.SElfCT INDEX •••• x C6 ..
*86 ..
CORE SIGN
.. . . .
PLUS?
..
TO ZERO
•
.. 24.

...

,
•

TC843

•

NO

.

•

•RIGHT OPERAND.
·NO

IN A

.

REGISTER?

,

•••••••••

• YES

TC8~4

•

•

•

.....•..........
·•••••••••••••••. ....

•

,

.YES

TC836

• RIGHT OPERANO •
•
SET CODE
•
•
•
•
REGISTER SIGN
. . . . . . . . . . . . . . . . X.SElECT INDEX •••• x (6 •
Pl.US .,
•
T02
. . . 24.

•

*

• 'NO
••

:x ••••••••••.••.•• :

...............
•
• .*.*
·...............
. ....

T.c8435

Y

TC836

•
SET CODE
•
•
•
• SELECT INDEX •••• X (6 •
..
100\
. . . 2 ....

330

Chart 54. Triad Code Generator (Page 25 of 31)

.1./1 SYSTEMS 14ANUAL

l6

STCODE

END BLOCK

ALIGN

.....

TCBTl

••••••• *.* •• * ••..

...........•..........
..

.. AL IGN CODE

..

*Al .... X* ADO CNTR TO ..
.. ..
.. FUllWQRD
..

...............
-

..

•••

V

..

..
..

.. 22.
• •••

........•......

........•......

..

..

·SVINSA
S~i:

•

•

• ADD COUN TER •

.SVI NSA

••

·SNLSIB

•

*01 ••• X.SEE fOLLOW ING.
... •
•
NOTE
•

•

ADD ENTRY PHT
IHESADA TO

*SEF FOLLOWING.

I-OLlOWING*

NOTE

.SAVe CURRENT.

v

..

.
...............
•

..

•

..------------...............
.-..............

v
...•..........•
*-------------*

..

.. OPERATOR TO •••• X A4 ..

..
..

LENGTH

...

*Cl •• X. vAL OF CODE.

-ENTRY fOR OS,-

..

..............
....
. ..-------------.
.......•........

TC860

E8~~tElRL

resoo

.CHANGE TR I AD..
OEF ADD
OPERATOR

.•..............•
....................

................
.....
:81" . . X:
:

TC820

..

PROLOGUE
OPERATOR

OPERATOR

OPERATOR

..

•

GENERATE CODe

NOTE

LIB REO AT
RUNTIME

•

·YES

GEN CDOE TO

TO COMPLETE

_

SAVE LOC CNTR
FOIt RUNTIME
OIAGNDST ICS

PROLOG CHA IN

*

I S BLOCK A

•

•

-.

PROC EDURE ?

•••••••••

*

• NO

·................

·

v

-NO

.

IS BLOCK A

o

.

PROCEDURE?

-

• •••••••••
..

. ....

••••••••V* ••••••
...

• ASSIGN CONST •
• TABLE ENTRY.
•
FOR DSA
•
*l ENGTH I CONT).

seT

TCll

••

...............

...............

•
•

•

•

INSTRUCTION . . . aX 81 •
• 19*
MS8LOK
•
• •••

SEQUENCE TO.

.. YES

...............
..
.. ....
................
V

Tt..lZ

..
SET
....
..
.. INSTRUCTION •••• X 81 ..
.. SEQUENCE TO"
.. 1 qo
..
MSENOP
..
• •••

................. ....
...............

TC874

..

V

Tell

..
SET
....
..
.. INSTRUCTION •••• X 87 ..
.. SEQUENCE TO.
• 19.
•
MSENOR
•
• •••

Chart 54a Tr1aa Code Generator (Page 26 of 31)

·............... .._.

v
·...............
.

TC862.v

•
SET
••
•
• INSTRUCTION •••• X 81 •
... 19*
• SEQUENCE TO.
•
MSPROL
•
• •••

...............

...............
•

IN STATIC

-

• STORAGE FOR •
.THI S CONSTANT.

·

v

TC 12

...

• RESERVE SPACe-

•••••••••••••••

.. SAVE CONST
• T8l PTR IN

-

•

•

...
...
...
•••• X 01 •

...............
• SLK INFO T8L"
ENTRY

•

• ••

-

331

PLJI SYSTEMS MANUAL
nCODE

L18~~RY

27

SYMBOL TABlf
OPERATOR

CAll

OPERATOR

................

...• • •

Te 825

rCB04

•••

...

*S,NlS18

..

.

• '" *--- ----------*
-A.l •• X*SfE FOLLOWING.
•

..

'"

'"

NOTE

*C1 ..

• *• •
••

..

• • " . . . . . 1= . . . . . . . . . .

•

..

*
·YES
..

PIGHl OPERAND
NULL 7

• •
•

NO

v
...............
•

TO RUNT [ME-

LI 8 Rf Q

_STaR FOP

...

TBl

.................. ....

T CBOb

*

CAll HA~f A
PARAMETE-R

..

LIST?

'"

SYMS.

SET

...

...............

••• ~ .•••••.•••• x.

•

..

IhSTIlUCTION •••• x 81 ..
.. SEQUENCE TO '"
'" 19.

..

•

M$LlBN

'"

.*..............

••••

•

ENTRY

•

.. YES

...............

...............
'"
'" ....
................
V

'"

SeT

TC.l2

....

TC 82&

V

."'OVE OED AND •

..

•
NO OF
•
.DIMENSION TO •
.SYM80l TABLE.
•
ENTRY
•

,.. INSTRUCTION •••• X 87 '"
'" SEQUENCE TO"
.. 19.
..
MSLlBC
..
• •••

••• *.* •••••••••

v
..............•
...............

,.

MOVE

• ADDRESSING
•
INfO INTO

...

•
•

• SYMBOl TABLE •
•
ENTRY
•

·................

TC821'

V

TC 12

•
....
SET
••
•
• C6 .... X. INSTRUCTION .....
81 •

...

332

Cha:rt 54.

Tr~ad

Code Generator (Page 27 of 31)

••

...

...............
•

...

SEQUENCE TO.
HSSVM

•

•'"

•

ENTRY

'"

V

TlB215

ENTRY

...

..• •••••• * .......•.

...

v ***••
••••••••••
•
• MOVE ~VMBOl •
NAME TO
*
•
.SYMBOL 1 ABLE: •

Te 12

•

RESERVf,.

.t: FORM FND Of:t
:t
.SYMBOl TASl f •••• )'

•••••••••••• *••

'NU

•

...

'"..

'"

*

.. RESEPVE. 20
..
*SYTfS Of CODE'"

ADO EN I"RY Pl

...............
...............
................ ...

•• ~ •••••••••••• X.8YTES OF CODe-STOR FOR END '"

x

... 19*
• •••

•

r~.

*.*

PLli SVSTEMS MANUAL
srCOOE

BRANCH AND

END DO
OPERATOR

LINK OPERATOR

TCBS_

•••

TeBSa

•

•

:A1*• • lEFT OPERAND
•
•
• • R.EGI<;Tf'l"

..

•••••

TCl2

••••••••••••••••

-YES

•

••••

...............

i

• ••••••••••••••• X: INsrifinON : ••• 81*.
•
•
seQ TO
•
• 19.
•

• •0

fU8LREG

•

• •••

END PROLOGUE
OPERATOR

.................... ....
TCBS2

TC 12

•
••
SET
•••
*Cl •• x* INSTRUCTION
X 87 •

•

•

.SEQ TO

*••. •
"SENDO-

...............
...............

TCB515

*vE..
•

.............. x

. .....
...

OPER4.N~l

lEFT

A TRIAl.' .,

• NO

•

LEFT OPERAND

•

LABEL ARRAY? •
• •

suBSCRIPTED

••

............... x*

.YES

•

•

•

19-

•••••••••••••••••••• ••••

•
•

seT

•

Te12

••••

•••

................. x. INSTRUCTION •••• x 87 •
•
•

•NO

seQ

TO
"SSFMAT

•
•

• 19• •••

TCB7D

•••

•• ••••••••••••••
LAST.

••

•

....................
:Dl· .. X:L~

v
...............
*-------------*
·................
·SVINSA

v
·...............
.
...............

RES SPACE I~
CODE TO
BR.ANett TO
PROLOG CODE
CHAIN

.Of ITS TRIAO •

·................ ....

...••. . • ."'0.
.

TCB57

•

V

SET
•••
••••••••••••••• x. INSTRUCTJOIII
•••• X 87 •
• SEQ TO MSCALL.
• 19.

•
•
...............

...............
·................ ....
*

•
•

Te12

•

.. vES

fCB59)(

v

TC 12

•

... ••

!.l T
•••
INSfRlJC JlQN
X 87 ..

* •.. •

• SEC T'1 ''''f"AT.

•

.SEE fOLLOWING.
•
NOTF
•

•
SET LEfT
•
-OPERAND ADOR •
*YO CODE AOOR •

• '4.X
LEf T OPERAND
'" • •
A LASH ?

OOR.

A4_

TCB59

TC8S9

cg3~R:

C

19.

Chart St. Triad Code Generator (Page 28 of 31)

••••

v

•••••••••••••••••
• SET PROLOG
•

...............
.TERM lDDR TO •

"

•

CURR CODE

ADOR CNTR

•

..

·................ ....
..............•
y

..

SET IN$TR

f'CB04

..

..

•

.PARN FOR -tALL •••• X A L •
• TO JHESADC
•
• 27 •
•
:lIB ROUT
•
• ....

29

PL/I SYSTEIIS IIANUAL

nCODe

RETURN
DPERATOR

....T';%2............. ....
...............

TC 12

•

...

SET

...

*•.• X•

*Al •• X. INSTRUCTION
.. ..
.. SEQUENCE TO.
•••

•

MSSPCR

•

..

81 ..
19-

.-.-

BEGIN 00
OPERATOR

.....•••••••••••••••. ....
:.... :............... :.1:Te8S0

•

....

*'.3- •• x*-

Te12

SET

....

..

INSTRUCTION •••• X 87 ..

SE~i~~6 TO:

DOPE VECTOR

ELEMENT

MULTlPlV
OPERAtOR

........•••........•..
TCA98

.. ..
.FORM OFst OF ..
*A5 •• X*OIM MULl W/IN*
.. ..
*DOPE VEe FOR ..

.....•.........

•••

.. RGT OPERAND ..

...............

aYES
..

..

..
..
_FORM OfST OF ..
~6AN:
.. LFT OPERANO ..

1 .....................................................-- ..................... x:gA~E"~t

...............

k~~T ,g~~~~~D
..
..

.

• NO

...............
.....•.........

TCA986
• YES

•

ARRAY A

..

PARAMETER? •
• •

..

..

SET

..

....

•

MSDVM4

•

• •••

ARRAY A
'" • PARAMETER ?

:

•

...............
• ADO OPERAND •
•
OFFSET TO •
• DOPE VECTOR •

...............
• OPE RAND ADDR •

·................
...............
V

334

•

v
·...............
.

•
ADD RIGHT
•
• OPERAND OFST •
..
TO RGT
•

seT

• ••••••••••••••• X.•

• NO

v
·...............
.

•

TC982

.YES

• NO

•
•
•

.................. ....
............... :.1:.

•

..

. . . . . . . . . . . . . . . . X* INSTRUCTION •••• X 87 •
• SEQUENCE TO.
• 19.
•

v

Tell
••••

••

•

TCl2

..

INSTRUCTION •••• X 87 •
SEQUENCE TO.
• 19.
MSDVM)
•
• •••

Chart 54. Trl.ad Code Generator (Paqe 29 of 31}

ORIGIN

•

...............
..
. ....
ii -

TCl2

............... :.1:.
•

•

:

SET

....

.

INSTRUCTION •••• X 87 •
TO:

SEi¥~~~

Te12

SET

••

..

INSTRUCTION •••• X 87 ..

SEi~~~~~

TO:

Pllt SYSTEMS MANUAL
STeOOE

]0

SeAl~eOMPlEX

DOPE VECTOR

HE ATt

STORE

OP

OPERATOR

VE

Teooo

............ .......

*Bl •• X.SElECT INDEX - ••••••••••

....•·'2.• • .
T(.A99

•••

*

•

•

TO 2

_

•

·...*_........... ....

•

T(A995

•
.NO
• RIGHT OPERAND.
ATTRIBUTE
POI NTER 1

•

••••••••••••••• x.

•

•

...............•

.....
. •
•

x:sE~~htY"5EX
•

TO ZERO

TC01

•••

:•

*01.

x

DETERMINE

•

• 19*

••••

V

•

SI GN OF

•

TC12

•
SET
••
..
• INSTRUCTION •••• X 87 •
.SEQ TO MSNULH.
• 19.

•

RESULT

•

·....•.•......... ....
.·............... ....

V

.•..............•
•

..
.vES

LEFT OPERAND
•••••••••
A PARAMETER 1 •
• NO

.•..............•

TCOl2

'"

• * *'

: •••••••••••••• X:

SET
••
•
INSTRUCTION ••••
Bl •

.SEQ TO HiSOY3.

•

•••••••••••••••..
....
:Cl' ..
....................

TC12

•

SUBSCRIPT
OPERATOR

TeDIO

••••••••••••••••
••••
•
•
•
SET CODe
•
-

HAlFWORD

VE

SCAlE erxl'l.EX
POSIT
OPER'!' DR

AT OR

..

'" VES

·...... .........

·•••••••••••••••.

v

-FOitM

y

FST OF _

*

•
SET
•••
• INSTRUCTION •••• X 87 •
.SEQ FROI4 CODE19*
.SELECT INDEX"
••••

*

...............

................

DP \, C ELEI4
• III/I .... OP VEe"

• FOR f1.iT OPND •

.

TtA993

*

·*...*•••••••••••.

Tca75

V

TC12

..
SET
•••
.. INSTRUCTION •••• X 87 •
.. 19*
"'SEQ TO MSAEXP.

..........•....
N

..

•

•••

.............. . .
......... ..... .*.. · . ..-------------.
................ *.". .................... ....

"

TtAq91t

·YES

"

Tell

•
•
*
seT
•
•
..
RIGtiT OPERAND
••••••••••••••• X. INSTRUCTION •••• X 81 "
.. PARAMETER 1 •
.SEQ TO MSSOV2.
• 19"

..

TC12

•

"

TC06

.C4 •• x.

•

Te125

.GENER 100

•••

•

TYPt: NOT

•

·...... .........

•

• •••

•••• X 88 •
•
• 19.

POSSIBLE

";,

•
AOL
• OPRNC,

IGHT

•

...... .........
•

~FSET.

TO ... l .... HT

• OPRN,_ AOOq,
;.

STORE CODE
ADDR OPRTR

•

•

·................ ....
·..............•. ....
V

TCll

"
SFT
•••
• INSTRUCTION •••• X 87 •
*SFQ TO MSSDVI.
• 19.

Chart 54

rn.ad Cc:"Ide Generator (Page 30 of 31)

.................... ....
••••....-....... ..• ••••
TC017

•

TC 12

••

SeT
•••
.C6 •• x. INSTRUCTION •••• x 87 ..
.SEQ TO IULlNE.
• 19.
•

_

335

11

Pl/I SYSTEMS MANUAL
STeDDE

TITLE

TEST UNDER

OPEIATOR

-MASK

TCGOO
~

..

..

..

:Al.* ..

.-

..

..

iE~IR7:~~~~~

....
•

..

•
..
•••

TCG50

•

:

.................

.

T~A~~~~~f

V

..

"'ADD DISP TSGN*
.. TO LEFT QP
•

.

SET

** •••• *•••• *•••

....

V

Tr

..******** •••••••.
INST~DtT ION

:

• ••

v

TO 8

•

•

*••••••••••••••

...............
.
.
...............

12

*

. .

·YES
•

IS ADORE:S,S, A
PARAMETER?

•

.. 19.
• ••

•• **.* •••• *.***

..

*SET LENGTH OF.
• STRING KOVE •

*

: ••• ~ 81*.

.. SEQUENCE TO"
..
MSTMX
..

SECOND

.·...............
· .

..

.. INSTR.UCTION •••• X 87 •
.. SEQUENCE TO"
• 19.

..

...............

.. OPERANDS AS •
•
CONSTANTS ..

Te12

.. ADOR (PAODI •

"IYNXP

.SET FIRST AND.

....

....

•••• **** •••• ***

..

•

*Cl ... X.

*

..••••***••••••••..

***.****•••*.*.

·

....................

................. x:

•NO

v

·

.PUT OISP TSGN*

.***
••••••••••••
•

~S

•

•

NO

.·.•...........•.

.

v
.* •••••••••••••

·

TeHOO

•••

..*A5.
.. ..

.....
..

..

•

•
•
...............
• OPNDtPADD+ 12).

•

•'-PUT

.

LEFT OPERAND

.. A PARAMETER?

•

*

...

v

·................
CPADO)

V

SET

•

336

MSORIP

..

•

Te12

...

*

INSTRUCTION •••• X 81 •
.. SEQUENCE TO.
'" 19•
•
MSDRIP
•
• •••

Tel2

•
SET
...
..
.. INSTRUCTION •••• X 87 •
• SEQUENCE TO.
• 19.

...............

•
•
•

•
•

................

*

·................

TO PARK 2
(PADD+21t)

V

*
..

r~~~ ~~GN:

.. AODR

01 SP TSGN*

·................ ....

·•...............
:AV8

V

•

·................

••••••••••••• •• X'..

• •••

Chart 54. Triad C-ode Generator (Pa98 3-1 of 31)

** ••••••••••••••*

...............
..
. ....
...............

• ••••*••*••••*.

'-YES

•NO

y

.PUT P ARM ADO •
.. INTO PAR" 5 •
..
IPAOO+60)
..

• ADO DISP OF •
*lb TO SE~ONO •

OR IMMEDIATE

•

.PUT DISP -16 •
••••••••••••••• X. INTO PARM 7 •
..
(PADD+IZ I
•

TC12

SET
•••
INSTRUCTION ...... x 87 ..
SEQUENCE TO.
• 1 q.
MSASST

•

• •••

·................ ....
V

•
•
•

..

TC12

SeT
....
.
INSTRUCTION
x 81 •
SEQUENCE TO
19.

* •.•
*

MSMVL
•
.* ••••••••
*••**

•

• •••

PLIf SYSTEMS MANUAL
.STOPR

•

............**••
nOPk

•••••••••••••• *

.

••
•

••
••

••

v

*

t-l.I;S OF 8TH ..
UPN-IJS

• ••

•••

•

.. *.

CO ..

•"

V

•

TO~O

-

• .*.*
• •

T03l>

*

•••••• *** •• * •••

'YfS

T028

·.
••••

.YES

*x

00 •

•

2'

TYPE

= OTHER

.. X 112 •

• 2'
..**

****

V

******** •• *.***

•
*SET

Tfl;~t

****
PfG*•
* ..
• ADD FROM
•••• X r~ ~
" ~P~NO TOKEN *
*
2'
•.****"'*****.*'It •* .. ,.-:.*
OP~NO

loIu

TU'If ..

3·

** ....

?

*

·.
••• *

*YE;)

• •r>.f.'
~

V
..................

•

••

*.**
• CONStANT • .YES
• * •
TAHLe

POI~TH

•

?

~

~

•

LL •
3.

... *

..

TO

GP~O

.,
ADOk*

~-r..lTRY

rn2 0
****
•
..

* .... X.(2

AOI..GN *
*.. -prJ"'T
AOOk
* •••
•• .,* •• *
~

..

.~

~.*4

• • , ?

.. .. • .

VS230

..X B6 ...
• • ••••
..
•
• *•••2·
·YES

~o

v

.******.* ••••• *

..

•
••
••
•••••••••••••••

.Oo

..

•• S3.X
•
• •

.SET SEARCH TO.
OOfLC.ATlNG REC, ..
TAuLE

V~OZ5

•

.

*A5 •• X.FROM REGISTER.
* .. •
TABLE
•

VS230
• •
.. •IS REG • *YES ••••
.
INHIBITED OR • •

•

•

•

•NO•

*x

86 ..

•
••••

2·

. ..

.NO

?

• • •NO •

.

...
•... •

• .X.. (2 ••

.YES

<

<

•

·..

V

•••• *•••••••• **

•..••••••••••••••..

VS230
• V• •
•
.YES ••••
•
• *x• 86 •..
> ?
• ••
..
• 2·
•*
• ••••
•••
• • •NO
•••••••••• X.• CO.•

V

•••••••••••••••
..
•
..

•
..

..

•

l->X

....
.* ••

VS22G

...
..
•••• x 85 ..

• ~EGISTER
.LAST-USE ->Y.

X

• * * .................•

SYMdg~igALLY
..
?
•

c

• ••

V
• ••
.
•

• YES

V
•••••••••••••••••••
*SRAN(;H ON n.
••
•
•••••*••••••••••

V

•••••••••••••••
••••
• •
• GET ENTRY •
•

•
• •

V

VS230
• • • • .YES ••••
•
.- *X• B6 ••
THAN
• •• GREATER
OR
TO ?
•
••
• ••••*2·
•
• •

• ••
.NIl
•IS• SELECTED
• .X••••
REGISTER
01.•
•
DOUBLE ?
•
•
• ..
• • •••

.................
O->X

...

.. NO

v
....
...
.
.
....•••••••••••••••

.
.
..A4*. •• X...

••••
.YH
••
• *X.. DO...
RgmHR
WANTED?
• •••• •
••
•
•
•

•

2.

·

v

•••••••••••••••••
.
•.• z->x
..•..
• •••••••****.* •

V

•.. ••••••••••••••..
..

..

V$?20
**.~
•

•••••••••••••••••• X. ~EGISTr~
•••• x
..
.LA~T-USE ->Y"
..
•

•••••••••••••••

..

..

• ••••••••••** ••

to

P5 •

2•

• • • '4-

·...•

V
•••••••••••••••
• BRANCH ON •
•

REGISTER

•

NUMBER

..

:tum~TUmAD:

••••••••••••••••

.. • •

•

.

•••• •
•••• •

•
.YES
• IS IT GREATER.
THAN OR EQUAL
*X 83.
•
TO ?
•

••

.... • •
•

....

NO
•
••••••••••
x.•AO
•

• 2·
••••
VS010

Chart 57.

Computational Register Assignment (Page 1 of 8)

341

PL/I SYSTEMS MANUAL
SVASGC

...• •

.

..•••

• ••

VS010 .. "

•

• ..............

.YES

•

*AO .. .. IS DOUBLe REG" ••••••••••••••••••••••••••••••••••••••••••••• •••

_

•

•

*

.. ANTED?

.•

•

. .. Ii • --YES

• OO.S
•

•

•NO•

•

kEG HAVE

.

.SYNONYIIS?
... •
....

•••••••••••••••
•
•

-..
...............

VS080

:
•••••••••••••••

-- --

•
•
•..

• -

.

.
-

....

•

IT

-

•••

•.01*••• X.BRANCH
•
••••
• •

••

..

Nu

...

.YES
.. • *
.. •• •ODES
REG HAVE
SYNONYMS?
.. •
.•
.. .. ••••
.X 00.

THAN

•••••••••••••••

IT

-

Ii

Ii
...............
•
•

•••••••••••••••

• ••
."ES
••

•
...............••

••
••

••
••
EXIT
• ................
•

IS lESS
THA'I

t.->X

.*.

Ii

,.•••••••••••••••*

·

ADJACENT • • •
.X 01 •
REG HAVE
• •• ..DOES
SYNONYMS ?
. . .. • •••••

•

••

:X ................ :

......................

•

..

VSIZ0

RfiNl:~lE

·•..•. .• -

VS230.

Ii

•

***

•_86 •

. ..

•

VS180

•••••••••••••••

...............:

:.... :

•••

.-

*X 06-

••••

*

-

•

• ,. .. x-• TE'ITAT1VfLY
.05
ASSIGN CURR •*PFG TBl ENTPY •

**•••••••••••••

•* * .

...............•

••••••••••••••••
••••
• •
• STEP OVER 2 •

•
-.•• •
.*.
•••
· - •••••••••••••••.•
VSI90

•

V••••••
• •••••• **

Ii

...
- INDICATE
*
*-*
* •
.US~Gf AS RGHT*
*C5 •• X_
AND LFT
*••. -X A3**
: ..* :HAlVEie2f O&l: •• *.*

• TENTATIVELY.

*85 •• X. ASSIGN CURR ..

..

:X .............. .

Ii

VSZ20

*

6->X

*• •• **............-

• NO

•••••••••••••••

V

VS1'10

•••• ••

-C6 ••• X-BRANCH ON X;5*

ENTPI ES

-06 .. X-

•

•

•

TABLE

IN

-

•

••••• •• **..........•

-NO

•.

.•
•

-• • . • .*.05!
_*
•
--* ..• •••

VS180

'15190

. *x••••06.•
IS REG A
• •• DOUBLE
REG? • • •
•
•
-YES

·.. ..

•

..-

...............
Ii

.VES

f~A~T n&R~a~~r

•

• NO

TO ?

_~

••

lID

V

- :*•••
•,.,.• • •
-.. -• -•...•••
*.

* *
*07*X

VSZ"O

*

•

,.

END

•

.y~~

o~

?

TABlf

• NO

-X

••

8e •
3·

••

.......... x.

A~

*

I••••
Vsrz"

V$2"0

•• STEP TO "EXT *• *••• *
- ENTRY IN
* ••• X D7*
TABLE
••...............
•* • ••• •

-.

IT

IS LESS
THAN

VS180
••••••••Ii ** •••••
••
*• •••• •
•
!'->X
* ..• x 05.
••
•* • ••• *

.............*.
Chart 57.

.•

,. NO

• - •NO

Ii

342

.

..
•

IT IS LESS

..

••

•••••••••••••••

IS LESS
THAN

. • Ii .. ,.,

StT REG
..•
•• A3-• •• X.- LAST-USE
_.
.CURRENT TRIAD-

•

Ol'l X:6-

-NO
*

-NO

Ii
...................
..

*

v
•••••••••••••••
•

VS330

• .YES .* ••

• *
'10

,.

• • • .YES
•
- .. ... .....
• •.. J~AATO~R~~i~
TO?
.. •
•

V

•

.. *

..

*

-CURRENT TRUO.
NO.
•

..

.

*.*...................
....................

.. •
.INOICATE REG
*A2 •• X. USAGE AS
SINGLE
• ..
•

X:AD~t~f~~s=~G

•*

*

•

•

• IS IT GREATER. •
•
THAN OR EQUAL
.X 03 •
•
•
TO?
•
•
".
..

••••••••••••••• X.8RANCH ON X:6.
•
•

• • •NO

BRANCH ON

Computational Register Assignment (Page 2 of 8)

• • • o oVES
••• • •
ocooX
IS IT LESS
•o.
• •THAN ? •

•••••••••••••••
:... : 9~r~5U~a :
•••
• BRANCH ON •
• •
• LAST-USE OF •
.80 •• X.
SELECTO
•

0

•••••••••••••••

0

0

0

0

0

.

0

0

.........

.. 1110

••

• ••

v

• • .VES
• •........
LESS

0

IS IT
THAN?

••

••

0

IT I S GREATER
TI

IT IS GRUTER

..... ...
~

*

..·,.0 ...
•

.. ..

'"

~¥""NYMS?

.

•YES

•

..........v"'........•
·•
.
·............... .•.
•

"t-> "

;
VS180
...............
••,. '.."
•• ••••
•
:A~: .. X:Lll~u~fb~~ y: ... ~ Pi.·
....
.

.
...............

...

:tI.:
.. x:
• * ..

UN X:3*

.~

.

••••

-

V

A~:~f~T
->

-LAn-liSE

....

· ..............
.~RANtH

~".

.

...

..-

V
•• ***••••••••••

'51.0

y*

..

o~*",

YS""O

••••

.. *•• _..lle: E

.~~

2.

..

..

in~~TED

LASt-USE

......•..v "'....
.: ...................
.
..

•

..

•

:e~4':C" 01'1 H1:

•••••••••••••••

.

l~Sl-USE

..
• '"

.. • ,.

V~lb •

1S II f:IIUA"
TO 1

.

• '"

-

.-...

,. • •
'X CO.
• '" •

.yES

*
-NO

..

..
•

•

... ..

IS IT

TItA,.. 3R

.*

tE~S

TO?

.

_..

.-

.X f

-.

*

""
fltn-

..

r •

*

VS,,,I\.

*YfS ••••

.
*

E~Al

• • •fIIO

..

""

-NIl

. ¥ • ,.

1". . . . . . . . 1..

..

................

_..

.
•

*-

• ............**

YSl9G

*

ADJACP1T .•

pc~w~

LAf"T-'tt;f

•

• "YES. ••••
*
,. ,. - . .•
•*
. •.. •IS THAN
IT &r • ••
1
2·
.. ..
'Y ...
•
.• .. ,. •
**.*
•••••••••••••••
..

.

..

.........•.....
USE

v
...............
•
•

..

V

·.-.

ktlu r.-k'V-r

'"

................
. .•..
:
: ... :
.................. .... .....t-.••••

• *x AO"•

ADJ.

DOES

a

..

,

. . r>...

........

. . . ..

•••

•
........... X.•
0".
• •

....

·
·•

V

..••

. . . . . . . . . . . . . . '1' ..

11 15 lESS

..

lKAI't-

I

•

-> ..

..

..... * ••••••••••

v
•••• *..........
.
..
•..

3 ->

~

•
*.*
•* ••• ,.x A=**

•..
••
" •••• :«$ •• ***",:,.,.

344

Chart 57.

• *** *

...~

..
It

~

~...
•

...

tt-••• )(",

.. "•
.c
......

;
............
.
..

$-

"ST-U~f
"'$"

....

Computational Register Assignment (Page 4 of 8}

J~t'~

..**
•

_> Y* ••• ~

* ......

..*

~.

reo

..$"'",s:.2'

1-

Pl/I SYSTEMS MANUAL
SVASGC

......
.

..*BO

**"

*...
.....
..

VS290

.....

•• ** •• *****••••
ENTER

X.

..

.CO ••• X.DETER SYNONYM.

*' ..

"

•••• *••••••••••

..

.. •
•

·

.

•

"

• ••• *••••••••••

.... REMOVE
.... '" *** ..
.. • •••••••••••••• X*REG-ADOR
AND "' ••• x C4*

.YES

IDENTIFIER
ATTRIBUTE 1

•••••••••••••••"

•

..

... • ...

• CONTENT S OF ..
..
REG
..

••

.

TYPE

*.****.* •••••••

v
•..•••••••••••••••
OETi-****:t.*~~o;.*",

•NO

:x •..•.•......••.. :

*

v

..

. *" ..... '" ......

.YES

< ?

*

*

*
*

*

Nu

Ii

••
***••• *• ..,*....
*VS380
AO.

**------6------*
GIoN STORE
..
..
IkTO TEMP •
*
***.*.*******
••*

: X ................... 4o . . . . . .

:

Ii

*********** .. ***
*VS290
BO*
*------5------*

:

Ri~8~EK~lNS

: .......... ~ ....... X:*

••• ********* •• -**..

348·

Chart 5-7.

>;

run~*

tXIT,

FPEE

.*.*****.*.**~*

..

..***."'*.*"''''$**

NL

.

Rf"'nvJ:.

*SYNO~V~S
..
D EG

..

*.* ••••• ******.

SINGL< htb ?

•

**********.:t-.***
______
*

AO*

*------6------·*..

.. GENERATE
• STORE INTO
..
TEMP

..

• *NU

•

V

********.**.***

.

•

*-------------*
.. SET pnlNTER ..
-TO SPFCIFtFD :(
•**** •••••• * •••••

•****** ••••• *.**•

..
·YES
RIGHT HALF OF
* ............................................ .
uBl kE:G 1

***************
*SVR5VN
..

**-----------*
SFT POINTEP ..
*TO SPECIFIED ..

.t:XAM SPI:C REG.

*

Computational Register Assignment (Page 8 of 8)

PLII

SYST~S

NANVAL

1110.1

............... •
•

••• "
•"cou
••• • ..

$VCLR
•
••
••••••••••••••• •

•

..•

..
.• .. •

VALUE GIVEN
FOR OSA

•

*c~~¥~~IER?

•.

·

•••••••••••••••

"NO

.

••••••••••••••• x.• USE OLD DSA ..*
'PEG CO .. TENTS •

.**
• ••••••••••••*

• YES

·• x••••••••••••••••••••••••••••••••.
Ii

••••••••••••••••
'MOVE INITIAL.•

REGISTER

:• ~~m~JBL mo :•

TABLE
INITIALIZATION

•••••••••••••••

• ••
·NO
.. •........
INITIAlIZATION 1

•
••

••

•

.

.•

• • •YES

·

Ii

•••••••••••••••

.
.**••••••••••••.

·
..

SET BASE

•

•

REG"

..

.VAlUE FOR OSA •••••••••••••••• X.
•

.*** •••••••••••
HIT

****.*.** •• ****

...

•

Ii
................

•

..

•

•

GET FREE'
SPA(.C FOR
TAblE

••
*

•

*
..
•••••••••••••••

Ii

•••••••••••••••

*
'S.T

INIT PTRS**
• FOf< ENTIRE ..
'TAbLE. FIXEO •

'f.4M 1

.. .. •

0

.*

PREPARE,.

40CO'l PEG.
4095( 0,
PE~MAi'jE"'T
REGl

•
•
•

*•

• •••••••••••• **

.. *x••••
• eo ••
.....
't.

'"YeS

IS A;JOR A

•

:x ................ :
v
............... .

•
•
•
•

.....••• *•••••••••••.
•

..

..

• . . . . . . . . . . . . . . . .tc

•••••••••••••••
.....
* ..

•

~EG

•

•.x ..........................................................
v
..•
.Sb •• X*4SSMBdj 3se

GET ~OCON

..

41

CONSTRCT

V

•••••••••••••••
*.SVASGA
_____________..t

11** ..... *.**** ••

..

~c

~0076

*TO !)R.OPR. \fA!.. ..

VD060

. * • ..

NO

**a~ .. •• X.*------5------·
BTSTRP REG.

•

••••• • 800n~Rap ? OFF • .." .......
..
• .. .. .
...
•

• •..••••.• 04·

••••***
•** 'ID~~~.**.i
.VD400
DO.
••••

.

,. • • • • .YES

VOO75

.** •• ~.i ••. **~*
.vo~.o
C2*
*------5------*

~D1~~

..•.......*........*•

***

:

~~!T§P/I~

.. .~* ..
: ... ! ~6:

• NO

VCC/,3

•••
. .

·......
*S8 ..

..

.

•

..

•
....
... NG
......

V0230

.

*.* •

~

.••••.*
..

... e

_,<*

".It

iii'

~;)Ob~

:hart 59.

Storage

Add~ess

Assemb:er (Page 2 of 5)

351

VD015

VCJ.40

,,*

1)"*$**:1<*.**
.... *":01IIv$VASGA

* *
**

* REGISTER *
****1f.$.*~*.,***.¥*

*' *~-----. .·,---.,.._ttr
~lO' •• X*
GET AO'ON •

*
*

1.'

* * •Nt;

• *****

V

VO()8J

***¥****."'**.**

*.«
'I"

",.",**;c.*-\'I:••

**
*

LGCTE ELK

W/~ATChiNI.:J

•*SET

:F7S

*.SLK
USE: ceE iN
iNFO TBL ~
l":""*** ••********

**'>'))1**"********

i'
****u**.fr=_**"".

'j

':F OS/I
•
pur NTEk
.. wITHIN The

*

*
*
DJSPL *
'
•*.AIH:.A·JF ,. 40Q5
*

·

'"
...

*

*

b..\t.

... '*************

*

* IS

..

USA POINTE"
<4096?

..

*-

*.t,VA:5':;'A

¥ . . . . . . . . . . . ~ ... , ••

----- ---*..
x**----GE 1 ADCON
::<

*

f\EGIsrI:R

V
**",***",****,***>:0.

*-----5------*
• FiND BEST *

*

'*

*-

***;<1<******_***'"

•

KEG)

.-

...

'***~
* .AN-fA
REG!
*
*****~**.'J;*

•

• GEr-tEKATE:L ..
l\< REG f
JSAPTR *
.. iADCC.,.,. AREA '*

~

:"A

'*40~5tI)1I;:DCO'"
*
REG

*

v

·

~[-I\,ERt,TE

**"'*.*.*",**;rr.~'*

****"'****¥.****
*VD30G
BO.
CO'vE:k REG

V

.. :;.**
•***********
•
*

*.t**>l<**********

*

*'

.

****'***""~.**.~'*'"

.YES

AlIOF, CF

~ml\!o~EG:

UDCGN ,CONTI

**.f,.,****.**** ...
*CCHPUTE ADDR *

'*

*
*

foIE'."", TABLE*

•

""

lI"1<***********"'*

*

•

•

.

.• •
. ...
•

;/O:C5

*NO

IS OSA PH

AODR

**** *

*X A/:!*

<8190 ?

..YES
*** *'
*......
-1<
~ ...... )::~ 49:
>;,**
~'Dt

•

•*

*VE: S

NONE

*

.• ••....
VD140

•

.•

•

ox Co**

•••

10

"

*"'*-¥~.***.*¥*lI<*

*
*
.. ** ~
.~~D!CpTc )$4 1<
*~5 •.• X*D~SE & :ISPl *
*~
* JR a IN REG '*
••
*TABLE 'CONTi *
.*"*~'i'*¥.****"'*

NL

• •
*

v

o***********.***•

OYES

•

0

BOOTSTRAP?

••

•*

*

•

* ........ .

'*

•

*

ENTRY FUR.

GIVEN

Q.~G

*0 ................. x

*

•
0
*************~*

•

NO

V0050

*YES 4"'*'"
* *x• B5 •*
OATA DISPl >
4096 ?
* 2*
****
•
¥***
*- J!f,U
*
*
X* 131'- *
.0

....... 0

0

...

•

2'

****
VOOI-Q

NO 900TSTRAP

VOl05

V

***************
*VD400
00*
'" * *------5------*
*A8* •• x*
~TSTRP xEG *
**

* *
**

.. TO PRuP VAL *
*
'"
***************

:x .•... 0.......... 0:
VOllO
..

** '"

***************

*'"

*A9* • • x*

* ..
**

352

V

GENERAT~

REG..

L

* OSAPOINTER
*
(REb)

....

* *** *
* •• oX B5*
'"

*
***************

Chart 59.

>I<

***

*

Storage Address Assembler (Page 3 of 5)
-~

-,,~

SVDSAC

..
.....
. .. . .
...... .. * .

VD190.

. ..

.

IS ASSMBLD
8SE REG A
PERM REG?

*60 -

* ..

..

*YES*

•••• *** ••••••••

.. .. •••••••••••••• X.USE
...

*NO

-

....

. ***..

SAME REG ..... X 62"

*
..
..
..
.*.***** ••• ***.

..

*.*

..

v

***********.***

*SVASGA
..
*-----------*
• GH ADeON ..
.. REGISTeR
..

...**************v

VOZ30

* * . .***************..

***

.. ..

.. ..
.. GEN: L REG *
*hZ* •• X*DISPI6ASEITO ..
.. ..
.. LOAD PARA ..
**
*•••• *ADDR
•• __ ••• *••..

.

v

*$VASGA

..

***..**********.****..

v

..

***.***********

***************
lR AOCON"*
.REG,CDE COVER.. AN ADCON
-

*MAKK REG TSl ..

.._GEN:

***************

: •• ~ii~!i=~***:

.. ENTRY AS
.. eU~TNG THE
- PARAM ADDR

VD175

V

..
•

••••••••• * •••••
***..
..
..
..
.. seT REG NO
..

VDC63

****
..
..

....
0
*..
•• *..
.. ***.2*
****** ••• ******

*84 •• X" AND DISP OF •••• X 68 _
..

.**************

*-~-----------*
*C2
ASSIGN REG
AN *
.. • •• X._ ADeON
..

v

***************.
..SUPPLY
AoeON •
-REG AND 01 SP ..
• Of 0 AS FINAL"
.ASSEMBLD ADO ***************

v

.... exn
-..
•• *•• *****....... ****.*.********

Chart 59.

Storage Address Assembler (Page 4 of 5)

353

.*.- .- ..•••...•...... ·•

....• •• ••••••••••••••• •
VD300

VD400

*80 x*
* ••
•** ••••••••••••••• •
t.",TER

*00

•

x.

• •*

•••

....

.

..

lNEXT J

.. PREPARE; 1.4 •
.. REG 4095ff'l
•

•

ENiRY IN

..

*

• AOCO'l REG TBl"

••••••• ** ••••• **•

.•••...

..
•

*.•..•..••
x*
.*C2 ...

. ..

•••••

I:' U.I·

•••••••••••••••

.t>j' ••

..
.. t*

PlA(,.t

•

*

PRFPARr
""STR I~ ' •
•
COOF

•••••••••••••••

•

•••••••••••••••

v

•

•

•

'"

VE::,

.
• uISP

RFGJ

v
•••••••••••••••
•
•

V0440

•

•

~

v

••
.. ** ...........
• u.tl

.

.••••..•.•......
·..................

x:"""."""""".,,,, •••
~

FNT~R

••••••••••••••• •

• •••••••••••• x·•

·

f

..

•

EXII "W

. •••••••••••••••
'lEE OED

8l::1w~

<40Qb

-...............
..

• ............... *
~aOTSUA.

*STf P SA,)"

..

40QIt

~'\'

•

111

••• ***.*.*****.*•

• 1110

..

• ..

•*

.•

. *NO
.......... i
.

~Mlbu~ ~~?

..
?

1.) Nhl

"A,~t

fIIIIlTHIPIt 40Q-=

..

OF DE5Jtq""'"
AOOQ"

•

• YES

.

•
..-••••SAVE*••••••••••
OIF AS ..
..
POTE .. n
•
OUTPUT
..
...•••••••••••••••
..

v

**.***** ....
••.. •••
uPOA' E
~t"

•
T8t EI'tTR"
"
.wJTH \lFw BA<.,I-*

•*.***** ••• *.*:011•

:lC. ................. :

··

,

v

••••••••• ****••

.

.~TEP

..

-..
..

*..

iu NEXT ..

fNTRY

•• *********** ...
EX I T

..

••••• * •••••••••

.

-

,

Of fABL f

..

.

.-NO

* ....... :

.. YE:'

.
•

~~~

~tu

?

•

-YES
FOUND
••••••••••••• X

•

•

-

..

,~

..

REG GLOP

OR SYMB
ASSIGNED?

·"u..
•

•••••• -"',..* ....
•••. ...•.••• X·*

• •
•

NO

·

y ••

.

.. It""" •• """"".-.""" •••• ,,",,",,,, ... ,," " ...

.••••••••• •••••*. V
••••• *.*;fI:*
~ ••

..

•

354

Chart 59.

fXlt~l

fuUNf

..

..

Storage Address Assembler (Page 5 of 5)

EX IT

BOOTSTKl\~

NEfOEJ
• *****.lIr**.*.'"
~.

Pl/l SYSTEMS MANUAL
$VGT"'

.*•••••••••••••

•
• ••••••••••••••• •
•..

$V&TMP

..

.

it
................
.

..
,.
..

RESET
LANOlUATE
VALUE

• ••

•
•
..

.............*.
•

·

•

v
.... *...........
.

..

.. GET

'~NT~Y

•

..

"URI\t:~T.

•

...

.*.

..

IN TEMP* ••• X BO.

TAbLE

•

(S-TA~Lt)"

***.*** ••• **•••

..

• ••
'YES
*. • • • •
.. * .......•...•...••......
•.SOU
END OF?TA8LE
.
•••• • •
• • ••
• NO

•

•

.

. ..
.. • TEMP AT• ·NO•
I~

REQUESTED
lEVEL ?

• ..

•

• .. ..YES•

.........

.. v ..

.

VT060

. •• AS• ANY FREE .NO. .X••••AO. •
.. TEMP FOUND 1 .. • 2·
•.
.. • ••••
.. YES

·· . ..

VT050
it
.NO
.. IS LAST-USE •
•• •
..
UPDATE
•
OF
• ••••••• X.L2 •• X. LAST-USE NR •
•• ..
• OF ASSIGNED ..
• TEMP(CURRENT •
••••
..
TE~P
•
.TRIAD NO.1.
..

*

:.*.

..................

•

" • •YES

................
•.
•
it

it
•. ••••••••••••••
.•
SUPPLY
•.C[lkE-ADDK
OF •
TEMP
FOR
•• OUTPUT •.
•••••••••••••••

*

.

bRANCH Oil
lEIIGrH OF
• HHP:LENGTH ..
DESIRED
*

•

..................
v

.. ..
*

.•

.. •

..

•.

.. .

. *x..

.

••
•• •••••••••••••••
• "' .. HIT
•••••• *••• •
**~

*YES

1

z

*

• • ••••••• x

. • •.
.. NO
it

it

HH

< ?

,. * •

.

••

:***••••••*.**:

VTO,O

.

*.* •
C2*

*.*

.. NU

>

.. ..

ii

.....
.. **.*****If ~

* KfTAI,.. TEMJJ
*TBl ENT.Y AS

.
>1=

.
'"
•
•

.. NOllJATE
..•*...C****.******.

:x ................ :
ii

********
•••• ***..
*

PkEVIOUS'
.. *** •
.ENTkY IN TEMP* ••• X dO.

"G~T

..

TABLE:

..

..••••• *••••••• "'.*

Chart 60.

..

.**

•

Temporary Storage Management (Page 1 of 2)

355

PL/I SYSTEMS MANUAL

$VGTMP

....•••••••••••••••.

VT~~~••• *••••••• *

.....

*

• •
• CkEATE ~Ew ..
• AO •• X.ENTRY IN TeM~.
.. ..
..
LIST
•

:co; •• x:GETc~aC~~~ON :
.SELECTEO AREA.
, •

v
** •••••••••••••

v
.•••••••••••••••
.. BRANCH ON •

...•••••••••••••••.-

.....** •••******•••..*
•.. LOCATE CUIIR ••
*(;NTRY IN BLI( •
• INfO TaL
•••••••••••••••••..

••

.. v ..

.. •• flMST
6LK
. •PRuGRAII
.. .. •NO

.

·

• LENGTH OF •
• TEMP NEEDED •

.

**.* •••• ** •••••

••••••••• ****••..
• • YES
...USE
...•
BASE AREA.
•
•
••••••••••••••• X: 0~T3l:!!C : ... ~ CO:
~F
•
...................
••

.. ..
•

.. .

...

• ..

• •..

v

• ..

=4 ?

.. ..

• •NO

-8,l6,32

. .. ..NO ..

.

• ........

..
.. ..

v
• .. ..
..
•

.. ..

.YES

•• ***.*********
*YES

:

-255

.

v

..•••••••••••••••••

·

• USE LENGTH OF.

•

256

•

••• *••••••••• **..

:x ................ :

·...*••

v

****.*.****

...

••ALlGN

•

COUNTER.
• TO FULL WORD •
.*******.*.*.*.

..

....••••••••v** •••••*..
..

..

ASSIGN

*C.7* •• x* LOCATION TO •

* •
**

* TEMP LIST *
*
*.*.********
•• **

v

.

••••• *••••••
..•***ASSIGN
REQ *
.lEVEL TO TE.MP.
•• **** •• **** •••.

·
•

LIST

•

~

VT050

**.***.* •• *••••
*
.***
.STEP
COUNTER.*
* •
• BY AMT OF •••• X C2 •
•
• 1.
• TEMP REQ

* *.*.*.*.****.*
••

356

Chart 60.

:

.*** •

.. * ..........•... X.ALIGN COUNTER •••• X C7*
..
• TO DBLWORD.
..
•
..
...**************..
***

.***

Temporary Storage Management (Page 2 of 2)

Pl/l ~YSTEMS MANUAL
$VINSA

•

v

..

,~al

INSIK AIliU

•

TRaMU

•OC1 •..

••• •

Oaf GtN REG 0 •

..

•

0

0

•••••••••••••••

v
•••••••••••••••

0

0

• Artu SVMu RtC, •

•
o

OPCDt T8l
&ICUNTl

>

•

.. •

•
•

TAtiLE:;
..
................

•••••••••••••••

v
•••••••••••••••
• T uP llHJL.•

it
.................

•

• •........

0

?

0

:mG~~J:YI~m

•

'NO
IS SECONU
OPNO TO 8E
o USED IN A RtG •
0

it

• !:IYMnuLl( LdL ..

o

0

0

o YES

V

*

•
•

•
• VtS

it

••

•••••••••••••••
•o MODIfY MACti ••

•••••••••••••••

•
•••••••••••••••••

•••••••••••••••••

v
•••••••••••••••

."

••

• H.t)i;.

"
•

•
HOOIFK,
..
..
SC.K.TCI1
..
• ::.IUKAt..£ A!ao~'H.

••

•

..

•
••

lL

•

h..UhT)

•

•

•

v

V

·.
.
.....
.
•••••••••••••••

••••••••••••••••
..
• ••••••••••••••
L4 •• x*
UN •

*NU

•o

*

••

0

•

..

~KA~LH

.uP-(uUE TVPr ..

YE;

v

••••••••••••••••
*v I-uk UbL fLr.•
)~L

:X •••••.•••••••••• :

• Bt MUDIF lEO 1

•••••••••••••••

.,.'10' fk

>UP-COOt Ttl MR'
FORMAT
•
o

VNOU'l'l

UPCUL

~HOULU

.uPCOt:. MtJOlfK •
•

•

it

0
u!:J,b lKlJ T .... V ..

H5tIfl., ~t:T

HRK INTO
LUMI'ONENT
PARTS

•o••••••••••••••*
.AULJ

..

"UDlf~

..

ru*

... ,x
•••••••••••••••

*

~HT/LONG

= ~R

..

·. .

·YfS ••••

UJJ-(.(lIJE TYPe

'MACH UPCUE FR.
•
fIX/FlT.
•

• I-L T A'fU' Ft<. ..
PT UPKAT ..

0

it

••

•••••••••••••••
•
•

0
..

L.LtA",

VNOO40
'0'

•o AllUW ASGMT 0•

0
0

•••••••••••••••

•
•

0

0

•••••••••••••••
o
0

Uf •

LuI"

~YMdULl(.

•

0

it

•••••••••••••••••
•
•

•
VN0740
• • • 'YES ••••
••
•
•.CO'X
• • IS OPERATION ox 81 •
10. *
•o. • * ~ PSEUOo-OP I • •• •••
• .. • •
o Ne

••••••••••••••••
• •••
•
.STEP POINTER'
'Soo •• X'TU NEXT SYMH •
INSTR
•
•••••••••••••••••••

•• •••••••••••••••
••
.VI"'~A
• •••••••••••••••
•

?

•••••••••••••••

.X 1'\1 •

...

7•

*>e= ••

•

•

NLI

:x .................. :
v

V

"NOul0

•••••••••••••••
UBJ •
*~ET

•••••••••••••••••
• it· ..
T u.,NCJ •

ORI~

• I,.ut. &. LST~G ..
• 10 LUlU< VAL ..
•
.. Ut- (..tJE LUI,.
..

LTK

•

I<.,)

................

*1S. PA~AM NlllV ..
"INfu TO FI Xu •
•
AREA~ "'TO
..

..

•••••••••••••••

uP-(UtJt: TVPt

= KX

• •~
•

*

•

I::. ll!>IIl'tu
t"'AdLt:.O?
•

.

•••••••••

•

•• if·

...............

*INfD TO Flxu.
ARtA!, PTO"

•

•••

•

uP-CODE TYPl
II"

.***

:.................. :
VNOU'::~

~

•••••••••••••••
14UVl: !aoYMIi.

•••
•
.. •
•
• A~ •• X.

•
..
•••

IN~Tk TO
~IXeU AR~A

•

•

• ••

•

•••• K 80.
..
..
• ••

.AtliU I)R;' li~TU.
..
LUMP PAkT.

.................

Chart 61.

Instruction Assembler (Page 1 of 32)

357

'LII SYSTEMS MANUAL
IVINSA

RR INSTRS

•
•••••••••••••••
•••••••••••••••
• • • .NO
.VN0570
AI.
.VN0635
Cl •
•••
•
• •• • IS OPNO -1 A • ••••••••••••••• X..-----28------.
.-----21------.
.81
PROCESS OPNO •••••••••••••••••• X.
PROCESS OPNO.
SYM8
REG
1
•
1
.
•
-2
..
••••• • •
•
•
•
•••••••••••••••
•••••••••••••••••
•• •••
• YES
•
••

v

v
VNOO80
• ••
•
•REG RtG .'40
• ·X••••
•
2
87·
•• 1 ?
• •

• • YES •*•
IS IT
YB • ·X• A6·•
• •• A.SIGN.O
1
• • •••••
••
• • •NO•
V

• ••

..
..

• ••
-YES

ilPNO -2
REG AOOR IN
USE AS SYM8
I~

REG?

•• ••
• NO

•

..

•

••

...............
*SVASGC
•

*-------------*

V
*...•••••••••••••••
.
VN0060

.. ..
.A~~lGN REG AS.
*S5* •• X* UPNO -l'S ..
.. •
•
~YM8 REG
..

....•••••••••••••••.

.VN0635

Cl.

•

....•••••••••••••••..
••

-2

•

••••
•*86*"
•••••

•

••

VNOOlO
.'Yt:~

••••

• +X• Bl •..

••
•
• ••

•• •••3·

V
•••••••••••••••*

.*..

•

V
•••••••••••••••
• VN0510
A1.

•

INSTK
EFFECT = LOAO
POSlTIV. ?
I~

NU

VN0080

• -----28------.

••••
• •
.GEN RK INST:

•

•

*

•

•

•

3.

• PROCESS OPNO ••••••••••••• 87 •• X.OP OPNDI REG •••• x AO •
-1.

•••••••••••••••••

358

Chart 61.

•

•

IJPN02 REG.

*

•

REG
...
..
••
• •••
•••••••••••••••

...............

................

¥NOOoO
• ••

••••••••••••••• )(. OBTAIN COMP •••• X 85-

v

••

.••..•••

•••••••••• X. 86.

•••••••••••••••••••
• USE OPNO -2 •
..
REG
•
•
•

•.Ab ..••• X.+-----21------PROCESS OPNO.

•
• • •YES•

•••••••••••••••••••• ••••

Instruction Assembler (Page 2 of 32)

•••••

~/I

$Y$J~~S

"A"UAl

$Vl"SA

.••••
. .

.

••••••••••••••••

.AU •• X"
• ..
•

BRAN~H

t~f~CT

ON

RR LOAD
NEGATIVE
EFFECT

•
•

~ODt

••••••••••••••••••••

*

•Eft-t:L.T

COOt:

~TWU:

VN0020

• •........••"1.
• •

Nu tF-ftCT;

..

...
...

*YE~

•

1

..

•

..

..

*

VN0140

"

••••
•
POSITIVE
*X
(.21
•
• • •

~~~cLI

LUAD

~UUl

•

•

·YI:.)
= ..

...

*

•NIJ

VN0130

··

*

tt-I-t.l.. T l.UOE:
LuAu Nt:&ATIV't:

1

•

• ox••••
Lt·•
• ••••
•

'YES

•NU

CHANG~

VN0140

.*..

*

•

'YES

REG TYPf

••

•

••

ADCO~

• * ••••••••

?

• • •NO

V

*MVE SYNS AND ..
RESLT fROM •
'OPND-2 REG TO'
'OPND-l ICONT)'

REG fYPE

.'C2' •• X'

.'

•

•••••••••••••••

...............
••
••

•

. . . . .•••••••••••••••*'

$-----------*
:
GENHihO :

;

•

•*Ol*X
• *

SIGN'
•••••••••• C1 •• X_ OF OPNO -1 ..
•* ...
REG
•

v

: X ••••••

•

•••••••••••••••

•
•

IS LISTING
ENA~LED 1

INSTRS

VNO!2~

VN0130

•

•••••••••••••••
*$VLlST
•
•

.. .•

....
..
.....•••••••••••••••.

'NU

• *YES

• NU

"

•

RR DESTROY
EffeCT

0

0

0

0

0

0

0

0

••

•

COMP

•••••••••••••••

00:

VNOO25

••••
(ill LOL or
NEXT SYM" • ••• *x A9 ••
•• ••••
• I'
••• II'ISTR
•••••••••••••••

V

.*-------------*
..............•
V

·

••••••••••••••••
RtG
•
SVN CHAIN •
••• fROM
OPNO-l •
•••••• ** •••••••••
R~MOVE

·.VRSYN

••
•*• fOLlOWIN&
NOTE
*••••••••
** •••••
S~E

VNOZ60

VNul25

••

• .oX••••
01 •
•
•
•
•
•••
•
·VE:S

lGNS
Of HNUNYMS

Chart 61.

•••• •
*

•••••5'•

o oX

AI

Instruction Assembler (Page 3 of 32)

359

Pl/l SYSTEMS MANUAL
$V INSA

DIVlut

MPY EFHU

..

.. .. *-------------*
*Ai • .ox.
kEMVI:.
..
•

•

••••••*••••••••..
**Cl *•• X*COMP
.START AT fRST'
REG T8l •

.....

.*...•••••••••••••••.

~YNS.

I:::¥EN REG

*.*..•••••••••••••••..
•

VN0260

•••••••••••••••..
•*' *. .. *-------------*
*$VRSYN
*SI •• X*REMV SYN FROM*
*' .. ..

•• ************.
·$VK~YN

.....

VN0385

v!;ul£Q

***

RR EffECT
PURGES ALL
SYNONYMS

E~FECT

fKM t:VN K':u ..

•

•

•

•

ENTRY

..•

• ••** •••• ** ••••

:X ••••••••••••••••
VN0280

. .
Kt~-I

**
*
*
• *x••
C5 ..
•••••.l*

*YE:~

Yl"'t

FLUAI!NI.:I

I

*

*

*

*

*

*

t-!xt.u

•

*

v

u:J;E,*

..•
..

..

..
..

~t.v

..

V
•• *.** •••••••••

...

VNO~89

..** ......... *****..

•

A5~

l&NT TO
OUl) KeG

..
•

..
..

***

CUMt-i t?

eYES

IVi~I4~f~R?

...............

eYES

•

....

..

•••

...

•

...............
.•.•. ••.............. ..•••••••••••••••. ...
o

.. ..
: ••• ~ 44:

..

•

NU

..

•

•

OClo .. X. GET SYNONYM •

:AI ••• X:Kl~~lu~~~2j!

..

.•

v

•••••••••••••••

..

•• •
• YES
V

VN0220

•o •••••••••••••••
•

REMOVE

•

oCONSTANT NODEo
o fROM SYNaN

•

•
•

LI ST

•••••••••••••••

••
t~ ••

••••
VN0280

:x ................ :

...•••••••••••••••....
V

.. .. ..

....•••••••••••••••..

:C5: •• X: LomfiN~~XT :

• V• •
• • END
••

·NO

OF LIST?

..

•

• ••••••••
o

eYES

....

...

•••••••••• X. C5 •
•
3•

••••
VN0280

Chart 61.

Instruction Assembler (Page 5 of 32)

361

PL/I SYSTEMS MANUAL

6

SVINSA

KX INSTKS

VN0310

•
.0.
• •• ..

0

IS OPNO 1 A
SYMBOLIC
AlltoN REG 1

.Hl •

•••••• o
•

••

•

•

•
•

•

..

•

• ••.••••• X

•

8UNCH ON •
EFFEC T CODE •

0

•

••
• •YES

• •
....

.YES

....
•

.01 •• X.

v
• •

0

·YES

cnOE
:lOAD POS,
LOAD NEG,
• DESTROY 1 •

•

•Nn•

•

..............
.
..
11

•

ASS IGN THE
••••••••••••••• X.ADCON REG AS
• THE OPNIl 1
•
SVMB REG

•
•
•
•••• X 81 •
•
•
3.
•
• •••

.............. .

0
0

• • EFFECT
MULTIPLY
••

C~DE

1

••• *

• ox• Al ••
70
•••••

V0

VN0020

••••

VN0340

•EFfFCT

·NO

I S l>j~RE AN •
AIlCON REG IN
TSl THAT CONT •
*OPND 2 VAL 1*

•

..

* ....... .

0

INSTRUCT

0

VNOHO

YES

·LOAO· 1

0

•

0

• •
••
I~

.....
. .. ..•••••••••••••••..
.....•••••••••••••••..

• -NO

VN0120

••••
" *X•• At •"
*.*.

ons
a

~O

0

*

0
oNO

• NU

:x ............................ :
V

V

VN0315

*----28------.

o

1

"YES

.fFECT CODF
DIVIDo ?

.. PItOCESS OPNO.
•

VN0385

•

•••••••••••••••
AI0

• VN0570

0

0

•••••••••••••••

*

.*••

*x0"

B1

•

-

*

4"

••••

• ~O

VN0320

•••

;,

VND400

•••••••••••••••
*VN0640
A'.

EFFECT CUDE
STJRE ?

.....•••••••••••••••..
..

....

l.

..

*

..

1 KEG

...
* ....

..

8AS.t:)

..

V

..•••••••••••••••
..
*GEN: UP OPND"
• UlSP(INDEX,"

•••••••••••••••

*

*

• .. *----29------.
OB~ •• X> PROCES~ OPNUO

• ••

-

•
NJ

• •

VNOHO

..
..
X 01..
..

*

• *x••••
* •
• •*••81*8.

.YES

VN0260

'YES

*

EFFECT enOlPURGF ?

•

•

**.* 0
* C1
.X

•"•••

40

0

"

"

• ... 0

0

•• •

EFffCT C,10E
NO EFFECT

0

•

••

VNOOZQ
*VfS

•

*.*.
*x0" 81 ""
3"

.*.*

" ~n

VN0160

*•••
EFfECT C-lOE
CHANGE SIGN

362

Chart 61.

Instruction Assembler (Page 6 of 32)

• "

•
•••• 5t

• • X Al

PLII SYSTEMS MtNUAl
SVINSA

P.X LOIoU

ffHCT

.
......
.. .
................

VN0345

••••• *•••••••••

••

UI •• X.BRAN('H ON REG.

•

•

..

TYPe

*.*.

•

..

•••••••••••••••
• PUT DPNO -Z.

• • YES
<

rYPt = MeON
?

*

*

••

•

<

•

• .NO
•••
•.Cl •• • EFFECT = LOAD •
•••• • • • NEG 1 • •
•• ••
• YES

VNOJ"O

",OKEN IN SASE<

.. •••• •••• ••• ••• x*

VALUE: Of-

• OPNO-I REG

..

..

TBL EN

y

VNOOZO

••••
<

•••••••••••••••••••
CHANGE OPND •
•• -1
REG SIG" •
••••••••••••••••
•

•

•••• X 81 ..

<
..

•• e. ••••• * ••••••

<

.........

3.

• •••

• NO

: x•••••••••••••••• :

y

•
•
• • • • .YES
.,,1)
•
,)fCT
•
* *••..•••.
OPNU -I =
*
..............
x • _lREAnv
• •* IDENTIFIER
?
* A RfG AOIlR 1
*
•
•
•
*
• •
*•••
• • *NO •
*••••••••••
YES
x.• cs * ..
•••••3'
VN02S0
VN0350

ODES

TY~t:

.a:

c..OI1P

~AYr

0

0

v
.........
**••***..
*$VM.!IIVN
.----------*
*• fKOM
KEI'VE SYNS •
OPNU-I •

• ••

•••••••••••••••••

*

••

........ .......... ....
"

•

.. USE DPNO -2"

..

..

• •••

...............

..

••••• ........ ••• xt
rOKt:N FOit ..... x B7 ..
"ESTABLISHING.
•
d.
..

.. *
YE~

.. ..
..

..

•

3·

SYNO~YM

..

0

••

••

V
*

CO~ST

0

OP"O -1
CONSTANT

••

••

*

0

••
••

OPNO -1
TRIAD 1

••

•••••••••• x. L5 ..

0

*

* NO

V

VIII02S0

0

• .YES
*
.ns ••••
OOfS
• .X• C5 •
• ••••••••••••• x •ALREADY
HAV.
•
A
REG
AilOR?
1
•
• • 3·
•
•
* ••••

• • •YES

0

•

• ~a

V

.

VNozao

•IS• SIGIII

• *x••••
C5 •
3.
*
• • ••••

*NO

*

0

YN02aQ

*

OF
REG NE~AT rYE

.YfS

•

....

• .X• C'5 •
• • 3' •

0

*

.*••

•*
NO

••••
VN0280
• •

VN02~O

*

•

•

•A REG AODK 1 •
• • •NO *

UO~S TRIAD
ALREADY HAVE

.YES ••••
•

_ ,_ _ _ _ ..L

,.. ...

"T" _ _ ..L ___ ..

_.L.'! __

'1'\ _ _ _ _

1-., __

,,, ___

TRlAD

"7

_.s:!

•*

VII/02S0

. ....
: ••• :

..
•••••••••••••••
•

C5

•• •••3'

. ....

V
................
.

:P~~oR~MDy~

ox*

..

~"'\

•

C5*.

3.

V

.

V~02S0

•..••••••• ** ••••••• ..•••• ..
X

*PUT R[G AOOR ••••
•
IN CONST
•
•

C5 •

•
• ••••3'
•••••••••••••••

·••••••••••••••.. ....
·•
.. ....
•

V

VN02~O

.PUT REG AIlUR'
•
•
• ANIl Sirolll IN •••• X C5 •

•

Dler

...

3.

••••••••••••••

363

PllI SYSTEMS MANUAL
$VINSA

~x

STORE
EFfECT

...• • • •

VN0400

-tn ..

•••••

*

**

•

•

*

•

• *x••••
•
A4*
•••• •

*YES

OPNll-l =
IDI:NTlF lER ?

•

•

.. NO

•
•*

• *YtS
..

OPNu-l =

*

CUNSTANT ?

••

••
•

•••••••••••••••
•
•
..

.CONS iCLJ( REG"

•

If A.NY

IN

*ADOR IN CONST.

NQ

'Ne;
T~J

•

AU

* ......... ..

••

.. YFS

v

.*..** ••********.*..
* .. •
.*..
.
..

..

** •••••••••
****
Kl:lJ AOUH *

*KEl

Hotu ALh.lK,.
l~ ANY, IN
•
ulCT ILuNT) *

*rIGN IN

••

uler"

............... _ ..

*

.. REt.. SGI'! IN
..
ulef

..

*;(E:b

AUUK

ANI) •

$'

*******.*.*.*.*

• • • • • • • • • )$; . . . . . . .

V

.. If ANV;CLR

..
O' • • • • • • • • • •

..

..

:). .... " ...................... " . :
..

B~.X

*.

WAS

..

THtKE

KtG AUUR ?

*

A

."'u•

*............. .

•

.. YES

.................
V

VN0440

*Kt::MOVE; OPr;O-2*

................
..

..

..

FROM $YN.

..

LIST FUK

•

bl VtN fU:G

•

·• x •••••••••••••••••.

...• •
·.

VN0480

*i:n •

•

.. *

•

.

·. .

.YE:) ••••

UPND -l.
Tt'rN IN
.. t-Uk UPNlJ-l
..

K!::G

Cl •
1.

•• **

••• ****.**** •••

\O~D 3,,5

*

•

* ... x 1...1 •
•
"
1*
•
**.-.

*••••••••••• **.

Chart 61.

•

•••• X 65 •

•••••••••••••••

*
OPNU-l=
?

•••

*Rt:T kEG ADOR"

••••••••••••••• x.

Instruction Assembler (Page 8 of 32)

• ••

•

Plil SYSTEN5 NANUAl
$VINSA

RS.~1

...• • •

VN0500.

*AI.

• •
•••

•

•

INST"S

••

5S INSTRS

VM0560
••••••••••••••••••••

• .YES

• * ...••...

:'1*
..••: ~rll£U
g~=8:
• •
-Z DATE
•

IS MACHINE OP
• Alo ~ 1 INSTR 7 •

••

• • •NO

••

••••••••••••••••••••

VNOJIO

v

v

•••••••••••••••
AI.

•••••••••••••••
-VN0640
AI •

• VNO,,40

·----Z9-----.

.-----29-----.
.PROCESS OPND ..
-1
..

.PkOI.ESS uPNO -

..

-2

..

•••••••••••••••••

•...............•

• ••

................

• • • • • YES
OPNU

•

PAkM

-I A

• •
• NO

••

•

•

it

••••••••••••••••
••
•

•

•
USE VAlU. •
••••••••••••••••• 8.ING PASSED •
•
•
IN PARM
-

.RESTORE OPND •
-2 DATA
•

·

•••••••••••••••••

·

•••••••••••••••-

.

• X••••••••••••••••••••••••••••••••

v

it

••••••••••••••••
•
• USE OPI'oD -1 •
-AS IMHklJlATE VALUE
_
•
•••••••••••••••••
it

..•••••••••••••••..
• olSP
..
.
...............

•.VNOS62
••••••••••••••
81.

·-----27-----.
.TEST FOR DOPE.
VECTOR
•••••••••••••••••
••

....
....

it

VNOa20

•••••••••••••••
.VN0640
AI.

• GENERAT., OP.
•
•
18ASEI •••• X 81 •
..
VAlUt
..
.. 3-

Chart 61.

Instruction

VN0020

•• ••••••••••••••• ••••
.----29------.
•
GEN:OP
•
•
•
:PfWCE~S OPND : ••• •••••••••••••• X:O!f~~l~~~~!H : ••• = 8~ ••
•
2.
.OISP218ASE 21.
• •••
•••••••••••••••
•••••••••••••••

ARRpmhl~r

(P~n~

q

nf

~?\

365

PL/I SYSTEMS MANUAL

l(

SVINSA

••••
•-toox
•• •

PSEUDO-OPS.

VNu140
••••••••••••••••
••••
•
_
_
BkANCH-ON .HI •• X.
•
..
..

PSEUDIl-OP

•

••••••••••••••••••••

.

•

·
•

· -•
= LMQ

.... .

•• •
• NO
••

•·
·
..

•

.

•

....

ox Al •
• II.

VN0920

. .. ..

.Yf~

PSEUDO-UP
CUOI: = SOG 1

• ..

•

•• •
• NO

••••

....

'X AI •
• 13.

•
• *Yi:!:t ••••
• • PSI:UDLI-OP ••
*x. bl •..

-• •
CODE

.

•

•

··

.. •

•

•• •
.. NO
••

•

?

..

*

• • •
.. *! 13*"
.***

•

*

•
•

••••

· • • . ....

• • 01 •..
*,1(

.. 13·

XFR 1

..

• •

•

P~tuuu-tJP

KCl, ReS?

*
*

•

..

....

••
*X Ai •..
.. 14·

·

•

•

• ••

.

• •

....
• · .

*
•

*x

UoU ..

.. 14·

••• *

Chart 61.

=

•*

·....••••.

*

*x C1 ..
.. 14-

*

•••

0:

..

2~.
••••

V"I150"

*YFS ••••

psrUULl-f1P

COilE =

?

• *x• Al •..

f~1 ~

..

.. 21·

*•••

•>;u
VNI6~n

*YfS ••••

..

* *x•

p SlUO<)-flp

c()n~
..

=

•· *

H~l8

•

?..

AI"
.. '4 •

(I:

••••

* •411

V"IJlH40

.·
*Vf-S

·

PS[lH'"!,)-I1P

CfJl)t-

KH?

*....
*x• AI *..
• 7ft.
**"'*

*.* •

*x*

*

til ..

.. 76*

•• t •

Vhl370

••••

••

.Y~~

•

= C;vk
:(I<

·

*)(

?

*

•

H6

*

#;

26·

***.

'h..

· ..*.*.

·. .
.. ....
..

.***

• •

P~[LJ:l'J-fJr

.. CPDf

*vtC;

.;. .... C I •

.X HI ..

.*.*

• In.

.. 21".

Nf)

••••
PSEUDO-UP
*x• Cl •..
.. 20.
COUE = OOH ?
•
• ••••

....

.. NO

...

....

• ••••••••• x*

00.

•••• •
•••• •
Instruction Assembler (Page 10 of 32)

.*• ..•

V~101'1

vNllQ(l

•

..

••••

* •~()

....

• *x• Al •..
.. ;70.
• ••••
*

= II N?

VNr)C,bl

.YE~

.. *x. 81 .. ..

tOO 1"

.. 19 •

?

PS~~Uu-uP

• •

NO
..
••••••••••
x*. .LO.

366

..

VNl , .. "

.

23.

V~1420

PSEuo~-np

.. (OOF

*VfS ••••

• eliot:

CI

......*(,

• *Y1::5

•

PSeUDU-OP
• CUUI: = RKI ?

•

..

RFI8 1"

= Rf:M

*

V~1330

P~tUDLI-tlP

•

•

.. *x**.*
.. 81 . ..

• YES

•*

.. (..uUE

....

·Y~S

• Nd

PSUUu-op
kKK?"

•
i'lL!

.* ••

·

•

•

.. .X.. .. *

VN132 )

*'tt5

tuot:

.

..

>;0

PSEUOu-OP

• NU

•

V

•

• >;u

VN0950

l.UOI: = KCW.

••

*YES

=

..

BOr?"

•
!

•

.. 11•

•

•

*

.

=

.. 16.

***.
PSEUOLl-OP
*x• Al •..
.. lq*
COut = F 16 ?
•
• ••••
• .. •NU

.. CUDE

PSEUOO-OP

CODE

•

ADU ?

•

·YES ••••

*

..

P~fUOLl-UP

•

VN1410

.YES ••••

VNllOO

.. .X••••
.. Al

VN1l50
••
*YFS ***.
• *x• Al •..

• CODE •

• NU

•

• • •NO

•

·..

••

.• .....
• .YES

VNlllO
·Y~~

PStUOO-OP

.. (.UOI; a:

•

.X CI •
• 15.

•

CODE = De....?

VNI090

.YES •••

.YES ••••

=

•

CU~~E~O~A~~

•

••••

*

....

• • r~.·
•

• •~

'10

•• •

..

VNI03u

P~EUOO-OP

•

VNI020

••••

...
.
.. ....

••

•• •
• NO

.. •
..
•

• •

·W

PSEUDO-UP
• COOE
SIX 1

NLI

- .•
.. ..

.. 13·

LUG?

•

• "YES

..cg~~u~oL2PI ..

•

*

•

•

•

.YES ••••

1

•

VN1015
• • • • ·YES ....
•
••
•
•.DO.X
• • PSEUDO-OP ••
.X 86 ••
•••• • CODE
• • = RM?• • •• •••14*
•

• • •NO

VN0150

PSI:UOO-O~

• COOl:

• • NO
•

• ••

•

CODE

•
VN09b5
• • • • • YES ••••
•
••
•
oX 01 ••
.. • 14•
••••
•
•

PSf Ulld-,)P
(('lIE

= ......

•• X Ah ..

.. 76*
*.*.

Pl/l SYSTEMS IIANUAL

11

SVINSA

lM~

lOI V

o
VN0755

lI~DHO

••

•••••••••••••••
••••
•
'* .. ..
CUOE •
S~T

C~

.Al •• x. TO 'LO' AS

'*

UP COt MOO

•

'*••• '*

'*
•

•

VN0770

•

IS UPNO -Z IN
A R~"?
•

"UUIFI~O ~y ..

o

•••••••••••••••

•• ••
• YES

o

*----28-----.

MODIFY OP

•

'Cl' •• X' CODE TO RR
•
•
•
fORMAT

•
•

•

....•••••••••••••••.

................

•••••••••••••••••

•

...
...

• •o

VNoazo

*x•

•
• 06-•

•

OPkOnSS OPND •
•
-1
•

t. EfH,r TO •

• LOAU'

Ats*

•••• •

VN0790

•••••••••••••••
'VN0570
AI'

*Tu OP 1.0t liDO'
..

*x

....•••••••••••••••.

••

v

v

••••••••••••••••
•
*!:tt:T REG TYPE •
•

•••• •

•• ••
• NO

_

·Yt:S ••••

• • •

ox,~.

FlUAIINu PT?
t

•

•NU

o

o

•

WiV

• •NO

VNOa30

?

••••

• • UG NR ? = ODU ••
•
••
• ••

..

•NO

-

....

..

v

VN075~

V

V

•
ATTEMPT TO •
•*------------*
'FREt, ODD REG •
•••••••••••••••••

•

YN0755
-NO

•

••••
*x• 81.
•••• •

V

VNDOaO

••••••••••••••••
• •• ••• •
e
AUJ
U~E

•

k~G"

• TO uPNu -1 •••• X 87 •
• ~~~ AS OPNO.
.. 2.
..

-2 ki:b

•

•••••••••••••••

•

• •••

0

•

*

VN08M

•••• •
•••• •

OX ,a-

•

*

'YES

• * ..•.....

FRtE

•• •
• NO

NOT FRH

••

V
•*VNOI)70
••••••••••••••
A1*

VNOOlO

YN0790

•

• IS OPNu IN • .X••••
•
ClREl.?
•
•
•
•
•••
••

..

••

..

*-----?R------*

VN0759

..

•••

....•••••••••••••••. ...

..

••••••• •• , *06* •• X. PROt OP~U-l ..... X 84.. ..
_fDOUBlE KEG)"
..
•

NOT FREE

-.l

A

o

• • VES
•
•

~RI£

••

*YES

•

••
• NO

·
•

o

•••••••••••••••••

•••••••••••••••
'SVFREE

.. ytS

VNOroO

•••••••••••••••
'SVfRH
0

.-------------*

••••••••••••••• X. ATTEMPT TO •
'FRFE fVE~ REG.

• NO

'YES ••••
••••••••••••••••
••• ••• X_MODIFV
•
••
• 'X• AO •• .Bltt
U., CDt:lZ.
KR
FURMAT
•
'TO
• •
••• • •
••••••••••••••••
• • ••••

I; OPNU -I A
~YMl:iULll RE:G

•

v
• ••
•
.YES
•

VN0020

I, ItE6 AOJ TO' 0
_
ox 81 •
OPNu -1 REl.
• UPNU -2 REG ?.. ..
3-

o

•

•

•

1.

..

*

• •••

••
••

• • • • eYES

VN0055

•

• Nu

V

V

••••••••••••••••
'lOB HAl. FOR •
•
•
•

•••••••••••••••
••-GENERATE:
LR •

OUO~U REG
•
A~WI)ITlUN •

:000 R~~~ EVEN:

•
•
...............

VN0710

V

•••••••••••••••

•• •••••••••••••••

•••••••••••••••

••
.V~0570
Al*
•
•
.. •
*----28-----.
*CHNbE Otl'NU -1*
*AH* •• X.PkOL.t.!lS UPNu •••••••••••••••••• X-REG PNTR ANO
•
••
-1"
• AOOR TO ADJ.
....

..

•••••••••••••••

•

REG

VN0320

••••
•

* ... •,1(
•

• ••••••••••••••

d~

b*

• •••

VNoa05
•••

..
..

V

•• ••••••••••••••
MkK PR Of
•

•
•
• RFGS AS DBl •
*C8 •• X.
USGE;
*'
•
•
*SY"SOLICALLY.
•••
*'
ASSGD
•

•••••••••••••••

V
...............

••

•

VNOOZO

••••

CLf:AR
•
•
•
• CONTENTS Of •••• x 81 •
• SOTH REG Tel.
•
3.
•
ENTRIES
•
• •••

•••••••••••••••

Chart 61.

Instruction Assembler (Page 11 of 32)

367

Pl/l SY>TEMS IIANUAl

12

'VINSA

••••
•
•••••••••••••••
• • NO
.NO
••
*VN0640
AI •
• ••••••••••••• x •IS OPND-Z IN • •••••••••••CO •••
• x.------29------PROCESS
•
uPND -1 A
•
•
•
•
OPND-2
•
SYHbOLIL REG? •
• • AUG?
•
•
•••
•
•••••••••••••••
• ••
••
.. YES
.•••
..
•••••••••• X. 87•••• •

VN08JO

•••
•·AU ••
• •

...

..

••

• ..

I~

•

...

Yl:~

YN0880

• ••
I, OPNU-Z IN
A REI> 1

·.

V

•.VN0570
••••••••••••••
AI.

• NO

• ••

• •
• •••••••••••••• • X.$-----28------*
PkOC OPND-l * •.. x to ..
•
IOBl REGI
•
••••••••••••••••• • ••• •
•

VN0340

••••••••••••••••• ••••
.GEN' l OPNDI.
•
•
: ~~&1 g~~g~. : ... ! A~

••

•

KE';'.l2

•

•••••••••••••••

• •••

.. 'tl:!)

VNOb 70

..

..

*

1~

.YES

u~~o-l

•

Kc~

IN USC
.. -,>YMul.ILH.ALLY
•

•

?

•

•

*

*

••• •

•

•NU

*

*••• •

• X 66.

•

*

•••••••••••••••

*SYfREE
•
.------------*
*

'YE~

•

IS uj)NU-,l Kt.U.
••••••••••••••• X. ATTEMPT TO
.FMt:t: [VN A.EG •
~K ULlU?
..

•

•

•

•••••••••••••••
•

* *
NU

v
*-------------*
... ATTEM"'T TU •

0

••

*

•••••••••••••••...
·~Vf--IH;.E

.................

••

• fREt. UUU kt:b ...

•

•••••••••••••••..

• YES.

*_

fREE

•• • •

0
oGEN'lR OPNDZ •
••••••••• :C4: •• X:I1I10N •

v

E:.!)~

-INSTR CONTROl •••• X A9 •
10

•

•••••••••••••••••

0

V

••••

VN0020

•••••••••••••••
•o CHANGE CORE.• •*••• 0
•
ADDR OF
•••• X BI •
:OP~~RIN~~~~T:
: •• lo
•••••••••••••••

VNU~10

.-----Lts-----·
..
PKlh..
•
uPNO-l

*TO NEW INSTR.

INTO TEIIP

•

•••••••••••••••
Al.
..

...............

•

FLAI"
..
••••••••••••••••
•

VN0025

••o••••••••••••••
• •• ••• 0
UPDATE SYMB.

.-----------.
• GEN STORE 0

UUL Rl:::b •

•

•

V

•••••••••••••••
• 'VSAVE
•

..

•••••••••••••••••

v

•••••••••••••••
•
A1 •
VNOb~O

• ----1.9-----.
o
PKOU,S
•
•
IJPNU-l
0
o
0

•••••••••••••••

V

VN0330

••••••••••••••••
• •• ••• 0
• GokN: Of OPN010

:1t~~I O~~~A2 : ••• ~ U! ••
••••••••••••••••• ••••
I

Chart 61.

Instruction Assembler (Page 13 of 32)

369

PlIl SYSTEMS MANUAl

lit

JVINSA

.....•••••••••••••••.
VN09t:.0

.. ..
..
GET REG
..
*SO •• X' ASSIGNED TO •

KRI

* •

* CCMP REG 0 •
*.*..•••••••••••••••
.

..

•••

*

•

REHUVE

..

•• **•••••••••••

•••••••••••••••••

v

...............
v

••••• ** •••••• **
..

':'1.::1

RI::~ULf

TYPt:: AS

.. l.LMPlEX IN

•..

*..

..

..

.. t:"t~ KEG
••••••••••
** •••..

000 REG

..

"

Kl..::'

• ................ ..

?

•

·
..

*

.

Ii

*****"'~**):****.f'

RfMOVE
SYMBOLIC
*
*'* ••••• * ••••••••

••
•

HE")rT LdNC. ..<
PPEt tHT IN $.

•

Rt::SUL T TYPE

••

..

..

·

*uSAGE f-LAG UN.
l)l)[J RE G
•

••• ** •• ** ........ .

*........ .

•Yf'S

• ••• *•• **.* ••••

••

*Slr,."LE USAbt: ..

•

'NU

*

v

•..

MARK dOTi-<
RI:13S A::'

.

*

•

..

•

•••••• ** •••••••

•..

REMOVE
SYNONYMS

•

*

•••••• **0 •••••••..

................
•
•

GET RtG
ASSGNO TO

.SYMB COMP RFG*

.------------**

*** .............

>NU

•

Ii

..

..
!)YMBOlIC
..
'USAGE FLAG ON'

..

.*. .

..

••••
*•••• ***.* ••
·$VR~YN

•

ReMOVE

• ..
..
.01 •• X.

GET REG
•
*C1 •• X' ASSIGkED TO •
•
•
.SYMI:i CDMP KEG.
•••
..
0
..

•

SYNONYMS

• • • •• •••• *•• **** •• **

••••
•
..
•

*------------*

..

VN09b5

VN09b2

•••••••••••••••
*SVRSYN
•

*;)YMH CGMP H.t:b.
..
0
..

•..

................•
................

v

VNU'I50

•••••••••••••••
..***..
* .. vcT ktG ....
*Al •• X. ASSI&N~O ro ..

.
*

** •••• *********

.. Yf::::,

·

v
•• ***** ••••••• *

.
•
•
...............
.. Kt::.tT LUNG

: x •••• ............. :

...............
..
..

.. *.* ..

•

..

v
•• * •••• **** ••• *

·

v

..

..

..

lbl

ENTKY

•

•

•

***

•• *•• ***.******

ACIi

.SYNU""YM~

.
•

"'kO,",.

.. eVEN TLl UDIJ •

•

..

A TT

•

*LlE:Ak UUD Ri:G* ••• X :)6.

.. Pkt:4... till IN ..
'" KE~UL T lYPE ..

REG

•

*****.***** •• **
*

*........ .

.

YF 5

:x .................. :

·•
·

* * ....... .

kl..L ?

•

v

.•
.

·

• **.***** •• ****

'NO

RM

:0:

CLEAR (YEN

T U1J\jI; PI- I-l-**RIT 1'1 I:'
f-(

..x ...................... ...

·

..*• . *.*.* ••*.. *•

.

V

VNO':ldO

.;

•••••••• ** •••••

•

..

..

*A7 ••• x.lN IKIAu ANU •
• •• * • lA.)f-U~t:
IN •
Rtl.,
..

*

..

v

*pur kEu
•

!)l~N

..

ReSULTS.

*

..

..

S 16N fLU W" •

*u7* •• X. SAVE

*

..*.......
•

•

..

.

*********

*** ** •••••

..

*"1FS~Aur

rllU~lTr;.

•
.*****<.. ~- ':*0:-**>:<

• •
*ca*x
• •

*KlltYE: SYMBULIC.

..*

•

.**

• ••• *.******** *

••• **.***1:***:(..*
..*
*:*'(.
(~H)k.

*** ..

..

INTL \...uRt _ . . . . . . . . . . . . . . I:Hi •• x*
USui:: FLG5.
•
..
•
.FROM ALL Kl::u~.
TRIAD"
•••
.wHI(.H ICUNT) •

. ..........*...
*

..

~tT

fROM rVPI:
•••• X lIl*
.MA~K. ur IKIAU.
*

••• *.*** .. *** •••

·.......•..••.*..

IINOSoHO

~

.PuT KtG ADDk •

*.

..

*

...
•...•
. •.

·

*

v

.

***************
PtST·\q
Co
* CUMPIlArIU/',J ¥

*YES
GI:::NEtl.ATtD •
COL (IVRlAPPEO
*x 07*
Cl)MP [LE R
TABLES 1

• •

HA~

..
•

*

MnPISPl\rF

WITH

..

~

******* ********

.. Nu

v

v

•••••• *.***••• *

KKk

••

t-lAIJt: Bt:t:N

..

ASSIGNt-D

•

*
* *
*SYMBOLI'AlLY * ••• x CH*
•

••• * ••••••••••• *•
370

Chart 61.

•

.*'"

•

• .... *** •• ** •• **

•

·
•

•••• *.***.* ••••

Instruction Assembler (Paae 14 of 32)

I:

VN098C

* * *** ..
* ••• x /17*

cl,..(PII-X*

XIT

*.****#*~******

•

*~

*

..

15

Pl/l SYSHMS MANUAL
fVINSA

LX

SIX

.....
.... .X:•••••••••••••••
..
... . ..... • • •••••••••••••••
. •..••••••••••••••...
.....•••••••••••••••.. ... ....

.....
.. .. .•••••••••••••••...
.....•••••••••••••••..
VNI020

VNI030

••

'BI •• X. SET UP CODE •

..

..

..

TO l

:(,1._

..

SET

•

OP~O-2
RE~?

[S

A

•

[N

••••••••••••• X

• • •NO

..

• •

•

• ..

.
..

VUINT OATA 7

•

USE OPNO-2
REG

VNOB05

. .*.. •• ..

....

•••• X C8 •

..

. . . . 11.

•••••••••••••••

•••••••••••••••..

• ••••.•••••••••• x...

·NO

.. .. *** ..

~lT kEG ACQ * ••• X SA.
.FLAG TO FIXEO"
..
..

~LOAIINb

•

U~

•

V

..•

2ND AODK ..
INCtt. TO 4
..

..

v
•••••••••••••••••••
• GEN: OP RE6 •
OISP (BASEl'
••• ••••••••••••••
•

•••••••••••••••
..
..

*j:ij* . . X*!)ET

..

• *x••••
•
•**83••

.. YES

v
....................
....
....•••••••••••••••..

.. .. ..

TYPE

KEGIS TER ?

••

•

..••••••••••••• **..

*.*

.. YES

.**** ••••• **** •..

• NU

..

Dbl Pkt:C

•

•

v

•***.***.*** •••••
RESLJL T liS
..
COMPLfX
•
•••••••••••••••••
totARI<

Pt-(.,

. .

..

.rrs

• ............

IS AO'l,< i\

PARA¥ETI-Il?
",. '>JU

•

..

At.

.-----2q~-----*

*Dl* •• X* PRot QPNI) -2.

'NO

RIGHT

•

*VN0640

: ••• ~ 83:

•

•

'YES

T3 P SIODE

..

•••

..** ............. ...

..

.

*YFS

.. MOD OP CODE"
..
..
. . . . . . . . . . . . . . . . . X_fOR S('l. PkEC* .... X BA*..
Flf PT
..
..
..

IS 4D.'-{ A

StJt-lSC""I"T ?

•

*.*

* ••••••• Y

•

.. YES

v

V

••••••••••••••••
..
"UOlfY UP
*•

• •• " ** ••• **.***

••
..
CdMPUTL

·................
• cuut
•

t-OR OBl

*'

·

PR~C FLT PT •

..

•.SeT

*'

v

••••••••••••• **
·~VtJSAC
..
*-------------*

•

•
•
...............
•

.

*t-*********** ••

.*••••••v*.*.*.*•

*

••

)1'1l) ..

AOn~

2ND ADLJR •
INCK. TO d
•

'"
A.SSI::M1l r
'"
*COVEf.lF d \OUt{ ..

•

•

**.****C<~*****'"

.

.

.1.. • • • • • • • • • • • • • • • • •

•

••

••••••••v** •••••

..

*VN0510

•

v

*********1«*****

..

..

•

...............

*HS* .. X*

..

Al.

*-----.,!8------*

....

Pt{uLI:::$S

UPi'4tJ-l

•

..... ,l( 01*
..

..

***

..

""

.. .j,FN:

*

liP pte;"

•'*lIISP-·\I{
+1

.

n';l-)

V'~(}33(l::

****
..
.. .o.
••

*.o •• XOl* ••

. .*.*

'*

..

6*

• •• **********.*

v

.****",cn**.*****
J.\jllXl) *
..
•
•."'F:TAIN
*DSPtC'1f\JT AN[l ...... .o • • .o • • •

* (O~PlJTt ?Nf) *'
•
I "Jft{
..
**.* •• * ********

Chart 61.

Instruction Assembler (Page 15 of 32)

171

PLII SYSTEMS MANUAL
SVINSA

_.*.••••••••••••••••
_._.
..
VNllOO

• •
-btl ~YMBOL'C •
• AI •• At LAdEL tABLe.
.. •
•
tNlkY
•

•••••••••••••••

....

. ...
• •

. ..

·YES

•
•
. . . AS RE~ 8EL" •
.SI'X
LAST l5b
•
•
.. SYlES OF 3RO •
••
PG OF CODe 1.

•

•

·

.

v

•••••••••••••••
tlI,Jft\ Ul:.f
((.. UH.i\ LUt.

•
III

,.

,.

I.rtO 1,..10
T AHll:

III

•

•
•
•••••••••••••••

~~)

Tht.Kt

•• •

•

•••••••••••••••

.

v

oCOMPUTE OISP
'ANI} IlASE FUH
• COllE COVER
•
AutUN

·

v
•••••••••••••••

..
*
•••••••••••••••..
.~

•
•
•
•

·
•

..

•••••••••••••••

• Nu

•

•• GEN:

•

• •••••••••••••••

AR~A

dY 4

·'Vn~AC

••

L ADCUN •
• REG CODe WV •
• IN 1ST UP LOC
•
1
•

.. • •
•

•

·•.•••...•

*x

Al*

NO

v
.. ...............
...............
..

372

Chart 61.

I:XII

Instruction Assemb.1er (Page 16 of 32)

PLII SYSTEIIS IIANUAI.

11

eVINSA

AOU

•
• • • • .NO
•••••••••••••••
•
•
•
••
ARRAY AOOR •
• !lAKE ARRAY •
• • • ISIN GEN?REG
0 •••••••••••••••• X:su:~~Rip~I~EG:
••• •• •
•
• 12
•
• ••
•••••••••••••••

VN1I50

••••••••••••••••
••••
•
•
• SET
ACII •
R~G

OAI •• XO

•

fl~S

.SIN~lE,

•

TO

"81'~

•

fiXED.

••••...............•

• YES

v
••••••••••••••••
••
•
IN'"BIT
•
Uf GEN.
HoE!" 0
•
•••••••••••••••••
•

•• •

v
•••••••••••••••••
•
MAKE
•

AS;~HT

• •• •

•••••••••••••••

•

NO

•••
••••85-•
••

• • • • • • • • • • )1:.

VN1270

•
•

••

••••• •
U CO •
• IS •
••••

••

•
* ••••••••

•

YES

•

•YES

v
•••••••••••••••••••
•
GEI": lCR
•
kl,RI
•••••••••••••••••
••

•

• *Vi:S •••
• • -IIIN A RtG ? •• .X•• 81.••
••
• •••
••
• IS

•

AIUdS(.k I PI • *X
18.
?
• ••••
•
•
•
·NU

N<~ATl V~

0

•

V

0

•YES

·•••
..

.-.

V
VNl160
••••••••••••••••••• ••••

•..••..........•

-86 ••• X* GfN: UP Rl ••••• x 85 _
•
••
R2
•
- 18-

••••

VN1210

•••••••••••••••
• ••••••
••• SET SUBSCI

v *•••••
••*.......

••

ASSEM"lE AuDM
flit( AKRAY
AOOR lUPND-ll

•
•
................

V

Chart 61.

.op

• PUT AOUK-iU:b •
• ADD~ IN Ttl.IAU.

. . ... . ..••• ****.**=•••••.... .. *** .
......
.. ..
... .. .
•••••••••• ** •••

374

··

...

·A· •••• X ti4*

V

.**.*.******.**

V

.. .....
.• .. •••..

•.. ••••••••••••••

••

CODE:.

=

'S' •••• X 64 •

•• •• ** ••••• *••••

'1.-.jv020

*.*.

•.PUT AUUN ~ES"'*
*
. t THO PTR IN •••• x l'l •
• HEG T&l ENT"
• 3.
• FOM MlS REG"
*.* •

...............

Instruction Assembler (Page 18 of 32)

GfN:

l

~2

f<

<.

$

':<

•

...

. ..*

•

1, "" ••• x C4.

....

•••••• * ** *****

• •• * •••••••••••

.;

*AH* •• X*UP CUOt

•

I.tEG -) •

• H.Z t 'IEII' I- ..

•
•
•••••••••••••••

I,) ~LJd.)(.k 1 PT
NEGA TJ Vt ?

•

GET

v *••••
••••••••••

v

•

•

••

•••••••••••••••

** •• **.****.
••••Ntw
R1:&-'> •
..
ki:

•

'COMPUTATIONAL'
•
REG
•

..
..

*SVASGC

Pl/l SYSTEMS MANUAL

19

SVINSA

RFIB

....
:Bl •.. X:

VNU30

VIIIUlO

•••

••••••••••••••••

•OAI • •• XOASSlblII
.-------------*
AULON •
•
•
•
•
••••••••••••••••••••

•

KtG~

0..

•

0

INITIALIZE

•

MEFEMEIIICES

Sm~lior

.

.:.................X:.•

•••••••••••••••

.'~ASGA

••••••••••••••

0

•

0

•

•••••••••••••••

USE CURRENT'

~g~ h~CFe~D :
BRANCHES

v
.................

•

utJHU\.

o

••• ••••••••••••••
•
CO'lPTE AOOR •

",or.o •

• ('UUl:., Ula,

..

*AULW< .. cui IN.
•
lU INHK
0
•
~PALE
•

• •••••••••••••• x.IN CODe COVR •

•••••••••••••••

o

•
•

V

••••••••••••••••

• fllVOl: L."'K TO
• tlKI:: V k(:f

..
:

1~1

0

•••••••••••••••

uno.

lN~'

SPCl~~~, ~t

•••••••••••••••

•••••••••••••••

YES

v
•••••••••••••••
O.VOSAC
•

VN0020
• •••

v

-•••••••••••••••.

*-------------*
•
ASSM AODR •
.FOR CUKK LOC *

• •
•••• x B1 •
:

OADCON TSl FnR*
-ADCON (CUNT I •

•

: •• ~*

.WHICH cnVFRS •

HIE GUK~ ENT •

-

L '-Ie
•
••••••••••••••••
•

•••••••••••••••
•

0

v
•••••••••••••••
•
•

.-.......... ....

• R~FEKENCES ••
•••••••••••••••

•

V

('

.USE: DISPL tlF *
• CURRE-NT lnc
*AS 01 SPl FUR'

•
GtT ENTKY •
• FKOM LJ ST OF •

*'
• ••••••• ** ......

•

Be INSf

•

:x ..........•.•..•

••

VNoon:

•

..

•••• •
END
LIST ? • ox•
* 3'
••
• ••••
•
•••
-us

~F

~1

v
••••••••••••••••
•
..

FNT~Y

..

R~FERENG~~

•

GET

• ... lto,.. LIST nF •
•

•*•••••••••••••••

~o

.x ••••••••••••••••

v

V~OC20:

••••••••••••••••
•••
LINK TO •
•
• "'[Xl ~""TRY •
•••••• *••••••••••

....

*Yt-S ••••

SAV~

F=fllr

If" L I

<;,

..
•

"X 'H .. .

•

3·

••••

•

.. P\lfJ

v
•••••••••••••••
•-PUT 'NUP' ,,,.. ••
• PLAGE OF LIST'
..
LINt<
,.
•••••••••••••••••

·

v

.

•••••••••••••••••
*F ILL IN A,)OK * ••••••••.•.
• OF HG INHK •
•••••••••••••••••

v
••••••••••••••••
•

.•..............

-SAvE LINK T1I ..

..
..

f\lfX T 1 1ST
ENII(V

'"

..

•

.·..............
v

""

.. !.it- ~ a ~ ,r J'\I ..
.. Rf-G. A ll.ll..., ..
.TKl'~PICr..

-OF LIST lll'4K ..

•••••••••••••••

V 9:.::' • • •
•••••• *••

·••

* .. 1 U

•

If.

.••

.

I N Alln~ . . . . . . . . . . . .
>C "~SHl •

* ...............

Chart 61.

Instruction Assp.mhlpr

{P~NC

1Q

n~

~~\

375

Pl/l SYSTEMS MANUAL
SVINS"

LIN

VN1380
••••••••••••••••
••••
•.111 ••• X.INHIBIT
•
•
ASGMT.

""lHO

••••••••••••••••
*.*.
• ..
• utT
•
• Al •• X.Mt.t"

•

•

•

..

A~.')"I'iO

U~NO
~YMIjUl

-l

KEG

TO•
•

•

•••••••••••••••

v

•

Pkt(.UNb

ttvTAr.,r AUUk.

V
••••••••••••••
*

•
.Gt:N:

v
•.VNlbOO
••••••••••••••
co.
.-----31------·
• GEN tllNO BR •
TO .+14
••• ••••••••••••••
••

•

v
...............
...............

378

WNSTANT

•

•
•
•

V
• ••••••• * •• ~ •••

••

•••

*S7 ••• X.ANlJ LINK ARt-A_
•
•
*TO OI(.T (..HAIN.

IN~EIH

?

................
••

v

•

..

•••••••••••••••
•*SVOSbC
• ••••••••••••••• x.*-------------.
COYED LAHti.
AJnp
•
••• ••••••••••••••
••

*YES

.-----32-----*
.
•
tUN. TRUt T •

*x

?

LABL IN

CURR 8LI\,

Y

·• .•....•

•• •
• YES

VNl~10

•

•.VNlb4,)
••••••••••••••
!:to*'

·~U

..

• •

•• •
• NO

.... ....••••••••••••••.
....

*be""JLR l!),b A*
..
..
.. l!l.LdLVRbL
•••• X A6 ..

.. dAlR 14, I!>

•• • •IS
•·C4·X
•••• • •

_NO. (It:KU. If.

*.* ..

*••

...

IN UN-UNIT I •
••• ••••••••••••••
•

..
.*..•••••••••••••••. ... ..
*VNlbOO

•

• *x••••
co-•
•
•
•
•
.YH

• USE CURK BLK •

.. 23-

•••••••••••••••
Co*

••

l~KO

CONS r ADOR.

•

Y
••••••••••••
*••

....

..*Att**•• oK.*-----ji------*
..
bEN LONU dK * ••• x

• • '•1<.1•

·

VNl,"O

•••••••••••••••
*----- 31------· .. ..

*VNlbOO
co* ••••
.. beN. ~U~D 8R •••• X Al ..
TU .... 10

••

ASS~M8LEU

•••••••••••••••••

v
•••••••••••••••
•
•
U5E
AS •*
••• ADDk
Of CON S '*
•••••••••••••••

• * ••••••••
•

• • •NU•

..

PUTNTl lBl
YRHle 1

.YES

oAl

.US~

•
•

VAR
..
•••••••••••••••

v
................
... .... .-------------.
.
....................
...
••

•.. ••••••••••••••
•
• • •
•••• X Rio'

.----32------·

• "ET AUUIt Uf •
..
ltil VktlL
..

. ...

v

V

VN1590

'f

••••

..

•••

x

•

.Al*
..

'Lit ""EllS IWIUAL
.vINSA

EDO

YNIS60

••••••••••••••••
••••
• • •
•
*1.1 •• X*
10 *
-SYTES OF tOOE••••
•

...............
kE~fRY~

VNI420

:81* •• X:
•

•

~'~~ELmr

• COUNT BY I

••
••
•••••••••••••••

3.

...............

••••

•

V

VN0020

•••••••••••••••

15
•
•••••••••••••••

.-----------*
SEE NUTE I •

•

•••••••••••••••
.VN1440
... 0.
:Cl·
..
X:-CHE,:JoiNi--:
•
•
• AtTIVE REGS.

•
INtREASE
•
• •••
: l~~~l T~~~NT : . . . ; Bl ••
• ST_GE "'SGMT.
•
3.
•
BY 1
•
• •••

CUNST t. l~ • •
O. BALK 14 • •

•

•

VNIHO

•••

...............

•

v
••••••••••••••••

: ••• : 81·.

•••••••••••••••••••• ••••

Ii

• 'NLSI8

YN0020

•••••••••••••••••••• ••••

*•••••••••••••••
•
- "EN: L 13, •
•
•

800

NOTE I. GH
40011. uf AueUN
FOR GUro

INTEkPIlHER

...............
Ii

•

'~USAt

•

*--------*

: f8~tM8'V~ :
•...............•

v

•••••••••••••••
•• INSERt "'SMilO.•

UI/OR Of ... oeON.
•
INTO LUAU •
•
INStil.
•

•••••••••••••••
Ii

VN1570

••••••••••••••••
••••
•
•
•
CLR ADeON •

....6 . . X*REGS
•

•••

•

•

•

U.I~.IS.

ANU ALLUili

(tONT I

•

•

•••••••••••••••
V
VN0020
••••••••••••••••
•
•
•
• •••• •
.... SSlbNMkNT Of •••• X 81 •
• REG 13 AGAIN.
••••••••••••••••• •• •••3.

Chart 61.

Instruction Assembler (Page 23 of 32)

379

PL/I

SYSTEMS MANUAL

24

$V IN,A

"1~lt 0\0

**t<*.:o.**~.***

*.*
:.;.
..

~

*~

...• •
...

v,~

.~.:::

..;.

••

*

..

*A)(,\1f U" buTU*

~ul*

kt~uLul~"

\.oHAir..

..
~*

•

AJw l:d*
L II"" ,;1
•

~>t,.IK'"

• • ,,~

0\'<
*>;~

;t

*/.\ j,

..

.. *'!-~ .. "'* •• "'~ 0\'<*

4t,o:>

..

.

~***.**. (1.*****.

..

•• X.

f0K

TL~r

..

**..
•
***.*.'1'<****.***

v~lno

VNV"bU

•

.
...
.
·n.s .. ***

• *x.• (,1 •*'

*'

Guru "

t; • • • • • • • • • • • • • • • • • • • • • • • • • • •

• *.*

• NU

LUl.Alt.

~I\L~I.KVI::Li
~

~q"

••••

A,u:A*

LAflH ?

•

• YES

•

.**

x

•

•••••
.X
80 ••
AS
• zs.
• ••••

SAME "LOCK

•

... .....

V
cJ:~

'iii

.LA~ELI

~AL

0"

14,lA~El

•

••
•• •••• *.*****.*
•
.*

: x ••••••••••

.

11

j,

CLJVI.KA~lt

?

•

*

.

••
****.*.*****.
• VN1631)
AO.

~

*-----32------*

0 ••••• :

v

•

.. ••

...

•••••••••••••• X.uf.NlKATI: LOAO* ••• X £\q.
•
{IF COVEtt
•
..
...

•••

•*•••• *.*.*.* •• *•

*********.*****•
••• '*
*•• FILL
UN'ISF:n"
•
~PAC[ ~ITH
•••• x C9*
•

*

'~tJP'

•• •••*•• *••• *••••

•

•••

•

Yt:$

,

*** .. *~"'*********

*.VlJ~A(..

*-------------*

*'*'

btl CilVtKf:LJ ""
Adl)kL ~~

..

•4** .. ******** ***•

v

v

**.*.***.* .. * .. ~ *
* **.. Mt,Vt "~lIt)' *'

..

'"

*t'lI1* •• A*
+
~

,

'*

11\1£l;

\JNlJ~t-,)

SPA~t

'"

..

V

*;.********,~*>\.:(:*

>I',,',* •• x*
...

~*

Chart 61.

*LAdH 'L,~
l/~, l d'

*

. . 1\1

j

J

*"..

.*.",**** r" ~t:*.*

..
¥

••••• **.*******
•* ~;l"ll:l 1 1 , '•*
..
*
Anr qM,
t. . . . . . . . . . . .

I):-

¥

(

~L

i

L,JI\S I
t.l10,..;. l.,

•••••••••••••••
•
.. .* ••
•
... .. *

·•••••••••••••••. ....

'GET NEX r LINK •••• X A2 •
•
..
.. 24·

NOH: GET

ADOR Of ADe"N
IF GO TO
INTEKPKtTeR

Chart 61.

Instruction Assembler (Page 25 of 32)

381

PL/I SYSTEIIS IlAllUAL

26

aWI.SA

RS

RII

......................
.....•••••••••••••••..
VhlllitO

..

..

..

.U:MUVt B

..

•

•

•

~

•

.Al •••• TASLE Al tHO •
bLotK

...................... ...
VN18t.O

VI'I1850

• •
• GET 8LII T8L.
•
•
*81 •• X- ENtRY PNTR •••• X A3•
•
• •
• fROII PARAII •
•••

•

AREA

..

• ••

•••••••••••••••

••• •
•
·NU
•

VN1815

•••
• •.. •
·'1
•••••

IS LI STING

ENABLED ?

•• ••
• YES

• •••
•
•

.
....... •••••• ••
•
•• •
•
•

.01*.

• .X••••
t7.•
•••••
•YES•
.N~

EIIID OF L:JCP ?

•
•

:•••••••••••••• X:
v
••••••••••••••••
•
• bH (.U.... SU• •

v
••••••••••••••••
•
• BRAllltH ON •

••

•••••••••••••••••

................•

• lNfU TAIILE
ENTRY

•

•

V

.PUI bLK NK

•

*Aj* •• X-SASE
..

• PRINT 5 WORDS.

•
•

....•••••••••••••••..
~Nll1i;o

••

..

.Pc","

..

AS.

CW~ IJF
O~A REG

TbL tHTHY

V

• •••••••••••••••
•
EX IT
•• •••••••••••••••
••

..

*

..

..

•••••••••••••••

*

OR 1

V
• ••
•
.YES
•
?

••
•• •
• NO

................ ••

•

11=

HY It

V

••

EXII

Hv( WORDS

• ••••••••••••••• •

v
•••••••••••••••
•• SET COUNT TO •*

SVR

• 5 ,MEDun •
• l.LJC C.Tk PTtt •
..
8v 20
•

•••••••••••••••

v
.•.............
.
•

.....
... ........ .....................
. .. •••••••••••••••
.
.....•••••••••••••••.. .... •••••••••••••••
V"1870

~Nl0ll1

• A6 •• X*LO'ATE TKIAO •••• X 68 ..
.. ..
..
..
.. 14.

•
*80 •• x-INTO fEMP FOR• ..
*fXO Rt~S 0 , ..
•

•••

•

• GU. S TORE~

..

1 lCONT)

V
..•••••••••••••••
..

• flT~b ktG 0 , .
•

2, It-

'ED IT tUNI S OF.

•

•••••••••••••••

was

2

•

*

•••••••••••••••

....

...............•

VN3260

•

*

* •.. •X t.14* *

• 'OhTENTS ARE.
-STILL ACTIVE.

l~I

• I"TU A SY"B
.CHAM
STK uPNO.

..

****

•

•••
•
.C.UNV

v

~

dyrES •

• '7 ••• X.TO HEX f. EDl r.
•
•
*TOGETH til LOC. •
••

•

CIR PTR

•

•••••••••••••••

v
...............
·SGPUT
•

•• -------------*
Pl(lNT THE •

·................
•

LINE

•

v
.........•.•....
.

...

•
ClR PR.I~T •
..
•
• BUFFER AIIID •••• x Dl •
• STEP TO NEXT.
•
•
* 4 BYTES ..
• ••

................

382

Chart 61.

....

•
••••••••••••••••
'SfT
CrU .. T Tf:
• ••••••••••••••• X·l
A"rl REO)UC[ * ••• •
x t7.*
LOC eTR PU •
•
•
* •
•
•
•
•••••••••••••••
•

Instruction Assembler (Page 26 of 32)

...

27

PL/I SYSTEMS MANUAL
IVINS"

TEST fOR DOPE

OPND 2 FOil 1111

VEUOK

VN056l

VN0635

•••
•*Bl • x-* •••••••••••••••
ENIER
•*
••• * - ••••••••••••••• •

•*•• • • ••••••••••••••• •
x•
*Cl
•_ • • ••••••••••••••• •*

..

-

~NTER

v
••••••••••••••••
•
FLAG FOil •

-

• • • ·YES
••
• •........
A
cb~s~m ?
••
• • •NO •

-..

..

o

o

o

ALKt:AOY A

••

•*•

................
.~ET

..

o

OPNO -2

*Vt:5
•

?

..

•••••••• X

..

•

R~G

1

v

0

.. FlC. TU tiASE •
*(.ltDI: Uf- OPN() ..

..

'CUNTI

•

..

•••••••••••••••

••••

~YII"ULIC

AOCU'I ktG ?

•••••••i •••••••

.***

*x

A2 ..
.. 2S-

••••

•

•'IU *

•

..
VN05SQ

°YES
•

uPND - l

o

..

02 •

.... lS-

o

•

•

• ,t r OUPE HC •

....
ox

,YMBOLIC COMP

• .. NO
•

•••••••••••••••

*Vl::S ••••

=

UPNO -2

NU

•

..

•

• •

•

IS OPNO

W~S~klpr

••

.. .
VNO~12

o
•
*SE' ~U6~CR'PT.
-FLA£, UN UP NO •
..
COKt-ADOR
..
o
•

"YES ••••
IIi>Nt)

-2

:::;:

ABSIJlUTI: rtl:G

..

?

•••••••••••••••

·

ox

"7 ..
.. 78·

.*.*

• NO

:x ................ :
v
•.. •••••••••••••••
tXl T
•••••••••••••••

.

VN~"~

.

oYES •••

.-

*

*

•

*

•

•

*

.
•

..

*

....

• •

LITeRAL?

*x

~~

*

• ZIJ.

*

NO

••

*

UPND -2 =
IIiIAb PART
AOUR?

*

·

*"4U
..

••••••••••••••••••••••••

*

.. YE;S

v

•••••••••••••••
•
•
.l>ET keG t:NTRV •

• I.t,UJ TO Ut'NO-Z*
."-E.G Tlil ACmA. •

*
•
•••••••••••••••

i.......

VNOU~***.
.....
•
•
•
UPNIl

•

v

-2 ..

•

•••••••••••••••••••..

•

5~T

.C9 •• X.KEG ADOk 4NU •••••••••••••••• x.
...

Chart 61.

•

1 Al

PTR

•

Instruction Assembler (Page 27 of 32)

*.******.** . . ***
~XIT

.* •• *.*."'",.4.*.0:
383

Pl/l SYSTEMS MANUAL
SYINSA

28

PROCESS UPNO

1

VNU570

•••.... ••••••••••••••• ..
...Al
x*
STeT
..
..••• ....
•••••• **••••••• ..

...

v

•••••••••••••••
••
••

VN0580

..

..

*

•

*

o~~u -1
!)'(M~Ulll.

REG ?

•

~

.YES
•

('OMP

*

•NU

,

v •• ** ••
••• *••***

ASSI~Ntu

V
.*.... ••••
*.*****.*
t FLAG AS ....

UP"'O-l =
*••• •
*x 8Z*
• •AUCUN KEG? • • •••• •
*
• • NO
••
·YES
..

~YMIiOlIC.

..

• YES

..

UPND -1

..

l I fERAL ?

..

•

..

....

?

,

.. ..
.. PUT LIT VAL ..
•••••••••• B5 •• X.AS REG NO UF ..
..
..
.DUM~Y 1 BL ENT*
••••
(CONT J
..

••••••••••••• **

•NO

..•
•, .
. ...
•

kl:('

.*.*.*
••v*.****..*
*·

,

·NO

*x.

·

.. (fUK U,)£

69*

.. YES

*A1 .'OX.
..

..

.. TABU:. l::f\llKY ..

.*.

VN0595

•
******.*
•••*.*.•

....,,

.,

·Ad·x

,*
JPNiJ -1

?

.. •

.. Nu

*

..
.. !>ET OPND -1
.............................. X*Kt,G AIJDR ANI)
..
..
T BL 1'1 K.

....
..

•••••••••• x.

..

BRA'IICh tJr.

.*•..

*o

OOD 11K f-VEN

AS*-

Ii

*
*•

.SYMBOL Ie A('lfW*

**********.:.****

Vf\!OS 7f;,

• *x****
•
AA*

*vrs
fVFN

?

*

.

...

•

Ij;

V

DOU

**********.****'
*'
•• ANO FLAG AS"
.. *** •
*SYMtiull(.. All '( ..... X AS*'
USED
....

*
..

•
********.*.****

..
..
..

•
•
****.*.*.*.*.*.

..

C9 ..

•••••••••••••••
..
· ,.
.*
,_Sq.x.

.

.******** 'l:**'*'t'*

********
**. .. **.****
*
•
• l::NTEh. A$GND ..
*L6 •• x* REG IN ~Y~H *
* .. *LCMP ReG Tb~ ..
**.
.. ICUNT} ,"? ..
..*******..... ~***

.*.*
VN0636
v

•. ..**.•.•.....**

Chart 61.

.

..

.. 27·

384

.. *** ..

VN0515

.

*.**** •• **** •••..

·YES
..

~

TPL •

***************

••..
********.****
*$VA::.&C
..*C~*.. •• X.ASSIGN
*-------------*
A COMP.
* .. *
KEG
*
***.*********.*

:x .•....•.•...•.••.•......••..... :
VN0515

REG FRJM

V

VN057?

******.********
*
*•.. RE..,
1"[}L
*..
POINTER
'USC DUMMY AS •

REG ..

~GMPUT~

.

v

V

......................
..

A~

* (.UNO cout. J ..
••••••• **.*****

*.*******••• ***
...
.*.*..
.. .
VN0572

..

*..* 0,

•

..

UPNU -1 =

Ab~UlUTf::

**** •• ******.* •..

.....

..

USeD

•..* •

*x C5*

.. Yr5

'SY~RCL1('

* ••• x
....

*******.*******

VN,H5

..
..

*~VMSOLICALlY

*NU•

?

pnI~Tf

'"

*' (CONT)
..
**.**** ••••••••

VNOSSO

•

..

*

SY~t!JLlC
ASSIG~f~

v

ENHR ASGND
'KEG IN SYMBOL'
*ADCON REG TBl*'

A~*

REG

*o •• ************•
.. GET
k *
.. TO A$SI';'1tf) *-

••

•*

**** ..
.. TO
•••• x
..
Rf::G fKOM
..
..
..
_SYMBOLIC Till"
*.*
..........
*•••••

...

...

* •*
*02

*•••• ***.* •••*•••

VNO~ 75

• IS•

•••
* *

•

* .....•...•.... x...*------------*
AS-SIGN AN ..
AOCON REG ..

*YES

**•• ** •••••••••
.... bET PuJNTEk"..

•••
*x• Ol.•
• •

VN0590

.**** ••••••••••

'SVASGA

•

V

VN0590

*

•

?

•

..

.NO

REG ASSI GNEll

,• •

•••••••••••••••••

•

I S SYMBOLIC

• * •

*82 ..

*!)t:T ... lAb FOR ..
..
OPNU -1
..

•

EX I T

Instruction Assembler (Page 28 of 32)

*
*.*

V'4057'l

*****$**$*t"*~~*

*'..

"lJ~~

..

*

AO.JACF\T

kEGlsrt. k

..*

• **'* ..
**' ... ..X AA*..

..

****.** **** "'~**

***

PLII

SYSTEMS MANUAL

SVINSA

· .. .•...............
VN0650

••••

PRUCt SS OPNO

VN0680

••• •
•·CO.X
•• •

•

.SO .. X* USE OPNO -2 •

2

•

..

..

CORE ADOR

•

••••••••••••••••••••

.

•

.t ••••••••••••••

DOUBLE
PREel SJON ?

VNOb4U

• Al. X.

cNTtK

•

•

*S1

~
•••••••••••••••
•
•

·•
.
................•
tiRANCH ON
UPNO TVPI::

•
•

;$

GET

..
•

ASSEMBLED
ADORE 55

VN0665

••
• •

..

·B2*X *
• * •

..
•

•

.----------.

• eX.

.
JS INDEX

•

•
*

·

IMAblNAl-tY 1

•

•
NU

S~RATCH

SrUMAbE ?

•
··

V

·SVOSAC

·

.CDVER OPNJ •
2 A.DOR

•

.
•
•

** •••••••••• ***

.

* ..•.•.. x

•

...

V
..**
.. •••••••••••..

VN066"i

..

•

.·............... .*.

•
.. ••• *X fS2*..
.ADD
INCREMENT_

•

*
~

YI::$

·

•.. GtT

REG Nk ..
*ANU PUT IN XI*
•
fLU OF
..
AUDK •

..*••*.*•••••••

*A~SH8LEO

: x ................... :
VN0720

• ·
••••

• .X••••
so ••

·YES

OPNO TYPE =
LABEL ?

•

•

•

•NO

30·

•

*

15 6ASt:(UPNU

..

...
• •

·YES

IJPNO TYPE: =
1I TERAl ?

••

•

_

*••• *••••••••••

V

•• ••••••••••••••• •
* ••
EX IT
*x C3 * • "51·X·
.. 30•
••••
•• ••

............... ·

*x

IS Rl-C

!'ISS I (.J'''.i.t-f)?

AS KEw HY.
• oPfltU -4 TYPi: •

B7*

'" VeS

·

v

.

**********~ *t~.*

.. (:ET

~r';

..

flF

~Sil4!i!

'"

AODR

i\lf{,

*'

*PUT IN R ru' ..

n

..

(ell'lT)

'"

v

.

*•••• ** ********

·

VN0710

OPNU TVPE

• •CONSTANT

•
NO

UPND TYPI::

UTHER

1

=

•• *************

·

• .X••••
• LU
• ••••
• 30'•

• YES

Chart 61.

*'HJ

.lOC
SYM C.OMP *
..
•
AIlCN KEG * ••••••••••••..• x

* ..••••.••.•••. X*.TbL
OR

NO

•

•

. .•....•
. ...

*.****••••• ***.

.YES

-41 SPEClfHD
1

*

VN0730

•

..

• NO

*

••
•

•

***.***** •• ****
•
.. '" *** ..
OPNO - 7 "
................ x.-• ADOA:JuR
TO
* ..• X 81 •
•
I NCIH:MENT
* .. .*
..
***
***************

NO

• •

•

*NO
SUBSCR I PTED •
Ok PARAMETER
1

v
...............
•

VN0690

• .X••••
AO ••
• ••••
• 30·

·YES

=

OPND TYPE

•

1

•

.;SbND

•

•

•

•

RE~

VN0660

•

..*.-------------*
••........••

*NO
IS

•

Cz.

.. YES

•

•

.X CO.

•

YES

•••

•

•••••••• • ·C.2*X

*
.... *........... *

.· .....

=

uPND TYPI::

•

S'fMB C.OMP.
.. UR AO'N REG
*TSl AS REQ BY.
• OPNO-3 TYPE •

VN0680

• YES

..·••.. .
••

......**** •• *•••

. ...

·

*

•*LUC

X

*.

v

VNOb50

• ·YES •••
• bO.•
OPNu TYPE = • .X
PARA"', Ht:AL ? •
• •
•
• NIJ

•

•••

•• •••••••• *••• •

'NU

.•

••

OF 4

.USE INCREHENT.
..
Of 8
•

•
•

(OPNO -31

•

•

•

SPECIFIEu?

..• ••••••••• **.**

•YES

•••

. ...
..

INCRE~FNT .....

•

v
·.•.............
..•

V

·S\lOSAC

..
•
•••

•••••••••••••••

•••

................
...............

VN0660

•••

•

III

••

•

•

..•••..... ••••••••••••••• ..

•
• .. ................. X.USE

*NO

'" ExrrPT -4fH-N '"

* ••• '"x

,.. l!)T r1~~o) I1F
*S5 TYP[ ! \)';TK.*

..

..

***************

..

..

87*
..

.*'"

•• *••• **
••
• ••***.*
EXIT

............... x*

• • *** ••••••••••• •

Instruction Assembler (Page 29 of 32)

385

30

PL/I SYSTEMS MA"'C'AL
SVINSA

......-- • • - - .. •
.• • VN0090

•••

..

•••••••••••••••..
.....
.. .. .
......•••••••••••••••...

•

VN0720

-YES
HA~ SCRATCH
•
UEk" ASSIGNtD
•••••••••• 60 •• X.GET
•• ..
..
YET 1
-

*AO_

LA~El

TSL.

ENTRY

..

• ND

v
................
*'VC,TMP
..

*---------*
•

bH IMP
5 TOkA"H32

-

v•

*

*

..
-

BYTE I
•
•••••••••••••••

-. •

*

HAS LSL liEU,
DEFINED?

.

•

.•

..••••••••••••• **..

·Yt:~

•

..

SET

....

VNOobO

....

••••••••••••••• X.OttUdTluN AS •••• X 81 ..
- UPNO- 2 CORE'
• 29..
AODR
..
• •••

................

• NU

................

-.
..

.-

\TllH.AbE

*

•••••••••••••••

-NO

::'U.. lINu AKt:A
iIIIANIEU 1

..

•••••••••••••••

·•x•••••••••••••••••.
. . .. .
. * •••••.•.
..
.
-

TSl

..

..

*
..

• ..

*Yl~

"

.

LUe Bl:LU""

LAST l5b

..

..

dYT~

*Of- 3itU flu 1.

.....

v"ono
•••••••••••••• *

.

.. ..
.. SUPPl Y ut'NL> ..
* ......... *1.3 •• x:. -2 A~ I114M£O ..

.."

••••

..

..

VAL

fn~

UUTPUT

..

..

•••••••••••***•

.. YI:S

,

v

•••••••••••••••
.
.

..

....... **.* ••• *~

.

·"'VA:)b~

..................
..

AI...I..I

..

16

H.uOI<

tl.o

.(t------------*'"

·•

..
..

.•

.t

V

*.**.*.* •• * ••

................ ••
:;e..(

..)( I T "

:x .................. :

. V ..
..
-"0•
..
r
. . ....... .
. ..
IMA(,.

~A ..

WANltO ?

.. YeS

V
•••• *••••••
**,: ..
*.. ~u~: l Ki::b. *'•

·

.. 0(0. AIJCJN
..
AREA H.tb.

.
..
..

.*** ........ *.; **

:x ............................ :

v
.**••** ••••••••

.

*AOO 4 UK

tj

.

v ** •••
••••••••••

TO.

*AtJUr< FOK ~HK T"
-Uk. LUNG fYPi:: ..
'"
K.E~P(.i VL V
..

tOT

•• ** •••••••••••

·• x ...................... ...
;

...** ••••••••••••..
• 3~T

KE~ULT

..

ALIUR

A~.

....

"l'IIOboO

..

*•••
..••••••••••••**... ••• *
*OPNIJ -2 (,Ot{E

386

Chart 61.

Sf ARCH

•

.COPIISTANT TRl •

SET uPNO -1 •

• ••••••••••••• c.

•

IS ""uKk l.Ol

•

• tOKF-AIJOP ...
•
f:.Rr'" C,JPE:
•
.AilOR Of caNST'

-INSTil IN Llll -

..

f'

............••.•......
..

•

.. KI:f't:tUNC.1N" ..

..

.$~CON

*01 •• X.

v

••

• PUT LlJC il~

••••••• :c=."' •••••
*_____________ ...

-•••••••••••••••.

v

v
•••••••••••••••
-A.5.",..
LUI. 10-..
..
::'LK.AH.H

..

VOI0710

• •

•••

..

l\ IH ..
. . . . 29.

Instruction Assembler (Page 30 of 32)

·•••••••••••••••. ....
·
. ....
V

VNOb50

• Sf' OPtoH -")..

..

..

*

•

2q.

AOOR
*CONsr Ir

.RF~

rpo~

A~Y

•••• x RO ..

••••••• **~**~ct

31

Pl/l SYSTEMS MANUAL
IVINSA

.. ...

.

VNI440

· ...

VNlhOO

•••.... •••••••••••••••
*AO xONTER
..*
••• •••••••••••••••

..OLO Xo •••••••••••••••
..
ENTER
0
....
..
••• •••••••••••••••
***

................
•
o

*..:tTAtH OF
..
Ktu~

AT

..

c..uHP*

,.

0

•
-YES

IS dRANCH
0
UNLaND I T10NAL

,.

o

..

-

o

,. ,.

0

tI~l"ll11

..

•••••••••••••••

,.

?

,.

•........

0

,.

0

o NO

.)1. • • • • • • • • • • • • • • • •

v
•••• *••••••••••

v

•••••••••••••••
o
•
..

ilN

b"Af'.4t,.h

,...

..

•••••••••••••••

•••••••••••••••

,.

o
"

oYE.

o

Ll.)~

1)

THAN

I

•

•........

•,.

,.
•

l~

)

o

,.

0

"..

Cm4PUTE

"bkANLH POINT •
..
'*+10 OR
..
..
*+14.
..

• LAST uS. (jf •
*kt:Lo: L.UKKt.l'd ..
,. TklAO NL. ,.

IS

•

*********10<*** ••

0

~RANCH

PUINT

,.<.OVlo •••••••

·SVR.~VN

•

..

kc.MU~t

•

•

•

*...

~EN:&L

*•
It-

•

.

.Lb ••• X*, t;,-r...UNOl T fuN , .
•
•
•
OISPL
•

•

•

~VNuI".YHS

*...

•••••••••••••••*

o

•• * ••••• *••••••

:1( •••••••••••••••• :

v
..............
.

•
•••••••••••••••
•
•
".!)Jt:.fJ Te
"•
•
Pt:u
..
*"••••••••••••••"
~t:XT

,.

• ••••••••••• * ••

"NU

tNO LF taMP

.

kl:G~

?

..

••••••••

'Y'c::J

...............
.......... ....
v

•..
•

..

CLI::AK DA!)f:~ ..
..
OF vlJLAIILE. . . . . . . . . . . . . . . . . . .11..

.. ALII... Uf,

..

Chart 61.

Kt:b~

"

..

•

~

• •••• * ••••••• ~ •
lll.lI

•••••••••••• ** •

Instruction Assembler (Page 31 of 32)

387

PL/I SYSTEMS ,.ANUAL

32

$VINSA

...
...

...

VN1HO

VN1030

• • * ••••••••••••••• ...
•*AO •x**
••••••••••••••• •
~NT~R

•••• •• ••••••••••••••• •
ENTER
*ttO x*
•

VNlb1S

••••••••••••••• •
•.DO••
X.
ENTER
•••••• ••••••••••••••• ••

• •• ••••••••••••••• •
•••

: x••••••••••••••••

•••••••••••••••••
LOC. C.URR BLK. ..•
•
INFO TBL •
..
ENTRY
..
•••••••••••••••••

** ••*** ••••••••

•

•

'SEPARAH AilOR'

*ut- CUNST INTO.
.. Pb Af'40

OI~P

..

•
•
•••••••••••••••

v
................
•
•
AUW""
.~uM~uTE

..

AkEA. AuuK

..

lrtUt.X

.. UStNb Pl. AS

••• •
••• •

..

*S2*X

..

..

•••••••••••••••

..

•

..*** •• *•••••

..
*••••••••••..•• X*GET
NXT
.. SLK

•

. .*.
•

..

*

..

..

..

*.

OUTR •••• X B2*

ENT~Y

..
.*.***.**.*
••• *•

***

..

~u

U~l

..

OF Guru

*

ASGM15

..
•

•

*

..

..

*'
•

.. .... ....

'NO

IS IT AN

ATTRIRUTE
NODi:: ?

.,

•
* vr<;

IS IT 1

.

*VFS

THHATIVE

DECLARIHIJN ? •

•

•

*********.**** •

* ........ .

•

v

••••• ** •• ****.*

*SNLON
*'
.-----------*

•

·

.. !)EAR('H ANt.>

A~

•••••••••••••••

****.**.*
" •
•••••••
.SE T TDKEN ANO*

•..
•

*COkE ADOk
•
CON~r

Lt'ltSH
VAt{! At L l:
A~RAY ?

•

~OK.

*
•*'
• *.************

* ••.•••.• X

JS IT A LA.:El
VAQIAl1lt~ ?

*.******.***** •

v

*\!:J

.

.
..

'*ALLUCAH: (;.UI't.:>*

A!>MBlu
..
*AllDk fK. OTPT ..

••• ******* •••••

ATTRIHUH:
NOOE

Yl:~

*INTkPkTK AND

AUJuS10*

cAll

•

v

..

••• *** ......... .

..

.. eNST t-R

• uS,rL ... kl;u 13.

..

..

*NU

.

IS
• DECLRED?
l~l

*

..

•
•
.***** ••• *.****

••••••
**.******'"
*('N$T,,(1 2

v *•••
.. ** ••••••••
.~UPlY

•

•

••••••• ****••••••

•

•

DOES IT MT~H
Blk IN wHICH

..

v
*-* ••••••••••••
•
*.. uEI\!: L 13, ..*
AUCUN

..

•

•
..

v *••••
**•••*••••
•*lOC NXT Ill(.T •..

v

v

•

.. 'W

·

v

.

V

* •• *****.** ••• *

*$"***** >,'I:*.('*'>;

•
*GE T

*.)ET (..Ot.,D COl: ..
*TO lNUILTe. IF.

*

.CONST CAN BE •
('OVEKt:D
..

..

*.** ••* •••••••••

*~

'.

COf.. t \111F '.
AND P:'1,~ M'
':<
!=l A';
*"

*******'b'>'.<>';1-

t *#('*

:)( ................ :

··•

388

Chart 61.

v

.*****•• *.*** ••
EXIT

******* •• *••• **

·•

Instruction Assembler (Page 32 of 32)

.

v

*.****~~*.,.***1)::(:

PART 8 - WRAP-UP
The routines which perform compilation wrap-up are described in this
subsection. The routines are discussed in alphabetic order according
to their mnemonics, as shown below. Detailed logic diagrams for the
routines appear at the end of the subsection.
Adcon Initialization ($HAINI)
constant Table Processor ($HCTP)
Dope Vector List Processor <$HDVTP)
Line Number Table Processor ($HLNTP)
Runtime Library Loader ($HRTLL)
static Constants-Adcon Loader ($HSCAL)
Table Collapse ($HTCR)
compilation Wrap-up Driver ($MCWU)

389

TITLE:

ADCON INITIALIZATION ($HAINI)

Program Definition
Purpose and Usage
The Adcon Initialization routine converts all adcons from their base
code and displacement form to true addresses and resets the user arearelocation constants in the communications area.
Description
PSPTR is set to point to the start of the library adcon area, and all
adcons in this area are initialized before the swap flag (SWPFLG) is
set to inhibit swapping. Each adcon in this area is initialized by
forming the true address in a P-register, incrementing PSLTH to cover
the adcon, and storing the true address back into the adcon.
Next the swap flag is set, and the compiler relocation pointers (CSPTR,
CSLTH, and CSREG) are cleared in the communications area. The remainder
of the adcons are then initialized in sequence, starting at the front
of the adcon area. This initialization includes initialization of
the file control blocks and allocation of space for the disk files
when necessary, and initialization of the adcons covering the generated
object code, the static and constants area, and the library work spaces.
PSPTR and PSLTH are then reset to cover the entire adcon area and PSREG
is set to the execution-time relocatable register configuration
(registers 6 through 15).
Errors Detected
SPACE FOR COMPILED CODE EXCEEDED. (113)
The adcon area is set up to include a total of 15 adcons to cover the
generated object code and the static and constants area. During adcon
initialization, a check is made to insure that the total number of
adcons needed for this purpose does not exceed 15; if it does, the
message is printed and compilation terminated.
Local Variables
None
Program Interface
Entry Points
$HAINI.

No formal parameters.

Exit Conditions
Normal exit. Return to caller. Final exit to CALL/360-0S Executive
if the source program is too large.
Routines Called
$GPUT
$SVC

Output Director
SVC Director

Global Variables
CSPTR
CSLTH
390

Processor Swap Compiler Save Pointer (Communications
Area)
Processor Swap compiler Save Length (Communications

CSREG
PSPTR
PSLTB
PSREG
SWPFLG
L Table
$LNTA
$CAA
$AAA
$RTLA

$LWSA
$IOBA
$SASA
$DSAA
$DBUF
TMBUF
$COMAD
$GABU
$MFCB
$MLWS

Area)
Processor Swap compiler Registers (Communications
Area)
User Program SWap Compiler Save Pointer (Communications
Area)
User Program swap Compiler Save Length (Communications
Area)
User Program SWap Compiler Save Registers (Communications
Area)
SWap Flag (Communications Area)
Library Load Table
Displacement from Code to Line Number Table
Displacement from Code to Constants Area
Displacement from Code to Adcon Area
Displacement from Code to Library Area
Displacement from Code to LWS Area
Displacement from Code to I/O Buffer Area
Displacement from Code to Static Array Area
Displacement from Code to DSA Area
Number of Disk File Buffers
Pointer to Terminal I/O Buffer
Address of Communications Area
Print Buffer
Mask for FCB Control Bytes
Displacement from Code to Address-Modifiable LWS

Logic Diagram
Chart 62 shows the detailed logic diagram for the Adcon Initialization
routine.

391

TITLE:

CONSTANT TABLE PROCESSOR ($HCTP)

Program Definition
Purpose and Usage
The Constant Table Processor processes the constant table (C table)
by moving constants to the static and constants area (adjacent to the
line number table area) and, when necessary, converting string
constants.
Description
The first and eleventh through seventeenth words of the constants area
are cleared to zeros. (This area will later be used as the dynamic
storage area for the external block.)
FILEPTR in communications area is initialized to the displacement from
the start of user area to the FCIB offset table. This table is located
at displacement X'lEO' from the start of the static and constants area.
The C table is then processed one entry at a time, first checking to
determine whether the entry contains the constant or a pointer to a
character-string constant in the source program. If the entry contains
the constant, it is moved to the location in the constants area
indicated by a pointer in the constant table entry. If, on the other
hand, the entry contains a pointer to a character string in the source
program, this character string is converted (that is, duplicate quotes
removed) and placed in the constants area.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$HCTP
Exit conditions
Normal exit.

Return to caller.

Routines Called
$WSTEP

segment Management

Global Variables
C Table
$CAA
$TAREA

Constant Table
Displacement from Code to Constants Area
Translate Area

Logic Diagram
Chart 63 shows the detailed logic diagraro for the Constant Table
Processor routine.

392

TITLE:

DOPE VECTOR LIST PROCESSOR ($BDVTP)

Program Definition
Purpose and Usage
The Dope Vector List Processor sets the pointers of the dope vectors
of all static arrays and strings to point to the virtual origins or
beginnings of the strings, respectively.
Description
The storage pointer of each dope vector pointed to by an entry in the
dope vector list is set as follows:
• If the dope vector is a string, the pointer is set to point (from Pl)
to the start of the string in static storage •
• If the dope vector is an array/string-array, the pointer is set
to the virtual origin of the array.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$HDVTP
Exit Conditions
Normal exit.

Return to caller.

Routines Called
None
Global Variables
$TSA
$SASA
$CAA
J List

Ad1ress of Dope Vector List
Displacement from Code to Static Array Area
Displacement from COde to Constants Area
Dope Vector List

Comments
The dope vector pointer cannot be set when the dope vector is moved
to the constants area because static storage has not been allocated
at that time.
Logic Diagram
Chart 64 shows the detailed logic diagram for the Dope Vector List
Processor routine.

393

TITLE:

LINE NUMBER TABLE PROCESSOR ($HLNTP)

Program Definition
Purpose and Usage
The Line Number Table Processor processes and moves the line number
table (D table) adjacent to the generated object code.
Description
This program receives the line number table (D table) as input. The
table is processed one entry at a time by locating the line number
in the source program, converting it to packed decimal, and combining
it with the object code offset from the new table entry. The table
is formed following the generated object code.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$HLNTP
Exit Conditions
Normal exit.

Return to caller.

Routines Called
$WSTEP

Segment Management

Global Variables
$LNTA
D Table

Displacement from Code to (Procured) Line Number Table
Line Number Table

Comments
The program assumes integer line numbers equal to or less than seven
characters in length.
Logic Diagram
Chart 65 shows the detailed logic diagram for the Line Number Table
Processor routine.

394

TITLE:

RUNTIME LIBRARY LOADER ($BRTLL>

Program Definition
PUrpose and Usage
The Runtime Library Loader determines all library routines that must
be loaded and then loads the routines and sets (to a base code and
displacement) the adcons covering entry names invoked. This routine
also allocates both fixed and address-modifiable library work space.
Description
This routine receives as input the library load table (L table) which
contains, at this time, a pointer to the adcon for each library entry
name invoked directly by the generated object code.
Using the library load table as the director, the jump table of each
library routine containing an invoked entry is processed, setting the
library load table entries (and, if necessary, assigning adcons) for
lower-level entry names. This process is repeated at each level in
the calling structure until the end of the structure has been reached,
at which time the next sequential nonzero library load table entry
is processed in the same manner. As entries are set in the library
load table, a flag is set in the routine entry name processed table
to prevent subsequent search of a calling structure already processed.
(For descriptions of the library load table and routine entry name
processed table, see Appendix B. For description of the jump table
for a routine, see -Runtime Routine Structure" in Appendix A.·)
Following the library load table search, all additional adcons assigned
are cleared to zeros and the address-modifiable library work space
is allocated. A second pass is made over the library load table to
load the required runtime library routines. Before each routine is
loaded, a check is made (against FREPTR) to determine if there is
sufficient space available to load the routine without destroying any
of the compiler·s fixed tables area. If there is not, compilation
is terminated and control is returned to the CALL/360-0S Executive.
If sufficient space is available, the routine is moved to the runtime
library area, those adcons corresponding to entries to the routine
that are invoked are set (to a base code and displacement>, and the
routine·s jump table is processed. Jump table entries (corresponding
to library entry names invoked by this routine) of those entry names
whose associated adcon is not in a fixed place in the adcon area are
replaced with a pointer to the associated adcon and moved with the
routine.
As each routine is loaded, a flag is set in the high-order byte of
each library load table entry corresponding to an entry to the routine.
These entries may be ignored when encountered subsequently in processing
the table.
After the library has been loaded, FREPTR is set to point to the end
of the user's area and the fixed library work space is allocated.
Errors Detected
None
Local Variables
BRCSTK

BRGSTK
BRTLTB

Jump table address push-down stack
Invoked entry count push-down stack
Approximate length of the library
395

HRDISP
HRLTX
BRDIR
HRDIX

Displacement from code to where each routine is loaded
Load table index name area
Table. each entry of which is the displacement from
the start of the table to a library routine
Table. each entry of which corresponds to an entry
to a library routine. The content of each entry.
when multiplied by four. becomes the displacement
from the front of the BRDIR to the HRDIR entry for
the routine which contains the entry.

Program Interface
Entry Points
$HRTLL
Exit Conditions
Normal exit.

Return to caller.

Exit to CALL/360-0S Executive to get more space and recompile
the program. No return.
Routines Called
$GPUT
$SVC

Output Director
SVC Director

Global variables
L Table
UTT

$ACODE
$LIBBC
$LTEND
$MLWS
FREPTR

L$LIBX
$AAA

$LWSA
$RTLA
ZCNT
ZCNTP

Library Load Table
Routine Entry Name Processed Table
User Terminal Table
Pointer to Next Available Byte in Object Code Area
Library Base Code
Length of the Library Load Table
Displacement from Code to Address-Modifiable LWS
Pointer to First Available Word in Compiler'S Variable
Data Area
Adcon .Displacement
Displacement from Code to Adcon Area
Displacement from Code to LWS Area
Displacement from Code to Library Area
Length of the Fixed Library Work Space (LWS)
Length of the Address-Modifiable Library Work space (LWS)

Logic Diagram
Chart 66 shows the detailed logic diagram for the Runtime Library Loader
routine.

396

TITLE:

STATIC CONS"l'ANTS-ADCON LOADER ($BSCAL)

Program Definition
Purpose and Usaqe
The Static Constants-Adcon Loader processes the initialization table
(I table) and dope vector list (J list), initializinq the static and
constants adcon area.
Description
The initialization table is processed one entry at a time, performinq
those operations dictated by the entry type, then movinq the entry
to either the static and constants or adcon area, aqain as dictated
by the entry type.
The following is a list of the initialization table entries, a
description of the processing required before the entry is moved, and
an indication of the area to which it is moved:
1.

Data/Format Element Descriptor: Moved directly to the location
in the static and constants area pointed to by the pointer in
the I table entry.

2.

Adcon: Moved directly to the location in the adcon area pointed
to by the pointer in the I table entry.

3.

String Dope Vector, Array/String Array Dope Vector: If the
storage class is STATIC, a dope vector list entry pointinq to
the dope vector is built and then the dope vector is moved to
the static and constants area.

q.

Special SDV: The string pointer in the dope vector is set to
point to the static and constants area and then the dope vector
is moved to this area.

5.

Special Block Adcon Area: A special base code is put in the
first byte of the BAA (for use by $HAINI) and then the BAA is
moved to the adcon area.

6.

Discarded Entry:

Iqnored.

The J list is processed after the I table and contains only two types
of entries: ADV/SADV entries too larqe to fit into the I table and
discarded entries. The action required for both types is the same
as described above for their equivalent I table entries.
Errors Detected
None
Local Variables
BSTBL

Branch table to process the various types of entries

Program Interface
Entry Points
$BSCAL
Exit Conditions
Normal exit.

Return to caller.
397

Routines Called
segment Management

$WSTEP
Global Variables
I Table
J List

$MA
$CM
$TSA

Initialization Table
Dope Vector List
Displacement from Code to Adcon Area
Displacement from Code to Constants Area
Address of First Word Boundary

Logic Diagram
Chart 67 shows the detailed logic diagram for the Static ConstantsAdcon Loader routine.

398

TITLE:

TABLE COLLAPSE ($BTCR)

Program Description
Purpose and Usage
The Table Collapse routine collapses the J list, C table, D table,
and I table to obtain working space during compilation wrap-up.
Description
If, at any time during the compilation wrap-up phase prior to the
loading of the runtime library, there is insufficient free space in
the variable table area (that is, line number table, static and
constants, or adcon areas), this routine is called to collapse the
C table, D table, I table, and J list entries that remain to be
processed at that time.
The tables are collapsed into an area bounded by the start of the
register table area (R$TBL) in lower core and the start of the first
I table entry in higher core. Each table in turn is moved an entry
at a time and the linkage adjusted until all have been moved or until
this area has been filled. In the latter case, an exit is made to
the CALL/360-0S Executive to get more memory and to recompile the
program. If the tables are collapsed successfully, a flag ($MCOL)
is set to prevent a subsequent attempt to collapse them and control
is returned to the calling program.
Errors Detected
None
Local Variables
HTHEAD
HTACTV
HTTAIL

Pointers to the table heads
Pointers to the table active entry
Pointers to the table tails

Program Interface
Entry Points
$HTCR
~:

Upon entry, register GO contains the count of the number of
tables active (remaining to be processed) at the time.

Exit Conditions
Return to caller if tables are collapsed successfully.
Exit to CALL/360-0S Executive if collapse is not successful, or if
tables have already been collapsed, and recompile the program. No
return.
Routines Called
$SVC

SVC Director

Global Variables
C Table
D Table
I Table
J List

Constant Table
Line Number Table
Initialization Table
Dope Vector List
399

$MCOL
C$ACTV
C$HEAD
C$TAIL
I$ACTV
I$HEAD
I$TAIL
D$ACTV
D$HEAD
D$TAIL
J$HEAD
R$TBL
FREP'l'R

Tables Collapsed Flag
C Table Active-Entry Pointer
C Table Head-of-Table Pointer
C Table End-of-Table Pointer
I Table Active-Entry Pointer
I Table Head-of-Table Pointer
I Table End-of-Table Pointer
D Table Active-Entry Pointer
D Table Bead-of-Table Pointer
D Table End-of-Table Pointer
J List Bead-of-Table Pointer
Pointer to Base of Register Table
Pointer to First Available Word in Compiler's
Variable Data Area

Logic Diagram
Chart 68 shows the detailed logic diagram for the Table collapse
routine.

400

TITLE:

COMPILATION WRAP-UP DRIVER ($MCWU)

Program Definition
purpose and Usage
Following generation of the object code, the Compilation Wrap-Up Driver
is called to perform the housekeeping necessary to prepare the code
for execution and start execution.
Description
This program is the driver for the second phase of the compiler.
such, its primary functions are:

As

1.

Call the various routines necessary to process the tables
generated in phase 1 and initialize the user"s area in
preparation for execution of the generated object program.

2.

Keep track of the utilization of space within the user's area
and, if necessary, go to the CALL/360-0S Executive to:

3.

a.

Get more memory.

b.

Through the Table collapse routine ($HTCR) or the Runtime
Library Loader routine ($HRTLL), terminate compilation when
there is insufficient space to continue processing.

Initiate execution of the object program.

Errors Detected
None
Local Variables
MCPID

Displacement from the communications area to
the start of the object code area.

MCINTR

Instructions moved into ARINTRP of the
commun~cations area for CALL/360-0S PL/I.
When
a program check occurs, the Executive transfers
to ARINTRP. The instructions moved in will:

MCPRGBN

•

Save registers 6-15 in the adcon area

•

Set the program mask from the second word
of PSW2sv of the communications area

•

Save the second word of PSW2SV in the adcon
area

•

Transfer to IHEERRA

Code which initializes registers and sets the
interrupt mask. This is moved into PRGBN of
the communications area at the start of
execution.

Program Interface
Entry Points
$MCWU

401

Exit Conditions
This routine contains eleven possible exits, all of which are normal
exits and from which a return is expected except as noted below:
1.

After the call to the CALL/360-oS Executive to initiate execution
(SVC11), control is returned to location PRGBN in the
communications area.

2.

During any of the calls to either the Table collapse routine
($HTCR) or the Runtime Library Loader routine ($HRTLL), control
may be returned to the CALL/36o-0S Executive and compilation
terminated if there is insufficient space to continue processing
in the userws area.

Routines Called
$HTCR

$HLNTP
$HCTP
$HSCAL
$HRTLL
$HDVTP
$HAINI

Table Collapse
Line Number Table Processor
constant Table Processor
Static Constants-Adcon Loader
Runtime Library Loader
Dope Vector List Processor
Adcon Initialization

Global Variables
UTT
L Table
$DBUF

User Terminal Table
Library Load Table
Number of Disk File Buffers Needed
(Ia maximum a3112 bytes each)

Logic Diagram
Chart 69 shows the detailed logic diagram for the Compilation WrapUp Driver routine.

402

PART 8 LOGIC DIAGRAMS

The detailed logic diagrams for the routines ¥bich perform QOIipl1ation
wrap-up follow.
PLII ltV STEMS MANUAL
,HUNI

•• •••••••••••••••
• SHAINI

...............

..

................

..'
:co:
.. x:CLEtMs:~a'
::
....."
:
eSREG

• •••••• ~, .....'!.

··.. .......,....:
.................
:

"

y

.. lNIUALllE:

..

·...............
.:
:
v

-SET PSPTA 1£1 ..

...............
.PT TO wD Pkt;L.

lSIct~¥)1.1(O

v .
.·..............
.

...............
C~irLNE!
YNA" Ct 0
AGE REA:
(LiNX J
..

..o

os TO

..

...............
y

o
0
-HHT THE TERM.
.. INPUT '"0 ..
.. GUnUT FILl 0

*c 2•••••••••••
NT.Ol eLK ..
••

•

v
·................
.
.. AtiEA t-ROM ..
• TH1~ POINT TO.

"

..

..••••• "...........
..

..

.

YES

Iof:i~ ••••: .......

:Ab\2~ ~~EE~OIi:

:l~u~i.fgo~.s

.•.•.••...••.0:.:

...............

":1~
. ••••¥•••••••.

·.... ...........

_C.Al

T Nur AO{IR*

• Ao* •• X_ JM.J..l,f'li::hT , •••••••••••••••••• ". n .. AO(.<'4 (JJ ..
... •• "
:Tu Ni:XT AU'-U,,:
::~Tt:11r.e~f~
................

0'0
o

:

• . . . . . . . . . Il' ...... .

·.. .............
v

"

..

·

i")L1tl I-IA:,

..

.

..
dtftlt
..
.. I" Ckcf'.t;~'Tf U oil

• • • • .f • • (o • • ,,~.~.

...

:

AND INIT

..

:

ASf~6NWE

y

""

.·..............
•

0

U'lTR.OL

..

BLOCK S

..

·• x •••••••••••••••••.

...............:
...............
:

V

I1A30

•

'"

1':1T HiE

A;)Cl~S

...

TO

...

*(,.>.JYEP THE (l8J"

-CUOI:: I:. CCIJNU"

·

•

.

................... *-""

..
*rt-:"
,

,
f[S

.,,~

~,;)t
~ ~

Chart 62.

'"

...... .... ..
0).

* ~,' . . ..
.* ••

L II\ .... TANTS •••• 'C
~"'

1:.,

-.~

....;:~
~

')

.,

;
".$ •• 4-"' • • • " "

..... ........
I

.• *,,' I
~

~,"'l

: ••• ~

"

Adcon Initialization (Page 1 of 2)

"03

PL/I SYSTEMS MANUAL
.HAlNI

. ..
.
....-...
*bO

"'*,*

*

.

HASO

*1 S TOTAL OF.YES
• PGS Of CODE •
AND CO~STS

.. GRTR TtiAN 15

•

* '"

?

..

~

~.

.*******.* •••••
·$GPUT

*-------------*
S[E:
..

............ .....

• • • • • • • • • • • • • • • JI;..

..

..

..

..

rut( nWlhc.
Nalt

..

"'

..

.. ,NlJ

v

.** •••• **"' .. ****...
OSE T ADCN$ fOR •
.. AOL..R-MUUSLt ..

..

LIB

•

WOR~

SPACt

•

..

*******.*******

·..

v

v
•·eXEC
••••••••••••••
-

•••••••••••••••

.-

.*---------*
..
-

·•••••••••••••••..
•

SET ADeONS

-GET MORE MEM ..
& RECOMPilE.

..

•

_FOR FIXED LWS.

·

it
•••••**••••••••

-.. .......i....... ..

..

,
• RESET PSPTR,
..

..

PSLTh ANLJ

•

PSRe-•*
,j

. ..

*

IS J = #I. 'JIIJlMf N5ION<; ?

~

'I<

·

v

YES

.

* ... *.-**.*******
* SU'1 = SUM * ..*
.. "'UlTIPLIE~

•****"'****.*****•*
..

406

Chart 64.

Dope Vector List Processor

IJ)

..

SUM = LOWFP"

..

*** *

*~~~lIpll~R : ... : C
. •....•.••.. ··f·X:•*••••••••••••••
***

IN

HAlO

..

H040

******.* •• ** •••

•..

•

•

•

**..

:.......... .

X:

•

*

•

.. ..
..
PICK UP
'B3* •• X* P01NfER TO

.

***.**.*.****.*

.

• YES
IS NO. OF
• PUT ACTUAL •
DIMENSIONS IN .. ·T· ..........
mn~?~
D.V.
O?
• DOPE VFC TOR •

*

*•

INIT IALIlATlON

..*

....
•

*.****•••• *.*.*

..*******£*******
.
..
\

••••• *•••**.

....
.BRANCH ON NO
-CO-•• X-OF DIMENSIONS.

*
•

* ••••.••

•

e:

Plll SYSTEMS MANUAL
$HLNTP

•••• ***
••
•• ********
$HLNTP

• ••••••••••••••• •

it

•••••• *** •••• **

*

•

•••• II'T TSl SEGH •

.***
• •• ** •••••••*

:x ...••..•••..•...

·

it

.

•••• ***********
MAC~INE

-MOVE

*

AOIJH. Tu NEw

.. TABlr; AkfA

•

•

~
~

•

**$*~**.*****:;'.

it

*.*.*****.*.***

•

*
*
*.. * ••• *****•• **
- LOCATE lI~E •
*NO. IN SOURCt*
- AND CONV TO
*PACKD LJ~CIMAl*

·

.

it

••• *.* •••• *.*.*
lIN~

'MOVE

NO.'

*YO NEw TAblE: ...
..
ENTRY
*

•••••••••• *.****•

it

***.* ••••••• ***...

*GNEXT

*-------------*
•
GET NEXT •
.. lAolE ENTRV ..

••• *** •••• *•••••*

•
Ur

•*

.......... :

• :.:
*LOAD TBl If\'OX*
*'

(I)

(CONT)

*

****>(-:t* ********

·

v

•

*

.

HR10A

******* ********
** fOR It-.lVOKEQ **' ... Y* .A~*'"
'*
E~TRY
*' ~ *
'*
*
***
*************"'*

Runtime Library Loader ,(Page 1 of 2)

*

2*

****

~O

HRIOA

*

***************

***************
*
•
'" INCkEMT PTk *
'>'TO NEXT JUMP *
* TBl ENTRY *
***************

**

HRTl TH=
HRTLTH +
*
* Lt-.NGTH OF *
*THIS kOuT INc ....

*
Bl*

*--

*YES

HR60

***~¥******"-'***

**....

-

IS If\lVOKED
ENTRY COUNT
o ?

***************

•

0

V

•

* COUNT BY I *
*
***************

***************
GET AGOR OF *
•
..
KOUTNE
*
•
CONWING
* E:NTRY (1) *-

***************

*.

***************
** TNCREMENT **
... *** *
** LOAD
TABLE * ••• X A~*
INDEX; (I)
:«
*
*

*.*************

:X •••.•••.•..••.•. :
it

•

•

it
***************
*• St:T ENTRY **
* PROCfSSE(J **
* FLAG (M)

f-uH LO MAP

•

*
*YES ****
**
- IS THIS LAST 0
0
ENTRY IN LPAO
*x0 AO • •
*02*X
*

'" -NU

*t>GPUT
*
*----------*
* i'RNT HDNGS *

*

HR90

*************.*
*
UP TOP *
**o POP
ENTRY [N
*
* PUSH-DOWN ..
* STACK
*
*********.*****

* *
•
*** 0

* *

*

~**************

it

"Rao

*YES
I; eNTRY
*
PROCESSD FLAG
*x Cl*
(M) SET?
•

*

*

•*

•

.**

z

PL/I SYSTEMS MANUAL
SHRTLL

...

•••••••••••••••
••••
•
•
• CLEAR ADCON •
•
• AO •• X. AREA ASSGNu ..
•
•
.DURNG SRCH TO.

•••

•

O'S

..

• INITIAL lIt

.

HR100

•••*•• *** ••••••

•• •
.••Sl·X• • IS

..
••

•
ASS('N
•
OADDk-MGDFdLE •
• L1o; "RK SPACE.

•••••••••••••••••

•

V

•

. ..

HRI70

•.

v

oo . . . . .

.*.*.***.* •• **.

•• RPlCE

•••• •

.NO

•*

THESe
.JMP TBl ENTS •
• W A PTR TO •
• ASSOC ADCON •

• •••••• *•••••**

:x ................ :

. .. •
•

HRI70

• .. ..
• •••••

• YES 0 . .
ROUTINE
.x CS.
LOADED & ADtN
FOR ENTRY
INlTtlD 1 •

0

• TlME LI B AREA.
••••••••••
**•••

•

-Nl

E~TRY

..
•

ENTRY III
*x CS •
• • INVOKED 1 . • •.n•
•• ••
• YES

v

*.** ••*.*.
••*** ••SET
••
PTR
I$RTLAI
•
•• STKT LF TO
kUN •

.

•

•

~

•••••••••••••••••••

•••••••••••••••

..

•

• Bu ••• X. LUAO TAbL'
.. •
•
INDtX IJI

•

v

Hk130

•
VARIABLE
*
*•• • • lOtTN
·CO.X
•*. • * •PTS INVOKED •1 * * •••
• • • *YFS

• ** ••••••••••••

..

••
.
• •

V

HIU50

••• *.*****
•*****
•
.INIT
FOR'
ADC~

M¥E~~ I~V~M

•
NM TBl
*
**.*.**********

• NO

v

. ••
•

•

..
• • •

v

******.* •• *****

.. .X**80.•

.YES

.•

Iu lOAI)
• • ROOM
LIBRARY 1

.. •

•

•••

·.

SI:E

FUlLOWING

•

..

•

•••• **NOTE
••••*••••..

·

**.**.*•• *.*•• *

.

•
•
**.**.*.***.***

...............

HRI05
V
• GH ACDR «IN.
.. COMPlR I OF
.. KOUT THAT
.CUNTAINS ENT
•

(..I)

·

HPll0

••

.

•

**

•

IS lOAD MAP

TO Be

••

•

*

•••••••••

*YE,

FOlUIWINb

•

NOTE

.**

..

1IlC*******."'*.***

.

'~fT FREPTR TO'
oPT Tn THE F~D'
*uF T"~ USEkS *

*****.*.**.*.*
..'"
•
AlLOC

..

*-------------.
•
SEE
..
•

•

tNCRE~F~T
..
•
)t'.LOAD TBl l~DX •••• )( Rl.
*TO NEXT I=TiTPY*
•
..

v

v

.***** ••• * •• ***

*5GPUT

.* •

*
A~EA
.**** ••••• *****~

1

•

v

·

oo • • • •

..*************.*
*..
*

**,,*****.**.* ••

~Nu

PRINTE~

~R100

•

•
*•• •
*.••......
*CS*x * IS THIS END
* OF LOAD TBl ? ..
••
•
•• •
*
* •YeS

..
•
•
•

•••••• ***.*****

v

END

ASSOCIATED •
• ROUT! NE HAS •
• BEEN lOADED'

*** •• ***•••••• *

GET MORE
MEMORY AND
START
COMPilATION
GVER

••••• ***••• *•••

..

*

THE kOUTlN~ •

•

.

V
**'-.********.**

V

*****.$.**.*****
..
• SET PTK TO *
• lOC TO LOAD •

*---------.

••

*

•
•
•
•

********.**** ••

v

•

• MRK CORRES
'lOAD TBl ENT
* TO I"~ICATE
• ENTS (CONTI

• Nu

•• *••••
•*********
EXEC

..

•

THIS MUST BE
AT A SINulE
WLJRii BOUNDARY

NO~ADOH.

:0<

.. MuO"3l LIt.. WPK SPACE.
* ~n IWNTI

..
•

•

..
or
•

.*;!jI:>o'.:e.*:e.****",*,*

*****.*****.*.*

,.... :;.:<

PKINT Lut (.t1ST ENTRY PT
IN ~UUTINI:

•.,.'"'TO

.

V
>1'*

*****+>".:«

$lw~4

THJ<;

TO Pl

Af •
.O.V. IN OOP . . .
..

•••• X C5.

....

..***********.****

**..*************.:0*•

*"-*****,,;.***..... *
..
MtJVt:
.. DATA/fOKMT ..
Ot:SCRPTk*
* TO ('lJNSTS *

ll' . . . . . . . . . . . . . . . X*ElMT

..

*

*

AREA

IS

..

****."'********.

TMI~

t"llI

.

I-TtiL ?

.. YFS

• NO

..

~

•

2"

••••••••• • It* 80

•

'.

"'**-

V

*.*.*~4~****"'**.•
*HOVE DtO/FED"

Hulk TYPt:

GREA TER THAN
ADWN

•

..

•*****.* ••• **:;;..••..

.. ••••••••••••• x

*vt:S

*

•

IS ENTRY DOPE
VECTOR?

"*

*

*

.. *NC

..

*....
x
...

TO ARCONSTS
tA

*

.

~.

.

**'"**********~ *'
~tJ STRING
..

..

SDV ? :t

'f.joj
*

~

**.

·

IS THIS

.. !)PE("IAl

..

C~*

'"

................ x.
'"

•

..
•

•••••••••• x*

**0:

•

PTR IN O.V ••••••••••••

TO PT TO
CO~ST AREA

..

•

****'t*** ..... ¥**

'"'

([J*

DISCR~EO

I-TSl E::NTRY,

IGNRE AND
GOTO NXT Tel
ENTRY

410

Chart 67.

Static Constants-Adcon Loader (Page 1 of 2)

PL/I SYSTEMS MANUAL

$HSUt

.....
•

*~O

•

** ••• *** ••••••..*

• bET

•• X*FIkST

.. *..
* ..
••

*
..

TO

PT~

J-LIST •

ENTRY

..

•••••••••••••••

*

•

* "YES

*

IS

•*

J LIST
"UlL 1

•

•...•....

• • •NO*

• • • * .YES
•
••
• • • DnCm~D *
*BZ.X
*•• * • •

ENTRY 1

*

. *•

.. *
•

........

:

NO

V

•IS

.

'''0•

STt.RAGt

t..t. "SS fOR
THI S rNTRY
• STATIC 1

· '" .

*••

*x•

*

85*

• •**. *

.. Vi:")

V

•*************>1 •..
• ADD vTk Tl' •
'THIS li.V • Tu ..

.. DUPl Vi:GTOH. ..

TBl
•*** ••*.*.****:e..
•

..

•

..

*.

v

..

b~*

•*

•

*•• ******.*~.~*
* Ml.!Vc: uuPt: ...'"

..

.... x*

VI:c. 10K TO

,.

..

CONSTANTS

..

...

..

Ak~A

••• ********.***

:x .........•..... ::

·.*•••

*" -v"

"<;,;1",**,,"*

,

• bti PT~ TO
.. NEXT l.IST
..
ENTkY

•
..
..

•*.*.********* ....•

• ••

•
•

• *x. •••
•
62'

*NL

. . .....

IS Thl, END
Of J-li "T ?

, •YES

.x ................................ ...

·...... ...."'....
~

V

_

•
F'1;t LUJMMY
..
>l'LA51 l-~TRY 1Jt-*

.. ALL 0' S If'..! ..
*LJPt: 1I1:e. T Tt'\l ..
***lC-**~"'*."~~*

•

Chart 67.

Static Constants-Adcon Loader (Page 2 of 2)

411

PL/I SYSTEMS MANUAL
SHTeR

..•. ••••*******•••• •••
SHTCR

••• ** ••••••••••

v

..................
.. v
.. ..**8~ .
. ..
..
.. :*.~.
.. ..
HTltO:
*
*
*
*YES
*
**
IS HTfPTR
*
*
*
*x
.. :
LFSS THAN
-C1-X
RSTBL ?
*
* *
*.
*
*
*
* NO

** ••••• **.*.* ••*

....

•*

* INITIALIZE
*
*

*

••••••••• *******

.

*

.. v

--

HT40

.YES
*

•****

*

****

IS SMCOl SET
. • NOT
EQUAL TO

.

ZERO?

-

*

*

*
*

.. .

*

*
• NO

it

•

*

-

* • *NO

-

TO NEXT
*
*J-lIST ENTRY -

-

. . ..

*YES
*

..

*.* •

*x BO ..
* 2*

*•••

*

.. ..

.. •

HT50:

.. .. *NO

.. ..

..

••••

it

*CAlC ADO~ TO *
*HOVE NEXT ENT*
* TO & SET
(CONTI

.

..******.*.******

•*.*.***********•

it

it
***************

************
..•••
..•
•

.

**

HTFPTk=STRT
.Of THIS J-lST*
*
ENTotY
..

*HTFPTR.=HTFPTla

..***************

.- ENTRY lNr.TH.

.. **•• ****••••*
....

it
••• *•••••••••••

.. .x.*. .

~ET
•••• Cl.
*J$HEAO=HTfPTk*
•
•

..
..
*.*************

it

..**
. .........*.•

it

.....

*

.YES ****
*
*
*
*x RO * .:
IS POINTER =
*
0 ?
* 2*

*
***************.
*MVE 1ST J-L!S*
*ENT AUJCNT TO*
*lST I-TSl ENT*
ICONTI
*

•*

•

****.**********

HT50

IS J-LlST
NUll ?
*

****2***** ••..
••••
• PICK UP PTR ..
..

..

.. x 86 ..
2*
*

***

it

..*.***********.*.
.PUINTEP 111= *
*
.. HTfPTR •
..

StT NEXT

.
..

************.**

it

•*.*.,1<***********
•
'" MOVE FNTPY *

*(T+1) TO NEW
..
LOCATION

*
**•• ************•

412

Chart 68.

Table Collapse (Page 1 of 2)

.

* ••••.•.•••

2

PllI SYSTEMS MANUAL
SHTCR
HT50

•••••••••••••••
••••
•• BO•.. X.• CNT • CNT-l •••
•••••
• •
•
••••••••••••••••

HTlI0
•••••••••••••••
• • • • .YES
•
•
•
•
•
•
• • IS CNT = 0 1 • •••••••••••••••••••••••••••••••••••••••••••••••• X:~ij~A~M'fgL Z~~~:•
••
*
••••••••••••••••• • •NO•

V
...............
•
•

v

HTbO

•••••••••••••••
••
••

• p 'CK UP NEXT •
*SEGMNT PTR OF• ENTRV III Of
•
TBl "NT!

•

*'

*

•••

•*

•

• • *
.S3OX

•

... *
•

• .YES
•

..
..,.. .. .....
..•••••••••••••••

HTSO

HT50

.•••••••••••••••. .*.

I S NEXT
. . . . . . . . . . . . . . . X*SH STAll AND . . . . X 80.
o SACTV IC~TI 0
•
0
0 POI NTE~ = 0 ? •

..

FREPTR

HTFPTP

=

0

..

*
0
•••••••••••••••

•••••••••••••••*

* *NO

v

o
*o

••• *•••• *******
RETURN

•

o

••••••••••••• *. •

v *•••••
•••••••••

••
.,

••
"
*
••••• * •• ***".*.*•
HTFPTR:=

o HTFPTk-256

'"

•o

•

*

*

*

.NO

IS HTfPT LESS
THAN RSTBL 1

**
*

..

•VES

*

*
*

..••• ,;."'''' ••••• ** .......

'"MOVE SFGMEf\T.

................ X. AND ADJUST
•
LIN~AGE

...*
*...
•

* ••• X P3*
•
*

.,•••• ,. ••••••****..

V
*** •• :t",,*** ••• #;*..
*EXt.C
*------------*
086 •• X.GET HOWE MEM *
• * • G R~ASSEMBL •
***.
...
Hi40

.....

.. ..

...............
v

•.. * •••• ********.*
tNO
•

Chart 68.

Table Collapse (Page 2 of 2)

41:t

PllI

MANUAL

~VS'EMS

SMC~U

•••• * •••• ******
•..
*•
$HCwU
• •••••••••••••••
•

................•

••

o

0

•

•

•

•NO

o

•........

*

**••••• *****.***

*-------------*
• CUlPS[ J-lI s*
&.

o

'"

•*** •• **********•..-

*$HTCR
•

AH.RAV ANO

STRIt-4GS

v

**

o o

•

*'

0

SeT $AU

OYES
o
o
ROOM FO"
o ADtON AREA? •

I-TBL

..•

***.***********

*•

•••••••••••••••

•

o

* * ....... .

II TAi..Ill: ?

•

*

v

ROOM .... OR LINE:

4TH WO Of

.STATe AREA TOO
OPT TO (CONTI •

v

*
•
.****** ••*•••• *

.YES

0

.******
•• *** •••*
•

•

•

••

•**** •••••• *****.•

v

*

•

v

••••••••••••••••
••
•
• ~ET UNTA *
•*•••••••••••••••••

•••••••• *••••••
** SET $SASA & ••

*00* •• X*

...............

V
•••• *••••
*.*.*.
••• INI TiAL- **
•
* IlATlON ***•*
••••••••••••

*

•** •

'SHCTP

•• co•••
* x.*------------*
PRoe C-TBtS •
• •
. . . .oSLD C~S AREA **

************** •*'
*-------------*
* PROCSS ufJPF ..

*$HOVTP

VEeTJ"
•****************
••
TA~l

v

***************
•.USE $OeUr TO •'"
*'*rnK
ALlOC SPACE *'
O!IlK 1/0 *
*BUFR S (CUNT) *
******* *** *****

NO

: x ................... :
"1C4~
V
.4<*****JIt****.*.*
o
•
o
0

v
••••••••• *•• *.*
*
*-------------*
*~i:E fLlLlUl'ilNC,*
..
NUTF
*'•
o
·SHTeH

·

.. CLt:AR

..

********* •• ****

.

ADCUN •

AKfA

*

**.************

v

ClllLAP$1:

o

to I,C,
TABLE!;)

•
..

HllLDWING
NOTE

V
******** . . o;r.::****

•

*

******.**.*****

.

*ANO !lofT $lOBAIC<

.TO PT T'l

**'

!\P F

I'

THI~*

*

•

***************

V

'tCfJO

*****.*********•
.-------------*
..
SEE
..

*"MSCAL

J-ll~T

·

**•• ***.
ALL0C**"'*****
0Y~!
...

*Sl[M ARE/\ ANv*
*SET tD$AA 1 [l
.. PT TO fOil S *

*'

•

AR E l

..

***************

:x .••.•••......••. :
V

MC20

....... "'****4-*«.

*"HlNTP

..

*¥(

*-------------*

t'j.

.. PJ.t.UC U-TdLf. ..

.. tlLu Llt>t"rBl ..

o

lAR::.f

J-lIST, RUlLO
AnCO~ AI{EA

•

•••••••••••••••

tI'fOlJ('rl

..................

CON5UNT,
ARt:A 7

.. to. 1,(..,

Tlil

.-

):.

MC30

~

Chart 69.

*

*

•

*.*

..

*

***********:t**1-

V

******* ********
*$HR TLL

..

********·;<.Jct ... ""*~

·

.

*-------------*
*
1,1- T

*

*

*EXfC

~.

• AUlJIT laNAl
•

*

SPAce
******>'1** ,~***"

.

• "< • • • • • • • • • •

v

**** ..

....

•• **** •• *******

414

TBlS AREA

**.******.*.***

*A/'.ilJ CONSTANn.* .... x <..0.

..

*

*

V

AReA

·

......................... ..

******.*******.~
...eLlAK
SIATle"
..

v

******* **¢.t>.***¢
• CALC "'JU. OF- ...<
..
AJ')"l1.
'"
* 2()'tti-rHTI;:
.. l1l1c.S "tl::l-or; *"

*-------------*
* LUAu lIAKAM,V*

•••• ******* .. ****•

.. ....

.
.

,I

• ****** *******.

v

•

********
••• ****"*
*ShlCr{

*-------------*
.. COlP~f J-ll ~*

:(1: . . . . . . . . . .

*SET FREPT;< TO*
*STRT OF FIXEu*

• ******.*******

•NlJ

..

v

·

S

?

*

KUOM f-Ul{

*'

U<:ER ~'H A

f}Cr:)!:i 1TAblE,

** •• >It.,* •• *.***.
**AlLLC :)PC FOR**

.. *** ..
*STATIC ARH.AYS* ••• X 00*
*f.. STR~G srORlit:
* *
************* •••*
***

Compilation Wrap-Up Driver (Page 1 of 2)

~C70
V
*.*.**"**-:<~****
*$HAINI
* •
*-------------*
* INTT ~U(-'S * ••• x
*TQ TkUf-

*

hl)k"-

*..

********~("*:I.'""l>**

~

.

••••••

,,*"* ..
•• •••z* *
~G

PL/I SYSTEMS MANUAL
'MtWU

...• •

*110 *

• *0
••

•

*

••

•*

*

oYES

o

DEBUG VERS ION

o

•

7

•

*

•

0

••••••••••••• x

• • •NO

•
••
U

••

•*••

.

................... X:•••••••••••••••:.. ••• ..: 81:.
.
..•••••••••••••••..
•
.. YES

SIZE INFO
WANTED?

•• •
*NO

..

PRI~~Fa[IE

..

...
•••

·•x••••••••••••••••••••••••••••••••.

....

v **
•••••••••••••

..

..

..

Sf PTR TU

..
..

• bl* .. xoWNST AREA INo
•
•
.1ST WD Of DYN.
••
• STURGE AREA'

•••••••••••••••

v
.................
•
•
*INITLZE
•

WO~

TO HANULt

•
•

•
AKITH
•
*................
INTEKHUPTS •

v ** ••
............
•

INlTlAlIH

•

.. CODE TU S1:1 ..

.. UP KE:G 4.Nll

..
..

SJAKT

~Xt:('UT10N

..

..
..

***** .......... .

v

** •••• ***** ••••..

*l:XlC

*------------*
* Cl~AR PKINT •

..

•

8Ufft:-1oI:

..

•

• **** ••• *******

v
*I:XEC
..
•..-------------*
SH:
..

• • :to • • • • • • • • • • • •

..
..

fULllJwlN6
Nult:

..
..

•••••••••••••••

:llt..NA.l
-CuMPll4TllJN
(.lIMIILE:TE:.· £
~TAKJ

.
•
*

Chart 69.

E:'(FCIJTk

v
...............
••
It.u

*.* •••• **** •• ** •

Compilation Wrap-Up Driver (Page 2 of 2)

415

PART 9 - SUPPORT
CALL/360-0S PL/I routines which perform support functions for other
routines are described in this subsection. The routines are discussed
in alphabetic order according to their mnemonics~ as shown below.
Detailed logic diagrams for the routines appear at the end of the
subsection.
Array Expression Error ($AREXP)
compiler Error ($CERR)
output Director ($GPUT)
Get Next Triad Entry ($GTRIAD)
constant Processor ($NCONS~ $NCON)
constant Conversion ($NCVT)
Library Search ($NLSIB)
Segment Management ($WBACK, $WSTEP, $WEXP, $WCTCT)
Error Message Editor ($XERR)

416

TITLE:

ARRAY EXPRESSION ERROR ($AREXP)

Program Definition
Purpose and Usage
The Array Expression Error routine is used to generate the error message
for an array expression in an illegal position. A value of zero is
substituted for the illegal expression.
Description
An error message is output. The result fields from expression
processing are set to a fixed-point zero.
Errors Detected
ARRAY EXPRESSION ILLEGAL. (23)
Local Variables
None
Program Interface
Entry Points
$AREXP.

No parameters.

Exit Conditions
Normal exit.
Routines Called
$XERR

Error Message Editor

Global Variables
$NLTKN
$NLOPN

Expression Processing Results
Left Operand Area of Expression Processing

Logic Diagram
Chart 70 shows the detailed logic diagram for the Array Expression Error
routine.

'-'0.

417

TITLE:

COMPILER ERROR ($CERR)

program Definition
Purpose and Usage
The Compiler Error routine fields all hardware interrupts caused by
the compiler. It also accepts calls from points in the compiler where
an unrecoverable error is detected.
Description
A message indicating the offset inside the compiler phase where the
error was detected or generated is printed on the terminal. Compilation
is then terminated.
The format of the issued message is shown below.
PLliixxxxxx:

INVALID SOURCE PROGRAM--COMPILE TERMINATED

If ii = 00, $CERR was called by a compiler module. xxxxxx will be the
hexadecimal offset from the beginning of the compiler to the beginning
of the module that called $CERR.
If ii ~ 00, $CERR was invoked because of a program interrupt, and ii is
the program interrupt code. (See IBM System/360 Principles of Operation
(GA22-6821) for the meaning of various program interrupt codes.)
xxxxxx will be the offset from the beginning of the compiler to the point
of interruption.
Errors Detected
(iixxxxxx) PROGRAM ERROR - COMPILE TERMINATED. (11q)
Local Variables:

None

Program Interface
Entry Points
$CERR. This entry is called by compiler modules which detect an error
warranting cessation of compilation. Register C3 contains the address
of the origin of the module that detected the error. The high-order
byte of C3 is zero.
$CERR+q. When a program interrupt occurs, the Executive transfers
to this entry via instructions beginning at ARINTRP in the
communications area. The l~order three bytes of C3 contain the
machine interrupt address. The high-order byte contains the program
interrupt code.
Exit Conditions:

SVC 0 to CALL/360-0S System.

Routines Called
$GPUT
$SVC

output Director
SVC Director

Global Variables
$BASE

Base Address of Compiler

Logic Diagram
Chart 71 shows the detailed logic diagram for the compiler Error routine.

TITLE:

OUTPUT DIRECTOR ($GPUT)

Program Definition
Purpose and Usage
The Output Director places a 120-character line in the terminal I/O
buffer. While doing this, it removes trailing blanks and checks for
line width.
Description
A 120-character line is processed and placed in the terminal I/O buffer.
If there is insufficient space in the buffer, it is emptied first.
Trailing blanks are removed from the line. If the line exceeds the
line width, it is broken into segments of the maximum length. Before
return, the line is cleared to blanks.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
Normal linkage to $GPUT.

Register P5 has address of line.

Exit Conditions
Normal exit.

All registers restored.

Line cleared.

Routines Called
$SVC

SVC Director

Global Variables
None
Logic Diagram
Chart 12 shows the detailed logic diagram for the OUtput Director
routine.

419

TITLE:

GET NEXT TRIAD ENTRY ($GTRIAD)

Program Definition
Purpose and Usage
The Get Next Triad Entry routine gets the next available entry in the
triad table (Z table).
Description
The Generate Triad macro (GTRD) calls this routine to get the next
available entry in the triad table. When the triad table exceeds a
segment (256 bytes), a call is made to $WEXP to link another segment
to the triad table.
Errors Detected
None
Local Variables
$XSAVE+4
W$CGTR

Save area for register C2
Save area for register Cl

Program Interface
Entry Points
$GTRIAD
Calling Sequence
L
BALR

Cl, 8GTRIAD
Cl.Cl

Exit Conditions
P5 contains address of triad entry.
Routines Called
$WEXP

segment Management

Global Variables
None
Logic Diagram
Chart 13 shows the detailed logic diagram for the Get Next Triad Entry
routine.

420

TITLE:

CONSTANT PROCESSOR ($NCONS, $NCON)

Program Definition
PUrpose and usage
The Constant Processor controls the conversion of source constants,
immediate constants, DED constants, and other compiler-generated
constants.
Description
The constant is converted to its binary representation if it is an
arithmetic source constant. Alphameric constants longer than 16 bytes
or containing primes or split over source lines are not converted until
compilation wrap-up. Each such constant is given its own constant
table (C table) entry. After any required conversion, the constant
is searched in the constant table to determine if the constant has
been previously entered. If found, that constant table entry is
returned for the constant. If not found, a new entry is added to the
constant table. Storage is allocated for the constant in static and
constants storage. Alignment is dependent on length. A length of
four is word-aligned, lengths of eight and 16 are doubleword-aligned,
and all others are byte-aligned. The constant table is divided into
four lists for searching: those of length four, those of length eight,
those of length 16, and all others.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$NCONS. When entered through $NCONS, register GO contains the fullword
value of the constant to be searched.
$NCON. When entered through $NCON, the value of $NXFLG indicates the
type of call. If zero, register G1 contains the length of the constant
(in bytes) and registers Fi and F2 contain the converted value. If
one, register P5 contains the address of the operand area of a source
constant. If two, the left and right operand areas contain the real
and imaginary parts of a complex source constant.
Exit Conditions
Control returns to the calling routine immediately following the
invoking call. Register GO contains a constant table pointer token.
The floating-point registers are destroyed if the constant required
conversion.
Routines Called
$NCVT
$WEXP

Constant Conversion
Segment Management

421

Global Variables
$ASC
$ERROR
$ NC1W
$NC2W
$NC4W
$NDIG
$ NOTKN
$NROPN
$NXFLG
$VLPAK
A List
C Table

Offset to Next Available Byte in Static and constants
Area
Parameter List for Error Message Editor
Bead of Chain of Constant Table 4-Byte Entries
Bead of Chain of Constant Table 8-Byte Entries
Bead of Chain of Constant Table 16-Byte Entries
Floating-Point Value of Digit of Source Constant
Expression Processing Results
Right Operand Area for Expression Processing
Communication Flag
Doubleword-Aligned Work Area
Dictionary Attribute List
Constant Table

Logic Diagram
Chart 74 shows the detailed logic diagram for the Constant Processor
routine.

422

TITLE:

CONSTANT CONVERSION ($NCVT)

Program Definition
Purpose and Usage
The Constant Conversion routine converts a source constant of any
arithmetic type to any arithmetic target type.
Description
The dictionary attribute list entry of a source constant contains the
type, scale, and precision of the constant as it appeared in the source
program. This entry also contains the attributes required for the
constant in the object program. The source constant is scanned and
converted to an intermediate double-precision floating-point form.
This value is then converted to the largest type with real mode.
Errors Detected
CONVERSION OF CONSTANT PRODUCES EXPONENT OUT OF RANGE. (98)
CONSTANT VALUE OR PRECISION TOO LARGE. (99)
Local Variables
None
Program Interface
Entry Points
$NCVT. The address of the dictionary attribute node of the constant
to be converted is in register P4. Register P5 contains the address
of the operand area which contains the sign to be applied to the
constant.
Exit Conditions
Control returns to the calling routine immediately after the invoking
call. Register G2 contains the length of the converted constant.
If the length is four bytes, the converted constant is returned in
register GO. If the length is eight bytes, the most significant half
of the converted constant is returned in register GO and the least
significant half in register Gl.
Routines Called
$XERR
$WEXP

Error Message Editor
Segment Management

Global Variables
$ERROR
$NDIG
$NOPI
$~PM

A List
Z Table

Parameter List for Error Message Editor
Floating-Point Value of Digit of Source Constant
Field of $NO
Doubleword-Aligned Work Area
Dictionary Attribute List
Triad Table

Logic Diagram
Chart 75 shows the detailed logic diagram for the Constant Conversion
routine.

423

TITLE:

LIBRARY SEARCH ($NLSIB)

Program Definition
Purpose and Usage
Given the number corresponding to a library entry name and the number
(minus 1) of parameters used in the call to the entry, the Library
Search routine returns a pointer to the adcon that is to provide cover
for the entry.
Description
This routine returns (to the calling
that will contain the entry point of
loading, library routines are of two
routines and variable adcon location

routine) a pointer to the adcon
the routine at runtime. For
types: fixed adcon location
routines.

For any fixed adcon routine, the adcon that will contain the location
of the routine will always be at the same displacement in adcon storage.
The adcon displacement for a variable adcon routine may vary for
different programs.
Furthermore, all fixed adcon routines will store the same parameter
table. Calls to library routines may require the passing of arguments.
In such cases, the actual arguments or the locations of the arguments
will be put into entries in the parameter table, and the location of
the parameter table will be passed to the particular library routine.
For a variable adcon routine, $NLSIB allocates storage sufficient for
a block adcon area (BAA) from the available adcon region. After the
routine is loaded, this BAA will contain the location of the routine
and an area reserved for passing arguments. Since this is a special
use of a BAA, remaining fields of the BAA will not be used.
Note:

Recognition of two types of library routines saves adcon area.
The fixed adcon routines are most frequently used. A word of
the adcon area is permanently reserved for each of these
(regardless of whether a particular routine is loaded). A
variable adcon routine requires much more adcon area. However,
an area is reserved for a particular variable adcon routine
only if the routine is actually loaded.

A check is made to determine if the adcon for the entry is in a fixed
place in the adcon area. If it is not, the library load table entry
corresponding to the entry name is checked to see if the required BAA
has been assigned for the entry name. If the BAA has already been
assigned, a pointer to the start of this BAA (with the library base
code in the high-order byte) is returned to the calling routine. If
the BAA has not been assigned, it is assigned: the pointer is placed
in the library load table entry corresponding to the entry name, and
the pointer (as described above) is returned to the calling routine.
If the adcon for the entry name is in a fixed place in the adcon area,
a check is made to see if the present parameter table (pointed to by
$PARAM) is large enough. If so, the library load table entry is set
to point to the adcon and the adcon pointer (with the library base
code in the high-order byte) is returned to the calling routine. If,
on the other hand, the parameter table is not large enough, a new table
is allocated before setting the library load table entry, etc., as
described above.
Errors Detected
None
424

Local Variables
None
Entry Points
$NLSIB
Input Parameters
GO.
G2.

One less than the number of words needed in the parameter table.
Library load number of entry name.

Exit Conditions
Normal exit.

Return to caller.

G7. Pointer to adcon for the entry name with the library base code
in the high-order byte.
Routines Called
None
Global Variables
L Table
$BADCN
$PSIZE
$PARAM
L$LIBX

Library Load Table
Length of Adcon Area
Length of Current Library Parameter Table
Address of Library Parameter Table
Adcon Displacement

Logic Diagram
Chart 76 shows the detailed logic diagram for the Library Search routine.

q25

TITLE:

SEGMENT

MANA~MENT

($WBACK, $WCTCT, $WEXP, $WSTEP)

Program Definition
Purpose and Usage
The ~egme~t Management routines provide the necessary bookkeeping
serV1ces 1n support of compiler macros which manipulate expandable
table segments.
Description
The inline code generated by the compiler macros which process
expandable tables must, under certain conditions, step from one table
segment to another. Since the amount of coding required for these
operations is common to all tables, and is somewhat lengthy to generate
inline, the necessary functions are isolated as independent subroutines
as follows:
$WBACK

Proceeds from one segment of a table to the preceding
segment I the old segment is retained as part of the
table and is not released to the free pool.

$WCTCT

Releases a segment from the table to the free pool and
adjusts pointers to the preceding segment.

$WEXP

Adds a new segment to the table and adjusts pointers
to it.

$WSTEP

Proceeds from segment of a table to the succeeding
segment, where the succeeding segment was already part
of the table.

Errors Detected
None
Local Variables
$XSAVE

Save area for register C2

Program Interface - $WBACK
Entry Points
$WBACK
Calling Sequence
CALL
DC
DC

WBACK
AL2CCSEGSZE-S)/taL*t8L+Q)
AL2(t$TAIL-$TAILS)

where t is the table-prefix letter for the table to be used.
The first constant indicates the number of unused bytes at the end
of a segment; segment size is not usually evenly divisible by item
size. The second constant gives the relative distance of the pointers
for the called table into the tables of segment control pointers.
Exit Conditions
Segment control pointers t$CURR and t$CURR+Q are updated to pOint to
the beginning and end of the segment now active. Register G6 pOints
to the beginning-of-segment control word of the new segment. The

Q26

condition code is set to zero if an attempt was made to back off the
first segment of the table; otherwise, it is nonzero.
Program Interface - $WCTCT
Entry Points
$WCTCT
Calling Sequence
L
CALL

P5,t$TAIL
WCTCT

Exit Conditions
The released segment is chained to the free segment list (SEGLST).
t$TAIL is updated to point to the current segment end. The condition
code is set to zero if an attempt was made to release the first segment
of a table; otherwise, it is nonzero.
Program Interface - $WEXP
Entry Points
$WEXP
Calling sequence
L

CALL

P5,t$TAIL
WEXP

Exit Conditions
Register G5 points to the top-of-segment control word of the newly
added segment. The macro code will store this into t$CURR. Register
G6 points to the first available data space in the new segment. The
macro code will store this into t$ACTV. Register G7 and t$TAIL pOint
to the end-of-segment control word of the newly added segment. FREPTR
or SEGLST is updated, depending upon whether new space had to be
acquired for the new segment or a previously freed segment could be
used. If insufficient space remains in the user's area for the creation
of a new segment, an SVC 6 is issued to restart the compilation with
more space.
Program Interface - $WSTEP
Entry Points
$WSTEP
Calling Sequence
CALL
DC
DC

WSTEP
AL2(expression)
AL2(t$TAIL-$TAILS)

Expression has the value X'FFOO' for the I table and C table. Items
in these two tables are variable length, and computation of values
for t$CURR must be handled separately for these cases. For all other
tables, expression has the value (SEGSZE-S)/taL*tiL and represents
the number of unused bytes at the end of a segment. The second constant
gives the relative distance of the pointers for the called table into
the tables of segment control pointers.

427

Exit conditions
segment control pointers t$CURR and t$CURR+4 are updated to point to
the beginning and end of the segment now active. Register G6 points
to the beginning-of-segment control word of the new segment. The
condition code is set to zero if an attempt was made to step beyond
the end of the tableJ otherwise, it is nonzero.
Global Variables
SEGLST
FREPTR
$SEVCT
$ACODE

Pointer to Beginning-of-Segment control Word
Pointer to First Available Word in Compiler's Variable
Data Area
Total Number of Error Messages Produced
Pointer to Next Available Byte in Object Code Area

Routines Called
None
Logic Diagrams
Charts 17 through 80 show the detailed logic diagrams for the segment
Management routines.

428

TITLE:

ERROR MESSAGE EDITOR ($XERR)

Program Definition
Purpose and Usage
The Error Message Editor constructs, parameterizes, and prints a
diagnostic error message in response to encoded calls from other
compiler routines.
Description
Upon detection of error conditions, compiler routines use the Error
Interface macro (GENER) to call the Error Message Editor. (See Appendix
C.) The calling sequence supplies information which allows the editor
to obtain the source line and column number at which the error was
detected and to insert variables into the main text of the message.
The GENER macro sets pointers and strings into a communications area,
$ERROR, as follows:

r-------------------------------------------------------,
$ERROR

Pointer to Error Token

+4

Parameter-1 Pointer

+8

Parameter-2 Pointer

+12

Parameter-3 Pointer

1------------------------------------------------------1

+16 1

1

Character String (8 bytes)

I

1

L---------------______________________________________

+20 I

--J

The pointer to the error token is always present. By analyzing the
segment of the token table (T table) which contains the token pOinted
to, the Error Message Editor is able to obtain the number of the column
in the source statement which contains the first character of the
syntactic unit at which the error was found. The Error Message Editor
then scans backwards through the token table until a new-line token
is found; this token enables the source-statement line number to be
obtained.
The three parameter pointers are optional. If no character string
is given, the first parameter with a zero pointer ends the parameter
list. If a character string is present, it becomes the value associated
with the first parameter with a zero pointer. Parameter pointers point
either to tokens or to dictionary name list (N list) nodes. The tokens
represent delimiters, identifiers, or constants. In each case, the
Error Message Editor ultimately determines the length and location
of an appropriate character string for each parameter; these strings
are then inserted into the main text of the message when called for.
Each message is identified by a message number obtained from the calling
sequence.
429

To conserve as much space as possible, the texts of the error messages
are encoded. The first byte of a message text contains the severity
level code for that message. Thereafter, the message format is
determined by control bytes which the Error Message Editor scans and
interprets as follows:
0001nnnnnnnnnnnn
Immediate Data:
message.

Insert the following n+l bytes of text into the
0011pppppppppppp

Remote Data: Insert into the message the data found at displacement
p in the text table. (Location p must be a control byte for immediate
data.)
0100pppppppppppp
Transfer: Continue the scan of the text at the control byte found
at displacement p in the text table.
0111nnnn
Parameter: Insert the character string associated with parameter n
into the message.
00000000
End of Message:

Stop scanning the text and print the completed message.

To further conserve space, the messages are constructed from a
standardized set of words and phrases, which minimizes the amount of
immediate data required in the encoded texts.
The Error Message Editor also maintains a variable, $SEVCO, which is
the highest severity level encountered during compilation. This code
is used to suspend execution when fatal errors have been detected.
If insufficient space was allocated to the compiler, preventing
completion of compilation, the compiler requests additional space from
the CALL/360-0S Executive and begins compilation of the source program
again. Onder these circumstances, any error messages printed during
the first attempt will be printed again on the retry. TO avoid user
confusion that would result from this situation, the Error Message
Editor maintains a message count, $SEVCT. When a retry is attempted,
this count is moved to NOERMSG. The Error Message Editor will not
print a message until $SEVCT (the current compilation count) exceeds
NOERMSG (previous compilation count). This insures that an error
message appears only once, regardless of the number of recompilations
needed.
Errors Detected
None
Local Variables
XDP1L
XDWORK

430

Table of parameter pointers and lengths
Miscellaneous work area

Program Interface
Entry Points
$XERR

Calling Sequence
L
BALR

DC

C1,aHERR
C1,C1
AL2(message-number)

$ERROR area must be preset with pointers and strings by use of the
GENER macro.
Exit Conditions
control returns to the caller immediately following the invoking
call (plus 2 bytes).
Routines Called
$GPUT

Output Director

Global Variables
$SEVCO
$SEVCT
NOERMSG
$VLINE
$VLPAK
$ERROR
$LLINE
FREPl'R
T Table
A List
N List

Highest severity Code
Total Number of Error Messages Produced
Number of Error Messages (Communications Area)
Print-Line Work Area
Doubleword-Aligned Work Area
Parameter List for Error Message Editor
Last-Line-Number Pointer
Pointer to First Available Word in Compiler's Variable
Data Area
Token Table
Dictionary Attribute List
Dictionary Name List

Logic Diagram
Chart 81 shows the detailed logic diagram for the Error Message Editor
routine.

431

PART 9 LOGIC DIAGRAMS
The detailed logic diagrams for the support routines follow.

Pl/J SYSTUIS MANUAL
SARf.I(P

...............

...............
SAI(EXP

.•.......•.......
----- ------.
•
-eRROR

•

...

...............
•
•

ARRAY exp

•

lLl~GAL *,23 •

·.................
v

..
!:oI::T
• t;XPRESSlUN

•
..

...............
•

•

RESULJ

ZERO.

TO

•

..

v
...............
...............
RETURN

Chart 70.

432

Array Expression Error

PL II SYSTEMS MANUal

SCfRR

••••••••••••••• •
steRR
•
••••••••••••••• •

v
••••••••••••••••
•
• tALE OFFSET •

: ~~o"omLH :
•••••••••••••••••
v
•••••••••••••••••••
•

•

PKEPlRE

•

MESSAGE
••••••••••••••••
••

.......
i.......•
• 'GPUT
*-------------*

•

OUTPUT

•

MESSAGF
*•
••••••••••••••••

•

••

•

• DEBUG
••
•

t

• YES

?

•
• • •NO•

••••••••••••••••
.UADU~

• t . . . . . . . . . . . . . . x:*-------------*
DU:~F~SER
:

VERSION •

•••••••••••••••••

..

.

.x •.•••••••••••••..•.••••••••••••.

:

v
•••••••••••••••
s~m=NvT~

:

• •••••I¥i~...... •

Chart 71.

Compiler Error

433

"LII SVHFMS MANUAL
Sr,PUT

• • • • • • • • • • • 'F- • • •

............ "'.
• CPUT

,

.

ov£s
1~60-0S1

fAll

..c .•.•••.•.•.••

••

"" •••••••••••••• )'.

RF"KlV[

•

8laNt(<;

•

Tfo'41LrNG

...

...

•••••••••••••••••

,
• NO

O/~

V

• • • • • '"t.OIl'.oI"~ ... " .

••

·

tpn
•

••••

't

.

!CC".c't.C"~.("':c"

·
·
•

~~T,.H~~

•
:•

~.4

•V

·•

v

.••

............. c:* •

•

•
CALCULATE
'" l''''f WIDTH

*•

• ••••••••• * ••••

.
.

.,tI'oc.~'''~

HANK OUT

L IHE;

:
'"

• t ••• ~ ."'~ ~."'.t"t

·•
•

R.OOM 11\1
TFPMINAL

P !lUI>!<

* Nil

•

8UFFEP ?

..

... ............
".

•*

·

* ....•......••. )(.E~PTY

"

..•

SUrF(A. ..

•••••••••••••••

•

vr~

.

.

• y ••••••••••••••••••••••••••••••••

•

t'

~

......

*Ab~ ••

•

•• *•••
..

:II

•

f'~

PUOlO
•••••

•

...

V

• ••••••••••••••

*'•

.

MPVF X

...

.
...

"*AL1VANCE P1R X•••••••••••••••••• )(.rW'"PACJf:RS Til •
..
rHAItAfTfR
•
*'
rMAUF
II<
~

• • • • t-Cr ........ >:lC"Il' • • '"

•••••••••••••••

V

•••••••••••
( •••
•
•
•
..

'(-

1fI,1<;[IH

NE~

LI\lF
(IiARACTlJ:

*• ............... '1
•

*
ALL 0': LIN&:
U"fO ?

................

't"

•

...

.,.,n•

•

• Afo*•

.)1"

*••**

*
..

·•

*VF S

v

• • • • • • • O'* • • •

*

..

•

Al A~'I( OUT
ll"lF

.•

***
•
•

•

• • • • • • • • • • • • O' • •

oj
................
lI:FTIJRN

••

••••••••••••••• •
434

Chart 72.

Output Director

PLII SYSTEMS MANUAL

.GTRUD

•• •••••••••••••••
IGTRUD

• •••••••••••••••

•

¥
.
...,... "' ..........
•

• b.l CURReNT •
F~t. ~PACf
•

• ~l' •• X'

•

•

•

ZSACTV

•

•••••••••••••••••••

v

•••••••••••••••••••
:AOIJ ~~mH OF:
•••••••••••••••••

•

• •••••••••• *•••

• ... rKP

DOES IT foil

• I" S!:GMfNT 1

•

•

•.............. ":.-------------.:... .= .

•

,. y.:s

.......v.......•
"'

•• UPDATE

FREE'
-SPAce POINTl,'
•
UAUV
•

•••••••••••••••••
v

............... *

••

••
•••••••••••••••••
:Ab~t~srk I~Op~:

•••••• **v..... ",1('~

·•

.••

•
•
•

(LEAk TRIAO •
AReA
..

.................

v
...............
EXIT

•••••••••••••••

Chart 73.

Get Next Triad Entry

kfl~~~'

•

•••••••••••••••••

• ••

81:

•••

Plil SYS11!MS IIANUAl
SNeON

SNtoNS ,

•
••

............... ••
SNtoN

••••••••••••••• •

•

• • • • -NO

•

NSIO
••••

••....... _::1 •••

• FLAG INDJCATE •
C~rR~:~~
_CONVERTED 1*

•

··• ..•
•••••••••••••••
•••••••2•••••••

......•

*SET CONSTANT •••••••••••••93 •

• LENGTH TO " •

••••••••••••••••
•
• FORM CONST •
•

-COMPARE REGS ...

•

•

•

••

•

V

NS60

•

·•••••••••••••••.
NS18

FROM OPND

TOKEN

•

CONST TBl

V

NS18

.•..............•

.SET COfll5T ANT •••• )( 83 •
• LENGTH TO " ' .
•
•

v
...............
•
•
•

83.
•

••••••••••••••••• •••

•

NS62

...
•
..
..

• NEW CONST IN •

•••

·................ ......

V-

*GE T ENTRY FOR.

•

• NO

·...•............
... ...........
_

•

*•••••••••••••• K-SET
CONSTANT *•.• X
• LENGTH TO 8 .
•

flOAT-IS?

NO

DETERMINE
LENGTH OF
• CONSTANT TBl
•
ENTRY

NSl8

·YES

OPERAND

•••••••••

................. . .

.

•

•
.
••

...
•

•

_YES

CONST IN

NS36

•

•••••••••••••••••

•

• CONST TABLE ? •

••

•

• YES

-MOVE CONYTEO •
•
• CONSTNT TO

•"-•

• -NO
•••••••.••

•

N!~t....i •..•*.*

•

•

OPND AN
•
co~~~E8IA~:D?
••••
•

•
• ••
•YES

• •••••••••••••••
•
•
SNCONS
• •••••••••••••••
••

•

••

NS12

•

..

•

•

•

.YES ••••

OPND TYPE

• ARJTHMETIC 1

••

•*•••••••••••••••

•••

•

• .X• AO ••
• • •••••2.

• NO

·.......•........
v

•

COMPLETE

N570

••

•

...............

•
•

•

NS38

•

toNST TSl
ENTRY

..
..

•

...............

.S7 ••• X.
STATIC
•
.. •
• STORAGE FOR.
•

CONSTANT

•

• •........

·NO
STRING LENGTH

·

••

.. YES

•

•
•
·...............
.
•...............•
FORM TOKE N •
• fOR CONSTANT •

•

v

•• •••••••••••••••
••
EXIT
•

436

............... •

Chart 74. Constant Processor (Paqe 1 of 2)

NS18

·NO
•
..
STRING.
.. MOVE STRJNG"
•
•
.. ~2NI:l~TPM;~ . . . . . . . . . . . . . . . . . X: ~~O~~~~:~E : ••• ~ 83:
•
LINES? ..
..
REGS
•
• ••

..
• •

...............

YES

..x..................

.·x.......... ........
V

...............

• •
•

•

N542

.

LESS THAN 171 •

V

••••••••••••••••
•••
..
•
AlLDCATE
•
••

•

•

NS74

V

•••••••••••••••
••.GET
ENTRY FOR.

...............
• CONSTANT IN ..
•
CONSTANT
..
•
TABLE
•

.......
2.......•
•

...............
.FORM CONSTANT.

:Tlhu~~1

N$38

•

••• •

=J1 H : ••• ~ • ••
87:

.AND ND VALUE.

PLII SYSTEMS MANUAL
SNCONS , tNCON

...............
••••...............•

•••• .-------------*
·.NeV'
•
•:ao
.' • X: ~8"nT C9m :

N51T

•

•
tHO
• FLAG INDICATE 0
CO~~~~'X,

'.

0

*

*

*

NS14

• eYES

CONVERTED? •
•
•

•

-COMPARE REGS.

*'

•

•••••••••••••••

•••

•NO

•

••••

o

•

*NO*

.yeS
0

NSlS
eND

•

TARGET TYPE
COMPLEX?

o

•

t

.......i .......
•o

•

HALF Of

CONSTANT

............•..

•

*x
•

•

B] •
1-

••••

HALF ZERO

........... .

COMPLEX 1

.·............... .....
·•••••••••••••••*.
. ....,.
V

NSI8

.SET CONSTANT •••• X 83 •

•

lERO

v
·••••••••••••••••
.•

0

-SET REAL HALF.

o•

•

ZERO

••

•••••••••••••••

•••••••••••••••
•

0

:X ••••••••••••••••••••••••••••••• :

NSIO

•• IOV TO •• •• ••• •
: J=:flNAPY : ••• : tl.·
: •• i2~ll~~1••• :

0

OSET IMAGINARYO

•

*•••••••••••••••*

V

••••

• • •YES

•......i .......
*••

TARGET TYPE

• • •NO

•••

SAVE REAL

••••••••••••• x

•

• 'V

05115

*'••••••••••••••••

• 2~~L:=·~J,~ • ................ x:"2~'S~~=fLi~ :.... ; cJ
•

•

li~~i~~~~?

• *
'ES

•

•

SOUlilCE

•••.•......•••.•......••••••••.•••......•...••. X.

o

•

••••

Chart. 7'. Constant Proce••or (Page 2 01 2)

i.......• ••••
:. .• :
...............• ••••

"tS!z! ••••

•••
:c".:.
. x:•
•
•
•••

cg2~'k~T
LENGTH

NS18

•

•

83·.
,.

437

PL/I SYSTEMS MANUAL
.NCVT

....

..

NY10

••• *••••••• **••

•

•••••••••••••••
..•••
..
• SRANCH ON •
..

..•

............... •
.NeVT

:eo:.. x:

e~mHER

•

.. ..

0

·Coox

0

•

--.. * -

•

..

•• ••
• YFS

•

• •••

v •••••
• •••••*.**
*• ADVANCE TO ••

........ .

*ns
..

SOURCI: LHAR
Pl:kIOD?

.-

.. •

•
.NO ••••
• .X* A2 ••
CONSlANT TYPE
FLOAT?
• • 2.

•••• • *

:

•••••••••••••••••••

.. •
• ..

o.

NEXT SOURCE •
CHAR
..

•
•

•• ••••••••••*•••*

~I~

.

NV07

..

..

•........

.

.. ..

.. .

"YES
SOUkLE CHAk •

•

. ..

..

t'4U~ljtK?

••

.. YI:S

........ .

v

*.****
••***.* ••..
** BQANCH
ON •

: c~~mhp :
•••••*.**.*.*.**•

• NO

...

v
..................
.
..

..
*)tT

•

~K€LIS1"N..

TI) 15

••

SLURC' CHAR

..*••••••••••••••
•

•

TYPE = nTHt:.K

*

SOURCE CHAk •

'+'1

*

.* •••••• ** •••••
.*
*
..
*
..
* *••••••• *03* •• 1oSET FXPO~FNT *•
• *' *S!G~ ~fGAT1VE*
* * .*•••••••***.**...

.YES

- -*

0;

- '40

: • • • • • • • • • • • oo . . .

..

v
•••••*••••••
..*

....

~

-SET

VA LUI:

•

..••• "'**.:r •••• .
"EX~ONF~T

ZEkQ*

*

I/r*+

t_.

*

.·..

...
.. . .
...•.......... ... ...

v

0 •• H

•

CON

*UNTI L

..

OF

TANT

..

-SI:T

•

ONL Y 15*

"I:MAIN

.

lC"'(

,.,...

•

*

•••••••••••••••

EXPGNE~T

SIGN ~LU~

"'

•••• x CO.

*

..

•

oo . . . . . . . . . . . . . .

V

".. .
***.****:t"**.411!
AOVA"ICF TU ..
-$'

·

** ~EXT srU~CE ..•
***************,
OtA~ACTfP

I\JO

v
..............
..

•••••••••••••••
.. "ll'At9 ? •
.*.**
:15~~~~~~~E2t:

• YES

·

....

•
• • • • .NO

•••

• •*

•

*
TARGET TYPE
FLOAT?

*

*

• *

NV~O

*****.*********

* •*** •
VAL.* ••• )( £15*

*YES

•* ADO SIGN TO

* *

*-AND DET. ITS'"

• • •••••••••••••• x*cONSr"lr.
...

LENGTH

..

***************

* NO

*

***

~

:X ................ :
*

NV38

*

Ii

NV39

**.**********.**•

... *
.YES
**
***
75 > OR =
•
* * * EXPONENT
> OR
ox• co.*
*B2*X
* * • = -78? * • *
*
**
*
*

*
CONVERT
*
• CONSTANT TO •
* flXFD POINT'

.*.

•

•

.**************

• NO

v
*------------*
... EXP our OF ...

v

.**************
*GENER98
*

**************.
** MULTiPLY •*

• VALUE OF THE
• CONS TANT BY
10 '>INDEX

*

*
*
*

...

KANGE

•

...

v

v

.VAL OF INDEX'

·

***************

•****************

*

• StAlt: AND THt:*
FHCI'! EXP

*SET CONSTAI\IT ..

..

NV38

#-L.UAT?

•

*

•• •
• *x• 82** •*ss*x
....
..
•
*
•••
**

NV50

*••

*
•

..

ERRul< IN
CONVERTING
CONSTANT?

*

• NO

•

*

• YES

•

•

• TARGET SCALE
> SOURCE
SCALE ?

'VALUE TU ZERG*

• YES

TAkbcT TYPE

.

*NO

?

•

****************

****.***********
•
*SUtj THI:. SkCE *

•

CONSTANT
•
VALUE > 2**31
.........

•****************

*.*.**********-

..

...

*

*~w

•

* ........

• * •YES

.•

v

***************

*NO

* ......... .

•

*

•
GENERATE
•
... TQ lAD TO
...
> FORCE fiXED'
...

OVfRFLOW

...

.****.*********

• * •YES

: x ............................. ::

V
*****4*********

N\ltjQ

..
Auu THE
..
*TAkbtT SCALI:."

...

*** ..

•

..

,..

.*.

*Tu THe VALUe •••• x eo.
..

Of THE

EXP(.NENT

..

..

***********.***

v
*------------*
*
CONSTANT •
...
TRUNCATED
..
*
*•• ***.**

NV475
..

• INDICATING
•
E~ROR IN
• CCNVERTING

.*.....

*

Ii

.

•• ***************
•
EX IT
* ***************

Chart 75.

(C'NSTANT

•
•
•

*

***************

:X ................ :
NVbO

Ii

****.*.********
SET FLAG
*

***************
*GENER99
...

:x ................ :
NV48

Ii

NV50

****************
ADD S [GN TO *
.. *** :t
..
CONSTAf'.,IT
* ..... X
..
VALUE
*
* *
..
*
***
***************
**

B!'"~

Constant Conversion (Page 2 of 2)
439

PLII SYSTEMS MANUAL
SNLSlB

••;;.

...............

•••

$NLSIB
•••leI •••••••••••

•••••••••x.**••••••
• INiTIALIZE ..
•
•;.
.
•••••••••••••••
V

..

.. • " "
•
..
•.. •" •
.. .. NA EB.AK•iUIRE
•
• .. .. .. " •.... •
.. NO
"
2~!:S ~NTRY
?

..

•

Ii
.. .. . ..

.. IS PARAHETfI<
LIST LARGe
..
ENOUGH?

.

"YES

.X 46 •

"YES
•

..

•••••••••

.. .. ..NU

v
*.*••.
.****.**•••
*ALeT SPC fO~
• NEW PARA LST
• & SET $PAltAM
*Ttl PT (CONTI

•
•
..
"

•••••••••••••••

·:T2................"
Ii

lVH~PgFE:

•
•

NEW PARAM
LIST

•

•••* ••••• *•• *•••

... .. . .".
"
.• •"

GlZO

. ..

.X B8"

•••

.
"

:X •••••••••••••••• :
V

GLlO

•••• *.*••••
••****
•
PUT PTj( TO •
" ADeN IN LD "
"TBl ENT"Y fit. ..
"
'CU~TI
..

*** ••• *••••• ***

.. NO

Ii

•• ** ••*.*.
..*****
"ALLoe SPC FOR*"

*"AREA
eLK AOtON
AND PUT

..

..

"PTR TO /cONTI*

....... ***••••••

V

v

..*******.***.***
..
•
•
.. eNTRY NAME ..
..***************..
..

TI-I1S LIR

(;L20

V

...

*.. *.*
••*****...
.****
•• *****•••..
fs.A.A.
IN ..
**...***************..
..
**********:t"'***
LC.AD T B l "
...
* *Kc TURN PTR TC*
..
..
..
I::NTRY FOK
*
..•......•.
*~8* •• X*Al,..1.f\i ~.jTrt Llb* ••••••••••••••••• X*kODt: IN HIGH * ....••..•....•. X*
RE1UK~
ThIS LIB
..
•
..
bA~t {CU~T) .t"
* (Kuft< BYTE ..
•
.. t:.NTRY NAME ..
*
..
*
.-.**,******.* •••
*.*.********.*.
*•• *~.*******.*
*********.*.***

..

..
..
•

440

Chart 76.

.*..
>:<

Library Search

PL/I SYsTEMS MANUAL
.W8ACK

***••_* •••••••••

• SWRACK
*•*
** ...............

v

•••••••••••****

•*

*

PSCURR
PGINTER

•

GET

•

*••

•** ••••••• *******

*.

v

**** ••••
•**** ••LOCATE
••
•
•

PRECEDIN(;
SEGMT.

*

*••••••••• ** ••**•*

••

*
* ** E:NLJ

•

*

Lf

*
?

• .YES

TI~DLI:

* • *NO *

•••••••••• *****

....
.... ••• .~ ***87:.
• ••••••••••••••• X!SElo~~N~bT60N:
..

*

..

.*******.**.***

***

V

*****.****It***~*•
• COMPUTl TOP •
• uf NEW SEGMT •
* ANO UPDATE *
•
P$CURR
••••••
****** •••*

v

•.********* •• ***•

.. tuMPUTE ENu ..
• af NEw SEGHT •
•.. PSCUkR
AND UPDAH
*
+ 4 ..

••••••••••• ****

V
.*******.*¥****
.SUPPLY
TOP OF*
-NEW SEGMT fOk*
GUTPUT
-

*

.*•• *.* ••••• ****

•

. _.

** • *
•*S1*X*

••

Chart 77.

v

*.******.******
EXIT

***********.***

-•
*

Segment Management ($WBACK)

·441

HI I

~nTEHS

HANII4L

• weTe T

•••••••••••••••
•o•
••• .IICTCT
•••••••••••••••

o

•

•

••••••••••••••••
•

••

IS SEGMT. TooVFS
Mf R£LfASED •
SEG~~~ ~T Till • ••••••••••••••• X:SfT
07.

•

•

••

• "10

v

•••••••••••••••••
• PUT PO{ NIER •

:.ro
*•••••••• ~ •••••
PRIC Il "IG •
T :

~Fr.T:

v
•••••••••••••••

:• '1PflF~FOING
P~~"IJJR
•
•

SEGMT. Tn
HAG

:
•
•
•

•••••••••••••••
v
••••••••••••••••
•
ATTAC..
•

•

: UtfWY :
nF: llSY •
••••••••••••••••
v

•••••••••••••••••
: tb~EC~~. :
fCUAL TOO •
•••••••••••••••••
•

..

v
•• •••••••••••••••
•'Al'X'
••
EX IT
••••• ••••••••••••••• •

442

Chart 78.

Segment l1anagement

•••

C2N8 CODE: ••• •: M1:•
••••••••••••••••• •••

($WCTCT)

PlII

SVSTf"S ".NUn

SWEXP

••••••••••••••• •
SWFXP
,..

••••••••••••••• •

• • YES
,..

ANV SEG.fNT

.

..........lI'....

..

•••••••••••••••
•
,..

v
•• ••••••••••••••
,..

. . . . . . . . . . . . . . . X:S~~~m

FREE?

.

•••••••••••••••
,..
•
,..

•

..

•••••••••••••••,..

•

rm : .................X: U\Mm :
,..

..••...........

• NO

..

tV E<:'

~ 1~~t~U~W
hNOTHF"
• l~G"'FNT Z . .

•

I

• *.............. X:G~G~WfR6~R:
. . . . . . . . . . . . . . . . . X: S~~~~~TNf~
•
WORKING
•
* END OF PRey

FnR

: ••• iZ~::~~ ••• :

*

:

•

: ••• !!?!~I* •• :

• NLl

••••••• x...... ..
••• ~hVE eow • •••

.

·

• ~H·SC;AGF. COUNT.
11< ... 1< • • • • • • • • • • • •

·". ••• *>II~i •••• .
# ••

t-i.E~TART
'"
C('lMPlLATrON '"

'"

..

*

wi TH Ml'lPE

,..

C;PACf

~'t

"' • • • • !11!~ • • • • • •

('(IT

••••••

H'J

C;VC

6

*.~

•••

A ••

END

:m1NNl~a·o~O:

NEW SEGMENT'
•••••••••••••••

•

v
•••••••••••••••••
• SET OUTPUT
•
• pnlNTER TO •
N~W

•
SEGMFNT •
••••••••••••••••
•

*t-'"

v
.•........•....

v
••••••••••••••
••'CHAIN
Of •
•

v

•
•
•

•••••••••••••••
• PUT NODE CODE •
•

AND ZERO

• POINTER AT
• END OF 'lew
•
SeGMENT

•

•
•
•

•••••••••••••••

·

v

.

•••• * ••••••••••
•

PUT PO IN T ER •

•

SFGMENT AT

..

it
••••• *••••••

~'I'"f'

.. Tn F NO Of NE W.

•
PsrAlL
•
..................

••

•

LOAD OUTPUT'

•
•
•••••••••
PUC TV
*•••••••

•
•

VALUES FOR
P'CUOR AND

~

•••••••••••••••
••
HIT
•••
••••••••••••••• •

Chart 79.

Segment Management ($WEXP)
443

PLI I SYSTEMS

~'NUAl

iNSTEP

••••••••••••••• •
•••
••
INSTEP

•••••••••••••••

v
•••••••••••••••••••
'" eFT PSCURFI •
*
POINTfR
*
••••••••••••• **.•

• .NO

•

IS CURPENT
HGMT E~D ~F
fAKlF?

•

•••••••••••••••

•
•
•.............. X:¥~o~t~
b~~:e:

•
SEGMT
••••••••••••••••
••

•vf S

•

v
.................
•

·
•
•

•

SET CD~D.
CODE = r:

.•

•

•

•

••••••••••••••••

..

*

LAST ONE IN
TABLE?

•

v

..

•

E X IT

••

'"

r.?

..

v

UNUSED SPCE •
AT END OF
•

• SEGHT USING'
• GI VN CDNST *

•••••••••••••••

v
....•••••••••••••••
*
..

'"
..
.. SET END OF
*86* •• X*SEGHT HARKER'

•

••

•

• A.S COMPUTE=D •
.rN P$CURP + 4-

•••••••••••••••

v

•••••••••••••••

*

•-SUPPLY
•

••

PSCURR*

AS OUT PUT

•

*•••••••••••••••*

v
••••••••••••••••
•
-SET COHO CODE'

:HOT E~AL TO:

•••••••••••••••
•
*

v

•••••••••••••••
EXIT
•••
••
••••••••••••••• •

444

Chart 8(}.

Segment ~1anagement

($WSTEP)

...

•

SEG",T AS

'"

..

Cnt4ST TO

SPACE

*, .. X

..

•

•••

....

COMPT UNUSO"

•••••••••••••••

•

...

A$ EN-O OF"', •• X 8&-

•••••••••••••••

t

•••••••••••••••
AOJ FOR
•
*

USE PUCTV

-USE lST WO IN-

* ••...••••••••. "It...

• NO

*
*

•

•

•

• *ve S

•

IS CALL FOR
TABLE S I OR

•

'SEGMT "ARKER'

* •....•...••..• \(*PTR

•NO

•

•••••••••••••••
·•• ...............
·••

.•••••••••••••••..
.
..
•••••••••••••••

.YE~

IS NEW SFGHT • •

'"

Sli-

• ••

'"

Pll r SYSTEMS MANUAL
$XERR

•

............* •••

·...............
$ XERR

•

v
·...............
.

·

........ ..

•
LOCATE
•
• "'ESSAGE TEXT.
•
IN TABLE
•

.

*BI·X

••••••••••••• **

.YES

I S 1ST

01

NO

v *••••
••••••••••

.

• •••••••• * •••••
• YES

CLEAR PRINT.
LINE AND
•

• INSERT HEADER.

***

•

v *•••
•••• *.......
•

•
•

•

CONVERT

..
•

INSERT IN
MESSAGE

*'••• *** •••••••• *

•

·
·

v

.*
•• *** •• *•••• *
• GET SEVERITY.

•

INSERT

'"

PARM"ETER

•

••••••••• *•••••

··...... .

: X. . . . . . . . . . . . . . . . . . :

XD0040

•

.

IN

.
.

v

•

.

·S5*X

•

ME SSAGE

YES

.VALUES TO 3RD*

**.**.***.*••••
FORMAT, [.

·

.ASSIGN STRING.

****.* ••• **.*.*

•

*••••••••

.* •••• **.****.*

•
CODE FR.OM
•
.MESSAGE TEXT ••
•
CONVfRT,
•
•
ICONT)
•

·
·

**.

NO

01

•
..

v

•• •••••••••• *•• **

·

IS 3RD
.N~
PARAMETER =

•

MESSAGE

NU"'B ER AND

X00040

*

•

I S 2ND"
.ASSIGN STRING.
•
•
PARAMETER =
. . . . . . . . . . . . . . . . X.VALUES TO 2ND •••• X B5.
O?
..
PARAMETER •
•
•

·••.•••••*••• .
•
•

*.................................................................... .

•

•

·

•

PARAMETER =

•

••• ** ••• ******.

PARAMETER
O?

=

****.*......
*..*...........*•
*
* .............. x:
: ......................
! ... !
· **••• **...
.....* ..... "' ... _
..

.

*NO

I S 1ST

·

XD0050

*••

*xDPTR

.1.0*

*------5------*
~~t~t~~

V

*ASSIGf-t VALUES*

X:

pX~A~~iER

'"

B6~

...

..:fc* ••

'" YES

IS SEVERITY
THE HIGHEST

·

,.

·..··

'NO

..

FOUND?

............. ·B6.X

.'

YES

* ••••••• _••

**..

AO.
.------'5------.

.XDPTR

.N~

.*.**
•••• **_ •• *•
*

: .................. x: pl~A~~~ER : .... ! 81:
•••••*•••••• ***'"•
***
*• •• *••••• *.....•

. . . . . . . . . . . . . . . . X:

··

~~~~'H~

"'ASSIGN VALUES.

•

'"

YES

.

.
.' ..·
·

••••••••V*••••••

·

IS 2NO
PARAMETER =
01

R.ETAIN

:..*B1.X

·SEVERITY CODE'"
: FOR WRAP-UP:

•• *•• *•••••••• *

IS 300
PARAMETER

01
•

:x ..................... :

.N~
:

.*••

.*
••• *** •• *••AO.
**
*•••••••••••• ***
.XDPTR
..
*------5------*
.ASSIGN VALUES.
•
•
*................ x* ANALYZE *.................. X. TO 3RD
•••• X AD *
•
POINTER
•
•
PARAMETER.
'" 2.
• * •••••*•• "'...'"
•.. ••••••••• * ••••• •• *•
•••

· ....

YES
•
•••••.•..•
x.•AO
..
• 2*
•• **

·. .
. .. · .....
XD0040

·NO

•••

DOES

PARAMETER
• L 1ST INCLUDE
.. " STRING? •
•

·

"'X 85 •

YES

.

v
••••• * •••••••••
'" GET Loe AND'"

...............

"'LENGTH (MINUS ••••
*TRALNG 8lNKSJ*

•

oF" STRING.

*x

..

•

Bl.

*••

•

Chart 81. Error Message Edl.tor (Page 1 of 5)

445

Pl/l SYSTEMS MANUAL

UERR

.....................
.....•••••••••••••••.
•
..
.. LOCATE LINE.
*'0 .. X. AND COLUMN"

..

..

•

TOKEN

IS TOKEN

..

.. .............•..
................

.....•.........
..
.
...............

• *NO

wITHIN GOOD

*•..•••••.•.••• x.....

..

RANGE?

USE POI NTER ..
..
TO LAST
•••••••••••••••••• X.
ENTOKENEO

..

·

..

..

.. YES

...

~

TOKEN A
NEW-UN-E
POINTER?

..

•

....

..

:8Z: •• X:STEP T3:~~ ONE:

•NO

·• x ..................................... ...

.... .
•• • •
**A3*X

..

IS TOKEN A

SEGMENT-TOP

·YES
..

*............... x

POINTEil?

..

.

HAS COLUMN
VALUE 8EEN
FOUND?

•

•

IS TOKEN A
NEW-L I NE
POINTER.?
>II

,. NO

VES

:x ................. :

................ ...

.,
T05NUM
• CHARS INTO
•
MSG

•••

••
82.

v

'"

-lOC SRCE LINE •
• NO & MOVE uP •

C4.

•

..
.. CHARACTER
..
-FROM SEGMENT ..

v

•••

*x

COLUMN
• *............... x... GET VALUE

...............
...............

.. ..•••..
.....

.YES

................
...............

*NO

••

•

• NO

.

..

.................
.....................

. *•••••••• .. .. .

·YES

* IS

..

..
••••••••••••

SUPPRESS

*COLUMN VALue ..

LINE"

., •
•
.C4 ••• X.

•

•

•

•

••

•

lOC FIRST
TOKEN IN

•
•
•
•••• x A3•

.........•.....
•

PRECEDiNG

*

•

SEGMENT

,.

•

.,

• ••

............... x*

•

•

.NO
SHOULD HSG
•
•
HAVE COLUMN
................... x
VALUE
·SUPPRESSED?·

•

. ....
....
•

• YES

••

•••••••••• x.
•

A4 •

3'

XD0189

446

Chart 81. Error Message Editor (Page 2 of 5)

.

. ..... .
X[)0180

HAS COLUMN
VALUE 8EEN

.YES ••••

.X 43 •
3·
•

. ....
....

FOUND?

• NO

.,

,.

*'

• ••••••••• x.
•

•

AO •

3·

X00170

Plll SYSTEMS MANUAL

3

UERR

.................
....
·....
.. ..
.
•••••••••••••••

X00230

XD0170

•• • • •
•·SO*x
• • •

..

• AO •• X.STEP BACK ONE•
•
•
TOKEN
..

. ....
·YES ••••

• • •X ... 0••

PARAMETER?

..

..

•

•••
.NO
• • Will PRINT
•
LINE
•••••••••

.OO*X

4.

..

••

•

..

OVERFLOW?

••

• NO

.

·· .......
.
X00110

IS TOKEN A

·NO

TOP-OF-SEG"T
POINTER?
•

•••

• X AD.

YES

·................
·................

v
••••••••••••••
•.SGPUT
•

v

• POINTER FROM ..

.-------------

•

•

TEXT

•

•

..............
·..............."

GET COLUMN

VALUE

_

•

..

•

TRANSFER 7

•
CHARACTER
•
• FROM SEGMENT •

• *•••••••••••••

"'YES
"

...
...
• SET SCANNER.

•••

...

"
•
•••••••••••• ••• X. TO LOCAT ION ...... X A5.
• OF NEW TEXT.
'"
•

• NO

...............
•
•
...............

·................
·...................
v

V

XOQ180

•
..
*AOO 1 TO (aL •
• Al •• X. VAL, CONVT, ..
•
•
.FQRMT £. INSItT.

.STEP MESSAGE

.

....

V
•••••••••••••
*.

XQC1B9

•

•

*

.VES

.....................
*

•

*A4 •• x.STEP MES~AGE •
•
•
.SCANNER BY 1 •

•

f:lEMOTE TEXT?

.

•

LINE

v
• •• *..........
...

•*RE SET

•

.·...•...........
:x .....••..•...•.. :
.·...•............
.•..............•
•
..

MESSAGE.
OPERAND
•
POINTER
•

V

.MOVE TEX T TO •
..
MESSAGE
•

• SCANNER BY 2 •

• INTO .. eSSAGE •

PRINT THE

•• •••••••••••• **•..

v

•

.

• GET COUNT OF •

·................
..

•
• • •YES•

................
...............
•

•

•••

• GET LENGTH ..
..
•
••••••••••••••• X.. AND LOCATION •••• X DO.
•
OF REMOTE
* • • •• ..
..
TEXT
•

..................

v
..STEP MESSAGE.
'"

OPEf:lANO

•

...............

• ••

•

•

• POI NTER By
..
LENGTH OF

•••• X AS.
•
•
'"

•

•

TfXT

• ••

• NO

.·...............
·...............

v
·...............
.
.....................

v

*
•
*TEST OPE:RATOR.
*A5 ••• X.
CODE IN
•
..
•
.MESSAGE TEXT.

.GET LENGTH £. •
.LOC OF I MMEO '"

.TEXT; (CONTI •

· ..*..

·NO
END OF

...

"X 60.
....

.

M~SSAGE?

v
·.................
. ...
·
. ...
• STEP SCANNER.

•

•

•

•

•

.BY LENGTH OF •••• X DO.
IMMEO TEXT

•

• ••••••••• * ••••

.. YES

v
...............
.-------------.
·..............•.
• SGPur

..

..

PRINT THE

LINE

•
•

..

v
...............

·.................. ··
•

EXIT

Chart 81. Error Message Editor (Paqe 3 of 5)

447

Pl/l SYSTEMS MANUAL

"EU

...............
....................:
xD0230

*.*.

:.0·.. x:
•

..

'=:~~~T~~
NUMBER

..

•

'*

..

..

..

...............

lCD0270
eYES

•

,.j~;::E!E~?

•
. •

• GET LENGTH

'*

•••

•••••••••••••••
•
'*
GET LEfIIGTH •

•

N~~~~=E!E~?

•

•YES

•

•

*NO*

••

•••••••••

•••••••
x••••••••
·SGPUT

••• •

.-------------.

·................

Cl:

III

PRINT THE

•

•••

•

LINE

•

NO

. .•.
PARAMFTER
37

•

*

PRINT
LINE

•

............... *.................. ...

·................
.·..............
it

XQOl35

~U/lilBER

*

OVERFLOW?

••

X:2~ff P~~HEfFR:··· ~

eYE S

•

*
*WILL

•

X00280

·VES

' *.. • *•••••••••••••• ..•.•••........
•
'*
•

•

'* ••••••••••••••• X:l~rpk~ME~~R: .•••••••.•• :C 1: X•

* *NO

•

'•*

.•..............•

•

=

•

•

•

• GET LENGTH

..

..

•

'"

*

'*

• RESET MESSAGE.
•
OPERAND
•
POINTER
•
•

. . . . . . . . . . . . . . . . X. AND lOC
OF •••• X Cl*3RO PARAMETER.

NO

PARAMETER

NUMgEa '" 4

:X •••••••••••••••• :

...............
•
•
•
•
...............
•

PARAMETER

• XOPTR
•
•

...

•

•

v
...............
·------5------· • •
................ ...

IS PARAMETER
A LITERAL?

.

•••• X C1•
•
...

• YES
•

• •

*

.YES
•

•

• •••••••••

IS PARAMETER

NUll?
•

•

*NO

...............
;,

*• Lot

*

& MOVE •
• PARAM TEXT •
• (RELATIVE TO •
• USER'S AREA) •

...............

:X •••••••••••••••• :

.•••
. .................• .• .
X00250;,

'00189

•••

.CT"' •• X-ENCLOSE TEXT •••• X
.. •
•
IN QUOTES •
..

A~

3.

••••••••••••••••••• ••••

Chart 81. Error IIessaqe Editor (Pa 8
CHAR?

• YES
•

................

•
•
. . . . . . . . . . . . . . . . X..
•
•

GET Loe &
LENGTH Of
KEYWORD
LITERAL

·.................
v

..

• FLAG OUTPUT.
.AS A lITERAL •
•
PARAMETER •

..

...............

•

•
•
•

..*• ........••..•

• NO

·
•

DELIMITER

v
...............
••
EXIT

........*•••••••

• YES
•

•

•

• .X•..•••
05•
•
..

•••.
• • ..
..............
X: A6:

IS DELIMITER
WITHIN RANGE?

.. NO

..

..

•••
X004ltO

Chart 81. Error Message Editor (Page 5 of 5)

•

v
...............

••• ••••••EXIT
*••••••••

PART 10 - EXECUTIVE INTERFACE
TITLE:

SVC DIRECTOR ($SVC)

Program Definition
Purpose and Usage
The SVC Director handles all SVC interfaces with the CALL/360-0S system
for the CALL/360-0S PL/I compiler.
Description
The SVC code is picked up from the half word following the BALR to this
routine. The proper SVC is executed. Return is to the location
immediately following the halfword SVC code.
Errors Detected
None
Local Variables
None
Program Interface
Entry Points
$SVC.

Halfword SVC code immediately after BALR to this routine,.

Calling Sequence
L
BALR

DC

C2,asvc
Cl,C2
AL2(svc-code-number)

Exit Conditions
Return is to two bytes after BALR.
Routines Called
None
Global Variables
SVCINST

SVC Instruction to Transfer to Executive
(Communications Area)

Logic Diagram
Chart 82 shows the detailed logic diagram for the SVC Director routine.

450

. . .•••••••••••••••.

•••••••••••••••

'"

'COt •• xt
•
•
•

tsvC

••••
co-•
• •

oNO

IS THI S
• CALL'J60-0S?

•

•

•'t'E!

CALL $VC

St.U~AtOA

•
•

•••••••••••••••••••

•••••••••••••••

o

tX

•

...

v

•••••••••••••••
•••••••••••••••
~eTuRf\o

•
•••••••••••••••
••
••
_oeTA 1Llr. 1" SVC*
•
eace
••••••••••••••••••

v

•••••••••••••••••
••

o

o

eX:EcuTe Svc 0•
•
0

•••••••••••••••

v

•••••••••••••••
Rf:TUAN

•••••••••••••••

Chart 82.

SVC Director

o
•

o

451

READER'S COMMENT FORM
GY20-0567-1

CALL/360-OS PL/I

Systems Manual

Please comment on the usefulness and readahility of this publication, suggest additions and
deletions, and list specific errors and omissions (give page numbers). All comments and suggestions become the property of IBM. If you wish a reply, be sure to include your name and address.

COMMENTS

fold

fold

fold

fold

• Thank you for your cooperation. No postage necessary if mailed in the U.S.A.
FOLD ON TWO LINES, STAPLE AND MAIL.

GY20-0567-1

YOUR COMMENTS PLEASE •••
Your comments on the other side of this form will help us improv~ future editions of this publication. Each reply will be carefully reviewed by the persons responsible for writing and publishing this material.
Please note that requests for copies of publications and for assistance in utilizing your IBM
system should be directed to your IBM representative or the IBM branch office serving your
locality.

fold

fold

...............................................................................................................................................................................................................................................
FIRST CLASS
PERMIT NO. 1359
WHITE PLAINS, N. Y.

BUSINESS

REPLY

MAIL

NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES

POSTAGE WILL BE PAID BY ...

IBM Corporation
112 East Post Road
White Plains, N. Y. 10601
Attention: Technical Publications

..............................................................................................................................................................................................................................................
fold

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, N.Y.I060t
[USA Only]
IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017
I International]

fold

GV20-0567-1

en

s:
<
2..

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, New York 10601
(USA only)
IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017
(International)



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                     : 2011:07:07 08:56:27-08:00
Modify Date                     : 2011:07:07 10:42:14-07:00
Metadata Date                   : 2011:07:07 10:42:14-07:00
Producer                        : Adobe Acrobat 9.43 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:fef3e4e2-4aa9-46b8-92d6-6d712d5339c9
Instance ID                     : uuid:a26466fc-5e26-4b0e-9cf5-96f55a7b481f
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 472
EXIF Metadata provided by EXIF.tools

Navigation menu