beautypg.com

Segment, Org segment, Directive, see the – Zilog ZUSBOPTS User Manual

Page 263

background image

UM017105-0511

Directives

Zilog Developer Studio II – ZNEO™

User Manual

235

ORG

The

ORG

assembler directive sets the assembler location counter to a specified value in the

address space of the current segment.

The

ORG

directive must be followed by an integer constant, which is the value of the new

origin.

Synonyms

ORIGIN

,

.ORG

Syntax

<org_directive> =>

ORG

<int_const>

Examples

ORG %1000 ; Sets the location counter at %1000 in the address space

of current segment

ORG LOOP ; ERROR, use an absolute constant

On encountering the

ORG

assembler directive, the assembler creates a new absolute seg-

ment with a name starting with

$$$org

. This new segment is placed in the address space

of the current segment, with origin at the specified value and alignment as 1.

Zilog recommends that segments requiring the use of

ORG

be declared as absolute segments

from the outset by including an

ORG

clause in the

DEFINE

directive for the segment.

SEGMENT

Specifies entry into a previously defined segment.

The

SEGMENT

directive must be followed by the segment identifier. The default segment is

used until the assembler encounters a

SEGMENT

directive. The internal assembler program

counter is reset to the previous program counter of the segment when a

SEGMENT

directive

is encountered. See Table 19, “Predefined Segments,” on page 213 for the names of pre-
defined segments.

Synonyms

SECTION

Syntax

<segment_directive> =>

SEGMENT

<ident>

Note:

This manual is related to the following products: