LRET
Long Return
Rabbit 2000/3000/4000 Instruction
|
|
ED 45
|
LRET
|
|
PClow = (SP)
PChigh = (SP + 1)
XPC = (SP + 2)
SP = SP + 3
|
Description
The LRET instruction is used to return from an LCALL operation. It transfers execution from a subroutine
to the calling program by popping PC and the XPC from the stack.
First, the low-order byte of PC is loaded with the data whose address is SP. Next, the high-order byte of
PC is loaded with the data whose address is SP+1. Then, XPC is loaded with the data whose address is
SP+2. Finally the value in SP is incremented by 3.