Byte Addressing Examples - HP 3000 III Series Manual

Table of Contents

Advertisement

System/CPU Overview
DIRECT
STB OB+7
DIRECT, INDEXED
LOXI5
STB
OB+7, X
INDIRECT
STB OB+7, I
INDIRECT, INDEXED
LOXI 5
STB
OB+7,I,X
DB
s
---..
t1
+2
Not
+3
+4
Access-
Ible
+5
;-6
+7
---..
DB
s
--.
+1
+2
+3
+4
;-5
;-6
+7
0
1
2
3
4
5
---.
DB
s
---..
+1
+2
+3
+4
;-5
;-6
;-7
46
+20
40
41
+21
42
43
+22
44
45
+23
46
47
---..
DB
s
~
+1
+2
+3
+4
+5
+6
+7
40
+20
0
1
+21
2
3
+22
4
5
---..
Figure 2-17.
Byte Addressing Examples
tion would
store a byte from the TOS into the left
byte
of the
DB+7 loca tion.
2-58.
DIRECT, INDEXED BYTE ADDRESSING.
In the examples shown in
figure 2-17,
the index is assumed to be 5.
This is
established
by the
"LDXI5"
instruction that
precedes each STB instruction.
The "STB DB+7, X"
instruction directly
addresses location
DB+7
and the
index of 5 accesses the
sixth byte.
It should be noted
that the byte index starts at zero and that all even indexes
are
left bytes and all odd indexes are right bytes.
2-59.
INDIRECT BYTE ADDRESSING.
For
indirect,
unindexed
byte
addressing,
the byte index is given in the indirect cell.
As in
all indirect data addressing, the indirect reference is
relative
to DB.
Therefore,
the "STB DB+7, I" instruction shown in figure
2-17 initially
addresses the 47th byte in respect
to DB.
This
will
be the
left byte of DB+23.
(Since there are two bytes per
word, divide the byte index by two to identify the word location;
a remainder of
zero indicates the left byte and
a remainder
of
one ind ica tes the right byte.)
2-60.
INDIRECT, INDEXED BYTE ADDRESSING.
For indirect,
indexed
byte addressing,
the displacement
points to the
indirect cell,
the ind irect cell points to the star t of the byte ar ray, and
the
index in the X Register points to the
desired byte in the array.
This is shown by the "STB DB+7, I, X" instruction in figure 2-17.
The index in the X Registe r is aga in assumed to be
5.
The dis-
2-41

Advertisement

Table of Contents
loading

Table of Contents