<< Previous | Next >>

LLRET     Far Return     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
ED 8B LLRET PClow = (SP)
PChigh = (SP + 1)
XPClow = (SP + 2)
XPChigh = (SP + 3)
SP = SP + 4

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 4000
14
n/a
n/a
Rabbit 5000
4
4
2

Flags ALTD IOI/IOE
S
Z
L/V
C
F
R
SP
S
D
-
-
-
-

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.


Rabbit Instructions << Previous | Next >> rabbit.com