Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intel Hex files format

4 views
Skip to first unread message

Andrew McCabe

unread,
May 19, 1994, 10:14:42 PM5/19/94
to
I hope this group is suitable for this posting...

I need to know the format of the Intel Hex files produced by
assemblers.
The first eight or so values seem to represent line numbers or
vertical check sums while the last two values are parity or
something. Is this so?

If I convert this Intel Hex file to binary only then do I just
strip these values from the file, including line feeds?

I have worked with Mototrola's S-Records before but being new
to Intel microcontrollers I'm in the dark about this.

Thanks.

Andrew McCabe mcca...@curtin.edu.au
Perth, Australia.


--
--------------------------------------------------------------------
Andrew McCabe mcca...@cs.curtin.edu.au
Curtin University
Perth, Western Australia.

Ron Harshbarger

unread,
May 20, 1994, 7:37:05 AM5/20/94
to

The format listed as INTEL-HEX is as follows:

: 10 0000 00 00112233445566778899AABBCCDDEEFF F8 where

: is the record mark
10 is the record length
0000 is starting load address
00 is the record type (see below)
0011...EEFF is the data
F8 is the checksum

there are three 'standard' record types.

type 00 is normal hex data ie: executable code in hex format.

type 01 is the special case of the LAST record and it always
has the format:

: 00 0000 01 FF where

: is the record mark
00 is the record length and is always 00
0000 is the address
01 is the type
FF is the checksum

type 02 is the special case used to set the extended address.

: 02 0000 02 ABCD F4 where

: is the record mark
02 is the record length and is always 02
0000 is the load address and is always 0000
02 is the record type
ABCD is the ascii hex representation of bits 4 thru 19 of extended address
F4 is the checksum

For more info look for the Intel document

"MCS-86 Absolute Object File Formats"


Hope this helps!

ddunfield on BIX

unread,
May 20, 1994, 6:46:40 AM5/20/94
to
mcca...@cs.curtin.edu.au (Andrew McCabe) writes:

>I need to know the format of the Intel Hex files produced by
>assemblers.
>The first eight or so values seem to represent line numbers or
>vertical check sums while the last two values are parity or
>something. Is this so?

Here's the INTEL format for 8 bit download records:

Data Record: ':nnaaaattdddddddddddddddddddddddddddddd...cc'
Where: : = Indicates start of data record
n = Count of number of bytes in record. (in ASCII/HEX)
a = Load address of data record. (in ASCII/HEX)
t = Record type (00=Data, 01=End of file)
d = Actual data bytes in record (in ASCII/HEX)
c = Checksum of count, address, and data. (in ASCII/HEX)

Note1: Checksum is computed as two's complement of eight
bit sum of all values fron 'nn' to end of data.

Note2: End of file record contains count of 00.

Dave Dunfield (ddun...@bix.com)

0 new messages