关于IAREWSTM8 HEX文件

研究了一下BIN与HEX的关系,发现由BIN转到HEX比较简单,但是由BIN转到HEX就觉得多了一行东西。

        上图看一下:


     用别人写的代码也是一样多出来。

     上网找了一下发现也有人跟我遇到相同的问题:http://bbs.21ic.com/icview-187817-1-1.html

     并且给出了答案

以":0400000508004ABDE8"为例子。
其中的地址是0x08004ABD,当下载代码到芯片里后(不勾选 run to main),程序恰好停在 0x08004ABD,对应于标号: __iar_program_start

维基百科是这么说:
http://en.wikipedia.org/wiki/Intel_HEX
05Start Linear Address Record. The address field is 0000, the byte count is 04. The 4 data bytes represent the 32-bit value loaded into the EIP register of the 80386 and higher CPU. 

根据 http://en.wikipedia.org/wiki/X86_assembly_language
The instruction pointer is called ip in 16-bit mode, eip in 32-bit mode, and rip in 64-bit mode. The instruction pointer register points to the memory address which the processor will next attempt to execute
实际上 EIP 寄存器就是 STM8或者ARM芯片的PC指针。

可见,上面维基百科的描述是对的:类型05后面跟的是4字节地址,将赋给(STM8或者ARM芯片的)PC指针



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值