4/17/98 6-3 Addressing Modes and Data Types
6.2.2 Indirect Addressing
Instructions using this addressing mode contain a 16-bit address field. This field is contained in 1
out of 8 pointer registers in the Register File (that contain the 16-bit address of the operand in
any 64K data segment). For data, the segment is identified by the 8-bit contents of DS or the ES
and for code by the 8-bit contents of PC23-16 or CS as selected by the appropriate bit (SSEL.bit
n = 0 selects DS and 1 selects ES for data and SSEL.bitn = 0 selects PC and 1 selects CS for
code) in the segment select register SSEL corresponding to the indirect register number. The
address of the pointer word for word operands should be even
Example: ADD R6, [R4] Before: R6 contains 1005h
SSEL.4 = 1 R4 contains A000h
i.e., the operand is in Word at A000h contains A5A5h
segment determined
by the contents of ES After: R4 contains A000h
So, if ES = 08, the R6 contains B5AAh
operand is in Word at A000h in segment 8
segment 8 of data memory. of data memory contains A5A5h
Figure 6.2
ALU
ADD R6, [R4]
0H
DATA MEMORY
A5A5h
REGISTER - INDIRECT
REGISTER FILE
A000h
B5AAh (result)
FFFFh
R6
POINTER
SSEL.4 = 1
ES = 8h
A000h
Seg8
R4
1005h