<< Previous | Next >>

> LLCALL lxpc,mn Far Call Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> 8F n m xpl xph | LLCALL lxpc,mn | 24 (2,2,2,2,2,1,3,3,3,3,1) | (SP-1) = XPChigh (SP-2) = XPClow (SP-3) = PChigh (SP-4) = PClow XPClow = xpl XPChigh = xph PC = mn SP = SP-4

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

> #### Description

> This instruction is similar to the LCALL instruction in that it transfers program execution to the subroutine address specified by the 16-bit operand mn and allows calls to be 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 XPC is loaded with the 16-bit value lxpc (its 4 most significant bits are ignored) and the PC is loaded with the 16-bit value mn. SP is then updated.

> #### Alternate Forms

> The Dynamic C assembler recognizes several other forms of this instruction.

>     LCALL label
>     LCALL x,label
>     LCALL x:label
>     LCALL x:mn

> The parameter "label" is user-defined. The colon is equivalent to the comma as a delimiter.

<< Previous | Next >>