Appendix I: Intel Hex File Definition
Hexadecimal object file format (Intel hex) is produced by
most 80C51 assembler products.
Each record in the file contains the following fields:
<:><rec length><load address><rec type><data><check-
sum>
The colon is the record header.
The record length field consists of two hex digits, and rep-
resents the number of entries in the data field. OH outputs
records containing 16 or fewer data field entries.
The load address field consists of four hex digits, and in-
dicates the absolute address at which the data in the data
field is to be loaded.
The record type field consists of two hex digits, which are
always zero in data records.
The data field contains from one to 16 pairs of hex digits.
The last two hex digits are a checksum on the record
length, load address, record type, and data fields. The
sum of the binary equivalents of these fields and the
checksum itself is zero.
Each record in the file is terminated by a carriage return
and line feed.
A type one record marks the end of the file. The record
always contains the following value: ’:00000001FF’.
Microcontroller
4-19