Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>cmp compare flags: o d i t s z a p c</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson