![]() |
|
| << Previous | Next >> | |
| | |
LRET Long Return Rabbit 2000/3000/4000/5000 Instruction
ED 45 LRET PClow = (SP)
PChigh = (SP + 1)
XPC = (SP + 2)
SP = SP + 3
Rabbit 2000/3000/4000 Rabbit 5000
Description
The
LRETinstruction is used to return from anLCALLoperation. 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.
| Rabbit Instructions | << Previous | Next >> | rabbit.com |