Zilog EZ80F916 User Manual
Page 259

UM014423-0607
Using the Linker/Locator
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
239
•
DATA (segment type for initialized data; address space is RAM)
•
STRSECT (segment type for string constants; address space is RAM by default)
•
TEXT (segment type for constant data; address space is RAM by default)
The default relationships of these segments to the four address spaces are shown in the fol-
lowing figure.
Figure 91. Segment and Space Relationships
The address spaces listed in “eZ80Acclaim! Address Spaces” on page 238 are those used
for the run-time addresses of the segments. Some segments can be copied from one space
to another, depending on the memory configuration (described in “Linker Configurations”
on page 240). For example, in a typical configuration, the DATA segment is placed in
ROM at load time and then copied to RAM on application reset; it is the copy in RAM that
is actually used when the program runs, but the ROM version is necessary so that the pro-
gram can be re-initialized at reset.
The address spaces listed in “eZ80Acclaim! Address Spaces” on page 238 define the logi-
cal spaces to which the segments are assigned. The relationship between the logical RAM/
ROM spaces and physical RAM or ROM memory depends on your system configuration
and might be more complicated. For more information, see “Link Configuration” on
page 77.
You have complete control over the order in which these segments are loaded into the
RAM address space.
You can define additional CODE segments in C by marking the One Code Segment Per
Module check box on the Advanced page of the Project Settings dialog box (see “Project
Settings—Advanced Page” on page 66). For the
myfile.c
module, the code segment is
given the name
myfile_TEXT
(“text” refers to code, unlike the TEXT segment that con-
tains constant data). All of the procedures in the
myfile_TEXT
module are assigned to
that same segment, and the segment is assigned to ROM space. All of the uninitialized