R.O.M.E.68000 Home
Prev. Table of Cont. Help Similar Instr.

This is the R.O.M.E.68000 Manual version 0.51.
This is an experimental version.
Copyright © 1997 by G. Mezzetti; last update: January 1, 1999.


Ordinary Instructions of the ``Control'' Class

eXchanGe PoinTers

Mnemonic:
XGPT
Operands:
A,B

Oper. Addressing Group Op. Use Mult. Op.
A dadr e -
B dadr e -

Instruction Key:
12
Formal Description:

A + @(A) - @(B) --> temp;
B + @(B) - @(A) --> A;
temp --> B.
   {Exchange A and B, considered as pointers}

Informal Description

This instruction is similar to the previous one, but it exchanges the two pointers rather than simply copying A onto B. Both pointer are adjusted so that they continue to point to the same location as they did before the exchange. If you want to exchange two pointers, you should use XGPT: using EXNG instead is an error (beware: a rather insidious kind of bug!).


Prev. Table of Cont. Help Similar Instr.

Gustavo MEZZETTI  /  mezzetti@math.unipd.it