![Microchip Technology PIC12F1501 Manual Download Page 302](http://html1.mh-extra.com/html/microchip-technology/pic12f1501/pic12f1501_manual_1785833302.webp)
2011-2015 Microchip Technology Inc.
DS40001609E-page 303
PIC16(L)F1508/9
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
31
Operation:
k
BSR
Status Affected:
None
Description:
The 5-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 7-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 8-bit literal ‘k’ is loaded into W reg-
ister. The “don’t cares” will assemble 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