CHAPTER 6 DETAILED RULES FOR EXECUTION INSTRUCTIONS

6.24 CMP (CoMPare Byte Data of Immediate Data and Memory)

Compare the byte data of EA memory (memory expressed in each type of addressing) with the immediate data and set the results to CCR. EA memory is not changed.

CMP (CoMPare Byte Data of Immediate Data and Memory)

Operation

(EA) - d8

Assembler format

CMP EA, #d8

Condition code (CCR)

N

Z

V

C

 

 

 

 

+

+

+

+

 

 

 

 

+: Changed by executing instruction

-: Not changed

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.24-1 Number of Execution Cycles / Byte Count / OP Code

EA

dir

@IX+off

@EP

Ri

 

 

 

 

 

Number of execution

4

4

3

3

cycles

 

 

 

 

 

 

 

 

 

Byte count

3

3

2

2

 

 

 

 

 

OP code

95

96

97

98 to 9F

 

 

 

 

 

94

Page 106
Image 106
Fujitsu F2MC-8FX CMP CoMPare Byte Data of Immediate Data and Memory, Number of Execution Cycles / Byte Count / OP Code