[A83] Re: Checksum


[Prev][Next][Index][Thread]

[A83] Re: Checksum




>     Hello, does anyone know anything about CHECKSUM? Is ot the sum of
> bites on a line? or the sum of bites in a file? appreciate your help.
> 

Could you please tell what kind of checksum you mean, there are quite
a few different ones.
If you mean the checksums in Intel Hex (the way apps are encoded),
this is what you need to know (from some official Intel document:
Hexadecimal Object File Format \ Specification \\ Revision A \ January 6,
1988, downloaded from http://www.xess.com/faq/intelhex.pdf):

General Record Format
RECORD MARK ’:’	1-byte
RECLEN		1-byte
LOAD OFFSET	2-bytes
RECTYP		1-byte
INFO or DATA	n-bytes
CHKSUM		1-byte

Each record ends with a CHKSUM field that contains the ASCII hexadecimal
representation of the two’s complement of the 8-bit bytes that result from
converting each pair of ASCII hexadecimal digits to one byte of binary, from and
including the RECLEN field to and including the last byte of the INFO/DATA
field. Therefore, the sum of all the ASCII pairs in a record after converting to
binary, form the RECLEN field to and including the CHKSUM field, is zero.

Hope that helps,
Rob van Wijk

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!




References: