Chapter
11
I
Linking
Object Modules
In MS-DOS, memory can be divided into segments, classes, and
groups. The following
diagram
illustrates these concepts.
Segment Segment
Segment
14 15 16
Segment
Segment Segment
3 4 5
Memory
Segment
11
Segment
8
Segment
9
Segment
10
i
e-J
I I
I I
----'
1
L...J
J
Segment
Segment
17 18
Segment Segment Segment
Segment
. 19 20 21
22
I 1
LJ
shaded
area
= group (64K bytes addressable)
Example
Segment Class
Name
Name
Segment 1 PROG.1
CODE
Segment 2 PROG.2
CODE
Segment 12
PROG.3
DATA
Note
that
segments
must
have different segment names
but
may
or may not have
the
same class name. Segments 1,
2,
and 12
form a group;
the
group address is
the
lowest address of Segment
1 (the lowest address
in
memory).
Segment
A segment is a contiguous
area
of memory up to 64K bytes long.
It
can
be located anywhere
in
memory on a
paragraph
(16-byte)
boundary. The contents of a segment
are
addressed by a segment
address
and
an
offset
within
that
segment.
Segments
can
overlap.
238
, I
L-J
J
I
~
J
I i
L-..J
I
----'