900506G_Symbol_Meta Symbol_Mar69 900506G Symbol Meta Mar69
900506G_Symbol_MetaSymbol_Mar69 900506G_Symbol_MetaSymbol_Mar69
User Manual: 900506G_Symbol_MetaSymbol_Mar69
Open the PDF directly: View PDF
.
Page Count: 106
| Download | |
| Open PDF In Browser | View PDF |
j
Reference Manual
Price: $3.50
SYMBOL and META·SYMBOL
REFERENCE MANUAL
for
900 SERIES/9300 COMPUTERS
900506G
March 1969
5DS
SCIENTIFIC DATA SYSTEMS/701 South Aviation Boulevard/EI Segundo, California 90245
©1964. 1965.1966. 1967.1968. 1969. Scientific Data Systems. Inc.
Pflnted In USA.
REVISION
This publication, SOS 9005 06G, is a minor revision of the SYMBOL and METASYMBOL Reference Manual, SOS 90 05 06F. Changes to the previous edition are
indicated by a line at the right or left margin of the page.
RELATED PUBLICATIONS
Title of Manual
Pub Iicati on
Number
SOS 910 Computer Reference
90 00 08
SOS 920 Computer Reference
90 00 09
SOS 925 Computer Reference
90 00 99
SOS 930 Computer Reference
90 00 64
SOS 9300 Computer Reference
90 00 50
SOS 92 Computer Reference
90 05 05
SOS MONARCH Reference
90 05 66
SOS 9300 MONITOR Reference
90 05 13
SOS 900 Series FORTRAN II Reference
90 00 03
SOS 900 Series FORTRAN II Operations
90 05 87
SDS FORTRAN IV Reference
90 08 49
SOS FORTRAN IV Operations
90 08 82
SOS Business Language Reference
90 10 22
NOTICE
The specifications of the software system described in this publication are subject to change without notice. The availability or performance of some features me
depend on a specific configuration of equipment such as additional tape units or larger memory. Customers should consult their SOS sales representative for details.
ii
CONTENTS
PREFACE
I.
GENERAL DESCRIPTION
II.
SYNTAX
A.
B.
C.
D.
E.
F.
G.
H.
v
3
Introduction
Characters
Program
Line
Label Field
Operation Field
Operand Field
Comments Fie Id
3
3
3
3
3
4
4
6
III.
INSTRUCTIONS
10
IV.
DIRECTIVES
11
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.
L.
M.
N.
O.
P.
Q.
R.
S.
T.
U.
V.
V.
Introduction
AORG and RORG (Absolute ORiGin and Relative ORiGin)
RES (REServe)
DATA (DATA)
DED (DEcimal Double Precision)
TEXT or BCD (Binary-coded character string)
EQU (E QUa Is)
OPD (Operation Definition)
FORM (FORMat)
RELTST (TeST RELocatability)
END
DO
NAME
PROC and FUNC (PROCedures and FUNCtions)
PAGE (Eject PAGE)
DISP (DISPlay)
INHD (INHibit Display)
SUPR (SUPpRess octal listing of binary output)
INHS (INHibit Suppression)
MARK (insert character in flag region on listing)
SBRK (Set BREAK 1)
SIOR (Set special I/O Relocation)
ADDITIONAL PROGRAMMING FEATURES
A.
B.
C.
D.
E.
F.
G.
Comments Line
Free Form and Continuation
Litera Is
External Definitions and References
Relocation
Concordance Listi ng
System Procedu res
iii
11
11
12
13
14
14
15
17
18
18
19
19
22
22
31
31
31
32
32
32
33
33
34
34
34
35
36
38
39
41
VIo
COMPATIBILITY: SYMBOL/MET A-SYMBOL
44
VII.
COMPATIBILITY: 92 SYMBOL/MET A-SYMBOL
45
A.
B.
C.
D.
E.
VIII.
Symbols
Directives
Expressions
Instruction Generation
Remarks
45
45
47
48
48
OPERATIONAL PROCEDURES
A.
B.
C.
D.
E.
F.
50
Error Flags
MET A-SYMBOL Error Messages
SYMBOL Error Halts
Concordance Routine Error Messages
Use of SBRK
Making Symbolic Changes to Encoded Programs
50
51
54
54
55
57
SDS 900 Series Programmed Operators
SDS 910/925 Instruction List
SDS 920/930 Instruction List
SDS 9300 Instruction List
SDS 92 Instruction List
Special Instructions - SDS 900 Series/SDS 9300
Input/Output - Device EOMs (SKSs)
Input/Output - Channel Operations (SDS 925/930/9300)
MET A-SYMBOL/FORTRAN Interface
Compatibi lity with SDS SYMBOL 4 and SYMBOL 8
SDS Standard Binary Language
60
62
65
69
74
78
82
APPENDIXES
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.
iv
84
87
90
94
PREFACE
This manual describes two SOS Assembly Systems: META-SYMBOL, and its compatible subset, SYMBOL.
For
both systems, it defines a symbol ic programm ing language and the processor that assembles programs written in
th is language.
Although the name SYM BOL (or META-SYMBOL) appl ies to both the language and the proces-
sor, context will normally clarify the distinction.
Since SYMBOL is a compatible subset of META-SYMBOL,
all programs written in SYMBOL may be assembled by META-SYMBOL; the converse is not true.
The introduction to META-SYMBOL is basic since, in many ways, META-SYMBOL represents a radical departure from more conventional assemblers.
The description is del iberatel y syntax-oriented, and the detai Is per-
taining to its implementation on particular SOS computers are relegated to appendixes.
The presentation assumes that the reader is familiar with the basic theory of digital computer programming.
v
I. GENERAL DESCRIPTION
Basically, the solution of problems on a digital computer involves two steps:
Analysis: mathematical description of the problem, or the formulation of a mathematical model
Coding:
transcription of the mathematical equations into a sequence of machine instructions
The result, called a program, operates on data specified to it (input data) and produces data which constitute
the problem's solution (output data).
If the mathematical description is in parametric form, a family of solu-
tions may be obtained by varying the input data.
Both analysis and coding involve language translation:
mathematical to machine code.
normally, the translation sequence is from verbal to
The first two forms are more familiar to humans than machine code, particu-
larly since machine code varies from computer to computer.
Although del iberately simple, the following
example is illustrative:
Verbal
Let x be the sum of y and z
Mathematical
Machine (octal)
=y +
07601000
x
z
05501001
03501002
No wonder, therefore, that the coding phase frequently is the most time-consuming and unrel iable portion of
programming.
Automatic programming systems arose because of early recognition that coding itself had all the attributes of a
typical programming problem.
Ironically, therefore, the computer could solve the very problem it created.
The creation of a program was involved that would generate machine language programs (the output data) from
problem specifications (the input data), as written in some convenient non-machine language; to be convenient, the language had to be easy to teach, learn, read, and write. Since the output data form is immediately
specified by the computer on which the program is to be executed (called the target machine), only the form
(syntax) of the source language input to the translation program rema ined to be described.
Clearly, the source language would occupy a level in between mathematical notation and machine language
but, unfortunately, no single language evolved.
At one end of the language spectrum, several algebraically-
oriented languages developed, such as FORTRAN and ALGOL.
as compilers.
The assoc iated langucge translators are known
Toward the other end of the spectrum, as languages become more machine-dependent, a new
language tends to develop for each new machine.
The associated language translators are called assemblers,
and the input (assembly) language is generally in the form of machine instructions represented symbolically.
Either language becomes more or less appropriate as the problem shifts from mathematical to machine in nature.
But the problem was not yet solved.
ond problem:
For, once specified, the assembler and compiler in turn engendered a sec-
In what language were they to be written? Just as the prol iferation of programs pointed to the
first problem, the prol iferation of mach ines and languages gave rise to the second. A programm ing language
suitable for dealing with programming languages, that is, a programming meta-language, was required.
META-
SYMBOL is the outgrowth of this concept as implemented on SDS computers.
META-SYMBOL consists of two basic parts:
a processing section (the processor proper) and a directive section.
The directive section contains directives that describe the computer, directives that describe the assembler,
and directives that instruct the meta-assembler.
Since directives describe all appl icable computer characteris-
tics, only the directive section need be changed in implementing META-SYMBOL for other target machines.
Similarly, alteration of the assembler-descriptive portion enables variations in the assembler's syntax, or even
the implementation of entirely new programming systems.
In normal usage, META-SYMBOL operates on con-
ventional symbol ic programs as a high-level symbolic assembler.
Operationally, META-SYMBOL is both faster and easier to use than conventional assembly programs.
These
benefits result from an advanced source language encoding scheme that makes modify-and-Ioad assembl ies not
only convenient but efficient.
2
II. SYNTAX
A. Introduction
The syntax of a language is the set of rules governing its sentence (or statement) structure.
All assembly and
compiler languages possess a formal syntax.
Formerly, the syntaxes of many languages were strongly influenced by ease of implementation and/or computer
hardware characteristics; they had numerous restrictions and ex.ceptions.
SYMBOL and META-SYMBOL do not
have these I imitations; consequently, they possess a simpler but rllore powerful syntax.
tions and rules to learn because each one is more comprehensive.
There are fewer defini-
In learning them, however, the experienced
programmer is cautioned since, in many cases, a famil iar term (such as lIexpressionll) is redefined with greater
generality.
Proper use of the language is possible only after completely understanding the basic principles.
For convenient reference, the following definitions oppear without illustration.
Unless otherwise specified,
all rules and definitions apply both to SYMBOL and to META-SYMBOL.
B. Characters
c.
z.
1.
Alphabetic character: one of the characters A -
2.
Numeric character: one of the characters 0 - 9.
3.
Alphanumeric character: any character which is either alphabetic or numeric.
4.
Special character: a nonalphanumeric character (such as *, $, +). The character
-Ht{internal 077) is strictly illegal in Meta-Symbol except for use in comments.
Program
A program is a series of one or more symbolic lines, the last of which must contain an END directive.
D. Line
A I ine is the unit in which the assembler processes information much as a card is the proc.essing unit (unit
record) to a keypunch.
Unl ike a card, a I ine is a logical unit, subdivided into four parts, or fields, and may be equivalent to one or
more (physical) unit records.
The four fields that comprise a line are:
operand field, and the comments field.
must always spec ify an operation.
the label field, the operation field, the
With the exception of a I ine consisting entirely of comments, a line
In the latter case, the presence of information in the other fields is at the
programmer1s option.
E. Label Field
The label field labels an operation or a value so that it can be symbolicolly referred to elsewhere.
is accomp! ished by '.vriting a symbol (see G. Lb. i.) in the label field
3
Labeling
F. Operation Field
The operation field may contain a generative, such as a mnemonic machine instruction, or a non-generative,
such as an assembler directive.
A directive, which always appears in the operation field, has three basic functions:
1.
Describe the computer
2.
Describe the assembler
3.
Instruct the meta-assembler
Sections III and IV describe instructions and directives.
G. Operand Field
The operand field of a I ine may contain a sequence or a I ist of one or inore expressions.
1.
List
A I ist is a parenthetically-enclosed sequence of one or more expressions separated by commas.
These expressions, called list items, are elements of the list.
A list may itself be a list item.
As shown below, I ists are most useful in handl ing PROCedures and FUNCtions.
a.
Expression
An expression is a series of items connected by operators (see G. 2.).The processor evaluates expressions by successively combining items, as spec ified by the connecting operator,
in the order of decreasing operator hierarchy.
b.
Items
An item may be one of the following types:
Definition
Item
i. Symbol
Example
A symbol is a string of alpha-
ALPHA
numeric characters, of wh ich
B1
the first character isalphabetic.
X lY
(Cf. VI, also Appendix J.)
ii. Subscripted
A subscripted symbol is a symbol
ALPHA (2)
Symbol
followed by a I ist of one or more
Bl (1, N)
expressions enclosed with in
X1Y (3*N, 4)
parentheses.
iii. Octal Integer
An octal integer is a string of
012
from one to 15 octal digits pre-
01234567
ceded by a (signed or unsigned)
077777777
zero.
4
Item
iv.
Definition
Example
Decimal
A decimal integer is a (signed
12
Integer
or unsigned) string of from one
1234567
to 15 decimal digits, of which
the first is not zero. The legal
range is 247_1 :! N :! _~7.
v.
Decimal
A decimal number is either a
12
Number
decimal integer or a (signed
0.12
or unsigned) string of dec imal
+12.0*+4
digits and one or more of the
(-12.5)*+( -2)*/3
following:
decimal point,
decimal scale operator, binary
scale operator. When an item
has a decimal point but has no
binary scale operator, the item
is of the floating point mode.
vi.
vii.
viii.
Character
A character data string is a
1811
Data String
string of characters (alphabetic,
IX1Y I
numeric and/or special) sur-
10121
rounded by single quotes.
1121
Current
The current location symbol
$
Location
represents the execut ion-t ime
Symbol
value of the location counter.
Subexpression
A subexpression is a paren-
(ALPHA +81)
thetically-enclosed expression
(12+012)
that occurs as part of another
($ +12)
expression.
ix.
Function
A function reference is a symbol
Reference
followed by a parentheticallyenclosed expression list.
The
symbol must have appeared in
the label field of a NAME directive within a function definition
(see IV, N).
5
MAX (X, Y)
2.
Operators
An operator may be one of the following:
Operator
Representat ion
Hierarchy
Boolean
equals
greater than
>
1
less than
<
1
sum (OR)
++
2
difference (exclusive OR) --
2
**
3
+
4
product (AND)
Arithmetic
sum
4
difference
product
*
5
truncated quotient
5
covered quotient
I
II
5
decimal scale
*+
6
binary scale
*1
6
The covered quotient operator,
II,
allb = (a + b -1 )/b.
is defined:
The dec imal and binary scale operators, *+ and
two expressions.
*1,
respectively, may be used to combine any
Where x and y represent two expressions,
x *+y is equivalent to (x) . (lOY)
x *
Iy
is equivalent to (x) . (2 Y)
Note that the nominal binary point of x is to the right of the least significant bit; that is,
these operations use integer, not fractional notation.
Actually, */ functions as a logical shift operator, so that x */y is equal to x right (left)
logical shifted y places, y
<0
(y ~ 0).
tions as an arithmetiC operator for ±x
Hence, because of operator precedence, */ func-
*/y
but not for (-x)
*/y.
The use of operators is illustrated in the example which appears at the end of this section.
H. Comments Field
The comments field of a I ine may contain comments to annotate the program.
The next two sections describe instructions and directives.
each case.
A format defin ition precedes usage description in
The following example illustrates the instruction format·
6
The assembler ignores comments.
Format:
label
[[$]
LABEL]
Operation
Operand
Comments
[*] El [, E2]
LDA
In this example, some of the parameters are enclosed in brackets to indicate that they are optional.
structions must have at least an operation mnemonic and most must have an operand address.
ing (as indicated by E2) and indirect addressing (*) are optional.
All in-
However, index-
Similarly, the label and comment need not
be present; if the line specifies a label, an optional dollar sign preceding the label indicates that it is an
external label (Cf. ~. D.).
As indicated above, the operand field of a I ine consists of a sequence or a I ist of expressions.
Expressions will
be represented by the symbols E, El, E2, . . . ,EN.
The illustration on the following page is a representative (although not typical) META-SYMBOL program that
uses each directive at least once.
7
77777777
OOOOOOO!
00000
00002
00003
00004
00005
00006
00007
00010
00011
00012
00013
00014
00015
00016
00017
00020
00021
00000000
00000001
00000001
00000000
00000003
7.7777776
00000001
77777777
00000000
77777777
37777776
'7777772
00000024
3110375524202002
3110375524202002
00000012
00000010
00000100
00000002
50224321
45426250
23464565
25516325
24606346
60000600
12224321
45426212
23464565
25516325
24t26346
12000102
1
2
3
4
5
6
7
A
8
C
0
E
F
G
8 H
9 I
10 J
t 1 K
12 L
13 M
14 N
15 0
16 PI
17 PIE
18 TEN
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
OED
DATA
-1
I
A=a
A=(-8)
8>A
8
20 PRINTOUT
BCD
21
22
23
24
25
FUNC
NAME
DO
RESULT EQU
RESULT EQU
< BLANKS CONVERTEU TO 012>
THIS FUNCTION COMPUTES THE ABSOLUTE
VALUE OF THE REFERENCE PARAMETER
F
ASS
F(I)
The programmer often needs the capabi lity to incorporate within programs output messages in binary-coded form.
This may be accomplished by subdividing the message into four-character (24-bit) strings and placing them in
the operand field of a DATA directive line.
For greater convenience, however, a TEXT directive is provided
with which the message may be described independently of the word-size of the target computer.
Using the TEXT directive, the programmer places the character string (not enclosed in quotes) in the operand
field and specifies the total message length in one of two ways: in the first, he precedes the character string
by a character count, separated from the string by a comma; in the second, he encloses the character string by
the characters < and >, respectively.
The latter method is more convenient when it is unnecessary to know the
length of the string for other reasons; but the former method is necessary when the charac ters < and/or> wi II
14
appear within the message.
In this case, the value of the expression E must be defined prior to the TEXT line.
In both cases, the message is left-justified within the block of computer words allocated to it.
acter positions always contain blanks (060).
Unfilled char-
Note that TEXT and DATA differ in these two respects.
Example:
Location
Contents
01000
Label
Operation
MSGE
RORG
01000
TEXT
8, BCD INFO
TEXT
DATA
'BCD', 'INFO'
Operand
01000
22232460
01001
31452646
01002
22232460
01003
31452646
01004
22232460
01005
31452646
01006
22232460
TEXT
4, BCD
01007
60222324
TEXT
4, BCD
01010
00222324
DATA
'BCD'
01011
60222324
DATA
' BCD'
Note that the first three lines result in identical code, whereas the last four do not.
The BCD directive is identical to TEXT, except that the 012 character is used for blank.
The normal use of
BCD, therefore, is to generate messages intended for typewriter or paper-tape output, whereas TEXT is used
for a II other devices.
G. EQU (EQUals)
Format:
Label
[$]
LABEL
Operation
EQU
Operand
Comments
E
LABEL COMPULSORY
(E 1, E2, ... , EN)
LABEL COMPULSORY
or
[$]
LABEL
EQU
Since the directives DATA, DED, and TEXT enable the programmer to centralize and label execution-time
data specifications, they contribute to both the readability and flexibility of the symbolic program.
For the
same reasons, it is frequently desirable to specifiy assembly-time data symbolically; or to use "parametric
programming", a techniql1e that is useful whenever a number of symbolic lines are related to one another by
their common dependence upon one or more values.
Using the parametric approach, the programmer labels the
value(s} by an EQU directive and replaces all references to the appropriate value{s} by its {their} symbol ic
equivalent{s}.
15
The EQU directive usually defines a single datum symbolically, as on the first line appearing above. Since
the operand is a general expression, it is possible to pyramid parametric definition. Moreover, any singleor double-precision value may be defined by the EQU directive, whereas in conventional assembly languages,
EQU (or its equivalent) can only define symbolic addresses.
Example:
Label
Operation
ONE
EQU
TWO
EQU
ONE + ONE
WILL CHANGE THE VALUE TWO
PI
EQU
3.1415926535
FLOATING POINT DEFINITION
DED
PI
Operand
Comments
CHANGING THIS DEFINITION
In Meta-Symbol the EQU directive can also define a symbolic list, similarly to the way in which the
DATA directive can define a data block.
Example:
Label
Operation
Operand
SQUARE
DATA
1,4,9
CUBE
EQU
(1, 8,27)
The difference is the way reference is made to list items. If LABEL is the label of a DATA block, then the address of the ith element may be symbolically referred to as LABEL +(i-1). If, however, LABEL is the,label of a
list definition, then the ith list element may be symbolically referred to as LABEL (i). Thus, in the above example,
SQUARE
contains
SQUARE +0
contains
SQUARE +1
contains
4
SQUARE +2
contains
9
CUBE
has the va lue
(1, 8,27)
CUBE (1)
has the va I ue
CUBE (2)
has the va lue
8
CUBE (3)
has the va lue
27
Note that a list definition must always be enclosed in parentheses. Because of this, it is possible to pyramid
list definitions.
Label
Operation
OPl
EQU
3
OP2
EQU
(3)
A
EQU
(1,2)
B
EQU
(3,4)
C
EQU
(A, B)
Operand
16
Comments
OPl IS NOT A LIST
OP2 IS A LIST OF 1 ELEMENT
EQUIVALENT TO ((1,2), (3,4))
The fifth line illustrates the case in which elements of the list are lists themselves. Thus:
C(l) is equivalent to (1,2)
C(2) is equivalent to (3,4), and
C(l)(l), written C(l, 1), is equivalent to 1
C(1)(2), written C(l, 2), is equivalent to 2
C(2)(1), written C(2, 1), is equiva lent to 3
C(2)(2), written C(2, 2), is equivalent to 4
Subscripting to higher levels follows the same rules of parenthetical notation. Lists are primarily useful as
they apply to PROCedures and FUNCtions, and additional list notation and examples are provided within the
sections describing these two directives. In particular, the concepts of list dimension and symbolic redefinition are explored there.
H. OPD (Operation Definition)
Format:
Label
Operation
Operand
Comments
LABEL
OPD
E
LABEL COMPULSORY
OPD is the counterpart for operations of the EQU directive for values.
Example:
Label
Operation
Operand
LOC
EQU
3
LDA
OPD
07600000
LDA
LOC
Comments
GE N ERAT ES 07600003
Thus, wh i Ie the interpretation of the operand fie Id of an OPD Iine is identica I to that of the single-va lued
EQU directive, the reference to an OPD-defined symbol is made in the operation rather than in the operand
field. Encountering a reference to the OPD-defined symbol, the assembler merges (OR, logical sum) the
operation value with the address portion of the operand value. If the second line above had appeared
LDA
OPD
07600010
then the third line would have generated 07600013
OPD is preserved for compatibility with SYMBOL 4/8.
The use of a FORM or a PROC definition
offers greater flexibi Ii ty.
In Meta-Symbol, OPD is implemented by means of a nested PROC definition.
not be used within a PROC.
17
Hence, OPD may
I. FORM (FORM at)
Format:
Label
Operation
LABEL
FORM
Operand
E1, E2, •••, EN
Comments
DESCRIBE FORMAT
It is frequently desirable to pack multiple data within a single computer word. The computer instruction is a
typical example: the computer word is divided into operation, address, index, and indirect address subfields.
In processing symbolic instructions, the assembler recognizes an implicitly specified subdivision format and,
upon translation to binary, packs the instruction accordingly.
The FORM directive enables the programmer to describe completely general computer word subdivisions, and
to invoke them simply.
Example:
Operand
Comments
Label
Operation
DCHAR
FORM
4, 4, 4, 4, 4, 4
DEFINE DECIMAL SUBDIVISION
INST
FORM
1,2,6,15 t
DEFINE INSTRUCTION FORMAT
X2
EQU
2
LDA
EQU
076
LOC
EQU
3
RORG
01000
01000
04432126
DCHAR
1, 2, 3, 4, 5, 6
PAC K 6 DECIMAL CHARACTERS
01001
27600003
INST
0, X2, LDA, LOC
PAC K COMPUTER INSTRUCTION
For SYMBOL, the sum of the operands on the FORM definition line must be equal to the word size {24 bits for
SDS 900 Series Computers}. For MET A-SYMBOL, the sum may range between one bit and twice the word size;
when the sum is not equal to the word size {or twice the word size}, the expressions in the FORM reference
line are right justified in the generated single {or double} data word.
The FORM definition must precede all references to it.
J. RELTST (TeST RELocatability)
Format:
Label
Operation
Operand
L
RELTST
E
tApplicable to META-SYMBOL only.
Comments
900 SYMBOL will not handle an address field greater than 14 bits.
18
A value is assigned to L depending upon the relocatability of E:
Relocatabilityof
Expression E
Value assigned
to L
o
absolute
relocatable
2
common relocatable (blank common)
K. END
Format:
Label
Operation
Operand
Comments
END
E
(END OF PROGRAM, PROC OR FUNC)
The END directive indicates to the assembler the end of a PROCedure, FUNCtion, or of an entire program.
When the END line terminates a PROCedure, any expression in the operand field is ignored and need therefore
not appear.
When the END line terminates a FUNCtion, the operand field serves to return the FUNCtional value to the
functional reference line (Cf., PROC and FUNC).
When the END line terminates a program, the operand field may (but need not) be used to specify the starting
address of the program.
L. DO
Format:
Label
(LABEL)
Operation
DO
Comments
Operana
El
WITHIN PROC, FUNC OR PROGRAM
El [,E2,E3]
WITHIN PROC OR FUNC ONLY
or
(LABEL)
DO
The DO directive provides for conditional and/or repetitive code or value generation based upon the value of
the first expression in the operand field of the DO I ine.
The DO directive is valuable in conjunction with
parametric programming (Cf. the EQU directive), since it enables assembly-time decisions to be made and processed.
19
Normally, the "range" of the DO (the number of successive statements upon which it is active) is a single statement.
When used within PROCedures and FUNCtions, however, its capability is extended for action upon mul-
tiple I ines.
The use of th is capabi I ity is described below.
The simplest use of the DO directive can be illustrated:
Label
Operation
Operand
DO
K
ADD
C
Comments
ACCUMULATE SUM
Encountering this instruction sequence, the assembler generates the ADD instruction K times for K ~ 0, and will
indicate an error for K
°
DO the next E2 lines E 1 time(s), then
sk ip E3 I ine(s).
°
<°
El =
Skip the next E2 I ine(s)
El
Error
When unspecified, the values of E2 and E3 are 1 and 0, respectively, to coincide with the DO that is used externally to PROCedures and FUNCtions.
Note: When counting lines, the assembler includes all symbolic lines including comments lines.
20
Example 1:
DO
3,2
DATA
DATA
1*1
generates:
DATA
DATA
1* 1
DATA
2
DATA
2*2
DATA
3
DATA
3*3
DO
TYPE
DATA
5
DATA
50
DATA
500
DATA
17
DATA
34
Example 2:
If TYPE
If TYPE
< 8,
~
< 8, 3, 2
E1 = 1 and the following is generated.
DATA
5
DATA
50
DATA
500
8, E1 = 0 and the following is generated.
DATA
17
DATA
34
Example 3:
If TYPE
If TYPE
< 8,
~
< 8)
DO
(TYPE
DATA
5*+(1-1)
DATA
17
DATA
34
*3, 1, 2
E1 = 3 and the following is generated.
DATA
5*+ (1-1)
DATA
5*+ (2-1)
DATA
5*+ (3-1)
8, E1 = 0 and the following is generated.
DATA
17
DATA
34
Examples 2 and 3 illustrate why E2 and E3 may be reterred to as the "true range" and "false range,
21
II
respectively.
M. NAME
Format:
Label
Operation
LABEL
Operand
Comments
[E]
NAME
[CALLING NAME]
The NAME directive labelsa PROCedure or a FUNCtion definition, enabling it to be called by a PROCedure
reference line or a FUNCtion reference item.
Just as multiple entries can be created for subroutines, multiple
NM\E I ines can appear within a PROC/FUNC definition. In such cases, it is normally desirable to have the abi I ity
to determine internally by what NAME the PROC/FUNC was called.
Since only values (not names) can be
tested (as, for example, with a DO directive), the programmer may associate different values with the different
calling NAMEs.
This is accomplished by placing different expressions{usually integers) in the operand fields of
the different NAME I ines.
The use of this feature is illustrated under PROCedures and FUNCtions.
The operand field of the NAME line may also contai n an expression list.
In this case, the expression list
must be surrounded by parentheses.
N. PROC and FUNC (PROCedures and FUNCtions)
Format:
Label
Operation
LABEL
PROC
or
FUNC
LABEL
Operand
Comments
INTRODUCE PROCEDURE DEFINITION
INTRODUCE FUNCTION DEFINITION
PROCedures and FUNCtions are bodies of code analogous to subroutines, but which are processed at assembly
time rather than at execution time.
minated by an END directive.
Introduced by a PROC/FUNC directive, the coding sample is always ter-
Used without the DO directive, the PROCedure is similar to the simpler "macro",
in which a single line of code (the reference line) is replaced by one or more lines specified in a macro definition.
Used together with the DO, however, the PROCedure provides a more powerful capabil ity than simple
line replacement.
This capability is illustrated in examples which follow.
The FUNCtion, I ike the PROCedure, is a generator; whereas the PROCedure generates code, and is invoked
by placing its name in the operation field of a I ine, the FUNCtion generates val ues and is invoked by plac ing
its name in the operand field.
The PROCedure or FUNCtion definition must always precede the first reference line.
The follow ing exampl es of an ord inary macro are provided for ill ustrative purposes only.
There is no MACRO
directive in META-SYMBOL.
Label
Operation
Operand
MOVE
MACRO
A,B
LOA
A
STA
B
Comments
MACRO DEFINITION
END
MOVE
C,D
MACRO REFERENCE LINE
22
The macro definition defines an instruction sequence in terms of dummy parameters A and B that appear on the
MACRO definition I ine.
Encountering the MOVE I ine, the assembler generates the LDA, STA sequence, but
replaces the dummy parameters A and B by the reference parameters C and D.
The macro is said to operate on
a "call by name" principle.
The PROCedure operates, on the other hand, on a "call by val ue II basis.
Example:
Label
Operation
Operand
Comments
PROCEDURE DEFINITION
PROC
P
NAME
MOVE
LDA
P(1)
STA
P(2)
END
MOVE
C,D
PROCEDURE REFERENCE LINE
In this case, the reference parameters are named implicitly in terms of the symbol P that appears in the label
field of the PROC I ine.
They are evaluated before the PROC/FUNC is processed, and it is only these values,
not their names, that can be determined within the sample.
OP
If the PROCedure reference I ines were:
E 1, E2, . . . , EN
then the correspondence between the symbol P and the parameters El, E2, . . . , EN exists as though the reference I ine had been:
P
EQU
(E 1, E2,
EN)
Thus,
P(1) has the value El
P(2) has the val ue E2
P(N) has the value EN
Note that the reference parameters constitute a I ist even though they are not enclosed in parentheses.
If any of the parameters El, E2, . . . , EN is in turn a I ist, the elements can be referred to by subscripting
further the symbol wh ich appears in the PROC line.
Example:
Q
PROC
OP
NAME
PROC DEFINITION
END
OP
(A, (B, C), (D, (E,F)))
PROC REFERENCE
23
This reference I ine contains only one operand, viz., Q.
Thus,
Q
(A, (B, C), (D, (E,F))))
I ist of one element
Q(l)
(A, (B, C), (D, (E, F»)
I ist of three elements
Q(l,1)
not a I ist unless A is
A
Q(l,2)
I ist of two elements
(B, C)
Q(l,2,1)
B
not a I ist unless B is
Q(l, 2, 2)
C
not a I ist unless C is
Q(l,3)
I ist of two elements
(D, (E, F»
Q(1,3,1)
not a I ist unless D is
D
Q(l, 3, 2)
I ist of two elements
(E, F)
Q(l, 3, 2, 1)
E
not a I ist unless E is
Q(l,3,2,2)
F
not a I ist unless F is
It is frequently desirable that the PROC/FUNC defin it ion be written without restricting the I ist structure of the
PROC/FUNC reference I ine, although the I ist structure of the reference I ine must be determinable within the
definition.
Notationally, this problem is resolved by the convention that, if L is the name of a list, then: L
has the value lithe number of elements in the list L".
:Q
=1
:Q(l)
=3
:Q(l, 1)
=0
:Q(1,2)
=2
:Q(l,2,1)
=0
:Q(l, 2, 2)
=0
:Q(l,3)
=2
:Q(l,3,l)
=0
:Q(l, 3, 2)
=2
:Q(l, 3, 2, 1)
=0
:Q(l, 3, 2, 2)
=0
Thus, in the above example:
In general, there are two additional quantities of interest with in a procedure: the identity of the operation on
the call ing (reference) I ine and the know ledge whether any of the reference operands was indirectly addressed.
24
Example:
Label
Operation
Operand
Comments
P
PROC
LOA
NAME
076
900 SERIES LOAD/STORE
LOB
NAME
075
INSTRUCTION SET
LOX
NAME
071
STA
NAME
035
STB
NAME
036
STX
NAME
037
INST
FORM
3,6,1,14
INST
P(2), P(O), P(* 1), P(1)
END
LOA
100
GENERATES 07600144
STA
*0200,2
GENERATES 23540200
The above exampl e illustrates how several reference I ines may invoke the same PROCedure.
In the first case,
the INST Iine wi II generate an 076 for the six-bit instruction code, since the operation field on the call ing line
corresponds to the label field of the first NAME line, which, in turn, contains the value 076 in its operand
field.
For the same reasons, the INST line generates an 035 for the six-bit instruction code of the STA line.
The correspondence is establ ished via the subscripted symbol P{O), wh ich stands for the va lue on the NAME
line whose label field agrees with the operation field of the reference line.
The examp Ie a Iso illustrates how a procedure may determi ne whether or not a reference parameter was indirectlyaddressed:
If the reference parameter P{i) was indirectly addressed (preceded by an asterisk), then the
item P{*i) wi" have the value 1; otherwise, P{*i) wi" have the value O.
Moregenera"y, ifP{E1,E2, .•• ,EN) is a subscripted symbol, then the subscripted symbol flag corresponding to
this item, written P{E1, E2, .•• , *EN), has the value 1 if an asterisk preceded the expression that defined this'
item.
Otherwise, the subscripted symbol flag has the value O.
Note that the subscripted symbol flag corre-
sponding to an element is notationally indicated by an asterisk preceding the last subscript of the element.
Normally, the programmer does not have to make this identification.
The MOVE PROCedure, for instance,
generates correct code regardless of whether one or both of the reference parameters is indirectly addressed.
This is true because the MOVE PROC invokes the LDA/STA PROC, which does make the determination. Since
a" META-SYMBOL instructions are defined by PROCs, indirect address determination by the programmer is
necessary onl y when he uses non-mach ine instructions defined by himself.
Note the imp Iication that PROCs
may be defined and/or called within other PROCs, which is illustrated in the third example below~
25
Example:
Operation
Operand
LOAD
OPD
07600000
STORE
OPD
03500000
P
PROC
MOVE
NAME
Label
DO
P(*l), 1,1
LOAD
* P( 1)
LOAD
P(l)
DO
P(*2), 1, 1
STORE
*P(2)
STORE
P(2)
Comments
END
In this example, indirect address determination is necessary because LOAD and STORE are defined by OPD and
not by instruction PROCs.
By the above means, all the attributes of the operation and operand fields at the
reference line can be determined and tested within a PROC.
It is also useful to operate within procedures on
the contents of the label field of the reference line.
Example:
It is desired to define two procedures, one a BSS (Block Started by Symbol) PROC, and one a BES (Block Ended
by Symbol) PROC:
Label
Operation
P
PROC
BSS
NAME
BES
NAME
Comments
Operand
0
DO
P(0),2, 1
DO NEXT 2 FOR BES
RES
P(l)
RESERVE P( 1) LOCA nONS
$
RES
0
THEN DEFINE SYMBOL
$
RES
P(l)
BSS IDENTICAL TO RES
END
RORG
o
LABEL 1
BSS
LABEL 1= 0, BUT
LABEL 2
BES
LABEL 2=2
Normally, when the reference label is not manipulated within the PROCedure, it is equated to the value of
the location counter when the PROCedure is called.
A lone dollar sign placed in the label field of a line
within a PROC, however, has the effect of "postponing" the definition of the reference label from the beginning of the PROC to the processing of the $-Iabeled line.
the label field of a symbolic line.
26
In no other case can a dollar sign appear alone in
The followi ng examp Ie illustrates an interesting use of th i s feature in a nested PROC. The examp Ie, wh ich is the
OPD PROC as it actually appears in the system, shows again how a PROC may be used to si mulate a directive.
Label
Operand
Operation
P
PROC
OPD
NAME
A
EQU
P( 1)*/( -21 )**7
B
EQU
P( 1)*/( -15)**077
C
EQU
P( 1)*/( - 14)* * 1
D
EQU
P( 1)**037777
Q
PROC
1
$
NAME
(A,B,C,D)
Z
EQU
Q(O)
FORM
3,6,1,14
DO
Z(4)=0, 1, 1
Z( 1)++ Q(2), Z(2), Z(3)++Q(* 1), Q( 1)
Z( 1)++Q(2), Z(2), Z(3)++Q(* 1), Q( 1)++Z(4)
END
END
When an OPD line is encountered, the OPD PROC is processed, resulting simply in the definition of another
PROC, which takes its NAME from the label field of the OPD line.
This PROC in turn is processed when its
reference Iine is encountered.
There is one restriction on the nested PROC: All NAME lines in the internal PROC must be rendered external
by the appearance of a "$" alone or preceding the symbol in the label field, therefore, PROC definitions may
be nested only one level.
The example also illustrates a use of a one-pass PROC, conveyed to the assembler by the appearance of the
value 1 in the operand field of the PROC line.
When, as in the preceding examples, the operand field of the
PROC line is vacant, the assembler performs a two-pass "assembly" on the PROC when the reference line is
. encountered.
otherwise.
This is necessary whenever a PROC contains an internal forward reference, but unnecessary
For example, the following PROC can be changed to a "PROC 111 only if the reference to the sym-
bol A is replaced by a reference to $+2.
Label
P
Operation
PROC
SUM
NAME
Operand
Comments
BRU
A
BRANCH AROUND RESULT
DUMMY
RES
o
LABE L RESU LT WITH
$
RES
A
LDA
P( 1)
DO
:P-1
ADD
P{I+ 1)
STA
DUMMY
REFERENCE LINE LABEL
SUM REFERENCE PARAMETERS
STORE RESU LT
END
27
Since FU NCtions onl y generate va Iues, and do not influence storage a Ilocation, they are a Iways processed in
one pass.
Because of the flexible list structure, it is possible to write very general PROCedures and FUNCtions where
the operands can be indexed and/or indirectly addressed.
They may, in addition, be literals (Cf. 'Yl.. C) as the
following example illustrates:
Label·
Operation
P
PROC
ATANF
NAME
Comments
Operand
DO
: P( 1) =0, 1, 1
LDF
P(l)
LDF
P{ 1, 1), P{ 1, 2)
BMA
ATAN
DO
: P( 2) =0, 1, 1
PZE
P(2)
PZE
P{2, 1), P{2, 2)
END
ATANF
(* ARGS, 2), = 1. 0
The code generated by the PROC reference line is equivalent to:
LDF
*ARGS,2
BMA
ATAN
PZE
=1.0
It can be inferred from this example that PROCedure/FUNCtion NAMEs are defined externally to the PROC/
FUNC sample.
However, no symbols appearing on other than NAME lines are defined externally unless they
are preceded by a dollar sign.
Similarly, any PROC/FUNC may refer to symbols defined externally to it. In
cases of conflict (where the same symbol isdefined both externally and internally with respect to a PROC/FUNC
sample), the ambiguity is resolved in favor of the innermost (internal) definition level.
However, this conven-
tion applies only within the sample, and cannot affect the reference line.
Example:
Label
Operation
Operand
Comments
3
X
EQU
P
PROC
LOADX
NAME
X
EQU
2
LDX
P{ 1), X
PROC DEFINITION
END
LOADX
X
PROC REFERENCE
28
The PROCedure reference I ine wi II become LDX 3,2.
The writing of FU NCtions follows the same rules as PROCedures except that:
1.
The FUNCtion call occurs in the operand field of the reference line and not in the operation
field.
2.
The function generates a value-not code -and only nongenerative lines may be used within
FUNCtions.
3.
The reference label symbol, $, has no meaning within a FUNCtion.
Example: The following FUNCtion will determine the maximum or the minimum of two given arguments.
Label
Operand
Operation
F
FUNC
MAX2
NAME
MIN2
NAME
o
DO
F(O)--(F( l)0 1(
l::
i
::;t
h:-:t
k:::
-I-
ut M 0 V E
:::/ L
lll!iiil( : : : : : : il::III
0 C
I
:
1 ,
:
:iii
34
:
I :
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
c.
Literals
Format:
Operation
Label
[£$]
LABEJ
OP
Operand
Comments
=E
OPERAND SPECIFIED BY VALUE, NOT NAME
In a typical program, machine instructions serve two basic purposes: they operate on variables and on constants.
When operating on variables, the location of the variable is important, but its value is unknown until
tested.
When operating on constants, the converse is generally true in that only the value of the operand is
important.
Symbol ic programming facil itates the representation of both types of operation.
Operands of the first category
(variables) can be given symbol ic names (such as X, ALPHA, etc.), and can be referred to by these names
throughout the symbol ic program.
For operating with constants, however, it is generally desirable to refer to
the constant by value rather than by name; literals provide this capability.
In order to use literals, the programmer writes the value of the expression, rather than a name, in the operand
field of the symbol ic I ine, and precedes the expression by an equals sign (=).
Detecting the leading equals
sign, the assembler computes as usual the value of the expression that follows, but it then stores this value in
a literal table which it constructs following the program.
The address portion of the generated instruction is
then made to refer to the literal table entry rather than to contain the value of the computed expression.
Examples:
Location
Contents
Label
00144
TENS
Operation
Operand
RORG
100
LDA
=010
00144
07600152
00145
07600153
LDA
=10
00146
07600154
LDA
='10'
00147
07600155
LDA
=TENS
00150
07600156
LDA
=010*/15+TENS+l0
00151
07600152
LDA
=1*8
END
00152
00000010
00153
00000012
00154
00000100
00155
00000144
00156
01000156
As shown in this example, the processor detects the multiple equal values (010=1*8) and enters them only once
into the literal tabl e.
35
D. External Definitions and References
One of the most powerful features of SYMBOL and META-SYMBOL is the provision for separate assembly of
interdependent programs.
This feature not only permits programs to refer by name to standard library programs
such as subroutines, but it also allows large programs to be segmented, without in either case shifting the burden of memory allocation to the programmer.
As a result, considerable economies accrue both in reduced
assembl ies and in debugging.
Symbol ic inter-program communication is achieved by means of external labels.
local} labels in that they are defined only internally to a program.
Most labels are internal {or
This means that the assembler recognizes
a symbol ic reference in the operand field of a I ine only when the symbol is defined elsewhere in the program
by its appearance in the label field of a I ine.
When a symool ic reference cannot be satisfied within a program,
references to the symbol are said to be external references {that is, the symbol is assumed to be defined within
some context external to the program in which the symbol ic reference occurs}.
The counterpart of the external reference is the external definition; a symbolic definition is made external by
preceding it by a dollar sign {$}.
The programmer may establ ish an external definition either on the I ine that
defines the symbol, or on a subsequent I ine.
In the latter case, where the entire I ine is simply an external
definition line, it is possible to define additional symbols as external by listing them following the first symbol.
Although additional dollar signs are not required, commas must separate one symbol from another.
External references may appear only in the address field of an instruction or FORM reference line.
External
definitions and references are restricted to six characters in SYMBOL and to eight in META-SYMBOL.
Rela-
tive external references (e. g., Symbol±n) are not permitted.
Example:
Label
Operation
Operand
Comments
X
EQU
01000
ADDRESS OF DATA
$START
LDA
X
BRM
SIN
STA
SINX
LDA
X
BRM
COS
STA
COSX
$SINX
DATA
$COSX
DATA
o
o
END
START
SIN
DATA
o
SIN ENTRY
COS
DATA
o
COS ENTRY
EXTERNAL REFERENCE
EXTERNAL REFERENCE
EXTERNAL DEFINITION
EXTERNAL DEFINITION
$SIN,COS
END
RENDER DEFINITIONS EXTERNAL
36
The above example illustrates both methods of external definition.
make SINX and COSX external.
In the first program, their definition lines
In the second, SIN and COS are made external after their definition.
As indicated above, program segmentation may be useful for maintenance or debugging reasons.
Segmenting
can also be used to fac il itate the assembl y of programs wh ich contain large numbers of symbols.
For espec ially
large programs, the situation may arise that the number of symbols used in a program overflows the capacity of
the assembler1s symbol table (approximately 250 symbols for a 4K 900 Series SDS Computer).
In this event,
segmentation can be accompl ished mechanically in the following manner:
1.
The program is divided into as many physical segments as desired.
Each of these segments
is separately assembled.
2.
A set of external definition lines is prepared from the external reference lists output at
the end of each assembly listing. Relative external references are eliminated.
3.
The set of external defin ition I ines is dupl icated for each program segment and included
before each END card.
4.
The program segments are reassembled.
The loader can now fulfill all external references.
To communicate external definition and reference information to the loader, the assembler outputs the former
prior to the binary output (called "text") and the latter following the text.
The external definition table con-
sists of the alphanumeric symbols accompanied by their (relocatable or not) binary values.
Each entry in the
external reference table consists of the alphanumeric symbol accompanied by the (relocatable or not) binary
address of the last location in which the external reference occurred.
The address portion of that location
will point, in turn, to (contain the address of) the last previous location where an external reference was
made to the same symbol.
The chain terminates when the address portion of an· instruction contains O.
Example:
Location
Contents
Label
Operation
00100
Operand
ORG
0100
LOA
X
00100
07600000
00101
07500000
LOB
Y
00102
03500101
STA
Y
00103
03600100
STB
X
00104
07600103
LOA
X
00105
06400104
MUL
X
00106
03500107
STA
XSQ
00107
00000000
DATA
0
END
START
00105
X
OOi02
y
START
XSQ
37
". Consulting the external reference information, which appears following the END line on the assembly listing,
the programmer can easily find all references to the external label by threading his way backward through the
listing.
As a result, octal corrections for undefined symbols can be made more reliably than with conventional
assemblers.
However, octal corrections are seldom required, since it is simpler to assemble a separate "pro-
gram II consisting solely of I ines to define the symbols.
E. Relocat ion
Particularly because of program segmentation capabil ity, it is normally desirable to assemble a. symbol ic program without being required to allocate the program to any particular memory area or starting location. When
a program is written such that it can be executed independently of its origin (that is, independently of where
it is physically located within the computer), the program is said to be relocatable.
All instructions are relo-
catable that are not affected by an AORG directive (see IV. B. ).
All decimal and octal numbers are clearly non-relocatable.
Assuming the absence of an AORG directive, all
symbols, however, are relocatable that are not equated to a non-relocatable expression by an EQU directive.
As a symbol, $ is always relocatable.
When an expression consists of at least one reiocatable item, the expression is:
1.
Relocatable if R, the sum of the added relocatable items minus the sum of the subtracted relocatable items, is equal to 1, and non-relocatable if R=O.
2.
Illegal if RIO, 1 or if the expression involves any operations other than addition and
subtraction upon two relocatable items.
Example:
Label
Operation
R1
DATA
0
R2
DATA
0
NON
EQU
A
EQU
R1+R2
ILLEGAL
B
EQU
R1-R2
NO N- RELOCA TABLE
C
EQU
R1+NON
RELOCATABLE
D
EQU
Rl*NON
RELOCATABLE
E
EQU
Rl*Rl
ILLEGAL
Operand
Comments
END
The assembler provides relocation information in the text section of the binary output.
Detecting a relocation
flag for any instruction, the loader adds a bias (the loading origin) to the address portion of the instruction.
Further details concerning the binary format are available in Appendix K.
38
F. Concordance Listing
The 900 Series META-SYMBOL system has been extended to include an optional program concordance listing.
The option is selected by the presence of the parameters CONC or EXCP in the MONARCH METAXXXX control message.
The use of CONC results in a standard concordance being generated; the use of EXCP results in
a concordance being generated with exceptions from the standard.
The exceptions from the standard concord-
ance must be specified on INCLUDE or EXCLUDE cards.
The standard concordance includes all symbols that occur in the user1s program except:
1.
Operation codes.
2.
Symbols appearing as part of a function or procedure sample unless the symbols, including procedure or function names, are available for reference by code not occurring within any PROC or
FUNC.
The format of the concordance listing is
T DLN SYMBOL RLN RLN RLN RLN RLN
where:
T i s th e symbo I type code:
Interpretation
Code
A
absolute
R
relocatable
*
undefined
$
externally defined
0
operation code
L
list
DLN
is the line number of the definition.
SYMBOL
is the user1s symbol.
Symbols are Iisted in alphanumeric sort sequence with the collating
sequence:
1\ (blank),
RLN
0 through 9, A through Z,\
are the I ine numbers on which the symbol is referenced.
Reference line numbers appear in
ascending sequence for each symbol.
Whe'1 a concordance is to be generated with the exceptions from the standard, the user must supply INCLUDE
and/or EXCLUDE records specifying the exceptions.
by an end-of-fi Ie record,
(The INCLUDE and/or EXCLUDE records must be followed
.6EOF.)
39
\ EXCLUDE records must precede the INCLUDE records.
/\EXCLUDE/\SYM, SYM, SYM,
••• I
I'JNCLUDE/\SYM, SYM, SYM,
••• I
The format of these records is:
or
/\EXCLU DE/\ * ALL/\
/\INCLUDE/\ *ALL/\
where
/\
represents one or more blanks.
SYM
represents:
1.
Note that /\ is the only legal terminator.
In the case of EXCLUDE, the specific symbols to be excluded from the
concordanc e.
2.
In the case of INCLUDE, the specific symbols to be included in the concordance
(this enables the user to specify symbols that would not be included in a standard
concordanc e).
*ALL
specifies:
1.
In the case of EXCLU DE, no symbol is to be I isted unless it appears on a subsequent INCLUDE.
2.
In the case of INCLU DE, every symbol in the user's program is to be I isted regardless of where it appears in the code unless it is present on a previous
EXCLUDE.
If a symbol is both excluded and included, the exclusion takes precedence.
Examples:
/\EXCLUDE/\ P, X2, XO, A, B, LDA/\
/\INCLUDE/\ *ALL/\
,0.EOF.
In this case all mnemonic codes, labels, and symbol references will be listed except those indicated by the
EXCLUDE record.
/\EXCLUDE/\ *ALL/\
/\INCLUDE/\ BRX, LDX, STX/\
,0.EOF.
This would result in only three symbols (BRX, LDX, and STX) appearing in the concordance.
40
The concord6nce subroutine takes the exception records from the symbolic input device.
unit assigned as X2 is available as a scratch tape.
tape Xl.
It is assumed that the
The user1s program is scanned from the intermediate output
The concordance is produced on the device assigned for listing output. All assignments must be
made prior to calling META-SYMBOl.
G. System Procedures
The user is not restricted as to the number of system procedure decks he may have in the procedure library
on the system tape.
He is free to add specialized procedures to the META-SYMBOL library either as modifica-
tions to an existing system procedure deck or as an entirely new segment on the MONARCH or MONITOR system tape.
Since system procedures are handled somewhat differently than procedures occurring in the user1s program,
caution must be exercised in putting a group of user procedures with the standard system procedures for a given
machine.
For instance, system procedures are selectively loaded by the Preassembler.
Therefore, if a new sys-
tem procedure is to use any of the other system procedures, it must precede those other procedures in the system
procedure deck.
Also, only the parts of the system procedure deck that are within the scope of procedure lines
are processed by the Preassembler.
Thus, whi Ie a simple FORM definition Iine, external to all the procedures
usi ng it, wi II suffice at the user-program level, such a FORM must be i nterna I to all these procedures at the
system-procedure level.
Also, a name line in a system PROC may not have a list in the operand field.
MONARCH
Each system procedure is inserted on the MONARC H tape between PREASSEM and SHRIN K.
It must be preceded
by its 62 MONARCH identification record and its machine series identification record.
The MONARCH ID record has the following format:
~2
PROCXXXX
Column
Contents
6 {delta}
2
2 {identifying a level 2 record}
3 - 8
Blank
9 - 16
The letters PROC occupy columns 9 through 12.
The four alphanumeric charac-
ters that identify the procedure occupy columns 13 through 16.
These four
characters are used in place of XXXX in a MONARCH METAXXXX control
message.
17 - 25
Blank
26 - 72
Comments
Blank is a terminator.
41
The machine series identification record consists of a 2-word, encoded record of the following configuration:
12 f
11
I
I
I
I
I
I
I
0
1
2
3
4
5
6
7
8
9
I
I
I
I
I
col
80
2 3
Column
Row
Contents
12
Punched if the object code is to be run on a 9300 Computer.
Not punched if the object code is for a 900 Series mach ine.
2
11 - 0
Blank
1- 6
Word count (Th is value is always 2, indicating a 2-word record.)
7 - 9
Punched to indicate an encoded card.
12 - 9
Checksum for the card.
(Each row contains the opposite - punch or non-punch
- of the same row in column 1.)
3 -72
Blank
Example:
To add the procedure deck, labelled CUBE, for 9300 machines to the META-SYMBOL system procedure library,
the user must prepare an encoded deck for the procedures, a MONARCH level 2 ID record:
r
fOCCUBE.
column 9
column 1
and the mach ine series identification record:
12
/I
I
I
I
I
I
I
11
o
1
2
3
4
5
6
I
7
I
I
8
I
9
I
~~--------------------------------------------------~
2 3
col
80
42
The procedure is inserted on the system tape via the System Update Routine (see the SDS MONARCH Reference
Manual, publication number 90 05 66). It is called into core with a MONARCH control message:
6METACUBE
Pl' P2' P3' P4' P5' P6 .
See the MONARC H Reference Manual for an explanation of the parameters for th is control message.
MONITOR
Changing a MONITOR system tape is the function of System-Make, a free-standing program.
System-Make is contained in SDS Library Program, Catalog Number 860692.
43
A description of
VI. COMPATABILITY: SYMBOL/META-SYMBOL
The preceding sections described the programming language as though it were identical in SYMBOL and METASYMBOL. Actually, META-SYMBOL requires a larger hardware configuration than SYMBOL, and SYMBOL
does not therefore include all of the features of the meta-assembler.
Aside from the lack of PROCedures and
FUNCtions, these differences are slight, and it is entirely possible to write programs in a common subset of the
language.
The differences between SYMBOL and META-SYMBOL are:
1.
In META-SYMBOL, symbols may be from 1 to 15 characters in length.
External definitions
may not exceed 8 characters in length.
In SYMBOL, no symbol may exceed 6 characters in length.
>, =,
2.
Symbol does not include the Boolean operators
3.
SYMBOL does not inc lude PROCedures and FUNCtions.
and
<.
Therefore, it does not inc lude the
following di rectives:
PROC
FUNC
NAME
DO
It also does not include lists (Cf. IV. G.).
4.
In SYMBOL, the sum of the expressions in the operand field of a FORM definition line must
be equal to the number of bits in a single computer word.
In META-SYMBOL, the sum may
have any value between 1 and twice the word size (in bits).
Double precision is also ex-
cluded in literals and as operands of a SYMBOL EOM line.
5.
In META-SYMBOL, but not in SYMBOL, an OPD line may override a system definition.
44
VII. COMPATIBILITY: 92 SYMBOL/META-SYMBOL
92 SYMBOL is a 1-pass assembly program for the SDS 92.
It operates on a minimal SDS 92 with 4K memory
and a Teletype, model 35ASR, and processes a language which is very similar to SYMBOL and META-SYMBOL
for other SDS computers.
For this reason, the 92 SYMBOL language will be defined in terms of compatibility
with META-SYMBOL.
A. Symbols
A symbol is a string of from one to eight alphanumeric characters of which the first is alphabetic.
Operation
symbols (instruction mnemonics, directives, etc.) are restricted to four characters.
92 SYMBOL provides for the definition, and possible subsequent discarding, of local symbols which retain
value only within a certain region of the program.
(See B.3, below.) A local symbol is a symbol preceded by
the character \ (internal code 076); for example:
\ TEMP 1
The current location counter, indexing, indirect addressing, and literals (which are immediate) are indicated
as in 900 Series/9300 SYMBOL.
B. 0 irect iv es
Data Generation
Assembler Instruction
DATA
AORG
TEXT
RORG
BCD
RES
DO
Value Declaration
REG
DEF
EQU
REF
FORM
PAGE
OPD
END
1.
DED and floating-point items are not implemented.
2.
The DO directive is used to process a line a given number of times.
The expression in the
operand field indicates the number of times the line is to be processed.
45
3.
REG is used to declare the beginning of a local symbol region.
tered, all currently defined local symbols are discarded.
When this line is encoun-
New local labels may now be de-
fined which will not conflict with previous local symbols.
Example:
RORG 0100
TEMPl
RES 1
TEMPl is a valid symbol.
\TEMPl
RES 1
\ TEMPl is a local symbol and is
distinct from TEMP1.
\ TEMPl
REG
All previous local symbols purged.
RES 1
\ TEMPl redefined as present location counter, a value which it will
retain unti I next REG directive.
4.
DEF is used to dec lore external symbols.
operands.
The symbols to be made external are Iisted as
All such symbols must have been previously defined, non-local symbols.
The
DEF line is analogous to the $ line in META-SYMBOL.
Example:
Label
Operation
Operand
ALPHA, BETA
DEF
as opposed to
$ALPHA, BETA
in META-SYMBOL.
5.
REF is used to declare explicitly external references.
All external references and undefined
symbols are published at the end of the assembly; undefined symbols are preceded by a U
diagnostic.
The REF line must precede the first external reference.
Example:
Label
Operation
Operand
ALPHA, BETA
REF
46
6.
The OPD directive has two operands separated by commas.
The second operand may have
the value 6 or 12 to define the field size in which the OPD is effective.
Second Operand
Interpretation
6
The OPD-defined symbol is treated similarly to
a computer instruction (e.g., LDA).
12
The subsequent reference line causes a 12-bit,
single word to be generated.
The value of the
OPD definition line is added to the value of the
reference I ine operand.
The OPD definition line must precede all references.
local symbol definition.
7.
All OPD lines must precede the first
An OPD line may not override a system definition.
The syntax for TEXT and BCD lines is
character count, string
TEXT/BCD
The option
TEXT/BCD
is not implemented.
8.
PROC, FUNC, NAME, FORT2, FORT4, DISP, INHD, SUPR, INHS, MARK, SBRK, REL TST,
and SIOR are not implemented.
9.
All other directives are implemented as in META-SYMBOL.
The sum of the operands on a
FORM line must equal 12.
c.
Express ions
The operations =, >, <, ++, --, **, +, -, */ are implemented, and occupy the same relative hierarchy, as in
META-SYMBOL.
The operations *, /, / /, *+ are not implemented.
Examples:
A
EQU
TYPE>O
\A
EQU
A--O**A
47
Parenthetical expressions are not allowed.
D. Instruction Generation
The typical instruction line may be represented as
ITabeTI
operation
[*]
operand 1 , [?perand
~
where the brackets denote "optional." If the value of the first expression is absolute, greater than zero, and
less than 32, the address is considered to be a Scratch Pad address (unless a literal was indicated).
If the value of the second expression is not zero, indexing is applied.
In this case, the address may not indi-
cate a literal.
If the first operand is a symbol (not an expression composed of a symbol plus one or more items connected by
operations), and the symbol has not been previously defined, the reference will be treated as a forward or external reference. A 2-word instruction will be generated.
The value of the address will be determined when
the program is loaded.
Relative forward or external references are not permitted except when they are relative to the location counter
symbol ($), such as BRU $+5.
The instruction mnemonics recognized by 92 SYMBOL are those provided in the SDS 92 Instruction list
(Appendix E) plus the EOM/SES instructions that address the typewriter/keyboard, paper tape reader/punch,
and card/reader punch.
The mnemonics for magnetic tape and other devices are not recognized.
The syntax
for SDS 92 device EOMs and SESs is identical to that for the corresponding 900 Series/9300 operations (see
Appendix G) with the exception that no channel designation is required, and an asterisk does not denote interlace.
Example:
RPT 1, 1
Read paper tape unit 1 in 1-character mode (EOM 02104)
CRT
Card reader 1 ready test (SES 012106)
For programming convenience there are two additional instruction mnemonics NOP (No Operation-07340) and
XAB (Exchange A and B- 03040).
E. Remarks
Although the assembler's space requirements are modest, table overflows can occur in a minimal configuration
whenever many and/or long symbols are used. Short symbols and local symbols are to be encouraged to alleviate
overflows.
Because 92 SYMBOL is a 1-pass assembler, forward references are "chained" on the assembly I isting and binary
output and are satisfied at load time.
This means that the address portion of an instruction involving a forward
48
reference will not, after loading, correspond to the assembly Iisting.
used as sparingly as possible.
Therefore, forward references should be
A good programming practice is to allocate all data at the beginning of the pro-
gram and to use forward references only in branch instructions.
Relative forward references are not permitted in any case except where they are relative to the current location counter ($).
49
VIII. OPERATIONAL PROCEDURES
A. Error Flags
Certain errors are detected by the assembler and are indicated, during the listing of the program, by special
symbols.
These symbols appear at the left-hand margin of the output listing, preceding the instruction that
contains the error{s}.
Errors, flagged in this manner, do not cause the assembler to terminate the job.
Interpretation
Symbol
*
External address reference.
D
1.
Duplicate definition of a main program symbol.
2.
Multiple use of a variable name within COMMON statements.
1.
Operand field expression error.
2.
Directive syntax error.
E
3.
{Mayor may not be an actual error.}
Examples {not exhaustive}:
a.
TEXT - if the first symbol is a value and the second symbol is not a comma.
b.
DO - more than one expression or improper nesting.
c.
END - external reference in END line.
Procedure syntax error.
Exampl es {not exhaustive}:
a.
LDX, BRX, STX - no index field given.
b.
Shifts - indirect addressing.
F
Illegal forward references in directive.
G
Generative code in function.
Unknown operation code {on 900 Series Computers all POP's are flagged with an I}.
L
1.
III egal label (special characters).
2.
Exceeding PROC or FUNC level.
M
Improper use of SBRK or DISP.
N
Missing END line.
P
Exceeding maximum parenthesis nesting I eve!.
R
1.
Primitive relocation error.
2.
Use of relocatable address in extended mode I/O procedure calls other than lORD,
May occur during use of function.
See .Appendix V section E of reference manual.
10RP, 10SD, IOSP, IOCT.
T
U
1.
Truncation.
Attempt to use a value exceeding the capacity of the specified field.
2.
Request COpy not available in hardware.
1.
Undefined symbol used in manner which does not all ow possibil ity of external reference.
2.
Use of labeled common name in directive or procedure other than COMMON.
Notes:
1.
Error and MARK flags generated within PROCs may appear in three possible places:
a.
On call I ine if generated during pass 1 of a 2-pass procedure.
b.
On the next generated line.
c.
On a blank line following the procedure if no generative line follows error.
50
2.
Labels appearing on PROC reference lines are not defined until the end of the PROC.
This is necessary to mechanize the lone $ feature. Therefore, if such a label is doubl y
defined, the 0 flag will be printed on a blank line following the procedure.
3.
Machine instructions (LOA, etc.) are procedures.
B. META-SYMBOL Error Messages
9300 COMPUTERS
The 9300 META-SYMBOL abort messages are of the form
! META ERROR a xx
where a indicates which overlay segment of the assembler was last loaded:
a
Interpretation
E
Encoder
P
Preassembl er
A
Assembler
xx identifi es the type of error:
xx
Interpretation
01
Insufficient space to complete encoding of input.
02
Corrections to encoded deck but encoded input file is empty.
03
End of file detected before an end card while reading encoded input.
04
Insufficient space to complete preassembly operations.
05
Insuffici ent space to compl ete the assembl y.
06
Data error.
07
Requested output on a device which is not available.
08
Correcti ons out of sequence.
09
End of file detected by ENCODER when trying to read intermediate tape Xl.
10
Request for non-existent system procedures.
11
Byte larger than dictionary (bad encoded deck).
12
Not encoded deck.
13
Checksum error reading system tape.
14
Preassembler overflow (ETAB).
15
Not used.
16
Data error causing META-SYMBOL to attempt to process procedure sample beyond end of table.
17
Shrink overflow.
18
Improperly formatted or missing PROC deck series-specification card.
19
End of fi I e encountered wh i I e readi ng system procedures.
20
Irrecoverable error in attempting to read Xl or X2.
21
Symbol tabl e overflow.
22
Abnormal condi ti on (probobl y end of tape) on X2.
META-SYMBOL does not recognize the data as anything meaningful.
Try using ISET I option in META Control Card.
51
xx
Interpretati on
23
End of file on Xl.
24
Input is not encoded.
25
Checksum error on encoded deck.
26
End of file on Xl.
27
Irrecoverable error in attempting to read INCLUDE, EXCLUDE, or SI.
28
Irrecoverabl e error in attempti ng to read X2.
29
Both SI and EI were specified on the META card, but the first card of EI does not have a + in
column 1 (i.e., is not a correction card).
Note that an empty SI file (a ~EOF only) will not
cause an error 29 abort.
30
The first SI card is a + card, but no EI parameter appears on the META card.
31
No SI or EI parameter has been specifi ed on the META card.
For example, an improperly nested DO pair would cause the printout
!META
ERROR
A
06
900 SERIES COMPUTERS
The standard abort message for 900 Seri es Computers is
MET A-SYMBOL
ERROR
xx
where xx has any of the val ues 01 through 19 as described above for 9300 META-SYMBOL.
For both 9300 and 900 Series Computers errors 05, 06, and 16 are accompani ed by a printout that shows the
value of certain internal parameters at the time of the abort:
LINE NUMBER
yyyyy
BREAK1
yyyyy
LOCATION COUNTER
yyyyy
UPPER
yyyyy
LOWER
yyyyy
BREAK
yyyyy
SMPWRD
yyyyy
LTBE
yyyyy
LTBL
yyyyy
\ second pass only
(yyyyy represents the value of the particular item.) The last six of these are useful in determining the
nature of the assembly overflow and are defined in paragraph E of this section. After the appropriate message
has been typed, control is transferred to the system Monitor.
52
9300 I/O ERROR MESSAGES AND HALTS
When an I/O error is detected, a message is typed, and control is returned to MONITOR.
The message will
be either
!META ERRORa' IOC
indicating checksum error, or
! META ERROR a' IOE
indicating buffer error.
(a' has the same maaning as for abort messages.)
A checksum error is considered to be irrecoverable.
900 SERIES I/O ERROR MESSAGES AN D HALTS
When an I/O error is detected, a simple message is typed and the computer halts.
2-letter indication of the type of error and a 2-digit indication of the I/O device.
The message consists of a
The letter indicators are
defined below; the 2-digit number is the unit address number used in EOM selects (see applicable computer
The action taken if the halt is cleared d~pends upon the type of error and the device in-
reference manual).
volved.
There are three types of error.
BUFFER ERROR (BE)
1.
2.
Exampl es:
BEll
buffer error while reading magnetic tape 1.
BE52
buffer error while writing magnetic tape 2.
Action upon clearing the halt:
a.
Magnetic tape input - since ten attempts are made to read the record before the halt
occurs, continuing causes MET A-SYMBOL to accept the bad record.
b.
Paper tape or card input - try again.
c.
Magnetic tape output - try again.
d.
Output other than magnetic tape - continues.
CHEC KSUM ERROR (CS)
1.
2.
Examples:
CS06
checksum error card reader.
C S 11
checksum error read ing magnetic tape 1.
Action upon clearing the halt:
Accepts bad record.
53
WRITE ERROR (F P)
1.
Example:
F P12
2.
magnetic tape 2 file protected.
Action upon clearing the halt:
Checks again.
c.
SYMBOL Error Halts
Input/output errors during a SYMBOL assembly result in a halt with the relative location of the halt displayed
in the P register.
1.
The recovery procedure depends on the type of error and the device involved.
Paper tape reader or typewriter symbolic input - Upon detection of a buffer error, a halt occurs
with relative location 032 displayed in the P register.
to relative location 025.
To continue the assembly, one can branch
To reread the record, one must reposition the paper tape and branch to
relative location 03.
2.
Magnetic tape input - Input records are required to be card images (20 words).
termination is treated as being equivalent to an end-of-file.
A premature
One end-of-file mark is allowed
to separate input files on a tape reel and is ignored by the assembler at the beginning of the first
pass.
An additional end-of-file mark or one occurring after the first symbolic line but before the
END line causes a halt in relative location 050.
Clearing the halt causes a branch to location01,
which reinstates the assembly process.
In case of tape read errors, ten recovery attempts are made after which a halt occurs in relative
location 021.
3.
Clearing the halt causes the record to be accepted.
Line printer listing - In the event of a printer fault, a halt occurs in relative location 023.
To
continue the assembly, clear the fault on the printer and then clear the halt.
D. Concordance Routine Error Messages (META-SYMBOL only)
If an error occurs whi Ie a concordance is being output, a message is produced on the output I isting device.
Message
Meaning
Write error on magnetic
Unable to write on magnetic
tape.
tape.
Tape fi Ie protected
Write ring removed from tape.
Action
Clear the halt to tryagain.
Insert ring; c lear the hal t
to continue.
Magnetic tape read error
Read failure on magnetic tape.
Clear the halt to accept
record as read.
54
Message
Meaning
Symbol table overflow
Action
Insufficient space to retain all sym-
Run is aborted.
bois requested.
End-of-fi Ie error
End of fi Ie detected on Xl.
Run is aborted.
Input is not encoded
A non -encoded record is detec ted
Run is aborted.
on Xl.
Checksum error
An erroneous checksum is detected
Clear the halt to read next
on Xl.
record.
EXCLUDE follows
An EXCLUDE card follows an
EXCLUDE card is ignored.
INCLUDE
INCLUDE card.
Concordance control card
Control card is not INCLUDE,
not recognized
EXCLUDE, or 6.EOF.
Printer fault
Error on printing.
Run continues.
Print buffer error
Buffer error while printing.
Run conti nues.
Typewriter buffer error
Buffer error while typing listing.
Run continues.
Card is ignored.
E. Use of SBRK
The SBRK directive gives the user the capabi I ity of modifying, at assembly time, the assembler's working
storage memory allocation scheme.
To understand how SBR K may be usefu I; one must first understand how
META-SYMBOL's table storage is arranged.
After the particular system procedures required for the job have been read in and properly arranged, all of
memory from PAC KL (the next ava i lable cell above the system procedures) to TO P (the highest ava i labl e
location) will be used for building the tables required for assembly.
bly-the value BREAK,
At this time-immediately prior to assem-
which determines the relative sizes of the various tables, is set.
For 8K machines
BREAK is set to PAC KL + 600 . For larger machines the increment between PAC KL and BREA K is progressively
8
greater. This increment is BREAK1. In the case of an abort due to lack of table storage, the value of BREAK1
for that run is given in the error printout.
During pass 1 of the assembly, user sample or procedures are assigned storage starting at PACKL and progressing upward toward BREAK.
The next avai lable cell above the user sample is SMPWRD.
Main code sym-
bols and aJd procedure level t symbols are assigned storage starting at the highest ava i Iabl e address and
tIn discussing META-SYMBOL storage, items are referred to by "Ievels.
defined as "Ievel 1,
II
II
The main program is arbitrarily
external definitions to be satisfied at load time are designated as "level 0,
II
and
procedures take on level values 2, 3, 4, etc. (and thus are referred to as "odd" or "even" level procedures).
55
expanding downward.
The next available address is contained in UPPER.
Even procedure level symbols and
main coda definitions are stored starting at BREAK and expanding upward.
The next available address for
this purpose is contained in LOWER.
Two possibilities for pass 1 overflow exist: (1) if LOWER is greater than UPPER, processing must cease, as no
more symbols may be defined; (2) if SMPWRD is greater than BREAK, there are too many user procedures for
avai lable storage.
At the start of pass 2, SMPWRD has attained its final value.
and BREAK is used for two purposes.
next avai lable address in LTBL.
The amount of memory left between SMPWRD
Table storage for literals starts at SMPWRD and expands upward with the
External reference storage starts at BREAK - 1 and expands downward, where
LTBE points to the next location for this purpose.
Above BREAK, the situation in pass 2 is the same as in pass 1 with the exception that since no external definitions are being processed, the difference between BREAK and LOWER becomes only as large as is necessary
to define even procedure level symbols.
Again, two possibi I ities for pass 2 overflow exist: (1) if LOWER is greater than UPPER or (2) if LTBL is greater
than LTBE, processing must cease.
The SBRK directive enables the user to set, at assembly time, the value of BREAK1.
As indicated earlier, the
directive must be used before the first external definition or procedure reference; i.e., before the pointers
have begun to move.
In this manner, the value of the expression E in the operand field of the directive
is used as BREAK1, and BREAK is set to PACKL + E.
This is useful primarily in attempting to recover from an assembler overflow.
For example, suppose one re-
ceives the error printout:
META SYMBOL ERROR 05
LINE NUMBER
1090
BREAK1
01300
LOCA nON COUNTER
00737
UPPER
24155
LOWER
17326
BREAK
17304
SMPWRD
17017
LTBE
17077
LTBL
17077
In th is case, a pass 2 overflow (indicated by the presence of LTBE and LTBL in the diagnostic), the assembler
has run out of storage for literals and references.
However, it is apparent that at this point in the assembly
considerable memory is still available for symbol storage.
56
The only solution short of program modification,
or a larger machine, is to attempt to recover by increasing the amount of pass 2 table storage for literals and
references through an initial increase in the value of BREAK1, currently 1300 ,
8
SBRK
Inserting the card:
01700
at the start of the program would accomplish this.
In any case, the exact value to be used in the directive
is based upon an evaluation of such immediate considerations as the pass and the point in the program at
which overflow occurred, the amount of user sample, and the number of literals and external references that
can subsequently be expected to be encountered.
Odd level
procedure
symbols
UPPER (current)
----------- CD Meeting
point of UPPER and LOWER.
C an no t b e se t •
Even level
proce d ure
BREAK
Can be set
via SBRK. @
.....s__y_m_b_o_1s--:--_ _ _ _+-I LOWE R (c u rren t)
External
LTBE (current)
references
------------ @
Literals
SMPWRD
PAC KL
Meeting point of LTBE and LTBL.
Can not be set.
I---------~ LTBL (current)
User PROCs
...-------....a........t
When UPPER and LOWER meet, an overflow error occurs.
When LTBE and LTBL meet, an overflow error occurs.
BREAK is preset to a fixed point. It can be changed at assembly time via
the directive SBRK.
F. Making Symbolic Changes to Encoded Programs
Symbolic changes are accompl ished by a series of insertions and deletions controlled by specially formatted
symbolic records.
The encodad program is interpreted as a series of logical lines as indicated by the line
numbers given on the assembly listing for that program.
Note that the continuation feature allows two or
more cards to be considered as one logical line.
The format of the symbolic change control record is
+a'f3/\
+ must be in col umn 1.
a is a decimal integer corresponding to the line number given on the assembly listing and specifying
the line following which an insertion is to be made, or the first line of a group of sequential lines
to be deleted or replaced.
57
f>has the same interpretation as a except that it specifies the last line of a group of sequential lines to
be deleted or replaced.
1\
indicates a space which terminates the scan of the + card.
1.
Insertion
Insert 51' ... , 5
n
following line a:
5
n
The 5. are symbolic cards for assembly.
I
To insert before the first line, use:
+0
5
n
2.
Deletion
Delete lines a through f> inclusively:
+ a , f>
(Note that if 0'= f>, only one line is deleted.)
3.
Replacement
Replace lines a through f>, inclusively, with 5 ,5 , ... , 5 :
1 2
n
+0' ,f>
5
n
58
4.
Deck Structure
Symbol ic correction cards. The first
card following the 6METAXXXX card
must be a +.
Note: An encoded deck may not be corrected by merging or juxtaposing other
encoded decks.
59
APPENDIX A. SDS 900 SERIES PROGRAMMED OPERATORS
In 900 Series SYMBOL and META-SYMBOL, non-machine instructions are treated similarly to external references. This enables Programmed Operator definitions and Iinkages to be establ ished at execution rather than
at assembly time. As a resu It, the entire 64 Programmed Operator instructions are at the disposal of the programmer.
To define a Programmed Operator, the Programmer precedes the POP subroutine by a line which has the following format:
Operation
Operand
Comments
POPD
OPERAND IGNORED. POP FOLLOWS
A dollar sign preceding the symbol in the label field causes the POP to be externally defined (so that it can be
referred to in other, separately assembled programs).
To refer to a Programmed Operator, the programmer places its name in the operation field of a symbolic line.
If a corresponding POP definition does not exist within the same program, the assembler assumes that the operation is a reference to an external POP.
POP assignments are established at assembly time in order of appearance, beginning at 0100, and corrected at
loading time if necessary.
EX~PLE:
Location
Contents
Label
Operation
Operand
00000
10000000
PROG1
LDP
X
00001
10100000
FLA
X
00002
10200001
FLM
X
00003
10300002
STD
X
END
00000
$X
RES
2
PROG2
LDP
X
00002
10000000
00003
10100000
FLM
X
00004
10200000
FLA
X
00005
10300000
STD
X
$LDP
POPD
00006
03700014
STX
TEMP
00007
07740000
EAX
*0
00010
27600001
LOA
1, 2
60
EXAMPLE (continued)
Label
Operation
Operand
Location
Contents
00011
27500000
LDB
0, 2
00012
07100014
LDX
TEMP
00013
05100000
BRR
TEMP
00014
0
RES
END
If PROG 1 is loaded first, the operation assignment of PROG 1 overrides those of PROG2i if PROG2 is loaded
first, the converse is true.
Loading PROG 1 first, the loader inherits from the assembler a table equivalent to the following:
LDP:
0100
FLA:
0101
FLM:
0102
STD:
0103
Upon subsequently loading PROG2, the loader detects the mnemonic coincidence(but binary confl ict) of FLA
and FLM. It therefore changes all 0101 instructions (F LM) in PROG2 to 0102 to agree with PROG 1, and all
0102 to 0101.
Also, the loader establishes the necessary POP linkages in locations 0100-01XX.
61
APPENDIX B. SDS 910/925 INSTRUCTION LIST
Instruction syntax is indicated where non-standard (Cf. 111.).
Mnemonic
Instruction
Code
Function
LOAD/STORE
LDA
76
LOAD A
STA
35
STORE A
LDB
75
LOAD B
STB
36
STORE B
LDX
71
LOAD INDEX
STX
37
STORE INDEX
EAX
77
COpy EFFECTIVE ADDRESS INTO INDEX
ADD
55
ADDM TO A
MIN
61
MEMORY INCREMENT
SUB
54
SUBTRACT M FROM A
MDE
60
MEMORY DECREMENT
MUS
64
MULTIPL Y STEP
DIS
65
DIVIDE STEP
ETR
14
EXTRACT
MRG
16
MERGE
EOR
17
EXCLUSIVE OR
ARITHMETIC
LOGICAL
REGISTER CHANGE
RCH
46
REGISTER CHANGE
XAB
04600000
EXCHANGE A AND B
BAC
o 46 10000
COPY B INTO A, CLEAR B
ABC
04620000
COpy A INTO B, CLEAR A
CLR
04630000
CLEAR A, B
62
Mnemonic
Instruction
Code
Function
BRANCH
BRU
01
BRANCH UNCONDITIONALLY
BRX
41
INCREMENT INDEX AND BRANCH
BRM
43
MARK PLACE AND BRANCH
BRR
51
RETURN BRANCH
SKS
40
S KIP IF SIGNAL NOT SET
SKG
73
SKIP IF A GREATER THAN M
SKN
53
SKIP IF M NEGATIVE
SKA
72
SKIP IF M AND A DO NOT COMPARE ONES
SKM
70
SKIP IF A = M ON B MASK
TEST/SKIP
SHIFT
RSH
066000XX
RIGHT SHIFT AB
RCY
066200XX
RIGHT C YC LE AB
LSH
067000XX
LEFT SHIFT AB
LCY
067200XX
LEFT CYCLE AB
NOD
067 100XX
NORMALIZE AND DECREMENT X
CONTROL
HLT I PZE
00
HALT
NOP
20
NO OPERATION
EXU
23
EXECUTE
BREAKPOINT TESTS (Breakpoints specified as expression list in operand field.)
BPT
04920XXO
BREAKPOINT TEST
OVT
040 20001
OVERFLOW INDICATOR TEST AND RESET
ROV
002 20001
RESET OVERFLOW
OVERFLOW (No operand.)
63
Instruction
Code
Mnemonic
Function
INTERRUPT (No operand)
EIR
002 20002
ENABLE INTERRUPT SYSTEM
DIR
o 02 20004
DISABLE INTERRUPT SYSTEM
lET
040 20004
INTERRUPT ENABLED TEST
IDT
04020002
INTERRUPT DISABLED TEST
AIR
002 20020
ARM INTERRUPT
CHANNEL CONTROL (Channel designated by expression in operand field)
ALC
x OX 50XOO
ALERT CHANNEL (925 only)
DSC
X OX OOXOO
DISCONNECT CHANNEL
ASC
X OX 12XOO
ALERT TO STORE ADDRESS IN CHANNEL (925 only)
TOP
X OX 14XOO
TERMINATE OUTPUT ON CHANNEL
CHANNEL TESTS (925 only-Channel designated by expression in operand field)
CAT
X 40 X4XOO
CHANNEL ACTIVE TEST
CET
X 40 X 1XOO
CHANNEL ERROR TEST
CZT
X 40 X2XOO
CHANNEL ZERO COUNT TEST
CIT
X 40 XOXOO
CHANNEL INTER-RECORD TEST
INPUT/OUTPUT
MIW
12
MINTO W BUFFER WHEN READY
WIM
32
W BUFFER INTO M WH EN READY
MIY
10
MINTO Y BUFFER WHEN READY
YIM
30
Y BUFFER INTO M WHEN READY
BRTW, BRTY
0402XOOO
BUFFER READY TEST
BETW, BETY
040200XO
BUFF ER ERROR TEST
POT
13
PARALLEL OUTPUT
PIN
33
PARALLEL INPUT
BPO
11
BLOC K PARALLEL OUTPUT (925 only)
31
BLOC K PARALLEL INPUT (925 only)
02
ENERGIZE OUTPUT M
06
ENERGIZE OUTPUT TO DIRECT ACCESS
CHANNELS (925 only)
BPI
t
EOM
t
EOD
t Indi rect address flag (*) interpreted as interlace control flag.
64
APPENDIX C. SDS 920/930 INSTRUCTION LIST
Mnemonic
Instruction
Code
Function
LOAD/STORE
LDA
76
LOAD A
STA
35
STORE A
LDB
75
LOAD B
STB
36
STORE B
LDX
71
LOAD INDEX
STX
37
STORE INDEX
EAX
77
COpy EFFECTIVE ADDRESS INTO INDEX
XMA
62
EXCHANGE M AND A
ADD
55
ADDM TO A
ADC
57
ADD WITH CARRY
ADM
63
ADD A TO M
MIN
61
MEMORY INCREMENT
SUB
54
SUBTRACT M FROM A
SUC
56
SUBTRACT WITH CARRY
MUL
64
MULTIPLY
DIV
65
DIVIDE
ETR
14
EXTRACT
MRG
16
MERGE
EOR
17
EXC LUSIVE OR
ARITHMETIC
LOGICAL
REGISTER CHANGE (Cf. Appendix E - no operand except for RCH and COPY)
RCH, COpy
46
REGISTER CHANGE
CLA
046 00001
CLEAR A
CLB
046 00002
CLEAR B
CLR
046 00003
CLEAR AB
CAB
046 00004
COpy A INTO B
65
Mnemonic
Instruction
Code
Function
REGISTER CHANGE (continued)
CBA
046 00010
COpy B INTO A
XAB
046 00014
EXCHANGE A AND B
BAC
046 00012
COpy B INTO A, CLEAR B
ABC
04600005
COpy A INTO B, C LEAR A
CXA
04600200
COpy INDEX INTO A
CAX
04600400
COpy A INTO INDEX
XXA
04600600
EXCHANGE INDEX AND A
CBX
046 00020
COpy B INTO IN DEX
CXB
04600040
COpy INDEX INTO B
XXB
04600060
EXCHANGE INDEX AND B
STE
o 46 00122
STORE EXPONENT
LDE
04600140
LOAD EXPONENT
XEE
046 00160
EXCHANGE EXPONENTS
CNA
o 46 01000
COpy NEGATIVE INTO A
BRANCH
BRU
01
BRANC H UNCONDITIONALLY
BRX
41
INCREMENT INDEX AND BRANCH
BRM
43
MARK PLACE AND BRANCH
BRR
51
RETURN BRANCH
SKS
40
S KIP IF SIGNAL NOT SET
SKE
50
S KIP IF A EQUALS M
SKG
73
SKIP IF A GREATER THAN M
SKR
60
REDUCE M, SKIP IF NEGATIVE
SKM
70
SKIP IF A = M ON B MASK
SKN
53
SKIP IF M NEGATIVE
SKA
72
SKIP IF M AND A DO NOT COMPARE ONES
SKB
52
SKIP IF M AND B DO NOT COMPARE ONES
SKD
74
DIFFERENCE EXPONENTS AND SKIP
TEST/SKIP
66
Mnemonic
Instruction
Code
Function
SHIFT
RSH
066000XX
RI GHT SHIFT AB
LRSH
066240XX
LOGICAL RIGHT SHIFT AB
RCY
066200XX
RI GHT CYCLE AB
LSH
067000XX
LEFT SHIFT AB
LCY
067200XX
LEFT CYCLE AB
NOD
067 100XX
NORMALIZE AND DECREMENT X
CONTROL
HLT, PZE
00
HALT
NOP
20
NO OPERATION
EXU
23
EXECUTE
BREAKPOINT TESTS (Breakpoints specified as expression list in operand field)
BPT
04020XXO
BREAKPOINT TEST
OVT
040 20001
OVERFLOW INDICATOR TEST AND RESET
ROV
o 02 20001
o 02 20010
RESET OVERFLOW
OVERFLOW (No operand)
REO
RECORD EXPONENT OVERFLOIV (930 only)
INTERRUPT (No operand)
ENABLE INTERRUPT SYSTEM
DIR
o 02 20002
o 02 20004
lET
040 20004
INTERRUPT ENABLED TEST
lOT
040 20002
INTERRUPT DISABLED TEST
AIR
o 02 20020
ARM INTERRUPTS
EIR
DISABLE INTERRUPT SYSTEM
CHANNEL CONTROL (Channel designated by expression in operand field)
ALC
x OX 50XOO
ALERT CHANNEL (930 only)
DSC
X OX OOXOO
DISCONNECT CHANNEL
ASC
X OX 12XOO
ALERT TO STORE ADDRESS IN CHANNEL (930 only)
TOP
X OX 14XOO
TERMINATE OUTPUT ON CHANNEL
67
Mnemonic
Instruction
Code
Function
CHANNEL TESTS (930 only - Channel designated by expression in operand field)
CAT
X 40 X4XOO
CHANNEL ACTIVE TEST
CET
X 40 X lXOO
CHANNEL ERROR TEST
CZT
X 40 X2XOO
CHANNEL ZERO COUNT TEST
CIT
X 40 XOXOO
CHANNEL INTER-RECORD TEST
INPUT/OUTPUT
MIW
12
MINTO WBUFFER WHEN READY
WIM
32
W BUFFER INTO M WHEN READY
MIY
10
MINTO Y BUFFER WHEN READY
YIM
30
Y BUFFER INTO M WHEN READY
BRTW, BRTY
0402XOOO
BUFFER READY TEST
BETW, BETY
040200XO
BUFFER ERROR TEST
POT
13
PARALLEL OUTPUT
PIN
33
PARALLEL INPUT
02
ENERGIZE OUTPUT M
06
ENERGIZE OUTPUT TO DIRECT ACCESS
CHANNELS (930 only)
t
EOM
t
EOD
tIndirect address flag (*) interpreted as interlace control flag.
68
APPENDIX D. SDS 9300 INSTRUCTION LIST
Mnemonic
Instruction
Code
Function
LOAD/STORE
LDA
16
LOAD A
STA
76
STORE A
LDB
14
LOAD B
STB
74
STORE B
LDX
X - 17
LOAD INDEX
STX
X - 77
0-77
STORE INDEX
STORE ZERO
STZ
LDP, LDF
STD, STF
26
75
LOAD DOUBLE PRECISION (FLOATING)
STORE DOUBLE PRECISION (FLOATING)
XMA
36
EXCHANGE M AND A
XMB
34
EXCHANGE M AND B
XMX
X - 37
EXCHAI'-!GE MEMORY AND INDEX
LDS
06
LOAD SE LECTIVE
STS
70
STORE SELECTIVE
EAX
15
COpy EFFECTIVE ADDRESS INTO INDEX
REGISTER 1
ADD
05
ADD M TO A
DPA
25
DOUBLE PRECISION ADD
SUB
04
SUBTRACT
DPS
MPO
MPT
24
71
72
DOUBLE PRECISION SUBTRACT
MEMORY PLUS ONE
MEMORY PLUS TWO
MUL
63
MULTIPLY
DIV
62
DIVIDE
ADM
35
ADD A TO M
TMU
61
TWIN MULTIPLY
DPN
27
DOUBLE PRECISION NEGATE
ARITHMETIC
69
Mnemonic
Instruction
Code
Function
FLOATING
POINT
FLA
65
FLOATING ADD
FLS
64
FLOATING SUBTRACT
FLM
67
FLOATING MULTIPLY
FLD
66
FLOATING DIVIDE
ETR
11
EXTRACT
MRG
13
MERGE
EOR
12
EXC LUSIVE OR
LOGICAL
REGISTER CHANGE (Cf. Appendix E)
Mode I
RCH, COpy
040 XXXXX
Modell
RCH, COpy
X 40 XXXXX
Mode III
AXB
4X 40 XXXXX
ADDRESS TO INDEX BASE
BRANCH
BRU
01
BRX
X-57
INCREASE INDEX AND BRANCH
BRC
0-57
BRANCH AND C LEAR INTERRUPT
BRM
03
MARK PLACE AND BRANCH
BMA
43
BRANCH AND MARK PLACE OF ARGUMENT
ADDRESS
BRR
41
RETURN ADDRESS
BRANCH UNCONDITIONALLY
70
Mnemonic
Instruction
Code
Function
TEST/SKIP
SKE
45
SKIP IF A EQUALS M
SKU
47
SKIP IF A UNEQUAL TO M
SKG
46
SKIP IF A GREATER THAN M
SKL
44
SKIP IF A LESS THAN OR EQUAL TO M
SKR
73
REDUCE M, SKIP IF NEGATIVE
SKM
55
SKIP IF A = M ON B MASK
SKN
53
SKIP IF M NEGATIVE
SKA
54
SKIP IF M AND A DO NOT COMPARE ONES
SKB
52
SKIP IF M AND B DO COMPARE ONES
SKP
51
SKIP IF BIT SUM EVEN
SKS
20
SKIP IF SIGNAL NOT SET
SKF
50
SKIP IF FLOATING EXPONENT IN B> M
SKQ
56
SKIP IF MASKED QUANTITY IN A GREATER
THANM
SHIFT
60
SHIFT (Used in conjunction with indirect addressing)
ARSA
60-20
ARITHMETIC RIGHT SHIFT A
ARSB
60-10
ARITHMETIC RIGHT SHIFT B
ARSD
60-00
ARITHMETIC RIGHT SHIFT DOUBLE
ARST
60-30
ARITHMETIC RIGHT SHIFT TWIN (A AND B)
LRSA
60-21
LOGICAL RIGHT SHIFT A
LRSB
60-11
LOGICAL RIGHT SHIFT B
LRSD
60-01
LOGICAL RIGHT SHIFT DOUBLE
LRST
60-31
LOGICAL RIGHT SHIFT TWIN (A AND B)
CRSA
60-22
CIRCULAR RIGHT SHIFT A
CRSB
60-12
CIRCULAR RIGHT SHIFT B
CRSD
60-02
CIRCULAR RIGHT SHIFT DOUBLE
CRST
60-32
CIRCULAR RIGHT SHIFT TWIN (A AND B)
-
SHIFT
71
Mnemonic
Instruction
Code
Function
SHIFT (continued)
ALSA
60-24
ARITHMETIC LEFT SHIFT A
ALSB
60-14
ARITHMETIC LEFT SHIFT B
ALSO
60-Q.4
ARITHMETIC LEFT SHIFT DOUBLE
ALST
60-34
ARITHMETIC SHIFT TWIN (A AND B)
LLSA
60-25
LOGICAL LEFT SHIFT A
LLSB
60-15
LOGICAL LEFT SHIFT B
LLSD
60-05
LOGICAL LEFT SHIFT DOUBLE
LLST
60-35
LOGICAL LEFT SHIFT A AND B
CLSA
60-26
CIRCULAR LEFT SHIFT A
CLSB
60-16
CIRCULAR LEFT SHIFT B
CLSD
60-()6
CIRCULAR LEFT SHIFT DOUBLE
CLST
60-36
CIRCULAR LEFT SHIFT TWIN (A AND B)
NORA
60-64
NORMALIZE A
NORD
60-44
NORMALIZE DOUBLE
FLAG REGISTER {Single operand expression}
FLAG
22
FLAG
FIRS
22-0
FLAG INDICATOR RESET/SET
FSTR
22-1
FLAG INDICATOR SET TEST/RESET
FRTS
22-2
FLAG INDICATOR RESET TEST/SET
FRST
22-3
FLAG INDICATOR RESET/SET TEST
SWT
22-4
SENSE SWITCH TEST
CONTROL
HLT, PZE
00
HALT
NOP
10
NO 0 PERATIO N
EXU
21
EXECUTE
INT
07
LOAD OP CODE INTO INDEX 2, SKIP ON
BIT 1
REP
23
REPEAT INSTRUCTION IN M
72
Mnemonic
Instruction
Code
Function
INTERRUPTS (No operand)
o 02 20002
o 02 20004
o 02 20020
o 20 20004
o 20 20002
EIR
DIR
AIR
lET
IDT
ENABLE INTERRUPT SYSTEM
DISABLE INTERRUPT SYSTEM
ARM INTERRUPTS
INTERRUPT ENABLED TEST
INTERRUPT DISABLED TEST
CHANNEL CONTROL (Channel designated by expression in operand field)
DSC
X X2 OOXOO
DISCONNECT CHANNEL
ALC
X X2 50XOO
ALERT CHANNEL
ASC
X X2 12XOO
ALERT TO STORE ADDRESS IN CHANNEL
TOP
X X2 14XOO
TERMINATE OUTPUT ON CHANNEL
CHANNEL TEST (Channel designated by expression in operand field)
CAT
X 20 X4XOO
CHANNEL ACTIVE TEST
CET
X 20 X1XOO
CHANNEL ERROR TEST
CIT
X 20 XOXOO
CHANNEL INTER-RECORD TEST
CZT
X 20 X2XOO
CHANNEL ZERO COUNT TEST
INPUT/OUTPUT
t
t
EOM
t
EOD
02
ENERGIZE OUTPUT M
42
ENERGIZE OUTPUT TO DIRECT ACCESS
CHANNEL
PIN
33
PARALLEL INPUT
POT
31
PARALLEL OUTPUT
MIA
30
MEMORY INTO CHANNEL A BUFFER
AIM
32
CHANNEL A BUFFER INTO MEMORY
.
. . _.
'Indirect address flag (*) interpreted as interlace control tlag.
73
APPENDIX E. SDS 92 INSTRUCTION LIST
Mnemonic
Instruc t ion
Code
Function
LOAD/STORE
LDA
64
LOAD A
LDB
24
LOAD B
STA
44
STORE A
STB
04
STORE B
XMA
74
EXCHANGE M AND A
XMB
34
EXCHANGE M AND B
XMF
17
EXCHANGE M AND F
LDF
57
LOAD F
SFT
0044
SET FLAG TRUE
SFF
0042
SET FLAG FALSE
INF
0046
INVERT FLAG
FLAG
ARITHMETIC
ADA
62
ADD TO A
ADB
22
ADD TO B
ACA
63
ADD WITH CARRY TO A
ACB
23
ADD WITH CARRY TO B
SUA
60
SUBTRACT TO A
SUB
20
SUBTRACT TO B
SCA
61
SUBTRACT WITH CARRY TO A
SCB
21
SUBTRACT WITH CARRY TO B
MPA
76
MEMORY PLUS A TO MEMORY
MPB
36
MEMORY PLUS B TO MEMORY
MPO
16
MEMORY PLUS ONE TO MEMORY
MPF
56
MEMORY PLUS FLAG TO MEMORY
MUA
13
MUL TIPL Y A (0 PTIONAL)
MUB
53
MUL TIPL Y B (0 PTIO NAL)
DVA
52
DIVIDE AB (0 PTIO NAL)
DVB
12
DIVIDE BA (OPTIONAL)
74
Mnemonic
Instruc tion
Code
Function
CONTROL
EXU
HLT
73
0041/00000000*
EXECUTE
HALT
TRAPPIN G (no operand)
SCT
0061
SET PROGRAM-CONTROLLED TRAP
RCT
0060
RESET PROGRAM-CONTROLLED TRAP
TCT
0160
TEST PROGRAM-CONTROLLED TRAP
BREAKPOINT TESTS (single operand)
BRT
0144
BREAKPOINT NUMBER 1 TEST
BRT 2
0145
BREAKPOINT NUMBER 2 TEST
BRT 3
0146
BREAKPOINT NUMBER 3 TEST
BRT 4
0147
BREAKPO INT NUMBER 4 TEST
INTERRUPTS (no operand)
EIR
0051
ENABLE INTERRUPT
DIR
0050
DISABLE INTERRUPT
lET
0150
INTERRUPT ENABLED TEST; SET FLAG IF INTERRUPT SySTEM ENABLED
AIR
00020001
ARM INTERRUPTS
CHANNEL CONTROL AND TESTS (no operand)
DSC
00000100
DISCONNECT CHANNEL
TOP
00012100
TERMINATE OUTPUT ON CHANNEL
TIP
00012100
TERMINATE INPUT 0 N CHANNEL
AlC
00050100
ALERT CHANNEL INTERLACE
ASC
00010500
ALERT TO STORE INTERLACE COUNT
CAT
01004100
CHANNEL ACTIVE TEST; SET FLAG IF NOT ACTIVE
CET
01001100
CHANNEL ERROR TEST; SET FLAG IF ERROR
LOGICAL
ANA
65
AND TO A
ANB
25
AND TO B
ORA
67
OR TO A
+A slash (/) indicates that either instruction code can be used to perform the same operation.
75
Mnemonic
Instruc t ion
Code
Function
LOGICAL (continued)
ORB
27
OR TO B
EOA
66
EXCLUSIVE OR TO A
EOB
26
EXCLUSIVE 0 R TO B
MAA
75
MEMORY AND A TO MEMORY
MAB
35
MEMORY AND B TO MEMORY
COA
45
COMPARE ONES WITH A
COB
05
COMPARE ONES WITH B
CMA
47
COMPARE MAGNITUDE OF M WITH A
CMB
07
COMPARE MAGNITUDE OF M WITH B
CEA
46
COMPARE M EQUAL TO A
CEB
06
COMPARE M EQUAL TO B
BRU
73
BRANC H U NCO N DITIO NALLY
BRC
32
BRANCH, CLEAR INTERRUPT, AND LOAD FLAG
BRL
33
BRANCH AND LOAD FLAG
BFF
31
BRANCH ON FLAG FALSE
BFT
71
BRANCH ON FLAG TRUE
BDA
70
BRANCH ON DECREMENTING A
BAX
30
BRANCH AND EXCHANGE A AND B
BRM
77
BRANCH AND MARK PLACE
BMC
37
BRANCH, MARK PLACE, AND CLEAR FLAG
CYA
42
CYCLE A
CYB
02
CYCLE B
CFA
43
CYCLE FLAG AND A
CFB
03
CYCLE FLAG AND B
CYD
02/42*
CFD
43
CYCLE FLAG AND DOUBLE
CFI
03
CYCLE FLAG AND DOUBLE INVERSE
COMPARISON
BRANCH
SHIFT
CYCLE DOUBLE
*A slash (I) indicates that either instruction code can be used to perform the same operation.
76
Mnemonic
Instruction
Code
Function
INPUT/OUTPUT
WIN
15
WORD IN
RIN
55
RECORD IN
WOT
11
WORD OUT
ROT
51
RECORD OUT
PIN
14
PARALLEL INPUT
POT
10
PARALLEL OUTPUT
BPI
54
BLOC K PARALLEL INPUT
BPO
50
BLOC K PARALLEL OUTPUT
EOM
00(40*)
ENERGIZE OUTPUT M
SES
01(41*)
SENSE EXTERNAL SIGNAL
*Codes EOM 40 and SES 41 are reserved for use in spec ial system appl ications.
77
APPENDIX F. SPECIAL INSTRUCTIONS - SoS 900 SERIES/SoS 9300
A. SOS 9300 Register Change Instruction (040)
This instruction has three main functions:
1.
Interchange and/or modify information between selected bytes of A and B.
2.
Interchange and/or modify information among selected bytes of A, B, and the index registers.
3.
Load the address portion of a se lected index register from the address portion of the instruction.
In modes 1 and 2, the address portion of the instruction serves to extend the operation code; each of
the address bits has a particular significance during instruction decoding and execution. In mode 3,
however, the interpretation of the address portion is the conventional one in which the 15-bit value
defines an operand. Therefore, in mode 3, the instruction is programmed by following the mnemonic,
AXB, by an expression in the operand field. The assembler inserts the value of the expression in the
instruction's 15-bit address portion.
When programmed in Mode 1 or 2, the instruction may be given one of two mnemonics: RCH or COPY.
The assembler processes the operand field of RCH in the conventional manner, inserting the evaluated
operand field expression into the instruction's 15-bit address portion. In general, the expression is an
octal number representing the bit pattern that specifies the function to be performed. This implies a
detailed knowledge of the instruction on the programmer's part.
The operand field of COPY, on the other hand,
IS
interpreted differently. The field consists of a byte
selection "mask" followed by one or more grouped expression lists that describe the desired operation(s).
The programmer need be concerned only with operational legitimacy and not with its specification via
bit patterns.
EXAMPLES:
Label
Effect
Operation
Operand
COpy
(0, (A, B»
Clear A and B
COpy
(A, B)
Copy A into B
COpy
(A, B), (B,A)
Exchange A and B
COpy
077, (A, B, B)
Merge the low order six
bits of A and B in B.
Unless a merge is specified, the assembler automatically sets the "clear" bit.
Thus, the second line
causes the generation of 0 40 37703.
Format:
Label
LABEL
Operation
COpy
Operand
E, (E 11 I
•••
,
E1N) I (E21 I E2N) I
78
•••
I
(EM 1, ••• , EM N)
Since parenthetical notation is used in the operand field, parentheses have not been used to denote
lIoptional". As usual, the label is optional and mayor may not be external. The first operand and all
successive operand I ists are also optional.
RULES:
1.
The byte selection mask, if present, is the first expression to appear in the operand field.
It is
not enclosed within parentheses. In the absence of this expression, the assembler assumes the
mask 077777777 to be implicitly specified. Actually, the assembler cannot insert the mask directly into the byte-selection position of the instruction, since the 24-bit value must be mapped
into three or eight bits. However, it is convenient to think of the mask in this manner. Since
the mask may be an expression, it need not always be written as an octal number.
EXAMPLES:
Operand
Label
Operation
Effect
EXP
EQU
0777
HI3
EQU
070000000
COpy
EXP, (B, 1), (O,B)
(B)15_23-X1 15-23'
COpy
HI3, (A, B)
(A)0-2 -B O- 2
0-(B)15_23
Un less the programmer ind icates that the spec ified index register be cleared (in a Mode 2 register change),
the assembl er automati ca II y sets one of the bi ts 12, 13, or 14 to prevent the regi sterfrom be i ng c Ieared.
2.
Following the mask, one or more parenthetical expression I ists appear, separated by commas.
Within a list, two or more expressions (or expression groups) appear. The first of these specify
the source of information flow, and the last specifies the destination. In the case of three or
more successive expressions, an OR is implied. Thus, COpy operations are specified by ordered
groupings of values. The following definitions relate the value of an expression to the 24-bit
source value/register or destination register. Where actual registers are not involved (0 and -1)
it is convenient to imagine the existence of two fictitious registers always containing all zeros
and all ones, respectively.
Meaning*
Value
The negative (2s complement) of (A)
-5
-(A)
-4
(A)
The inverse (ls complement) of (A)
-3
(B)
The inverse (ls complement) of (B)
-1
-1
0
0
All lis
(X 1)
2
(X2)
3
(X3)
4
(B)
5
(A)
*( ) denote lithe contents of II •
79
Therefore to refer to the registers mnemonically, the programmer must precede his program by
equality directives such as:
A
EQU
5
B
EQU
4
X2
EQU
2
IA
EQU
-4
IS
EQU
-3
ONES
EQU
-1
EXAN\PLES:
Interpretation
Mnemonic Notation
Absolute
COpy (A, B), (B,A)
COpy (5,4), (4,5)
Exchange A and B
COpy (lA, B), (O,A)
COpy (l-A, B), (O,A)
COpy (-4,4), (0,5)
Copy inverse of A into Band
clear A
COpy 070, (ONES, B)
COpy 070, (-l,B)
COpy 070, (-1,4)
Form mask in B 18 21
Thus, the programmer can spec ify any legitimate register change without having to write the
necessary bit pattern explicitly and without being restricted to a pre-selected set of mnemonic
op;..codes. Also, the assembler diagnoses the variable field for legitimacy.
B. SDS 920/930 REGISTER CHANGE INSTRUCTION (046)
The S DS 920/930 Register Change instruction has some, but not a II, of the capabi I ities of its 9300
counterpart. The differences are:
1.
The SDS 920/930
RCH does not provide for byte selection except for selecting the low-order
nine bits.
2.
The SDS 920/930 Computers include only one index register.
3.
There is no capability for copying (or merging) the one's complement of one register into another.
FORMAT:
Label
Operation
LABEL
COpy or COPYE
Operand
(Ell, ••• , E1N), (E21, ••• E2N), ••• ,(EM1, ••• , EMN)
As before, the label is optional and mayor may not be external. All expression lists are optional. The
mnemonic COpy implies that operands are whole-word registers; the mnemonic COPYE causes the exponent portion (the low-order nine bits) only to be affected.
80
COPY(E) operations are specified by ordered groupings of values. The following definitions relate the
val ue of an expression to the 24-bit source val ue/register or destination register.
Meaning
Value
-5
-(A)
The negative (2s complement) of A
o
a
A register contai ni ng all as
2
(X)
The index register
4
(B)
The contents of B
5
(A)
The contents of A
EXAMPLES:
Mnemonic Notation
Absolute
COpy (A, B), (B,A)
COpy (5,4), (4,5)
Exchange A and B
COPYE (B,X), (a, B)
COPYE (4,2),(0,4)
B15-23 - - . X 15 - 23
B15
---. XO- 14
Interpretat i on
a
COpy (A, B, X)
COpy (5, 4, 2)
81
---. B15-23
Merge A and B to X
APPENDIX G. INPUT jOUTPUT - DEVICE EOMs ISKSs)
FORMAT:
label
[[$]
LABEL]
Operation
Operand
OP
E1[, E2 [, E3]]
The format for device (I/O peripheral unit) EOMs (SKSs) is different from that of the standard instruction; for
a definition of the format, refer to the appropriate SDS reference manual. The expressions E1, E2, and E3 have
the following meaning:
Mnemonic
t
El:C :
Channel (Buffer), nominally, 0
E2:U:
Unit Number
E3:CC:
Character Transmission Mode (1-4)
(Paper Tape Channel for PSC;
Number of lines to be spaced for PSP)
Instruction
Code
Function
TYPEWRITER, U=l, 2,3
RKB C, U, CC
EOM 002XOX
Read Typewriter Keyboard
TYP C, U, CC
EOM 002X4X
Type
PAPER TAPE, U=1,2
RPT
C, U, CC
EOM 002XOX
Read Paper Tape
PPT
C, U, CC
EOM 002X4X
Punch Paper Tape
PTl
C, U, CC
EOM OOOX4X
Punch Paper Tape with leader
CARDS, U=l, 2
CRT
C, U
SKS O1200X
Card Reader Test
CFT
C, U
SKS OllOOX
Card End-of-file Test
FCT
C, U
SKS O1400X
First Column Test
RCD C, U, CC
EOM 002XOX
Read Cards Dec i rna I
RCB
C, U, CC
EOM 003XOX
Read Cards Binary
SRC
C, U
EOM O1200X
Skip Remainder of Card
CPT
C, U
SKS O1404X
Card Punch Test
PBT
C, U
SKS Ol204X
Punch Buffer Test
EOM 002X4X
Punch Cards Decimal
EOM 003X4X
Punch Cards Binary
PCD C, U, CC
PCB C, U, CC
tFor the SDS 92 the channel designator (E 1) is absent.
82
Instruction
Code
Mnemonic
Function
MAGNETIC TAPE, U=O, 1, ••• , 7
TRT
C, U
SKS 01041X
Tape Ready Test
FPT
C, U
SKS 01401X
File Protected Test
BTT
C, U
SKS 01201X
Beginning of Tape Test
ETT
C, U
SKS 01101X
End of Tape Test
WTD
C, U, CC
EOM 002X5X
Write Tape Decimal
WTB
C, U, CC
EOM 003X5X
Write Tape Binary
EFT
C, U, CC
EOM 003X7X
Erase Forward Tape
ERT
C, U, CC
EOM 007X7X
Erase Reverse Tape
RTD
C, U, CC
EOM 002X1X
Read Tape Decimal
RTB
C, U, CC
EOM 003X1X
Read Tape Binary
SFD
C, U, CC
EOM 002X3X
Scan Forward Decimal
SFB
C, U, CC
EOM 003X3X
Scan Forward Binary
SRD
C, U, CC
EOM 006X3X
Scan Reverse Decimal
SRB
C, U, CC
EOM 007X3X
Scan Reverse Binary
REW
C, U, CC
EOM 01401X
Rewind
RTS
C
EOM 014000
Convert Read to Scan
MAGNETIC TAPE (41.7KC and 96KC only), U=O, 1, ••• , 7 (META-SYMBOL only)
DT2
C, U
SKS 01621X
Density Test (200 BPI)
DT5
C, U
SKS 01661X
Density Test (500 BPI)
DT8
C, U
SKS 01721X
Density Test (800 BPI)
TFT
C
SKS 013610
Tape File Test
TGT
C
SKS 012610
Tape Gap Test
SRR
C
EOM 013610
Skip Remainder of Record
PRINTER, U=l,2 (These mnemonics appear in META-SYMBOL only.)
PLP
C, U, CC
EOM 002X6X
Pri nt Li ne Pri nter
PSC
C, U, CC
EOM 01X46X
Printer Skip to Channel
PSP
C, U, CC
EOM 01X66X
Printer Up Space
EPT
C, U
SKS 01406X
End of Page Test
PFT
C, U
SKS 01l06X
Printer Fault Test
POL
C, U
EOM 01206X
Printer Off-I ine
PRT
C, U
SKS 01206X
Printer Ready Test
83
APPENDIX H. INPUT/OUTPUT - CHANNEL OPERATIONS (SDS 925/930/9300)
The initiation of an I/O channel operation consists of alerting the channel (generally with a device EOM),
executing an interlace control EOM, and issuing (via POT) an interlace (I/O) control word (IOCW). An
IOCW can accommodate a 14-bit address and a 10-bit word count. Whenever the count exceeds 10 bits or
the address is 15 bits (930/9300 only) the extra high-order bits are required in the EOM. To simplify the programming of input/output, special I/O command PROCs have been incorporated in the standard META-SYMBOL
system PROCs.
1.
The use of these PROCs is described below.
Load Channel with Remote Command
The mnemonic LCH (Load Channel) is written at the point of execution. Its operand field
specifies the location of a remote I/O command. The valid (remote) I/O commands are:
lORD
Input/Output Record and Disconnect
10RP
Input/Output Record and Proceed
10SD
Input/Output until Signal and Disconnect
10SP
Input/Output until Signal and Proceed
IOCT
Input/Output under Count and Terminate
(Non-terminal-function interlace operation)
EXAMPLE:
Source Code
LCH
ALPHA
lORD
Generated Code (expressed symbol ically)
ALPHA
[*] ADDR, COUNT, ICD
ALPHA
EXU
ALPHA
POT
ALPHA + 1
EOM/EOD
IOCW
ADDR,COUNT
The asterisk causes an EOD to be generated instead of an EOM.
ADDR points to the beginning of the buffer area.
COUNT specifies the number of words to be input/output.
ICD is an interrupt control digit (0, 1, 2, or 3).
If ALPHA is tagged, the tag is generated in both the EXU and the POT.
"Overflow" bits for the address and count are automatically inserted into the EOM.
2.
Load Channel with Proximate Command
These mnemonics cause the generation of the entire I/O packet (EOM, POT, IOCW)
and are, therefore, more economical of space in those cases where the programmer
does not desire multiple references to an lORD.
84
The five mnemonics are:
LCRD
Load Channel for I/O Record, Disconnect Mode
LCRP
Load Channel for I/O Record, Proceed Mode
LCSD
Load Channel for I/O until Signal, Disconnect Mode
LCSP
Load Channel for I/O until Signal, Proceed Mode
LCCT
Load Channe I for I/O under Count, Term i nate Mode
These mnemonics are written at the point of execution.
those of the remote I/O commands (e.g., lORD).
Their operand fields are identical to
The assembler generates an EOM-POT
combination and inserts the 10CW in the literal table. The extra high-order address and count
bits are inserted into the EOM by the assembler.
Note that for 930 or 9300 target machines
it is possible for a relocatable buffer area to be loaded such that it can be referenced only by
a 15-bit address.
In this case, the separation of the EOM from the IOCW precludes the possi-
bility of the loader inserting the high-order address bit into the EOM.
The assembler flags such
potential difficulties with an 'R'.
EXAMPLE:
Generated Code (expressed symbolically)
Source Code
LCRD
[*]
EOM
ADDR,COUNT,ICD
POT
LTE
LTE
10CW
The symbol LTE is used to denote a I iteral table entry.
3.
"Hand-Coded" I/O
The Interlace Control EOM may always be written by specifying the EOM's address portion
as an octal number in the operand field.
However, the programmer must then know at what
location the I/O block begins, since the EOM contains the high order address and count bits.
Naturally, this is not always possible, especially in the case of relocatable programs.
In
fact, for relocatable buffer areas (on a 930 or 9300), the programmer should always prefer the
first method since only then does the Loader know where the EOM is relative to the IOCW.
The system provides the following mnemonics to simplify the coding of the Interlace Control
EOM.
Their operand fields are identical in format to those of the IOXX and LCXX Command
PROCs.
85
ICRD
I/O Record and Disconnect EOM
ICRP
I/O Record and Proceed EOM
ICSD
I/O until Signal and Disconnect EOM
ICSP
I/O until Signal and Proceed EOM
ICCT
I/O under Count and Terminate EOM
Detecting one of these mnemonics, the assembler generates the appropriate EOM (or EOD),
inserting the terminal function bits and the high order address and count bits.
The restric-
tion on the use of relocatable buffer areas which applies to the LCXX PROCs also applies
to these.
EXAMPLE:
ICRD
ALPHA
[*]
ADDR, COUNT, ICD
POT
ALPHA
IOCW
ADDR, COUNT
86
APPENDIX I. META-SYMBOL/FORTRAN INTERFACE
(SDS 9300 COMPUTERS ONl YJ
As indicated in the introduction, the merits of any programming language depend strongly upon its application.
Wh i Ie some appl ications demand a mathematica lIy oriented language, such as FORTRAN, others requi re the
close contact with the machine that the programmer can gain only through "machine language II programming.
Frequently, the optimal solution to the programming problem consists of "marrying" two or more languages, and
coding different sections of the program in the languages most appropriate. However, this cannot be accomplished without providing for a common interface, and the burden for the interface is generally placed upon
the language having the least restrictive syntax.
Such interface allows the execution of META-SYMBOL programs in con junction with programs written in the
SOS FORTRAN IV language.
MET A-SYMBOL recognizes the following directives. Note that, as META-SYMBOL directives, they are subject to some restrictions (noted below) not present for the analogous FORTRAN statements.
l.
LOGICAL vl, v2, ••• , vn
2.
INTEGER vl, v2, ••• , vn
3.
REAL vl, v2, • •• , vn
4.
COMPLEXvl, v2, ••• , vn
5.
OOUBLEPRECISION vl, v2, ••• , vn
(Note that OOUBLEPRECISION is one word.)
Each vn represents a variable name. The assembler ignores redundant declarations;
it flags conflicting declarations as errors.
6.
COMMON Vl, ••• , Vn/B l/Vll, ••• , Vln ••• /Bm/Vml, ••• , Vmn
Each V represents a variable name or an array name followed by its dimensions
in parentheses: e.g.,
II
A{3, 4, 5)" •
Each B represents a COMMON block name. If no block name appears, META-SYMBOL
assumes blank common. At the beginning of each COMMON statement, it assumes
blank common.
Since COMMON statements are cumu lative over the program, no variab Ie may meaningfully appear in COMMON twice. The assembler recognizes this error.
No symbol that can be used in the operation field of a MET A-SYMBOL program may
appear as a COMMON block name.
87
Dimension information, legal in type statements in FORTRAN IV, may not be used in
MET A-SYMBOL type directives. Such dimensions must appear in a COMMON statement. For example,
REAL
A(9)
COMMON A
is illegal in META-SYMBOl. The correct form is
REAL
A
COMMON A(9)
It is mandatory that each variable used in a COMMON statement be previously defined in a type directive (REAL, etc.).
COMMON allocation is in SDS mode (integer variables are allocated one word; real,
two words; etc.).
Generalized array bounds as permitted in SDS Extended FORTRAN IV must be translated either to an integer quantity or to an expression resulting in the correct integer
quantity at assembly time. For example, FORTRAN allows
REAL
A
COMMON A(-3: 3)
MET A-SYMBOL must have
REAL
A
COMMON A(E)
where E has the value 7 at assembly time.
No continuation is permitted in type directives; however, any type directive may be
used more than once.
SYNTAX
Columns 1 to 6 must be blank. One or more blanks must appear between the directive name and the list. No
blanks may appear within words or within variable lists. (Blank common is indicated by two successive slashes.)
SEMANTICS
1.
Common variables are assigned relative locations within the appropriate block
in order of appearance in the program. The assembler computes the size of
each named COMMON block by summing the sizes of the variables named.
88
2.
The type directives (LOGICAL, INTEGER, etc.) specify to the assembler the
size of each COMMON variable and array element. The assembler keeps a
table of the space required for each type.
It is essential in a program in which a named COMMON variable is referred to that the COMMON and type
directives give the assembler enough information to compute the size of the block and the relative location of
each variable referred to. It is mandatory to list all variables named in the COMMON block, to give the
dimensions of all'arrays in COMMON directives, and to list each variable in a type directive.
89
APPENDIX J. COMPATIBILITY WITH SDS SYMBOL 4 AND SYMBOL 8
(900 SERIES ONLY)
In 1963, SDS announced two assemblers for the 900 Series Computers: SYMBOL 4 and SYMBOL 8. Patterned
after other familiar assemblers, SYMBOL 4 proved popular with users; literals and macros were added in
SYMBOL 8.
It can be seen from this manual that SYMBOL and META-SYMBOL offer still an additional level of capability
to the SYMBOL 4/SYMBOL 8 user. In some cases, however, the additional generality of the new assemblers
has created some incompatibilities with respect to the 1963 assemblers. To assist users in converting to the new
assemblers, these incompatibilities have been resolved in all but exceptional cases.
Compatibility has been provided in two ways:
SYMBOL
The assembler accepts programs written either in the SYMBOL or in the SYMBOL 4 language.
MET A-SYM BO L
The assembler consists of an Encoder and a Translator. The Translator accepts only encoded META-SYMBOL
language. The conversion from SYMBOL 4/8 to META-SYMBOL is accomp lished by the Encoder, which has a
special Compatibility Mode. Since the Translator offers optional recovery of the source language, SYMBOL 4/8
programs can be easi I y converted, if desired, to META-SYMBOL source language.
The compatibility features are described in greater detail below:
A.
Label Field
Both assemblers allow symbols to begin with a numeric character.
tain special characters.
B.
Symbols are not allowed to con-
The symbol must begin in column 1.
Operation Field
1.
Instruction mnemonics:
The following EOM/SKS mnemonics are included in addition to those
I isted in Appendix B and Appendix C.
90
TOPW/TOPY
DISW/DISY
PTLW/PTLY
PPTW/PPTY
RPTWjRPTY
TYPW/TYPY
RKBW/RKBY
RCBWjRCBY
RCDW/RCDY
RTDWjRTDY
RTBW/RTBY
WTDW/'NTDY
WTBW/'NTBY
ETW
SFBW
SRBW
REWW
Programmed operator mnemonics are not recognized and are treated as indicated in
Appendix A. *
Directives:
Ignored*
Recognized
ORG
FORT
BORG
BLK
BSS
L1L
OCT
TCD
DEC
LIST
BCI
UNLIST
BaaL
**REL
**VFD
**BES
**MACRO
**IDEN
**LOAD
**LTAB
**TITLE
**DETAIL
*Only when a 900 Series target machine is specified.
**I1legal in SYMBOL
91
a.
The FORTRAN interface (FORT, BLK) is solved by the use of
external definitions.
3.
b.
All programs are relocatable unless preceded by AORG.
c.
Bootstrap loaders are available separately.
d.
List suppression may be spec ified when the assembler is loaded.
Indirect Addressing:
Indirect addressing is a Ilowed to be indicated by an asterisk following an instruction
mnemonic.
C.
Operand Field
1.
Location counter:
An asterisk is allowed to denote the location counter. In cases where an expression
which includes the symbol * is to be indirectly addressed, the syntax of SYMBOL and
of SYMBOL 4 cannot be mixed. Thus, either
or
LDA*
*+5
LDA
*$+5
is permissible, but
LDA
**+5
is not.
2.
Octal/Decimal Interpretation:
Octal jnterpretation of the operand field is forced in the case of SYMBOL
and META-SYMBOL for the operations EOM, SKS, RCH and OPD. Decimal interpretation is never forced. Therefore, the instruction
RSH
010
would cause a right shift of 8 places.
3.
Literals:
a.
Leading 0 is converted to zero
b.
Leading H is converted to surrounding quotes.
c.
Internal Band E (binary and decimal scale factors) are converted to
the operator notation using */ and *+, respectively.
92
4.
The VFD line is translated to a list which is then handled by a system PROC.
5.
Macros:
MACROs are translated to PROCs.
6.
Spaces:
Spaces are converted to 060 whenever they occur in a TEXT line or within a
literal character string. The BCI directive is translated to BCD, and the word
count is multiplied by four in order to agree with the BCD syntax.
7.
"Fill" operand:
Whenever the expression
8.
** occurs as an operand, a diagnostic flag will result.
Breakpoint Test (BPT)
Whenever multiple breakpoints are tested with the BPT pseudo operation, incorrect assembly will result.
This is because the BPT mn of SYMBOL 4/8 must be
written BPT m, n for SYMBOL/META-SYMBOL.
93
APPENDIX K. SDS STANDARD BINARY LANGUAGE
The following description specifies a standard binary language for the SDS 900 Series and 9300 Computers. The
intention has been that this language be both computer-independent and medium-independent. Thus, there is
provision for handling Programmed Operator definitions and references even though the 9300 does not have this
hardware feature; similarly, there is a provision for relocation relative to blank COMMON, even though this
requirement is not present in SDS 900 Series FORTRAN II.
In the following, a file is the total binary output from the assembly/compilation of one program or subprogram.
A fi Ie is both a physical and a logical entity since it can be subdivided physically into unit records and logically
into information blocks. While a unit record (in the case of cards) may contain more than one record, a logical
record may not overflow from one unit record to another.
1.
Type (T)
CO NTRO L WORD - 1st word in each type of record
~
~
Mode
(binary)
Word Count (C)
Field
Folded Checksum (FC)
contents
101
o
89
2 3 4
23
11 12
bit number
T
RECORD TYPE
000
Data Record (text)
001
External References & Definitions, Block & Program Lengths
010
Programmed Operator References and Definitions
011
End Record (Program or Subroutine end)
100 thru 111
Not Assigned
C = total number of words in record, including Control Word
Note that the first word contains suffic ient information for handl ing these records by
routines other than the loader (that is, tape or card dupl icate routines.) The format
is also medium-independent, but preserves the MODE indicator positions desirable
for off-I ine card-handl ing.
An exclusive OR checksum is used. If the symbol -- is used to denote exclusive OR,
and W. denotes the i-th word in the record, 1 < i
1
Fe
-
= (W 1'O-11--
< C,
_
(C) 0-11-- (C)12-23
where
C = W2 -- W3 -- ••• -- Wc
94
then
-- 07777
2.
DATA RECORD FORMAT (T=O)
Record
Type (T)
Control
Word
000
o
Load
Address
Word
~
~
~
Mode
(binary)
3~C~30
0
234
Data Word
Modifiers
(M)
~
Word 1
Folded Checksum
101
89
11 12
Load Address
Modifiers (A)
23
Word 2
Load Address (Relative or Absolute)
0
o
Data
Word
1
4 5
8 9
23
Instruction or Constant
o
Word 3
23
Words 3 thru n+2 contain instructions or constants, (where 1~~24)
Load address relocation word (present iff (M) (\l=l)
Load
Relocation
o
23
Blank common relocation word (present iff (M) f"\ 2=2)
Common
Relocation
u
Programmed
Operator
Relocation
Special
I/O
Relocation
Word n+3
Word n+4
23
Programmed operator relocation word (present iff (M).{"\ 4=4)
o
Word n+5
23
Spec ial Input/Output operation rei ocation (present iff (M) f\ 8=8)
o
Word n+6
23
95
Words n+3 thru n+6 are modifier words. Each bit in each of these words corresponds
to a data word (bits 0 thru 23 correspond to words 3 thru n+2, respectively). A bit set
to one (1) indicates that the specified data word required modification by the loader.
There are four (4) types of modification (and hence four possible modifier words) which
are indicated in data records. Presence of a modifier word is indicated by the M (data
word modifier) field in the load address word.
The load address is subiect to modification as indicated by the \I A" field of the load
address word as follows ((A) = 0 means absolute):
(A)f\l=l, current load relocation bias is added to load address
3.
EXTERNAL REFERENCES AND DEFINITIONS, BLOC K AND PROGRAM LENGTHS
(T= 1)
Control
Word
(Inc ludes labeled common, blank common and program. lengths)
Record
Type (T)
~
~
001
0
234
o
Mode
(binary)
4~C~31*
Folded Checksum
Word 1
101
8 9
11 12
23
* From 1 to 10 items per record
Common
or Program
Length
Item
C1
C2
C3
C4
C5
C6
C7
C8
Item
Type
External
Reference
Item
00000
C1
C5
01
o
23
C2
C3
C7
C6
Address
Modifiers (A)**
Item
T~
~
6 7 8 9
1 2
I
Length
Word
Length of Program or Common Block (L)
00
0
I}
1 to 8
char.
LABEL
C4
C8
I
}
Address of Last Reference
Chain
Word
000
1 245
8 9
23
96
Label
External
Definition
Item
~--------~~~~--------~~~~---------~¥7~3--------~~~8~----~IJr
Address
Modifiers (A)**
Item
Type
10
o
Absolute or Relocatable Value
Value
Word
000
8 9
1 2 4 5
Laool
23
External symbolic definitions indude subroutine "identification" as a subset and require
no special treatment of subroutines with multiple names. B = 1 if (L) is program length,
C
= 1 if (L)
is length of a labeled common block.
** See data record, load address word, for interpretation
External
Reference
with
Addend
Item*
l~)
C3
C4
C5
C6
C7
C8
~}
Chain
Word
000
not used
000000000
23
8 9
4 5
2
Label
Address of Last Reference
Address
Modifiers
~
Va I ue of Addend
8 9
0
Control
Word
C2
Item
Type
11
4.
C1
Addend
Word
23
PROGRAMMED OPERATOR REFERENCES AND DEFINITIONS (T=2)
Record
Type (T)
~
~
010
0
o
Mode
(Binary)
4.~C~31**
234.
Folded Checksum
Word 1
101
8 9
11 12
*One of these items for each unique reference; e.g., each of the following
references is represented by a separate item:
A+5, B+5, B+6, C+2, C+5
** From 1 to 10 items per record
97
23
Internal
Programmed
Operator
Item
Type
R
Sequence No.
00
Origin of Programmed Operator Routine
1
1 2
0
7
Programmed
Operator
Reference
Item
T
a
9
23
C1
C2
C3
C4
C5
C6
C7
ca
01
1 2
0
External
Programmed
Operator --<
Definition
7
~1
Not used
0
000000000000000
1
Item
Tvoe
10
Sequence No.
C~ar.
I to 8
MnemOniC
a
C4
C3
C7
C2
C6
C5
o
R
Sequence No.
I}
I
ca
}
1 to a Char.
Mnemonic
Origin of Programmed Operator Routine
R
1
789
1 2
23
R=l iff origin of Programmed Operator Routine is relocatable.
The sequence No. indicates the order in which the definitions or reference occurred
in the source program.
END RECORD (T=3)
5.
Record
Type (1)
Control
Word
Mode
(Binary)
2~C~4
101
0
011
8 9
234
0
11 12
Transfer Word
Modifiers (M)*
Length of
Program
Word 2
0000
000
0
23
l+Maxirnum Value of Location Counter
0
0
Transfer
Word
Word 1
Folded Checksum
4 5
I
8 9
Transfer Address
"BRU"
000001
23
23
89
Word 3
23
This may be followed by modifier words as described in Section 2.
*See data record description for interpretation
98
,
;
505
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37 Producer : Adobe Acrobat 9.13 Paper Capture Plug-in Modify Date : 2009:09:17 08:50:57-07:00 Create Date : 2009:09:17 08:50:57-07:00 Metadata Date : 2009:09:17 08:50:57-07:00 Format : application/pdf Document ID : uuid:3f87020e-a865-4cc6-a23d-f6bd838c1878 Instance ID : uuid:f4f3aa13-576f-4c6e-9cce-976a9957046e Page Layout : SinglePage Page Mode : UseOutlines Page Count : 106EXIF Metadata provided by EXIF.tools