Autosite_Users_Manual.pdf - 第153页
Trans lation Fo rmats AutoSite User Manual B-55 Intel Hex-32, Co de 99 The Intel 32-bit Hexa decimal Object file record format has a 9-chara cter (4-field) prefix that defines the start of record, byte count, load addres…

Translation Formats
B-54 AutoSite User Manual
Figure B-24
A Close-up of the Intel OMF286 Format
Total Space Date Time Module Creator GDT Limit
GDT Base
IDT Limit
IDT Base
TSS Selector
Data File Header
4 bytes 8 bytes 8 bytes 41 bytes 2 bytes 4 bytes 4 bytes 4 bytes 2 bytes
ABSTXT
Location
DEBTXT
Location
Last
Location
Next
Partition
Reserved
4 bytes4 bytes4 bytes4 bytes4 bytes
Real Address Length Text
3 bytes
2 bytes
Table of Contents
Section
File Header (A2 or 06 and 02)
Checksum 1 byte
Data File Module
Table of Contents
Partition
Partition
Section
Section
Section
20 bytes
75 bytes
Data File Header
Bold boxes indicate that the
information inside is not used
by the programmer, however, some
characters must occupy those spaces.
0432-2
INTEL OMF286 FORMAT, CODE 98
X

Translation Formats
AutoSite User Manual B-55
Intel Hex-32, Code 99
The Intel 32-bit Hexadecimal Object file record format has a 9-character
(4-field) prefix that defines the start of record, byte count, load address,
and record type, and a 2-character checksum suffix. Figure B-25
illustrates the sample records of this format.
The six record types are described below.
Figure B-25
An Example of the Intel Hex-32
Format
00-Data Record
This record begins with the colon start character, which is followed by
the byte count (in hex notation), the address of the first data byte, and the
record type (equal to 00). Following these are the data bytes. The
checksum follows the data bytes and is the two’s complement (in binary)
of the preceding bytes in the record, including the byte count, address,
record type, and data bytes.
01-End Record
This end-of-file record also begins with the colon start character and is
followed by the byte count (equal to 00), the address (equal to 0000), the
record type (equal to 01), and the checksum, FF.
02-Extended Segment
Address Record
This is added to the offset to determine the absolute destination address.
The address field for this record must contain ASCII zeros (Hex 30s).
This record type defines bits 4 to 19 of the segment base address. It can
appear randomly anywhere within the object file and affects the absolute
memory address of subsequent data records in the file. The following
example illustrates how the extended segment address is used to
determine a byte address.
:020000020000FC
:020000040010EA
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:00000001FF
Offset Address
Address
Start Character
Extended Segment Address Record
Extended Linear Address Record
Data
Records
End-of-File Record
Checksum
Record Type
Byte
Count
Nonprinting Carriage Return, with optional
line feed and nulls determined by null count
LEGEND
0433-3
Checksum

Translation Formats
B-56 AutoSite User Manual
Problem
Find the address for the first data byte for the following file.
:02 0000 04 0010 EA
:02 0000 02 1230 BA
:10 0045 00 55AA FF ..... BC
Solution
:
Step 1. Find the extended linear address offset for the data record
(0010 in the example).
Step 2. Find the extended segment address offset for the data record
(1230 in the example).
Step 3. Find the address offset for the data from the data record (0045 in
the example).
Step 4. Calculate the absolute address for the first byte of the data record
as follows:
00100000
Linear address offset, shifted left 16 bits
+ 12300
Segment address offset, shifted left 4 bits
+ 0045
Address offset from data record
00112345
32-bit address for first data byte
The address for the first data byte is 112345.
Note: Always specify the address offset when using this format, even when the
offset is zero.
During output translation, the firmware will force the record size to 16
(decimal) if the record size is specified greater than 16. There is no such
limitation for record sizes specified less than 16.
03-Start Segment Address
Record
This record, which specifies bits 4-19 of the execution start address for
the object file, is not used by the programmer.
04-Extended Linear
Address Record
This record specifies bits 16-31 of the destination address for the data
records that follow. It is added to the offset to determine the absolute
destination address and can appear randomly anywhere within the
object file. The address field for this record must contain ASCII zeros
(Hex 30s).
05-Start Linear Address
Record
This record, which specifies bits 16-31 of the execution start address for
the object file, is not used by the programmer.