Semiconductor Group
4-75
1998-04-01
Instruction Set
C500 Family
SWAP
A
Function:
Swap nibbles within the accumulator
Description:
SWAP A interchanges the low and high-order nibbles (four-bit fields) of the
accumulator (bits 3-0 and bits 7-4). The operation can also be thought of as a four-
bit rotate instruction. No flags are affected.
Example:
The accumulator holds the value 0C5H (11000101B). The instruction
SWAP
A
leaves the accumulator holding the value 5CH (01011100B).
Operation:
SWAP
(A3-0)
(A7-4), (A7-4)
¬
(A3-0)
Bytes:
1
Cycles:
1
Encoding:
1 1 0 0
0 1 0 0
¬
®