XCHG
Operation:
(temp) - (DEST) (DEST) - (SRC) (SRC) - (temp)
EXCHANGE XCHG
Flags Affected:
None
Description:
XCHG destination, source
XCHG (exchange) switches the contents of the source and destination (byte or word) operands. When used in conjunction with the LOCK prefix, XCHG can test and set a sema- phore that controls access to a resource shared by multiple processors (see section 2.5).