Keil Logo

Ax51 Introduction LCALL

Long Subroutine Call

Description  

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 address
C AC F0 RS1 RS0 OV P
Bytes   3
Cycles   2
Encoding   00010010, A15-A8, A7-A0
Operation  
LCALL
PC = PC + 3
SP = SP + 1
(SP) = PC7-0
SP = SP + 1
(SP) = PC15-8
PC = address
Example  
LCALL SUB1
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.