![]() |
|
| << Previous | Next >> | |
| | |
LLCALL (JKHL) Far Call Rabbit 4000/5000 Instruction
ED FA LLCALL (JKHL) (SP-1) = LXPChigh
(SP-2) = LXPClow
(SP-3) = PChigh
(SP-4) = PClow
PC = HL
LXPC = JK
SP = SP-4
Description
This instruction is similar to the LCALL1 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 LXPC of the Rabbit 4000 or 5000 processor instead of the 8-bit XPC of earlier Rabbit processors. Note that the value of LXPC and consequently the address space defined by the LXPC is dynamically changed with the LLCALL instructions.
In the LLCALL instruction, first LXPC 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.
1 Avoid mixing LCALL and LLCALL instructions. When LCALL pushes the XPC, it also clears the upper bits of the LXPC.
| Rabbit Instructions | << Previous | Next >> | rabbit.com |