zaft@ed8sun4.nswses.navy.mil (Gordon C Zaft) (08/02/90)
Can someone tell me where I can find documentation on the Intel hex format? I can anon ftp -- a Postscript doc. would be fine, too. TIA. -- + Gordon Zaft | zaft@suned1.nswses.navy.mil + + NSWSES, Code 4Y33 | suned1!zaft@elroy.jpl.nasa.gov + + Port Hueneme, CA 93043-5007 | Phone: (805) 982-0684 + + These opinions are mine, the Navy doesn't pay me to have opinions for it. +
draper@inmet.inmet.com (08/09/90)
INTEL STANDARD FORMAT ===================== Intel standard format uses 16-bit addresses for its data. The following is an example of a hex file in Intel standard format: :10000000000102030405060708090A0B0C0D0E0F78 :00000001FF Here is the same file, with spaces added to seperate the individual fields: : 10 0000 00 0001020304050607080900A0B0C0D0E0F 78 : 00 0000 01 FF The header character is : The byte length of the record is the number of data bytes in the record (in hex), not including the header, address, record type, checksum, or record length itself. The address specifies the address of the first byte of data in that record. For an end-of-file record the address is always 0000. The record type code indicates whether the record is a data record (00) or an end-of-file record (01). A series of data bytes follows the record type in a data record. The checksum completes the hex record. It is calculated as follows: 1. Add header, byte length, address, record type and data bytes. 2. Take the 2's compliment of the result from step 1. 3. The least siginificant byte of the result from step 2 is the checksum. INTEL EXTENDED (INTEL-86) FORMAT ================================ Intel extended format uses a 20-bit address for its data. An Intel extended format file is identical to an Intel standard format file with one exception. The Intel extended format includes a special extended address record that contains a 16-bit value known as the upper segement base address, or USBA. A zero is appended to the USBA to extend it to a 20-bit value, it is then added to the 16-bit data address in each data record to build a 20-bit address. The following is an example of a file in Intel extended format: (this example has had spaces added to seperate the fields) : 02 0000 02 9ABC 6C : 10 0000 00 010102030405060708090A0B0C0D0E0F 78 : 00 0000 01 FF The header character is : The byte length of the record is the number of data bytes in the record (in hex), not including the header, address, record type, checksum, or record length itself. The address specifies the address of the first byte of data in that record. For an end-of-file record or extended address record, this address is always 0000. The record type code indicates whether the record is a data record (00) , end-of-file record (01) or extended address record (02). A series of data bytes follows the record type in a data record (00). A 16-bit upper segement base address follows the record type in an exctended address record (02). The checksum completes the hex record. It is calculated as follows: 1. Add header, byte length, address, record type and data bytes. 2. Take the 2's compliment of the result from step 1. 3. The least siginificant byte of the result from step 2 is the checksum. ----- - Dave Draper draper@inmet.inmet.com Intermetrics Microsystems Software Incorporated 733 Concord Avenue Cambridge, MA 02138 (617) 661-1840