Keil Logo

ACALL

The ACALL instruction calls a subroutine located at the specified address. The PC is incremented twice to obtain the address of the following instruction. The 16-bit PC is then stored on the stack (low-order byte first) and the stack pointer is incremented twice. No flags are affected.

The address of the subroutine is calculated by combining the 5 high-order bits of the incremented PC (for A15-A11), the 3 high-order bits of the ACALL instruction opcode (for A10-A8), and the second byte of the instruction (for A7-A0). The subroutine that is called must be located in the same 2KByte block of program memory as the opcode following the ACALL instruction.

See Also: LCALL, RET

ACALL addr11
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
A10A9A810001 A7A6A5A4A3A2A1A0
Operation
PC = PC + 2
SP = SP + 1
(SP) = PC7-0
SP = SP + 1
(SP) = PC15-8
PC10-0 = A10-0
Example
ACALL LABEL

Related Knowledgebase Articles

  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.