LX51 User's Guide

Segments

Objects generated by the Cx51 and Intel PL/M-51 compilers are stored in segments, which are units of code or data memory. Segments may be absolute, meaning they are located at a specific address, or relocatable, meaning that the linker assigns them a final address (in accordance with certain restrictions specified in the segment definitions). Relocatable segments have a type and a name unlike absolute segments.

Segment names include a module_name which is the name of the source file in which the object is declared excluding the drive letter, path specification, and file extension. In order to accommodate a wide variety of existing software and hardware tools, all segment names are converted to and stored in uppercase.

Each segment name has a prefix (or in case of PL/M-51 a suffix) that corresponds to the memory type used for the segment. The prefix is enclosed in question marks (?). Following is a list of standard segment name prefixes.

Segment
Prefix
Memory
Class
Description
?BA?DATABit-addressable data in internal data memory
?BI?BITBit data in internal data memory
?CO?CONSTConstant data in program memory
?DT?DATADATA memory
?FC?HCONSTFar constant data in program memory
?FD?HDATAHDATA memory for far variables
?ID?IDATAIDATA memory
?PD?XDATAPaged data in XDATA memory
?PR?CODEExecutable program code
?PR?ECODEExecutable program code in far memory
?XD?XDATAXDATA memory

Refer to Segment Naming Conventions in the Cx51 Compiler User's Guide for more information about segment names.