C51: INITIALIZING XDATA OVER FF00H
Information in this article applies to:
If you set XDATALEN in the STARTUP.A51 file to anything over FF00H, a warning is generated when an attempt is made to assemble the file. How do I fix this?
Also, how do you initialize location FFFFH in XDATA?
The warning indicates that a value is being truncated, and can easily be fixed. Remove the following section from the STARTUP.A51 file:
IF (LOW (XDATALEN)) <> 0 MOV R6,#(HIGH XDATALEN) +1 ELSE MOV R6,#HIGH (XDATALEN) ENDIF
and replace it with:
IF (LOW (XDATALEN)) <> 0 MOV R6,#LOW ((HIGH XDATALEN) +1) ELSE MOV R6,#HIGH (XDATALEN) ENDIF
It is not possible to initialize location FFFFH in XDATA. In order to do that, you would have to specify an XDATALEN of 10000H which is a 17-bit value. You can modify the STARTUP.A51 file yourself to workaround this problem, or you may initialize that particular location explicitly, either in the STARTUP.A51 file or in your project.
Last Reviewed: Friday, July 15, 2005
of your data.