
THE 8051 MICROCONTROLLER: THE PROGRAMMER’S PERSPECTIVE 491
e maximum size of ROM is 64K, and so addresses of ROM locations can be
16 bits long. In indexed addressing mode, the DPTR is used as a base address, and the
accumulator is used as an off set. e eff ective address formed by adding the value of
the base address to the off set, is the ROM address to be accessed. ere is the MOVC
instruction especially tailor-made for ROM access.
MOVC A, @A+DPTR is the instruction which loads the content of ROM with
eff ective address A+DPTR, into the A register.
Consider that the ROM location 0500H is to be accessed. e instructions needed
for getting ...