Cmp2 (Compare Immediate Data And Destination Register) - Fujitsu FR Family Instruction Manual

32-bit microcontroller
Hide thumbs Also See for FR Family:
Table of Contents

Advertisement

CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
7.13

CMP2 (Compare Immediate Data and Destination Register)

Subtracts the result of the higher 28 bits of 4-bit immediate(from -16 to -1) data with
minus extension from the word data in "Ri", places results in the condition code
register (CCR).
■ CMP2 (Compare Immediate Data and Destination Register)
Assembler format:
CMP2 #i4, Ri
Operation:
Ri – extn(i4)
Flag change:
N :
Z :
V :
C :
Execution cycles:
1 cycle
Instruction format:
Example:
CMP2 #–3, R3
84
N
Z
V
C
C
C
C
C
Set when the MSB of the operation result is "1",cleared when the MSB is "0".
Set when the operation result is "0", cleared otherwise.
Set when an overflow has occurred as a result of the operation, cleared otherwise.
Set when a carry has occurred as a result of the operation, cleared otherwise.
MSB
1
0
1
0
Instruction bit pattern :
R3
F F F F F F F D
N Z V C
CCR
0 0 0 0
Before execution
1
0
0
1
i4
1010 1001 1101 0011
LSB
Ri
R3
F F F F F F F D
N Z V C
CCR
0 1 0 0
After execution

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr series

Table of Contents