
CHAPTER 6 DETAILED RULES FOR EXECUTION INSTRUCTIONS
6.23 CMP (CoMPare Byte Data of Accumulator and Memory)
Compare the byte data of AL with that of the EA memory (memory expressed in each type of addressing) and set the results to CCR. AL and EA memory are not changed.
■CMP (CoMPare Byte Data of Accumulator and Memory)
Operation
(AL) - (EA)
Assembler format
CMP A, EA
Condition code (CCR)
N | Z | V | C |
|
|
|
|
+ | + | + | + |
|
|
|
|
+: Changed by executing instruction
N:Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z:Set to 1 if the result of operation is 00H and set to 0 in other cases.
V:Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C:Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.
Table 6.23-1 Number of Execution Cycles / Byte Count / OP Code
EA | #d8 | dir | @IX+off | @EP | Ri |
|
|
|
|
|
|
Number of | 2 | 3 | 3 | 2 | 2 |
execution cycles |
|
|
|
|
|
|
|
|
|
|
|
Byte count | 2 | 2 | 2 | 1 | 1 |
|
|
|
|
|
|
OP code | 14 | 15 | 16 | 17 | 18 to 1F |
|
|
|
|
|
|
92