[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CMP Compare Flags: O D I T S Z A P C
* * * * * *
CMP destination,source
Logic: Flags set according to result of
(destination - source)
CMP compares two numbers by subtracting the source from the
destination and updates the flags. CMP does not change the source or
destination. The operands may be bytes or words.
--------------------------------------------------------------------------
Operands Clocks Transfers Bytes Example
byte(word)
register, register 3 - 2 CMP CX,BX
register, immediate 4 - 3-4 CMP BL,02h
accumulator, immediate 4 - 2-3 CMP AL,00010110b
register, memory 9(13) + EA 1 2-4 CMP DH,ALPHA_BETA
memory, register 9(13) + EA 1 2-4 CMP TOTAL,SI
memory, immediate 10(14) + EA 1 3-6 CMP VALUES,3420h
--------------------------------------------------------------------------
See Also:
CMPS
SCAS
EA
Flags
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson