42
Rabbit 2000/3000 Microprocessor
Description
This instruction is similar to the CALL routine in that it transfers program execution to the subroutine address
specified by the 16-bit operand mn. The LCALL instruction is special in that it allows calls to be made to a
computed address in XMEM. Note that the value of XPC and consequently the address space defined by the
XPC is dynamically changed with the LCALL instructions.
In the LCALL instruction, first the Extension of the Program Counter, XPC, is pushed onto the stack. Next
the Program Counter, PC, is pushed onto the stack, the high order byte first, then the low order byte. Then the
XPC is loaded with the 8-bit value x and the PC is loaded with the 16-bit value, mn. The Stack Pointer register
is then updated to reflect the three items pushed onto it.
The value mn must be in the range E000–FFFF.
This instruction is implemented for the Rabbit and is not available for the Z180.
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 a user defined label. The colon is equivalent to the comma as a delimiter.
LCALL x,mn
Opcode
Instruction
Clocks
Operation
CF n m x
LCALL x,mn
19 (2,2,2,2,1,3,3,3,1)
(SP - 1) = PC
(low)
;
(SP - 2) = PC
(high)
;
(SP - 3) = XPC;
XPC = x;
PC = mn;
SP = SP - 3
Flags
ALTD
I/O
S
Z
L/V
C
F
R
SP
S
D
-
-
-
-
Содержание 2000
Страница 2: ...ii Rabbit 2000 3000 Microprocessor...
Страница 4: ...iv Rabbit 2000 Microprocessor...
Страница 16: ...12 Rabbit 2000 3000 Microprocessor...
Страница 112: ...108 Rabbit 2000 3000 Microprocessor...
Страница 120: ...ii Rabbit 2000 3000 Microprocessor...