LX51 User's GuideLX51 Introduction Purpose of the Linker Combining Modules Searching Libraries Code Packing Combining Segments Locating Segments Overlaying Data Memory Resolving Externals Calculating Addresses Generating an Object File Generating a Listing File Memory Classes BIT, DATA, and IDATA CODE and CONST XDATA HCONST HDATA Classic 8051 Devices Extended 8051 Devices NXP 51MX Devices Segments Linking Programs Locating Program Objects Data Overlaying Code Banking Real-Time Programs Error Messages
Classic 8051 Devices
The classic 8051 architecture includes the following memory classes.
BIT, DATA, and IDATA
The BIT, DATA, and IDATA memory classes comprise the on-chip memory of the 8051 architecture and are shown in the following figure.
CODE and CONST
The CODE and CONST memory classes are typically stored in ROM that may be either off-chip or on-chip. The CODE memory class is used for the actual program code while the CONST memory class is used for constant variables declared in code space.
In addition, up to 32 code banks may be used for code banking applications. While these are technically located in code space, they are assigned their own address space.
XDATA and PDATA
The XDATA memory class is typically stored in RAM that may be off-chip or on-chip (on newer devices). It contains external program data (named because it was off-chip on the original 8051 devices) including variables declared with the xdata and pdata memory types.
The PDATA memory class is a 256-byte page within the XDATA memory class.
Related Knowledgebase Articles
of your data.