389
APPENDIX B Instructions
r Bit direct addressing
Indicated by "dir: b" in the instruction list. Used to access the area between "0000H" and
"00FFH" in bit units. For bit direct addressing, the upper one byte of the address is "00H" the
operand specifies the lower one byte of the address, and the lower three bits of the operation
code specify the bit position. Figure B.2-3 "Bit Direct Addressing" shows an example.
Figure B.2-3 Bit Direct Addressing
r Index addressing
Indicated by "@IX+off" in the instruction list. Used to access the entire 64-Kbyte area. Index
addressing generates the address is obtained by adding the sign-extended contents of the first
operand to the index register (IX). Figure B.2-4 "Index Addressing" shows an example.
Figure B.2-4 Index Addressing
r Pointer addressing
Indicated by "@EP" in the instruction list. Used to access the entire 64-Kbyte area. Pointer
addressing uses the extra pointer (EP) the address. Figure B.2-5 "Pointer Addressing" shows
an example.
Figure B.2-5 Pointer Addressing
r General-purpose register addressing
Indicated by "Ri" in the instruction list.
Used to access the general-purpose register area
register bank. For general-purpose register addressing, the upper one byte of the address is
fixed at "01" and the lower byte is generated from the register bank pointer (RP) and the lower
three bits of the operation code.
The CPU accesses the resulting address.
Figure B.2-6
"General-purpose Register Addressing" shows an example.
Figure B.2-6 General-purpose Register Addressing
SETB 3
: 2
0034H XXXXX1XXB
76543 210
4H
1 2H
3 4H
A 1 2 3 4H
2 7 F FH
2 8 0 0H
MOVW A, @IX+5 AH
IX 2 7 A 5H
+
1 2H
3 4H
A 1 2 3 4H
2 7 A 5H
2 7 A 6H
MOVW A, @EP
EP 2 7 A 5H
A BH
A
A BH
0 1 5 6 H
MOV A, R6
RP 0 1 0 1 0B
+