Slide 10.6: USES operator Slide 11.2: Conditional jumps Home |
CMP
, AND
, or SUB
modifies the CPU flags.
CMP
Instruction
CMP
(compare) instruction performs an implied subtraction of a source operand from a destination operand. Neither operand is modified.
CMP — Compare |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
When two operands are compared, the Zero and Carry flags indicate the relation between operands.
|
|
|
If two operands being compared are assumed to be signed, the Sign , Zero , and Overflow flags indicate the relations between operands.
|