Email: Password: Remember Me | Create Account (Free)
8051/8052 Instruction: ACALL

Operation:ACALL
Function:Absolute Call Within 2K Block
Syntax:ACALL code address

InstructionsOpCodeBytesCyclesFlags
ACALL page00x1122None
ACALL page10x3122None
ACALL page20x5122None
ACALL page30x7122None
ACALL page40x9122None
ACALL page50xB122None
ACALL page60xD122None
ACALL page70xF122None


Description: ACALL unconditionally calls a subroutine at the indicated code address. ACALL pushes the address of the instruction that follows ACALL onto the stack, least-significant-byte first, most-significant-byte second. The Program Counter is then updated so that program execution continues at the indicated address.

The new value for the Program Counter is calculated by replacing the least-significant-byte of the Program Counter with the second byte of the ACALL instruction, and replacing bits 0-2 of the most-significant-byte of the Program Counter with 3 bits that indicate the page. Bits 3-7 of the most-significant-byte of the Program Counter remain unchaged.

Since only 11 bits of the Program Counter are affected by ACALL, calls may only be made to routines located within the same 2k block as the first byte that follows ACALL.

See Also: LCALL, RET, Instruction Set