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.
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster