Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>xchg exchange registers flags: not altered</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
XCHG             Exchange Registers                  Flags: not altered

XCHG destination,source

          Logic:    destination <--> source

    XCHG switches the contents of its operands, which may be either bytes
    or words.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
                           byte(word)
   accumulator, reg16          3          -        1     XCHG AX,SI
   memory, register       17(25) + EA     2       2-4    LOCK XCHG SEMPHOR, DX
   register, register          4          -        2     XCHG CL,DL
  --------------------------------------------------------------------------

       Notes:         Used in conjunction with the LOCK prefix, this
                      instruction is particularly useful when implementing
                      semaphores to control shared resources.

See Also: MOV PUSH POP XLAT EA

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