17.01.2015 Views

Relocatable Object Module Format (OMF) Specification

Relocatable Object Module Format (OMF) Specification

Relocatable Object Module Format (OMF) Specification

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Relocatable</strong> <strong>Object</strong> <strong>Module</strong> <strong>Format</strong><br />

Example<br />

The following LEDATA record contains a simple text string:<br />

0 1 2 3 4 5 6 7 8 9 A B C D E F<br />

0000 A0 13 00 02 00 00 48 65 6C 6C 6F 2C 20 77 6F 72 ...... Hello, wor<br />

0010 6C 64 0D 0A 24 A8 ld..$.<br />

Byte 00H contains 0A0H, which identifies this as an LEDATA record.<br />

Bytes 01-02H contain 0013H, the length of the remainder of the record.<br />

Byte 03H (the Segment Index field) contains 02H, a reference to the second SEGDEF record in the object module.<br />

Bytes 04-05H (the Enumerated Data Offset field) contain 0000H. This is the offset, from the base of the segment<br />

indicated by the Segment Index field, at which the data in the Data Bytes field will be placed when the program is<br />

linked. Of course, this offset is subject to relocation by the linker because the segment declared in the specified<br />

SEGDEF record may be relocatable and may be combined with other segments declared in other object modules.<br />

Bytes 06-14H (the Data Bytes field) contain the actual data.<br />

Byte 15H contains the Checksum field, 0A8H.<br />

48 <strong>OMF</strong> <strong>Specification</strong>, Version 1.1 Tool Interface Standards (TIS)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!