i@.
MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
JMP @A+DPIR
Function:
Bytex
Oycies:
Encoding:
Opersliorx
]umpindirect
Addthe eight-bitunsignedcontentsofthe Accurnulator withthe sixteen-bitdata pointer,and
loadthe resultingsumto the programcounter.Thiswillbethe addressforsubsequentinstruc-
tion fetches.Sixteen-bitaddition is performed(modrdo216):a camy-outfrom the low-order
eight bits propagatesthrough the higher-orderbits. Neither the Accumulatornor the Data
Pointer is altered.No tlags are affected.
An evennumberfromOto 6isin the Accumulator.The followingsequenceofinstructionswill
branch to one offour AJMP instructionsin a jump table starting at JMP-TBL:
MOV
DPTRj#JMP-TBL
JMP
@A+DPTR
JMP-TBL:
AJMP LABEL.O
AJMP LABEL1
AJMP LABEL2
AJMP LABEL3
If the Accumulatorequals 04H when starting this sequence,executionwill jump to label
LABEL2.Rememberthat AJMP is a two-byteinstruction,so the jump instructionsstart at
everyother address.
1
2
10111 00111
JMP
W)+ (A) +
WW
2-48