<< Previous | Next >>

LLCALL lxpc,mn     Far Call     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
8F n m xpl xph LLCALL lxpc,mn (SP-1) = LXPChigh
(SP-2) = LXPClow
(SP-3) = PChigh
(SP-4) = PClow
LXPClow = xpl
LXPChigh = xph
PC = mn
SP = SP-4

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 4000
24
n/a
n/a
Rabbit 5000
25
21
21

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

Description

This instruction is similar to the LCALL1 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 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 LXPC 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.


LLCALL x,label
LLCALL x:label
LLCALL x:mn

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

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