Article View: sci.electronics
Article #7507Re: Looking for extended Intel hex info
From: Andrew Williams
Date: Sat, 29 Sep 1990 07:39
Date: Sat, 29 Sep 1990 07:39
70 lines
3439 bytes
3439 bytes
In <14451@teda.UUCP> ardai@teda.UUCP (Mike Ardai) writes:
>I am looking for information on the extended Intel Hex format.
>Specifically, how does it handle addresses larger than 20 bits?
>Thanks in advance for any info.
>/mike
The standard intel hex record format types are:
Data Record:
Byte 1 --- ':' delimiter
Byte 2,3 --- ASCII hex of number of bytes of DATA (not bytes of ASCII
hex)
Byte 4,5 --- ASCII hex of most significant byte of start address
Byte 6,7 --- ASCII hex of least significant byte of start address
Byte 8,9 --- ASCII zeroes ('00')-- ie signal data record
Bytes 10-.. ASCII hex data. Each byte of data encoded in 2 bytes as hex
ASCII
Last 2 bytes: ASCII hex of checksum. (My data gives it as the negative of
the modulo 256 binary sum of ALL the hex ASCII values in
the record.)
End of File Record:
Byte 1 --- ':' delimiter
Byte 2,3 --- ASCII '00' = record length (ie no data in this record)
Byte 4,5 --- ASCII hex of most sig. byte of address (usually '00' )
Byte 6,7 --- ASCII hex of least sig. byte of address (usually '00')
Byte 8,9 --- ASCII '01'. indicates end of file.
Byte 10,11 --- checksum, as above (will = 'FF' if address field is 0000)
Extended Adress Record:
Byte 1 --- ':' delimiter
Byte 2,3 --- ASCII '02' = record length
Byte 4,5 --- ASCII '00'
Byte 6,7 --- ASCII '00'
Byte 8,9 --- ASCII '02' - signify extended address record (** see below)
Byte 10,11 --- ASCII hex of most sig. byte of segment base address
Byte 12,13 --- ASCII hex of least sig. byte of segment base address
Byte 14,15 --- ASCII hex of checksum, as usual.
The file consists of the records described above, with each record
seperated by a CR, LF combination. To set the full 24 bit address, any
data is preceded by the 'Extended address Record', which sets the current
segment address (just like an Intel segment register- the segment address
is shifted 4 bits right and added to the 16 bit start addresses in the
data records). The file must be ended with the 'end of file' record.
An example file would be:
:060000002345afb1d077eb
:00000001ff
This would put the 6 bytes of data (23 45 af b1 d0 and 77) at address
00000 (the segment register is assumed to be 0000 unless changed, at
least on the EPROM programmer I've used).
All of the above information was taken from the instructions of
the XP640 programmer (I can't remember the manufacturer offhand!), but
the format of the extended address record in the instructions appeared to
be nonsense, so I 'guessed' what the authors were trying to say- if it
doesn't work, email me, and I'll quote it to you verbatim!
>\|/ Michael L. Ardai Teradyne EDA East
>--- -------------------------------------------------------------------------
>/|\ ...!sun!teda!ardai (preferred) or ardai@bu-pub.bu.edu
Andrew Williams,
Physics Department,
University of Western Australia.
(I haven't got a disclaimer, so I add this instead!!)
Technical Details
Message-ID:
<andrew.654593998@earwax.pd.uwa.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!munnari.oz.au!uniwa!earwax.pd.uwa.oz.au!andrewReferences:
<14451@teda.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!munnari.oz.au!uniwa!earwax.pd.uwa.oz.au!andrew From: andrew@earwax.pd.uwa.oz.au (Andrew Williams) Newsgroups: sci.electronics Subject: Re: Looking for extended Intel hex info Message-ID: <andrew.654593998@earwax.pd.uwa.oz.au> Date: 29 Sep 90 07:39:58 GMT References: <14451@teda.UUCP> Sender: usenet@uniwa.uwa.oz (USENET News System) Organization: University of Western Australia Lines: 70