# EORI Instruction

EORI performs an exclusive OR between an immediate value and an effective address. EORI gives the result (binary) 1 if one, and only one, of the operators are 1 (compare with OR). The effective address must be the destination of course.
ADDRESS METHODS: Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, SR, CCR
Operations that uses the status register (SR) and the flag register (CCR) can only work with word and byte. If you try to change SR you must be in supervisor mode, else an interrupt occurs. ( use trap #1 to change the mode )
DATA LENGTH: Byte, word, longword

FLAGS: | X - U
N - S
Z - S
C - 0
V - 0

If the status register or the flag register is the destination, the flags are set the same way as any other effective address. If an instruction clears all bits in the flag register, the Z flag won't be set (as it should since the result was 0).
SYNTAX: EORI #<data>,<ea>