C Labels Recognized by Inline Assembly

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

C Labels Recognized by Inline Assembly

ソリューションへジャンプ
1,190件の閲覧回数
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 解決策
1,000件の閲覧回数
nhpete
Contributor III

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

Pete

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,000件の閲覧回数
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 件の賞賛
返信
1,001件の閲覧回数
nhpete
Contributor III

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

Pete

0 件の賞賛
返信