PIC16(L)F1782/3
DS41579C-page 358
Preliminary
2011-2012 Microchip Technology Inc.
MOVIW
Move INDFn to W
Syntax:
[ label ] MOVIW ++FSRn
[ label ] MOVIW --FSRn
[ label ] MOVIW FSRn++
[ label ] MOVIW FSRn--
[ label ] MOVIW k[FSRn]
Operands:
n
[0,1]
mm
[00,01, 10, 11]
-32
k 31
Operation:
INDFn
W
Effective address is determined by
FSR + 1 (preincrement)
FSR - 1 (predecrement)
FSR + k (relative offset)
After the Move, the FSR value will be
either:
FSR + 1 (all increments)
FSR - 1 (all decrements)
Unchanged
Status Affected:
Z
Mode
Syntax
mm
Preincrement
++FSRn
00
Predecrement
--FSRn
01
Postincrement
FSRn++
10
Postdecrement
FSRn--
11
Description:
This instruction is used to move data
between W and one of the indirect
registers (INDFn). Before/after this
move, the pointer (FSRn) is updated by
pre/post incrementing/decrementing it.
Note: The INDFn registers are not
physical registers. Any instruction that
accesses an INDFn register actually
accesses the register at the address
specified by the FSRn.
FSRn is limited to the range 0000h -
FFFFh. Incrementing/decrementing it
beyond these bounds will cause it to
wrap-around.
MOVLB
Move literal to BSR
Syntax:
[ label ] MOVLB k
Operands:
0
k 15
Operation:
k
BSR
Status Affected:
None
Description:
The five-bit literal ‘k’ is loaded into the
Bank Select Register (BSR).
MOVLP
Move literal to PCLATH
Syntax:
[ label ] MOVLP k
Operands:
0
k 127
Operation:
k
PCLATH
Status Affected:
None
Description:
The seven-bit literal ‘k’ is loaded into the
PCLATH register.
MOVLW
Move literal to W
Syntax:
[ label ]
MOVLW k
Operands:
0
k 255
Operation:
k
(W)
Status Affected:
None
Description:
The eight-bit literal ‘k’ is loaded into W
register. The “don’t cares” will assem-
ble as ‘0’s.
Words:
1
Cycles:
1
Example:
MOVLW
0x5A
After Instruction
W
=
0x5A
MOVWF
Move W to f
Syntax:
[ label ]
MOVWF
f
Operands:
0
f 127
Operation:
(W)
(f)
Status Affected:
None
Description:
Move data from W register to register
‘f’.
Words:
1
Cycles:
1
Example:
MOVWF
OPTION_REG
Before Instruction
OPTION_REG = 0xFF
W = 0x4F
After Instruction
OPTION_REG = 0x4F
W = 0x4F