XCHG
EXCHANGE
XCHG
Operation:
(temp) - (DEST)
(DEST)
- (SRC)
(SRC)
- (temp)
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).
Flags Affected:
None
2-161