PIC18FXX20
RETURN
Return from Subroutine
RLCF
Rotate Left f through Carry
Syntax:
Operands:
Operation:
[ label ] RETURN [s]
s ∈ [0,1]
Syntax:
Operands:
[ label ] RLCF f [,d [,a]
0 ≤ f ≤ 255
d ∈ [0,1]
a ∈ [0,1]
(f<n>) → dest<n+1>,
(f<7>) → C,
(C) → dest<0>
(TOS) → PC,
if s = 1
(WS) → W,
Operation:
(STATUSS) → STATUS,
(BSRS) → BSR,
PCLATU, PCLATH are unchanged
Status Affected:
Encoding:
Description:
C, N, Z
Status Affected:
Encoding:
Description:
None
0011
01da
ffff
ffff
0000
0000
0001
001s
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 W. If 'd' is 1, the result
is stored back in register 'f'
(default). If ‘a’ is 0, the Access
Bank will be selected, overriding
the BSR value. If ‘a’ = 1, then the
bank will be selected as per the
BSR value (default).
Return from subroutine. The stack
is popped and the top of the stack
(TOS) is loaded into the program
counter. If ‘s’= 1, the contents of the
shadow registers WS, STATUSS
and BSRS are loaded into their cor-
responding registers, W, STATUS
and BSR. If ‘s’ = 0, no update of
these registers occurs (default).
Words:
Cycles:
1
2
register f
C
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q Cycle Activity:
Q1
Decode
No
Process
pop PC from
operation
Data
No
operation
stack
No
operation
Q2
Q3
Q4
No
No
Decode
Read
Process
Write to
operation
operation
register 'f'
Data
destination
RLCF
REG, 0, 0
Example:
RETURN
Example:
Before Instruction
REG
=
1110 0110
0
After Interrupt
C
=
PC = TOS
After Instruction
REG
=
1110 0110
W
=
1100 1100
1
C
=
2003 Microchip Technology Inc.
Advance Information
DS39609A-page 291