beautypg.com

Define, Ee the, Align clause – Zilog ZUSBOPTS User Manual

Page 259: Org clause

background image

UM017105-0511

Directives

Zilog Developer Studio II – ZNEO™

User Manual

231

DEFINE

Defines a segment with its associated address space, alignment, and origin. You must
define a segment before you can use it, unless it is a predefined segment. If a clause is not
given, use the default for that definition. For more information about the

SEGMENT

direc-

tive, see

SEGMENT

– see page 235. For a list of predefined segments, see

Predefined

Segments

– see page 213.

Synonym

.define

Syntax

<segment_definition> =>

DEFINE

<ident>[<space_clause>][align_clause>][<org_clause>]

Examples

DEFINE near_code ; Uses the defaults of the current

; space, byte alignment and relocatable.

DEFINE irq_table,ORG=%FFF8 ; Uses current space, byte alignment,

; and absolute starting address at

; memory location %FFF8.

ALIGN Clause

Allows you to select the alignment boundary for a segment. The linker places modules in
this segment on the defined boundary. The multiple, given in bytes, must be a power of
two (1, 2, 4, 8, and so on).

Syntax

<align_clause> => ,

ALIGN

= <int_const>

Example

DEFINE fdata,SPACE = ERAM,ALIGN = 2

; Aligns on 2-byte boundary, relocatable.

ORG Clause

Allows you to specify where the segment is to be located, making the segment an absolute
segment. The linker places the segment at the memory location specified by the

ORG.

The

default is no

ORG,

and thus the segment is relocatable.

Syntax

<org_clause> => ,

ORG

= <int_const>

This manual is related to the following products: