
2001 Microchip Technology Inc.
DS30292C-page 141
PIC16F87X
RLF
Rotate Left f through Carry
Syntax:
Operands:
[
label
] RLF f,d
0
≤
f
≤
127
d
∈
[0,1]
See description below
C
The contents of register
’
f
’
are rotated
one bit to the left through the Carry
Flag. If
’
d
’
is 0, the result is placed in
the W register. If
’
d
’
is 1, the result is
stored back in register
’
f
’
.
Operation:
Status Affected:
Description:
RETURN
Return from Subroutine
Syntax:
Operands:
Operation:
Status Affected:
Description:
[
label
] RETURN
None
TOS
→
PC
None
Return from subroutine. The stack
is POPed and the top of the stack
(TOS) is loaded into the program
counter. This is a two-cycle
instruction.
RRF
Rotate Right f through Carry
Syntax:
Operands:
[
label
] RRF f,d
0
≤
f
≤
127
d
∈
[0,1]
See description below
C
The contents of register
’
f
’
are
rotated one bit to the right through
the Carry Flag. If
’
d
’
is 0, the result
is placed in the W register. If
’
d
’
is
1, the result is placed back in
register
’
f
’
.
Operation:
Status Affected:
Description:
Register f
C
Register f
C
SLEEP
Syntax:
Operands:
Operation:
[
label
] SLEEP
None
00h
→
WDT,
0
→
WDT prescaler,
1
→
TO,
0
→
PD
TO, PD
The power-down status bit, PD is
cleared. Time-out status bit, TO
is set. Watchdog Timer and its
prescaler are cleared.
The processor is put into SLEEP
mode with the oscillator stopped.
Status Affected:
Description:
SUBLW
Subtract W from Literal
Syntax:
Operands:
Operation:
Status Affected: C, DC, Z
Description:
[
label
] SUBLW k
0
≤
k
≤
255
k - (W)
→ (
W)
The W register is subtracted (2
’
s
complement method) from the
eight-bit literal 'k'. The result is
placed in the W register.
SUBWF
Subtract W from f
Syntax:
Operands:
[
label
] SUBWF f,d
0
≤
f
≤
127
d
∈
[0,1]
(f) - (W)
→ (
destination)
C, DC, Z
Operation:
Status
Affected:
Description:
Subtract (2
’
s complement method)
W register from register 'f'. If 'd' is 0,
the result is stored in the W
register. If 'd' is 1, the result is
stored back in register 'f'.