Monday, February 29, 2016

8051 JMP Instruction

Jump indirect

InstructionJMP @A+DPTR
FunctionJump indirect
Bytes1
Cycles2
Encoding0 1 1 1 0 0 1 1
OperationPC = A + DPTR
DescriptionJMP @A+DPTR adds the eight-bit unsigned contents of the Accumulator with the 16-bit data pointer and loads the resulting sum to the program counter. This is the address for subsequent instruction fetches. Sixteen-bit addition is performed (modulo 216): a carry-out from the low-order eight bits propagates through the higher-order bits. Neither the Accumulator nor the Data Pointer is altered. No flags are affected
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleAn even number from 0 to 6 is in the Accumulator. The following sequence of instructions branches to one of four AJMP instructions in a jump table starting at JMP_TBL.
MOV DPTR, # JMP_TBL
JMP @A + DPTR
JMP_TBL: AJMP LABEL0
AJMP LABEL1
AJMP LABEL2
AJMP LABEL3
If the Accumulator equals 04H when starting this sequence, execution jumps to label LABEL2. Because AJMP is a 2-byte instruction, the jump instructions start at every other address.
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 ACALL Instruction   |   8051 LCALL Instruction   |   8051 RET Instruction   |   8051 RETI 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