Segments, Table 19, Predefined segments – Zilog ZUSBOPTS User Manual
Page 241: User-defined segments

UM017105-0511
Address Spaces and Segments
Zilog Developer Studio II – ZNEO™
User Manual
213
Segments
Segments are used to represent regions of memory. Only one segment is considered active
at any time during the assembly process. A segment must be defined before setting it as
the current segment. Every segment is associated with one and only one address space.
Predefined Segments
For convenience, the segments listed in Table 19 are predefined by the assembler.
User-Defined Segments
You can define a new segment using the following directives:
DEFINE MYSEG,SPACE=ROM
SEGMENT MYSEG
MYSEG becomes the current segment when the assembler processes the
SEGMENT
direc-
tive, and MYSEG remains the current segment until a new
SEGMENT
directive appears.
MYSEG can be used as a segment name in the linker command file.
You can define a new segment in ERAM space using the following directives:
DEFINE MYDATA,SPACE=ERAM
SEGMENT MYDATA
The
DEFINE
directive creates a new segment and attaches it to a space. For more informa-
tion about using the DEFINE directive, see the
SEG
-
Table 19. Predefined Segments
Segment ID
Space
Alignment
Type
Contents
CODE
EROM
2 bytes
Relocatable
Code
EROM_DATA
EROM
1 byte
Relocatable
Constant data, tables, and strings
EROM_TEXT
EROM
1 byte
Relocatable
Constant strings
ROM_DATA
ROM
1 byte
Relocatable
Constant data, tables, and strings
ROM_TEXT
ROM
1 byte
Relocatable
Constant strings
__VECTORS
ROM
1 byte
Absolute
Interrupt vector table
NEAR_DATA
RAM
1 byte
Relocatable
Initialized near data
NEAR_BSS
RAM
1 byte
Relocatable
Uninitialized near data
NEAR_TEXT
RAM
1 byte
Relocatable
Near strings
FAR_DATA
RAM
1 byte
Relocatable
Initialized far data
FAR_BSS
RAM
1 byte
Relocatable
Uninitialized far data
FAR_TEXT
RAM
1 byte
Relocatable
Far strings
IOSEG
IODATA
1 byte
Relocatable
I/O data