Section
02 Part 04 – The EXG Instruction |
“All the gold which is under or upon the earth is not enough to give in exchange for virtue.” ~Plato |
Introduction
EXG – EXchanGe
registers
This
instruction will swap the long-word of a data or address register with another data or address
register.
Examples
exg.l d0,d1 |
And
that is pretty much it, it’s as simple as the “swap”
instruction. You can also do this with
address registers:
exg.l a0,a1 exg.l d4,a6 exg.l a2,d2 |
This
instruction can only exchange long-words between registers, word and byte
exchange is not available.