2.2.22 (3) CMP (L)
CMP (CoMPare)
Compare
Operation
ERd – (EAs), set CCR
Assembly-Language Format
CMP.L
<EAs>, ERd
Operand Size
Longword
Condition Code
I:
Previous value remains unchanged.
H: Set to 1 if there is a borrow at bit 27;
otherwise cleared to 0.
N: Set to 1 if the result is negative; otherwise
cleared to 0.
Z: Set to 1 if the result is zero; otherwise
cleared to 0.
V: Set to 1 if an overflow occurs; otherwise
cleared to 0.
C: Set to 1 if there is a borrow at bit 31;
otherwise cleared to 0.
I
H
N
Z
V
C
—
—
↕
—
↕
↕
↕
↕
Description
This instruction subtracts the source operand from the contents of a 32-bit register ERd
(destination register) and sets or clears the CCR bits according to the result. The contents of the
32-bit register ERd remain unchanged.
Available Registers
ERd: ER0 to ER7
ERs: ER0 to ER7
Operand Format and Number of States Required for Execution
Notes
Instruction Format
1st byte
2nd byte
3rd byte
4th byte
5th byte
6th byte
Immediate
CMP.L
#xx:32, ERd
7
A
2
0 erd
IMM
6
Register direct
CMP.L
ERs, ERd
1
F
1 ers 0 erd
2
No. of
States
Mnemonic
Operands
Addressing
Mode
74