123. SWAP register upper and lower words

123.1. Name

SWAP -- Swap register upper and lower words

123.2. Synopsis

        SWAP        Dn

        Size = (Word)

123.3. Function

Swaps between 16 low bits and 16 high bits of register.

123.4. Format

        -----------------------------------------------------------------
        |15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        |---|---|---|---|---|---|---|---|---|---|---|---|---|-----------|
        | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | REGISTER  |
        -----------------------------------------------------------------

        "REGISTER" indicates the number of register on which swap is made.

123.5. Result

        X - Not affected
        N - Set if the most-significant bit of the result was set. Cleared
            otherwise.
        Z - Set if the 32 bits result was zero. Cleared otherwise.
        V - Always cleared.
        C - Always cleared.

123.6. See also

EXG