What does jmp 0,x mean

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What does jmp 0,x mean

Jump to solution
2,262 Views
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 Kudos
1 Solution
1,803 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
1,804 Views
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 Kudos
1,803 Views
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 Kudos
1,803 Views
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 Kudos
1,803 Views
collapsar
Contributor I

Thanks

0 Kudos
1,803 Views
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 Kudos