LLRET
Far Return
Rabbit 4000 Instruction
|
|
ED 8B
|
LLRET
|
|
PClow = (SP)
PChigh = (SP + 1)
XPClow = (SP + 2)
XPChigh = (SP + 3)
SP = SP + 4
|
Description
The LLRET instruction is used to return from an LLCALL operation. It transfers execution from a subroutine
to the calling program by popping PC and the XPC from the stack.
The low-order byte of PC is loaded with the data whose address is SP and the high-order byte of PC is
loaded with the data whose address is SP+1. Then, the low-order byte of XPC is loaded with the data
whose address is SP+2 and the high-order byte of XPC is loaded with the data whose address is SP+3.
Finally, the value in SP is incremented by 4.