www
.mcu.com.cn
20
/
239
Rev.
1.00
CMS80F731x Reference Manual
2.4
General External Data Register XRAM
There is a maximum 1KB XRAM area inside the chip, this area is not connected to FLASH/RAM, and the XRAM space
allocation block diagram is shown in the following figure:
03FFH
XRAM
1KB
(Indirect Addressing
Mode)
0000H
XRAM/XSFR spatial access operates through DPTR data pointers, which consist of two sets of pointers: DPTR0, DPTR1,
selected by the DPS registers. For example, through movx indirection operations, the assembly code is as follows:
MOV
R0.#01H
MOV
A,#5AH
MOVX
@R0,A
; Write the data in A to XRAM address 01H, the high 8-bit address is
determined by DPH0/1
After target--> Memory Model is set to Large in Keil51, the C compiler will take XRAM as the variable address. XRAM/XSFR
operations are generally performed with DPTR.