SWAP |
SWAP Variable
Function
Exchanges the upper and lower elements of Variable.
Explanation
The SWAP instruction exchanges the upper and lower nibbles of a byte, or
the upper and lower bytes of a word.
Main: RB = $3F SWAP RB ' RB now holds $F3 result = $0A55 SWAP result ' result now holds $550A