Intel iAPX 86 User Manual page 214

Table of Contents

Advertisement

iAPX 86,88 Family Utilities
Additional Information for Intellec Series III Users
Example 6: Linking and Locating Programs with Overlays
Without OVERLAY Control
It is harder to produce overlay modules without using the OVERLAY control.
However, sometimes it is necessary to build programs in this way, for example,
building a program for running under an operating system that does not support
overlay modules contained in the same file as the root module.
But regardless of the reason, building overlays in this fashion places an extra burden
on the programmer. He must do some of the work that would be left to LINKS6
(and LOCS6) if he were to use the OVERLAY control. In the following example we
prepare a root and two overlay modules in separate files.
First we must compile all modules. Examples of the invocation lines are shown
below:
RUN PLM86 :W1:ROO .SRC SMALL<c
RUN PLM86 :F1:0V1.SRC SMALL<cr
RUN PLM86 :F1 :OV2.SRC SMALL<cr
In the next step we must link the root module to resolve external symbols with a
library and to obtain a link map:
RUN LINK86 :F1:ROOT.OBJ,USER.L
We will need the link map for locating purposes. The link map, shown in figure 1-7,
shows the size of each segment in the root. Since the overlays are self-contained
except for references to the root, we do not need a link map for them. The PL/M-S6
listing files will show the size of each overlay's segments, as illustrated in figure I-S.
Note that the length of the root's code segment and OV 1 's code segment must fit
within 64K. This means that the code for the overlays must be in a part of memory
contiguous with the root (to avoid altering the CS register during execution). OV2's
CONST and DATA segments are larger than OV 1 's so that the STACK segment
must be placed to leave room for OV2's CONST and DATA segments. If the
overlays share the STACK and MEMORY segments with the root, they must be
located at the same address.
SERIES-III tJOtJ6
LIN~t;R,
Vx.y
INPUT FILES:
:F1:ROOT.OBJ,USER.LIB
OUTPUT FILE:
:F1:ROOT.LNK
CONTROLS SPECIFIED IN INVOCATION COMMAND:
MAP
DATE:
MMIDDIYY
TIME:
LINK MAP OF MODULE LOANER
LOGICAL SEGMENTS INCLUDED:
LENGTH ADDRESS ALIGN
SEGMENT
8A9BH -- .. ---
W
CODE
0381 H -- .. ---
W
CONST
0291H ------
W
DATA
0030H -- .. ---
STACK
OOOOH -_ .. _--
NJ:;MORY
NP T MODULES INCLUDED:
F1 ROOl'.OBJ(ROOT)
FO USEH.LIB(LOADER)
FD USER.LIBIEXIT)
FO USEH.LIB(ERROR)
FO USER.LIB(1IME)
CLASS
CODE
CONST
DATA
STACK
NEMORY
OVERLAY
Figure 1-7.
LINK86 Map
for Root File
1-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Iapx 88

Table of Contents