Semiconductor Group
4-39
1998-04-01
Instruction Set
C500 Family
JMP
@A + DPTR
Function:
Jump indirect
Description:
Add the eight-bit unsigned contents of the accumulator with the sixteen-bit data
pointer, and load the resulting sum to the program counter. This will be the address
for subsequent instruction fetches. Sixteen-bit addition is performed (modulo 2
16
): 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.
Example:
An even number from 0 to 6 is in the accumulator. The following sequence of
instructions will branch 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 will jump to
label LABEL2. Remember that AJMP is a two-byte instruction, so the jump
instructions start at every other address.
Operation:
JMP
(PC)
¬
(A) + (DPTR)
Bytes:
1
Cycles:
2
Encoding:
0 1 1 1
0 0 1 1