Zilog EZ80F916 User Manual
Page 263

UM014423-0607
Using the Linker/Locator
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
243
This command defines a new address space (MEMORY) that contains the existing
logical address spaces RAM and ROM.
•
RANGE MEMORY $0 : $FFFF
This command defines the valid addresses for the new space.
ZDS II creates the RANGE command starting with the lowest address specified in the
New Project Wizard dialog box or the Address Spaces page of the Project Settings dialog
box and ending with the highest address. The lowest address is
min (min(ROM),
min(RAM))
and the highest address is
max (max(ROM),max(RAM))
. These two ZDS II-
generated commands are critical for building an All RAM configuration.
Both the GROUP MEMORY and RANGE MEMORY commands are required for the All
RAM configuration. A common error made by users trying to set up this configuration
manually is to omit the RANGE MEMORY command. To illustrate the effects of such an
error, suppose the New Project Wizard dialog box or the Address Spaces page of the
Project Settings dialog box has the following values for a 64K memory machine:
ROM:
0-7FFF
RAM:
8000-FFFF
If the All RAM configuration is not used to create the linker command file, ZDS II con-
verts the values in the New Project Wizard dialog box or the Address Spaces page of the
Project Settings dialog box to the following linker commands:
RANGE ROM $0 : $7FFF
RANGE RAM $8000 : $FFFF
which, if followed by
GROUP MEMORY=ROM,RAM
results in ROM segments starting at address
$0
and RAM segments starting at
$8000
,
potentially wasting space if the ROM segments do not fully occupy the range from
$0 -
$7FFF
. The following command
RANGE MEMORY $0 : $FFFF
overrides the RANGE commands for the component address spaces and binds the RAM
segments immediately after the ROM segments.
NOTE: The names following the = in the GROUP command define an ordering for the
new GROUP. In the preceding example, all of the ROM segments are allocated
memory at lower addresses than the RAM segments. However, the following
GROUP statement locates all of the RAM segments first:
GROUP MEMORY=RAM,ROM