Direct Addressing; Indirect Addressing; Base; Symbolic-Relative Addressing - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

unnecessary.
The followi
n~J
combi nations are acceptable
to the assemb ler:
a
or
a, ,
'*0
or
*0'1
Presence of trailing (ignored)
a,x
or
a, x,
comm(JS is noted in the as-
'*0, x
or
*0, x,
semb I;.' Ii sti ng.
Thi s is not an
all b
or
a, ,b,
*0" b
*0, ,b,
error.
or
*0, x, b
or
*0, x, b,
Absence of
"0"
generates a diagnostic message.
A symbol used in an x or b tag must have been previously
defi ned and must not be an externa
i
reference.
Other-
wise, a diagnostic error is noted and the tag is given the
value
O.
DnlECT
~~DDRESSING
A Class 1 instruction can directly specify the following
addresses:
1 .
The 256 addresses beg i nn i ng with abso I ute location 0 (bits
4-7 set to
0).
This is called "nonrelative addressing".
2.
The 256 addresses beginning with the address specified
by the contents of the base re9ister (bit 7
=
1).
This
is called "base-relative addres!iing".
3.
The 256 addresses starting with the location at which
the instruction itself is 10cClted . .
This is called "self-
relative forward addressing"
(bj"~
4
=-"
1, bit 7
==
0).
4.
The 256 addresses preceding the location of the instruc-
tion itself.
This is called "self-'relative backward
addressing" (bits 4 and 7 set to 1).
These addresses may be augmented
Cit
execution time by
specifying that the address be post-indexed (bit 6
=
1), in
which case the direct address plus the contents of index
register 1 determines the effective Clddress.
By controlling the contents of the index registers a program
can directly reference any location within the limits of memory.
INDIRECT ADDRES:SING
Any location within the limits of avclilable memory may be
referenced through the use of indirect addressing (with or
without use of the index registers).
The programmer may specify
indirec~
addressing in a sym-
bolic Class 1 instruction by coding em asterisk as the first
character of the argument entry.
In cases where the asterisk
is not specified, the assembler can impm.e indirect address-
ing if assembly conditions warrant such action (see "Auto-
matic Addressing" in this chapter).
For an instruction whose indirect bit (bit 5) is set to 1, the
reference address points to a word in memory that contains
the direct address.
When indirect addressing is specified by the programmer or
invoked by the assembler, it is performed after the reference
address has been determined and before post-indexing (if
specified) is applied.
BASE
Base-Relative Address Control
The Extended Symbol programmer can control base-relative
addressing in Class
1
instructions in two ways: with the base
. tag (b) and with the BASE directive.
The BASE directive has the form
where
label
is anyvalidsymbol. Useof alabelisoptional.
When present, it is assigned the current valu,e of
the execution location counter and identifies the
first word of the area affected by BASE.
BASE
does not a Iter the locati on counters.
exp
is any single-termed or multiterrned expression
in which there are no forward references !c local
or procedure-local symbols;or it may be absent.
The expression may be absolute or relocatable.
The BASE directive declares that any reference in the range
exp to exp
+
X'FF' is to be assembled in the base addressing
mode, except as noted be low.
The BASE directive has no effect on assembly of the follow-
ing instructions:
1.
Instructions in which the base tag is 1.
2.
Instructions in which the argument is absolute and the
BASE exp is relocatable or the argument is relocatable
and the BASE exp is abso lute; i. e. , both the argument
and the BASE exp must beeitherabsolute or relocatable.
3.
Instructions in which the argument is within self-relative
addressing range.
Note that the BASE directive does not cause the assemb ler
to set the value in the base register.
This must be done by
the program.
The BASE directive only establishes the base
register value for the purpose of address generation.
A BASE directive with a blank argument field cancels a pre-
vious BASE setting and directs theassemblertomake no at-
tempt at generating base-relative addressing for subsequent
symbolic instructions with blank or zero base tags.
This
also occurs by default when no BASE directive has been en-
countered by the assembler.
An example of the effect of the BASE directive on address-
ing is given in the next section, which discusses other as-
pects of the assembler's handling of addresses.
SYMBOLIC-RELATIVE ADDRESSING
Symbolic-relative addressing is the technique of refer-
encing an instruction or storage area by designating its
location in relation to another location or in relation to
a location counter (see "Location Counters", Chapter 5).
Argument Addressing Format
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents