GMS81C5108
8.4 Addressing Mode
The GMS81C5108 uses six addressing modes;
• Register addressing
(3) Direct Page Addressing → dp
In this mode, a address is specified within direct page.
Example; G=0
• Immediate addressing
• Direct page addressing
• Absolute addressing
C535
LDA
35H
;A ←RAM[35H]
• Indexed addressing
35
H
data
• Register-indirect addressing
➋
~
~
~
data → A
~
➊
(1) Register Addressing
0E550
0E551
C5
35
H
H
Register addressing accesses the A, X, Y, C and PSW.
(2) Immediate Addressing → #imm
In this mode, second byte (operand) is accessed as a data
immediately.
(4) Absolute Addressing → !abs
Example:
Absolute addressing sets corresponding memory data to
Data, i.e. second byte (Operand I) of command becomes
lower level address and third byte (Operand II) becomes
upper level address.
0435
ADC
#35H
MEMORY
With 3 bytes command, it is possible to access to whole
memory area.
04
35
A+35 +C → A
H
ADC, AND, CMP, CMPX, CMPY, EOR, LDA, LDX,
LDY, OR, SBC, STA, STX, STY
Example;
0735F0 ADC
!0F035H
;A ←ROM[0F035H]
When G-flag is 1, then RAM address is defined by 16-bit
address which is composed of 8-bit RAM paging register
(RPR) and 8-bit immediate data.
Example: G=1, RPR=01H
data
0F035
H
H
➋
E45535 LDM
35H,#55H
~
~
~
~
A+data+C → A
➊
0F100
0F101
0F102
07
35
F0
H
H
address: 0F035
data
0135
H
data ← 55
H
~
~
~
~
➊
H
➋
0F100
E4
55
35
0F101
0F102
H
H
JUNE 2001 Ver 1.0
27