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

Table of Contents

Advertisement

186 MS-DOS User's Reference
Note When linking modules produced by a high-level-language
v-^
compiler that supports overlays, you must specify overlay modules
by putting them in parentheses. Since masm has no overlay
manager, you can specify overlays only for object files linked with
^J
the run-time library of a language compiler that supports overlays.
For example, you can use overlays with modules compiled with
Microsoft Fortran versions 3.2 and later, Microsoft Pascal versions
w
3.2 and later, and Microsoft C versions 30 and later. See your
language compiler's manual for details on specifying overlays.
'KJ
Examples:
Using Link with
The first example below uses the object file fileobj to create the
{^J
command line options
executable file fileexe. Link searches the file, lib library for rou
tines and variables used within the program. It also creates a file
called file, map, which contains a list of the program's segments
.
\
and groups:
^—^
link
file.obj,file.exe7file.map7routine.lib
The first example is equivalent to the following line:
link
file , , 7routine
I)
The second example uses the two object files, startup, obj and
fileobj, on the current drive to create an executable file named
i
j
fileexe on drive B. Link creates a map file on the \map direc-
^~"/^
tory of the current drive, but does not search any libraries:
link startup+file,b:file,\map\file;
K^J
The final example links the object modules modaobj, modb.obj,
mode obj, and startup, obj:
{^_J
link
moda
modb
mode
5 tartup/PAUSE,,abc,b:\1ib\math
The linker searches through the library file math, lib in the \lib
directory on drive B for routines and data used in the program. It
then creates an executable file named modaexe, and a map file
.
\
named aba map.
^-^
The pause option in the command line causes the linker to pause
and ask you to change'disks before it creates the executable file.
/
\
(This option is described in more detail in the section "Pausing to
^—^
Change Disks" later in this chapter.)

Advertisement

Table of Contents
loading

Table of Contents