24
The 68000's Instruction Set
EORI to SR EOR immediate to status register
Operation: IF [S] = 1
THEN
[SR]
← <literal> ⊕ [SR]
ELSE TRAP
Syntax: EORI #<data>,SR
Attributes: Size = word
Description: EOR (exclusive OR) the immediate data with the contents of the
status register and store the result in the status register. All bits
of the status register are affected.
Condition codes: X N Z V C
* * * * *
X:= toggled if bit 4 of data = 1; unchanged otherwise
N:= toggled if bit 3 of data = 1; unchanged otherwise
Z:= toggled if bit 2 of data = 1; unchanged otherwise
V:= toggled if bit 1 of data = 1; unchanged otherwise
C:= toggled if bit 0 of data = 1; unchanged otherwise
EXG Exchange registers
Operation: [Rx] ← [Ry]; [Ry] ← [Rx]
Syntax: EXG Rx,Ry
Sample syntax: EXG D3,D4
EXG D2,A0
EXG A7,D5
Attributes: Size = longword
Description: Exchange the contents of two registers. The size of the instruction
is a longword because the entire 32-bit contents of two registers
are exchanged. The instruction permits the exchange of address
registers, data registers, and address and data registers.
Application: One application of EXG is to load an address into a data register
and then process it using instructions that act on data registers.
Then the reverse operation can be used to return the result to the