<Intel HEX Records example>
:02000004CAFE32
:1001000055AA55AA55AA55AA55AA55AA55AA55AAF7
:10011000000102030405060708090A0B0C0D0E0F67
:100120000AA55AA55AA55AA55AA55AA55AA55AA55D7
:1001300000000000000000000000000000000000BF
:1001400055AA55AA55AA55AA55AA55AA55AA55AAB7
:10015000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF
:00000001FF
<Intel HEX Record structure>
①Record Mark ":" (1character)
②Data Length (1 byte/2 characters)
③Offset Address (16 bits/4 characters)
④Record Type (2 characters)
⑤Data (n bytes/2n characters)
⑥Checksum (1 byte/2 characters)
① In the Intel HEX format, the first character is always ":".
② Data Length: Indicates the number of data points (in bytes) stored in the data field
using two characters.
Note that, unlike Motorola S-records, this is the data length recorded in the data record.
③Offset Address: For data records, this specifies the address where the first byte
is stored, using 16 bits (4 characters). For other record types, this is usually "0000".
④Record type
| 00 | Data Record: A data field represents 1 byte of data using 2 characters. |
| 01 | End Record: Indicates the end of the HEX file. Since there are no data fields, the data length field will be "00". |
| 02 | Extended Segmant Address Record (ESA): This is a record that provides a 20-bit offset to data records. Since object records were originally created to extend 16-bit addresses to 20-bit addresses, formats using this are sometimes called Extended IntelHEX format. |
| 03 | Start Segment Address Record: Used to specify the execution start address when downloading and using a program. The value of the record's data (16 bits) is shifted 4 bits to the left. (This record is not usually used in programmer.) |
| 04 | Extended Linear Address Record(ELA): Example: |
| 05 | Start Linear Address: Example: |
⑤Data: Two characters represent one byte of data.
⑥Checksum: 2-character (1-byte) data. It is the two's complement of the sum of the byte values in the record length, data length field, offset address field, and data field.