Segment, Org segment – Zilog EZ80F916 User Manual
Page 228
UM014423-0607
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
208
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 the origin at the specified value and alignment as 1.
NOTE: 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 8, “Predefined Segments,” on page 184 for the names of pre-
defined segments.
Synonyms
.section
,
SECTION
Syntax
<segment_directive> =>
SEGMENT
<ident>
Example
SEGMENT code ; predefined segment
DEFINE data ; user-defined