CHAPTER 18 INSTRUCTION SET
190
If the addition result is zero, with the compare flag reset (CMP=0), the zero flag Z is set.
If the addition result is zero, with the compare flag set (CMP=1), the zero flag Z is not changed.
Addition can be executed in binary 4-bit or BCD. The BCD flag for the PSWORD specifies which kind of
addition is to be executed.
<3> Example 1
Adds the address 0.2FH contents to the address 0.03H contents, when row address 0 (0.00H-0.0FH) in bank
0 is specified as the general register (RPH=0, RPL=0), and stores the result in address 0.03H:
(0.03H)
←
(0.03H) + (0.2FH)
MEM003
MEM
0.03H
MEM02F
MEM
0.2FH
MOV
BANK, #00H
; Data memory bank 0
MOV
RPH, #00H
; General register bank 0
MOV
RPL, #00H
; General register row address 0
ADD
MEM003, MEM02F
Example 2
Adds the address 0.2FH contents to the address 0.23H contents, when row address 2 (0.20H-0.2FH) in bank
0 is specified as the general register (RPH=0, RPL=4), and stores the result in address 0.23H:
(0.23H)
←
(0.23H) + (0.2FH)
MEM023
MEM
0.23H
MEM02F
MEM
0.2FH
MOV
BANK, #00H
; Data memory bank 0
MOV
RPH, #00H
; General register bank 0
Note
MOV
RPL, #04H
; General register row address 2
ADD
MEM023, MEM02F
RP
RPH
RPL
Register
Bit
Data
Note
b
3
0
b
2
0
b
1
0
b
0
0
b
3
b
2
b
1
b
0
Bank
Row
Address
B
C
D
Summary of Contents for mPD17120 Subseries
Page 15: ... x MEMO ...
Page 23: ... MEMO 8 ...
Page 45: ... MEMO 30 ...
Page 49: ... MEMO 34 ...
Page 55: ... MEMO 40 ...
Page 93: ... MEMO 78 ...
Page 99: ... MEMO 84 ...
Page 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Page 119: ... MEMO 104 ...
Page 175: ... MEMO 160 ...
Page 199: ... MEMO 184 ...
Page 265: ... MEMO 250 ...
Page 281: ...266 MEMO ...
Page 285: ... MEMO 270 ...
Page 289: ... MEMO 274 ...