Commodore PC Ms-Dos 3.2 User's Manual page 276

Table of Contents

Advertisement

204 MS-DOS User's Reference
DQ
Public combine types
Stack combine types
The frame number of a segment can be obtained from a link file.
The frame number is the first five hexadecimal digits of the start
address specified for the segment.
Order of Segments
Link copies segments to the executable file in the same order
that it encounters them in the object files. The linker maintains
this order throughout the program unless it encounters two or
more segments with the same class name. Segments with identical
class names belong to the same class type, and are copied to the
executable file as contiguous blocks.
The Microsoft Macro Assembler Reference Manual includes a
more detailed discussion of segment loading order and methods
of controlling loading order by assigning class types.
Combined Segments
Link uses combine types to determine whether two or more seg
ments sharing the same name should be combined into a single
large segment. The combine types ate public, stack, common,
memory, at, and private. Combine types are also described in the
Microsoft Macro Assembler Reference Manual.
If a segment has a public combine type, the linker automatically
combines it with any other segments that have the same name
and belong to the same class. When link combines segments, it
ensures that the segments are contiguous and that all addresses in
the segments can be accessed using an offset from the same frame
address. The result is the same as if the segment were defined as
a whole in the source file.
The linker preserves each segment's align type. This means that
even though the segments belong to a single, large segment, the
code and data in the segments retain their original align type. If
the combined segments exceed 64K bytes, link displays an error
message.
If a segment has a stack combine type, the linker carries out the
same combine operation as for public segments. The only differ
ence is that stack segments cause link to copy an initial stack-
pointer value to the executable file. This stack-pointer value is the
offset to the end of the first stack segment (or combined stack
segment) that the linker encounters.
If you use the stack type for stack segments, you do not need to
give instructions to load the segment into the SS register.
u
u
u
u

Advertisement

Table of Contents
loading

Table of Contents