8051 instruction :: Ajmp

AJMP


Operation:AJMP
Function:Absolute Jump Within 2K Block
Syntax:AJMP code address

InstructionsOpCodeBytesCyclesFlags
AJMP page00x0122None
AJMP page10x2122None
AJMP page20x4122None
AJMP page30x6122None
AJMP page40x8122None
AJMP page50xA122None
AJMP page60xC122None
AJMP page70xE122None


Description: AJMP unconditionally jumps to the indicated code 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 AJMP instruction, and replacing bits 0-2 of the most-significant-byte of the Program Counter with 3 bits that indicate the page of the byte following the AJMP instruction. 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 AJMP, jumps may only be made to code located within the same 2k block as the first byte that follows AJMP.









Post Your Comments Here :
 


User Login

Username :


Password :