10 / 132 page

Handshake Solutions
HT80C51 User Manual
Memory Organization – Accessing Program Memory
Page 10 of 132
© Philips Electronics N.V. 2005
special functions
registers (SFRs)
upper area of
RAM
(128 bytes)
lower area of
RAM
(128 bytes)
direct addressing
(DATA)
indirect addressing
(IDATA)
internal data memory
FFH
80H
7FH
00H
[Figure 4]
Memory map of Internal Data
2.2.
Accessing Program Memory
The program memory is readable only and can be accessed by two access methods:
Instruction fetches using the 16bit program counter (PC) as the address or move-code instructions
using the 16bit data pointer (MOVC @DPTR) or again the PC (MOVC @PC) as reference.
2.3.
Accessing External Data Memory
In contrast to the program memory the external data memory is read- and writeable. Accesses to ex-
ternal data memory can be done thru the MOVX-instruction only, which comes in two flavors:
MOVX @DPTR uses the data pointer to form the 16bit address.
MOVX @Ri uses one of the index registers to form the lower 8bits of the address with the upper part
of the address being defined by the SFR XRAMP.
The first variant is usually faster and a more general access method. The second variant (MOVX @Ri)
can be used as a paging access to a rather small area of data.