freakkaito
Member level 1
each record in hexadecimal object file format (Intel hex) contains the following fields:
<:><rec length><load address><rec type><data><checksum>
the colon is the record header.
the record length field consists two hex digit, and represents the number of entries in data field.
the load address field consists of for hex digit, and indicates the absolutes 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 data records.
the data field contains from 1 to 16 pairs of hex digits.
the last two hex digit 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 zeo.
each record in the file is terminated by carriage return (oDhex) and line feed (0Ahex).
a type one record marks the end of the file. file record always contains."000001FF".
that's the theory of the structure intel hex file extension. my problem is, when i try to write the file into a buffer i don't know how to use the information data like load address & etc.
for the example i have this data file:
:0000010035475621A57C15348945
:00000200563244758CB768767209
.
.
.
.
here the result on my buffer:
0000010035475621A57C15348945
0D0A00000200563244758CB7687
67209
.
.
.
i don't know how to remove the information bit and how to remove 0D and 0A
i hope you understand what i mean. for information I want to make standalone programer for at89s that's why I need to understand how to write .hex file into the buffer
<:><rec length><load address><rec type><data><checksum>
the colon is the record header.
the record length field consists two hex digit, and represents the number of entries in data field.
the load address field consists of for hex digit, and indicates the absolutes 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 data records.
the data field contains from 1 to 16 pairs of hex digits.
the last two hex digit 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 zeo.
each record in the file is terminated by carriage return (oDhex) and line feed (0Ahex).
a type one record marks the end of the file. file record always contains."000001FF".
that's the theory of the structure intel hex file extension. my problem is, when i try to write the file into a buffer i don't know how to use the information data like load address & etc.
for the example i have this data file:
:0000010035475621A57C15348945
:00000200563244758CB768767209
.
.
.
.
here the result on my buffer:
0000010035475621A57C15348945
0D0A00000200563244758CB7687
67209
.
.
.
i don't know how to remove the information bit and how to remove 0D and 0A
i hope you understand what i mean. for information I want to make standalone programer for at89s that's why I need to understand how to write .hex file into the buffer