Keil™, An ARM® Company

8051 Instruction Set Manual

LCALL

The LCALL instruction calls a subroutine located at the specified address. This instruction first adds 3 to the PC to generate the address of the next instruction. This result is pushed onto the stack low-byte first and the stack pointer is incremented by 2. The high-order and low-order bytes of the PC are loaded from the second and third bytes of the instruction respectively. Program execution is transferred to the subroutine at this address. No flags are affected by this instruction.

See Also: ACALL, RET

LCALL addr16
CACF0RS1RS0OV P
Bytes3
Cycles2
Encoding
00010010A15-A8A7-A0
Operation
LCALL
PC = PC + 3
SP = SP + 1
(SP) = PC[7-0]
SP = SP + 1
(SP) = PC[15-8]
PC = addr16
Example
LCALL SUB1