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).

2-161

Page 196
Image 196
Intel 210200-002 manual Exchange Xchg, Xchg destination, source