Intel Hex Format
This page describes the format of an Intel hex file produced by a suitable
assembler. This code is often downloaded from a PC to a development system
and run from RAM. Alternatively, the hex file can be converted to a
binary file and programmed into an EPROM.
Here is an example hex file:
Now look at the top line...
The last line of the file is special, and will always look like that above.
- The first character (:) indicates the start of a record.
- The next two characters indicate the record length (10h in this case).
- The next four characters give the load address (0080h in this case).
- The next two characters indicate the record type (see below).
- Then we have the actual data.
- The last two characters are a checksum (sum of all bytes + checksum = 00).
- 00 - Data record
- 01 - End of file record
- 02 - Extended segment address record
- 03 - Start segment address record
- 04 - Extended linear address record
- 05 - Start linear address record