Chapter
4.
Assembler
Directives
When assembly begins, the assembler assurr.es the ASEG directive to
be
in
effect. Therefore, a CSEG or DSEG
must precede the first instruction or data definition
in
a relocatable module. If neither
of
these directives
appears
in
the program, the entire program
is
assembled
in
absolute mode and can
be
executed immediately
after assembly
without
using the LINK or LOCATE programs.
CSEG Directive
CSEG directs the assembler
tOo
a-,semble subsequent instructions and data
in
the relocatable mode using the code
segment location
counter.
Label
Opcode
Operand
optional: CSEG
{
blank }
PAGE
INPAGE
When a program contains multiple CSEG directives,
all
CSEG directives throughout the program must specify
the same operand. The operand
of
a CSEG directive has no effect on the
current
assembly,
but
is
stored with
·the object code
to
be pas>ed
10
the LINK and LOCATE programs. (These programs arc described
in
the ISIS-II
System User's Guide.) The LOCATE program uses this information to determine relocation boundaries when it
joins this code segment
to
code segments from
other
programs. The meaning
of
the operand
is
as
follows:
•
blank This code segment may
be
relocated to the next available byte boundary.
• PAGE This code segment must begin on a page boundary when relocated. Page boundaries
occur
in
multiple<_
of
256
bytes beginning with zero
(0,256,
512, etc.).
• INPAGE
--
Thi,
code segment must fit within a single page when relocated.
The CSEG directive remains
in
effect until an ASEG or DSEG directive
is
encountered.
The code segment location
counter
ha,
an initial value
of
zero. The ORG directive can
be
u';ed to assign a new
value to the
CSEG location counter.
DSEG Directive
DSEG directs the assembler to assemble <;ubsequent instructions and data
in
the relocatable mode using the data
segment location counter.
Label
Opcode Operand
optional: DSEG
f
blank I
PAGE
;>
lINPAGE)
When multiple DSEG directives appear
in
a program, they must
all
specify the same operand
throughout
the
program. The operands for
the
DSEG directive have the same meaning
a,
for the CSEG directive except
that
they apply
to
the data segment.
4-15