Chapter 12 /
Link
Technical Reference
the Linker loads the segments as:
'ZOO'
A
E
'BAZ'
B
C
'NEW'
D
If
you
are
writing assembly language programs,
you
can control
the order of classes
in
memory by writing a dummy module and
listing
it
first after the linker's
Obj
eet
Modules:
prompt. The
dummy module declares segments into classes
in
the order you
want the classes loaded.
Warning:
Do
not
use
this
method
with
BASIC,
COBOL,
FORTRAN, or Pascal programs. Allow the
compiler and the linker to perform
their
tasks
in
the
normal
way.
Example
A
SEGMENT
'CODE'
A
ENDS
B
SEGMENT
'CONST'
B
ENDS
C
SEGMENT
'DATA'
C
ENDS
D
SEGMENT
STACK
'STACK'
D
ENDS
E
SEGMENT
'MEMORY'
E
ENDS
Make
sure
you
declare all classes to be used
in
your program
in
this module.
If
you
do
not,
you
lose absolute control over the
ordering of classes.
252
,
l.......J
; I
, I
..
~
,---'
u
i !
.-J
, ]
I '
:.-J
1 :
u
I I
'--'
, I
,
'----"
I i
U