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