hex文件格式说明.pdf

上传人:飞****9 文档编号:134117158 上传时间:2020-06-02 格式:PDF 页数:6 大小:81.23KB
返回 下载 相关 举报
hex文件格式说明.pdf_第1页
第1页 / 共6页
hex文件格式说明.pdf_第2页
第2页 / 共6页
hex文件格式说明.pdf_第3页
第3页 / 共6页
hex文件格式说明.pdf_第4页
第4页 / 共6页
hex文件格式说明.pdf_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《hex文件格式说明.pdf》由会员分享,可在线阅读,更多相关《hex文件格式说明.pdf(6页珍藏版)》请在金锄头文库上搜索。

1、What is the Intel HEX file format The Intel HEX file is an ASCII text file with lines of text that follow the Intel HEX file format Each line in an Intel HEX file contains one HEX record These records are made up of hexadecimal numbers that represent machine language code and or constant data Intel

2、HEX files are often used to transfer the program and data that would be stored in a ROM or EPROM Most EPROM programmers or emulators can use Intel HEX files Record Format An Intel HEX file is composed of any number of HEX records Each record is made up of five fields that are arranged in the followi

3、ng format llaaaatt dd cc Each group of letters corresponds to a different field and each letter represents a single hexadecimal digit Each field is composed of at least two hexadecimal digits which make up a byte as described below is the colon that starts every Intel HEX record ll is the record len

4、gth field that represents the number of data bytes dd in the record aaaa is the address field that represents the starting address for subsequent data in the record tt is the field that represents the HEX record type which may be one of the following 00 data record 01 end of file record 02 extended

5、segment address record 04 extended linear address record dd is a data field that represents one byte of data A record may have multiple data bytes The number of data bytes in the record must match the number specified by the ll field cc is the checksum field that represents the checksum of the recor

6、d The checksum is calculated by summing the values of all hexadecimal digit pairs in the record modulo 256 and taking the two s complement Data Records The Intel HEX file is made up of any number of data records that are terminated with a carriage return and a linefeed Data records appear as follows

7、 10246200464C5549442050524F46494C4500464C33 where 10 is the number of data bytes in the record 2462 is the address where the data are to be located in memory 00 is the record type 00 a data record 464C 464C is the data 33 is the checksum of the record Extended Linear Address Records HEX386 Extended

8、linear address records are also known as 32 bit address records and HEX386 records These records contain the upper 16 bits bits 16 31 of the data address The extended linear address record always has two data bytes and appears as follows 02000004FFFFFC where 02 is the number of data bytes in the rec

9、ord 0000 is the address field For the extended linear address record this field is always 0000 04 is the record type 04 an extended linear address record FFFF is the upper 16 bits of the address FC is the checksum of the record and is calculated as 01h NOT 02h 00h 00h 04h FFh FFh When an extended li

10、near address record is read the extended linear address stored in the data field is saved and is applied to subsequent records read from the Intel HEX file The linear address remains effective until changed by another extended address record The absolute memory address of a data record is obtained b

11、y adding the address field in the record to the shifted address data from the extended linear address record The following example illustrates this process Address from the data record s address field 2462 Extended linear address record data field FFFF Absolute memory address FFFF2462 Extended Segme

12、nt Address Records HEX86 Extended segment address records also known as HEX86 records contain bits 4 19 of the data address segment The extended segment address record always has two data bytes and appears as follows 020000021200EA where 02 is the number of data bytes in the record 0000 is the addre

13、ss field For the extended segment address record this field is always 0000 02 is the record type 02 an extended segment address record 1200 is the segment of the address EA is the checksum of the record and is calculated as 01h NOT 02h 00h 00h 02h 12h 00h When an extended segment address record is r

14、ead the extended segment address stored in the data field is saved and is applied to subsequent records read from the Intel HEX file The segment address remains effective until changed by another extended address record The absolute memory address of a data record is obtained by adding the address f

15、ield in the record to the shifted address data from the extended segment address record The following example illustrates this process Address from the data record s address field 2462 Extended segment address record data field 1200 Absolute memory address 00014462 End of File EOF Records An Intel H

16、EX file must end with an end of file EOF record This record must have the value 01 in the record type field An EOF record always appears as follows 00000001FF where 00 is the number of data bytes in the record 0000 is the address where the data are to be located in memory The address in end of file records is meaningless and is ignored An address of 0000h is typical 01 is the record type 01 an end of file record FF is the checksum of the record and is calculated as 01h NOT 00h 00h 00h 01h Exampl

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 教学/培训

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号