91 / 132 page

HT80C51 User Manual
80C51 Family Instruction Set – Instruction definitions
Handshake Solutions
© Philips Electronics N.V. 2005
Page 91 of 132
6.2.
Instruction definitions
ACALL addr11
Function: Absolute Call
Description: ACALL unconditionally calls a subroutine located at the indicated address. The instruction incre-
ments 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 ad-
dress is obtained by successively concatenating the five high-order bits of the incremented PC,
opcode bits 7-5, and the second byte of the instruction. The subroutine called must therefore start
within the same 2k 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 execut-
ing the instruction,
ACALL SUBRTN
at location 0123H, SP will contain 09H, internal RAM locations 08H and 09H will contain 25H and
01H, respectively, and the PC will contain 0345H.
Bytes: 2
Cycles: 2
Encoding:
Operation: ACALL
(PC)
← (PC) + 2
(SP)
← (SP) + 1
(SP)
← (PC7-0)
(SP)
← (SP) + 1
(SP)
← (PC15-8)
(PC10-0)
← page address
a10
a9
a8
1
0
0
0
1
a7
a6
a5
a4
a3
a2
a1
a0