ಜಾಹಿರಾತು
ಜಾಹಿರಾತು
‘MPL COMPILER
REFERENCE MANUAL
[1 Microdata _ 3200 |
MPL COMPILER
REFERENCE MANUAL
© 1976 Microdata Corporation
TM Trademark of Microdata Corporation
Printed in U.S.A.
98800 76 1024A
August 1, 1975
Microdata Corporation
17481 Red Hill Avenue, Irvine, California 92714
Post Office Box 19501, Irvine, California 92713
Telephone: 714/540-6730 - TWX: 910-595-1764
O UT. INE
Introduction
Compiler Operation
2.1 Control Toggles
2.2 Console Log
2.3 Memory Use
Compiler Formats
3.1 Source Format
3.2 Object Format
3.3 Listing Formats
3.3.1 Page Organ zation
3.3.2 Listing Ti‘ les
3.3.3 Program Li: ting
3.3.4 Flag Listi:g
3.3.5 Object Lis: ing
3.3.6 Code liistirg
3.3.7 Symbol Tab e
3.3.8 Program Surimary
Diagnostics
4.1 Flags: Detected rrors
Undetected Errors
Fouls: Consistency Checks
Hardware Consider. tions
SS 65
EW Y
Translation Algorithms
5.1 Blocks
5.2 Declarations
5.2.1 Value Allocation
5.2.2 Preset Var ables
5.2.3 Initial 5ti ings
5.2.4 Initial Li: ts
5.3 Groups
5.4 Statements
5.5 Operators
5.6 Operands
5.6.1 Conditiona Expressions
5.6.2 Literals
5.6.3 Memory References
5.7 Procedure References
5.8 Instructions
5.9 Loader Directives
6.0
Internal Translator Operation
6.1 System Interface
6.2 Input/Qutput
6.3 Utilities
6.4 Symbol Table
6.5 Scanner
6.6 Code Generation
6.7 Program Structure
6.8 Declarations
6.9 Statements
6.10 Expressions
6.11 Operands
6.12 Sample Modifications
Figure
Figure
Figure
Figure
Figure
LI ST O F
I/O File 5
Sample Con
Compiler L
1/0 Record
Sample Sou
Sample Ob;
Listing Pa
Sample Pro
Sample Pro
Sample Sym
Sample Pro
Flag class
Block Tran
Value Attr
Unary Oper
Binary Ope
Binary Ope
Binary Ope
Memory Ref
Memory Ref
Memory Ref
Builtin Fu
Instructio
Instructio
Loader Dir
Memory Con
Symbol Tab
String For
Chain Form
Use of Cha
Token Code :
FIGURES
-ructure
sole Log
Limits and Memory Costs
Structure
ce Program
ct Program
je Layout
jram Listing -- Listing Options Off
jram Listing -- Listing Options On
pol Table
ram Summary
5
:lation Algorithms
-bute for Symbols
itor Translation
“ator Result Size
"ator Operand Preparation
"ator Code Generation
‘rence Translation
‘rence Translation for Automatic Variables
‘rence Mode Use
1:Ction Translation
1 Set Classification
1 Translation
ctives
“lguration
.e Entry
nat
it
ns
>
Token Case:
LIST
Appendi x
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
OF APPENDICI ES
Bibliography
Flags -- Ordered By Number
Flags -- Ordered By Severity
Flags -- Detailed Description
Toggles -- Simple List
Toggles -- Detailed Description
List of Fouls
Flag References
Load Map
External Procedure References
External Variable References
Syntax
SPECIFICATIONS
Language Implemented:
Implementation Language.
Host (Compile-Time) Mac! ine:
Target (Run-Time) Machire:
Compile-Time Support:
Run-Time Support:
Translation Strategy:
Memory :
Symbol Table (6 character names,
4 references per symbol. 8000
bytes total)
Hash Table Size:
Symbol Count, No References:
Symbol Count, With Re!erences:
Speed:
I/0 Structure:
Translation Control:
Diagnostics:
MPL
МРТ,
Microdata 32/5
Microdata 32/S
Loader, I/O System
Loader, I/O System
One pass, top-down parse,
in memory operation, hash
addressing of symbols
64K Bytes
401 Symbols
363 Symbols
210 Symbols
1200 Records per minute
(typical) when not I/O
bound
Source file, object file,
listing file, console
24 toggles including listina
selection, format control,
and error control
100 discursive diagnostics,
35 consistency checks, memory
checksums, stack overflow
protection
Sec 1.0 7
INTRODUCTION
The MPL 64K Self Compiler is a modern, high-performance,
user-oriented language translator. Emphasis is placed on
simplicity of operation ard complete diagnosis of error
conditions. This compiler is a self compiler in two senses:
it is written in the same language, MPL, it translates,
and it runs on the same machine, Microdata 32/S, for which
it generates code.
The present reference manual describes a language translator
for MPL: Microdata Programming Language. The MPL language
is described in a companicn language reference manual. The
present MPL language is ar outgrowth of an earlier MPL that
is a subset of the current MPL. A cross compiler exists
that implements the earlier MPL; the cross compiler runs on any
machine that has an XPL irplementation, in particular an IBM
System/370. A complete bibliography of documents related
to the MPL language and translators 15 shown in Appendix A.
This compiler reference menual is organized in 6 chapters
and several appendicies. Chapter 1 is an introduction to the
compiler and compiler reference manual. Chapter 2 discusses
compiler operation. Chapter 3 describes compiler formats
and is mainly useful for interpreting the listings. Chapter
4 discusses diagnostics ard is useful when the on-line
messages do not suffice. Chapter 5 specifies the translation
algorithms used to convert source to object. Chapter 6
describes internal compiler operation and organization and
is useful for compiler maintenance or enhancement. The
appendicies provide a quick reference guide to the flags
and toggles.
The term compiler is used to refer specifically to the
subject of this present dccument: the MPL 64K Byte Self
Compiler; the term translator is used generically as
appropriate. The term prcgram is used colloquially for an
external procedure. Likewise, a card is a colloquialism
for a source record. A program as input to the compiler is
a source program, as output from the compiler (and used
as input to the loader) ar object program. A routine name
of the compiler is writter 1n capital italics (ROUTINE),
a variable of the compiler in small italics (variable).
In programming examples, keywords are written in upper case
(KEYWORD) and variables ir lower case (variable). The
graphic 'B' is used to represent a blank.
COMPILER OPERATION
This chapter discusses the various aspects of compiler
operation. The compiler is controlled by means of toggles.
A console log is maintainel of compiler activity. Large
Or unusual programs may re juire attention to compiler
memory use.
Operation of the MPL compi.er is designed for convenience
and simplicity. The compiler requires only one pass and
operates in memory. No scratch peripherals are required,
nor program overlays. In iddition to a console device, up
to 3 peripherals are requi-ed for source, object, and listing
as shown in Figure 2.0a; tie object and listing devices
are necessary only if used
The compiler is invoked as appropriate to the operating
system at hand. It may be loaded as any other program or
invoked directly as a memo y image.
Compilation speed is typic:lly 1200 records per minute when
not limited by I/O. Compi ation rythmn is steady except
for brief pauses to comput: checksums at compiler start
and program end, to assign addresses after a declaration
set, and to sort the symbo table before it is listed.
Sec 2.0
Unit 1*
MPL Compiler
Console
Unit 2
т
Program Symbol Program \
Listing -- Table (A) Summary (Y)
Source (L)**
Flags (F)
Code (C)
Object (H) /
I/0 system logical unit number
** Controlling toggle
Figure 2.0a: I/O File Structure
10
CONTROL TOGGLES
Control over compiler operation is through the mechanism
of toggles. Toggles are :nternal to the source program;
there is no external operating system mechanism for
controlling compiler operation. Each toggle controls a
single aspect of compiler operation and has a binary value:
on or off.
The complete set of 24 tocgles is listed in Appendix E.
with their default values. A detailed explanation of the
operation of each toggle :s given in Appendix F.
All toggles assume a defar lt value when the compiler is
invoked. Toggles change curing program compilation as
specified by the user, or occasionally are altered by the
compiler. At the start otf subsequent programs toggles
reassume their default va ues unless frozen by the P-toggle.
The state of all toggles ¢t the end of a program is displayed
in the program summary (see Section 3.3.8).
Toggles may be altered by the user in any comment. Three
characters are used as tocgle control operators:
$ (dollar sign) - If on set off, if off set On
& (ampersand) - Set on
3 (percent sign) - Set off
The character that immedi:tely follows the toggle operator
is interpreted as the togcle to be altered. Should this
character not be an implerented toggle, compiler operation
is not affected. Toggles that are sometimes altered by
the compiler are the H-tocgle, O-toggle, U-toggle, and
X-toggle as described in Zppendix F.
Toggle changes are honorec by the compiler as soon as they
occur. Since a listing line is buffered, toggles that
affect the listing format become effective before the line
in which they appear is listed. Since the compiler parse
is top-down, toggles that affect object generation should
appear before the external procedure entry. It is common
practice to collect all tcggles together as a preamble to
the program proper.
Sec 2.1
Sec 2.2 11
CONSOLE LOG
During the operat:ion of the compiler a console log
is maintained on the console device to track compiler
progress and report major errors. Figure 2.2a shows
a typical console log.
The content and format of the console log are fixed
and may not be suppressed or altered. The first entry
on the log is a preamble that contains the version
identification; the appearance of the preamble assures
that the compiler has been invoked successfully. The
last entry on the log is a postamble that is issued
just before exit to the operating system; the appearance
of the postamble assures that the compiler has terminated
successfully.
The body of the console log consists of program entries,
compiler aborts, and operating system messages.
For each program the program name and flag count is
shown; the name is listed as soon as encountered, the
flag count 1s appended when the program ends. A
compiler abort is listed on the log; all other flags
are not. If the abort 1s suppressed, this 1s noted
and compilation continues, otherwise end-of-joab
activity occurs. Operating system messages are also
included in the console log as they occur.
12
GENASYS/D, DBG 1
ENTER MATE
rn mpl.mrl
MPL COMFILER:
COMPILING
COMPILING
COMPILING
COMPILING
COMPILING
COMPILING
COMPILING
COMPILING
СОМ РТТ
COMPILING
END OF
Figure 2.2a:
LIST8080:
TF_CLAUS:
IF STMT
TF THEN
IN СУМ
INC PC
IMC_SC
[IC_XC :
IM DEX
„1578080:
JOR
26jun75
VERSION
DODOOODOODOON
0.93
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
FLAGS
Sample Console Log
Fig 2.2a
[LY
Ing
*
Sec 2.3 13
MEMORY USE
Compiler memory use is of concern only with very large or
unusual programs. The compiler is designed to handle
ordinary programs of modest size without strain. A large
program may exceed the available symbol table space, a
pathological program the available stack space. Stack and
symbol table use 1s monitored and overflow causes a compiler
abort.
A fixed portion of memory is devoted to the operating system,
the program space of the compiler, and the compiler's stack.
The remainder of memory 1s used for the symbol table. The
use of memory and the memory cost of various compiler
features is shown in Figure 2.3a. Where feasible, memory
is shared and reclaimed so that, in ordinary programs,
memory is exhausted only by symbol table overflow.
Should the stack overflow, Figure 2.3a can be used to judge
how to reorganize the program to fit. Usually the overflow
1s precipated by an excessively complicated expression
and can be corrected by breaking the offending expression
into simpler components.
Should the symbol table overflow, references may be suppressed
with the R-toggle. This usually doubles the effective
symbol table size. Ultimately, the symbol table 1s completely
full and the only remedy possible 1s to break the offending
program into smaller segments. It is considered good
programming practice to separate a large program into several
smaller functional modules.
The compiler and operating system require 64K bytes.
14 Fig 2.3a
Type Item Controlling Limit Unit Cost
Variable
Stack Pool tstacksize 6000 bytes
Procedure block
nesting (about 5000 48 bytes
1s overhead) |
Begin block 72
nesting |
Do nesting : 58
|
Expression nesting . 106
If statement | 20
nesting
If expression 30
nesting
Symbol Table None: Uses 8000 bytes :
Pool remainder (typical)
Attributes of available 16 bytes
memory |
Name text l per
~~ character
Symbol referer ce A
Forward Pool #fwdmax 160 items
Label 5 bytes
Entry 5
Initialized 5
variable
EE La ee — — ee eee = | ——————
Individual |
Literally #maxlit 10 items | 8 bytes
nesting |
Block nesting #maxlex 15 6
Do nesting #domax 20 | 2
Do cases tcasemax 300 | 2
Hash table #hashsize 401 2
Figure 2. 3a:
Compiler Limits and Memory Costs
Sec 3.0
COMPILER FORMATS
The source, object,
15
and listing formats are described in
this chapter. Figure 3.0a shows the I/O record structure.
16
Fig 3.0a
Maximum Record |
Function Logical Unit Record Format Length | Block Size
Source 1 | Variable | 80 SYSIN
Listing 2 Variable 120 SYSOUT
Object 4 Fixed | 80 80
|
Mon a a E PZA ANAL UE аа тя Me A
Figure 3.0a:
ACT de UE a Aa O O mg TC TE AMM a a ari
1/0 Record Structure
Sec 3.1 17
SOURCE FORMAT
The source program compiled is read from logical unit 1.
This logical unit is used by the operating system as
SYSIN and is typically blccked, double buffered, and open.
Figure 3.la shows a sample source program.
Input is streamed: that is record boundaries have no
syntactic significance. However, each record is listed
on a separate line in the program listing. Input records
may be up to 80 bytes in length and may be of variable or
fixed length. If variable length records are used, trailing
blanks are appended by the compiler to produce an 80 byte
record.
Source may also come from the symbol table via literallys.
Literallys may contain artitrary text, may be nested, and
follow the same scoping rules as other symbols.
When a program ends any text remaining in a active literally
or a partially used source record is discarded. The next
program begins with the ne xt source record.
An end-of-file in the source stream terminates compilation.
All output buffers are flushed and exit is made to the
operating system.
LISTRORO: MAIN BRACI
DCL fh kw SYSIN TO SYSMUT RO/RA LIST ках /
EXT PROC WORD,
EXT PROC,
WORD,
BYTE,
WORD INITIAL ("0D04")3
DO WHILE SYSGET(eBUF(1), 80) > 91
SYSGET
S Y SPUT
K
BUF (80)
CRLF
DO kK=A80
IF
ENDS
WRITE FI
CALL SY
CALL SY:
ENDJ
END LISTRORQ3
704 RY =!)
BUF {KY ?*= 1 !
THEN GO TO WRITE;
K)J
>;
T
“и
ue
mail
Figure 3.la:
Иа READ SYSIN UNTIL EDF * /
Иж TRIM TRATLING ALANKS */
ИЖ WRITE SYSOUT, APPEND CRLF */
Sample Source Program
3T
ele ETA
Sec 3.2 19
OBJECT FORMAT
The object program is written on logical unit 4. This
logical unit has no special significance to the operating
system. It is double buffered by the compiler and is
unblocked. Object is written in response to the O-toggle.
The object record format uses the hexadecimal format defined
in Section 5.9. A sample object program is shown in Figure 3.2a.
The first object record is used as a title card. Reading
from left to right the title card contains:
e Object Record Header: This will always be '#6010100'.
e Program Name: The first 25 characters of the program
name. Only the first € are passed in the body of the
object program.
e Date/Time: The date ard time at the start of the
compilation of the current program.
e Version: The version identification of the compiler.
Ex N ое за =
OC
410100 LISTRARN PhJIINTS 99309500 MPL 0,93
08032306000059010D0A81000102002D830007055A002E50158900010971060C000A41450S205
680423503702D138600000A4150717110060$00084888000008F 204F50A4120281 388500000157
4005240100880000830030680036830036024A0FB300268B8003883003301008B00388300380154
AFNEZUNUONZ2ESOIURINCAZ2AB7INANCOONNAF204US 25 SOLUBINONZ20INENINASC7285205ULUARICOIA
AUATACRANNSSAIANESAISUBRZ20000N0
Figure 3.2a: Sample Object Program
E DITA
ec’
Sec 3.3 21
LISTING FORMATS
All listings are written sn logical unit 2. This logical
unit 1s used by the opera:ing system as SYSOUT and is
typically blocked, double buffered, and open.
Listing output is streamei: that is line boundaries have
no relationship to record boundaries. Line boundaries are
specified by explicit carriage return/line feed sequences;
page boundaries are speci ‘ied by explicit form feeds or
carriage return/line feeds, as selected by the E-toggle.
Listing output may be spo»led to a secondary storage device
for later printing.
The listings consist of 3 major components: program,
symbol table, and summary. The program listing consists
of 4 subcomponents: sour:e, flags, object, and code.
All listings share a comm>n page organization and title
structure.
. 3.
Sec
Page Organization
A listing page may be formatted for llx12" sheets,
84x12" sheets or 7" rolls. Figure 3.3.1la shows the listing
page layout and the controlling toggles. Note that in
the short page, full width format the listing may be copied
directly to 84x11" paper losing only the block name.
3.3.1
23
Figure 3.3. la:
Fig 3.3.la
1 1 107 | 12 | 20 = 140 characters
' |
Г |
|
header | x 4
' —
title ! 5
17 80 | 10 12
left | | ı right jplock
hand | | ¡hand [name
anno- body | anno- с
. | ; À
д [ration | tation >| 40 (55)
o | ы
© | | E
Е | | =
© / | | =
— { 4
; | nn
. ‘ 2
trailer |
; |
70 narrow page 70 =51 (66) lines
fold point
Toggle Description State Function
N Format for Ot € Width = 120 characters (12" @10 per inch:
narrow page Or Width = 70 characters (7" @10 per inch)
Q Chop ОЕ Е List full line
program listing Or Suppress right hand annotation and blockname
S Format for off Length = 66 lines (11" @6 per inch)
short page Or Length = 51 lines (8%" @6 per inch)
*Area shown inside heavy lines is 8% x 11"
.isting Page Layout
. 3.
24 Sec 3.3.2
Listing Titles
Each listing page contains a title. This title is common
to all listing components. Each page also contains a
subtitle peculiar to the listing components.
Feading from left to right the listing title consists of:
e Program Name: The first 8 characters of the program
name. Until the program name is encountered, this field
is blank. To ensure that the program name appears on the
first title, the program name must appear on the first
line.
e Data/Time: The date and time at the start of the
compilation of the current program.
e Version: The version identification of the compiler.
e Listing Component: The comporent to which the page
belongs: Program Listing, Symbol Table, or Program
summary.
e Page: The page number. The page number starts at 1
at the start of the current program and is common to
all listing components.
.3.3
Sec 3.3.3 25
Program Listing
The program listing consists primarily of an annotated source
listing. Program listing is enabled by the L-toggle. If
desired, flags, object, and code are interspersed as they
are generated. Figure 3. 3.3a shows a sample program listing
with object and code suppressed, Figure 3.3.3b a sample
program listing with flag:, object, and code in evidence.
Where feasible, the annotition to the left of a source
line reflects the state of the translation before the
line is translated, the a notation to the right, the state
afterwards. Exceptions t» this rule are noted below.
Actual listing of a line :s buffered one line. This buffering
permits toggles to be pro essed before a line is listed.
However, if a flag is gen:rated, or code or object listed,
the buffer is first flush::d so that the source line always
preceeds any derived list.ng; in such a case the righthand
annotation reflects the t-anslation state before line trans-
lation.
Reading from left to righ- the fields of the annotated
source listing are:
e DEC: Program counter .n decimal. In some cases the
location listed points to an SSP instruction that
precedes the statement proper.
e HEX: Program counter :n hexidecimal.
e LINE: Source record n :mber from start of current program.
e SOURCE: The source liie padded on the right with blanks
to 80 characters. Non:rinting characters (a
character whose code is: not in the range 32 to 126
inclusive) are listed is a period ('.').
e DL: Do level. The do level is defined as the nesting
depth of all active blocks and groups. A block is a
procedure block or beg.n block. A group is a repeat
or any type of do.) Tie external procedure name is
level 0. The do level is useful in reconciling mismatched
ends, and in clarifyin y block and group structure.
If a do case 1s active the do level field is used to
specify the do case itm and do case nest level. Item and level
are given for the translation state before line translation
and are separated by a hyphen ('-').
Sec 3.3.3
BN, Block Number: The block number is defined as the
ordinal count of the most recent block entry. The
external procedure name 1s block 0. The block number
is useful in identifying block boundaries.
LL, Lex Level: The lex level is defined as the nesting
depth of all active blocks. The external procedure name
is lex level 0. The lex level is useful in analyzing
scoping restrictions.
BLOCK: The block field gives the first 10 characters
of the innermost active procedure block. A begin block
or group does not alter the block field.
LISTENAO
DFC
~N NO > < OO DOO
HEX
0000
0000
0900
0000
0000
nann
0000
0007
0007
001C
0028
002€
0036
0038
0038
0048
0053
0055
26 JUN75
LINE
DO TUE wily»
00:00:00 MPL 0,93 каж PROGR AM LISTING "xn
sovesveereSNjil(froeesvwersvcanvsevwerrnsvovonrevenrorrroscsvorrnen 'rraalerreanenannnswiune®®
LISTRANBO:N MAIN PROC} OCL J hhh SYSIN TO SYSOUT 80/80 LIST *wk/
3SYSGET EXT PROC wO0RD,
SYSPUT EXT PROC,
K «ORO,
QE ran RYTE
CRLF WORD INITIAL ("0DOA"Y)
/* READ SYSIN UNTIL EOF * /
DO WHILE SYSGET(®BUF(1), 80) > 01
DO K=80 TO 1 ВУ +13 /* TRIM TRAILING BLANKS * /
IF RUF (x) ?= 1 |
THEN GO TO wRITEJ
ENDS
WRITE? /* WRITE SYSQUT, APPEND CRLF w/
CALL SYSPUTCOERUF C1), K)J
CALL SYSPUTCECRLF, 2)3
ENDJ
END LISTROBOS
Figure 3.3.3a: Sample Program Listing -- Listing Options Off
DIA
€
La
$
PAGE
OL AN
1 1
1 4
1 1
1 1
1 1
t 1
! 1
1 +
e 1
3 1
3 4
3 1
e 1
2 41
e |
e 1
1 1
0 0
N
~J
—
nr“ >
С)» = += He dl $0 ul id Hui He y Pu A Y Pui $ Guid Pea
LISTHAOSO 26JUNTS 00; 00100 MPL 0,93 Ex PROGRAM LI STING жах PAGE 1
DEC MEX LINE wvesacewvraS/R(feencnscencscnccenscrnarceannocnsvanarcossnsranncnsensnsnnnrennsssan>> Di ВМ Ц
0 0000 1 LISTANAO: MAIN PROC] DCL Jw SYSIN ТО SYSOUT 80/80 LIST жж * / oO 0 89%
= 010100 LISTACEO 26JUNTS 00300300 MPL 9,953
0 0000 2 1 1 1
0 0000 3 SYSGET FXT PROC wORD, i 1 |
0 0000 4 SYSPUT EXT PROC, 1 1 1
0 0000 5 JUNK JUNK, 1 1 1
$
*x xxx (0) ERROR 67 BAD SIZE, wORD USED
$
sx kkk (5) ERROR 59 JUNK IN DCL STMT, TEXT SKIPPED TQ NEXT 1,1 OR
0 0000 6 K wORD, 1 1 1
0 0000 7 BUF (80) BYTE, 1 1 1
0 0000 8 CRLF WORD INITIAL ("ODOA")3 1 1 4
# 110224B1904CU953543A303R3000008853595347455420200001685359535055542020000201SA
0 0000 * SA 0000 SSP 0
3 0003 « 59 01 FILL 1
5 0005 * 0DOA WORD 3338
7 0007 q /* READ SYSIN UNTIL EOF * / { 1 |
7 0007 10 DO wHILE SYSGETCOBUF CI), 80) > Ol { 1 1
0 0000 ** 5a 002Ё SSP ue
7 0007 + SA Q02F SSP 47
10 000A * So 150001 MARK 21,SYSGET
14 000E à 71 4
15 000F = 06 0C000C LADR 12,80UF
19 0013 = 41 50 LBL 80
el 0015 = 52 05 CALL 5
gg 0C032306000059010D20483000102002E8300070554002F501589900010971040C000C41505205
23 0017 «x 70 LO
24 0018 + 20 GY
25 0019 * 13 0000 BRF 0
28 001C 11 DO K=20 TO 1 BY =1j И* TRIM TRAILING BLANKS * / 3 1 4
28 001C * 41 50 LBL 80
30 NOE + 71 Li РЗ
31 001F * 71 Li a
32 0020 «10 NES “
33 0021 * 06 090004 LADR 9,k a
LISTANRA 26J'5N75 ANsQOrNA MPL 0,95 “** PORN GR AM EL IST ING * *
OFC ME X LINE >.) UR( Pr W...—n““——m.——_ F>—.———— = >—nF.>WwW
37 0025 * uB 0000 DIB 0
40 0028 12 IF ВОР (к) ?= ! 1
40 0028 * Fe 05 LW её, К
42 002А * РВ OC Le 3,BUF
dd 002C * ul 20 LBL 32
te 002¢ 13 THEN GO TO wRITEJ
de 002k * 28 NE
d7 Q02F * 13 0000 BRF 0
в 6D042303702D13AR000004415071711006070004488BRH00008F205FB0C41202R138800000157
50 0032 + 57 000000 GOTO O,#RITE
Sd 0036 14 END}
U7 ONeF +** 13 0036 ARF 54
Si 0036 *“ ЧА OF OSRB 15
37 0025 ** 48 0038 DIB 56
56 0038 15 wRITE:: /* wRITF SYSQUT, APPEND CRLF */
To (032 ка T7 COSTA SOTO 1,wDTTE
2 v0052401008R00008300308R0036830036024A0F8300268R00388300330100AB0O038R3003R015A
56 0038 « SA 002F SSP 47
59 0038 16 CALL SYSPUTCOBUF (1), K)IJ
59 0038 + 50 140002 MARK 20,SYSPUT
63 003F * 71 Li
64 0040 * 06 OCOOOC LADR 12,BUF
68 0044 * Fe 05 | LW 2, К
70 0046 * 52 05 CALL 5
72 0048 17 CALL SYSPUTCeCR FF, 2)1)
72 0048 * SO 140002 MARK 20,SYSPUT
76 C0d(C * Ne 09005E LADR 9,CRLF
80 0050 * 72 Le
81 0051 * 52 05 CALL 5
83 0053 18 END}
83 005$ * U6 UA BRR 74
$ 95062494002F55148900020H671060C000CF20552055014890002090609005E725205464GA83001A
25 0019 ** 13 0055 BRF 85
85 0055 19 END LISTRAORÖJ
85 0055 * 54 EXIT
M ACQ7OCRR0A55830055015482000008
Figure 3.3.3b: Sample Program Listing -- Listing Options On
PAGE
DL EN
3 1
3 1
3 4
e |
e 4
e 1
1 1
0 0
N
(D
2
LL
. 3.
30 Sec
Flag Listing
Flags are interspersed in the program listing as they are
detected. Flag listing is enabled by the F-toggle. If
the F-toggle is on and the L-toggle (list source program)
off the current source line is also listed. This feature
is useful in scanning for errors. Figure 3.3.3b includes
some flags.
Each flag generates 4 lines of listina: a cursor line, a
description line, and 2 blank lines. The cursor indicates
the point in the source line at which the flag was generated.
Reading from left to right the description line consists
of:
e Last Line: The last flagged line. If the current flag
1s the first flag this field -s 0. The last line field
simplifies flag location in a large listing.
e Severity: The severity of the flag: warning, error,
blunder, or abort.
e Number: The code number of the flag. This code is an
index to the flag descriptions in Appendix D.
e Description: A brief description of the cause for the
flag and the compiler response. Cause and response are
separated by a comma (',').
3.
3.
. 3.
Sec 3.3.5 31
Object Listing
The object program is interspersed in the program listing
as lt is generated. Object listing is enabled by the
H-toggle and is exactly the same as the object program
written on logical unit 4 (see Section 3.2 Object Format).
This listing 1s rarely activated. Figure 3.3.3b includes an
object listing.
. 3.
32 Sec 3.3.6
Code Listing
The translated 32/5 instructions are interspersed in the
program listing as they are generated. Code listing 1s
enabled by the C-toggle. This listing 15 useful in low
level debugging and for clarifying translation algorithms.
For better readability, the code listing is indented
50 spaces in response to the I-toggle. Figure 3.3.3b
includes a code listing.
Reading form left to right the code listing consists of:
e DEC: Program counter in decimal.
e HEX: Program counter in hexadecimal.
e Frogram Counter Type: This field distinguishes the
3 uses of the DEC/HEX program counter fields:
blank - source
* - generated in-line instruction
* * - generated fixup instruction
e Numeric Operation Code: The 32/5 instruction operation
code in hexidecimal. In the case of data this field
is blank.
e Numeric Operand: Up to 4 bytes of operand or data in
hexidecimal.
e Symbolic Operation Code: The 32/5 instruction operation
mnemonic or pseudo-operation. The instruction mnemonics
used are defined in Reference 6.
e Numeric Operand: The operation code dependent operand
in decimal. This field is not always present.
e Symbolic Operand: The operation code dependent operand
as a symbol. This field is not always present; if
present 1t 1s separated from the numeric operand by
a comma (',').
. 3.
Sec 3.3.7 33
Symbol Table
A symbol table listing follcws the program listing and is
enabled by the A-toggle. F gure 3.3.7a shows a sample
symbol table.
The symbol table has many uses. For new programs it is
an aid to finding and elimir ating flags. For old programs
it aids in maintenance and cocumentation. In addition,
the symbol table clarifies :ttribution and scoping.
Each symbol defined or refe: enced in the program is listed
in the symbol table in alph.:betical order. Literallys
and builtins qualify as symols, but keywords do not.
Each symbol is represented hy a single symbol table entry
with the occasional excepti.n of forward labels. If a
label is first encountered n a goto statement and 1s
potentially satisfied :n mo e than one block, then a
separate entry is made for ach block in which the label
is potentially defined. Th entry at the lowest lex level
is the ultimate defini-ion f the label and the references
are scattered among the mul iple entries. The generated
code 1s always correct. Fo example, the following program
results in two entries in t e symbol table for the label
x of which cne will remain :ncefined:
p: PROC;
GO x;
q: PROC;
GO x;
END Я;
x:
END p;
Reading from left to right he symbol table listing consists
of:
e NAME: The first 12 char :cters of the symbol name. If
the name has more than l’ characters, a plus sign ('+')
is appended to the name.
e DEF: The source program record number on which the symbol
is defined. If the symb»1 is never defined, 4 stars ('****')
are displayed; excent fo- huilt-ins this is an error. For
procedures that acquire some of their attributes from a declare
statement and some from : procedure statement, the declare
statement is used to der.ve the definition line. This
field may be viewed as t:e first element on the list of
references.
Sec 3.3.7
34
BN: The block number of the block in which the symbol
1s defined.
e LL: The lex level at which the symbol is defined.
e ST: The definition state of the symbol. If a symbol
1s completely defined this field is blank, otherwise
2 stars ('**') are inserted, except for forward labels
that are potentially defined in more than one block, this
is an error. Undefined symbols nay be spotted by scanning
this field for non-blank entries.
e DEC/HEX: The decimal and hexadecimal values of the symbol.
The meaning of the value is conditioned by symbol class
as described below.
e CLASS: The compiler division of symbol types. The
possible classes are:
Class Description Use of Value Field
AUTO Automatic variable Stack location, EP relative
STATIC Static variable Internal: Static location
External: External data sequence
number
PARAMETER Parameter Stack location, EP relative
CONSTANT Constant Program location, PB relative
CBASE Constant based variable Base value, absolute
VBASE Variable based variable Symbol table address of base
PRCCEDURE Ordinary procedure Internal: Program location, PB relative
MAIN Main procedure External: External procedure sequence
? number or program location
INTERRUPT Interrupt procedure of 0 if external procedure
| head
MICRO Micro coded procedure Microstore entry location
BUILTIN Builtin procedure Builtin code
LABEL Ordinary label Program location, PB relative
DOLABEL Label on a group head Program location, PB relative
BEGIN Label on a begin block Program location, PB relative
head
LITERALLY Literally Length of text
?? Unclassified symbol —-
(Appears only if job is
aborted)
Sec 3.3.7 35
e SCOPE: The scope of a symbol:
Scope Description
I Internal
EXT External
When not explicitly supplied, this attribute is always
defined by the compiler according to the rules of the
language.
e SIZE: The size of a symbol (specified only where
meaningful) :
Size Description
BYTE By t::
WORD Word
DOUBLE Double
PTR B Pointer o byte
PTR W Pointer o word
PTR D Pointer 0 double
BIT 1 Bit (1)
BIT 2 Bit (2)
BIT 4 Bit (4)
e SET: Indicates 17 the symbol is preset before the
procedure 1s executed:
set | Descr ption
YES Symbo. preiet
Blark | Not preset or not meaningful
e DIM: The dimension of a symbol:
Dimension | Descr ption
SCALR Scalar var.able
ARRAY Array vari.ble whose dimension was not retained
number Array vari..ble of specified dimension
blank Not meanin fui
36 Sec
e REFERENCES: The source program record numbers on which the
symbol is referenced. The definition field may be viewed
as the first item on this list. Possible entries are:
Reference Description
number Source program record number of reference
- NONE - No references
SUPPRESSED Some references may have been suppressed by
the R-toggle
3.
A
2.7
=. e
LISTROBO
NAME
BUF
CRLF
LISTENED
SYSGET
SYSPUT
WRITE
26 JUNTS 00200800 MPL 6,93
DEF BN LL ST DEC HE X
6 1 1 10 000A
7 i 1 92 005C
{ 0 0 ¢ 0000
3 1 0 { 0001
4 1 0 2 0002
14 1 1 Se 0038
Figure 3.3.7a:
* kk
MAIN
PROCEDURE
PROCEDURE
LAREL
Sample
SYMBOL
SCOPE
EXT
EXT
EXT
TABLE
SIZE SET DIM
AYTE
80
WORD YES SCALR
son
“ow
WORD
Symbol Table
LA
с
rom
©
16
10
18
15
le
* * * PAGE
REFERENCES
11 15
11 16
16
PTA
TL EE
Lt
. 3.8
33 Sec 3.
Program Summary
A program summary follows the symbol table listing and 15
enabled by the Y-toggle. Figure 3.3.8a shows a sample
program summary.
The summary 1s useful in checking for program flags,
summarizing the source and object programs, and optimizing
compiler memory use.
The program summary consists of 7 parts: flags, source
program, object program, symbol table, compiler stack,
toggles, and flag link.
Flags --
e AFORTS: The number of compiler aborts. This number
includes any aborts suppressed by the X-toggle and, hence,
may be more than 1.
e BLUNDERS: The number of program blunders. If there are
any blunders the object program (0- toggle) and object listing
(H-toggle) will be turned off, urless suppressed by the
D-toggle. There is no way to suppress blunders.
e ERRORS: The number of program errors. There is no way to
suppress errors.
e WARNINGS: The number of program warnings. This number
includes any warnings suppressed with the W-toggle.
Source Program —-
e LINES: The number of lines (records) in the source program.
e STATEMENTS: The number of statements (delimiting semicolons
(';')) in the source program.
e BLOCKS: The number of blocks in the source program.
e LEXDEPTH: The maximum lex depth acheived.
Object Program --
e BYTES PROGRAM: The number of bytes in the object program
exclusive of stack requirements.
e BYTES STATIC: The number of static bytes required by the
object program. This value is always rounded up to a word
boundary and is the value passed to the loader.
3.
Sec 3.3.8 39
BYTES STACK (1): The maximum stack depth achieved by
the outer procedure blo:k. It is the sum of the automatic
data allocation and the scratch required for instruction
execution.
OBJECT RECORDS: The number of object records even if
object 1s suppressed by the O-toggle.
Symbol Table --
BYTES USED: The number of bytes in the symbol table used.
BYTES SPARE: The number of bytes in the symbol table
unused.
SYMBOLS: The number of symbols of all types.
REFERENCES: The number of references to all symbols
even if references are suppressed with the R-toggle.
The sum of the BYTES USD and the BYTES SPARE is a
constant. If symbol table space is a problem the
symbol table summary can he used to determine corrective
action. See Figure 2.35 for symbol table costs.
Compiler Stack --
BYTES USED: The number of bytes in the compiler stack
used.
BYTES SPARE: The number of bytes in the compiler stack
unused.
ACCESSES: The number cf primary accesses to the hash
table (used to address rhe symbol table).
COLLISIONS: The number of secondary accesses to the
hash table due to hashing collisions.
The sum of BYTES USED aad BYTES SPARE is a constant.
If stack space 1s a pronlem the compiler stack summary
can be used to monitor stack use. See Figure 2. 3a
for stack costs. Hash table use can be monitored with
the hash table summary. So long as symbol names are
not highly pathological and the hash table is less than
90% full (Warning 39 has not been generated) the number
of collisions should renain, at worst, a few times the
number of accesses. If the number of collisions exceeds
10 times the number of accesses and there are no
extenuating circumstanc:s, compiler performance will
start to degrade and th: situation should be brought to
the attention of Microdata.
47 Sec 3.3.8
Toggle Summary --
e TOGGLES OFF: All toggles that are off when the program
ends, listed in alphabetical order,
e TOGGLES ON: All toggles that are on when the program
ends, listed in alphabetical order.
Flag Link --
The final item in the program summary is a link to the
line number of the last flag, excluding suppressed warnings.
IZ there are no such flags the message given is:
NO FLAGS
LISTEOBN
Е
26JUNTS
LAGS
A
0
0
0
TOGGLES
TOGGLES
ARNRQTS
BLUNDERS
ERRORS
WARNINGS
OFF
ON?
00100200
SOURCE PROGRAM
MPL 0,93
18 FP INES
1
1
1
STATEMENTS
BLOCKS
LEXDEPTH
Figure 3.3.8a:
аки P ROG R à M
DAJECT PROGRAM
T Y y =
An AYTES VONNQAM
0 BYTES STATIC
106 BYTES STACK(1)
7 OBJECT RECORDS
SUMMARY * à * PAGE
SYX3OL TABLE
COMPILER STACK
104 ВНУТР SEN £4eT QVYEC SEEN
É2 Lo mé > i
Bubo BYTES SPARE 835 BYTES SPARE
7 SYMBOLS 53 ACCESSES
12 REFERENCES О COLLISIONS
ТУ
Sample Program Summary
Sec 4.0
42
DIAGNOSTICS
Error conditions that occur while the compiler is running
fall in three areas: operating system errors, compiler
errors, and hardware errors.
Operating system errors depend on the operating system in
use and are discussed in detail in the appropriate operating
system reference manual.
Compiler errors are either detected or undetected; detected
errors are called flags which are in turn classified as
warnings, errors, blunders, and aborts. Internal compiler
operation is monitored for consistency and any fault
reported as a foul. On o:casion, some hardware problems
may not be completely dia jnosed.
Sec 4.1 | 43
FLAGS: DETECTED ERRORS
Whenever feasible, compilation errors are detected and an
explicit diagnostic is issued in discursive form. The
generic term flag is used to refer to detected errors which
are classified in four levels according to their severity.
The four flag classes, in order of increasing severity
are: warnings, errors, blunders, and aborts. The attributes
of the flag classes are shown in Figure 4.1а. The highest
severity flag that occurs is noted in the object program
for later job control by the operating system.
Warnings may be suppressed by means of the W-toggle to
improve listing appearance in cases where the warnings are
anticipated. The routine suppression of warnings is a
dangerous practice.
An error results in a suspect object: program, a blunder in
a faulty object program. However, the program may still be
executable depending on the circumstances. Once again, the
routine use of object programs that contain errors or blunders
is a dangerous practice. Object program generation 1s suppressed
after a blunder unless object suppression 1s disabled by use
cf the D-toggle.
Compilation is usually discontinued after an abort; end-
cf-program and end-of-job activity :s attempted and a return
is made to the operating system. However, aborts may be
suppressed (although the diagnostic 1s still issued) by
use of the X-toggle; the compiler response to a suppressed
abort 1s given 1n the description of each abort in Appendix D.
Flags are inserted in-line in the program listing as they
occur. In addition, aborts are listed on the console.
The flag listing format is described in Section 3.3.4.
Flags are listed by number in Appendix B, by severity in
Appendix C, and are described in detail in Appendix D.
44 Fig 4.1a
Flag Loader | Compilation Source Object Compiler Related
Class | Code Continuation | Program | Program | Integrity | Toggles
Warning 4 Yes Suspect | OK OK W
Error 8 Yes Ead Suspect | OK -—
Blunder 12 Yes Fad Bad OK D,H,O
Abort -- No cuspect | Suspect | Suspect X
Figure 4.la:
Flag Classes
Sec 4.2 45
UNDETECTED ERRORS
Some program errors go undetected by the compiler either
because detection 1s not feasible or is not possible.
Good programming practice will reduce the occurrence of
undatected errors. The major undetected errors are listed
below in no particular order.
Jo Case Range: There 15 no compiler or hardware
orotection against a do case index exceeding the range
If the supplied cases. It is good coding practice to
2rotect against range violation.
subscript Range: Likewise, there is no compiler or
nardware protection agalnst a subscript exceeding the
declared dimension of an array. Indeed, it is common
practice to declare external arrays to have dimension 0
in all but a single routine. Still, it is good
coding practice to guard agaiast subscript range violation.
Dangling Else: The language associates an else clause
with the innermost unmatched then-clause. It is good coding
oractice to physically format t-e source program to |
2nsure that this association is correct.
Object Cards in Source: A source record with a pound
sign ('t') in the first byte is passed to the object
program directly. This feature is activated by the
t-toggle and it is good practice to deactivate it when
not in use lest legitimate source be unadvertantly missed.
Non-Distinct Symbol References: As a block structured
language, MPL allows a symbol defined in an outer block
to be used in an inner block. Indeed, this 1s the
s>rominent feature of block structuring. However, in the
zase of scratch variables this feature is generally
a liability as the use of the scratch variables gets
inadvertantly multiplexed. It is good coding practice
to define scratch variables separately for each block.
Forward Labels: There is one circumstance where the
current compiler, that makes only a single pass over the
source, fails to detect a scoping violation.
46 Sec 4.2
Consider the program:
p: PROC;
DCL x WORD;
q: PROC;
x = 1;
x: GO x;
END gq;
END p;
The multiple use of x as a variable and label goes undetected.
This circumstance is rare and, inasmuch as the correct code
is generated, is only of academic interest.
Redefined Literallys: Tle compiler performs literally
text substitution before symbol processing. Thus, 1n
spite of the fact that literally symbols follow the ordinary
scoping rules and may be redefined in an inner block, in
effect redefinition is nct possible. The following example
illustrates this problem
p: PROC;
DCL. x LITERALLY 'S*S#'";
gq: PROC (x);
DCL x WORD;
END q;
END p;
The legal redefinition o: x is never honored.
Initial Value Range: Cave should be taken to assure that
the interpretation of co stant precision is appropriate
to the use at hand; lest constant truncation go undetected.
See Subsection 5.2.4.
Distribution of Initial .ists Over Namelists: When an
initial list is applied o a namelist the length of the
initial list is validate.l against the aggregate length of
the namelist. The prope association of each name to each
part of the initial list cannot be validated by the compiler.
Interative Do Index: Th: index of an interative do
(or repeat) is a signed word variable. Thus, the use of
positive indicies over 32,767 requires the use of a
do-while construct.
Sec 4.2 47
e Operand Size Alteration: In evaluating an expression the
size of an operand may be automatically altered according
to the translation algorithms of Section 5.5. Care must
be taken to ensure that such size alteration preserves
the sense of the desired operation. For example, the logical
comparisons (LEQ, etc.) convert both operands to word size
and any decision based on the high-order part of a double
size operand will be erroneous.
48 Sec 4.3
FOULS: CONSISTENCY CHECK:
The compiler contains man" internal consistency checks,
called fouls, to facilitate compiler checkout and
maintenance. For example, fouls are used to guard against
faulty symbol table use. A foul will never occur if the
compiler and hardware are functioning properly. Should
a foul persist, contact M:crodata.
A list of fouls is given :n Appendix С. A foul results
in a message being issued on both the console and program
listing in the form:
'XXXX' FOUL
where 'XXXX' represents tle type of foul.
Sec 4.4 49
HARDWARE CONSIDERATIONS
There are certain hardware characteristics of the 32/S processor
that may lead to undiagnosed errors, or unreported operational
problems. This section is a discussion cf these hardware
aspects, indicating how they are exhibited and how they may
be minimized.
Memory Validity: On a 32/S not equipped with memory parity,
failing memory may be undetected. The symptoms of failing
memory are any unexplained compiler behavior. On a machine
equipped with parity, the compiler may be used to validate
memory.
The compiler is capable of checking memory validity in
the program space it occupies: {from PB (program base)
to PB+PL (program length). The default toggle settings
check memory at the end of each program. By use of the
V-toggle, memory validity may be checked each source
record. (Memory checking is too time consuming to do this
as a matter of course.)
Should bad memory be a problem, place the suspect memories
between PB and PB+PL and ensure that the M-toggle and
V-toggles are on, and hardware parity is disabled. А
faulty memory is indicated by a console and listing message:
BAD MEMORY IN MODULE mm, ROW rr, BIT bb, BITS xx
where (mm,rr,bb) jointly specify a faulty memory chip.
If a multiple bit error has occurred, (xx) will have
more than one bit on and the rightmost will be decoded
as (mm,rr,bb). Bad memory also results in Abort 30.
Stack Overflow: On a 32/S not equipped with stack
overflow protection, stack overflow will go undiagnosed
until program end. The stack overflows into the symbol
table; thus the symptoms of stack overflow are unexpected
symbol table behavior, usually a foul or a loop in a
reference chain.
The compiler checks for stack overflow at program end,
and if the V-toggle is on, each source record. Stack
overflow results 1n Abort 36.
The compiler stack size has been chosen so that any
ordinary program is accommodated. See Section 2.3
for a discussion of compiler stack use.
50
Sec 4.4
Misread Source Data: Scurce devices occasionally misread
data. The entropy of MFL is low enough so that most
instances of misread source data cause computer flags.
Miswritten Object Data: Object devices occasionally misread
data. Object records are checksummed and sequenced so that
all instances of miswritten object data are detected later
by the loader.
Sec 5.0 51
TRANSLATION ALGORITHMS
The translation of source program to object program 1s
specified by a set of translation algorithms that are the
subject of the present chap-er. These algorithms define
the language as actually imolemented. Translation
algorithms are useful whenever knowledge of the generated
code is required. Should tiese algorithms be found
unclear or incomplete, the jenerated code may be
displayed by use of the C-t>ggle, and the generated
loader directives displayed by use of the H-toggle.
An analytic (top-down) approach is taken in presenting
the translation algorithms: blocks are discussed first
and operands last. Some al jorithms show the direct
translation of MPL statemen- to loader directives.
Other algorithms show the translation of MPL statements
to 32/S instructions. The translation of 32/S instructions
to loader directives, and tae loader directives themselves,
are discussed in the final sections of this chapter.
Source text may be passed cirectly to the object program,
bypassing all translation activity, by use of the #-toggle
as discussed in Appendix F. This is the only mechanism
available to generate arbitrary instruction sequences.
There is no mechanism in the language to generate
unimplemented or unused instructions, or instruction
sequences that are not the product of an algorithm in
this chapter. The locatior counters maintained by the
compiler during translatior are:
Mnemonic Name Number Initial Value
pc Program Ccunter 1 0
XC Static Counter 1 0
sc Stack Counter 1 per block 8
The program and static courters are common to all blocks
within an external prcecedura, start at 0, and increase
monotonically as translaticn progresses. The stack counter
is unique to each block anc starts at 8 to leave room for
the stack mark. The stack counter moves up and down as
translation progresses, returning to its initial state at
the end of each block; eact 32/5 instruction has an
associated stack increment (or decrement).
In the code sequences that follow, a box in the place of an
instruction ([ _]) repres nts the generated code for the
entity enclosed in the box
5.1
52
BLOCKS
The block translation algorithms are shown in Figure 5.1a.
Blocks are of 4 types: main, procedure, interrupt, and
begin. A block may be internal or external. External
blocks, that is programs, are bounded by the begin and
end loader directives. Internal begin blocks are entered
with a BENT instruction; other internal blocks are
skipped over with a BRA instruction. A block is exited
with one of the 3 exit instructions as determined by
the block type.
Sec 5.1
Figure 5.la:
Fig 5.1la 53
Entry Exit
Loader Loader Entry 32/S Exit 32/S
Block Type Scope Directives Directive Instruction !Instruction
Main External "81', "90" "82" -- EXIT
Procedure |External "81", "8°" "82" -- EXIT
Internal —— —— BRA <end> EXIT
Interrupt |External "gl", "Be" "82" -——
Internal -- —— BRA <end> IXIT
IXIT
begin Internal -- —— BENT BXIT
Block Translation Algorithms
un
54 Sec 5.2
DECLARATIONS
Symbol declarations are contained in procedure heads, labels,
and declaration statements. The attributes of a symbol are
stored in the symbol table. The declaration process may be
viewed as the translation of declarations into attributes
in the symbol table. (The classification of symbols is
discussed in conjunction with the symbol table listing in
Section 3.3.7.)
The only declarations that result in loader directives are
those for external symbols. The only declarations that
result in 32/5 instructions are those for labels and initial
values.
In the case of a symbol that is a label, parameter, or
procedure, the complete declaration may be fragmented in
two parts. In such cases the symbol is marked as undefined
until all attributes are in hand. A symbol that is undefined
when used (which is illegal) resul<s in automatic declaration
appropriate to the context in which the symbol is used.
A procedure head declaration defines the entry name. In
the case of a forward procedure, the procedure head is the
second half of a fragmented declaration, and the size
attribute must agree with that previously declared. The
generated code and loader directives issued for a procedure
head are discussed in conjunction with block translation
in Section 5.1.
A label declaration defines the label name. In the case
of a forward label, the label declaration is the second
half of a fragmented declaration. A label is reclassified
as a do label or becin label if it is subsequently found
to appear on a group or begin. This subclassification of
labels is used to mechanize labeled-end checking. A label
generates an SSP instruction to purge any iteration context
from the stack should the label be invoked from within an
lterative group:
SSP (sc-2)/2
The declaration-statement declarations form the bulk of the
declarations. In the case of parameters, the declaration
statement is the second half of a fragmented declaration;
in the case of forward procedures, the first half. Each
name 1s entered in the symbol table; the symbol class and
all attributes, except value, are filled in from the
attributes appearing in the declaration statement. As
each external procedure is encountered an "88" loader
directive 1s issued; as each literally is encountered the
literally text is saved in the symbol table.
Sec 5.2.1 55
Value Allocation
The value attribute 1s determined when all declaration
statements are in hand, that is, when the first non-declaration
statement 1s encountered. (It is necessary to delay address
allocation to this time to accommodate parameters which
must be allocated first, but need not be declared first.)
Figure 5.2a shows the use and value of the value attribute.
Before the value is assigned it is rounded up to a word
boundary, if appropriate, as indicated in the word alignment
column. After the value is assigned it is incremented by
the value increment column.
At the same time values are assigned, external variables
are delivered to the loader with a series of "8F" directives.
The extent field of this directive uses the value increment of
Figure 5.2. la.
Following a declaration set, an SSP instruction is issued
to skip over the stack mark, initial values, variables,
and parameters:
SSP (sc-1)/?
and, finally the stack counter, sc, rounded up to a word
boundary in preparation for future stack activity.
pc - program counter
XC — Static counter
sc — stack counter
D — dimension+l
Figure 5.2.la:
First | Word Value
Class Scope Size Value Value Alignment Increment
Procedure External -- External procedure 1 -- 1
sequence number
Internal -- pc 0 -- --
Static External -—— External variable 1 -— 1
sequence number
Internal -- XC 0 Except byte See automatic
Constant -- -- pc 0 Except byte See automatic
Parameter -- Double sc 8 Yes 4
Other 2
Automatic -- Byte sc 8 Only if first 1*D
of namelisl
and initialized
Word Yes 2*D
Double Yes 4*D
Bit (1) Yes (1*D+7)/8
Bit (2) Yes (2*D+7) /8
Bit (4) Yes (4*D+7) /8
Pointer Yes 2*D
Value Attribute for Symbols
el Z.S TJ
Sec 5.2.2 57
Preset Variables
There are two types of preset variables: constant variables
(constants) and initialized variables (initialized automatic
variables). Constants require less execution time and
space but may not be addressed as freely as initialized
variables. There are two ways of specifying the preset
values: with an initial string or with an initial list,
as discussed in the next two subsections. These sections
contain examples of preset variable translation.
Constant variable text appears only in program space and
never in the stack. The text is inserted in program space
and skipped over with a branch instruction. A new branch
is issued if the constant set is broken by an initial
variable. A BYTE pseudo-irstruction is issued, 1f necessary,
to align a constant of worc¢ or double size on a word boundary.
Initialized variable text ¢ppears in program space and
is moved to the stack each time the procedure is entered.
Data is moved from program space to stack space with FILL
instructions. A SSP instruction is also generated for
each name list to route the FILL data to the proper stack
location:
SSP (sc-2)/2
where sc is stack address «uf the first item of the name list.
.2.3
58 Sec 5.2.3
Initial Strings
Initial text that appears as a string is converted to an
infix format. (A string appearing as an element in an
initial value list is used without alteration.)
The infix string format is:
| length’ +? el x! tl | 0!
The <length- indicates the number of characters in the
<text>. Note that a string is restricted to 255 bytes.
A 0 is appended to the string, if necessary, to pad out the
text for a FILL instruction to a full word. The total
length of the converted string is:
Preset Type Length Byte Padded Total Length
Constant -- No <length>+l
Initial Odd No <length>+1
Even Yes <length>+2
If the first or only name of the name list is not an array the
variable is changed to an array and the <length> inserted as
the dimension; if the variable is an array, the dimension
is validated against the string length: the length must
exactly match for a constant variable and may not be longer
for an initialized variable. The size attribute must be
BYTE or a flag 1s generated.
should an initial string be applied to a name list the
translation depends on whether the first name is dimensioned.
If it is not, the string will exactly match the created
dimension of the first name and subsequent names will not be
initialized. If a dimension is supplied and is more than
the string length, the tail of the first variable, and all
subsequent variables are not initialized; a flag is generated
for a constant variable. Finally, if a dimension is supplied
and 1s less than the string length, the string text will
spill into the trailing variables; a flag is always generated
and the length field for subsequent variables contains a
‘text> character.
Sec 5.2.3
The code generated for an iritial string is a series of
-f the total length is not a
the WORD and BYTE pseudo-instructions are
For an initial variable,
the final FILL
DBLE pseudo-instructions.
multiple of 4,
used for the final bytes.
instruction is inserted every 16 words;
may have a count of less than 16.
59
a FILL
The example below illustrates initial string translation:
P: PROC; DCL /* EC */
A BYTE CONSTANT “A3C”,
0 0000 * 47 0000 BRA
3 0003 * 03414243 DBLE
B(1) BYTE CONSTANT "°°",
7 2007 * 0127 WORD
C BYTE INITIAL 4
0 0000 ** 47 0009 BRA
9 3009 * 5A 0000 SSP
12 000C * 59 O1 FILL
14 000Е * 0000 WORD
D(99) BYTE INITIAL 123456789A123456789B123456739€12
16 0010 * 5A 0000 SSP
19 0013 * 59 10 FILL
21 0015 * 20313233 DBLE
25 0019 * 34353637 DBLE
29 0010 * 38394131 DBLE
33 0021 * 32333435 DBLE
37 0025 * 36373839 DBLE
41 0029 * 42313233 DBLE
45 002D * 34353637 DBLE
49 0031 * 38394331 DBLE
53 0035 * 59 01 FILL
55 0037 * 3200 WORD
END P;
9 0009 ** SA 0003 SSP
16 0010 ** 5A 0004 SSP
57 0039 * 5A 0036 SSP
69 003C * 54 EXIT
0
54608451
295
OO — OD
0
16
240095027
875902519
943276337
842216501
909588537
1110520371
875902519
043276849
1
12800
3
4
54
5
2.4
60 Sec 5.2.4
Initial Lists
Initial text that appears in a list is packed into a buffer
whose elements correspond to the declared size: double,
word, byte, bit(4), bit(2), or bit(l). Pointers are
treated as word; after packing, bits are treated as byte.
The kuffer 1s padded with 0's to the next word boundary.
There 1s no limit to the length of an initial list.
If ar initial list is applied to a name list, the first
name list element corresponds to the first initial list
element, the second to the second, and so forth. Should
the rame list contain arrays, each array element qualifies
as a name list element.
For a constant variable name list, the aggregate number of
elements in the name list must exactly match the number of
elements in the initial list. For an initialized variable
name list, the initial list may not be longer.
Each constant of the initial list is inserted in the element
buffer as follows. The constant madnitude is first evaluated
in 32 bit precision. A preliminary overflow flag is
generated 1f a bit string has more than 32 bits (leading
0's are significant), a character string has more than 4
bytes, or a decimal number has more than 31 magnitude bits
(leacing 0's are not significant). The constant sign,
1f ary, 1s applied using 2's complement arithmetic. The
32 bit result 1s then inserted in the element buffer
truncating high-order bits. An overflow flag is generated
1f all the truncated bits do not have the same sign.
This interpretation of precision treats a constant as a
magnitude number whole value may be represented with a
signed number. Since decimal constants in expressions are
strictly 2's complement (see Section 5.7), care must be
exercised as shown in the following examples of constant
translation in initial lists:
Declared
Implicit
External Value | Variable Size | Internal Value | Flagged | Expression Size
4 Bit (2) "С" Yes Word
-1 Bit (4) “E Nc Word
€0000 WORD “FA60" No (+) Double
Sec 5.2.4
The code generated for an iritial list is a series of
DBLE, WORD, or BYTE pseudo-instruction.
variable, a FILL instructior is inserted every 16 words;
the final FILL may have a ccunt of less than 16 and may be
padded with an extra byte of 0 to fill out the final word.
For an initial
The example below illustrates initial list translation:
P: PROC; DCL
A
B(1)
(CR, LF)
D(2)
E(99)
END Py;
/* &C */
BYTE CONSTANT
WORD INITIAL
BYTE INITIAL
BIT(2)
BYTE INITIAL
(1),
(2,
("0D",
(
CONSTANT (0, 1,
3),
o
0000
0003
U
0000
0004
0007
9 0009
11 OOOB
"Од" ) ,
13 0GOD
16 0010
18 0012
19 0013
2),
20 0014
23 0017
24 0018
J 8 O
B”, C
20 0014
25 0019
28 001C
30 OO1E
31 OO1F
32 0020
33 0021
4 0004
13 000D
25 0019
34 0022
37 0025
*
x
* + * * *
Ух * * *
+ + *
+
» >» *+ + * + »+ “e
* x
*
*
47
47
IA
59
JA
59
47
47
5A
59
A
IA
5A
SA
54
0000
01
0004
0000
02
0002
0003
0000
01
OD
OA
0000
00
18
0019
0000
02
41
42
43
00
0003
0005
0006
0038
BRA
BYTE
BRA
SSP
FILL
WORD
WORD
SSP
FILL
BYTE
BYTE
BRA
BYTE
BYTE
BRA
SSP
FILL
BYTE
BYTE
BYTE
BYTE
SSP
SSP
SSP
SSP
EXIT
-- ©
Whoo Ob
62 Sec 5.3
5.3 GROUPS
There are 6 grouping statements: simple do, repeat, do
forever, do while, do iterative, and do case. The simple
do cenerates no code. All others generate some code for
the group head and some code for the matching group end.
The do case also genereates code for each enclosed case
(dlcck sentence).
In the algorithms in this section it is understood that all
expressions that result in double size are converted to
word size with a SNGL instruction. Further, should the
distance of a backward branch exceed 254 bytes, the long
form is substituted for the short form shown: DBL for DBB,
BRA for BRB, and DSBL for DSEB.
e REPEAT exp TIMES:
tt
[exp
в
x Boa
; 5 à
e DO FOREVER:
body
BRE X
X
e DO WHILE exp:
— sn .
X exp |
BRE y
body
BRB X
Sec 5.3 63
e DO ref = expl TO exp2 BY exp3:
expl |
L
exp’ |
ехр3 |
I
LADR ref
DIB Y
X body
I
||!
DSBB X
У
If the increment 1s missing. a Ll instruction is substituted
for the evaluation of ‘exp3 .
e DO CASE exp:
CASE X
$
|
co Case О
cl case 1
E
cn Case Il
ADDR cn
ADDR cl
x ADDR co
The NOP instruction at the 1ead of the case branch table
is generated only if requir>:d to force the table to a
word boundary.
6 4 Sec
STATEMENTS
There are only 6 true statements in MPL if blocks, groups, and
declarations are considered separately. These are treated in
this section in alphabetical order: assignment, call, go-to,
1f, null, and return.
Assignment Statement --
There are 4 flavors of the assignment statement: regular,
multiple, embedded, and increment. The last 3 require an
expression of size word (and a storage reference of size word).
If the expression results in size double, a SNGL instruction,
not shown below, is generated; if the storage reference is not
of size word, a flag is generated.
® Regular ref = exp:
exp
[store
The <ref> store is in detail in Section 5.6.3.
e Multiple, ref0 := ref! ... := refn := exp:
STWN refn
STWN refl
STW ref
® Embedded, ref := exp:
exp
STWN exp
e Increment, ref += exp:
exp
AWM ref
Call Statement --
The call statement is discussed in conjunction with procedure
references in Section 5.7.
Go-to Statement --
A go-to statement generates a GOTO instruction.
5.4
Sec 5.4 65
If Statement --
An if statement has slightly different translation depending
on the presence of an else unit:
e If exp THEN unit:
ADJ
. +r e
N
nıt
X
e If exp THEN unitl ELSE urit2:
exp
BRE X
bnit]
Null Statement --
The null statement generates no code.
Return Statement --
The return statement generates an EXIT instruction unless the
containing procedure block 1s an interrupt procedure in which
case an IXIT is used. A return statment in a begin block behaves
as if the return statement vere in the containing procedure block.
Should the return statement contain an expression, the expression
1s evaluated and converted to the declared size of the current
procedure. The conversion instructions generated are:
Procedure Size
Expression
Size Byte Word Double
Word LBL "FF" -- DBL 1
AND
Double SNGL
LBL "FF"
AND SNGL --
66
The following program illustrates statement
P: PROC BYTE; /*
A = 1;
A := B = C = 2;
A = (В := 3);
A += 4:
GO TO Y;
IF 1<2 THEN A=5;
IF 1=2 THEN A=6:
RETURN "10000";
END *;
END Е;
&C */
WORD?
ELSE A=7;
OW oO un, wi
ta) £.J fo y Ca) Fo) ta)
La SP ISL)
Lu [DU run
4 4
NN (MOY on
a VA O
cn
Sh
CIN
~J
0000
0003
0006
0007
000A
00OB
000D
00 0E
0010
0012
0014
0015
0017
0019
ODIA
001C
0020
0021
0022
0023
0026
0027
0023
0029
002A
0028
002C
002F
C030
0032
002C
0035
0036
0032
0038
003D
003E
0040
0041
0042
0043
translation:
53
JA
71
B2
* + +
72
АА
АА
B2
* + * *
*
73
AZ
71
12
28
13
75
B2
* *» + + * +
*
13
71
72
2A
13
76
B2
47
13
77
B2
47
+ + + *+ +» * * * * * *+ *
+
*
42
37
41
25
54
* * * * *
0003
0003
0006
04
06
05
04
0000
04
9000
2035
J4
0038
00010000
FF
Sec 5.
SSP
SSP
BENT
SSP
Ll
STW
L2
STWN
STWN
STW
L3
STWN
STW
LA
AWM
GOTO
Ll
L2
LT
BRF
LS
STW
BRI
Li
L2
EQ
BRE
Lo
STW
3RA
BRE
L7
STW
BRA
LDL
SNGL
LBL
AND
EXIT
BXIT
EXIT
Lu Ww
д, ©
2,
2, A
2,
ду А
Sec 5.5 67
OPERATORS
This section discusses the translation of operators. For the
present purposes, an expression 1s composed of a series of
operators applied to operancs. (The language allows for operator
precedence, subexpressions, and conditional expressions.)
Operand fetching, discussed in the next section, places the
operand in the stack; the result of any operation is also in
the stack. Each operand anc the result of an operation are
either of size word or double. Operand translation concerns
the determination of the result size, the conversion of the
operands to a compatible size, and the selection of the 32/S
instruction to execute the cperation.
Operators are of 2 types: unary (1 operand) and binary
(2 operands).
Unary Operators --
There are 3 unary operators as shown in Figure 5.5a. The unary
addition operator ('+') generates no code, the others a single
instruction. The size of tro result is always the same as the
size of the operand.
Binary Operators --
There are 26 binary operators as shown in Figure 5.5d. There
are 5 classes of binary operators from the point of view of
the translation algorithms: other, shift, logical, DIVD, and
MULD. Figure 5.5b shows the result size by class, Figure 5.5c
the operand preparation by class, and Figure 5.5d the code
generation by individual operation and also the class definitions.
e Other: The other class consists of the bulk of the
arithmetic operators. It distinguishes the word-word
case from the others. Tro word-word case is done exclusively
in word size, the other cases convert word to double, use
double operations, and produce a double result.
e Shift: The shift class consists of the 4 shifts. It
operates in, and produces a result of, the first operand
size, but requires the second operand, the shift count, to
be word.
e Logical: The logical class consists of the 6 logical
comparisons. It works ex-lusively in word size.
e DIVD: The DIVD class consists only of DIVD. The first
operand (the dividend) must be double, the second operand
(the divisor) must be wori, and the result is always word.
e MULD: The MULD class consists only of MULD. Both operands
must be word and the result is always double.
68
Operand Size
Unary
Operator Word Double
+ — _— —
- NEG DNEG
+ NOT DNOT
INSTRUCTIONS GENERATED
Operand Size
Unary
Operator Word Double
+ Word Double
— Word Double
+ Word Double
RESULT SIZE
Figure 5.5a:
Unary Operator Translation
Fig 5.5a
69
Fig 5.5b
Operand Sizes
Binary
Operator
Class Word-Word Double-Double Word-Double Double-Word
Other Word Double Double Double
Shift Word Double Word Double
Logical Word Nord Word Word
DIVD Word Nord Word Word
MULD Double Jouble Double Double
Figure 5.5b:
Binary Operator Result Size
Fig 5.5c
70
| Operand Sizes
er,
Class Word-Word Double-Doub:e Word-Double Double-Word
[pl | lopl ]
[222 ] op? [5527
Other DBL 2 DBL1 о
opl | [op] |
ez] | (eZ op? [952 )
Shift SNGL SNGL
Gel] o opi]
SNGL SNGL
Logical ор? [op2 | (op? [652]
SNGL - SNGL I |
Cam I] [EE]
DBL1 DBLI
DIVD EZ) [7] SA]
SNGL SNGL
Ca ul oer] =
SNGL SNGL
MULD [op2_] [opZ |
SNGL SNGL
opl = code for first operand fetch
op2 = code for second operand fetch
Figure 5.5c:
Binary Operator Operand Preparation
Fig 5.5d
Operand Sizes
71
Binary
Operator
Class Operator Word-Word Double-Double Word-Double Double-Word
Other + ADD DADD
- SUB DSUB
* MUL DMUL
/ DIV DDIV
& AND DAND
| OR DOR
XOR XOR DXOR
MOD MOD DMOD
<= LE DLE
LT DLT
= EQ DEQ
t= NE DNE
> GT DGT
>= GE DGE
t
Shift SLC SLC DSLC | SLC DSLC
SLL SLL DSLL SLL DSLL
SRA SRA DSRA | SRA DSRA
SRL SRL DSRL | SRL DSRL
Logical LEQ LEQ
IsGE LGE
LGT LGT
LLE LLE
LLT LLT
LNE LNE
DIVD DIVD DIVD
MULD MULD MULD
Figure 5.5d:
Binary Orerator Code Generation
72
OPERANDS
This section discusses expression operands. There are 5
types: procedure references, subexpressions, conditional
expressions, literals, and memory references. Procedure
references are discussed in Section 5.7. Subexpressions
are a linguistic artifact and have no bearing on the
translation algorithms.
Sec 5.6
Sec 5.6.1 73
Conditional Expressions
A conditional expression operand has the form:
IF expl THEN exp2 ELSE 2xp3
The result size of a conditi> nal expression is double
if either <exp2> or <exp3> is double; the result size 1s
single if both <exp2> and <exp3> are word. The code
generated is:
Size? = Double Size2 = Word
Size2 = Size3 Size3 = Word Size3 = Double
|
[e xp1] [exp]
BRF x ERF x BRF x
exp2 |e xp2 * [exp2]
| |
BRA y | ERA y BRA у
[€ xp 3] | x lexp3]
x
E
x
y [BL] | BRA z
Y | Y DBLi
„A Sec
Lıt2rals
—
Literal operands may be written in 3 forms: bit strings,
character strings, and decimal numbers. A literal operand
does not include a sign. The literal is converted to a
72 Dit internal value with an associated precision and
a load literal instruction generated. An overflow flag
15 generated if the internal representation requires
more than 32 bits. Unused bit positions are filled with
zeroes.
e 31t Strings: A bit string is regarded as representing
a binary magnitude number. It has the bit precision
of the number of bits written. Leading zeroes are
significant. If overflow occurs, the 32 low-order
21ts are retained.
e Character Strings: A character string is regarded
as representing a binary magnitude number, as with
a bit string. It has the bit precision of the number
Of characters written times 8. If overflow occurs
he high-order characters are retained.
® Decimal Numbers: A decimal number is regarded as
representing a signed binary numbser. It has the
precision of the number of magnitude bits present in
the converted binary representation plus a sign bit
(which is always 9). Leading zeroes are not significant.
If overflow occurs, the 32 low-order bits are retained.
"his interpretation of decimal precision differs
from that used in initial lists (see Section 5.2.4).
The load literal instruction generazed is a function of
the precision:
Precision (bits) Opcode Operand
0-4 LX none
5-8 LBL 1 byte literal
9-16 LWL 2 byte literal
17-32 LDL 4 byte literal
5.6.2
Sec 5.6.3 75
Memory References
Memory reference operands o:cur in 2 symetric forms:
loads and stores. This subsection deals exclusively with
loads but applies equally t> stores with the following
alterations: all load operations become store operations;
memory reference preparation (index evaluation, etc.) is
separated from expression s.ze conversion and the actual
store, by expression evalua -ion; and, finally, constant
variables may be loaded from but not stored into. (Parameters
may be stored into, but sine they are mechanized with a
call-by-value scheme, they ‘isappear when the procedure
is terminated.)
The memory reference transl. tion algorithms are shown
in Figures 5.6.3a (non-autoriatic variables) and 5.6.3b
(automatic variables). For non-automatic variables there
is no difference in the algorithms for the different
sizes, except of course, fo: the actual store. For automatic
variables the address “or b: te size is a byte address,
the address for word and double size is a word address.
In all cases the size field for a LADR instruction is
conditioned by the variable size. Figure 5.6.3c shows
the correspondence between t ardware address mode and
language variable class.
Memory reference translatior for automatic variables is
a function of locality and span. A variable is local
if it is referenced in the same block it is defined; a
variable is remote if it is referenced in a block that
is nested in the block in wtich it is defined. The span
of a variable is its EP byte address for a byte variable,
and its EP word address (byte address divided by 2) for
a word or double variable; the span is short if less then
255, long if 256 or over.
The pointer size attribute Tay be applied to a variable
of any class. The code consists of a load of the pointer
followed by a load of the ac“ual data. The bit size
attribute and field select s»ecification may be applied
to any storage class; however, the size attribute must
be word for field select and is effectively word for
bit, as the final LF (load f.eld) instruction assumes
word. The algorithms shown issume that the load can be
accomplished in a single LF iistruction. Should an index
or other supporting operand »e required, the necessary
code is inserted before the “inal LF per the algorithm
of the parent symbol class.
76 | Sec 5
The 2 argument form of a field select specification
generates a field descriptor using a GFD instruction
based on the supplied length and position; the 1 argument
form assumes the single argument is a prefabricated
descriptor.
Data when allocated by the translator is always left
justified. A bit scalar occupies the leftmost bits of
the full word required to hold it leaving the rightmost
bits unused; a byte variable, allocated on an even byte,
followed by a word variable, leaves the preceding byte
(the rightmost of the preceding word) unused. (This byte
would have been used if the byte variable were followed
by another byte variable.)
Data when loaded by a load instruction 1s always right justified.
For bytes, this justification discrepancy can be resolved
when addresses are assigned. For bits, this discrepancy
can only be resolved when the field descriptor is generated
for the load instruction: a non-parameter bit variable is
left justified, a parameter bit variable is right justified.
Constant variable are subject to several constraints
not shared by the other variables. ns mentioned above,
they may not be stored into. In addition, the address
of a constant may not be passed as data (the LADR instruction
has no provision for specifying the space the address is
in: program or stack) or as the object of the address
function ('8'). Note that although this addressing constant
prevents pointer variables from being unused to reference
constant arrays, the same effect can be achieved in the
local routine by use cf array addressing.
Some memory references require supporting operands in the
stack at the time the actual memory reference is made:
a base, an index, or a field select descriptor. In such
cases, the supporting operands are inserted in the stack
in the order they appear in a left-to-right scan with any
basing operands appearing first. Thus a base or indirect
address appears before an array index which appears before
a bit or field descriptor. Further, some preliminary
operands in the stack get used in the computation of others.
.6.7
Sec 5.6.3
The following program illustrates some, but by no means
all, aspects of memory reference translation.
77
78 Sec 5.6.3
P: PROC([PARAM_ REMOTE BIT2 ARRAY); DCI, /* SW */
AUTO_REMOTE _RYTE SCALAR RYTE,
AUTO_REMOTE_ WORN ARRAY (0) WORD,
PARAM_REMOTE_BIT2 ARRAY(N) Z2IT (2):
Q: PROC(PARAM LOCAL_BYTE_SCALAR, FARAM_LOCAL_WORD ARRAY); DCL
(INDEX, A_INDEX, P_INDEX,
LEM, LOC, FIELDS) WORD,
AUTC_LOCAL_SHORT_BYTE SCALAR BYTE,
AUTO LOCAL_SHORT _DBLE ARRAY(O) DOUBLE,
FILLER(10C9) BYTE,
AUTO_LOCAL_LOMG_BYTE_SCALAR BYTE,
AUTO LOCAL LONG _DBLE ARRAY(O) DOUBLE,
STATIC_INT BYTE SCALAR BYTE STATIC,
STATIC_EXT BIT1 ARRAY (0) BIT (1) EXTERNAL,
CRASE_BIT2 SCALAR BIT(2) BASED 10,
VBASE WORD ARRAY (0) FORD BASED STATIC_INT RYTE SCALAR,
CONSTANT _BYTE SCALAR BYTE CONSTANT (12),
PARAM_ LOCAL BYTE SCALAP HYTE,
PARAM LOCA WORD ARRAY(O) WORD,
POINTER TO BYTE,
POINTER TO WORD;
PTR BYTE _SCALAR
PTR_WORD_ARRAY (0)
CALL Pt /* SC */
ANTO LOCAL SHCRT BYTE SCALAR,
17 9011
AUTO LOCAL _SHCRT DBL" ARRAY(INTEX),
*
FA 18 LE 2, AUTO LOCAL SHORT _BYTI_SCA
19 0013 * r2 06 LW 2, INDEX
21 0015 * C3 OD LD 3, AUTO LOCAL_SHORT _DBLE ARR
AUTO REMOTE BYTE SCALAR,
23 3017 * 06 1800CA LADR 24, AUTO_REMOTE_BYTE SCALAR
27 9018 + FC LEB 4
AUTO_REMOTE _VIORD_ARXIANY (INDEX),
28 JOLC 06 1900C0C LADR 25, AUTO REMOTE WORD ARZAY
32 2020 * F2 06 LW 2, INDEX
34 0022 * FO LW 5
AUTO _LCCAL LONG_BYTT SCALAR,
35 0023 06 080407 LADR 8, AUTO LOCAL _LONG_BYTE SCAL
39 0027 FC LR 4
AUTO _LOCAL_LOCNG_DBLE ARRAY (INDEX),
40 0028 * 06 0A0408 LADR L1O0,AUTO LOCAL LONG DBLIH ARR
44 302C + F2 06 LW 2, INDEX
46 JOZ2E * C5 LD 5
STATIC INT_BYTE SCALAR, :
47 O02F * F8 0000 LB О, STATIC_INT _BYTE_SCALAR
"IC_EXT_BIT1 ARRAY (INDEX),
50 5032 * F2 06 LW 2, INDEX
52 0034 + CD XB1
53 93035 * D1 0001 LF 1,STATIC_EXT_BIT1 ARRAY
CBASE_BIT2 SCALAR,
5e 2038 * ТА L10
57 039 + 70 LO
58 DOJA * 41 1E LEL 30
60 N03C * C7 LF 7
Sec 5.6.3
VBASE_ _WORD_ARRAY (INDEX) $
61
64
66
68
70
71
CONSTANT BYTE SCALAR,
72
73
PARA: LOCAL_3YTE_SCALAR,
76
PARA LOCAL WORD _ ARRAY (INDEX)
78
80
82
84
PARAM RFMOTE_BIT2_ARRAY (INDEX)
85
89
30
a
93
PTR _TIORD_ARRAY (INDEX),
34
98
120
PTR_BYTE_SCALAR @,
101
105
106
(P INDEX),
107
111
112
114
PTR BYTE SCALAR @
PTR WORD ARRAY (A INDEX) A
115
119
121
122
124
125
END ©;
SAD Ps
0035
0047
0042
0044
0045
0047
0043
0043
0047
S (FIELDS
004%
005)
0052
0054
0055
2059
005%
0057
0057
QOSE
0062
OD€ 4
00€5
0069
O06A
9065
O0€F
0070
0072
(P_INDEX)
0073
0077
0079
007A
007C
007D
(LEN: LOC),
*
*
*
*
*
*
* +
x
x
+ * + * * * + * +
+ A * *
+ хх ох Хх >
F8
F2
F2
F2
2F
D/
70
FE
2
9 —
EA boo
Во.
РА
OE
В 5
06
Fo
06
FA
Fo
0000
06
09
OA
0009
09
05
06
ОВ
190008
06
0904 0E
06
0904 0C
0904 0C
08
SC */
090405
07
08
17
,
LB
LW
LW
LW
GFD
LF
LB
LW
LW
LA
LE
LADR
11]
LW
N32
LF
LADR
LW
LW
LADR
LW
LB
LADR
LW
LW
LB
LADR
LW
LW
LW
LW
CALL
79
0, STATIC _IIT_BYTE_SCALAR
2, INDEX
2, LEN
2, LOC
7
6, CONSTANT BYTE _SCALAR
2, PARAM_LOCAL_BYTE_SCALA:
2, PARAM_LOCAL_WORD ARRAY
2, INDEX
, FIELDS
de
25, PARAM_ REMOTE _RBITZ_ ARRAY
4
2, INDEX
5
9, PTR_WORD_ARRAY
2, INDEX
5
9, PTR BYTT_SCALAR
4
4
9, PTR_BYTE_SCALAR
4
2,P INDEX
5
9, PTR_TIORD_ARRAY
2 fr A I INDEX
о
2,P INDEX
5
23
80 Fig 5.6. 3a
Symbol Class Subcase Scalar Array
Static Internal L* 0,SB L* 1,SB
External index]
L* 0,0020 L* 1,0000
Constant Based base] chase;
LO index |
L* 7 L* 7
|
Variable Based base] base |
LO ndex |
L* 7 Lx 7 |
Constar.t LO index] |
L* 6,PB L* 6,PB
Parameter Local see automatic | LW 2,EP
Figure 5.6.3b index]
5,
!
Ade +
Remote see automatic | LADR AÁA,size,EP
Figure 5.6.3b | LW 4
| Réal
| L* 5
Any Pointer, | la-index
no index pointer | cinter
L* 4 L* 4
Pointer, | a-index
with index [pointe pointer]
-index p-index
L* 5 L* 5
pit — e
LBL bitspec | XBi
LF mode , address | LF mode ,address
Field select, I Endex]
1 argument fields] fields
LF mode ,address LF mode ,address
Field select,
2 arguments lengt
locatio
GFL
LF mode ‚address LF mode, address
Fig 5.6. 3a 81
SB - Stack base stack location
EP - Environment pointer sta:k location
PB - Program pointer program location
* - B (byte), W (word), or > (double) depending on variable size
size - "8" (byte), "9" (word), or "A" (double) depending on parameter size
A - Differential lex level from current to variable
i - 1 (BIT(1)), 2 (BIT(2)), 4 (BIT(4)) depending on bit size
0000 - 16 bit address of O filled in later by loader
local - See text
span - See text
mode - Mode of parent variable
address - Address of parent varienle
cbase
ivbase
В
FH
3
Qs
M
X
a-index
p-index
ol1inter
ength
ocation
lelds
Code for loading constant base:
result 1s word
a load literal of some variety,
Code for loading variar le base, result is word
Code for loading array index, result is word
Code for loading array index, result 1s word
Code for loading pointer index, result is word
- Code
Code
— Code
- Code
for
for
for
for
loading
loading
loading
loading
pointe ©
bit f:21d length, result is word
bit f:eld length, result is word
prefal ricated field descriptor
o [A] [ETT |
p-
+ - -
и
О
D
a
Figure 5.6.3a:
Prefabricated descriptcr of bit scalar:
Size Parameter Non Parameter
(right justified) (left justified)
Bit (1) MO rr "OR"
Bit (2) a "Эр"
Bit (4) "ae nom
Memory Reference Translation
82
Fig 5.6.3b
Case Dimension Byte Size Word Size Double Size
Local short- Scalar LB <,EP LW 2,EP/2 LD 2,EP/2
span
Array index [index]
LB УЗ, ЕР LW 3,EP/2 LD 3,EP/2
Local long- Scalar LADR A,8,EP LADR A,9,EP LADR A,A,EP
span, LB 4 | LW 4 LD 4
Remote |
|
!
Array LADR A,8,EP ‚ LADR A,9,EP LADR A,A,EP
pas
5 LW 5 LD 5
Note :
Figure 5.6.3b
Terms defined in Figure 5.6. 3a
Memory Reference Translation for Automatic Variables
Fig 5.6. 3c
83
Hardware
Address
Mode Effective Address Use
О SB + d16 Scalar static
Es ali dans o Г + + = ани — —]]]]—]—[]M EE — | эт = нс =) она = — — J J — — —]—
1 SB + dl6 + tos (x) Array static
2 SB + EP + d8 Local short-span scalar automatic
3 SB + EP + d8 + Local short-span array automatic
tos (x)
4 SB + tos (dl6) Non- indexed pointer, Local longspan scalar
automatic, Remote scalar automatic
5 SB + tos (x) + Indexed pointer, Parameter, Local long-span
tosl (d16) array automatic, Remote array automatic
6 PB + d16 + tos(x) Constant
7 tos (x) + Base
4 * tosl(d18)
SB - Stack base stack location
EP - Environment pointer stack location
PB - Program base program location
d8 - Displacement of 8 bits
dle - Displacement of 16 bits
dl8 - Displacement of 18 bits of which the low-order 2 are assumed 0
tos - Top of stack, use indicatel in parentheses
tosl - Next to top of stack, use indicated in parentheses
Figure 5.6.5c:
Memory Reference Mode Use
84
PROCEDURE REFERENCES
This section discusses the translation algorithms for a
For the purposes of the present discussion
it 1s convenient to classify procedure in 3 groups:
called procedure.
micro, and built-in. Arguments
manner for all procedures.
e Arguments:
arguments by address.
A scalar argument 15
result in an address.)
which will leave the
An array argument 1s
referenced without a subscript.
array element in the stack.
any expression.
stack.
Note that all arguments occupy a word,
occupy 2 words.
The following example illustrates argument translation:
BP: PROC; DCL /* &C */
SYS PUT EXT PROC,
BUF (79) BYTE;
CALL SYSPUT (BUF, LOW("1 0000" + 83));
c 0000
: 0003
7 0007
11 0008
16 0010
18 0012
19 0013
21 0015
z 0016
END P;
24 0018
(An
The expression is
result in the
a symbol declared as
+ + + + + * * x *
Scalar arguments are passed by value, array
user ,
are translated in the same
Sec 5.7
expression may
evaluated,
an array but
A LADR instruction 1s
generated, which will place the address of the first
5A
50
06
42
41
08
4F 00
37
52
54
except for an
expression that results in a double size which will
002B
140001
080008
00010000
50
05
SSP
MARK
LADE
LDL
LBL
DBL1
DADD
SNGL
CALL
EXIT
43
20, 3YSPU7
8,BUF
65536
80
Sec 5.7
85
e User Procedures: A user procedure reference generates:
CALL name (agrl, arg2,
MARK flags, locat
CALL length
where <length> is the tot
words including the mark;
address of the invoked pr
<flags> contains several
nature of the call as dis
translation of the MARK 1
e Micro Procedures: A micr
CALL name (argl, arg2,
arg:
arg?
argn
MICR location
.. argn);
on
11 size of the argument list in
<location> 1s the PB
cedure (which may be
pieces of information
‘ussed in conjunction
istruction in Section
> procedure reference
argn);
relative
external);
about the
with the
5.8.
generates:
where <location> is the d:clared microstore address.
e Built-in Procedures: There are 17 built-in procedures all
of which generate in-line
declared, rather it 1s de
With the exception of the
definition is made in the
the environment built-in
in which it is invoked.
a built-in name to be use
an inner block.
code. A built-in is
not
ined when first encountered.
environment built-in,
the
outermost block, block 0;
is defined anew in each block
lote that the language permits
1 аз а user symbol; however,
there is no way to redefinre the symbol as a built-in in
86
Figure 5.7a shows the attributes given to the built-ins.
The following points are worth noting. The built-ins
shown with a return size may be invoked either in a
call statement or expression. The built-ins without
a return size may only be invoked in a call statement.
The return size of abs is the same as its argument;
that is abs is a generic built-in. The environment
built-in is best viewed as an array of pointers whose
first element is the first word of the current stack
environment; it has the properties of any other array
of pointers and generates code accordingly.
Arguments to built-in procedures are validated for
correct size and flagged if incorrect. This is the
only circumstance in the compiler where an expression
1s not automatically converted to the desired target
size.
Sec 5.7
Fig 5.7a 87
Number of Argument Return Code
Function Arguments Size Size Generated
abs 1 Word, Word,
Double Double ABS!
carry 0,1 Word, Word TCAR?
Double
dble 1,2 Word Double DBL1*
environment 1 Word Word O
high 1 Double Word POP
low 1 Double Word —SNGL
nop 0 -- -- NOP
over flow 0,1 Word, Word TOVF?
| Double
pnop 0 | -- -— Pop
resume l Word -— RESM —
ssr 0 -- -- SSR
supervisor 1 Word -- SUPV
switches 0 -— Word ESW
trap 0 -- -- TRAP |
wait 0 —— -- WAIT
xim 1 Word Word i XIM
prtnum 1 Procedure | Word | LWL addr”
1 DABS if argument size double
2 Preceded by POP 1f argument size double,
if 1 argument form
UT & Ww
No instructions generatec
see text
PB address of start of p:ocedure for internal procedures,
if 2 argument form
additional POP
PLIB number of segment aj pended to PRTNUM of procedure
for external procedure.
Figure 5.7a:
Built-in Function Translation
88 Sec 5.8
INSTRUCTIONS
This section discusses the translation of 32/S instructions
into loader directives. It is convenient to classify
the instruction set 15 ways accordinc to the opcode length
and operand type as shown in Figure 5.8b. The mapping
from instruction to class is shown in Figure 5.8d. The
translation algorithms from instruction class to loader
directive are also shown in Figure 5.8b and are amplified
below.
Most instruction classes can occur only in-line. The
branch, GOTO, and pseudo-ADDR classes may also occur
out of line as fixups to previously generated directives
where a 0 was used for a PB address that was a forward
reference. Fixups are mechanized by changing the program
counter to the fixup location, performing the fixup, then
restoring the program counter. The original opcode is
not rewritten as it remains unchanged.
Absolute text is implied in Figure :.8b where a directive
of the form <0x> is shown. The <x> bytes of absolute
text are arpended to an absolute text string if one is
already in progress. A new absolute text string is begun
if none is in progress or an object record boundary would
be crcssed.
The pseudo-instructions are created by the compiler and
do not exist in the 32/S processor. They have no opcodes,
consisting only of an operand.
The LADR, MARK, and GOTO instructions have an associated
flag byte of absolute text described in detail in Sections
9.9, 9.2, and 9.10 respectively of Reference 6. The
DLEX field, common to all instructions, measures the
lex level difference between the current block and block
of interest; if the reference is to the current block,
DLEX is 0. Tor LADR the L-field encodes the size of the
referenced item even if use of this field is not enabled
by the I-flag which is set when LADR is used to compute
the effective address of an array element specified by
use cf the address operator ('@'). The D-flag is set for
all references except those tc static data (internal,
declared with STATIC area attribute, and external, declared
with EXTERNAL). For MARK the Z-flag is always off indicating
the called procedure is in the same segment, and the R-field
is set according to the declared return size: 0 for none,
1 for word, 2 for double.
Fig 5.8a
Mnemonic Opcode Class
ABS
ADD
ADDR
AND
AW
AWM
BENT
BEQZ
BGEZ
BGTZ
BLEZ
BLTZ
BNEZ
BRA
BRB
BRF
BRT
BTOS
BXIT
BYTE
CALL
CASE
DABS
DADD
DAND
DBB
DBL
DBLE
DBL1
DBL2
DDIV
DDUP
DEQ
DGE
DGT
DIB
DIV
DIVD
DLE
DLT
DMOD
DMUL
DNE
DNEG
DNOT
DOR
DSBB
DSBL
DSLC
DSLL
1E
20
pseudo
25
EO
AO
53
1A
1C
1D
19
18
1B
47
46
13
12
15
58
pseudo
52
14
3E
4F00
4F05
16
17
pseudo
08
4F 16
4F03
3F
4F0A
4FOC
40D
48
23
414
409
4F08
4F04
4F02
4F 0B
3C
3D
4F06
4A
4B
4F13
4F10
1
1
11
1
9
9
В) == thn wn tn in nun UI.
---
UT
WW N N H#
1
WKN FoR NNN NEON ROR NDS
№ №
Figure 5.8a:
DSRA
DSRI
DSUE
DUP
DXOF
EQ
ESW
EXIT
FILL
GE
GFD
GOTC
GT
IXIT
LADE
LB
LBL
LD
LDL
Li“
LGE
LT
LLE
LLT
LW
L*
LWL
MARK
MICF
MOD
MUL
MULL
NE
NEG
NOP
NOT
OR
PNOF
POP
RESP
Mnemoric Opcode Class
4F11
4F12
4F 01
1F
4F07
ЗА
05
54
59
2C
2E
57
2D
55
06
F8
41
CO
42
29
DO
3A
3B
39
38
28
FO
7 *
40
50
OC
24
22
36
2B
10
01
11
26
02
OB
56
DV HN NN
нон
BO HH HO OO WOO H нон
нон ое
pd ped
89
Mnemonic Opcode Class
SLC
SLL
SNGL
SRA
SRL
SSP
SSPI
SSR
STB
STD
STF
STW
STWN
SUB
SUPV
SW
TCAR
TOVF
TRAP
WAIT
WORD
xBl
XB2
XB4
XCH
XIM
XOR
Instruction Set Classification
33
30
37
31
32
SA
5B
SF
B8
80
88
BO
AS
21
09
ЕВ
04
03
00
5C
pseudo
OD
ОЕ
ОЕ
2F
OA
27
07
34
35
43
44
45
49
4C
4D
4E
4РОЕ
4FOF
4115
4AF17+
51
5D
SE
6*
90
98
Cs
D8
OHH © OW WLW HB
Ho
Hs
13
Ho He
OOOOOOOOOOOOOOOODOOOODOO
Opcode | Operand Total
Class| Description E Length Membership Inline Directives Fixup Directives
0 Unused ! Never generated
— ОНООНООНННИ e - — a te te oe 1 _ PE a = 1 E ен TS
1 Short None 1 | ABS ‘ 01/0p
1 | | - !
2 Long None 2 | DADD .. 3 02/4F+op
3 [short 1 byte literal 2 ' BRB ... * 02/0p+lit
4 |Long 2 byte literal: 3 | IWL MICR SSP, 03/op+lit
5 [Branch PB address 3 REQZ > 01/op, 8B/PB address 83/L1xup, 8B/PB address, 83/current
6 |LADR “Flags + stack ‘4 LADR 02/06+flags, [02/EP address (automatic variable)
address BA/EDSN (external static variable)
| | 8C/SB address (internal static variable)
} :
7 MARK Flags + PB 4 MARK 02/50+£lags, [02/EPSN (external procedure) |
| address | 02/0000 (internal forward procedure) |
| | 8B/PB address (internal backward | procedure)
—_— 12 2 à ————— _ 4 + o. — aaa 14 2 _ I — aa 22e tsar = cw
8 GOTO ¡Flags + PB 4 SOTO 02/5/+£lags, 8B/PB address 83/fixup, 01/flags, 8B/YEB address,
| address 83/current
— | неее Вне e be = a ео неко _—— Ч
5 Memory Varies 1-3 AW Cl/op, 8C/SB address (modes 0&l, internal variable}
Reference | 8A/EDSN (modes 08l, external variable)
01/1it (modes 2&3)
| 8B/PB address (mode 6)
7 | none (modes 48587)
o a ea В _ — a - _- . |
10 {LDL '4 byte literal :5 LDL 05/42+1it
ee A ней e _—_ de aaa mina us La mma mm не) =
11 ADDR PB. address 2 + ADDR 8B/PB address 83/51xup, 8B/address, 83/current
12 |BYTE 1 byte literal НЕ | ВУТЕ 01/1it
13 |WORD 2 byte literal 2 | WORD 02/lit
N meme od | a a Le meme _ a ae _ __ - —
14 |DBLE 4 byte literal 4 DBLE 04/1it
; Les de LL
Ob
curre
EDSN
EPSN
fixup
flags
lit
ор
nt - current PB location
- External Data Sequence Number
- External Procedure Sequence Number
- fixup PB location
- See text
- literal text or absolute operands
- opcode
All opcodes with no mnemonics shown at
the end of Figure 5.8b.
ABS IXIT MOD TCAR
ADD MUL TOVF
AND TE “TTD TRAT
LGE
BENT LGT NE WAIT
BTOS LLE NEG
BXIT LLT NOP XB1
LT NOT XB2
DABS LO XB4
DBL1 Ll OR XCH
DDUP L2 XIM
DIV La PNOP XOR
DNEG LA POP
DNOT LS
DUP LG RESM
L7
EQ L8 SLC
ESW L9 SLL
EXIT L10 SNGL
Lili SRA
GE L12 SRL
GFD 113 SSPI
GT L14 SSR
L15 SUB
SUPV
Figure 5.8:
3 DADD
DAND
DBL2
DDIV
DEQ
DGE
CALL
> BEQZ
BGEZ
fd oc
BLEZ
BLTZ
mm
AW
AWM
Instruction Translation
DGT
DIVD
DLE
DLT
DMOD
DMUL
DEB
DSBB
LB
LD
LF
LW
DNE
DOR
DSLC
DSLL
DSRA
DSRL
FILL
CASE
STB
STD
STF
DSUB
DXOR
ag 'S GTA
LBL
DBL
DIB
LOB
STW
STWN
SW
16
92 Sec 5.9
LOADER DIRECTIVES
This section describes the loader directives used by the
compiler.
Directives are written in ASCII on 80 byte fixed length
records. Each record consists of a 5 byte preamble and
up to 75 bytes of actual directives. Directives may cross
record boundaries (although the compiler does not take
advantage of this facility). The preamble consists of:
e Byte 1, Logical Record Sentinel: Always contains a
pound sign ('#'). This permits logical records to be
dissociated from physical records {although the compiler
does not take advantage of this facility).
e Byte 2, Format Indicator: Always contains a blank
("¥") indicating ASCII format. The loader can accommodate
a binary format (although the comp.ler does not take
advantage of this facility).
e Byte 3, Checksum: The checksum of each of the subsequently
used bytes, starting with byte 4. The checksum 1s
formed by byte addition with end-around carry.
e Byte 4, Sequence Number: The record number starting with
1 when the external procedure star<s. If there are more
than 255 records, the sequence number repeats going
from 255 to 1.
e Byte 5, Byte Count: The number of bytes of load text in
this record.
There are 15 loader directive types of which 2 are used
only by the cross compiler but are included here for
completeness. The first byte of each directive determines
the directive type. The number of bytes in the directive
is conditioned by the directive type. The directives are
summarized in Figure 5.9a and described in detail below.
The diagrams with each directive show the directive code,
supporting operands, and the length of each field.
e 0 to "7F', Load Absolute Text: Specifies that the next
<code> bytes contains absolute text. The loader will
insert the text in program space without relocation.
The loader program pointer will be advanced by <code> bytes.
<code>
code! text <
0 <= code <= "JF"
Sec 5.9 93
e "81", Begin External Prccedure: Signals the beginning
of an external procedure (or other external block).
The loader will prepare for a new external procedure.
ng" 1
e "82", End External Procedure: Signals the end of an
external procedure (or other external block). The static
field contains the number of words of static storage
rounded up a word boundary. The possible error codes
are described in Section 4.1. The loader will increment
its static relocation counter by the static length.
"ga"! static length > error code !
e "83", Set Program Pointer: Specifies a non-sequential
change to the program pointer. The loader will set its
program pointer to the location field (after relocation).
"83"! location
e "84", Define Cross Compiler Main Procedure Entry Point:
Identifies the name of a main procedure compiled under
the cross compiler. Dir=ctive "90" performs a similar
function for the self compiler. The name field contains
the first 8 characters of the entry name; characters
beyond the 8th are lost and a short name is padded with
trailing blanks. The lo:ation field contains the
relocatable address of the first instruction; 0 is always
used for the compilers at hand. The loader will add the
name to its symbol table.
co
2
"g4"] name location
e "85", Define External Procedure Entry Point: Identifies
the name of an external procedure. Use the same as
directive "84".
"95" 1 name 8 location
94
Sec 5.9
"86", Define External Interrupt Procedure Entry Point:
Identifies the name of an external interrupt procedure.
Use is the same as directive "84",
"86"! пате 8 location *
"87", Define Cross Compiler External Variable Reference
Number: Identifies the name of an external variable
compiled under the cross compiler and assigns to ita
reference number for later use by directive "ЗА".
Directive "8F" performs a similar function for the self
compiler. The name field contains the first 8 characters
of the entry name; characters beyond the 8th are lost and
a short name is padded with trailing blanks. The size
field measures the extent of the variable in bytes.
The loader will add the name to its symbol table.
а | reference 2
п nl :
87 size number
name
"88", Define External Procedure Reference Number: Identifies
the name of an external procedure and assigns to it
a reference number for later use by directive "89".
The name field contains the first 8 characters of the
entry name; characters beyond the 8th are lost and
trailing blanks ('B') are used to pad a short name.
The loader will add the name to its symbol table.
reference
"ag"! name 8 number 2
"89", Reference External Procedure: Invokes an external
procedure whose reference number was previously defined
in an "88" directive. The loader will insert the runtime
address of the referenced external procedure. The loader
program pointer will be advanced by 2.
reference 2
п ml
89 number
Sec 5.9 95
e "8A", Reference External Variable: Invokes an external
variable whose reference number was previously defined
in an "87" or "8F" directive. The loader will insert
the runtime address of the referenced external variable
in program space. The loader program pointer will be
advanced by 2.
reference 2
1 " 1
ЗА number
e "8B", Relocate Program Address: Specifies relocation
of a program address. The loader will insert the address
field in program space rel cating the address with respect
to the loadtime program base. The loader program pointer
will be advanced by 2.
"ЭВ"! address
e "8C", Relocate Stack Address: Specifies relocation of
a stack address. The loader will insert the address
field in program space relocating the address with
respect to the loadtime stack base. The loader program
pointer will be advarced Ev 2.
"ЗС"! address
"ВЕ", Define Self Compiler External Variable Reference
Number: Identifies the name of an external variable
compiled under the self compiler and assigns to it a
reference number for later use by directive "8A".
Directive "87" performs a similar function for the cross
compiler. The name field contains the first 8 characters
of the entry name; characters beyond the 8th are lost
and short name 1s padded with trailing blanks. The
size field measures the extent of the variable in bytes.
The <attributes> field encodes the variable data type.
The loader will add the name to its symbol table.
Sec
| "ВЕ"! attributes } size name
2 a| reference,
number
/ NX
0.4 0.4
units size
<units> <size> Declared Size
l 1 BIT (1)
2 BIT (2)
3 BIT (4)
BYTE
WORD
DOUBLE
Ww MN --
POINTER TO BYTE
POINTER TO WORD
POINTER TO DOUBLE
Ww NH
"90", Define Self Compiler Main Procedure Entry Point:
Identifies the name of a main procedure compiled under
the self compiler. "84" performs a similar function for
the cross compiler. Directive use is the same as
directive "84".
" 90" 1 name 8 location 2
5.
=
Fig 5.9a 97
Program
Loader Directive Pointer
Code Length Change Description
0 to "7F" <code> +1 code> Load absolute text -
"81" 1 -— Begin external procedure
"82" 4 - End external procedure
"83" 3 set Set program pointer
"84" 11 -- Define cross compiler main
procedure entry point
"85" 11 - | Define external procedure
| | entry point
| |
"86" 11 | -- | Define external interrupt
| | procedure entry point
| |
"87" 14 - — | Define cross compiler
| external variable
| reference number
"88" 11 | -— Define external procedure
reference number
"89" 3 2 Reference external procedure
"ВА" 3 2 Reference external variable
"ЗВ" 3 2 Relocate program address
"gC" 3 2 Relocate stack address
"ВЕ" 14 -— Define self compiler external
variable reference number
"90" 11 -- Define self compiler main
procedure entry point
Figure 5.9a:
Loader Directives
98 Sec 6.0
INTERNAL TRANSLATOR OPERATION
This final chapter 1s concerned with internal translator
organization and operation. It is of interest when the
compiler 1s being maintained or enhanced.
The routines of the compiler may be broadly classified
as passive or active. The passive routines are defined
as being independent of the language at hand, and could
be applied to another language. The passive routines
deal with the system interface I/0, utilities, symbol
table, scanner, and code generation. The active routines
are defined as being dependent on the language. They
correspond to, and are named for, the syntax equations
of Appendix L. The active routines deal with declarations,
block structure, statements, expressions, and operands.
This chapter discusses the passive routines first and
the active routines last.
Several of the appendicies are included to illuminate
translator structure. The load map of Appendix I lists
all external procedures anc variables giving their
dynamic locations. The flag references of Appendix H
show from which procedure =ach flag is generated; а
procedure is listed more than once if it generates the
flag in more than one circumstance.
The external procedure references of Appendix J show
from which translator procedure each translator and system
procedure (shown starred) is called. There is exactly
one uncalled procedure, MPL, the main procedures. Appendix J
is the inverse mappinc of the external procedure references
shown in the symbol table listings when the compiler
itself translated.
The external variable references of Appendix K show
from which translator procedure each external variable
1s referenced. Each variakle is referenced in MPL, the
main program. Once again, Appendix K is the inverse
mapping of the static external references shown in the
translated compiler symbol tables.
Several coding conventions are followed throughout the
compiler. All external variables are defined and
initialized in the main program (MPL); no use is made of
static variables. 1I/C buffer lengths are always l-indexed
(except when the buffer is defined when they are 0-indexed).
The symbol table size may exceed 32K so logical operations
are substituted for arithmetic operations in symbol
table addressing. All routines that return a true/false
response and all flags use ) for false (off) and 1 for
Sec 6.0 99
true (on). Unless otherwise noted, all variables are of
size word and all buffers and string text of size byte;
bit variables are never used, double variables are only
used during constant conversion and lccation counter
updates.
The basic translation strategies used are one-pass,
top-down parse, in memory operaticn, and hash-addressing
of symbols.
Only a single pass 1s made over the source program. One-
pass translation saves time, simplifies external operation,
and eliminates communication between passes. However,
one-pass translation complicates the processing of
forward labels and requires code generation to allow for
fixups.
The parse of the source program is strictly top-down. This
makes 1t possible for the translator structure to
follow the language syntax directly. Further, a top-
down parse makes the generation of diagnostics simple and
complete.
Translation occurs in memory. All translation context
is retalned in translator variables and the symbol table.
In-memory operation removes dependence on external
peripherals, increasing reliability, simplicity, and
performance at the cost of a modes: amount of additional
memory.
Symbols of the target program are addressed with a
hashing technique that makes symbol access time independent
cf symbol table size, increasing performance. Once
again, this increased speed is paid for with a modest
amount of additional! memory.
Although the compiler is a fairly large program, the only
genuine logical complexity results when a translation
algorithm cannot be completed on-the-fly. This occurs
with variable allocation, forward branches, forward calls,
and statement type determinazion. Several tactics are
used as a substitute for the desired ability to look
ahead: the scanner can back up, the code generators can
fixup previously generated code, the symbol table can
link entries in chains, and when a.l else fails, external
flags are maintained to indicate translation state.
100 | Sec 6.1
SYSTEM INTERFACE
The compiler is entered vic: the main program MPL. All
table size parameters are defined there (as literallys)
as are all external variab.es. Compiler memory use is
shown in Figure 6.la. The program base (pb) and program
length (pl) are extracted ‘rom the PLIB and the top of the
compiler computed in stbasc0 as a base address. After
room is left for the stack (stacksiz bytes) and sort
buffer (4 * width4 bytes) the bottom of the symbol table
is established as stbase (¿lso a base address). The
symbol table continues upwerd for textmin0 bytes to the
top of memory. (Note that the addition of memory
beyond 64K 1s not automatically used by the symbol table
because of hardware restrictions.) Memory checksums are
computed in checks for the program space occupied by
the compiler: from pb for pl bytes.
External variable initialiration is performed in MPL.
Variables which are used as static storage are set just
once. Before each externa: procedure is translated the
non-static external variables are reset, the stack
preset to "55" so that stack use may be measured, and the
hash table cleared. Fxterral procedures are translated
until a physical EOF is encountered.
Return to the operating system 1s via EXIT which sets
the second word of the currant mark to -1 which causes
a system return. (Were external labels permitted, a
normal return from the mair program would have been used.)
Memory integrity 1s checkec by MEMCHECK at the end of
each external procedure, ard if enabled (V-toggle), before each
source record 1s read. The checksums previously computed
are validated, if enabled iM-toggle) and the unused
portion of the stack deternined and noted in stackuse.
Toggles state is maintainec in the byte vector toggle
which 1s initialized once per external procedure by
SETTOGS (if enabled by P-tcggle).
Fig 6. la
64K-
stbase-
SB, stbase0-
PB-
0-—
name 1 name 2 literally
text
ref l ref 2 ref 3 ref 4
Symbol Table
|
entry
entry
Sort Buffer
Stack
Program
Operating System
Figure 6.1la:
ed LA LA LILA
twidrh4
#width4
#widthd
#stacksize
PL
Memory Configuration
101
» textmin0
textmin
itemmax
102 Sec 6.2
INPUT/OUTPUT
1/0 consists of physical IO, formatted output and
radix conversion.
Source input is done by SR:AD. The source buffer is
sobuf of size sosize; each read increments the source
record counter line. The actual physical input is done
by the system routine SYSG LT which manages the SYSIN
system file. If objec 11 source is enabled (#-toggle),
SREAD loops until a true s>urce record is obtained.
Should a physical EOF occu- a normal return to the
system is made if eofflag ‘controlled by MPL) is set,
otherwise an error return .s made. An EOF is legal only
between external procedures. Note that object in source
1s processed before an EOF +hus object in source may
occur after the final prog am.
Listing output is done by :RINWRIT. The listing buffer
for the annotated source 1 ; -lstbuf of size listsize:
the first byte is used for carriage control. The actual
physical output is done by the system routine SYSPUT
which manages the SYSQUT s stem file. PRINWRIT js used for all
listing functions (annotat::d source, generated code, etc.)
and handles page titling, age numbering, forms control,
and line width formatting. The current page number 1s
maintained in page, the cu rent line in pagelin. The
type of listing line 1s pa: sed to PRINWRIT so that the
proper title may be used: 'A' selects the symbol table,
'Y' the summary, and anyth ng else the source. The
title skeleton is reference d through titleptr and
contains the date, time, a: d version which are built
by MPL.
Object output is done by OVRITE. The object buffer is
objbuf of size objsize +1; an extra byte is added at the
front (high-order position for carriage control when
the object is listed with the H-toggle. The actual
physical output is done by the system routine PUT
which uses a file defined ty the compiler (unlike the
above I/O). The working bi ffers are objbufl and
objbuf2 both of size objsize+l, the FCB is objfcb. This
file is opened (and closed) only 1f used; objecton is
set when the file is openec. 1/0 errors are reported
to the compiler which generates a compiler flag. The
number of object records, even if not written, is
maintained in objitem for tse by SUMMARY.
The annotated source listiry is constructed by LIST, an
error flag listing by FLAG, the symbol table listing by
LISTST, the summary listinc by SUMMARY, the object
listing by OWRITE, and the :ode listing is begun by
LST-ADR, continued by the code generation routines and
finished by OUT-WRT.
Sec 6.2 103
The listing of the annotated source is normally delayed
a lire to permit the level annotation to reflect translation
status after line translation. The argument to LIST
is a flag indicating if the listing of the next line is
to be delayed. A call to LIST with the flag set 1s
made before an error flag, the code, or the object is
listed. The current state of the buffering is maintained
in listwait; set means delay the next line.
The sort algoithm used by LISTST to sort the symbol
table is the classic Floyd tree sort (see Reference 7);
it is an in-place sort whose sort time 1s proportional
to N*log(N), when N is the number of items.
Formatted output is aided by FORMAT which fills an output
buffer according to a format specification and a list
of arguments. Text is transferred directly from the
format specification to the output buffer with the exception
of certain reserved formatting characters. A period ('.')
causes decimal conversion of the next argument into the
next 5 positions of the output buffer right justified
with leading blanks. A dollar sign ('$') causes
hexadecimal conversion of the next argument into the
next 4 positions of the output buffer right justified
with leading zeroes. A pound sign ('#') inserts the next
argument as text in the next 2 buffer positions. A
slash ('/') inserts a carriage return/line feed in the
next 2 buffer positions; this character cannot be used
with the listing file as it is incompatible with the line
control in PRINWRIT. Formatted outout to the listing
file is performed by PRINT, to the ronsole by TYPE.
Radix conversion from internal binary to external ASCII
is performed by a set of routines. The basic binary
+o decimal routine is B2010 which converts 32 bits to
right justified form with leading zeroes; B2D1O0L leaves
the result left justified; B2DNR leaves the result right
justified with leading blanks in a specified field
width. The basic binary to hexadecimal routine 1s
BIN2HEX which converts 4 bits to a hexadecimal character;
SIN2HEX2 converts 8 bits to 2 characters with leading
zeroes: BINZ2HEX4 converts 16 bits to 4 characters with
leading zeroes.
104 | Sec 6.3
UTILITIES
The utility routines move cata, manipulate the location
counters, search strings, nd generate diagnostics.
A field is set from anothe: field with MOVE, a field
is set to a character with SET, and a field is set to
a symbol name with MOVEST. In all cases the length of
the target field is limitec: to the range 0 to 255 inclusive
to protect against destroy: ng program space. MOVEST uses
the current symbol table e: try.
The compiler maintains 3 lcecation counters: pc (program
counter), sc (stack counte:), and xc (static counter).
They are incremented with NC-PC, INC-SC, and INC-XC
respectively; sc is decremented with DEC-SC (pc and
xc cannot be decremented). The increment (or decrement)
1s passed to these routine: in double size and all
computation is performed 1: double precision. This
ensures that any overflow n the construction of the
increment cr in the incrementing itself is detected.
The maximum value achieved by sc(1) (the outmost block
with statements) 1s monitored in sclmax.
INDEX provides a primitive substring capability. The
prototype string is in com iler infix format (see
Section 5.2.3) with items : eparated by periods ('.');
the target string is in syribol table string format (see
Figure 6.4b). INDEX returi:s the ordinal item number of
the target string in the p:ototype string, or 0 if not
present.
Flags (detected errors) ar: generated by FLAG, fouls
(consistency checks) by FOIL. The listing buffer for
flags is flagbuf of size 1 stsize; the first byte is
used for carriage control. A flag count is maintained
in aborts, blunders, error: , warnings, and warningt. All
warnings are counted in wa:ningt, only unsuppressed
warnings in warnings. A mximum of errmax blunders and
erros is allowed. The lin number of the most recent
flag is maintained in last'lag. Flags are listed only
if the listing is sure not to generate another flag.
The offending flags are se ected by the internal procedure
LISTOK which currently always returns true. The processing
of aborts avoids the possil ility of secondary aborts
by temporarily suppressing aborts (X-toggle).
Sec 5.4 105
SYMBOL TABLE
The symbol table occupies all of unused memory from
stbase to 64K, a distance of textmin0 bytes (see Figure
en o Er
6.la). Each entry consists of a 4 * width4 (currently
16) byte fixed length part and variable-length supporting
text. The fixed length entries are built from the bottom
of the table up and at any moment occupy itemmax bytes.
The variable length text is built from the top of the
table down and at any moment has reached textmin bytes
from the bottom of the table. When the fixed entries
run into the variable text (itemmax exceeds textmin)
the symbol table is full. All symbol table text is
retained for eventual inclusion in the symbol table
listing; there is no way to discard an entry.
symbol table entries are referenced by the use of base
addressing: stbase 1s the base address of the first
entry, itembase the base address of the current entry
of interest. The base addresses of successive entries
differ by widthd.
The fixed-length part format of a symbol table entry is
shown in Figure 6.4a. The name is stored in the descriptor
format shown in Figure 6.4b. The use of most of the
entry fields 1s described in conjunction with the symbol
table listing in Section 3.3.7, the remainder are
described here. The entry link field is used to link
variables together, hold the do leval number for procedures
and labels, and is a text pointer for literallys (byte
address relative to stbase). The def field holds the
definition line number, the ref link field a link (word
index relative to stbase) to the next reference; a
0 liak indicates the end of the refzrence chain. The
spare field indicates an active bas: in a base chain,
and an active parameter in a name list.
Of tie 16 bytes in the fixed length entry, 5 are poténtially
unus2d. The high order byte of the length field is
always 0 since names are restricted to 255 bytes in
length. The ref link field is unused if references are
suppressed (R-toggle) in which case the def field may
be regarded as extraneous.
The variable-length text part of the symbol table consists
of name text, literally text, and references. Text may
start on any byte, references are adjusted, if necessary,
to szart on an even byte so that hardware word indexing
works; this adjustment leaves an occasional unused byte.
Name text is pointed to by the text pointer field,
Literally text by the entry link field (for literallys
only!, and references by the ref link field.
106 Sec 6.4
To speed symbol entry locat.on, symbol entries are
addressed through an auxillary hash table, hashtab, of
size hashsize. The hash table is of fixed length; each
hash table entry is a pointer to symbol table entry
(as a base address); an unused hash table entry is 0. The
hashing algorithm computes an initial hash table address
and increment based on the symbol name. The block
number (which is required to uniquely define a symbol)
cannot be used as input to the hash function as it may
change in the case of a forward label. The hash table
length is chosen as prime so that secondary probes are
guaranteed to hit each cell of the hash table. Hash
table activity is monitored by noting the number of
accesses, accesses and the number of hash table probes
that result in a collison, :olisons; the total number of
probes is accesses + collsons.
Routines are provided to locate entries, add entries,
put and get attributes, and compose attributes. The
hash table entry of interest is always contained in
hashloc, the symbol table entry of interest in itembase.
Except for routines which l»>cate an entry, the convention
is followed that a routine vhich alters hashloc or
itembase restores it.
SEARCH locates an entry of the specified name at the
specified block level. SEARCH contains the hashing
algorithm. STATEST searches for the specified name at
all active lex levels. Both routines leave hashloc
set to the located entry, or if none is present, to the
place it will occupy; itembase is set only if the entry
A VE. ——— 00
is successfully located.
Entries are added with DEFST and REFST. Using NEWENTRY,
itembase is set to the next available value, hashtab (hashloc)
to itembase; the text pointer, length, block and lex
fields are set (the current block is used for block and
lex); the number of symbol table entries, symbols,
is incremented. Using INSERTST the name text 1s moved
to the upper part of the symbol table. Should the symbol
already exist DEFST and REFST simply return with
itembase set to the desired entry.
DEFST is called when the desired symbol is the object of
a definition: the symbol search occurs only at the
current level. A new symbc! sets the fields noted above
plus def and state.
Sec 6.4 107
REFST is called when the desired symbol is the object
of a reference: the symbol search occurs at all lex
levels. A new symbol sets just the fields noted above.
If the symbol is environment (checked by NAMESAME) and
an old copy is found at an outer level, it is redefined
at the current level. If the symbol is new and is a
built-in, the definition is made in block 0 and the value,
size, units, scope, state, and class fields set.
Attributes are added to a symbol with PUTST. Field
codes and field values are included in Figure 6.4a.
The desired entry is specified by itembase. Attributes
are extracted from an entry with CETST which is symmetric
with respect to PUTST except for the ref field (code 9):
PUTST adds a reference to the end of the current chain,
GETST returns the ref field, rather than a ref element;
the ref chain must be burst manually. Each addition to
a reference chain increments the total reference count,
refs.
Several routines compose the attributes. BYTESIZE checks
for units of byte and size of 1. LABDOBEG checks for
class of label, do, or begin. GASZ, GISZ, and GPSZ
translate the size and units field in different we Ways.
PROC-ID translates the class, block, scope, and state
attributes into the different procedure types. VAR-ID
redefines the class attribute. GET-LEX computes the
current differential lex level. =
ADD-REF is a short form of the PUTST call for adding a
reference to the reference chain.
Symbol table entries are linked together with ENCHAIN and
the chains are burst with DECHAIN. Chains are referenced
by a 2 word descriptor that points to the head and
tail elements of the chain as shown in Figure 6.4c.
The chains work as FIFO lists: ENCHAIN adds to the tail
and DECHAIN removes from the head. Internal chain links
are maintained in the entry link field as entry base addresses:
0 indicates the end cf a chain. Note that an entry may
be cn only one chain at a time. The chains used are
shown in Figure 6.4d.
108 Fig 6.4a
(0) 2 | (1) 2 | (2) 1j (3) 1} (4) 2 1 (5) 2 | (6) 2 | (7) 2 (8) 2
text ptr length class{block]entry link | value flags def ref link
| > | | +
~~ 00 | , me
? 7 | -
$ _ = = — -
a | — | N
| N°} A‘ Ma EY | | link? ref 2 |
| ци | 7
(10) (11) (12) (13) (14) (15) (16) (17) | (
0, 1 0, 0, 2 | 0,1 0,2 0,28 0,2) 0,2 LL
lex Scop size junits {finit [org o “ref *
spare state |
Code Interpretation
Code Field Class Scope State Size Units | Init Org
0 text ptr -- -- undefined _- —— —— -
1 length automatic - defined 1 bit no scala
2 class cbase internel 2 byte yes array
3 block vbase externel 4 ptr -— ——
4 entry link | label
5 value parameter
6 flags procedure
7 def main proc
8 ref link int proc
9 ref micro proc
10 spare builtin
11 lex literally
12 scope static
13 state do label
14 size pegin label Legend:
15 units —
16 init ‚
17 org (field code) bytes.bits
Figure
h.4a:
field name
Symbol Table Entry
Fig €.4b
Pointer:
descriptor > |
pointer
Descriptor:
text :
pointer
2 \
text
length |
}
/
Text : 4
1 1 1 1
A B с D
{—-text length ————
Legend :
Name :
size(bytes)
function
Note:
Descriptor pointer is a SB relative kyte address,
text pointer is a stbase relative byte address
Figure 6.4b: String Format
109
110
Chain Descriptor:
head
pointer ~~
tail 7
pointer |
_ _ /
a $ First entry:
/ entry 2
| link
,
£ Middle entries:
2
+
— и
v L Last entry:
2
О
Legend:
Name :
Note:
Pointers and entry links a e base addresses
size (byt s)
function N
Figure 6.4c:
Chain Format
Fig 6.4c
Symbol
Table
Entries
Chain Name Use Reset By: Enchained By: | Examined By: Dechained By:
labchain Labels in label list LABELS LABELS -— BLOC, GROUP
namchain Names in declaration DCLELEMT DCLELEMT —— DCLELEMT
name list
parchain Parameters in PROCHEAD PROCHEAD DCLELEMT PROCBODY
procedure head
varchain Variables in PROCBODY DCLELEMT —— PROCBODY
declaration set
Figure 6.4d:
Use of Chains
py'9 DIA
TIT
112 Sec 6.5
SCANNER
The scanner converts the source stream into tokens, the
smallest unit of syntactic significance. The language
at hand in context-free: 1 token may be identified
independent of the context in which it appears; this
is accomplished at the cos- of reserving some identifiers
for use exclusively as keywords.
The main routine of the scinner is TOKEN which returns
the next token as a token ode. The possible token
codes are shown in Figure +.5a.
If the token is a constant (code 1) the associated constant
value is contained in value which is of double size.
If the token is a symboi (ode 2) the associated name
text is converted directly to the descriptor string
format of Figure 6.4b using pointer ptr and descriptor
desc. If the token is a s- ring (code 3) the associated
string text is converted ta the same descriptor-referenced
string as for symbol text .bove; the conversion for a
string, however, removes delimiting quotes and collapses
internal doubled single quctes into the single quote
they represent. Also the “irst 4 characters of a string
are moved to value; if there are less than 4, characters
are left justified wi“h tr:¢iling zeroes.
To gain speed, TOKEN does « 28-way branch on the first
character of a token to access the proper token processor.
The 28 token cases are shown in Figure 6.5b. The special
character and operator tokens present no special problems;
the semicolon token (';') increments the statement
counter stmts. Constants ¿re processed by the auxillary
external routine CONSTUNT which checks for 32 bit
precision overflow. Strincs are processed by the
auxillary external routine STRING which does the quote
elimination and checks for 255 character overflow.
Identifier text is built by the internal routine BUILD
which is optimized for speed and does case shift and
checks for 255 character overflow. Identifiers are
potentially (in the order cf precedence) keywords,
literallys, or symbols. Keyword determination is made
by the internal routines KE Vx.
Literally determination is done by checking the symbol
table for a symbol of this name and of class literally.
Should a literally be present, the literally level is
incremented and TOKEN recurs. Token recursion depth is
maintained in tokenlev and limited to maxlit; tokenlev
differs from litlev ir some instances Of (illegal)
literally loops. When a literally is active source text is taken
Sec 6.5 113
frem the literally text previously saved in the symbol
table when the literally was defired. To mechanize
literallys the literally level is maintained in litlev
where level 0 is the source file. For each level
litbase (litlev) contains the symbol table entry value of
itembase of the active literally, litcursr(litlev) the
cheracter count of unused text, rptflag(litlev) the
repeat status of the current character, and charsave(litlev)
the current character itself.
The scanner provides for double token reuse: the current
and previous tokens are retained for possible reuse.
The reuse level is contained in reuselev. The first
call to REUSE causes the next call to TOKEN to reuse
the current token. The second ca.l to REUSE, without
an intervening call to TOKEN, causes the next call to
TOKEN to reuse the previous token: a subsequent call to
TOKEN without an intervening call to REUSE causes TOKEN
to reuse the original token. Both REUSE and TOKEN
protect against an illegal reuse "evel. The first
token reuse is mechanized by swapping ptr with ptrold
and tcode with tcodeold. The secend reuse just increments
reuselev.
Text from the source stream is distinguished as being
composed of logical and physical characters. A logical
character allows for leading blanks and comments and 1S
processed by LOGCHAR; the first character of any token
is a logical character. LOGCHAR processes the toggles
operators. A physical character is the next character
of the source stream and is processed by PHYSCHAR;
th2 subsequent characters of most tokens are physical
characters.
Physical character processing provides for single
character reuse. Reuse is invoked by a call to RPTCHAR
which guards against double reuse. A repeat flag vector,
rptflag, is maintained for each literally level. Physical
character processing also processes early source record
truncation (?-toggle) and gets the next character from
the source record or literally as appropriate. The
current character of the source buffer, sobuf is indexed
by cursor. o
Several routines compose the basic scanner routines for
convenience. LOOKFOR looks for the specified token and,
if absent, invokes reuse. SEMI looks for a semicolon
token and, if absent, generates a flag. SEMISCAN looks
for a semicolon token and, if absent, generates a flag
and scans tokens until a semicolon in encountered.
SYMBOL reclassifies the next token as a non-identifier,
new symbol, old symbol, or keyword. KONSTANT looks for
a numeric constant (CONSTUNT) or string constant (STRING).
114 Fig 6.5a
Classes --
0 other
l constant
2 symbol
3 string
21- :7 special characters
101-155 keywords
201-2:9 operators
Special Characters -- Keywords --
21, 101 BASED
22 y; 102 BEGIN
23 : 103 BIT
24 $ 104 BY
25 e 105 BYTE
26 (
27 ) 106 CALL
107 CASE
108 CONSTANT
Operators -- 109 DECLARE, DCL
110 DO
202 - 111 DOUBLE
203 + 112 ELSE
204 * 113 END
205 / 114 EOF
115 EXTERNAL, EXT
> orn 116 FOREVER
208 DIVD 117 GO
209 SLL
210 SRA 119 INTERRUPT
120 INITIAL, INIT
TE SEC 121 LITERALLY, LIT
213 < 122 MAIN
214 <=. + 123 MICRO
215 = 124 POINTER
125 PROCEDURE, PROC
17 Fi e 126 PRTNUM
218 > ° 127 REPEAT
219 & 128 RETURN
220 |, ! 129 STATIC
’ 130 THEN
2 oR 131 TIMES
224 LLT 133 WHILE
225 LLE 134 WORD
135 GOTO
226 LGE
227 LGT
228 LEQ
229 LNE
Figure 6.5a: Token Codes
Fig 6.50 115
Class Case Leading Character Token Code
Junk O other О
Single character 1 , 21
2 ; 22
3 $ 24
4 @ 25
5 ( | 26
6 ) ; 27
7 - | 202
8 * ; 204
9 = 215
10 & 219
11 , ! 220
Possible double 12 : 23, 222
character 13 + | 201, 223
14 4 i 203, 214, 216, 217
15 / | 205
16 > 1.217, 218
17 < > 213, 214
В o nn
String 18 ' 3
Bit string 19 1
- . aa mee
Decimal number 20 O, 1, 2, 3, 4, 5 1
E, 7, 8, 9
aa 2e ; | |
Known symbol 21 #, H, J, K, N, O, 9, 2
U, V, Y, 4,
Possible keyword 22 А, В, С 2, keyword
23 D, Е 2, keyword
24 В, ©, 1 2, keyword
25 L 2, keyword
26 M, P, R 2, keyword
27 S, T, W, X 2, keyword
Figure 6.5b:
Token Cases
116 Sec 6.6
CODE GENERATION
Code generation is organized by instruction type with a
few supporting routines. The preparation of the code
listing is begun by LST-ADR continued by the various
OUT-xxxx routines and finished by OUT-WRT. The listing
buffer for code is codebuf of length listsize; the first
byte is used for carriage control.
Loader directives are built by OLT and loader records by
OUT-REC. Directives are added in binary form until the
current directive overflows the buffer. A record number
is added, the record checks immed, and finally the record
is converted to hexadecimal form. The record is built-
in buffer objbuf which is of size objsize+l; objrecn holds
the record number. The current buffer position 15 in
objx and the last in lobjx.
Pseudo-instructions are pro:essed by QUT-ADDR (ADDR),
OUT-BYTE (BYTE), OUT-WORD (NORD), and OUT-DBLE (DBLE).
Instructions are processed ny OUT-INST except for LDL
handled by QUT-LIT, which processes all other literals
as well. OUT-LWL handles tne case of a LWL instruction
where the literal is an address.
All these OUT-xxxX routines augment the code listing,
generate loader directives, update the stack and program
counters, and list the code listing. OUT-ADDR and
OUT-LWL require that the address type be specified as
they are used to construct addresses; OUT-BYTE, OUT-WORD,
OUT-DBLE, and OUT-LIT require no address type as there
is no addressing; OUT-INST determines the address type
from the symbol table entry of the current symbol for
those instructions that recuire an address.
Size conversion (from double to word or form word to
double) across a binary operator is handled by A-CVT
for the assignment operators and B-CVT for the expression
operators. Memory referencing is handled by GET-MODE
which determines the hardware mode of the memory reference
and generates accessing instructions (see Subsection 5.6.3).
6.
Sec 6.7 117
PROGRAM STRUCTURE
MPL programs are structured in blocks and groups. Blocks
occur as procedures and begins; groups occur as repeats,
and the various do's.
The current block number is maintained in block which is
used to qualify all symbol names. The outermost block
(which contains only the external entry point) is block 0.
The block number is incremented as each new block is
entered. The current lex level is contained in lex and
measures the nesting depth of the current active block.
The lex level starts at 0 and returns to 0 at program
end. For each active lex level, sc(lex) contains the
stack counter, blocklex (lex) contains the block number
(which differs from block as soon as the first block
is closed), and prociex (lex) contains the itembase
of the name of the current block (begin blocks use the name
of the innermost active procedure block). The lex
level is limited to maxlex.
The current do level is maintained in donumber: the
outermost group is numbered 0. The do number is incremented
as each new group is entered. The current do level
1s contained in dolevand measures the nesting depth
of the currently active group. The do level starts
at 0 and returns to 0 at program end. For each active
group, donest(dolev) contains the do number. The do
level is limited to domax.
The external procedure block has some special properties
and is processed by EXTPROC which generates the loader
title, record, console log entry, and loader begin
program directive. The procedure type (main, interrupt,
or regular) is determined jointly by EXTPROC and PROCHEAD.
Following translation of the procedure body by PRCCBODY —
the final exit and loader directives are issued and all
level counters are checked to ensure they have returned
to C.
Internal begin blocks are handled ky BLOC. They are
signaled by the keyword BEGIN after the label list.
Any labels that were present will appear on labchain
and are converted to begin labels with an associated
do number for labelled end checking by END-STMT.
Procedure head processing, common to all procedures,
1s handled by PROCHEAD which is called from EXTPROC
and BLOCKSEN. The procedure is classified as interrupt
or regular, the lex level pushed by PUSH-LEX, and any
parameters defined and enchained on parchain; parameters
marre
are marked as undefined and are processed further by
DCLELEMT as they are declared.
118 Sec 6.7
When a block is entered the lex level is pushed by PUSH-LEX
which is called from BLOC, FEXTPROC, and PROCHEAD. The
lex and block are incremented, and the sc, proclex, and
blocklex vectors set. The maximum lex level achieved is
maintained in lexdepth. Firally, the do level is pushed
by PUSH-DO.
When a block is terminated the lex level is pulled by
PULL-LEX which is called on:y from END-STMT. The lex
level is decremented and the do level pulled by PULL-DO.
The máin job of PULL-LEX is to update the forward reference
tables.
The forward tables are an a'ray of structures used to
store forward label and procedure references that may
require later alteration. “or each element fwdbase
contains the itembase of th‘: symbol, fwdlex the lex level
of the point of reference, ind fwdpc the program counter
at the point of reference. Entries are added to the
forward tables with SAVE-RE: and removed with PURGEFWD.
The current entry is indexe! by fwdptr which is limited
to fwdmax.
The action by PULL-LEX with regard to the forward tables is:
Status in
Class State Block New Block Action
Procedure Save
Label Defined Other | Save
Current |
Purge
Undefined Other
Save
Current Present Convert
Absent | Extract
A saved entry is retained for later use. A purged entry
is removed and the space occupied reclaimed. A converted
entry changes the reference in forward table to the
symbol in the block being entered; the original entry
remains in the symbol table and plays no further part in
translation (but it is included in the symbol table
listing). An extracted entry changes the block and lex
attributes in the symbol teble to the block being entered.
Sec 6.7 119
These actions are clarified from the language point of
view. A defined label in the current block can no
longer be referenced and so it is purged. A defined
label in an outer block may yet be redefined in an
intermediate block and so it is saved. A defined label
in an inner block will already have been purged. An
undefined label in an outer block is yet to be defined
and so it is saved. An undefined label in an inner block
willl already have been extracted to the current block.
An undefined label in the current block that does not
appear in the new block is extracted to the new block
in hopes that it will appear there. And finally, an
undefined label in the current block that does appear
in the new block is the same symbo- and is converted
to it.
When a forward label or procedure is defined, PURGEFWD
is used to scan the forward tables. A matching procedure
entry generates a fixup address. A matching label
entry generates a fixup GOTO instruction. Non-matching
entries are saved.
Wher: a group is entered the do levelis pushed by PUSH-DO
which 1s called from GROUP and PUSE-LEX. The dolev
and donumber are incremented and tro donumber is saved
in donest (dolev).
Wher. a group is terminated the do level is pulled by
PULL-DO which is called from END-STMT and PULL-LEX.
PULL-DO decrements dolev.
If the group is a do-case the do-case item index, caseitem,
and nesting level, caselev, are maintained by GROUP
for use by LIST in annotatinc the source listing. A
stack of active case indexes is maintained in casebuf
(caseptr) where the latest entry is the innermost active
do-case. There is a size limit on caseptr of casemax.
ia ja
The first case is labeled 0 and the first nest labeled 1.
Labeled end checking is performed in END-STMT and is
performed only if the keyword END is followed by a
symbol. If a block is being closed the lex level is
pulled by PULL-LEX (which invokes PULL-DO).
If a group is being closed the do level is pulled by
PULL-DO. A symbol, if present, must already be a defined
label or entry point, and must match the current do
number.
120 Sec 6.8
DECLARATIONS
The bulk of the declaratiors are contained in the
declaration statements and are processed by DCL-STMT
and PROCBODY. Entries are processed by EXTPROC or
PROCHEAD which enchain the parameters on parchain.
Label lists are processed hy LABELS.
PROCBODY loops on DCL-STMT until a non-declaration
statement is found. DCL-STMT loops on DCLELEMT until
the declaration elements (separated by commas) are
exhausted.
DCLELEMT uses SYMBOL to adc each symbol to the symbol
table as it is encountered. Only a parameter may already
be present. Symbol processing is a function of symbol
type. Literallys cause the literally text to be saved
in the symbol table for later extraction by PHYSCHAR.
External procedures, interral procedures, and micro
procedures are processed w:thout complication; the
current external procedure sequence number is maintained
in numberp.
Variables are enchained on namchain. Should a name list
item be a parameter, it will already appear on the
parameter chain, and is marked as active with the spare
field. The dimension of a variable or parameter is
saved in the value field; scalars have dimension 0.
After namchain is built, the size and area attributes
(processed by SIZEATTR , AREAATTR) are saved in the first
name which is marked as such with the spare field; this
first name may be on either the namchain or parchain and
the attributes it contains are referred to below as
common.
When all attributes are in 1and the name list is
reprocessed. If the common variable class is constant,
namchain is burst and discarded. The common attributes
are moved to the subsequent elements, the entry link
field is used to hold the dimension, and the value
field set. The first value will have been left in
pccons by AREATTR (which is aware of any needed word
alignment) .
If the common variable class is not constant, variables
are moved from namchain to varchain copying common
attributes. A parameter is reclassified as automatic;
a based variable transfers -he common base to the value
field. The parameter chain is scanned (and then restored),
moving common attriubtes to those parameters marked as
active (that is, appearing :n the current name list)
and an active parameter is marked as inactive.
| 121
Sec 5.8
When all declaration statements are in hand, PROCBODY
performs value allocation (which must be delayed
in case parameters are defined after variables). The
parameter chain is burst and stack counter values
assigned to the parameters. The variable chain 1s next
burst and the dimension moved from the value field to
the entry link field, and the first-in-name-list flag
(spare field) reset. Automatic variables use sc (lex)
for the value, word aligning non-byte initialized variables
if not the first variable of a name list. Static
internal variables use xc for the value word aligning
all non-byte variables. Static external variables use
numberd, the external data sequence number, for the value.
The extent of each variable is determined by DELTA. The
function used is defined in Figure 5.2.la.
The required size attribute :s processed by SIZEATTR. A
simple size is handled by SIMPLESZ, pointer and bit size
directly.
The optional area attribute 15 processed by AREAATTR; if
none is present, automatic class and internal scope 1S
used. The external, static, and constant based area
attributes are processed without complication. The
var-able based area attributes ensures that the base is
cf a legitimate class and 15 a backwards reference. A
constant area attribute constructs a branch around the
constant text in program space, if one is not already
present (consflag set); two pc values are noted: consloc
contains the branch location for later fixup by AREAATTR
or PROCBODY, and pccons contains the starting value for
address allocations for use by DCLELEMT. An initial
area attribute closes an open cons-ant branch and invokes
SAVE-REF to save the SSP instruction locations in the
forward tables for later fixup by :ROCBODY.
Initial or constant lists ars handled by INITLIST,
ini-ial or constant strings by INITSTR. The only difference
between initial and constant lists is initial lists
generate FILL instructions and round text to full words.
Following value allocation, PROCBOJY scans the forward
tables and fixes up the SSP instructions generated for
initial values.
122 Sec 6.9
STATEMENTS
Statement classification and processing follows the
organization of the syntax fairly closely.
The highest level statement classification is between
executable unit and an internal procedure. BLOCKSEN
makes this distinction by looking for an entry point.
No label or no procedure head indicates an executable unit.
In the case of an executable unit, the nature of a possible
label is saved in labflag for later use by LABELS. In the
case of an internal procedure the attributes of the
entry point are validated against any previously declared
attributes.
An executable unit (handlec by EXUNIT) is classified as an
unconditional executable ur it (UNEXUNIT) or an if statement
(IF-STMT). An unconditional executable unit is further
broken into blocks (BLOC), Jjroups (GROUP), and statements
(STMT) ; statements are classified as null (NUL-STMT),
call (CAL-STMT), or assignnent (AS-STMT).
An if statment (IF-STMT) its parsed slightly differently
than that shown in the forral syntax. The syntax shown
in Appendix L solves the dengling else problem by introducing
a balanced executable unit. With a top-down parse, this
mechanism is not required end the dangling else 1s processed
directly using the syntax:
if-statement ::=
if clause executable~-unit [ELSE executable unit]
if clause т: =
[label-list] if-then
if-then ::=
IF exp THEN
The dangling else-clause is associated with the innermost
unmatched then-clause.
A return statement (RET-STYT) ensures that a return value
is present if and only if cne was specified, and converts
the return expression to the specified size.
A go to statement (GOTOSTMI) accommodates the possible
scoping configurations of the go to label, defining a
new symbol if the label is new, or new in the current
block. An entry is added to the forward table if the
label is forward, or kackward and in an outer block.
Sec 6.9 123
A label list (which is optional) 13 processed by LABELS
called from IF-CLAUS and UNEXUNIT. LABELS resets the
label chain (labchain), enchains all labels, and generates
an SSP instruction. The first label, if any, will have
been saved in labflag by BLOCKSEN. An old label
(satisfying a forward go to) 1s checked for validity,
and corresponding entries in the forward table fixed
up and purged. The do number of the label is inserted
by BLOC or GROUP if the executable unit turns out to be a block
or group; the symbol class is altered ar the same time
to begin-label or do-label.
The syntax alternatives are ordered so that label processing
for the unconditional executable units precedes label
processing for the if statement; this insures that the
label chain is not reset before the do number is added.
124
EXPRESSIONS
Expression processing follows the formal syntax of
Appendix L with little complication. The main routine 1s
EXP and the lowest level routine for operand processing
is NUM-PRI. Each operator precedence level has an
associated routine that handles code generation for all
operators of that precedence: S-EXP (or operators),
A ————————
LOG-TERM (and operator), LOG-FACT (comparison operators),
NUM-EXP (add operators), NUM-TERM (multiply operators),
NUM-FACT (unary operators).
An expression is either conditional (handled by C-EXP),
simple (handled by S-EXP), or invokes imbedded assignment
which is handled directly in EXP. In the latter case, the
first operand processed by NUM-PRI is later used as a
detination. The mode of this embedded destination is
saved by NUM-PRI in srefmode for later use by EXP.
Sec 6.10
.11
Sec 6.11 125
OPHRANDS
NUM-PRI is the main routine for processing operands.
A constant operand 1s handled directly. A procedure
reference operand 1s handled by PROC-REF. A storage
reference operand 1s handled by S-REF; srefmode is set
for possible later use by EXP in processing imbedded
assignment. An address function ('@') operand is handled
in conjunction with VAR. A subexpression operand is
handled by recurring on EXP. A PRTNUM function is
handled directly; the procedure that is the argument to
PRTNUM may be forward, backward, or external.
Procedure references are processed by PROC-REF. The
calling routine (CAL-STMT for procedure invocaticn,
NUM-PRI for function invocation) is specified so that
— ——]—;———— TL
the presence of a return value is known. The procedure
may be forward, built-in, etc. Built-in procedures
gererate in-line code and require the correct number and
s1ze of arguments.
Storage references are processed by S-REF which calls
REF which calls VAR. S-REF handles field selection,
REF indirection, and VAR indexing. The resultant
reference type is encoded by each routine.
IN-SYM 1s used by PROC-REF, VAR, NUM-PRI, and GROUP
to check the symbol table for a defined symbol when a
symbol is referenced as an operand. An undeclared
symbol 1s declared as word automatic with array organization
1f followed by a left parenthesis ('(').
126 Sec 6.12
6.12 SAMPLE MODIFICATIONS
The scope of several natural compiler modifications
is outlined in this section.
e Default Toggle Setting Change: The default toggle
settings are contained in SETTOGS. A change is made
by altering the default settings therein.
e Built-in Function Addition: Built-in functions are
recognized in REFST. "he name of the new built-in
is added to the string built-ins and the symbol
attributes to the corresponding position in the
arrays values, sizes, and units. Code generation
occurs in PROC-REr. The opcode generated is added
to biop and the code generation attributes to
biargsz, bitargs, and hiretsz. Any special code
——]_—
generation is dealt wi‘h by program logic.
e Operator Addition: Operators are recognized in TOKEN.
A new keyword operator is added to the appropriate
KEYx internal procedure. A new symbolic operator
is recognized by program logic driven by the cases
table. In either case a new token code is returned
for use by the routine of the expression processor
corresponding to the desired precedence level.
e Speed Enhancement: The basic translation strategies
make any significant speed improvement unlikely.
Further, speed improverients will be masked by
I/O times in most circiimstances. Nevertheless,
fine-tuning the scanne: is the obvious candidate
for speed improvement. The blank (and comment)
scanning circuitry is +he most heavily used loop
in the compiler. It comprises the first loop in
LOGCHAR and the first .F in PHYSCHAR.
e Symbol Table Size Increase: Short of symbol table
entry format alteration or compiler size reduction
(see below), a bigger symbol table requires more
real memory and altered symbol table addressing.
The simplest approach 's to place the additional
real memory in consecu ive modules in bank 1 and
alter the memory size determination in MPL that
comprises the computation of stbase0, stbase, and
textmin0.
Sec 6.12
Memory Size Reduction:
127
A 32K byte compiler 15 feasible
with unaltered translation algorithms if most listing
features are sacrificed and a minimal fixed I/O
system 1s introduced.
(LISTST)
eliminated entirely.
The symbol table listing
and program summary (SUMMARY) would be
The program listing would
be converted to a simple source listing with coded
flags;
PRINT, and PRINWRIT,
OUT-INST. othe
sacrificed as well:
this effectively eliminates FLAG, FORMAT,
and the mnemonic
All other extraneous
LIST,
tables from
features would be
memory and stack checking
(MEMCHECK) , hash addressing of symbol table, cross
reference fields in symbol table entry, etc.
The
resulting compiler would use memory roughly as follows:
Item
32K Compiler
64K Compiler
Code 23K 34K
Operating System 3 ) 16
Stack ) 1 4 6
Symbol Table 2 8
CT
128
APPENDICIES
App A 129
APPENDIX A: BIBLIOGRAPHY
1) Current MPL Language: "MPL Language Reference Manual",
SMPL-1, September 1975.
2) Earlier MPL Language: "Microdata 32/S Programming
Language Reference Marual (MPL)", PUMPL-2, November 1973.
3) Tutorial on MPL Language: "Introduction to Microdata
Programming Language (MPL)", 1975.
4) Disk Operating System: "Genasys/D", July 21, 1975.
5) Implementation Operating System: "Genasys", July 16, 1975.
6) 32/S Processor: "Microdata 32/S Computer Reference Manual",
RM 20003250, January 1975.
7) Sort Algorithm: "Communications of the ACM", Volume 7
Number 12, December 964, page 701.
136 APPENDIX B: FLAGS -- ORDERED BY NUMBER App B
CLASS NUMBER SEVERITY DESCRIPTION
,/*SPARE¥*/ MO KW” ,
,/*MISS #/ M1 # 7A NO ENTRY NAME, JOB ABORTED
,/*RANGE#/ M2 #
,/*MISS #/ M3 #
‚/*RANGE*/ ML #
,/#OTHER#/ M5
,/*MISS */ MÉ
/4ATTR %/ MI #
/*RANGE#/ M
,/*OTHER#/ MO #
,/*RANGE*/ M10 #
‚/*ATTR */ M11 #
‚/*ATTR */ M12 #
,/#MISS */ M13 #
‚/*ATTR */ MID 4
‚/*MISS #/ M15 #
‚/#*MISS */ MIA +
,/*MISS #/ M17 #
‚/*MISS #/ M18 #
,/*RANGE*/ M19
,/*MISS */ M20 #
,/#ATTR */ M21 #
,/*OTHER*/ M22 #
,/*MISS */ M23
,/*RANGE#/ Mol
,/*RANGE*/ M25 #
,/*RANGE*/ M26 #
/*MISS #/ MDT #
‚/#MISS */ M28 #
,/*RANGE*/ M29 #
,/*OTHER*/ M30 #
, /*OTHER#/ M31 #
, /¥RANGE*/ M32 #
STRING O'ER 255 BYTES, TAIL IGNORED”
NO RIGHT PAREN, ASSUMED ,
BIT STRI'G RADIX NOT 1 2 3 4, IGNORED
BAD BIT ! TRING DIGIT, IGNORED’
NO COLON ASSUMED
SYMBOL A! READY DEFINED, SEE SYMBOL TABLE’
SYMBOL O'ER 255 BYTES, TAIL IGNORED
7 IN COMMENT, IGNORED
DELTA LE” OVER 15, O USED” ,
SUESCRIP' ON NON-DIMENSIONED VARIABLE, USED ANYWAY’
INDIRECT: ON ON NON PTR TO VARIABLE, PTR TO WORD ASSUMED
NO SUBSC} IPT EXPRESSION, SKIPPED J
FIELD SE: ECT NEEDS WORD VARIABLE, ASSUMED
NO LEFT i AREN, ASSUMED’ ,
NO EJELD SELECT EXPRESSION, SKIPPED” ;
6°” NO" FOLLOWED BY STORAGE REF, SKIPPED
NO EXPRE! SION, SKIPPED
CHAR STR NG OVER 4 CHARS, TAIL IGNORED
NO SYMBO!: , SKIPPED” ,
PRINUM S MBOL NOT A PROC NAME, SKIPPED” | __;
JUNK IN :TATEMENT, TEXT SKIPPÉD TO NEXT 7;
NO EXPRE! SIÓN OPERAND, SKIPPED
PROGRAM ( VER 65535, REDUCED MOD 2##16
STACK OVR 65535, REDUCED MOD 2%%16” ,
CONSTANT JVER 32 BITS, REDUCED MOD 2%%32
NO > THE! ”,, ASSUMED”
NO “ ELS! ”, ASSUMED ,
50 BLUND? RS AND ERRORS, JOB ABORTED
MEMORY BrD, JOB ABORTED” ,
SYMBOL T/3LE FULL, JOB ABORTED'
256 BLOCKS. JOB ABORTED
"ON NN
==
` “
os
=
.
PERE eee UD Doon ОО 00 00 Е 6000 Жо р) Dome =;
N "
NNN
``
` ` `“ *
==
` `
`
`
= =
“ “
` * N MON A
`
!
`
>
,/*RANGE#/ M33 # 7A 16 LEX LFVELS, JOB ABORTED’ |
,/*RANGE#*/ M34 # “A TOO MANY NESTÉD LITERALLY’’S, JOB ABORTED
, /*SPARE#/ M35 # “W | ,
,/*OTHER*/ M36 4 “A STACK OV! RFLOW, JOB ABORTED‘
/*1/0 #/ MAT #
>/*OTHER*/ M3
,/*OTHER#/ M39
SOURCE PHYSICAL EOF, JOB ABORTED’
HASH TAB = FULL, JOB ABORTED’
HASH TABL = 90% FULL, IGNORED
{
He
` `.
—
=
,7%1/0 */ M40 # ‘A OBJECT IC ERROR, JOB ABORTED’ ;
,/*¥MISS */ МАТ # "В NO ASSIGNMENT OPERATOR (=, +=, :=), IGNORED
,/*ATTR */ M42 # ’B OPERATOR NEEDS WORD DESTINATION, IGNORED’ |
,/*ATTR */ M43 # °B UNDECLARFD VARIABLE, DECLARED AS WORD AUTO ,
,/*RANGE*/ MUL # B TOC MANY FORWARD REFS TO PROCS/LABELS/INITLISTS, SKIPPED
,/*ATTR */ MU5 4 “E KEYWORD [ EFINED AS SYMBOL, DEFINED BUT NO REFS POSSIBLE’
‚/#*MISS */ MUG # W NO |7PBQ( "7, ASSUMED
/¥MISS */ MU7 # “W NO “7;°7 ASSUMED” ;
,/*MISS */ M48 4 "В NO PARAMI TER, SKIPPED”
,/*SPARE*/ MUY # NW
App B
CLASS NUMBER
,/ MISS %*/
/ *MISS
,/ *MISS
/ *MISS
,/ *MISS
, / *MISS
,/*ATTR
, / *ATTR
,/ *ATTR *
, /*OTHER*/
, / *RANGE%/
,/ *ATTR *
,/ *ATTR
, / *ATTR */
7 *ATTR */
7 *ATTR */
, /*ATTR */
,/*ATTR */
,/ FÉATTR * /
> 7 *RANGE#/
,/#ATTR */
, 7 *SPARE*/
UMATTR */
/*ATTR */
7 *OTHER*/
/ *RANGE*/
> /*OTHER*/
> /*OTHER*/
y ;/ TMISS * /
/*SPARE*/
‚/#ATTIR */
*ATTR */
| /X¥OTHER*/
3
3
,
/*OTHER*/
/*OTHER*/
, *OTHER*/
RANGE /
MISS %/
| /4MISS */
| УЖАТТЕ */
/#ATTR */
/¥MISS ¥/
/*MISS *
/#*OTHER*/
/FMISS */
/*MISS
/*MISS
/4MISS *
/4MISS
/*MISS
Wl wl WE wR SA
Aa we ws Ae
M50
M51
Mh 2
M"
M5
M55
M56
M5
M5
M59
M60
M6 1
M62
M6 3
M6 4
M65
M6 6
M6
Мб
MA Q
M70
M71
M72
M7 3
M7
M75
M76
M7
M7 E
M7Q
M80
MB 1
M82
M8 3
MAL
M85
M86
M8
M8
M8 9
M9 0
МО!
M9 2
MO?
M9 }}
MOD
M9 6
M9
M99
SEVERITY
tt sam sp GE CE НН AE lm ME WE EEE
%
MHz Га)
`
* N x
NON +
mms ££mmom EEE ME [11 (2) [11 ES
`
`
NN NN
`
`
`
`` “
NON ON 4 00
+
131
DESCRIPTION
EXTERNAL PROCHEAD, “ “MAIN” ’ USED”,
DECLARATION LIS” ÉLEMENT, SKIPPED
NAME LIST ITEM, SKIPPED
CONSTANT, SKIPPED
STRING, SKIPPED
NO INITIAL OR CONSTANT LIST ITEM, O USED”
PARAMETER NOT FULLY DECLARED, WORD USED’ ,
INTERRUPT PROC DECLARED WITH LEX>1, USED AS DECLARED”,
UNSATISFIED FORWARD LABELS OR PROCS, SEE SYMBOL TABLE”
JUNK IN DCL STMT, TEXT SKIPPED TO NEXT ~~,” OR “7;
TXTERNAL SYMBOL OVER 8 CHARS, TAIL IGNORED”
STRING NEEDS BYTE SIZE, TREATED AS BYTE -GNORED
AL
STRING LENGTH DOES NOT MATCH DIMENSION,
INITIAL LIST TOO “ONG, USED ANYWAY ,
CONSTANT LIST TOO LONG OR SHORT, USED ANYWAY
BASE VARIABLE MUST BE BACKWARD REF, CBASE=0 USED”
BASE NOT SCALAR STORAGE REF, USED ANYWAY
3AD SiZE, WORD USED
3AD BIT SIZE, BIT(4) USED” ,
INITIAL OR CÓNSTANT VALUE TOO BIG, TRUNCATED ON LEFT
PARAMETER MAY NOT HAVE AREA ATTRIBUTE, SEE SYMBOL TABLE”
3ASE MISSING, CBASE=0 USED” ,
PROC SIZE MISMATCE, NEW SIZE USED,
NO ‘=’ IN ITERATLVE DO, ASSUMED
CONSTANT OVER 16 EITS, REDUCED MOD 2**16” ;
DO “S NESTED TOO DEEP, NEST CHECKING iNVALID
TOO MANY DO CASES, IGNORED
NO TO” IN ITERATIVE DO, ASSUMED
„о“
BAD “BASED” NESTING, IGNORED’ ,
VARIABLE MUST BE STORAGE REF, IGNORED
END IDENTIFIER MUST BE DO-LABEL/BEGIN-LABEL/ENTRY IGNORED”
LABEL ON END DOES NOT MATCH CURRENT BLOCK, IGNORED
LABEL ON END NOT DEFINED, IGNORED
CVER 32765 DO BLOCKS, NEST CHECKING INVALID’ |
STACK UNDERFLOW (MAY BE DUE TO ANOTHER FLAG), IGNORED
NO PROC REF AFTER * CALL IGNORED”
NO LABEL REF AFTER "GO TO", IGNORED ,
CURRENT PROC CANNOT RETURN A VALUE, IGNORED
CURRENT PROC MUST RETURN A VALUE, IGNORED”
NO STATEMENT AFTER ” THEN””, IGNÓRED”
NO STATEMENT AFTER “ ELSE””, IGNORED ;
FMBEDDED ASSIGNMENT DOES NOT ALLOW FIELD SELECT, IGNONED
NO PROC ARG, IGNORED
BAD NUMBER OF ARGS TO RUILTIN PROC, ACCEPTED”
BAD ARG SIZE FOR BUILTIN PROC, ACCEPTED’ ,
OVER 252 WORDS OF PROC ARGS, REDUCED MOD 252
67” ILLEJAL WITH BASED VARIABLE OR CONSTANT,
CONSTANT CANNOT BE A DESTINATION, USED ANYWAY
+
IGNORED”
pd
a
APPENDIX C: FLAGS -- ORDERED BY SEVERITY App C
CLASS NUMBER SEVERITY DESCRIPTION
WARNING CS
,/*SPARE*/ MO # “W ~ ,
,/*RANGE*/ — MS 4 ZW SYMBOL DOVER 255 BYTES, TAIL IGNORED
,/*OTHER#/ M9 $ “W 7” iN COMMENT, IGNÓRED |
,/¥ATTR */ M12 # ZW INDIRECTION ON NON PTR TO VARIABLE, PTR TO WORD ASSUMED
, /*RANGE#/ M19 # “W CHAR STRING OVER 4 CHARS, TAIL IGNORED
, /¥SPARE*/ M35 # “Ww ° ,
,/*OTHER*/ M39 4 “W HASH TASLE 90% FULL, IGNORED
‚/#*MISS */ MEG # “W NO * PEJC””, ASSUMED
,/4MISS */ MIT $ “W NO ; 7”, ASSUMED
,/*SPARE*/ MUY # “М
,/*MISS */ M51 4 /W NO DECLARATION LIST ELEMENT, SKIPPED”
,/*MISS */ M52 # “W NO NAME LIST ITEM, SKIPPED
, /*RANGE*/ M6O 4 “W EXTERNA. SYMBOL OVER 8 CHARS, TAIL IGNORED ‚
,/*ATTR #/ M62 # "W STRING .ENGTH DOES NOT MATCH DIMENSION, IGNORED
, /*ATTR #/ M63 # “W INITIAL LIST TOO LONG, USED ANYWAY
»/ XATTR %/ MOU # "W CONSTANT LIST TOO LONG OR SHORT, USED ANYWAY’ ,
, /XRANGE*/ M69 4 “W INITIAL OF CONSTANT VALUE TOO BIG, TRUNCATED ON LEST
, /#SPARE#/ M71 4 W” ,
, /*OTHER*/ M76 # "W D)”’3 N:STED TOO DEEP, NEST CHECKING INVALID’
,/*SPARE*/ M79 # W
,/*OTHER*/ M85 # ‘W OVER 32765 DO BLOCKS, NEST CHECKING INVALID”
; /*RANGE*/ M8B6 4 “W STACK UYDERFLOW (MAY BE DUE TO ANOTHER FLAG), IGNORED
ERRORS
,/¥RANGE*/ M2 # “E STRING ‘VER 255 BYTES, TAIL IGNORED”
,/¥MISS */ M3 4 ZE NO RIGH” PAREÑ, ASSUMED ,
,/*RANGE*/ MU # CE BIT STR NG RADIX NOT 1 2 3 4, IGNORED
,/40THER*/ M5 # °E BAD BIT STRING DIGIT, IGNORED
,/¥MISS */ MA $ “E NA COLO, ASSUMED
,/#ATTR #/ M7 # 7E SYMBOL iLREADY DEFINED, SEE SYMBOL TABLE”
,/*MISS */ M15 # “E NO) LEFT PAREN, ASSUMED ,
, /*RANGE*/ M26 $ “E CONSTAN” OVER 32 BITS, REDUCED MOD 2%*32' ,
‚/*ATIR #/ MUS 4 CE KEYWORD DEFINED AS SYMBQL, DEFINED BUT NO REFS POSSIBLE
,/*MISS */ M50 # “E NO) EXTE NAL PROCHEAD, ”/MÁIN”” USED
,/¥MISS */ M53 # /E NO CONS ANT, SKIPPED’
,/*MISS #/ M5L # “E NO STRI'G, SKIPPED
, /XMISS */ M55 4 CE Ny INIT AL OR CONSTANT LIST ITEM, O USED
, /*ATTR #/ M56 # “E PARAMET 'R NOT FULLY DECLARED, WORD USED
»/*ATTR */ M57 # “E INTEFRU'T PROC DECLARED WITH LEX>1, USED AS DECLARED
7 FATIR %/ M58 4 „Е UNSATISI IED FORWARD LABELS OR PROCS, SEE SYMBOL TABLE”
, /*OTHER*/ M59 4 CE JUNK IN DCL STMT, TEXT SKIPPED TO NEXT 77,” OR ””:
,/*ATTR */ M61 # ‘E STRING ' BEDS BYTE SIZE, TREATED AS BYTE ,
,/*ATTR */ M65 # CE BASE VA: [ABLE MUST BE BACKWARD REF, CBASE=0 USED
, /*ATTR */ M67 4 “E BAD SIZI , WORD USED
, /¥ATTR *, M68 # ‘E BAD FIT SIZE, BIT(4) USED”,
,/*ATTR */ M72 4 “E BASE MI SING, CBASE=0 USED ,
, /*ATTR #/ M73 $ “E PROC SITE MISMATCH, NEW SIZE USED ;
»/ DANGER, MID # TE CONSTAN' OVER 16 BITS, REDUCED MOD 2%*16
; /*OTHER#*/ M82 4 “E END IDEMNTIFIER MUST BE DO-LABEL/BEGIN-LABEL/ENTRY, IGNORET
`
EX) 7]
‚/*0THER*/ M83 #
LABEL OM END DOES NOT MATCH CURRENT BLOCK, IGNORED”
,/*OTHER*/ M8L #
LABEL OF END NOT DEFINED, IGNORED”
`
An
C
CLASS NUMBER SEVERITY
— a = EE = — vi gy Al de PE CE PE EE
,/*RANGE*/
/%ATTR */
/ *MISS */
/*ATTR */
1/*MISS %/
* /
, / FMISS
, / YMISS */
, /ÉMISS */
, /*ATTR */
, /FOTHER*/
, /*MISS */
, / FRANGE*# /
, / *RANGE*/
, /MISS %/
, / ¥MISS */
/*MISS */
/*ATTR */
/*ATTR */
7 *RANGES 7
/*MISS */
,/*ATTR */
,/ *ATTR */
,/*OTHER*/
, /*OTHER*/
, /*MISS */
/#ATTR */
,/*ATTR */
, /*MISS */
, /*MISS x
, /*ATTR */
MISS */
| JRMISS #/
,/*OTHER*/
MISS */
, 7 *MISS
, / *MISS
, / ¥MI SS
,/FMISS */
, / *MISS
/*MISS %*/
‚ /*RANGE*/
‚ /*OTHER*/
,/ *OTHER*/
‚ /*RANGE*/
‚/*RANGE*/
,/*RANGE#/
, /*OTHER*/
/#1/0 */
,/*OTHER*/
/#*1/0 */
MU 8
M6 6
M70
M7
M7
M7
M80
M8 1
M8
M8
M8 9
MAYO
Ma Y
M9 2
MO?
MOL
M95
Mah
MGT
MO 8
M99
M1
M29
M30
M31
M32
M33
M3L
M36
M7
M38
M4 0
NON OY ND»
* N N NVA
“E CURRENT PROC
E CURRENT PROC
BLU
# “E
# B
# °В
HP
# E
HB
# °В
# B
HE
+ H
E “B
EE
HE
# P
# BR
# CR
# B
# F
# CR
# PF
# “E
# BR
# CR
# PF
# “EP
EE
# CP
¿A
HE
fr
HE
HE
4 E
KE
# F
HE
# св
# 7H
+ CB
# +
А
т
: BAD
NO PROC ARG,
133
DESCRIPTION
NDERS
DELTA LEX OVER 15, O USED” ;
SUBSCRIPT ON NON-DIMENSIONED VARIABLE, USED ANYWAY
NO SUBSCRIPT EXPRESSION, SKIPPED J
FIELD SELECT NEEDS WORD VARIABLE, ASSUMED
NO FIELD SELECT EXPRESSION, SKIPPED
“7677 NOT FOLLOWED BY
NO EXPRESSION, SKIPPED
NO SYMBOL, SKiPPED ,
PRTNUM SYMBOL NO” A PROC NAME, SKIPPED” =
JUNK IN STATEMENT, TEXT SKIPPÉD TO NEXT “7;
NO EXPRESSION OPERAND, SKIPPED’ В
PROGRAM OVER 65535, REDUCED MOD 2%%16
STACK OVER A5535 REDUCED MOD 2*#16
NC ~ THEN’, ASSUMED’
NO ““ELSE””, ASSUMED
NO ASSIGNMENT OPERATOR {=, +=, :=), IGNORED’
OPERATOR VEEDS WORD DESTINATION, IGNORED’ |
UNDECLARED VARIABLE, DECLARED AS WORD AUTO
TOO MANY “ORWARD REFS TO PROCS/LABELS/INITLISTS, SKIPPED
NO PARAMETER, SKIPPED
STORAGE REF, SKIPPED"
PASE NOT SCALAR STORAGE REF, USED ANYWAY ;
PARAMETER MAY NOT HAVE AREA ATTRIBUTE, SEE SYMBOL TA3LE
NO “=77 IN ITERATIVE DO, ASSUMED’
TOO MANY DO CASES, IGNORED |
NO TO” IN ITERÂTIVE DO, ASSUMED
“BASED” ” NESTING, IGNORED” ,
VARIABLE MUST BE STGRAGE BEF, IGNORED
NO PROC REF AFTER ~~ CALL”, IGNORED
NO LABEL REF AFTER “GO TO ”, IGNORED ,
CANNOT RETURN A VALUE, IGNORED
MUST RETURN A VALUE, IGNORED”
NO STATEMENT AFTER ”” THEN”, IGNORED
NO STATEMENT AFTER ‘ELSE’, IGNORED ,
EMBEDDED ASSIGNMINT DOES NOT ALLOW FIELD SELECT, IGNDRED
ТСО
BAD NUMBER OF ARGS TO BUILTIN PROC, ACCEPTED’
EAD ARG SiZE FOR BUILTIN PROC, ACCEPTED ,
OVER 252 WORDS CFF PROC ARGS, REDUCED MOD 252
87” ÍLLEGAL WITH BASED VARIABLE OR CONSTANT,
1 IGNORED”
CONSTANT CANNOT 3E A DESTINATION, USED ANYWAY
NO ENTRY NAME, JOB ABORTED’ ,
50 BLUNDERS AND “RRORS, JOB ABORTED
MEMORY BAD, JOB ABORTED ,
SYMBOL TABLE FULL, JOB ABORTED
256 BLOCKS, JOB 1BORTED
16 LEX LEVELS, JOB ABORTED’ ,
TOO MANY NESTED .ITERALLY 5, JOB ABORTED
STACK OVERFLOW, JOB ABORTED ,
SOURCE PHYSICAL “OF, JOB ABORTED
HASH TABLE FULL, JOB ABORTED
OBJECT I0 ERROR, JOB ABORTED’
134 App D
APPENDIX D: FLAGS =-- DETAILED DESCRIPTION
(Warning) --
Spare
(Abort): No Entry Name, “ob Aborted --
No entry name was found for the external procedure. The
cursor indicates where th:: entry name was expected. The
Job is aborted. If the a»ort is suppressed the compller
will not function correct y.
(Error): String Over 255 Bytes, Tail Ignored --
The body of a string, not including the delimiting quotes
and after collapsing cons:«cutive single quotes into the
single quotes they repres:. nt, exceeds 255 bytes. The
cursor points the last va id byte. Bytes beyond the 255th
are ignored and compilatinn continues. This flag is usually
caused by a missing trail ng quote.
(Error): No Right Paren, Assumed --
A right parenthesis (')') is required at the point indicated
by the cursor but was not found. Its presence is assumed
and compilation continues
(Error): Bit String Radi: Not 1 2 3 or 4, Ignored --
The radix, indicated by tte cursor, specified for a bit
string constant is not 1 binary), 2 (quaternary), 3
(octal), or 4 (hexidecima.). The current radix remains in
use and compilation contir ues.
(Error): Bad Bit String Iigit, Ignored --
The current digit, indicated by the cursor, in a bit string
constant is not in the rarge 0 to <current radix -1>. The
offending digit is ignorec and compilation continues.
(Error): No Colon, Assume 1 --
A colon (':') is required at the point indicated by the
cursor but was not found. Its presence is assumed and
compilation continues.
7
10
11
12
App D 135
(Error): Symbol Already Defined, Sze Symbol Table --
The symbol indicated by the cursor was previously defined
in the same scope. The attributes given to the symbol
are a mixture of the attributes of the multiple definitions
as shown in the symbol table listing. Compilation continues
and secondary flags can be expected.
(Warning): Symbol Over 255 Bytes, Tail Ignored --
The name of a symbol exceeds 255 bytes. The cursor indicates
the last valid byte. Bytes beyond the 255th are ignored
and compilation continues.
(Warning): ';' in Comment, Ignored --
A semicolon (';') is present in a comment as shown by
the cursor. It is ignored and compilation continues.
Usually this warning is caused by a missing close comment
operator ('*/'). This warning does not apply to a question
mark comment (see Appendix F).
(Blunder): Delta Lex Over 15, 0 Used --
A lex level difference of more than 15 is necessary at the
point indicated by the cursor to generate code. A delta
lex of 0 is used and compilation continues. (The current
compiler will generate Abort 33 before Blunder 10).
(Blunder): Subscript on Nondimensioned Variable, Used Anyway --
A subscript, indicated by the cursor, modifies a variable
that was not dimensioned. Code 1s generated as if the
variable was dimensioned and compilation continues.
(Warning): Indirection on Non Ptr to variable, Ptr to
Word Assumed --
The indirection operator ('@'), indicated by the cursor,
has been applied to a variable that was not declared as
a pointer. A size of POINTER TO WORD is assumed and
compilation continues.
(Blunder): No Subscript Expression, Skipped --
A subscript expression is required at the point indicated
by the cursor. Subscript code generation is skipped
and compilation continues.
14
15
16
17
18
19
20
21
136
App D
(Blunder): Field Select Needs Word Variable, Assumed --
The field select operator '$'), indicated by the cursor,
has been applied to a vari:ble not declared as a word. Code
is generated as if word wa: declared and compilation
continues.
(Error): No Left Paren, A::sumed --
A left parenthesis ('(') is required as the point indicated
by the cursor. Its presen:e is assumed and compilation
continues.
(Blunder): No Field Selec: Expression, Skipped --
A field select expression .s required at the point indicated
by the cursor but is missiig. Code generation for the
field select expression is skipped and compilation continues.
(Blunder): '@' Not Follow:d By Storage Ref, Skipped --
The address operator ('@') indicated by the cursor is
not followed by a storage reference. Code generation
for the address operator i; skipped and compilation continues.
(Blunder): No Expression, Skipped --
An expression is required it the point indicated by the
cursor but is missing. Cole generation for the expression
is skipped and compilation continues. This flag 1s a
catch-all when the exact niture of the missing expression
is not diagnosed.
(Warning) : Char String Оузг 4 Chars, Tail Ignored --
A character string used as a constant contains more than
4 characters. The cursor »oints to the last character of
the offending string. Characters beyond the 4th are ignored
and compilation continues.
(Blunder): No Symbol, Skipped --
A symbol is required at th: point indicated by the cursor
but is missing. Code generation for the symbol 1s skipped
and compilation continues.
(Blunder) : PRTNUM Symbol Not a Proc Name, Skipped --
The symbol, indicated by tne cursor, 1s the object of the
PRTNUM operator but is not a procedure name. Code generation
for the PRTNUM operation is skipped and compilation
continues.
22
23
24
25
26
27
28
App D 137
(Blunder): Junk in Statement, Text Skipped to Next ';' --
A statement cannot be decoded at the point indicated by
the cursor. Source text is skipped until the next
delimiting semicolon (';') is found. (Semicolons appearing
in 2 comment or string constant are skipped as well.)
This flag is a catch-all when a more specific diagnostic
1s not provided for a faulty executable statement.
(Blunder): No Expression Operand, Skipped --
An operand (either a variable or constant) is required
at the point indicated by the cursor but is missing.
Code generation for the operand is skipped and compilation
continues.
(Blunder) : Program Over 65535, Reduced Mod 2**16 —-
The Location counter for program svace (program counter)
is over 65,535 bytes as of the point indicated by the
cursor. Overflow in the program counter beyond 16 bits
is ignored and compilation continues. A common program
counter is used for all procedures nested in an external
procedure.
(Blunder): Stack Over 65535, Reduced Mod 2**16 —-
The location counter for stack space (stack counter) is
over 65,535 bytes as of the point -ndicated by the cursor.
Overflow in the stack counter beyond 16 bits is ignored
and compilation continues. A separate location counter
is used for each procedure nested :n an external procedure.
This flag is usually caused by an array of excessive size,
(Error): Constant Over 32 Bits, Reduced Mod 2**37 --
A constant requires more than 32 bits of precision. The
cursor points to the last valid contribution to the constant.
For a numeric constant, overflow beyond 32 bits is lost;
for a string constant, characters beyond the 4th are lost;
in both cases compilation continues. For the purposes of
this flag, a constant is considered a 32 bit (unsigned)
magritude number.
(Blunder): No 'THEN', Assumed --
A then-clause is required in an if-statement or if-expression
at the point indicated by the curscr, but the keyword
THEN is missing. Its presence is assumed and compilation
continues.
(Blunder): No 'ELSE', Assumed —-
An else-clause is required in an if-expression
at the point indicated by the cursor, but the keyword ELSE
is missing. Its presence is assumed and compilation
continues.
138 App D
29 (Abort): 50 Blunders and Errors, Job Aborted --
The blunder or error indicated by the cursor is the 50th.
Compilation is aborted. 1f the abort is suppressed,
compilation continues norrally. The abort is issued only
once on the 50th offense. Warnings and aborts are not
included in the blunder ard error count.
30 (Abort): Memory Bad, Job Aborted --
A memory checksum discrepency has occurred at the point
indicated by the cursor. Compilation is aborted. If
the abort is suppressed compiler behavior is unpredictable.
See Section 4.4 for a discussion of memory checking.
31 (Abort): Symbol Table Full, Job Aborted
The symbol table 1s full ¢s of the point indicated by the
curosr. Compilation is alorted. If the abort is suppressed,
compiler behavior is unpredictable. See Section 2.3 for
a discussion of remedial ¿ction.
32 (Abort): 256 Blocks, Job Aborted --
The block indicated by the cursor is the 256th, exceeding
the capacity of the compiler. Compilation is aborted.
If the abort is suppressec, compiler behavior is unpredictable.
The only remedy for this condition is to rewrite the program
to use fewer blocks.
33 (Abort): 16 Lex Levels, Job Aborted --
The block indicated by the cursor is at the léth lex level
exceeding the capacity of the compiler. Compilation is
aborted. If the abort 1s suppressed, compiler behavior
is unpredictable. The only remedy for this condition is
to rewrite the program to use few lex levels.
34 (Abort): Too Many Nested Literallys, Job Aborted --
The literally indicated by the cursor requires too many
references to other nestec literallys.
Compilation is aborted. If the abort is suppressed,
compiler behavior is unpredictable. See Section 2.3 for
a discussion of literally nest depth. Usually this flag
is caused by a loop in a literally chain.
35 (Warning) --
Spare
App D 139
36 (Abort): Stack Overflow, Job Aborted --
The stack used by the compiler at compilation time has
overflowed at the point in the user's program indicated
by the cursor. Compilation is aborted. If the abort
is suppressed, compiler behavior is unpredictable. See
Section 2.3 for a discussion of compile-time stack use.
37 (Abort): Source Physical EOF, Job Aborted --
An unexpected end-of-file has been encountered on the source
file. Compilation is aborted. If the abort is suppressed,
compilation continues normally; the input file of course,
may be undefined after an EOF. An EOF is legitimate only
after the end of an external procecure and before the
entry name of an ensuing external procedure; comments and
loader text may appear in this interprogram region.
38 (Abcrt): Hash Table Full, Job Aborted --
The hash table used by the symbol table is full as of the
point indicated by the cursor. Compilation is aborted.
If the abort is suppressed, compiler behavior is unpredictable.
See Section 2.3 for a discussion of hash table use.
39 (Warning): Hash Table 90% Full, Icnored --
The hash table used by the symbol table is 90% as of the
poirt indicated by the cursor. No action is taken and
compilation continues. Compilation speed will degrade
as the hash table approaches 100% full, at which time
compilation is aborted; see Abort 8.
40 (Abort): Object IO Error, Job Aborted --
An irrecoverable I/O error has occurred with the object
file. Compilation is aborted. If the abort 1s suppressed,
compilaticn will continue normally; however, the contents
of the object file may be flawed. If the abort occurs
before any object has been written the problem likely
lies with the assignment or opening of the object file.
If the abort occurs after some object has been written,
the problem is necessarily with the data transfer to the
object file.
41 (Blunder): No Assignment Operator (=,+=,:=), Ignored --
An assignment operator is expected at the point indicated
by the cursor. Code generation for the missing assignment
operator is ignored and compilation continues.
42
43
44
45
46
47
48
140 App D
(Blunder): Operator Needs Word Destination, Ignored --
The operand indicated by the cursor must be of size word
but is otherwise declared. Code generation for the
operation is ignored and compilation continues.
(Blunder): Undeclared Variable, Declared as Word Auto --
The variable indicated by the cursor is undeclared. It is given
automatic class, internal scope, word size, and dimension as
written, but no stack spac= 1s allocated. Compilation continues.
(Blunder): Too Many Forwards Refs to Procs/Labels/Initlists,
Skipped --
The forward reference indicated by the cursor overflows
the forward table. The reference is not saved and will
never be resolved. Compilation continues. Forward
references to procedures, labels, and initial lists share
a common table. A forwarc reference to a procedure 1s
resolved (making room for another) when the procedure
entry is encounted; a label is resolved when the label
is encountered; an initial list is resolved when the first
executable statement of a nrocedure is encountered.
(Error): Keyword Defined as Symbol, Defined But No
Refs Possible --
The keyword indicated by the cursor is being defined as
a symbol. The declaratior is completed but subsequent
references to the keyword as a symbol will result in
further flags. Compilaticn continues.
(Warning): No 'PROC', As<cumed --
The keyword PROC (or PROCEDURE) is required at the point
indicated by the cursor bit is missing. Its presence 15
assumed and compilation ccntinues.
(Warning): No ';', Assumed --
A semicolon (';') is requ: red at the point indicated by
the cursor, but is missinc. Its presence is assumed
and compilation continues.
(Blunder): No Parameter, Skipped --
A parameter is required at the point indicated by the
cursor but is missing. Tle declaration of the missing
parameter is skipped and compilation continues.
49
50
51
52
53
54
55
56
App D 141
(Warning) --
Spare
(Error): No External Prochead, 'MAIN' Used --
An external procedure head is required at the point
indicated by the cursor, but is missing. A head of
"MAIN PROCEDURE' is used and compilation continues.
(Warning): No Declaration List Element, Skipped --
A declaration list element is expected at the point indicated
by the cursor but is missing. Declaration of the missing
element is skipped and compilation continues.
(Warning): No Name List Element, Skipped --
A name list element (of a declaration list element) 1s
expected at the point indicated by the cursor but is missing.
Declaration of the missing element is skipped and compilation
continues.
(Error): No Constant, Skipped --
A constant is expected at the point indicated by the
cursor but is missing. Code generation for the missing
constant is skipped and compilation continues.
(Error): No String, Skipped --
A string is expected at the point indicated by the
cursor but: is missing. Code generation for the missing
string 1s skipped and compilation continues.
(Error): No Initial or Constant List Item, 0 Used --
An initial or constant list element is expected at the
point indicated by the cursor but is missing. Zero 15
used for the missing element and compilation continues.
(Error): Parameter Not Fully Declared, Word Used --
Cne or more parameters (a symbol in the parenthesized
name list following a procedure head) 1s never fully
dec.ared. Word size and dimension of scalar is used.
The cursor is not meaningful. Compilation continues.
The offending parameters are flagged in the symbol table
listing in the state ('ST') field.
57
58
59
60
61
62
142 App D
(Error): Interrupt Proc Declared With Lex>1, Used as
Declared --
The interrupt procedure, wliose procedure head is indicated
by the cursor, appears at « lex depth greater than 1. The
procedure is used as decla ed but the object program may
not work. Compilation con‘ inues.
(Error): Unsatisfied Forw.ird Labels or Procs, See Symbol
Table --
One or more forward refere1ices to a label or procedure is
never satisfied by an appr»priate label or entry. The
cursor is not meaningful. Compilation continues. The
offending symbols are flagjed in the symbol table listing
in the state ('ST') field.
(Error): Junk in DCL Stmt. Text Skipped to Next ',' or ';' --
A declaration statement cannot be decoded at the point
indicated by the error cursor. Source text is skipped
until the next delimiting -omma (',') or semicolon (';').
(Commas or semicolons appeiring in a comment or string
constant are skipped as well.) Compilation continues.
(Warning): External Symbol Over 8 Chars, Tail Ignored --
An external symbol exceeds 8 characters. The cursor indicates
the offending symbol. Characters beyond the 8th are not
passed to the loader. Com»ilation continues.
(Error): String Needs Byt: Size, Treated as Byte --
A variable preset witn a string, to which the cursor points,
is not declared as size byte. The variable if treated
as size byte for the purpcses of initialization, but
otherwise as the declared size. Compilation continues.
(Warning): String Length Does Not Match Dimension, Ignored --
A variable preset with a string, to which the cursor points,
has an explicit dimension that does not match the string
length. The entire strinc is used even if a succeeding
variable overlaid; the declared dimension 1s unaltered.
Compilation continues. Tris flag is generated for an
INITIAL variable only if the string length exceeds the
declared dimension, for a CONSTANT variable if the length
does not exactly match the dimension.
63
64
66
67
68
69
App L 143
(Warning): Initial List Too Long, Used Anyway --
The initial list, indicated by the cursor, for an INITIAL
variable exceeds the declared dimension. The entire
list is used even if it overlays succeeding variables;
the declared dimension is unaltered. Compilation
continues. No flag is generated if the initial list is
too short.
(Warning): Constant List Toc Long or Short, Used Anyway --
The constant list, indicated by the cursor, for a CONSTANT
variable does not match the declared dimension. The
entire list is used even if it overlays succeeding variables;
the declared dimension is unaltered. Compilation continues.
(Error): Base Variable Must Be Backward Ref, Cbase=0 Used --
The basing variable, indicated by the cursor, of a based
variable has not been previously defined. A constant
base of zero is used for the variable being declared
and compilation continues. If the basing variable is
subsequently declared it will be flagged as already
defined (Error 7).
(Blunder) : Base Not Scalar Storage Ref, Used Anyway --
The basing variable, indicated by the cursor, of a based
variable is not a scalar storage r-ference. The base
1s used anyway but the generated code is erroneous.
Compilation continues. The hase mist be of class automatic,
static, parameter, constant based, or variable based.
(Error): Bad Size, Word Used --
The size attribute, indicated by the cursor, is missing
or invalid. A size of word is used and compilation continues.
(Error): Bad Bit Size, Bit (4) Used --
The bit size attribute, indicated by the cursor, is not
l, 2, or 4. Bit(4) is used and conpilation continues.
(Warning): Initial or Constant Value Too Big, Truncated
on Left --
The element in an initial or constant list, indicated by
the cursor, is too big for the declared size. Bits are
trurcated from the left. The flag is generated if the
bits discarded from a 32 bit intermediate value are not
all the same. This interpretation of precision differs
from that used in expression translation.
144 App D
70 (Blunder): Parameter May Not Have Area Attribute, See
Symbol Table --
An area attribute, indicat=:d by the cursor, may not be
specified for a parameter. The attributes used for the
parameter are shown in the symbol table, but inasmuch as
they are inconsistent, the code generated for parameter
references will be erronecis. Compilation continues.
71 (Warning) --
Spare
72 (Error): Base Missing, Cbase=0 Used --
The based variable, indicated by the cursor, contains an
invalid or incomplete base reference at the point indicated
by the cursor. A constant base of zero is used and
compilation continues.
73 (Error): Proc Size Mismat:h, New Size Used --
The new size for a procedure specified in an entry statement
does not match the old siz: specified in a declaration
statement. The new size is used for all subsequent code
generation and compilatior continues. Previous code
generation will have used the old size. The cursor points
to the procedure head of {пе offending entry statement.
74 (Blunder): No '=' in Iterative Do, Assumed --
An interative do does not contain an equals operator
at the point indicated by the cursor. Its presence is
assumed and compilation ccntinues. Either an equal sign
('=') or a colon-equal sion (':=') may be used.
75 (Error): Constant Over 1¢ Bits, Reduced Mod 2**16 —-
The constant indicated by the cursor contains more than
16 bits of precision while the current context allows
for only 16 (word precisicn). The low-order 16 bits of
the constant are usec and compilation continues.
76 (Warning): Do's Nested Tco Deep, Nest Checking Invalid --
The do indicated by the cursor in nested too deep for nest
checking. Compilaticn cortinues but future labeled ends
will not be properly matcted. See Section 2.3 for a
discussion of do nest depth.
77
78
79
80
81
82
83
App D 145
(Blunder): Too Many Do Cases, Ignored --
The do case indicated by the cursor exceeds the compiler
capacity for active do cases. The body of the case is
translated correctly but the link to the case is lost.
Comp:lation continues. A case is active until the
matching end for the enclosing do “ase statement is
encountered.
(Blunder): No 'TO' in Iterative Do, Assumed --
The keyword 'TO' 1s required in an iterative do at the
point indicated by the cursor. Its presence is assumed
and compilation continues.
(Warning) --
Spare
(Blunder): Bad 'BASED' Nesting, Iunored --
The based variable, indicated by the cursor, has a loop
in the basing chain. The chain is prematurely terminated
and compilation continues. The flag cannot occur in the
current compiler because the basing variable must be a
backward reference; see Error 65.
(Blunder): Variable Must Be Storace Ref, Ignored --
The variable indicated by the cursor is used in a context
that requires a storage reference. Code generation for
the storage reference is incorrectly generated and
compilation continues.
(Error): End Identifier Must Be Do-Label/Begin-Label/
Ent-y, Ignored --
The identifier, indicated by the cursor, of a labeled end
is not the label on a do or begin statement nor is it an
entry to a procedure. Block closure checking for this
end 1s ignored and compilation con-inues.
(Error): Label Does Not Match Current Block, Ignored --
The identifier, indicated by the cursor, of a labeled
end does not match the label on the innermost open block
or group. The mismatch 1s ignored. the block or group
1s closed, and compilation continues.
84
85
86
87
88
89
90
146 App D
(Error): Label On End No- Defined, Ignored --
The identifier, indicated by the cursor, of a labeled end
is undefined. Block closure checking for this end is
ignored and compilation centinues.
(Warning): Over 32,765 Dc Blocks, Nest Checking Invalid --
The do indicated by the cursor is the 32,766th exceeding
the compiler capacity for groups. Compilation continues,
but future labeled ends will not be properly matched.
(Warning): Stack Underflcw (May Be Due To Another Flag),
Ignored --
The location counter for the program's run-time stack
(stack counter) has underflowed. The underflow is ignored
and compilation continues. The underflow is usually a
side effect of another flag.
(Blunder): No Proc Ref After 'CALL', Ignored --
A procedure reference is expected at the point indicated
by the cursor after the keyword CALL but is missing or
invalid. Code generation for the procedure reference is
ignored and compilation continues. The flag is usually
the result of an undeclare | Procedure.
(Blunder): No Label Ref After 'GO TO', Ignored --
A label is expected at the point indicated by the cursor
after the keywords GO TO, ¡OTO, or GO but is missing or invalid.
Code generation for the la»el is ignored and compilation
continues.
(Blunder): Current Proc Cinnot Return a Value, Ignored --
A return statement in a procedure is returning a value,
indicated by the cursor, bit the matching procedure head
did not include a return s ze. The procedure head size
omission is ignored, code :¡enerated for the return value,
and compilation continues.
(Blunder): Current Proc M::st Return a Value, Ignored --
A return statement in a procedure requires a value at the
point indicated by the curcor but none is present or is
invalid. The value omissicn is ignored and compilation
continues. This flag is usually caused by the inclusion
of a size in the matching y rccedure head where none was
intended.
App D 147
91 (Blunder) : No Statement After 'THEN', Ignored --
A statement is expected at the point indicated by the cursor
following the keyword THEN but none is present. Code
generation for the statement is ignored and compilation
continues.
92 (Blunder): No Statement After 'ELSE', Ignored --
A statement is expected at the point indicated by the cursor
following the keyword ELSE but none is present. Code
generation for the statement is ignored and compilation
continues.
93 (Blunder) : Embedded Assignment Does Not Allow Field
Select, Ignored --
The field select operator, indicated by the cursor, may not
be used in conjunction with an embedded assignment operator
(':=!). Code generation for the field selection 1s
ignored and compilation continues.
94 (Blunder): No Proc Arg, Ignored --
A procedure argument is expected at the point indicated by
the cursor but is missing or invalid. Code generation for
the argument is ignored and compilation continues.
95 (Blunder): Bad Number of Args to Built-in Proc, Accepted —-
The number of arguments to a built-in procedure 1s incorrect
The cursor points to the argument list. Code is generated
for the arguments written but the orocedure will not work
correctly. Compilation continues.
96 (Blunder): Bad Arg Size for Builtin Procedure, Accepted --
The argument indicated by the cursor has an incorrect size
for the specified builtin procedure. Code is generated for
the size as written but the procedure will not work correctly.
Compilation continues.
97 (Blunder): Over 252 Words of Proc Args, Reduced Mod 252 --
The total length of the argument _ist, indicated by the
cursor, exceeds 252 words. Code “or the argument list
is generated but the call cannot be correctly executed.
148 App D
98 (Blunder) : '@' Illegal W. th Based Variable or Constant,
Ignored --
The based variable or con. tant indicated by the cursor
is the object of the address operator ('@') which is illegal.
Code generation for the address operation is ignored and
compilation continues.
99 (Blunder): Constant Cannet Be a Destination, Used Anyway --
The constant indicated by the cursor is used as a storage
destination which is illecal. Code is generated anyway
but the code will not wor}.
App E
Toggle
>
Wo NK OX SS << cm moO "vo ZX HTM EO OO 5
149
APPENDIX E: TOGG.ES -- SIMPLE LIST
Default Settiny
On
On
Off
Off
Off
On
Off
On
On
On
Off
Off
On
Off
On
On
Off
Off
Off
Off
On
On
Off
Off
Function
List symbol table
Ignore high source bit
List generated code
Continue object on blunder
Space for top-of-form
List flags
List object program
Indent code listing
List source program
Honor memory checks
Format for narrow page
Generate object program
Reset toggles at program start
Chop source program listing
Collect symbol references
Format for short page
Upspace listing
Check memory each record
Suppress warnings
Continue on abort
List program summary
Honor listing requests (A C FH L Y)
Honor object in source
Honor early source truncation
150 App F
APPENDIX F: TOGGLES -- DETAILED DESCRIPTION
*
(On), List Symbol Table --
The A-toggle, when on, enal les the symbol table listing.
It is checked after the coripilation of a program to determine
if a symbol table listing -s desired. It does not affect
the content of the symbol ‘able in any way.
(On), Ignore High Source Bit --
The B-toggle controls the use of the high-order (leftmost)
bit of the 8 bits that comprise a source program character. When
the B-toggle is on this bi is ignored (set to zero),
when off this bit is left inchanged. The B-toggle is
normally left on when usin: 7 bit media, e.g. paper tape,
and left off when using 8 hit media.
(Off), List Generated Code --
The C-toggle, when on, enanles the generated code listing.
It is checked as each 32/S instruction is constructed.
It does not affect the actial code generation in any way.
(Off), Continue Object on 3lunder --
The D-toggle, when on, def:ats the normal suppression of
object after a blunder. ()Dbject is suppressed by turning
the H-toggle and O-toggle »ff.) Inasmuch as a blunder
indicates a faulty object »rogram, extreme care should be
taken in using any object jenerated under the D-toggle.
(Off), Space for Top-of-Form --
“The E-toggle, when on, causes a sequence of carriage
return/line feeds to be suostituted for form feeds when a
top-of-form is required. This toggle is useful when the
physical listing device do:s not recognize form feed or
interprets form feed for a) inappropriate page length.
(On), List Flags --
The F-toggle, when on, enaoles the listing of flags.
If the F-toggle is on and the L-toggle off, the offending
source line will be listed in addition to the flag; this
is useful in scanning for errors. Any flags suppressed
because the F-toggle is off are still reflected in the
program summary.
* Default setting
App F 151
(Off), List Object Program --
The H-toggle, when on, enables the listing of the object
program. The H-toggle is independent of the O-toggle
(generate object). The H-toggle is turned off by the compiler
when a blunder occurs, unless the D-toggle is on.
(Or), Indent Code Listing --
The I-toggle, when on, causes any generated code that is
listed (which occurs when the C-toggle is on) to be indented
50 spaces for improved listing clarity. On slower printers
this indentation may slow output speed excessively.
(On), List Source Program --
The L-toggle, when on, enables the listing of the annotated
source program. If the L-toggle is off, and the F-toggle
is on and a flag occurs, the offerding line is listed anyway.
(On), Honor Memory Checks --
The M-toggle, when cn, enables the checksumming of the
prcgram space occupled by the compiler. The frequency
of this checking is controlled by the V-toggle.
(Off), Format For Narrow Page --
The N-toggle, when on, folds all listing output after
character 70. This toggle is usually turned on only when a
Teletype is used as the output device, as the listing
becomes difficult to read.
(Off), Generate Object Program --
The O-toggle, when on, enables the generation of an object
program on the object file. The O-toggle (generate object)
is independent of the H-toggle (list object). The O-toggle
1s turned off by the compiler when a blunder occurs unless
the D-toggle is on.
(On), Reset Toggles at Program Start --
Tae P-toggle, when on, causes all toggles to be reset to
their default state before each program is compiled.
This reset may be defeated by turning the P-toggle off.
Note that to apply the same set of toggles to a group
of programs, the common set of toggles need appear just
once in the first program in conjunction with the P-toggle.
152 App F
Q (Off), Chop Source Program Listing --
The Q-toggle, when on, causes the annotated source listing
to be truncated after the source line: that is, the right-
hand annotation is not listed. No other listings or titles
are affected. This toggle will increase listing speed on
slow listing devices.
R (On), Collect Symbol References --
The R-toggles, when on, enables the collection of symbol
references. This activity has a negligible affect on
compilation speed but a sicnificant effect on symbol table
space. If symbol table space is insufficient, this toggle
is normally turned off. When the symbol table is listed
any symbol with no referenc2s generates a 'SUPPRESSED'
message; symbols with some references listed may also have
some suppressed.
S (On), Format for Short Page --
The S-toggle, when on, defines the listing page size as 51
lines, when off as 66 (incl iding margins).
U (Off), Upspace Listing --
The U-toggle, when on, caus:s a top-of-form to be inserted
in the listing file before -he current line is listed.
This toggle is set off by tie compiler after it is processed.
The U-toggle may be used to control the pagewise formatting
of a listing. Should a U-t>»ggle be encountered while the
L-toggle (list source progr aim} is off, the upspace request
is ignored, but its suppres :ion is indicated in the toggle
summary by the appearance o an asterisk ('*').
V (Off), Check Memory Each Re ‘ord --
The V-toggle, when on, caus-s memory checking to occur each
source record. Memory is a ways checked once per program
before the summary is liste i. Memory checking consists of
à parts: memory checksum c:eck (performed only if the
M-toggle is on) and compile stack size check. If either
check discloses a problem, tie compiler aborts.
W (Off), Suppress Warnings --
The W-toggle, when on, supp esses warnings. Suppressed
warnings are included in the flag summary but excluded
from the console log ard fl..g link. This toggle 1s useful
when warnings are anticipated, but excessive use of the
W-toggle is poor programminc practice.
X
App F 153
(Off), Continue on Abort --
The X-toggle, when on, causes compilation to continue after
an abort. If an abort is suppressed, an 'ABORT SUPPRESSED’
message is issued on the console log and program listing.
The exact response of the compiler after an abort 15
indicated in Appendix D in conjunction with the flag
descriptions. The routine suppression of aborts is a
dangerous practice.
(On), List Program Summary --
The Y-toggle, when on, enables the listing of the program
summary.
(On), Honor Listing Requests --
The Z-toggle causes other listing requests to be honored. The
Z-toggle is a master enable for the A, C, F, H, L, and
Y-toggles. The Z-toggle is useful in turning off all
listings without knowledge of which listing components are
enabled.
(Off), Honor Object in Source --
The #-toggle, when on, causes source records with a pound
sign ('#') in the first byte to be transmitted directly to
the object file. Such records are otherwise treated as
comments. The object record buffer is flushed before the
source record is transmitted. No checksum or sequence 1S
computed for the transmitted recorc. The #-toggle provides
a mechanism for the direct construction of loader text.
For example, to insert a loader end reccrd into the object
file after the last program, suffix that last program with:
/* 850 at */
4 END
154 App F
(Off), Honor Early Source Truncation --
The ?-toggle, when on, causes any text in a source record
beyond the first character and beyond the first question
mark ('?') to be discarded. This premature record truncation
occurs even if the questior mark appears in a comment or
string. To turn the ?-togcle off, the question mark must
appear as the first character in a record lest it be treated
as a comment. For example, the following program uses the
question mark both to delimit comments and as string text.
p: PROC; DCL /* 8? */
a WORD, ? Comment
b BYTE, ? Comment
/* ®
2 */
c BYTE CONSTANT '272'!, /* 85? */
d WORD; ? Comment
END p;
The ?-toggle provides an a ternate mechanism for program
annotation, but is considered poor coding practice.
App G
Foul
CLEV
CPTR
CPTX
DELT
DLEV
ENDS
FLGI
FLG3
GETI
GETS
IDEX
INSE
INST
LAB1
LAB2
LABS
LIT
LLEV
MOST
MOVE
PBSC
PRIN
PULD
PULL
PURG
PUTI
PUTS
RPTC
RUSE
SET
SIZE
SPUT
TUSE
TYPE
WEXP
Procedure
extproc
extproc
group
delta
extproc
end-stmt
flag
flag
getst
getst
index
listst
insertst
labels
labels
labels
physchar
extproc
movest
move
procbody
print
pull-do
pull-lex
purgefwd
putst
putst
rptchar
reuse
set
mpl
prinwrit
token
type
group
APPENDIX ©:
155
LIST OF FOULS
Cause
Case level nct 0 at program end
Case table not empty at program end
Case tabel pointer not in case table
Symbol tab.e entry has bad units field
Do level n»t 0 at program end
End statem:nt type out of range
Flag numbe out of range
Flag sever ty invalid
Symbol tab e entry pointer not in symbol table
Symbol tab e field code out of range
Item not f > und
Field desc iption not found
Text lengt : out of range
Symbol typ: not an identifier
Symbol typ: is a keyword
Symbol typ: out of range
Literally .evel less than O
Lex level :0t O at program end
Target fie d length out of range
Target fie d length out of range
Stack coun er invalid at program end
Line size :xceeds buffer size
Do level l»ss than 1
Lex level .ess than 1
Purge type out of range
Symbol tab e entry pointer not in symbol table
Symbol tab e field code out of range
Repeat cha’ acter flag already active
Reusc leve out of range
Target fie d length out of range
Symbol tab e base too big
Line size ‘xceeds buffer size
Reuse leve out of range
List size « xceeds buffer size
Expression type invalid
156
Flag
> Ww NV HO
DO I су сл
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
APPENDIX H:
Is Generated By Procedure
FLAG REFERENCES
extproc
string
App H
constunt dclelemt dclelemt -nitlist num-pri num-pri prochead prochead
proc-ref ref sizeattr s-ref var
constunt
constunt
extproc
blocksen dclelemt dclelemt «iclelemt dclelemt dclelemt labels prochead
token
logchar
get-lex
var
ref
ref var var
s-ref
num-pri s-ref
s-ref s-ref
num-pri
c-exp c-exp group if-then nim-pri
konstant
num-pri
num-pri
semiscan
as-stmt exp log-fact log-term num-exp num-fact num-term s-exp
inc-pc
inc-sc inc-xc
constunt constunt
if-then
c-exp
flag
memcheck
insertst
push-lex
push-lex
token
memcheck
sread
search
newentry
putst
40
41
42
43
44
45
47
48
49
50
51
52
53
54
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
owrite owrite owrite
as-stmt exp
as-stmt exp group
in-sym
save-ref
symbol
dclelemt
semi
prochead
extproc
dcl-stmt
dclelemt
dclelemt
dclelemt
areaattr
procbody
blocksen
extproc
del-stmt
areaattr
initstr
initstr
initlist
initlist
areaattr
areaattr
sizeattr
sizeattr
initlist
dclelemt
areaattr
blocksen
group
areaattr
push-do
group
group
prochead
del-stmt
dclelemt
initlist
dclelemt
areaattr
sizeattr
dclelemt
extproc
157
158
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
get-mode
group
end-stmt
end-stmt
end-stmt
push-do
dec-sc
cal-stmt
gotostmt gotostmt
num-pri ret-stmt
ret-stmt
if-stmt
if-stmt
exp
proc-ref proc-ref
proc-ref
proc-ref
proc-ref
num-pri proc-ref
as-stmt exp group
App H
App I 159
APPENDIX I: LOAD MAP
160
4 4 PPOCE]J)
NAME
HPL
ADDERFF
APLAATTR
ASeSTMT
Ae VT
R211
Riu
RODHR
RINDHFX
RINDHF X?
RINOIIF XA
RL uC
RLUCK SEN
ВУГЕЗТРЕ
Re{ VT
CALeSTMI
CONSTIINT
Ce XP
ACLEL FP MT
NCLeSTMY
NELHAITN
DECeSC
ПЕР ОТ
ВЕСТА
LNCHAIN
ENDESTMI
EXIT
EXP
EXTPRAF
LXU'IIT
FLAG
FORMAT
Fou
GASZ
RETST
GE Te: FX
GETEAODF
157
GOTISTHT
GPS
GROUP
TF+ECLAUS
1Fe3THT
Ре ТН М
TNL eC
INLeSF
INCEXxXE
INDE X
INITLIST
INTTSTR
INSERTST
| Ме Зум
KONSTANT
LARDOREC
LABELS
LIST
LISTS
LOLCHAR
Пе, + НАСТ
{ A, e TF PRS
ENTRY A'DR
DEC / HE X
V/ 3/0
1346/1410
12607/7124
1628/05
1908/47Ru
2114/9/NE
2 | ВЫХИНВВА
2284/4851 8
2384/0954
24147396
24144/49BC
2489/49RM
2584/A1A4
2942/2456
2936/4778
2996/4RA
AU A4 /C10
151:1/25R6
ХПИ ЛИВИИ
4912/1334
EA48R/1 3R8
5184/1373
6124/1444
5176/1330
5276/1490
5344/14
55738/19542
5642/1572
5826/160C2
A27A/1 AD
6 3460/1842
1 1712/7?29D8
1 A914/72AA7
| A966/2AD6
"1AQA/DAFC
112964 /2UVM
1 1298/2079
11748/204
1 4778/72 42
"21 16h/7F 54
1215072470
1 3316/3444
1 1334/3416
1 1474/319C
1 1544/1174
1 3562/15
1 3644/3541
13688734078
1 3348/3618
14812/3390
15168/3440
15764/3RAN
15376/3C14
t15436b/3C46
15458 /3C62
15750/3086
16760/33EFRC
17546/448A
17756/495C
1 PARA 7 ARAL
IRF ENTRY POINTS:
STATIC=URG
DUC/HEX
R/AANA
R/VAGB
R/HANB
R/AAHR
R/AAUB
R/AAGB
2/7/4708
R/AAAR
R/BAUB
R/UYALR
2/7/4208
R/UAA8
2/471078
я / ИИ
R/VIAUR
ВХ ИЛИЯ
R/AAUR
R/9ANR
R/ZAANRK
R/ZVAAR
в/из Я
я/И 8
N/A "78
R/A 48
R/A7AIR
2/AANR
R/UI8
Q/424R
N/V YAR
R/UY AB
R/4718
R/A7A8
R/A4 142
R/VANR
R/ANAR
8 /ATACIR
R/AAUR
в/из ИЯ
R/ MAGA
BR /AAUR
R/VAAAR
R/AAUR
274108
R/ YAA
R/AAGR
R/AAUAR
A /) 31138
Ву АЛИЯ
R/VNANA
3/4208
R/AANR
R/ANMAB
2/4208
R/UAMR
R/WAGR
8/04718
32/4418
R/AMIAB
Q/77218
Q/AANE
LOUKFHOR
[LSTEADR
MEMCHECK
MOVE
MOVEST
NAME SAME
NEWENTRY
NULESTMI
NIUMEE XP
NUMeFACT
NUMePRI
NUME TERM
OL T
UTE ADUR
OUTERYTF
OUTEDRLE
OUT INST
OUTeLTT
OUT e| wi
QUTeRfFC
MUTe WORD
ОПТ + «РТ
OWRITE
PHYSC'IAR
PRINT
PRT'ISRIT
PROCTINDY
PRUCHF AD
PROC+ IU
PROC+ REF
РИЦ «Ру
PULI+LEX
PURGEFWN
PUSHEND
PUSHeLFX
PUTST
KEF
REFST
RE TESTMI
REUSE
КРТСИАК
SAVC#ÈREF
VE APCHH
SEMI
SEMISCAN
SET
SETTOGS
SIMPLES?
SIZEATTR
SREAD
JTATEST
STMT
3TKING
SUMMARY
SYMBOL
otk XP
Q¢KEF
TOKEN
ТУРЕ
UNE XUNTT
VAR
VARe TH
1 ANBA/A40AW
1R1H5/46RA
18187/4796
13513/4856
1A57A/ARAL
1366A4/4808
12738/4032
1RAZA/AQHA
1 I3B8/AJC8
19434/4A56
19154 /4ACE
1979274156
2441066 /1E62
29692/51004
21326/515A
22918/51R06
21:164/753214
23704/5004
2441141/5)0Lt
241 32/5744
24 354/5722
NAAR JSF RA
2444Y2/5FAC
24" AA/ANMAA
2493/4169
2532/61 AA
24274/65D6
25651/641L
24994/6972
2776/6904
277960 /68(.94
PTR2R/6(CR4
2816670006
2RI214/At AA
23441/hHE TA
2A5U1/hF AB
IRAYR/7A4[?
9142/77172
P2Q0AAA/7 304
2006677302
20740 /742C
2Q772/744(
DORIR/7ARÇE
3409407795558
32206/7974
IAL AR 2759
3Aa162/75N2
37733/7678
3A414106/76C6
36412/7782
34322/78660
3088W/7BAYH
329472/78DE
14214/79Ct
32286/7E1E
1244h/7E 96
IDHAR/TF24
39764/7FFC
34536 /RAC2
TAG" /R75A
T46UA/2788
XAQULA/PHQOA
App I
Y /WAUA
Q/W AA
A/AAUB
8/4012
BR ZWAR
R/ XI 028
A/VAN8
A/A
ВХИИИЯ
Я УИ
BAUS
R / И ‘А JAR
R/ANR
R/VNANA
87/1038
RANA
R/ 119
NY ANA
R/ VIANA
A/A
RAR
BIAANRK
RIVA
R/ATHAR
A/A
R/WAAR
R/WAMR
AIMAR
N/ AR
R/ WAHR
N/A
NA
R/ANDAR
R/ ACTA
RADAR
R/ARAR
R/JANR
R/Y Ana
R/ AR
ях Лив
R/ZJANR
A ANNA
я/ идя
A/d0008
RIAD AS
R/7WAYEe
À 7AUUR
2/48
R/ A/A
B/UAAR
R/ANAR
R/WAHR
В/МИЙВ
A/V AR
R/HANB
R/V 8
A/HANR
A/VAGR
RIAA
R/ 4.2
N/A
Q SANDE
App I
Ad XTERMAL
NAME
SOSIZt
ORISIZE
LISTS(7F
STAC.KSTZ
HAS-ISI7F
MAXLEX
MAXLIT
E WIMAX
NOMAX
CASE MAX
WIDT HA
L REMAX
ARUKTS
BLUNDE RS
[RKORS
WARNINGS
WARNINGT
STMTS
SYMAGDILS
KET 5
PAGEL INE
PAGE
LASTHL ACD
TITLEPTR
LISIVWAJI
STHASF
JIBASHW
ITLMBASE
ТТЕММАХ
"E XTMEN
IEXTMINA
VARCITA EN
PARKCHATN
NANCHAT"
L AHCHATN
VAKDESC
FARDESC
NAMEESE
LABDESC
HASHL OC
HASH TAN
ACLESSFS
COL TSONS
RLUCK
LEX
LINE
CURSOR
| EXDEPTH
NIIMRERP
NUMRERD
XC
PC
PCLONS
DATA ANDRESSES à à
ADDRESS
PEC /HEX
R/AUUB
14 /d0HA
12/24
ТАХДИИЕ
16/7310
1 R/ ANI?
2473014
2273010
24/3418
26/301 A
28/7 A301
3v 7 inti
2/20
34/7022
3679924
38R/7/AU20
177 3028
A?2/ JJU2A
AA7I02L.
An/ AMPL
AZ/2N3W
57/7432
KI/AN3A
541/7436
Sn/dns8
5A/AN3A
670030.
од ХАЙ ЗЕ
64/2444
6b/ 2/04?
6RA/2AA
7472040
727ADAR
TASANWAR
75/ AVAL
78/9904E
62/4652
85/7/4056
917154
YA/JUSL
6/9060
09914/3384
342/4386
941/2388
Jn /A3RA
23/7/23
91/1/4938
912/7439
9144/2502
9167/3394
918/4396
72172398
a27/639A
ОСТМАХ
SC
RLUCKLEX
PRUCLE X
(RX
LOBIX
OBITIFM
ORJRECN
SPEFMODE
PTROLD
DESC
RESCO!D
ICUCE
TCODEOLN
REUSELFV
LOFFLAL
LAHFLAG
POLE w
SONCMRER
DONLST
CASEPTR
CASELFV
CASEITE%
CASERIUF
POKENLEV
'ITLEV
RPTFLAL
CHARSAVE
LITRASE
LITCURSA
OBJECTUN
CONSFI AC
CONSLNC
FWOPTR
CHLCKS
STACKISE
ER
PL
FWDBASE
HWDPL
ORAFCE
ООН
0RJRUF
LISTRUF
FLAGRUF
CODERUF
DBJBUF 1
NUM {
OBJRUF2
NUMO
1 OGGLEF
FWDL LX
VERSION
VALLE
161
024/239C
9267439
958/33BL
994/33NE
1022/43304
{tA2A732 4040
1426/8402
1428/0404
1437/4406
1432/7848
1 4A34/72413A
1 A3N/7 AC
12417311
1144/9414
ТАЛИ ТО
114877418
1350/2341 A
1 252/441€
1 A5BA/41E
1/86/3124
1 AHR A422
1 1017444
1147/944E
1144/2454
1146/9152
1708/*nAC
1714/726AU
1712/20684
1734740006
1756/2560
{77828/749672
1231707118
1232737 10A
1344/27
1 RM6/B70U
t 242/3714
1272/2754
1374/4752
1876/2754
1278/4796
2247/0498
2527/AQNA
2557/4976
25307/3440
2712/7AA08
2832/3R1 A
2952/4888
3A72/ ACA
1154/3052
3158/1056
19Ap/AaCA8
TIAA/ACAC
1547 IDA
T6OQ2/AL AL
566/41 32
162
Procedure
mpl
add-ref
areaattr
*assign
as-stmt
a-cvt
b2d10
b2d101
b2dnr
bin2hex
bin2hex2
bin2hex4
bloc
blocksen
bytesize
b-cvt
cal-stmt
*close
constunt
c-exp
*date
dclelemt
dcl-stmt
dechain
dec-sc
defst
delta
*display
enchain
App J
APPENDIX J: EXTEENAL PROCEDURE REFERENCES
Is Called By Procedure --
areaattr blockser end-stmt gotostmt group num-pri proc-ref
token var
dclelemt
owrite
stmt
as-stmt exp if-tren log-fact num-term ref ret-stmt s-ref var
b2d101 b2dnr
flag out-addr out -byte out-dble out-inst out-1it out-lwl out-word
format list list:t Ist-adr prinwrit
bin2hex2 bin2hex-
out-byte out-ins: out-lit outlwl out-rec
format list list:t lst-adr out-addr out-dble out-inst out-11t
out-lwl out-wcrd
unexunit
group prochody
areaattr initstr procbody
log-fact log-terr num-exp num-term s-exp
stmt
exit
token
exp
mpl
dcl-stmt
prochody
bloc dclelemt group procbody
c-exp group out- nst proc-ref ret-stmt
gotostmt symbol
dclelemt procbod
extproc type
dclelemt labels r:rochead
App J
end-stmt
exit
exp
extproc
exunit
flag
format
foul
gasz
getst
get-lex
get-mode
gisz
gotostmt
gpsz
group
if-claus
if-stmt
if-then
inc-pc
inc-sc
inc-xc
index
initlist
initstr
insertst
in-sym
163
group prochody
flag sread
as-stmt c-exp group if-then num-pri proc-ref ref ret-stmt s-ref var
mpl
blocksen if-stmt
areaattr as-stmt blocksen c-exp cal-stmt constunt dclelemt
del-stmt dec-sc end-stmt exp extproc get-lex get-mode gatostmt
group if-stmt if-then inc-pc inc-sc inc-xc initlist initstr
insertst in-sym konstant labels logchar log-fact log-term
memcheck newentry num-exp num-fact num-pri num-term owrite
procbody prochead proc-ref push-do push-lex putst ref ret-stmt
save-ref search semi semiscan sizeattr sread string symbol
s-exp s-ref token var
print type
delta end-stmt extproc flag getst group index insertst labels
listst mpl move movest phvschar print prinwrit procbody pull-do
pull-lex purgefwd putst reuse rptchar set token type
as-stmt num-pri proc-ref
areaattr as-stmt blocksen bytesize dclelemt dechain
delta end-stmt exp extproc gasz get-lex get-mode gisz gotostmt
gpsz group initlist initstr labdobeg labels listst movest
namesame num-pri olt out-inst physchar procbody proc-id proc-ref
pull-lex ref refst ret-stnt search s-ref token var var-id
gotostmt out-inst
num-pri var
as-stmt exp gasz get-mode nun-pri ret-stmt
stmt
get-mode out-inst ret-stmt
unexunit
if-stmt
exunit
c-exp if-claus
out-addr out-byte out-dble out-inst out-lit out-lwl out-word
out-inst out-lit out-lwl procbody proc-ref
extproc procbody
refst token
areaattr
areaattr
dclelemt newentry
group num-pri proc-ref var
164
konstant
labdobeg
labels
list
listst
logchar
log-fact
log-term
lookfor
lst-adr
memcheck
move
movest
namesame
newentry
nul-stmt
num-exp
num-fact
num-pri
num-term
olt
*open
out-addr
out-byte
out-dble
out-inst
out-lit
out-lwl
out-rec
out-word
out-wrt
App J
areaattr dclelemt -nitlist num-pri sizeattr
gotostmt pull-lex
if-claus unexunit
flag foul memcheck mpl out-wrt owrite sread
flag mpl
constunt token
log-term
s-exp
areaattr bloc bloc«sen cal-stmt c-exp dclelemt dcl-stmt end-stmt
exp extproc gotostmt group if-stmt if-then initlist in-sym
labels log-ternm mpl nul-stmt num-pri prochead proc-ref ref
ret-stmt semi simplesz sizeattr s-ref var
out-addr out-byte our-dble out-inst out-lit out-lwl out-word
mpl sread
extproc flag listst mpl prinwrit sread
extproc list list:t olt out-inst
refst
defst refst
stmt
log-fact
num-term
num-fact
num-exp
dclelemt extproc ‘ut-addr out-byte out-dble out-inst out-lit
out-lwl out-wo:. d procbody prochead
owrite
group purgefwd
areaattr initlist initstr
initlist initstr
areaattr as-stmt i-cvt bloc blocksen b-cvt cal-stmt c-exp exp
extproc get-mole gotostmt group if-stmt initlist initstr labels
log-fact log-t:rm num-exp num-fact num-pri num-term out-lit
procbody proc-ref purgefwd ref ret-stmt s-exp s-ref var
get-mode num-pri rar
num-pri
exit mpl olt sreal
initlist initstr
out-addr out-byte out-dble out-inst out-lit out-lwl out-word
App J
owrite
physchar
print
prinwrit
prochody
prochead
prec-id
proc-ref
pull-do
pull-lex
purgefwd
push-do
push-lex
*put
putst
ref
refst
ret-stmt
reuse
rptchar
save-ref
search
semi
semiscan
set
settogs
simplesz
sizeattr
sread
statest
stmt
string
summary
165
extproc out-rec sread
constunt logchar string token
flag foul memcheck summary
flag list listst out-wrt owrite print summary
bloc blocksen extproc
blocksen extproc
cal-stmt numpri proc-ref
cal-stmt num-pri
end-stmt pull-lex
end-stmt
blocksen labels
group push-lex
bloc extproc prochead
owrite
add-ref areaattr bloc blocksen dclelemt defst enchain ext-proc
get-mode gotostmt group initstr in-sym labels newentry procbody
prochead pull-lex ref-st simplesz sizeattr symbol
s-ref
areaattr end-stmt in-sym
stmt
as-stmt blocksen dcl-stmt gotostmt in-sym konstant labels log-fact
lookfor num-exp num-fact num-pri num-term proc-ref symbol
s-exp s-ref var
constunt logchar string token
areaattr gotostmt num-pri out-inst
defst pull-lex statest
extproc prochead
as-stmt bloc cal-stmt end-stmt gotostmt group procbody ret-stmt
extproc flag list listst mpl print prinwrit sread summary
mpl
dclelemt prochead sizeattr
dclelemt
physchar
gotostmt refst token
unexunit
token
flag mpl
166 App J
symbol blocksen dclelemt extproc labels prochead
*sysget sread
*sysput prinwrit
s-exp exp
s-ref as-stmt exp num-p i
*time mpl
token as-stmt blocksen :lckstmt ext-proc gotostmt in-sym konstant
labels log-fac: lookfor num-exp num-ífact num-pri num-term
semiscan symbo. s-exp s-ref
type exit flag foul mercheck mpl
unexunit exunit
var num-pri ref
var-id group var
* System procedure
App K
APPENDIX K:
Variable
aborts
accesses
block
blocklex (maxlex)
blunders
casebuf (casemax)
caseitem
caselev
casemax
caseptr
charsave (maxlit)
checks (31)
codebuf (listsize)
colisons
consflag
consloc
cursor
desc (1)
descold (1)
dolev
domax
donest (domax)
donumber
duml (3)
dum2 (3)
eofflag
errmax
errors
flagbuf (listsize)
fwdbase (fwdmax)
167
EXTERNAL VARIABLE REFERENCES
Is Referenced By Procedure —-
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
flag summary
search summary
push-lex summary
defst gotostmt list newentry pull-lex push-lex statest
flag olt proctody summary
group
group list
extproc group list
group
extproc group
physchar
memcheck
ist-adr out-addr out-byte out-dble out-inst out-lit
out-lwl out-word out-wrt
search summar y
areaattr proc»ody
areaattr procnody
flag physchar
end-stmt extproc list pull-do push-do
push-do
end-stmt pust -do
bloc gotostmt group prochead push-do
sread
flag
flag olt procbody summary
flag
procbody pul:-lex purgefwd save-ref
168
fwdlex(fwdmax)
fwdmax
Емарс ( Ематах)
fwdptr
hashloc
hashsize
hashtab (hashsize)
itembase
itemmax
labchain
labdesc (1;
labflag
lastflag
lex
lexdepth
line
listbuf (listsize)
listsize
listwait
litbase (mexlit)
litcursr (maxlit)
litlev
lob: x
maxlex
maxlit
namchain
namdesc (1)
numberd
numberp
objbuf (objsizel)
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mp1
mpl
тор].
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
objbufl (objsizel) mpl
objbuf2 (objsizel)
mpl
App K
pull-lex purgefwd save-ref
save-ref
procbody pull-lex purgefwd save-ref
extproc procbody pull-lex purgefwd save-ref
newentry search statest
newentry search
newentry search
areaattr as-stmt dclelemt dechain enchain exp getst get-mods
group list listst newentry physchar procbody prochead proc-ref
pull-lex purgefwd push-lex putst ref ret-stmt save-ref search
s-ref token var
getst insertst newentry putst summary
bloc group labels
blocksen labels
flag summary
bloc blocksen des-sc defst extproc get-lex get-mode gotostmt.
inc-sce inc-xc labels lis- newentry procbody prochead pull-lex
purgefwd push-lex refst ret-stmt save-ref statest
push-lex summary
add-ref dclelemt defst flag labels list sread summary
list listst print summarv
flag list listst Ist-adr out-inst out-wrt print prinwrit
summary
list
phsychar token
physchar token
physchar rptchar token
olt out-rec
push-lex
token
dclelemt
procbody
dclelemt
extproc olt out-rec owrite sread
owrite
owrite
App K
objecton
objfcb(13)
objitem
objrecn
objsize
objx
page
pagelin
parchain
pardesc (1)
pb
pc
pccons
pl
proclex (maxlex)
ptr
ptrold
refs
reuselev
rptflag (maxlit)
sc (maxlex)
sclmax
sobuf (sosize)
sosize
srefmode
stacksiz
stackuse
stbase
stbase0
stmts
symbols
tcode
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
169
exit owrite
exit owrite
owrite summary
out-rec
extproc olt out-rec owrite sread
olt out-rec
prinwrit
prinwrit
dclelemt prockaody prochead
memcheck
areaattr blocksen c-exp gotostmt group if-stmt inc-pc initlist
initstr labels list lst-adr num-pri out-addr out-byte out-dble
out-inst out- it out-lwl out-word procbody proc-ref purgefwd
summary
areaattr dcle. emt
memcheck
bloc list pus! -lex ret-stmt
areaattr constunt dclelemt end-stmt gotostmt initstr in-sym
konstant num-] ci reuse string symbol token
reuse token
putst summary
reuse token
physchar rpt-« har token
dec-sc inc-sc inc-xc labels procbody push-lex
ine-sc summar
list physchar sread
list physchar sread
exp num-pri
memcheck summ.iry
memcheck summ.iry
getst inserts’ listst movest namesame newentry physchar
pull-lex puts: search
memchec pull -lex
summary token
listst newent y summary
reuse token
170
tcodeold
textmin
textminO
titleptr
toggle (255)
tokenlev
value
varchain
vardesc (1)
version
warnings
warningt
width4
XC
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mpl
mp 1
mpl
App K
reuse token
dclelemt insertst newentry putst summary
summary
extproc prinwrit
flag list listst logchar memcheck out-wrt owrite physchar
prinwrit putst settogs sread summary
token
areaattr constunt dclelemt initlist num-pri sizeattr string
token
dclelemt procbody
flag olt
flag summary
getst listst newentry putst
extproc inc-sc inc-xc procbody summary
10.
11.
12.
13.
14.
App L APPENDIX L: SYNTAX 171
program ::=
external_procedure
external_procedure ::=
entry name : external_procedure_head procedure_hody [EOF]...
entry name ::=
identifier
external_procedure head ::=
MAIN [procedure] y |
procedure_head
procedure ::=
PROCEDURE |!
PROC
procedure_head ::=
INTERRUPT Iprocedurel ( pa-ameter ) ; |
procedure [( parameter lis: )] [simple size] :
parameter ::=
1dentifier
parameter _list ::=
1dentifier [, identif:ar]...
H
simple size
BYTE |
WORD |
DOUBLE
procedure body ::=
[declare statement]... [bl ck sentence]... end_statement
declare_statement ::=
declare declare_element [, declare element]... ;
declare ::=
DECLARE |
DCL
declare element ::=
identifier literally strinc |
entry_name tyre_ attribute
item list size attribute [-rea_ attribute]
literally ::=
LITERALLY |
LIT
15.
16.
17.
18.
23.
172 App L
type_attribute ::=
[external] procedure [simple_sizel |
( Xonstant ) MICRO [simple_sizel
externa. ::=
EXTERNAL |
EXT
|
item 1155:
identifier [( konstant )] |
( identifier [( konstant )] [, identifier [( konstant ev.)
size_attribute P=
simple size |
POINTER [TC] simple_size
BIT ( konstant )
H
area attribute -:
extarnal |
STATIC |
CONSTANT s
CONSTANT |
A
LL
nitial
-] konstant [, [+ | -] konstant]... )» |
] konstant [, (+ ! -] konstant]... ) |
EM EJ
Ja 3
Ur UU) h
+
~
initial ::=
NITIAL |
NIT
}
hlock_sentence ::=
entry name : procedure _head procedure_bodvy |
executable unit
executable_unit ::=
if_statement
unconditional_executable_unit
if statement ::=
if clause executable_unit |
if clause balanced_executable_unit ELSE executable unit
if clause ::=
[label list] if_then
1 then ::=
IF expression THEN
26.
27.
33.
34.
35.
36.
37.
38.
App L 173
balanced_executable unit ::=
if_clause balanced _executible unit ELSE
balanced_executable_ init |
unconditional_executable nit
unconditional _executable unit ::=
[label_list] block |
[label_list] group |
[label list] siatement
label_list ::
[label :]...
label ::=
identifier
block ::=
BEGIN ; procedure_ body
group ::=
aroup_heading ; [block sertencel... end_statement
Iroup_heading ::=
REPEAT expression [TIMES] |
DO [do specification]
do_svecification ::=
FOREVER |
WHILE expression |
CASE expression |
identifier replace_op expression TO expression [BY expression)
replace_op ::=
statement ::=
null_statement |
return_statement |
goto_statement |
call _statement |
assignment statement
null _ statement ::=
»
1
return statement ::=
RETURN [expression] y;
goto statement ::=
go_to lahel ;
174 App L
39. go to = 5 5:
40. call statement ::=
CALL procedure_reference 7;
41. procedure_reference ::=
entry _name [( procedure_argument Г, procedure_argument]... 3]
42. procedure_argument ::=
expression |
array_name -
43. array_name ::=
identifier
44. assignment_sta-ement :: =
storage reference assignment_ operator expression
“её
45. assignment_operator ::=
= | T= | + =
46. expression ::=
conditional expression |
simple_expression |
storage_reference := expression
‚>
ji
Г]
conditional_expression ::=
if then expression ELSE expression
43. simple_expression :*=
locical_term {or_operator loaical_termi..-
43. or_operator ::=
1 {+ 1 | XOR
50. logical_term ::=
logical_ factor [& logical_factor....
51. logical_factor ::=
numeric_expression [comparison_crerator numeric_expression]...
52. comparison_operator ::=
< | <= | ^> | = | ^= | >= | ^< | > |
LL” | LLE | LEQ | LNE | LGE | LGT
53. numeric_expression ::=
numeric_term [add_operator numeric_term]...
54.
55.
56.
57.
60.
51.
62.
63.
64.
65.
66.
67.
App L 175
add_operator ::=
+ | -
numeric_term ::=
numeric_factor [(multiply_>perator numeric_factor]...
multiply_operator :
| MULD | DIVD | SLL | SRA | SRL | SLC
* | / | MOD
numeric_factor ::=
unarv_operator numeric_fa -tor |
numeric_primary
unary_operator ::=
+ | = 1 7
H
numeric_primary
konstant |
procedure reference |
storage reference |
e variable |
( expression ) |
PRINM ( entry name |
storage_reference ::=
reference [$ ( expression [: expression] )]
reference ::=
variable [6 [( expression )]]
variable ::=
identifier [( expression |]
end_statement ::=
[label_list] END [label | entry name] ;
konstant ::=
constant |
string
constant ::=
decimal_number |
bit_string
decimal_number ::=
digit...
bit_string ::=
* [ [( legal_size )] [legel_ digit] J... "
63.
69.
70.
71.
—l
TI
76.
176
legal _size ::=
1 | 2 | 3 | 4
legal digit ::=
digit | AlBICID|IEJF
digit
string ::=
” fnon quote_char]... [string]
identifier ::=
alphabetic character [alphameric].
alphameric ::=
alphabetic_character | digit
alphabetic_character ::=
lower_case |
upper _case |
gt!
lower _case =
а! БЫ | с | Я еб al nl i
п ol pl alr" sl tt | aul wv
unper_case «+=
A BlÍICID | E | = | G | H | 1
NO |PlIOQIRIS|ITIUIV
Оо |2 13 |4 |5 |6 |7 |8
| 9
N 3
QS
App L
54
74
73
19
43
44
45
26
67
30
21
40
52
47
65
66
Syntax Cross
Reference
add operator
53
alphabetic_character
72,73
alphameric
72
area attribute
13
array_name
42
assignment_statement
35
assignment_operator
4 4
balanced_executable_unit
23,26
BASED
19
BEGIN
30
BIT
18
bit string
65
block
27
block_sentence
10,31
BY
33
BYTE
9
CALL
40
call statement
35
CASE
33
comparison_operator
51
conditional _ expression
46
CONSTANT
19
constant
64
DCL
12
decimal _ number
65
13
12
11
70
33
63
22
46
16
39
177
declare_element
11
declare
11
DECLARE
12
declare_ statement
10
digit
66, 73
DIVD
56
DO
32
do_specification
32
DOUBLE
9
ELSE
23,26,47
END
63
EOF
2
end_statement
10, 31
entry_name
2,13,21,41,59,63
executable_ unit
21,23
expression
25, 32, 33, 37, 42, 44, 46,47,59,5C,
external 61,62
15,19
EXT
16
EXTERNAL
16
external procedure
1
external procedure_head
2
FOREVER
33
GO
39
do_to
38
GOTO
39
-
`В
el
31
24
23
25
20
64
27
28
69
68
14
178
goto_statement
35
group
27
group heading
31
identifier
3, 7, В, 13, 17,19,29, 33, 43,62
IF
25
1f_clause
23,26
1f statement
22
if then
24,47
initial
19
IMIT
20
INITIAL
0
INTERRUPT
я = ое
1 1 o
1
O r= ct ON LA DO
3
3 wo D
konstant
15,17,.8,19,59
label
28, 38,65
label_l:st
24,27,6:
legal_digit
67
legal size
67
LEQ
52
LGE
52
LGT
52
LIT
14
literally
13
LITERALLY
14
LLE
52
51
50
56
36
53
57
59
55
49
42
LLT
52
LNE
52
logical factor
50
logical term
48
lower_ case
74
MAIN
4
MICRO
15
MOD
56
MULD
56
multiply operator
55
non duote_char
71
null statement
35
numeric expression
51
numeric factor
55,57
numeric_primary
57
nimeric_term
53
or_operaotr
48
parameter
6
parameter list
6
FOINTER
18
PROC
5
PROCEDURE
-
À
procedure
4,6,15
procedure_argumment
41
10 procedure_body
2, 21, 30
41
61
34
37
43
+—
со
35
60
71
15
58
procedure_head
4,21
procedure_reference
40,59
program
PRTNUM
59
reference
6 0
REPEAT
32
replace_op
33
RETURN
37
return_statement
35
simple expression
46
simple_sire
6,15,18
size attribute
13
SLC
56
SLL
56
SRA
56
SRL
56
statement
27
STATIC
19
storage_reference
44,46,59
string
13,19,64,71
THEN
25
TIMES
32
TO
18,33,39
type_attribute
13
unary operator
57
27
76
62
179
unconditional executable_unit
22,26
upper__case
74
variable
59,61
WHILE
33
WORD
9
XOR
49
">
/
ಡೌನ್ಲೋಡ್ ಮಾಡಿ
ಕೇವಲ ಸೌಹಾರ್ದ ಜ್ಞಾಪನೆ. ನೀವು ಡಾಕ್ಯುಮೆಂಟ್ ಅನ್ನು ಇಲ್ಲಿಯೇ ವೀಕ್ಷಿಸಬಹುದು. ಆದರೆ ಮುಖ್ಯವಾಗಿ, ನಮ್ಮ AI ಈಗಾಗಲೇ ಅದನ್ನು ಓದಿದೆ. ಇದು ಸಂಕೀರ್ಣ ವಿಷಯಗಳನ್ನು ಸರಳ ಪದಗಳಲ್ಲಿ ವಿವರಿಸಬಹುದು, ನಿಮ್ಮ ಪ್ರಶ್ನೆಗಳಿಗೆ ಯಾವುದೇ ಭಾಷೆಯಲ್ಲಿ ಉತ್ತರಿಸಬಹುದು ಮತ್ತು ದೀರ್ಘವಾದ ಅಥವಾ ಹೆಚ್ಚು ಸಂಕೀರ್ಣವಾದ ಡಾಕ್ಯುಮೆಂಟ್ಗಳನ್ನು ಸಹ ತ್ವರಿತವಾಗಿ ನ್ಯಾವಿಗೇಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಹಾಯ ಮಾಡುತ್ತದೆ.
ಜಾಹಿರಾತು