C Labels Recognized by Inline Assembly

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

C Labels Recognized by Inline Assembly

跳至解决方案
1,170 次查看
nhpete
Contributor III

C Labels Recognized
by Inline Assembly

 

OS - WIN7

CW 6.3

Target -
S08GB60

 

My project
is mostly written in C with just a few snippets of inline assembly sprinkled
throughout the C.  At this point I am
trying to add a few lines of inline assembly which concludes with a jump (jmp
instruction) to a label in the C code.
When I attempt compile the code, I get an error message indicating that
the label is not set.  It appears that
the assembly code is not aware of the label in the C code. Is there a way I can
make the inline assembly code aware of the C label? 

 

Thanks for
any help which can be supplied.

 

Pete 

标签 (1)
0 项奖励
回复
1 解答
980 次查看
nhpete
Contributor III

Unfortunately, it appears you are correct.  Tnx for the help.

Pete

在原帖中查看解决方案

0 项奖励
回复
2 回复数
980 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hello,

I don't think we can access C label from the inline assembly code block. because "Label" can be only viewed inside a block.

you can use instruction JSP/JSR/CALL to jump to a C function instead.


Have a great day,
Jennie Zhang

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

0 项奖励
回复
981 次查看
nhpete
Contributor III

Unfortunately, it appears you are correct.  Tnx for the help.

Pete

0 项奖励
回复