THEADR, LNAMES, SEGDEF, EXTDEF and PUBDEF, LEDATA, FIXUPP, MODEND records
The module name in the THEADR record is typically derived by the translator from the source file name.
This name is used by the linker to report errors.
An assembly programmer can specify the module name in the NAME directive.
The LNAMES record lists the names for use by SEGDEF records.
98H length attributes segment namecheck-sum
A SEGDEF record designates a segment name using an index into this list.
Moreover, The attributes field of a SEGDEF record indicates whether the segment is relocatable or absolute, whether (and in what manner) it can be combined with other segments, as also the alignment requirement of its base address (e.g. byte, word or paragraph, i.e. 16 bytes, alignment).
Stack segments with the same name are concatenated with each other, while common segments with the same name are overlapped with one another.
The attribute field also contains the origin specification for an absolute segment.
EXTDEF and PUBDEF record
8CHlengthexternal reference check-sum
The EXTDEF record contains a list of external references used by the programs of this module.
A FIXUPP record designates an external symbol name by using an index into this list.
A PUBDEF record contains a list of public names declared in a segment of the object module.
Moreover, The base specification identifies the segment.
Each (name, offset) pair in the record defines one public name, specifying the name of the symbol and it’s offset within the segment designated by the base specification.
A0Hlengthsegmentdata offset data check-sum index(2)
- A LEDATA record contains the binary image of the code generated by the language translator.
- Segment index identifies the segment to which the code belongs, and offset specifies the location of the code within the segment.
A FIXUPP record contains information for one or more relocation and linking fixups to perform.
The local field contains a numeric code called loc code to indicate the type of a fixup.
The meanings of these codes given in Table
Loc code meaning THEADR, LNAMES, SEGDEF
0Low order byte is to fix.
1Offset to fix.
2Segment to fix.
3Pointer (i.e., segment: offset) is to fix.
located also contains the offset of the fixup location in the previous LEDATA record.
Moreover, The frame datum field, which refers to a SEGDEF record, identifies the segment to which the fixup location belongs.
Moreover, The target datum and target offset fields specify the relocation or linking information.
Target datum contains a segment index or an external index, while target offset contains an offset from the name indicated in target datum.
The fix dat field indicates the manner in which the target datum and target offset fields to interpreted.
Similarly, The numeric codes used for this purpose given in below table.
Code contents of target datum and offset fields
0Segment index and displacement.
2External index and target displacement.
4Segment index (offset field not used).
6External index (offset field not used).
The MODEND record signifies the end of the module, with the type field indicating whether it is the main program.
Moreover, This record also optionally indicates the execution start address.
This has two components: (a) the segment, designated as an index into the list of segment names defined in SEGDEF record(s), and (b) an offset within the segment.