42
µ
PD17062
6.3 ADDRESS GENERATION FOR GENERAL-PURPOSE REGISTER AND DATA MEMORY IN INDIVIDUAL
INSTRUCTIONS
Table 6-1 lists the operation and transfer instructions that can be executed for the data in the general-
purpose register and data memory.
Consider the following instruction:
ADD r, m ((r) ← (r) + (m))
Upon executing this instruction, the address of the general-purpose register is generated from the value
of the general-purpose register pointer and the value specified in r, as shown in Table 6-2. Then, the contents
of the general-purpose register specified by the generated address of the general-purpose register are added
to the contents of the data memory location specified in m, the result being stored into the general-purpose
register.
The address of the general-purpose register is generated, as described above, for each of the instructions
listed in Table 6-1.
Table 6-1 Manipulation Instructions Executed between the General-Purpose Register and Data Memory
Table 6-2 Address Generation for General-Purpose Register and Data Memory
Data memory address
specified in m
Instruction Address
Generated address
Bank Row address Column address
General-purpose register
address specified in r
ADD r, m
(0000B)
(BANK)
(00 × × B)
m
(RP) r
Instruction set Instruction Operation
Addition ADD r, m (r) ← (r) + (m)
ADDC r, m (r) ← (r) + (m) + CY
Subtraction SUB r, m (r) ← (r) – (m)
SUBC r, m (r) ← (r) – (m) – CY
Logical operation AND r, m (r) ← (r) ∧ (m)
OR r, m (r) ← (r) ∨ (m)
XOR r, m (r) ← (r) ∨
−
(m)
Transfer LD r, m (r) ← (m)
ST m, r (m) ← (r)
MOV @r, m if MPE = 1: (MP, (r)) ← (m)
if MPE = 0: (BANK, mR, (r)) ← (m)
MOV m, @r if MPE = 1: (m) ← (MP, (r))
if MPE = 0: (m) ← (BANK, mR, (r))
Shift RORC r Right shift, including a carry