PIC10F200/202/204/206
RETLW
Return with literal in W
[ label ] RETLW k
0 ≤ k ≤ 255
SLEEP
Enter SLEEP Mode
Syntax:
Syntax:
[ label ]
SLEEP
Operands:
Operation:
Operands:
Operation:
None
k → (W);
TOS → PC
00h → WDT;
0 → WDT prescaler;
1 → TO;
Status Affected: None
0 → PD
Description:
The W register is loaded with the
Status Affected: TO, PD, RBWUF
eight-bit literal ‘k’. The program
counter is loaded from the top of
the stack (the return address). This
is a two-cycle instruction.
Description:
Time-out Status bit (TO) is set. The
Power-down Status bit (PD) is
cleared.
RBWUF is unaffected.
The WDT and its prescaler are
cleared.
The processor is put into Sleep
mode with the oscillator stopped.
See Section 9.9 “Power-Down
Mode (Sleep)” for more details.
RLF
Rotate Left f through Carry
SUBWF
Subtract W from f
Syntax:
Operands:
[ label ]
RLF f,d
Syntax:
[ label ] SUBWF f,d
0 ≤ f ≤ 31
d ∈ [0,1]
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operation:
See description below
C
Operation:
(f) – (W) → (dest)
Status Affected:
Description:
Status Affected: C, DC, Z
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’.
Description:
Subtract (2’s complement method)
the 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’.
register ‘f’
C
RRF
Rotate Right f through Carry
SWAPF
Syntax:
Swap Nibbles in f
Syntax:
Operands:
[ label ] RRF f,d
[ label ] SWAPF f,d
0 ≤ f ≤ 31
d ∈ [0,1]
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operation:
See description below
C
Operation:
(f<3:0>) → (dest<7:4>);
(f<7:4>) → (dest<3:0>)
Status Affected:
Description:
Status Affected: None
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’.
Description: The upper and lower nibbles of
register ‘f’ are exchanged. If ‘d’ is
‘0’, the result is placed in W
register. If ‘d’ is ‘1’, the result is
placed in register ‘f’.
register ‘f’
C
© 2007 Microchip Technology Inc.
DS41239D-page 57