Download Print this page

Siemens SAB 80515 Series User Manual page 171

8-bit single-chip microcontroller family

Advertisement

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 07 H . The label "SUBRTN" is assigned to program
memory location 1234 H . After executing the instruction
LCALL
at location 0123 H , the stack pointer will contain 09 H , internal RAM locations 08 H
and 09 H will contain 26 H and 01 H , and the PC will contain 1234 H .
Operation:
LCALL
(PC) ← (PC) + 3
(SP) ← (SP) + 1
((SP)) ← (PC7-0)
(SP) ← (SP) + 1
((SP)) ← (PC15-8)
(PC) ← addr15-0
Encoding:
0 0 0 1
Bytes:
3
Cycles:
2
Semiconductor Group
SUBRTN
0 0 1 0
*
addr15 . . addr8
171
Instruction Set
addr7 . . addr0

Advertisement

loading

This manual is also suitable for:

Sab 80c515Sab 80c535Sab 80535Sab 80515k