PIC18FXX20
MOVFF
Move f to f
MOVLB
Move literal to low nibble in BSR
Syntax:
Operands:
[label] MOVFF fs,fd
0 ≤ fs ≤ 4095
0 ≤ fd ≤ 4095
(fs) → fd
None
Syntax:
[ label ] MOVLB k
0 ≤ k ≤ 255
k → BSR
Operands:
Operation:
Status Affected:
Encoding:
Operation:
Status Affected:
Encoding:
1st word (source)
2nd word (destin.)
None
0000
0001
kkkk
kkkk
Description:
The 8-bit literal 'k' is loaded into
the Bank Select Register (BSR).
1
1
1100
1111
ffff
ffff
ffff
ffff
ffffs
ffffd
Words:
Cycles:
Description:
The contents of source register 'fs'
are moved to destination register
'fd'. Location of source 'fs' can be
anywhere in the 4096-byte data
space (000h to FFFh), and location
of destination 'fd' can also be any-
where from 000h to FFFh.
Q Cycle Activity:
Q1
Q2
Q3
Q4
Write
literal 'k' to
BSR
Decode
Read literal
Process
'k'
Data
Either source or destination can be
W (a useful special situation).
MOVFFis particularly useful for
transferring a data memory location
to a peripheral register (such as the
transmit buffer or an I/O port).
MOVLB
5
Example:
Before Instruction
BSR register
=
=
0x02
0x05
After Instruction
BSR register
The MOVFFinstruction cannot use
the PCL, TOSU, TOSH or TOSL as
the destination register.
Words:
Cycles:
2
2 (3)
Q Cycle Activity:
Q1
Q2
Read
register 'f'
(src)
Q3
Process
Data
Q4
Decode
No
operation
Decode
No
No
operation
Write
register 'f'
(dest)
operation
No dummy
read
MOVFF
REG1, REG2
Example:
Before Instruction
REG1
=
=
0x33
REG2
0x11
After Instruction
REG1
REG2
=
=
0x33,
0x33
DS39609A-page 284
Advance Information
2003 Microchip Technology Inc.