C Labels Recognized by Inline Assembly

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

C Labels Recognized by Inline Assembly

Jump to solution
518 Views
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 

Labels (1)
0 Kudos
1 Solution
328 Views
nhpete
Contributor III

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

Pete

View solution in original post

0 Kudos
2 Replies
328 Views
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 Kudos
329 Views
nhpete
Contributor III

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

Pete

0 Kudos