HMS8132E/HMS81032TL
Nov. 2001 Ver 2.00
25
8.5 Addressing Mode
The HMS81004E/08E/16E/24E/32E uses six addressing
modes;
• Register addressing
• Immediate addressing
• Direct page addressing
• Absolute addressing
• Indexed addressing
• Register-indirect addressing
(1) Register Addressing
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.
Example:
0435
ADC
#35H
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=0CH
E45535
LDM
35H,#55H
(3) Direct Page Addressing
→
→
→
→
dp
In this mode, a address is specified within direct page.
Example; G=0
C535
LDA
35H
;A
←
RAM[35H]
(4) Absolute Addressing
→
→
→
→
!abs
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.
With 3 bytes command, it is possible to access to whole
memory area.
ADC, AND, CMP, CMPX, CMPY, EOR, LDA, LDX,
LDY, OR, SBC, STA, STX, STY
Example;
35
A+35H+C
→
A
04
MEMORY
E4
0F100
H
data
←
55H
~
~
~
~
data
0C35
H
➊
35
0F102
H
55
0F101
H
➋
data
35
35
H
0E551
H
data
→
A
➋
➊
~
~
~
~
C5
0E550
H
Содержание HMS81004E
Страница 4: ...HMS81032E HMS81032TL NOV 2001 Ver 2 00...
Страница 84: ...HMS81032E HMS81032TL 80 Nov 2001 Ver 2 00...
Страница 85: ...APPENDIX...