Intel iAPX 86 User Manual page 217

Table of Contents

Advertisement

Additional Information for Intellec Series III Users
iAPX 86,88 Family Utilities
1-14
Example 7: Linking 8089 Programs. with 8086 Programs
The process of linking and locating 8086 programs with 8089 programs that use 8089
local memory is very similar to creating overlay modules in separate files.
Let us consider the following example: we have created an 8086 program and two
8089 program modules. The 8089 programs reference each other's symbols and
public symbols in the 8086 program. In addition, one of the 8089 programs must be
resident in 8089 local memory.
The first step is to translate the programs. The 8089 program modules must be
translated separately, since they will be located in different 8089 address spaces. The
following lines illustrate the invocation lines to the translators:
RUN ASM86 : F1 : PROG86. A86<c r>
ASM89 :F1:TASK1.A89<cr>
ASM89 :F1:TASK2.A89<cr>
T ASK2 should be linked and located first for 8089 local memory. This linkage will
leave unresolved external references, but it is needed to resolve the references in
TASK1:
RUN LINK86 :F1:TASK2.0BJ,8089.L
RUN LOC86 : F1 :TASK2. LNK RESERVE (10000H TO OFFFFFH)<cr>
The RESERVE control in the locate above is a precaution to avoid exceeding 64K.
The next step is to link and locate the object modules that will reside in the 8086's
address space. The external references to the 8089 program module that is resident in
8089 local memory are resolved with the PUBLICSONL Y control. The invocation
lines for linking and locating the modules are:
>
>
RUN LINK86 :F1 :PROG86.0BJ, &<cr
8086.LIB, :F1 :TASK1.0BJ,8089.LI
PUBLICSONLY(:F1:TASK2) TO :F1:
RUN LOC86 :F1:86N89.LNK<cr>
:Fl :86N89 contains an absolute object module that includes PROG86 and TASK!.
It may be loaded and executed on an 8086-based system. However, the 8089 pro-
gram to be located in 8089 local memory still has some unresolved external
references. To resolve those references we must relink with PUBLICSONL Y and
relocate. The invocation lines to LINK86 and LOC86 shown below are identical to
those used earlier. This is necessary to guarantee that the references resolved earlier
are not invalidated:
RUN LOC86 :F1 :TASK2.LNK RESERVE (10000H TO OFFFFFH)<cr>
NOTE
The example above makes many assumptions about the 8089 and 8086 code
that it deals with. In most practical situations it is usually necessary to use a
more complex LINK86 and LOC86 invocation. However, the example
above illustrates the key linking and locating principles underlying
ASM861 ASM89 module combination.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Iapx 88

Table of Contents