CMP

COMPARECMP

Operation:

Flags Affected:

(LSRC) - (RSRC)

AF, CF, OF, PF, SF, ZF

Description:

CMP destination, source

CMP (Compare) subtracts the source from the destination, which may be bytes or words, but does not return the result. The operands are unchanged, but the flags are updated and can be tested by a subsequent conditional jump instruction. CMP updates AF, CF, OF, PF,

SF and ZF. The comparison reflected in the flags is that of the destination to the source. If a CMP instruction is followed by a JG (jump if greater) instruction, for example, the jump is taken if the destination operand is greater than the source operand.

2-66

Page 101
Image 101
Intel 210200-002 manual Comparecmp, CMP destination, source