Overlays; Position-Independent-Code And Load-Time-Locatable Code - Intel iAPX 86 User Manual

Table of Contents

Advertisement

Introduction
1-10
iAPX 86,88 Family Utilities
Overlays
Sometimes your 8086 program is too large to fit into the memory available on the
system. Overlays permit programs to be larger than the available memory.
Typically, an overlay is composed of code and data that is executed in one phase of a
program's execution, but not used at any other time. Once executed the memory
used by this code can be overwritten with code and data used in an other phase.
Sections of code that occupy the same part of memory at different times during
execution are called overlays.
Part of an overlaid program is always resident in memory; it usually comprises the
main program module, frequently used routines, and the overlay loader. This part
of the program is called the root. Figure 1-7 illustrates the memory configuration of
one program that uses overlays.
,
,
,-
,
L.
T --
I
L7----L~~'~~~7
/
FOR
L 7 --
I
L. __ _
----------,
I
OVI::RLAY SPACE
I
I
...............................
" - -
-
- -
---_--./
Figure 1-7. Memory Configuration of Program with Overlays
639-7
Position-Independent Code and Load-Time-
Locatable Code
An L TL (load-time-Iocatable) program can be loaded anywhere in memory (assum-
ing alignment attributes are honored). Code and data addresses are assigned by the
system loader. References to segment bases (!;egment registers) are permitted. The
loader, when it determines where to locate each segment, must resolve these
references to the segment bases. Before executing the L TL program, the loader must
also initialize the segment registers.
A PIC (position-independent-code) program is an L TL program, but it contains no
references to segment bases. To execute these programs the loader need only place
the program in memory (recognizing alignment attributes) and initialize the segment
registers and go. No fixup of segment bases is required.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Iapx 88

Table of Contents