beautypg.com

Segments, Table 18, Predefined segments – Zilog Z8F0130 User Manual

Page 303

background image

UM013037-1212

Segments

Zilog Developer Studio II – Z8 Encore!

User Manual

279

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.

The following sections describe segments:

Predefined Segments

– see page 279

User-Defined Segments

– see page 280

Predefined Segments

For convenience, the segments listed in the following table are predefined by the assem-
bler. Each segment gets assigned to one of the address spaces. All of the predefined seg-
ments listed here can be aligned on any byte boundary.

Initialized segments in RDATA or EDATA, such as NEAR_BSS or FAR_DATA, require
start-up code to initialize them because only segments in ROM or EROM can actually be
initialized by the assembler/linker. For an example of how to do this, study the C start-up
code, in

ZILOGINSTALL\ZDSII_product_version\src\rtl\common\ start-

ups.asm

, and the linker command files automatically generated for a C project.

Table 52. Predefined Segments

Segment ID

Space

Contents

Default Origin

near_bss

RData

Uninitialized data

Relocatable

far_bss

EData

Uninitialized data

Relocatable

near_data

RData

Initialized data

Relocatable

far_data

EData

Initialized data

Relocatable

rom_data

ROM

Initialized data

Relocatable

near_txt

RData

String constants

Relocatable

far_txt

EData

String constants

Relocatable

rom_text

ROM

String constants

Relocatable

code

ROM

Code

Relocatable

text

RData

Initialized data

Relocatable

__vectors_nnn ROM

Interrupt vectors

Absolute

pramseg

PRAM

Code

Relocatable

Note: