
Preliminary
MC80F0104/0204
Mar. 2005 Ver 0.2
29
8.4 Addressing Mode
The HMS800 series MCU uses six addressing modes;
• Register addressing
• Immediate addressing
• Direct page addressing
• Absolute addressing
• Indexed addressing
• Register-indirect addressing
8.4.1 Register Addressing
Register addressing accesses the A, X, Y, C and PSW.
8.4.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
E45535
LDM
35H,#55H
8.4.3 Direct Page Addressing
→
dp
In this mode, a address is specified within direct page.
Example; G=0
C535
LDA
35H
;A
←
RAM[35H]
8.4.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;
0735F0
ADC
!0F035H
;A
←
ROM[0F035H]
The operation within data memory (RAM)
ASL, BIT, DEC, INC, LSR, ROL, ROR
Example; Addressing accesses the address 0135
H
regard-
less of G-flag.
35
A+35H+C
→
A
04
MEMORY
E4
0F100H
data
←
55H
~
~
~
~
data
0135H
➊
35
0F102H
55
0F101H
➋
data
35
35H
0E551H
data
→
A
➋
➊
~
~
~
~
C5
0E550H
07
0F100H
~
~
~
~
data
0F035H
➊
F0
0F102H
35
0F101H
➋
A+data+C
→
A
address: 0F035
Содержание MC80F0104
Страница 108: ...MC80F0104 0204 Preliminary 104 Mar 2005 Ver 0 2 25 Emulator EVA Board Setting...
Страница 115: ...APPENDIX...
Страница 116: ......
Страница 124: ...viii Mar 2005 Ver 0 2 MC80F0104 0204 Preliminary...