! I
.--,
I
~
: I
!
r-'
!
i '
, ,
i I
r-,
I
I
Chapter
II/Linking
Object Modules
Group
A group is a collection of segments
that
fit
within
a 64K byte
area
of memory. The segments
do
not need to be contiguous. The
group address is
the
lowest address of the lowest segment
in
that
group. At
link
time,
the
linker analyzes
the
groups and
then
ref-
erences
the
segments by
the
group address. A program can con-
sist
of one or more groups.
When
writing
in
assembly language, you can assign
the
names
of groups
in
your program.
In
high-level languages,
the
compiler
automatically assigns
the
names. The linker checks to see
that
the
object modules of a group meet
the
64K-byte constraint.
Class
A class is a collection of segments. The naming of segments to a
class controls
the
order and relative placement of segments
in
memory.
In
an
assembly language program, you assign names to
the
classes.
In
high-level language programs,
the
compiler auto-
matically assigns
the
names.
All segments assigned to
the
same class
are
loaded into memory
contiguously. The segments
are
ordered
within
a class,
in
the
order they
are
encountered by
the
linker in
the
object files. One
class precedes another
in
memory only
if
a segment
for
the
first
class precedes all segments
for
the
second class
in
the
input
to
the
linker. Classes can be any size, and groups can
span
classes.
Refer to Chapter 12
for
information
on
how to assign group and
class names and on how
the
linker combines and arranges seg-
ments
in
memory.
Command
Prompts
When
the
linker is
started
(see
"Starting
the
Linker"
later
in
this
chapter), a series of four prompts appears
on
your display.
When you type a response to a prompt and press
I
ENTER
I,
the
next
prompt appears.
After
the
last
prompt,
the
linker begins linking.
If
it
finishes
successfully,
the
linker exits, and
the
screen displays
the
MS-
DOS system prompt.
If
an
error occurs,
the
linker displays
the
appropriate error message.
239