LLCALL (JKHL)
Far Call
Rabbit 4000 Instruction
|
|
ED FA
|
LLCALL (JKHL)
|
|
(SP-1) = XPChigh
(SP-2) = XPClow
(SP-3) = PChigh
(SP-4) = PClow
PC = HL
XPC = JK
SP = SP-4
|
Description
This instruction is similar to the LCALL instruction in that it transfers program execution to the subroutine
address specified by the 16-bit constant mn and allows calls to made to a computed address in extended
memory. The LLCALL instruction uses the 12-bit XPC of the Rabbit 4000 processor instead of the 8-bit
XPC of earlier Rabbit processors. Note that the value of XPC and consequently the address space defined
by the XPC is dynamically changed with the LCALL instructions.
In the LLCALL instruction, first XPC is pushed onto the stack, high-order byte first, then the low-order
byte. Next, PC is pushed onto the stack, high-order byte first, then the low-order byte. Then PC is loaded
with the data in HL and XPC is loaded with the data in JK. SP is then updated.