Monday, February 29, 2016

8051 ACALL Instruction

Absolute Call

InstructionACALL addr11
FunctionAbsolute Call
Bytes2
Cycles2
EncodingA10 A9 A8 1 0 0 0 1 A7..A0
OperationPC = PC + 2
SP = SP + 1
(SP) = PC7-0
SP = SP + 1
(SP) = PC15-8
PC10-0 = A10-0
DescriptionACALL unconditionally calls a subroutine located at the indicated address. The instruction increments the Program Counter (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 (SP) 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.
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleInitially 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: Number of bytes required to encode the instruction.
Cycles: Number of instruction cycles required to execute the instruction. Note that there are 12 oscillator cycles to one instruction cycle on a standard 8051.
Encoding: Lists the byte encoding for the instruction.
Operation: Lists, step-by-step, the operations performed by the instruction.
Flags Affected: are highlighted in Bold



Related topics:
8051 Program Branching Instructions   |   8051 LCALL Instruction   |   8051 RET Instruction   |   8051 RETI Instruction   |   8051 JMP Instruction   |   8051 AJMP Instruction   |   8051 LJMP Instruction   |   8051 SJMP Instruction   |   8051 JZ Instruction   |   8051 JNZ Instruction   |   8051 CJNE Instruction   |   8051 DJNZ Instruction   |   8051 NOP Instruction

List of topics: 8051

No comments:

Post a Comment