|
DM163006 Datasheet, PDF (254/320 Pages) Microchip Technology – High-Performance ROM-less Microcontrollers | |||
|
◁ |
PIC18C601/801
SWAPF
Swap nibbles in f
Syntax:
[ label ] SWAPF f [,d [,a]]
Operands:
0 ⤠f ⤠255
d â [0,1]
a â [0,1]
Operation:
(f<3:0>) â dest<7:4>,
(f<7:4>) â dest<3:0>
Status Affected: None
Encoding:
0011 10da ffff ffff
Description:
The upper and lower nibbles of reg-
ister âfâ are exchanged. If âdâ is 0, the
result is placed in WREG. If âdâ is 1,
the result is placed in register âfâ
(default). If âaâ is 0, the Access Bank
will be selected, overriding the BSR
value. If âaâ is 1, the Bank will be
selected as per the BSR value.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
Read
register âfâ
Q3
Process
Data
Q4
Write to
destination
Example:
SWAPF REG
Before Instruction
REG = 53h
After Instruction
REG = 35h
DS39541A-page 254
Advance Information
 2001 Microchip Technology Inc.
|
▷ |