PIC18FXX20
RCALL
Relative Call
RESET
Reset
Syntax:
Operands:
Operation:
[ label ] RCALL
-1024 ≤ n ≤ 1023
(PC) + 2 → TOS,
n
Syntax:
Operands:
Operation:
[ label ] RESET
None
Reset all registers and flags that
are affected by a MCLR Reset.
(PC) + 2 + 2n → PC
Status Affected:
Encoding:
None
1101
Status Affected:
Encoding:
All
0000
1nnn
nnnn
nnnn
0000
1111
1111
Description:
Subroutine call with a jump up to
1K from the current location. First,
return address (PC+2) is pushed
onto the stack. Then, add the 2’s
complement number ‘2n’ to the PC.
Since the PC will have incremented
to fetch the next instruction, the
new address will be PC+2+2n.
This instruction is a two-cycle
instruction.
Description:
This instruction provides a way to
execute a MCLR Reset in software.
1
1
Words:
Cycles:
Q Cycle Activity:
Q1
Q2
Start
reset
Q3
Q4
Decode
No
No
operation
operation
Words:
Cycles:
1
2
RESET
Example:
After Instruction
Registers =
Reset Value
Reset Value
Q Cycle Activity:
Q1
Flags*
=
Q2
Q3
Q4
Write to PC
Decode
Read literal
Process
'n'
Data
Push PC to
stack
No
operation
No
operation
No
operation
No
operation
HERE
RCALL
Jump
Example:
Before Instruction
PC
=
Address (HERE)
After Instruction
PC
=
Address (Jump)
TOS =
Address (HERE+2)
2003 Microchip Technology Inc.
Advance Information
DS39609A-page 289