8086 Object Module Formats

Version 4.9

MODULE IDENTIFICATION

In order to determin~ that a file contains an object program, a

module header record will always be the first record in a module. There are three kinds of header records and each provides a module name. The additional functions of the header records are explained below.

A module name may be qenerated durinq one of two processes:

translation or linking. A module that results from translation is

called a T-MODULE. A T-MODULE will have a T-MODULE HEADER RECORD (THEADR). A name may be provided in the THEADR record by a

translator. This name is then used to identify the source of all symbols and line numbers found in the T-MODULE.

A module that results from linkinq is called an L-MODULE or an

R-MODULE. An L-MODULE will always have an L-MODULE HEADER RECORD (LHEADR). An R-MODULE will always have an R-MODULE HEADER RECORD

(RHEADR). In the LHEADR record or the RHEADR record a name may also be provided. This name is available for use as a means of referrinq to the module without usinq any of its constituent T-MODULE names. An example would be two T-MODULES, A and S, linked toqether to form

R-~ODULEC. R-MODULE C will contain two THEADR records and will beqin with an RHEADR record with the name C provided by the linker as a directive from the user. The ·R-MODULE C can be referred to by other tools such as the library manaqer without h~vinq to know about the oriqinatinq module's names, yet the oriainatinq module's names are preserved for debugginq purposes.

MODULE ATTRIBUTES

In addition to an optional name, a module may have the attribute of beinq a main program as well as havinq a specified starting address. When linking multiple modules tog~ther, only one

module with the main attribute should be given. The linker EPS specifies the result of finding two or more main modules.

If a module is not a main module yet has a starting address then this value has been provided by a translator, possibly for

debuqginq purposes. A starting address specified for a non-main module could be the entry point of a procedure, which may be loaded and initiated independent of a main proqram.

In summarYr modules mayor may not be main as well as mayor may not have a startinq address.

SEGMENT DEFINITIO~

A module is defined as a collection of object code defined by a

seauence of records produced hy a translator. The obiect code

9

Page 9
Image 9
Intel 121748-001 manual Module Identification, Module Attributes