Indexed Addressing Mode - Hyundai GMS800 Instruction Manual

Gms800 series 8-bit single-chip microcomputers
Table of Contents

Advertisement

HYUNDAI MicroElectonics

1.5. Indexed Addressing Mode

In the indexed addressing mode the contents of an index register(X,Y) is added to the address part of the
instruction to obtain the effective address. The index register contains an index value. The address field of
the instruction defines the beginning address of a data array in memory. Each operand in the array is stored
in memory relative to the beginning address. The distance between the beginning address and the address
of the operand is index value stored in the register.

X-register Indexed Addressing Mode in direct page(dp)
The effective address is determined by adding the address of operand and the contents of X-register. it is
specified to direct page of memory.
OP CODE
Operand
A,Memory
Y,Memory
Example)
06 45

Y-register Indexed Addressing Mode in direct page
The effective address is determined by adding the address of operand and the contents of Y-register. it is
specified to direct page of memory.
OP CODE
Operand
X,Memory
6
X-Register
dp
ADC
AND
CMP
DEC
INC
LSR
LDY
STY
( G=0, X=F5
)
h
ADC 45H+X
Y-Register
dp
LDX
STX

dp+X
Instructions
LDA
EOR
OR
ROL
ROR
XMA
A ← A+data+C

dp+Y
Instructions
SBC
STA
ASL
MEMORY
000
h
0 Page
data
03A
h
0FF
h
100
h
1 Page
1FF
h
Op code ( 06 )
= 1 3A
Operand ( 45 )
+
X ( F5 )

Advertisement

Table of Contents
loading

Table of Contents