What does jmp 0,x mean

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What does jmp 0,x mean

跳至解决方案
2,516 次查看
collapsar
Contributor I

Hi,community

In the source of Bootloader_S12X of "AN4258SW", "JMP 0,x" in the starts12x.s file, why are two parameters, and 0 for what?
The source code is as follows:

QQ图片20180424141322.png

Hope for advice

0 项奖励
回复
1 解答
2,057 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

this code "jmp 0,x",

here 0 is offset.

x stored application reset vector address.

after execution jmp 0,x,  code jump to address (x+0) and execute there.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,058 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

this code "jmp 0,x",

here 0 is offset.

x stored application reset vector address.

after execution jmp 0,x,  code jump to address (x+0) and execute there.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
2,057 次查看
collapsar
Contributor I

Hi,jennie

About INIT _BootStart,I found out :

If I comment out the INIT _BootStart and add the start12.c file of the other project to this project, there will be no errors to compile again. What does the INIT keyword do?

Thanks again for your help.

Xudai Guo

0 项奖励
回复
2,057 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

To separate different subject, please create a new thread for your new question.

Please also add your problem  screenshot and demo project that showcase the error.

Thanks for your cooperation.

Jennie Zhang

0 项奖励
回复
2,057 次查看
collapsar
Contributor I

Thanks

0 项奖励
回复
2,057 次查看
collapsar
Contributor I

Hi,Jennie

Thank you for your help, but I have a new problem. I haven't found the detailed document, and I have to trouble you.
It is not said that INIT _BootStart is the same as VECTOR 0 _BootStart, because there is also VECTOR 0 _BootStart in the file(project.prm,Bootloader_S12X,AN4258SW), so I will comment out the INIT _BootStart, but the Error Link Error: L1115: Function _Startup not found, why?

Have a great day,
Xudai Guo

0 项奖励
回复