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
  --------------------------------------------------------------------------

Seealso:



This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster