eor

Logical exclusive OR

Performs a logical exclusive OR of the first and second operands and stores the result in the second operand.

Sizes .b .w .l, .w by default

Used in
XNZVC –●●00
  • ● set from the result
  • 0 always 0
  • – not changed

Forms

Operands

Dn
A data register, d0 to d7. More
<ea>
An operand using one of the instruction’s supported addressing modes, such as d0, (a0)+ or 4(a1). It may name a register, memory or an immediate value. More
* --- XOR: toggles bits ---
move.l #%11110000, d0
move.l #%10101010, d1
eor.b d0, d1 ; d1 = %01011010

* --- XOR with self clears register ---
move.l #$ABCD, d2
eor.l d2, d2 ; d2 = 0