![NEC mPD17120 Subseries User Manual Download Page 224](http://html.mh-extra.com/html/nec/mpd17120-subseries/mpd17120-subseries_user-manual_249259224.webp)
CHAPTER 18 INSTRUCTION SET
209
MEM00C
MEM
0.0CH
MEM00D
MEM
0.0DH
MEM00E
MEM
0.0EH
MEM00F
MEM
0.0FH
SET2
CMP, Z
; CMP flag
←
1, Z flag
←
1
SUB
MEM000, MEM00C ; Contents for addresses 0.00H-0.03H do not change,
SUBC
MEM001, MEM00D ; because CMP flag is set
SUBC
MEM002, MEM00E ;
SUBC
MEM003, MEM00F ;
SKF1
Z
; Z flag=1, if contents are the same; if not, Z flag=0
BR
LAB1
;
BR
LAB2
LAB1:
LAB2:
(4)
SUBC m, #n4
Subtract immediate data from data memory with carry flag
<1> OP code
10
8 7
4 3
0
10011
m
R
m
C
n4
<2> Function
When CMP=0, (m)
←
(m) – n4 – CY
Subtracts immediate data and the value of carry flag CY from the data memory contents, and stores the result
in data memory.
When CMP=1, (m) – n4 – CY
The result is not stored in the data memory. Carry flag CY and zero flag Z are changed, according to the
result.
Sets carry flag CY, if a borrow occurs as a result of the subtraction. Resets the carry flag CY, if no borrow
occurs.
If the subtraction result is other than zero, zero flag Z is reset, regardless of compare flag CMP.
…………………………
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 ...