 | Discussion Forum |  |
|
|
Problem addressing XDATA memory above 100HEXNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Frank Way Posted 19-Dec-2000 18:29 GMT Toolset C51 |  Problem addressing XDATA memory above 100HEX Frank Way When my code is compiled, it causes XDATA memory above 100HEX to be addressed with MOVX @R0,A rather than MOVX @DPTR,A instructions. This causes variables in the XDATA range 0 - 100HEX to be overwritten. I do not have this problem with XDATA above C000HEX, and am not sure how far above 100HEX this problem exists. Any solutions would be appreciated.
Thank you,
Frank Way | | Read-Only Author Mark Odell Posted 19-Dec-2000 19:38 GMT Toolset C51 |  RE: Problem addressing XDATA memory above 100HEX Mark Odell Please inlcude a short segment of C code that demonstrates the problem. Note any compiler flags you use too.
XDATA can be accessed with R0 as a page pointer by setting up Port 2 and then using R0 to control Port 0 (the LSB). Are you using pdata anywhere?
- Mark | | Read-Only Author Andrew Neil Posted 20-Dec-2000 09:10 GMT Toolset C51 |  RE: Problem addressing XDATA memory above 100HEX Andrew Neil Have you seen: http://www.keil.com/support/docs/719.htm
You will also need to set up the specifications for PDATA and XDATA in your Project - on the 'BL51 Locate' tab.
You may also need to modify startup.a51, which includes the definition of which page of XDATA is used for PDATA See: http://www.keil.com/support/docs/1296.htm
(1 "page" = 256 bytes = 0x100 - surprise!)
This might also help: http://www.keil.com/support/docs/746.htm
| |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|