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.
Prev: WAIT Wait
See also: MOV
See also: PUSH
See also: POP
See also: XLAT
See also: EA
Next: XLAT Translate