The 8051 Instruction Set
Atmel 8051 Microcontrollers Hardware Manual 1-24
4316B–8051–02/04
1.14 Instruction Definitions
1.14.1 ACALL addr11
Function: Absolute Call
Description: ACALL unconditionally calls a subroutine located at the indicated address. The instruction increments the PC
twice to obtain the address of the following instruction, then pushes the 16-bit result onto the stack (low-order
byte first) and increments the Stack Pointer twice. The destination address is obtained by successively
concatenating the five high-order bits of the incremented PC, opcode bits 7 through 5, and the second byte of
the instruction. The subroutine called must therefore start within the same 2 K block of the program memory as
the first byte of the instruction following ACALL. No flags are affected.
Example: Initially SP equals 07H. The label SUBRTN is at program memory location 0345 H. After executing the following
instruction,
ACALL SUBRTN
at location 0123H, SP contains 09H, internal RAM locations 08H and 09H will contain 25H and 01H, respectively,
and the PC contains 0345H.
Bytes: 2
Cycles: 2
Encoding: a10a9a810001 a7a6a5a4a3a2a1a0
Operation: ACALL
(PC) ← (PC) + 2
(SP) ← (SP) + 1
((SP)) ← (PC
7-0
)
(SP) ← (SP) + 1
((SP)) ← (PC
15-8
)
(PC
10-0
) ← page address