Home  Site Map  Instruction Index 

XADD  -  Exchange and Add Instruction


The XADD instruction is combines XCHG and ADD in one instruction. It swaps the operands and then adds them together and points the result in the first operand.

This instruction has 3 parts, Instruction, the first operand can be a Register or memory address, the second operand must be a Register.

Assembly
Sample
Description   16 bit Machine
  Code
XADD AL, CL;  Swap and add CL to AL   0F C0 C8
XADD AX, CX;  Swap and add CX to AX   0F C1 C8
XADD [BX], AX;  Swap and add a memory address to AX   0F C1 07