Segment Naming Conventions

Objects generated by the C51 compiler (program code, program data, and constant data) are stored in segments which are units of code or data memory. A segment may be relocatable or may be absolute. Each relocatable segment has a type and a name. This section describes the conventions used by C51 for naming these segments.

Segment names include a module_name. The module_name  is the name of the source file in which the object is declared and excludes 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 and stored in uppercase.

Each segment name has a prefix that corresponds to the memory type used for the segment. The prefix is enclosed in question marks (?). The following is a list of the standard segment name prefixes:

Segment Prefix

Data Type

Description

?PR?

code

Executable program code

?CO?

code

Constant data in program memory

?XD?

xdata

External data memory

?DT?

data

Internal data memory

?ID?

idata

Indirectly-addressable internal data memory

?BI?

bit

Bit data in internal data memory

?BA?

bdata

Bit-addressable data in internal data memory

?PD?

pdata

Paged data in external data memory