Xerox 530 User manual

Xerox Extended Symbol
Xerox530 and Sigma
2/3
Computers
.Language and Operations
. Reference Manual
90
10
52F

© 1972, Xerox Corporation
Xerox
Extended
Symbol
Xlerox
530
and
Sigma
2/3
Computers
language
and
Operations
Reference
Manual
90
10
52F
Apri I 1976
XEROX
File
No.:
1
X23
XH36,
Rev. 0
Printed in U.S.A

REVISION
This
edition
merely
incorporates
the
90
10
52E-l
and
90
10
52E-2
revision
packages
into
the
manual.
Changes
in
the
text
from
that
of
the
previous
manual
are
indicated
by a
vertical
line
in
the
margin
of
the
page.
RELATED
PUBLICATIONS
Title
Publ
ication
No.
Xerox
530
Computer/Reference
Manual
90
1785
Xerox
Sigma
2
Computer/Reference
Manual
9009
64
Xerox
Sigma
3
Computer/Reference
Manual
90
15 92
Xerox
Real-Time
Batch
Monitor
(RBM)/RT,
BP
Reference
Manual
90
10
37
Xerox
Real-Time
Batch
Monitor
(RBM)/OPS
Reference
Manual
90
1555
Xerox
Real-Time
Batch
Monitor
(RBM)/Userls
Guide
90
1960
Xerox
Symbol/LN,
OPS
Reference
Manual
90
10
51
Manual
Content
Codes:
BP
-
batch
processing,
LN -
language,
OPS
-
operations,
RBP
-
remote
batch
processing,
RT
-
real-time,
SM
-system
management,
TS
-
time-sharing,
UT
-
utilities.
The
specifications
of
the
software
system
described
in
this
publication
are
subject
to
change
without
notice.
The
availability
or
performance
af
some
features
may
depend
on
a
specific
configuration
of
equipment
such
as
additional
tape
units
or
larger
memory.
Customers
should
consult
their
Xerox
sales
representative
fOI
details.
ii

CONTENTS
PREFACE
vi
Address LiteraIs
22
ADRL
23
1.
INTRODUCTIO N
5.
LOCATION COUNTERS AND PROGRAM
Programming Features__ SECTIONS
24
Error
Detection
____
Extended Symbol Language Locati
on
Counters
24
Extended Symbol Processor Setting the Location Counters
24
( ORG
24
LOC
25
2.
EXTENDED
SYMBOL
L/\NGUAGE BOUND
25
ELEMENTS
A
ND
SYNTAX 3
RES
26
COMMON
26
Language Elements
__
3 Program Sections
26
Characters
____
3 ASECT/CSECL
26
Symbols 3
Constants
____
4
Expressions 5
6.
EXTENDED
SYMBOL
DIRECTIVES
28
Litera
Is
_______
7
Syntax 8
DATA
28
Statements
____
8
DEF
29
Statement Continuatiion 9 DISP
29
Comment
Li
nes
___
9 DO/ELSE/FIN
30
Processing of Symbols
__
9 END
32
Defining Symbols
__
10
EQU
33
Redefinable SymbolL
10
GEN
33
Symbol References
__
10
GOTO
34
Classification of Symbols
10
IDNT
35
Symbol Tables
___
10
LBL
35
Absolute and Relocatable Values
11
LIST
35
Symbols
11
LOCAL
36
Expres'ions
11
PAGE
37
PCC
37
REF
37
3.
XEROX
530
AND SIGMA 2/3 MACHINE
S:STEP
37
INSTRUCTIONS
13
SET
38
SOCW
38
Class
1:
Memory Refere:nce Instructions
13
SPACE
38
Single Precision Clas;s 1 Instructions
13
SREF
38
Multiple Precision Class 1 Instructions
15
TEXT
39
Field Addressing Class 1 Instructions
15
TEXTC
39
Class
2:
Conditional
Br<elnch
Instructions
16
TITLE
39
Class
3:
Shift Instructions
16
Class
4:
Copy Instructions
16
7.
PROCEDURES
41
Class
5:
Input/Output
Control Instructions
___
17
Procedure Format
41
CNAME
41
4.
ADDRESSING
18
PROC
41
PEND
42
Argument Addressi
ng
Format
18
Procedure References
42
Direct
Addressing--
19
Procedure-LocaI Symbol
Reg
ions
42
Indirect Addressing
__
19
Intrinsic Functions
43
BASE
____
19
ABS
43
Symbolic-Relative Addressing
19
AF
44
Automatic Addressing
__
20
AFA
44
Address
Generation
Dia9nostics 20 AFNUM
45
Literal Pools
____
21
AFR
45
LPOOL
21
AT
45
iii

CF
46
D.
CONCORDANCE
PROGRAM
74
CFNUM
46
CFR
47
Introduction
74
UFV
47
Concordance
Listing
74
Sample
Procedures
48
Local
Section
74
Nonlocal
Section
74
Proc
Section
74
8.
OPERATIONS
50
Opcode
Section
74
Concordance
Control
Command
75
RBM
Control
Commands
50
Section
Control
Commands
75
JOB
Control
Command
50
Error Alarms
75
ASSIGN
Control
Command
50
Compatibility
76
DEFINE
and
TEMP
Control
Cards
(Temporary
Fi
Ie
Definition)
51
XSYMBOL
Control
Command
51
E.
EXPANSION
OF
SIGMA
3 SIMULATED
BA
51
INSTRUCTIONS
77
BO
52
CR
52
No
Indirect
Addressing
77
DW
52
Indirect
Addressing
77
GO
52
LO
52
LU
52
NP
52
PP
52
FIGURES
SL
52
SO
52
l.
Extended
Symbol
Character
Set
3
SS
52
UI
53
2
•.
Xerox
Sigma
Symbolic
Coding
Form 8
Updating
a
Source
Program
53
Standard
Object
Program Format
57
3.
Flowchart
of
DO/ELSE/FIN
Loop 31
Object
Module
Records
57
Load Items
57
4.
Deck
Setup
for
Assembling
Multiple
Assembler
Diagnostics
57
Programs Using
the
BA
Option
54
F1ags
57
Error
Messages
58
5.
Deck
Setup
for Assembl
ing
Multiple
Assembly Listing
63
Programs
Without
BA
Option
54
Summary Tables
63
6.
Deck
Setup
for Using
the
UI
Option
With
INDEX
79
the
BA
Option
55
7.
Deck
Setup
for Using
the
UI
Option
Without
the
BA
Option
56
APPENDIXES
8.
Sample
Update
Listing
With
Errors
58
A.
SUMMARY
OF
XEROX
530
AND
SIGMA
2/3
9.
Assembly Listing Format
64
INSTRUCTIONS
67
10.
Assembly Listing
64
Memory
Reference
Instructions
(C
lass 1)
67
Basic
Set
67
D-l.
Sample
Concordance
Deck
Setup
76
General
Register
Set
67
Floating-Point
Set
67
D-2.
Concordance
From
Xl
RAD
File
Multiple
Precision
Set
67
Following
an
Assembly
76
Field
Addressing
Set
68
Conditional
Branch
Instructions
(Class 2)
68
Shift
Instructions
(Class 3)
68
Copy
Instructions
(C
lass 4)
68
Input/Output
Instructions (Class 5)
68
TABLES
B.
EXTENDED SYMBOL DIRECTIVES
69
l.
Extended
Symbol
Operators
6
C.
INCOMPATIBILITIES
BETWEEN
EXTEN
DED
SYMBOL
AND
SYMBOL
73
2.
Error
Messages
59
iv

EJCAMPLES
21.
GEN2
Directive
34
22.
GOTO
Directive
35
l.
Statement
Continuaf'ion 9
23.
LOCAL
Directive
36
2.
Expressions Using +and -
Operators
12
24.
LOCAL
Directive
36
3.
Expressions Using
Miscellaneous
Operators
__
12
25.
LOCAL
Directive
36
4.
Automatic
Addressing
21
26.
REF
Directive
37
5.
LPOOL
Directive
__
21
27.
SET
Directive
38
6.
ADRL
Directive
__
23
28.
TEXT
Directive
39
7.
ADRL
Directive
23
29.
TEXTC
Directive
39
8.
ORG
Directive
__
25
30.
TITLE
Directive
40
9.
LOC
Directive
___
25
31.
Procedure
Definition/Procedure
Reference 42
lO.
BOUND
Directive
__
25
32.
Procedure-Loca
I Symbol Regions 43
1l.
RES
Directive
___
26
33.
ABS
Function
44
12.
ASECT
and
CSECT
Directive
27
34.
AF/AFA Function
44
13.
DATA
Directive
__
29
35.
AFNUM Function 45
14.
DEF
Directive
___
29 36.
AT
Function
46
15.
DO/FIN
Directives.
30
37.
CFNUM
Function
46
16.
DO/ELSE/FIN
Directives
32
38.
CFR
Function
47
17.
DO/FIN
Directives
_ 32
39.
UFV
Function
47
18. END
Directive
___
32
40.
AT
and
UFV
Functions
48
19.
GEN
Directive
___
34
41.
Conditional
Code
Generation
48
20.
GEN1
Directive
__
34
42.
Procedure
that
References a Procedure 48
v

vi
PREFACE
This manual describes the
Xerox
Extended Symbol assembly system
for
the
Xerox
530
and
Sigma
2/3
computers. It
defines
a
symbolic
programming
language
and
the
general
operations
of
the
processor
under
control
of
the
Real-Time
Batch
Monitor.
It
is
intended
for
use
as
a
reference
document
by
experienced
programmers
and
does
not
aim
to
be a programming
primer.
It
is assumed
that
the
reader is
familiar
with
the
basic elements
of
digital
computer
programming
and
with
the
description
of
the
Xerox
530 or Sigma
2/3
computers
as
given
in
the
appropriate
computer
reference
manual.

1.
INTRODUCTION
Extended
Symbol,
the
extended
assembly
system
for
Xerox
530
and
Sigma
2/3
computers,
is
both
a
programming
language
and
a
language
processor.
The
Extended
Symbo I
processor
accepts
as
input
a
source
program
coded
in
either
Symbol
or
Extended
Symbol,
processes
it,
and
outputs
an
object
module,
diagnostic
messages,
and
an
assembly
list-,
ing.
The
objed
language
format
is
described
in
the
RBM/
RT,
BP
Reference
Manual,
90
10
37;
the
diagnostic
mes-
sages
and
the
format
of
the
assembly
listing
are
described
in
Chapter
8
of
this
manual.
PROGRAMMING
FEATURES
Extended
Symbol
provides
the
programmer
with
a
number
of
convenient
features:
•
Forward
references,
literals,
and
external
definitions
and
references
simplify
the
task
of
referring
to
other
program
elements.
•
Local
and
nonlocal
symbols
can
be
specified
and
used,
•
Self-defining
constants
focilitate
use
of
hexadecimal
and
decimal
values
and
character
strings.
•
Expressions
consisting
of
terms
and
arithmetic
and
log-
ical
operators
may
be
used
as
arguments
in
machine
in··
structions
and
directives.
•
Automatic
oddressing
is
invoked
by
the
assembler
when
an
address
value
is
encountered
that
is
outside
the
range
allowed
for
the
stat'ement.
• ASECT
and
CSECT
directives
allow
the
partitioning
of
a
program
into
absolute
and
relocatable
sections.
• The
GOTO
directive
allows
the
assembler
to
condition-
a Ily a I
ter
the
sequence
in
Vlh
i
ch
statements
a re assernbI
ed.
• TEXT
and
TEXTC
directivl~s
simplify
the
coding
of
out-
put
messages.
•
User,-defined
procedures
allow
the
programmer
to
gen-
erate
different
sequences
of
code
as
determ
ined
by
conditions
existing
at
ossembly
time.
•
The
GEN
directives
provide
the
facility
for
generating
Class
1
and
Class
2
machine
instructions.
•
"Common"
space
may
be
shared
with
FORTRAN
or
other
Extended
Symbol
subprogrclms.
ERROR
DETECTION
During
assembly
a
source
progrclm is
checked
for
errors
in
usage
and
syntax.
If
an
error
is
found,
appropriate
noti
fi
cation
is
given
and
the
asse
mbl
yoperation
conti
nues
so
that
all
errors
may
be
10c:Jted
at
one
time.
An
assembly
is
terminated
pre-
maturely
(aborted)
only
if
an
irrecoverable
I/O
failure
oc-
curs,
or
one
of
the
assembler
tables
is
exceeded.
EXTENDED
SYMBOL
LANGUAGE
The
Extended
Symbol
language
is
comprised
of
a
set
of
com-
mands
and
the
qualifying
rules
for
constructing
program
statements
in
symbolic
terms.
There
are
two
classes
of
com-
mands:
mnemonic
representations
of
the
machine
instruc-
tions
and
assembler
(processor)
directives.
A
directive
is
a
command
to
"he
assernbler
that
allows
the
programmer
to
describe
or
select
assembly
options
at
cssem-
bly
time
and,
also,
allows
him
to
specify
such
elements
in
his
program
as
groups
of
data,
choracter
strings,
and
storage
areos,
The
format
for
coding
program
statements
and
the
rules
of
statement
structure
are
described
in thn
following
chapters.
EXTENDED
SYMBOL
PROCESSOR
The
Extended
Symbol
processor
is
a
Xerox
530and
Sigma
2/3
machine
language
program
that
operates
as
a
three-pass
pro-
gram
assembler
under
control
of
the
Real-
Time
Batch
Moni-
tor.
These
posses
are
called
the
encoder,
definition,
and
generation
passes.
Throughout
this
manual
the
processor
is
referred
to as
Extended
Symbol
or
"the
assembler".
During
the
encoder
pass,
the
assembler
checks
the
syntax
of
each
source
statement,
generates
the
assembler
IS
symbol
lable
and
converts
constants
to
binnry.
No
semantic
pro-
cessing
nor
symbol
definition
occurs
during
the
encoder
pass.
During
the
definition
pass,
the
assembler
a
Ilocates
space,
defines
syrnbols,
sets
up
symbol
and
literal
tables
as
required,
and
in
general
satisfies
the
many
interconnection
conditions
prescribed
by
the
source
program.
In
the
generation
poss,
Extended
Symbol
satisfies
forward
and
literal
references
and
produces
an
object
program,
diag-
nostic
messages,
and
on
as~E:mbly
listing.
External
references
(references
to
locations
in
ot!-.er
programs)
and
hrword
referenc:es
to
procedure
local
srmbolscannot
be
completely
processed
by
the
assembler;
however,
during
the
generotion
pas"
information
is
generated
in
the
object
pro-
grom so
thot
the
program
loader
may
satisfy
these
references
prior
to
program
execution.
In
operation,
the
'J"sernbler
maintoins
a
series
of
temporary
storage
areas:
1. Buffer
areas
for
input
of
program
statements
and
output
of
object
code
and
an
assembl>.:
listing.
2.
Local
and
nonlocol
symbol
tables
in
which
statements
and
data
identifiers
{along
with
their
storage
assignments
Introduction

and
perti
nent
characteristics)
are
placed
as
they
are
defined
or
referenced.
Local and
nonlocal
symbols
are
explained
in
Chapter
2.
3.
Literal
tables
in
which
literal
references are
accumu-
lated
until
the end
of
assembly.
4. Three
location
counters: a load
location
counter,
an
execution
location
counter,
and a common
location
counter
thot
provide
information
for
the
object
pro-
gram -and
consequently
for
the
loader.
The
execution
location
counter
is
used
by
the assembler
in
defining
symbols.
The
load
location
counter
is used
for
linking
externa
I symbol references.
The common
location
counter
is
affected
only
by the
COMMON
directive.
Common symbols may be
2 Extended Symbol Processor
referenced
as
reI
ocotabl
e operands;
however,
the
as-
sembler
will
not
generate
any
instructions
or
data
to
be stored
in
the common
area.
5.
Work
areas used
during
assembly.
6. Assembly
variables
and
flogs
in
accordance
with
directives.
7. Procedure
definitions
that
are
processed
only
when
they
are
referenced.
Supplied
with
the assembler
are
a set
of
standard procedures
which
define
the
Xerox
530
and Sigma
2/3
machine
opera-
tion
codes.

2.
EXTENDED
SYMBOL
LANGUAGE
ELEMENTS
AND
SYNTAX
LANGUAGE
ELEMENTS
Input
to
the
assembler
consists
of
a
sequence
of
characters
that
are
combined
to form
assembly
language
elements.
These
language
elements,
which
include
symbols,
constants,
ex-
pressions,
and
literals,
comprise
pmgram
statements
which
in
turn
comprise
a
source
program.
CHARACTERS
The
Extended
Symbol
character
set
is
shown
in
Figure
1.
Alphabetic:
A
through
Z,
and
$f!-Z" #,
L-J
(break
char-
acter
pri nts
as
01
underscore")
Numeric:
Special
Characters:
(:
is
reserved
alphClbetic
character)
o
through
9
Blank
+
Add
(or positi
ve va
I
ue)
Subtract
(or
negative
value)
*
/
&
I
II
Multiply,
indirect
addressing
prefix,
source
regish::r
inversion
designator,
or
comments
line
indi
cator
Divide
Decimal
point
Comma
Left
parenthesi
s
Right
parenthesis
Constant
del
imiter
(single
quotation
mark)
Logical
AND
Logical
OR
(vertical
slash)
Logical
exclllsiveOR
(vertical
slashes)
-,
Logical
NOT
or
complement
<
> Less
than
Greater
than
EquaI
or
introduces
a
litera
I
<=
Less
than
or
equal
>:=;
Greater
than
or
equal
Continuation
code
**
Binary
shift
TAB
Equivalent
to
blank;
used
to
tabulate
keyboard
printer
output
Figure
1.
Extended
Symbol
Character
Set
The
colon
(:)
is
an
a
Iphabetic
character
reserved
for use
by
standard
Xerox
software.
It is
included
in
the
names
of
Moni
tor
routines
(M
:POP)
and
various
mathematica
I
sub-
routines
(L:ATAN)
to
avoid
any
potential
conflict
with
user
symbols.
SYMBOLS
Characters
are
combi
ned
to
form
symbols.
Symbols
provide
programmers
wi th a
conveni
ent
method
of
i
denti
fyi ng
pro-
gram
elements
so
they
can
be
referred
to by
other
elements.
Symbols
must
conform
to
the
followi
ng
rules:
1.
Symbols
should
consist
of
1
to
8
alphanumeric
charac-
ters:
A-Z,
$,
Jl~,
#, :,
L-J,
0-9,
of
which
at
least
one
must
be
alphabetic.
No
special
characters
or
blanks
may
appear
in a
symbol.
Only
the
first
eight
charac-
ters
will
be
used
by
the
assembler
to
identify
the
pro-
gram
element
represented
by
the
symbol.
Anyremaining
characters
are
ignored
in
processing
the
symbol
and
(if
requested)
a
warning
error
is
output
on
the
listing.
2.
The
characters
$
and
$$
may
be
used
in
the
argument
field
of
a
statement
to
represent
the
current
value
of
the
execution
and
load
location
counters,
respectively
(see
Chapter
5);
these
characters
must
not
be
used
as
symbols
in
the
label
field
(see
"Syntax"
later
in
this
chapter).
The
following
symbols
are
valid:
ARRAY
R1
INTRATE
BASE
7TEMP
#CHAR
$PAYROLL
$
(execution
location
counter)
The
following
symbols
are
also
valid,
but
only
the
llnder-
I
ined
portion
is
considered
by
the
assembler
and
(if
requested)
a
warning
error
is
noted.
~A
TE01)NCREASE
Q!JJE~IV
~LUE
ABINVERSE
-----
The
following
symbols
are
invalid:
BASE
PAY Blanks
may
not
appear
in
symbols.
Special
characters
(~-::)
are
not
permitted
in
symbols.
Extended
Symbol
Language
Elements
and
Syntax
3

CONSTANTS
Acomtan*.
isa
self-defining
language
element.
Its
value
is
inherent
in
the
constant
itself,
and
it
is
assemhled
as
part
oJ
the
statement
in
which
it
appears.
Six' types
of
constants
are
permitted
in
Extended
Symbol
statements:
decimal
integer
constants,
character
string
cons'tontsi.
hexadecimal;
constants,
fixed-point
decimal
cons.tants,
floating-point
short
constants,
and
floati
ng-point
long
constants~
Deoimal
Integ~r
Constants
A
decimal'
integer
consttmt
consists
of
a
string
of
decimal
digits.
The
value
represented
by
the
decimal
digits
must be
in
the
rangeO'tb
32767. The
decimal
integer
is
converted
to
its.internal
binary
representation
and
retained
in olle full
word
of
memory.
Examples:
326
32767
5
0,
Character
String
Constants
-------------
A chara.cter.
string
constant
consists,of
1:
through
64
EBCDIC
characters
enclosed
by
single
quotation
marks (see
II
Extended
Bin'ary-Coded-Decimal
Interchange
Code"
in
the
Sigma 2
and
Sigma 3 Computer'
Reference
Manuals,
90 09
64
and
90
15
92,
or
Xerox 530
Computer/Reference
Manual;
90
19
60,
as
appropriate).
Example:
'ANY CHARACTER
INCLUDING
BLANKS'
Any EBCDIC
character
is
permitted
in a
character
string
constant.
Each
character
is
allocated
eight
bits
of
storage.
Because
single
quotation
marks
are
used
as
character
string
delimiters
by
the
asseinbll'!r, a
single
quotation
mark (or
apostrophe)
within
a
character
string
must
be
indicated
in
a
special'
manner.
An
apostrophe
in
the
string
is
represented
by
two'consecutive
apostrophes; for
example,
'AB"C"'
represents
the stri ng
AB'C'
Char.acter
strings
are
stored
two
characters
per
computer
word. The
descriptions
of IDNT,
LBL,
DATA, TEXT, TEXTC,
and
TITLE
directives
in
Chapter
6
include
positioning
infor-
mation
pertinent
to
character
strings used with
these
direc-
tives.
In
all
other
usages
character
strings must
not
contain
Ii
Language Elements
more
than
two
characters.
If
the
string
contains
two
char-
acters,
they
occupy
the
left
and
right
bytes
of
a
single
word.
If
the
string
contains
one
character,
it
occupies
the
right
byte
of
a word
and
the
left
byte
is
filled
with
a
zero
(i.
e.,
a null EBCDIC
character).
Hexadecimal
Constants
A
hexadecimal
constant
consists
of
a
string
of
1
through
16
hexadecimal
digits
enclosed
by
single
quotation
marks
and
preceded
by
the
letter
X.
Example:
X'9COl
F'
The
assembler
generates
four bits of,
storage
for. e.ach
hexa-
decimal
digitin.the
string.
Thus, four
hexadecimal
digits
fill
one
word
of
storage.
Hexadecimal
constants
are
right-
justified
in
their
storage
area;
if
the
number of
digits
is
not
a
multiple
of
4,
the
assembler
generates
one,
two,
or
three
leading
hexadecimal
zeros
in
the
leading
positions
of
the
storage
area.
The
hexadecimal
constant
in
the
example
above
would
be'
stored
as
word 1
word 2
~
~
Hexadeoimal
digits
and
their
binary
and
decimal
equivalents
are:
Hex. Binary
Decimal
Hex. Binary
Decimal
0 0000 0 8 1000 8
1
0001
1 9
1001
9
2 0010 2 A 1010 10
3 0011 3 B
1011
11
4 0100 4 C 1100
12
5
0101
5 D
1101
13
6 0110 6 E 1110 14
7
0111
7 F
1'111
15
The
Xerox
530
and
Sigma
2/3
Computer
Reference
Manuals
contain
further
information
about
hexadecimal
arithmetic
ane!
conversion
of
numbers from
hexadecimal
to
decimal
and
deci-
ma I to
hexadec
ima I.
Fixed-Point
Decimal
Constants
A
fixed-point
decimal
constant
consists
of
the
following
components
in
order,
enclosed
by
single
quotation
marks,
and
preceded
by
the
letters
FX:
1. An option:!!
algebraic
sign.
2.
d,
d.,
d.d,
or
.d,
where
d
is
a
decimal
digit
string.

3.
An
optional
exponent:
the
letter
E
followed
optionally
by
an
algebraic
sign,
followed
by
one
or
two
decimal
digits.
4.
A
binary
scale
specification:
the
letter
B
followed
op-
tionally
by
an
algebraic
sign,
followed
by
one
or
two
decimal
digits
that
designate
the
terminal
bit
of
the
integer
portion
of
the
constant
(i.
e.,
the
position
of
the
binary
point
in
the
number). Bit
position
number-
ing
begins
at
zero
and
refers
to
the
leftmost
bit
of
the
word
or
the
doubleword
in
which
the
constant
is
to
be
generated.
Items 3
and
4 may
occur
in
any
relative
order.
When
FX
constants
are
used as
explicit
arguments
in
a
DA
TA,n
directive
and
1 < n 5
4,
t'hey
are
treated
as
a
32-
bit
integerquantity(alignment
on
thebinarypointis
relative
to
this
32-bit
field)
and
are
generoted
as
such.
In
all
other
uses,
FX
constants
are
treated
as
16-bit
integers,
with
binary
point
alignment
relative
to
this
16-bit
field.
No
checking
is
ever
made for
truncation
from
the
right-
hand
side
of
an
FX
constant.
Loss
of
significance
on
the
left-hand
side
or
change
of
sign
is
flagged
as
an
error.
Example:
Statement
DATA
FX
I3.75B41
DATA,2
FX
I3.75B41
DATA,3
FX
':3.75B41
SUB
=FX'-.OS32B1SE+41
DATA
FX''l
BO'
GEN,S,S
FX
'3.75B41,1
Yloating-Point
Short
Constants
Generated
Hexa
....
decimal
Value
lEOO
1
EOO
0000
0000
1
EOO
0000
FF9S
(literal
value)
(error)
(error)
A
floating-point
short
constant
consists
of
the
following
components
in
order,
enclosed
by
single
quotation
marks,
and
preceded
by
the
letters
FS:
1. An
optional
algebraic
sign.
2.
d,
d.,
d.d,
or
.d
where
d
is
a
decimal
digit
string.
3.
An
optional
exponent:
the
letter
E
followed
optionally
by
an
algebraic
sign
followed
by
one
or
two
decimal
digits.
A
floati
ng-poi
nt
short
constant
requires two memory words
for
storage.
For this
reason,
a
floating-point
short
constant
may
appear
only
in
the
argument
field
of
a
DATA
directive.
Example:
Constant
Hexadecimal
Value
FS'l.
I
41100000
Floating-point
short
constants
have
a
magnitude
in
the
range
5.398xlO-79
to
7.237xl0
75
(i.e.,
16-
65
to
16
63
-
16
49
)
with
the
associated
precision
of
6 +
significant
digits.
That
is,
the
sixth
most
significant
digit
is
accurate,
while
the
seventh
will sometimes
be
accurate,
depending
on
the
value
of
the
constant.
Floati
ng-Poi nt Long
Constants
A
floating-point
long
constant
consists
of
the
followi ng
com-
ponents
in
order,
enclosed
by
single
quotation
marks
and
preceded
by
the
letters
F
L:
1.
An
optional
algebraic
sign.
2.
d,
d.,
d.d,
or
.d
where
d
is
a
decimal
digit
stri ng.
3.
An
optional
exponent:
the
letter
E
followed
optionally
by
an
algebraic
sign
followed
by
one
or
two
decimal
digits.
A
floating-point
long
constant
requires
three
memory words
for
storage.
For
this
reason
a
floating-point
long
constant
may
appear
only
in
the
argument
field
of
a
DATA
directive.
Example:
Constant
Hexadecimal
FL'-.9SEll
B19999990004
The
magnitude
of
floating-point
long
constants
is
the
same
as
for
floating-point
short
constants;
however,
floating-
point
long
constants
have
an
associated
precision
of
10+
significant
digits.
EXPRESSIONS
An
expression
is
an
assembly
language
element
that
repre-
sents
a
value.
It
consists
of
a
single
term
or
a
combination
of
terms
(multitermed)
separated
by
arithmetic,
logical,
or
relational
operators.
A
si
ngle-termed
expression
may
be
any
valid
symbol
refer-
ence
(previously
defined,
forward,
common,
or
external),
a
constant,
or
a
literal.
(Symbol
references
and
literals
are
described
later
in
this
chapter.)
A
multitermed
expression
may
contain
any
valid
symbol
reference
(previously
defined
or forward)
or
a
constant.
It
must
not
contain
literals,
forward
procedure
local
refer-
ences,
or
external
references.
Appropriate
error
messages
are
printed
if
any
of
these
conditions
is
violated.
Operators
and
Expression
Evaluation
A
single-termed
expression,
such
as
52
or $
or
AB,
takes
on
the
value
of
the
term
involved.
A
multitermed
expression,
such
as
INDX+4
or
ZD*S+XYZ,
is
reduced
to
a
single
value
by
the
assembler.
Language
Elements 5

The
value
represented
by a
multitermed
expression
must
not
exceed
the
16-bit
capacity
of
one
computer
word.
The
operators
that
may
appear
in
an
expression
are
shown
in
Table
1.
Multitermed
expressions
are
evaluated
as
follows:
1.
Each
term
is
evaluated
and
replaced
by
its
internal
value.
2.
Arithmetic
operations
are
performed
from
left
to
right.
Those
with
the
highest"binding
strength"
are
performed
fi
rst. For
examp
Ie:
A+B<C*D+E
is
evaluated
as if
it
were
(A +
B)
<((C *
D)
+
E)
3.
Division
always
yields
an
integer
result;
any
fractional
portion
is
truncated.
An
expression
preceded
by
an
asterisk
(*)
usually
denotes
indirect
addressing.
Used
as
a
prefix
in
this
way,
the
asterisk
does
not
affect
the
evaluation
of
the
expression.
If
an
asterisk
precedes
a
subexpression,
it
is
interpreted
as
a
multiplication
operator.
Table
1.
Extended
Symbol
Operators
Binding
Operators
Strength
Function
--,
7
Unary
not
-7
Unary
minus
+ 7
Unary
plus
** 6 Logical
binary
shift
(I
eft
sh
ift
if
secand
operand
is
positive,
right
shift
if
second
operand
is
negative)
* 5
Integer
multiply
/ 5
Integer
di
vi
de
+ 4
Integer
add
-4
Integer
subtract
< 3
Less
than
> 3
Greater
than
<=
3
Less
than
or
equa
I
>=
3
Greater
than
or
equa
I
-- 3 Equal
--,=
3
Not
equal
& 2 Logical
AND
II
1
Exclusive
logical
OR
I 1
Inclusive
logical
OR
6
Language
Elements
Logical
Operators
The
logical
NOT
(-,),
or
complement
operator,
causes
a
l's
complement
of
its
operand:
Value
3
10
Hexadecimal
Equiv_~L~
00
...
0011
00
...
1010
l's
Complement
------
11
1100
11
...
0101
The
binary
logical
shift
operator
C';*)
determines
the
direc-
tion
of
shift from
the
sign
of
the
second
operand:
a
negative
operand
denotes
a
right
shift
and
a
positive
operand
denotes
a
left
shift.
For
example:
5**
-3
results
in a
logical
right
shift
of
three
bit
positions
for
the
value
5,
producing
a
result
of
zero.
The
result
of
any
of
the
comparisons
produced
by
the
com-
parison
operators
is
a
if
"false"
1 if
"true"
so
that
Expre:sion
Result
3 >4 a 3 is
not
greater
than
4.
-,3=-4
a
the
16-bit
value
-,3
is
equal
to
11
..•
1100
and
is
not
equal
to
4;
(i.e.,
00
...
0100).
3-,:=:
4 3 is
not
equal
to
4.
-,
(3:'-4)
11
...
11
3 is
not
equal
to
4, so
the
resu~t
of
the
comparison
is a
which,
when
complemented,
becomes
a
16-bit
value
(all
l's).
The
logical
operators
&
(AND),
I (OR),
and
II
(Exclusive
OR) perform as
follows:
AND
First
Operond:
0011
Second
Operand:
0101
Result
of
&
Operation:
0001
OR
First
Operand:
0011
Second
Operand:
0101
Result
of
I
Operation:
0111
Exclusive
OR
First
Operanc~;
0011
Second
Operand:
0101
Result
of
II
Operation:
0110

Note:
E1
<E2<E3
cannot
be used
to
determine
whether
E2
is
within
the
limits
E1
and
E:3.
Instead
it
is
evalu-
ated
as if
it
had
been
written
as
(E
1< E2)< E3.
That
is,
the
triad
El <
E2
results
in a
value,
b,
of
0
or
1.
Then
this
value
is
\Jsed for
the
triad
b<
E3
to
yield
another
binary
result.
The
correct
form is
El
<E
2&E2
<E
3·
Parentheses
Within
Expressions
Mull"itermed
expressions
frequently
require
the
use
of
paren-
theses
to
control
the
order
of
evaluation.
Terms
inside
parentheses
are
reduced
to a
single
value
before
being
com-
bined
with
the
other
terms
in
the
expression.
For
example,
in
the
expression
ALPHA* (BETA+5)
the
term BETA+5 is
evaluated
first,
and
that
result
is
mul-
tiplied
by
ALPHA.
Expressions may
contoin
parenthesized
terms
within
paren-
thesized
terms:
DATA
+
(HRS/8~(TIME*'2*(AG+FG))+5)
The
innermost
term
(in this
example,
AG
+
FG)
is
evaluated
first.
Parenthesized
terms may
be
n(~sted
to
any
depth.
Expressions must
not
contain
two
consecutive
binary
oper-
ators.
The
assembler
distinguishes
between
the
unary
op-
erators
(-),
(+),
and(--,),
and
the
binary
operators
as
follows:
1.
An
operator
precedi
ng on
expression
may
only
be
a
unary
operator,
as in -27.
2.
The first
operator
following
a
tElrm
in a
multitermed
expression
must be a
binary
operator:
-l27~L:ary
binary
---unary
At~S
tL-unar
y
binary
In
general,
Extended
Symbol wi
II
accept
any
combination
of
operators
that
is
algebrait::ally
10~Jical;
that
is,
5*-BETA
5-*BETA is
permissible.
is
not
permissible.
Summary
of
Operator
and
Expression
Syntax
1. Labels (symbols)
and
constants
are
single-termed
expressions.
2.
If
El is
an
expression,
then (El) is
an
expression.
3.
IfEl
isanexpression,
then-Elp+E1and--.El
are
expressions.
4.
If
El
and
E2
are
expressions,
then
El
**E
2,
E1
*E
2,
E1
/E2'
El + E2, El -E2'
El
<E2' El
>E2'
El
<=E2'
El
>=E2,
El-,=E2,
El
&E2,
El
=E2,
E1
II
E2,
and
Ell
E2
are
all
expressions.
5.
Externa
I
and
forward
procedure
local
references
may
occur
only
as
single-termed
expressions.
UTERALS
Constants
provide
one
means
of
incorporating
data
directly
into
a
program
at
the
time
it
is
being
written;
literals
pro-
vide
another
means.
A
literal
is
written
as
a
constant
(decimal,
hexadecimal,
or
character
string)
or
symbol
refer-
ence
preceded
by
an
equal
sign.
The
literal,
in
contrast
to
a
constant,
is
not
processed
as
part
of
the
program
statement
in
which
it
appears.
Instead,
the
literal
is
evaluated
and
assigned
to
a
storage
location
in
a
literal
pool,
and
the
address
of
that
location
is
assembled
into
the
instruction.
Literals
are
useful
in
statements
that
require
the
address
of
a
data
value
rather
than
the
dota
value
itself.
Without
I
it-
erals
it
would
be
necessary
in
such
situations
not
only
to
enter
the
address
(or
symbolic
location)
of
the
data
value
into
the
statement,
but
also
to
establish
the
value
in
the
lo-
cation
referred
to
by using a DATA
directive,
for
example.
By
using a
literal,
the
value
can
be
written
directly
in
the
statement;
the
storing
of
the
value
in a memory
location
and
the
substitution
(in
the
statement)
of
the
value's
address
are
tasks
performed
automatically
by
Extended
Symbol.
A
literal
consists
of
an
equal
sign
followed
by a
single-
termed
expression
(other
than
a I
iteral)
or
an
equal
sign
followed
by a
multi-termed
expression.
The
value
represented
by a
literal
must
not
exceed
the
16-bit
capacity
of
one
computer
word.
Examples
of
valid
and
invalid
literals:
Literal
Notation
=-185
-=e'K'
::;::'ABC'
=X'5DF'
Description
Valid.
Decimal
value
-185
Valid.
Alphanumeric
constant
in
storage
as 10000100001110110010 I
o K
Inval
id.
Exceeds
1-word
capacity
Valid.
Hexadecimal
constant
in
storage
as
10000101011110111111 I
o 5 D F
Language
Elements
7

Literal
Notation
Description
---~~-
~---.--
-----
"'-XIAF6BE'
Invalid.
Exceeds
l-word
capacity.
cALPHA
Val
id.
Address
value
of
symbol ALPHA.
ALPHA
+3
-ALPHA
=*ALPHA
Valid.
Valid
(provided
ALPHA is
absolute).
Invalid.
Multiple
level
indirect
addressing
is
not
allowed.
When
the
assembler
encounters
a
literal,
it
checks
the
lit-
eral
for
validity,
generates
error
notations
if
necessary,
determines
the
literal
value,
allocates
storage
for
the
value
in a
future
literal
pool
(see
LPOOL
directive,
Chapter
4),
and
generates
an
address
poi
nting
to
the
I
iteral.
This
ref-
erence
address
is
used in
the
generation
pass for
assembling
the
stotement
in
which
the
literal
occurred.
SYNTAX
The
assembly
language
elements
may
be
combined
with
machine
instructions
and
assembler
directives
to
form
state-
ments
which
comprise
the
source
program.
STATEMENTS
A
statement
is
the
basic
component
of
on
assembly
language
source
program.
A
statement
is
also
called
a
source
statement,
a
program
statement,
or
a
symbolic
line.
Source
stlltements
are
written
on
the
standard
coding
sheet
shown in
Figure
2.
Fields
The
body
of
the
coding
sheet
is
divided
into
four
fields:
lobel,
command,
argument,
and
comments.
The
coding
sheet
is
also
divided
into
80
individual
columns.
Columns
1
through
72
constitute
the
active
I
ine;
columns
73
through
80
are
ignored
by
the
assembler
except
for
I
isting
purposes
and
may
be
used for
identification
and
a
sequence
number.
The
col
umns
on
the
codi
ng
sheet
correspond
to
those
on
a
standard
80-column
card;
one
line
of
coding
on
the
form
can
be
punched
into
one
card.
Extended
Symbol
provides
for
free-form
symbolic
lines;
that
is,
it
does
not
require
thot
each
field
in a
statement
begin
XEROX
PROBLEM
____________
_
SIGMA
SYMBOLIC
CODING
FORM
Identification
PAGE
______
OF
____
__
73
I I I I I I
PROGRAMMER
________
_
DATE
____________
__
80
LABEL
5 COMMAND
ARGUMENT
COMMENTS
10
15
20 25
30 35
40
45
50 55 60 65 70
72
I
IT
I I I I I , , I I
I I T I I I 1 I I I I I
ii'
I I
I I I 1 I I
I'
~TI·l-r~l~l~l-r~l-l~I,-~l·l-rl~~I~,·~
~~rTIT~~~"-r~-OTI4-~"-r~~"-~TO-r~I-r~-.+,,-r._,TI,-rTl.l-ri~l-···rr~I,-~,-~I-r~-T~~~~I~~~~'~
~~-rTI~r+~,~~-rTI~~~I~~-r'T,-~~'~~~~'-r~~I~~~--T~'l-r~-r~-rrT~~~r~'-~~I~
~~~I'~~~~~~~~,~~-,rT~~',~~~-~I-r~-~,"~-r,·,-r~I~I-rTl,-rTl'I-r1
~-rl~I_r~,_~_r~l_rl-
~-r~,~~
·1
'"
1 I I I I I I f I I
~~~"~~~~I-~~"~I~~,-~~-~·rl"rTlll-ri
'~~~,~.-r~,-r~-IT,.-~I,rr~~I,-r~-rT~-r~-~I.-~-I~
........
-..-
........
-,-.,...-,-4-+--.-
,
",,---.-.,.,.
,+-f---.--'T~-.-'---'----rT---'--'--'-'-T-·-r-r-r~,-+-~~"T,-r"'T"'"'T--r--r-r-r-~'-r-""""""-T"""'-~""T-"'-""""-"'--r,--r-~-r~
1--1
~-~'~T~rrTl--r-~~,~rT--r-'~~~~'~~II--r-~~I~~~ITI--r-~T"TI~~,,-r~~I~~-r~I~~~I'---'-~~I~
~~~'-""'-'-~~-r
-r,-~,-rt'-I'~""'-'--rr.-rTf-r~-rT1-r~-r~~"rr~~~~~r('-~-r,.....~~-r~-r
..
~
I I , I I I I , I I I ,
T 1 ,
,1,
I I I , I I 1 I
T I I , r , , 1 I I I 1 I I
il'
I I I
T , I I T I
IT'
-"--ri-I"~rT.-,,......-rlTI,I_r""""'rTl'~rT'-rTI4
~~..-r'l--r--~~"
1~"-OTI4-~--'I-"'-·
.,......,r-r-.,..I.-~,-.,...-,-
,,,,,,-,,-,--'-+-,-.-r-rl
.....
I--.-~r-T'""_I'
,....,...
.
.,
_.
,'·-rl
..........
--r-
......
--r.~~
.....
,---.-r-r-r-r-T
,-.-..,......,.-,.-,-,~
T I I I I I I I I I I I I I I
r.'-rT,-"1-~'~"'-"I4-~--"--r--.,......,r-r-,,,,,---.-~-r~,-r~-"'-+-'-·~'i-r~~I'--~
'-"-'-'I~~rr""l-rTO-'-~I-r.,......,-~,-r~-,~
~.-r-r,-"",-,-~~I""",-r,~~"~""-rr""-~~r~'~~I'~-"-'II,-.~r-r-~-r""--rr,,r-r-~~'-rT""-'---'--'-""'-'-·~~---'--r-Tl~
I I 1
...
·......--,.-.....--r---.---.--~·""T"""1-r-"T,-+--r-~·-r---,----.r-r"""j1r-r--.--r-r-r-,r-r-r--rr.-~-r-rT,-,.-,-·--.-~---.-..,....,.
I .....
, I I I I
r-rT--r-TI'-""'-'-"!i'---'-~-I',-r-"-'-'-""r-r'-rT---.-~-r~-r~~,,--r""""~~I~
I I I I , I , I I ,
I I I ,
I"-'---r--r
, I I I I
.....,-
,
r-""-rT,-~--Hr--.--"-..--.---r-"",+t-.,-,,-.-~,r-r-II---'-"T""T'-,-r
,-r...--r-,rl--.-.---."-,--.,......,r-r-,,.-..--r--'--T"""T"
I-'~·'-'---r-rl-'I
-.-r-r--r-I
-,-I---r-,-,-.-.,.....,...~
1 1 I 1 I I
~~-.-rT-,-,".,......,~II-r"-rTT.,..-rT---.-",-r~-,~~
T 1
~"I""I'
'I'
'I
'I
Figure
2.
Xerox
Sigma
Symbolic
Coding
Form
8
Syntax

in
a
specified
column
(with
the
exception
of
the
label
field).
The ruI
es
for
writi
ng
free-form
symbol ic
lines
are:
1. The
assembler
interpret's
the
fields
from
left
to
right:
label;
command;
argument;
comments.
2.
A
blank
column
terminates
any
field
(except
the
com-
ments
field,
which
is
terminated
at
column
72
on
card
input
or
by a
new
line
character
on
paper
tape
input).
3.
One
or
more
blanks
at
the
beginning
of
a
line
specifies
there
is
no
label
field.
4. The
label
field,
when
present,
must
begin
in
column
1.
5. The
command
field
begins
with
the
first
nonblank
col-
umn
following
the
label
field
or
in
the
first
nonblank
columnfollowingcolumn
1
if
th'e
label
field
is
omitted.
6. The
argument
field
begins
with
the
first
nonblank
col-
umn
following
the
command
field.
An
argument
field
is
designated
as
blank
in
either
of
two
ways:
a.
Eleven
or
more
blonk
columns
follow
the
command
field.
b.
The
end
of
the
active
line
(column
72) is
encoun-
tered,
less
than
10
blank
columns
appear
after
the
command
field,
and
the
active
I
ine
is
notcontinued.
7. The
comments
field
beSJins in
the
first
nonblank
column
following
the
argument
field
or
after
at
least
11
blank
columns
following
the
command
field
when
the
argument
field
is
empty.
A
source
statement
may
consist
of
one
to
four
entries
written
on
a
coding
sheet
in
the
appropriate
fields:
a
label
field
entry
(optional),
a
command
field
entry
(required),
an
argu-
ment
field
entry
(usually
required),
and
a
comments
field
entry
(optional).
A
label
entry
is a symbol
that
identifi,;!s
the
statement
in
which
itappears.
The
label
enables
a
programmer
to
refer
to
a
spe-
cific
statement
from
other
statements
within
his
program.
The
command
entry
is a
mnemonic
code
representing
a
machi
ne
i
nstructi
on
or
assembler
directive
specifyi
ng,
respectivel
y,
the
machine
operation
or
assemblerfunction
to
be
performed.
A
commond
entry
is
required
in
every
()ctive
line.
Thus,
if
a
statement
I
ine
is
entirely
blank
following
the
label
field
or
if
the
command
entry
is
invalid
(i.
e.,
notan
acceptable
instruc-
tion
ordirective),
the
assemblerdecklres
the
statement
in
error,
generates
a word
of
all
zeros
in
the
object
program,
and
flags
the
statement
in
the
assembly
listing.
The
mnemonic
codes
for
machi
ne
i
nstructi
ons
and
assembler
directives
recognized
by
the
assembler
are
listed
in
Appendixes
A
and
B,
respectively.
An
argument
entry
consists
of
one
or
more
symbols,
con-
stants,
I
iterals,
or
expressions
separa'red
by
commas.
The
argu-
ment
entries
for
machine
instructions
usually
represent
such
things
as
storage
locations
or
const<:mt
values.
Arguments
for
assembler
directives
provide
the
information
needed
by
Extended
Symbol
to
perform
the
designated
operation.
A
comments
entry
may
be
any
information
the
user
wishes
to
record.
It is
read
by
the
assembler
and
is
output
as
part
of
the
source
image
on
the
assembly
listing.
Comments
have
no
effect
on
the
assembly.
STATEMENT
CONTINUATION
The
semicolon
(;) may
be
used
in
a
statement
to
signal
the
continuation
of
the
statement
on
the
subsequent
lines.
This
continuation
code
may
be
placed
following
a
label
entry,
following
a
command
entry,
or
within
an
argument
entry.
It
must
not
follow
the
last
character
of
the
label
orcommand
entry.
If
it
is
within
a
character
string
enclosed
by
single
quotation
marks,
or
is a
character
in
the
comments
field,'the
semicolon
does
not
cause
continuation.
A
maximum
of
two
continuation
lines
may
be
used
for
each
statement.
Example
1.
Statement
Continuation
BEGIN
LDA
A·
,
Continuation
NEW
-tB
TEXT
'A;B
'
LOCAL
A, START, R
1,
;
; is
not
a
continua-
tion
character
D,RATIO,B12,
i
Continuation
C,MAP
Leading
blanks
on
continuation
lines
are
ignored
by
the
assembler.
Thus,
significant
blanks
that
must
follow
label
or
command
entries
must
precede
the
semicolon
indicating
continuation.
ANS
LDA The
blank
that
ter-
SUM" 1
minates
the
command
field
precedes
the
semicolon.
COMMENT
LINES
An
entire
line
may
be
used
for a
comment
by
writing
an
as-
terisk
in
column
1.
All
valid
characters
may
be
used
in
comments.
Extensive
comments
may
be
written
by
using
a
series
of
lines,
each
with
an
asterisk
in
column
1.
The
assembler
reproduces
the
comment
lines
on
the
assembly
listing
and
counts
comment
lines
in
making
line
number
assignments.
PROCESSING
OF
SYMBOLS
Symbols
are
used
in
the
label
field
of
a
machine
instruction
to
represent
its I
ocati
on
in
the
program.
In
the
argument
field
of
an
instruction,
a symbol
identifies
the
location
of
an
instruction
or
a
data
value.
The
treatment
of
symbols
that
appear
in
the
label
orargument
field
of
an
assembler
directive
varies.
The
description
in
the
following
chapters
define
the
use
of
symbols
in
directives.
Processing
of
Symbols
9

DEFINING
SYMBOLS
Asymbol becomes
"defined"
by
its
appearance
as a label
entry
on
machine
instructions
and
certain
directives.
"Defined"
means
that
it
is
assigned a
value.
The
definition,
assigned to
the
symbol by
the
assembler, depends
on
assembly
conditions
when
the
symboI
is
encountered,
the
contents
of
the
command
field,
and
the
current
contents
of
the
execution
location
counter
(see
Chapter
5').
Any
machine
instruction
may
be
labeled;
the
label
is assigned
the
current
value
of
the
execution
lacation
counter.
Information
regarding
the
use
of
labels
in
directives
is
con-
tained
in
the
description
of
each
directive.
Note:
The use
of
labels
isaprogrammeroption,
andasmany
or
as few
labels
as
desired
may be used. However,
since
symbol
defining
requires
assembly time
and
storage
space,
extraneous
labels
should be
avoided.
REDEFINABLESYMBOLS
Two
directives,
DOandSET,
establish
redefinable
symbols.
These symbols
are
redefi ned by
the
assembler
during
the
pro-
cessing
of
a
DO-loop
(see
DO
Directive,
Chapter
6)
or
by
a
subsequent
SET
di
rective
(see
SET
Directive,
Chapter
6).
SYMBOL
REFERENCES
A symbol used in
the
argument
field
of a
machine
instruc-
tion
or
directive
is
called
a symbol
reference.
There
are
three
types
of
symbol
references.
Previously
Defined
References
A
reference
made
to
a symbol
that
has
already
been
defined
is a
previously
defined
reference.
All
references
to
such
symbols
are
completely
processed by
the
assembler
during
the
definition
pass. Previously defi ned
references
may be
used in
any
machine
instruction
or
directive.
Forward References
A
reference
made b a symbol
that
has not
yet
been
defined
is
a forward
reference.
Forward
references
are
defined
during
the
definition
pass,
and
machine
instructions
that
reference
them
are
completely
assembled during
the
generation
pass.
Forward References (Procedure Locals)
Forward
references
to symbols
declared
local
within
a
pro-
cedure
are
incompletely
assembled. The
object
code
gen-
erated
for such
references
allows
the
forward
references
and
their
associated
definitions
to be
linked
at
load
time.
The load
location
counter
is
used for this
linking
operation.
A forward
reference
to a
procedure
local
symbol must not
be a term
in
a multi termed
expression.
Any
machine
instruction may use a forward
reference.
Only
the
GOTO,
LOCAL,
REF,
SREF,
DEF,
GEN,
GEN1,
GEN2,
ADRL, and
DATA
directives
may use forward
references.
10 Processing of Symbols
ExternaI
References
A
reference
made
to
a symbol
that
is
defined
in
a program
other
than
the
one
in
which
it
is
referenced
is
an
external
reference.
A program
that
defines
external
references
must
declare
them as
external
by
use
of
the
DEF
directive
(see
Chapter
6).
An
external
definition
is
output
by
the
assembler
as
part
of
the
object
program for use by
the
loader.
A program
that
uses
external
references
must
declare
them
as such by use
of
a
REF
or
SREF
directive
(see
Chapter
6).
A
machine
instruction
containing
an
external
reference
is
incompletely
assembled. The
object
code
generated
for
such
references
allows
external
references
and
their
asso-
ciated
external
definitions
to
be
linked
at
load
time.
The
load
location
counter
is
used for
the
linking
operation.
An
external
reference
must
not
be a term in a multitermed
expression.
Any class 1
machine
instruction
(see
Chapter
3)
may
contain
an
externa
I
reference.
ExternaI
references
are
not
allowed
in
any
directive
except
GEN,
GEN1,
DATA, ADRL,
REF,
and
SREF.
CLASSIFICATION
OF
SYMBOLS
Symbols may be
classified
as
local,
procedure-local,
or
nonlocal.
A
local
symbol
is
a symbol
that
is
defined
and
referenced
within
a
restricted
program
region.
The program
region
is
designated
by
the
LOCAL
directive
(see
Chapter
6); this
directive
also
declares
which
symbols
are
to
be
local
to
the
region.
A
procedure-local
symbol is a
local
symbol
that
is
defined
and
referenced
wi
th
ina
parti
cu
lar
procedure
(see
Chapter
7).
A symbol
not
declared
as
local
or
procedure-local
by use
of
the
LOCAL
directive
is a
nonlocal
symbol. A
nonlocal
symbol may be
defined
and
referenced
in
any
region
of
a
program
including
local
and
procedure-local
symbol
regions.
Note
that
the
same symbol may be both
nonlocal
and
local
(or
procedure-local)
in
which
case
the
nonlocal
and
local
forms
identify
different
program
elements.
SYMBOL
TABLES
Extended Symbol
maintains
three
internal
symbol
tables
in
which
it
stores
each
symbol
along
with
its
assigned
value
and/or
control
information
pertinent
to
that
symbol. These
tables
are
the
nonlocal
symbol
table,
the
local
symbol
table,
and
procedure-local
symbol
table.
The
nonlocal
symbol
table
contains
nonlocal
symbols
and
is
active
throughout
an
assembly.
The
local
symbol
table
contai
ns
symbols
that
are
declared
to
be
local
(see LOCAL
directive,
Chapter
6)
to
a
region
in
the

program. This
table
is
temporary
and
may
be
erased
and
re-
establ
ished
with
new
symbols by a
subsequent
LOCAL
directive.
The
procedure-local
symbol t(lble
contains
symbols
that
are
declared
to
be
local
to
a
particular
plIOcedure (see
II
Proce-
dures
ll
,
Chapter
7). Each symbol
in
a
local
directive
within
a
procedure
causes
the
previous
definition
of
that
symbol
to
be
temporari
Iy
suspended,
and
the
symbol is
set
as
unde-
fined
in
the
current
procedure
local
sY'mbol
table.
At
the
end
of
the
procedure,
the
last'
previously
suspended
local
or
procedure-local
definition
of
the
syst,em is
reactivated.
When
the
assembler
encounters
a symbol in
the
label
field,
it
refers
to
the
last
active
local
or
procedure-local
symbol
table
(if assembl ing a
local
or
procedure-local
regi
on,
re-
spectively);
if
necessary,
it
then
refers
to
the
nonlocal
sym-
bol
table.
If
I'he symbol
is
not
in
an
active
table,
the
symbol,
its
value,
and
control
information
are
entered
in
the
appro-
priate
table.
Atthispoint,
the
symbol is
completelydefined.
If
the
symbol is found in 0
table,
one
of
the
following
con-
trol
conditions
applies
and
is
indicated
in
the
symbol's
con-
trol
information.
1.
2.
3.
4.
Symbol
Control
Local
or
procedure-local
and
not
previously
defined.
Previously
defined
in
the
approprial'e
table.
Dec
lared
external
to
pro--
gram
being
assembled
by
REF
or
SREF.
Dec Ia red
externa
I by
DE
F;
defi
ned
wi
thin
this
program.
5.
Previously
referenced
but
not
defi
ned.
Result
The symbol
becomes
defined.
Symbol is
taggedasmulti-
defined
and
retains
the
fi
rst
address
vaI
ue
-
an
error
condition.
Provides
information
in
object
program for
loader
to
complete
linkages.
Defi nes
the
symbol
and
provides
object
program
information
tor
the
loader.
Provides
control
i
nforma-
tion
for
completion
of
references
in
generation
pass. The symbol is
de-
fined
at
this
point.
When
the
assemblerenc:ounters
a symbol in
an
argument
field
it
refers
to
the
last
active
locol
or
procedure-local
symbol
table
(if
assembling
a
local
or
procedure-local
symbol
region,
respectively);
if
necessalY,
it
then
reFers
to
the
nonlocal
symbol
table
to
determine
if
the
symbol has
already
been
defined.
If
it
has,
the
assembler
obtcdns
information
about
the
symbol from
the
table
and
is
then
able
to
assemble
the
appropriate
object
program
information.
(Actual
assembly
occurs
during
the
generation
pass;
entries
into
symbol
tables
occur
during
the
definition).
If
the
!iymbol is
not
in
any
active
symbol
t~ble,
the
assembler
enters
its name
and
con-
trol
information
in
the
appropriate
table
but
does
not
assign
an
address
value
until
the
symbol is
defined
in
the
label
field.
Symbols
are
entered
in
the
nonlocal
table
unless
they
have
been
declared
as locol by use
of
the
LOCAL
directive.
Symbols dec:lared
CIS
local
ore
entered
in
either
the
active
local
or
the
active
procedL,re-local
symbol
table.
If
any
undefined
symbols
remain
in
the
nonlocal
symbol
table
at
the
end
of
an
assembly,
their
definitions
are
declared
'unknown
'
and
appropriate
messages
are
produced.
Error
messages
are
not
produced
for
undefined
local
or
procedure-
local
symbols
that
are
not
referenced
within
that
region.
ABSOLUTE
AND
RELOCATABLE
VALUES
The
value
of
a symbol
or
expression
may
be
absolute,
re-
locatable,
or
common
relocatable.
An
absolute
value,
which
is
assigned
at
assembly
time,
is
the
same
value
that
wi
II
be
used by
the
program
at
execution
time.
A
relocat-
able
or
common
relocatable
value
may
be
altered
by
the
loader
at
execution
time.
SYMBOLS
A symbol is
assigned
an
absolute
value
by
one
of
the
following
methods:
1.
By
equating
the
symbol
to
an
absolute
numeric
quantity.
2.
3.
SUM
EQU
2
SUM is
assigned
the
absolute
value
2.
By
equating
the
symbol
to
an
absolut,e
expression.
A
B
ANSWER
EQU
RES
EQU
EQU
$
10
$
A - B
ANSWER
is
assigned
the
absolute
value
-10.
By
using
the
symbol
as
a
label
entry
in
absolute
pro-
gram or program
secti
on
(see
Chapter
5).
The
value
of
an
absolute
symbol
does
not
change,
even
if
it
is
part
of
a
relocatable
program (a program
that
can
be
executed
anywhere
in memory).
A symbol has a
relocatable
value
unless
declared
absolute
as
described
above.
The
value
of
a
relocatable
symbol may
be
altered
by
the
loader
when
the
symbol is a
part
of
a
relocatable
program;
i.
e.
I
the
loader
wi
II
add
the
reloca-
tion
bias
to
each
symbol used as a
label
entry
in
a
re-
locatable
program
or
program
section
(see
Chapter
5).
A symbol is common
relocatable
if
it
appeared
in
the
label
field
of
a
COMMON
directive.
,
EXPRESSIONS
The
value
of
a
single-term
expression
has
the
same
attributes
(absolute,
relocatable,
or common
relocatable)
as
the
single
symbol or
constant
of
which
it
is
composed.
The
value
of
a
multi-termed
expression
will
be
absolute
if
only
absolute
terms
are
used
in
the
expression.
All
op-
erators
in
Table
1 may
be
used
to
combine
absolute
terms.
Absolute
and
Relocatable
Values
11

A m'i..dti-termed expression may
be
composed
of
absolute,
reldcdtdble,
and
common
relocatable
terms,
subject
to
the
restrictions
itemized
below.
IIOperand
ll
refers
to
a
single
symbol
or
constant,
or
to
the
value
of a subexpression
at
the
time
it
is-combined
into
the
expression
with
one
of
the
operators
shown in
Table
1 (see IIOperators
and
Expression
Evdl
uation
II
edrlier
in this
chapter)
..
• The
relational
operators,
<,
<=,
>,
>=,
=,
and
-'=,
require
that
both
operands
be
of
the
same mode
(ab-
solute,
relocatable,
or common
relocatable).
• The
operators
*
and
/
and
the
logical
operators,
...."
**,
&,
I,
and
II
may not
be
used
with
a
relocatable
or common
relocatable
operand.
•
In
evaluating
an
expression,
the
assembler
maintains
a
count
of
the
number
of
terms
added
or
subtracted
that
are
relocatable
or
common
relocatable.
A
sep-
arate
counter
is
used for
the
two
relocation
types
and
each
counter
is
incremented
or
decremented
by 1
whenever
a term
of
the
corresponding
relocation
type
is
added
to
or
subtracted
from
the
expression.
The final
value
is
absolute
if
both
counters
are
equal
to
O.
If
the
final Cdunt in
one
(and
only
one)
of
the
relocation
counters
is
equal
to
+1,
the
value
of
the
expression
is
relocatable
or common
relocat-
able,
depending
on
which
counter
is
equal
to
+1.
Any
other
accumulation
in
the
two
relocation
coun-
ters
is
an
error
and
results in a
diagnostic
frag.
Example 2. Expressions Using +
and
-
Operators
A's5ume
Rf,
R2,
and
R3
are
program
relocatable
terms;
C1'
and
C2
are
common
relocatable
terms;
and
A1
and
-A2
are
absolute
terms.
Expression: R1±Al I
Legal,
program
Common
count:
0 0
Relocatable
count:
1 1
relocatable
-Expression
Cl±A1
) LegaI, common
' Comnion
count:
1 1
Relocatcible
count:
0 0
relocatable
12 Absolute
and
Relocatable
Values
Expression: R1+R2-Cl-R3+C2j
Legal,
program
Common
count:
o 0
-1
-1
0
Relocatable
count:
1
2.
2 1 1
relocatable
Expression: -R1+Al+R2 )
Common
count:
0 0 0
Legal,
absolute
Relocatable
count:
-1
-1 0
Expression: Rl+A1+C1 )
Illegal,
diag-
Common
count:
0 0 1
Relocatable
count:
1 1
nostic
error
Expression:
R1+A
1+R2
I
Illegal,
diag-
Common
count:
0 0 0
Relocatable
count:
1 1 2 nostic
error
Expression: A1±A2
jlegal,
absolute
Common
count:
0 a
Relocatable
count:
0 0
Example 3. Expressions Using
Miscellaneous
Operators
R1,
R2, R3,
C
1,
C2,
A 1
and
A2
have
the
same
mean-
ings
as
in
Example
2,
above.
Expression
Al
*
A2
A1 *
(R
1-R2)
(C1-C2)/A
1
R1
*
A1
C1-C2/A
1
A1
&A2
A1
**
(A2-R1+R2)
-A1
Result
)
legal,
absolute
}
Illegal,
diagnostic
error
-,(C
l-C2+A
1)
Legal,
absolute
R1....,=R2
C1
>
C2
A1 >
(R2
>
R3)
A1
&
R1
-R1
R1
<=
C1
A
1>
R2>
R3
C1 ** A 1
R1
<
R2
<
R3
] Illegal, diagnosfic error

3.
XEROX
530
AND
SIGMA
2/3
MACHINE
INSTRUCTIONS
Xerox
machine
instructions
may
be
written
symbolically
and
combined
with
other
assembly
language
elements
to
form symbol
ic
instruction
st(ltements.
A
symbolic
instruction
statement
consists
of
four
fields.
Fi
eld
Contents
Label
Any
valid
symbol. Use
of
the
label
entry
is
optiona
I.
When
present,
the
symbol may
be
referenced
by
other
instructions
and
direct
i
ves.
Command
Any
mnemonic
operation
code
listed
in
Appendix
A.
Argument
One
or more
subfields
such
as
elll
indirect
address
designator,
an
argument
address
ex-
pression,
a
post-index
expression,
a
dis-
placement
expressi
on, a
base
address
speci-
fication
(pre-indexing),
or
a
shift
count,
dependi
ng
on
the
speci
fie
instruction.
Comments
Any
remark
explaini
ng
the
specific
pur-
pose
of
an
instruction
or
the
overall
func-
tion
of
the
program.
The
Xerox
machine
instructions
recc,gnized
by
Extended
Symbol
are
described
below
and
in
Appendix
A.
The
syn-
tactical
rules
used in
the
instruction
descriptions
of
Appen-
dix
A
are
as
follows:
1.
Underscored
items
are
the
required
parts
of
a
symbolic
instruction
statement.
2.
Nonunderscored
items
me
optional
parts
of
an
instruc-
tion
statement.
3.
m
designates
a
mnemonic
operation
code.
4.
*
designates
indirect
addressin~~
for
Class
1
instructions;
for
Class
4
instructions,
it
indicates
that
the
contents
of
the
source
regisl'er
specified
by
the
instruction
are
tobe
inverted
(onels
complemented)
before
the
operation
is
performed.
5. a
designates
the
(lrgument
address
used in
the
instruction.
6.
x
designates
post-inde)<ing
(with
index
register
1);
if
x
i:-
0,
perform i
ndexin~~;
if
x = 0
or
blank,
no
indexing.
7. b
designates
addressing
relative
to
the
base
register
(with
index
register
2).
This is
(II
so
called
pre-indexing.
If
b
=I
Or
base-relative
addressing
is
used,
and
the
argu-
ment
address
represents
the
displacement
value.
If
b
=0
or
is
blank,
the
assembler
may
automatically
impose
base-relative
addressing
on
the
instruction,
depending
on
the
value
of
"a"
and
on
whe,ther or
not
the
BASE
directive
option
is
active.
8.
c
designates
a
count
used
with
the
Shift
instruction.
9. s
designates
the
source
register
used
with
the
Copy
instruction.
10. d
designates
the
destination
register
used
with
the
Copy
instruction.
There
are
five
classes
of
machi
ne
i
nstructi
ons for
the
Xerox
530
and
Sigma
2/3
computers:
memory
reference,
conditional
branch,
shift,
register
copy,
and
input/output
control.
CLASS
1:
MEMORY
REFERENCE
INSTRUCTIONS
SINGLE
PRECISION
ClASS
1
INSTRUCTIONS
Class
1
instructions
may
reference
any
location
in memory
through
use
of
the
various
addressing
techniques
and
may
appear
in
anyone
of
the
following
forms:
1.
Nonrelative
Addressing
2.
o
~~
,I~I~I~I~I.
~~~:~::",,1
The
reference
address
is
the
value
of
the
address
field.
Base-Relative
Addressing
The
reference
address
is
equa
I
to
the
va
lue
(0
to
+255)
in
the
displacement
field
plus
the
16-bit
base
address
value
in
index
register
2.
3.
Self-Relative
Addressing
The
reference
address
is
equal
to
the
value
(-256
to
+255)
in
the
displacement
field
plus
the
16-bit
instruction
ad-
dress
value
in
the
H
register.
Since
the
H
register
con-
tains
the
address
of
the
instruction
being
executed,
the
reference
address
produced
is
relative
to
the
instructionls
own
location.
The
value
in
the
displacement
field
is
treated
as
an
8-bit
positive
integer
if
bit
7 is a
0,
and
as
a
9-bit,
two's
complement
negative
integer
if
bit
7
is a 1. Thus
the
reference
address
derived
during
pro-
gram
execution
will
be
the
current
instruction
address
plus
the
sign
extended
displacement
value
with
the
sum
treated
modulo
216.
In
all
three
forms
of
memory
reference
instructions,
the
reference
address
may
be
further
modified
to
produce
the
final
or
effective
address,
depending
on
bits
5
and
6
of
the
instruction.
If
bit
5 is a 1,
the
reference
address
will
be
treated
as
an
indirect
address;
that
is, a
16-bit
direct
address
value
will
be
obtained
from
the
location
specified
by
the
reference
address.
If
bit
5 is a
0,
the
direct
address
is
the
same
as
the
reference
address.
If
bit
6 is a 1,
the
direct
address
will
be
modified
byadd-
ing
the
16-bit
value
in
index
register
1
with
the
sum
treated
modulo
216.
Programmer
control
of
addressing
is
explained
in
Chapter
4.
Xerox
530
and
Sigma
2/3
Machine
Instructions
13
Other manuals for 530
1
This manual suits for next models
2
Table of contents
Other Xerox Desktop manuals