English
Language : 

SAB80C517_05 Datasheet, PDF (212/323 Pages) Siemens Semiconductor Group – 8-Bit CMOS Single-Chip Microcontroller
Instruction Set
LCALL addr16
Function:
Long call
Description:
LCALL calls a subroutine located at the indicated address. The instruction adds
three to the program counter to generate the address of the next instruction and
then pushes the 16-bit result onto the stack (low byte first), incrementing the stack
pointer by two. The high-order and low-order bytes of the PC are then loaded,
respectively, with the second and third bytes of the LCALL instruction. Program
execution continues with the instruction at this address. The subroutine may
therefore begin anywhere in the full 64 Kbyte program memory address space. No
flags are affected.
Example:
Initially the stack pointer equals 07H. The label ”SUBRTN” is assigned to program
memory location 1234H. After executing the instruction
LCALL SUBRTN
Operation:
at location 0123H, the stack pointer will contain 09H, internal RAM locations 08H
and 09H will contain 26H and 01H, and the PC will contain 1234H.
LCALL
(PC) ← (PC) + 3
(SP) ← (SP) + 1
((SP)) ← (PC7-0)
(SP) ← (SP) + 1
((SP)) ← (PC15-8)
(PC) ← addr15-0
Encoding:
Bytes:
Cycles:
0001 0010
3
2
addr15 . . addr8
addr7 . . addr0
Semiconductor Group
213