Assembler:Commands:XADD
Revision as of 00:41, 4 February 2018 by OldCheatEngineUser (talk | contribs) (Created page with 'Category:Assembler '''command''' xadd ''destination, source'' Exchange and add the source with/to the destination. The '''CF''', '''PF''', '''AF''', '''SF''', '''ZF''', and…')
command xadd destination, source
Exchange and add the source with/to the destination.
The CF, PF, AF, SF, ZF, and OF flags are set according to the result of the addition, which is stored in the destination operand.
Exchanges the first operand (destination operand) with the second operand (source operand), then loads the sum of the two values into the destination operand. The destination operand can be a register or a memory location; the source operand is a register.
This instruction can be used with a LOCK prefix to allow the instruction to be executed atomically.
Command Parameters
Parameter | Description |
---|---|
destination | r8-m8 / r16-m16 / r32-m32 |
source | r8 / r16 / r32 |
Examples
xadd dl,ah
xadd [edx+110],al // byte value
xadd ax,dx
xadd [eax+10],dx // word value
xadd edx,eax
xadd [esi],edi // dword value