Assembler:Commands:XCHG

From Cheat Engine
Revision as of 00:27, 4 February 2018 by OldCheatEngineUser (talk | contribs) (Created page with 'Category:Assembler '''command''' xchg ''destination, source'' Exchange the contents of the source with the destination. <div style="padding:2px;border:1px dashed #2f6fab;b…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

command xchg destination, source

Exchange the contents of the source with the destination.


Exchanges the contents of the destination (first) and source (second) operands. The operands can be two general-purpose registers or a register and a memory location. If a memory operand is referenced, the processor's locking protocol is automatically implemented for the duration of the exchange operation, regardless of the presence or absence of the LOCK prefix or of the value of the IOPL. The XCHG instruction can also be used instead of the BSWAP instruction for 16-bit operands.

c9x.me/x86/html/file_module_x86_id_328.html


Command Parameters

Parameter Description
destination r8-m8 / r16-m16 / r32-m32
source r8-m8 / r16-m16 / r32-m32


Examples

xchg dl,ah
xchg al,[edx+110] // byte value
xchg ax,dx
xchg [eax+10],dx // word value
xchg edx,eax
xchg [esi],edi // dword value


See also

External links