What does jmp 0,x mean

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What does jmp 0,x mean

ソリューションへジャンプ
2,325件の閲覧回数
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 解決策
1,866件の閲覧回数
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 返答(返信)
1,867件の閲覧回数
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 件の賞賛
1,866件の閲覧回数
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 件の賞賛
1,866件の閲覧回数
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 件の賞賛
1,866件の閲覧回数
collapsar
Contributor I

Thanks

0 件の賞賛
1,866件の閲覧回数
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 件の賞賛