Hi,
can any one help me with a simple example of how to call an assembly function from a c routine?
Any help is highly appreciated.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
can any one help me with a simple example of how to call an assembly function from a c routine?
Any help is highly appreciated.
Chapter 7 of the compiler user's guide is where you should look for this. In particular, section 7.5 gives examples of the kind you are looking for. All of chapter 7 is needed though, since you need to make sure you respect all the register conventions, memory models, etc.
Hi,
As previously commented you will need to read the whole chapter, but if you need to call a single assembly function in your C code you can simply do: asm(" instruction")
For example, the below instruction generates a Software exception from a C file calling the assembly instruction SWE.
asm(" SWE");
Note the blank space.
Regards,
Armando.
Thanks a lot everyone, that really helped. :)
One more question btw, can anyone send me the link of the document that has the details of all the instruction in assembly of C6000 for example MVK,MVKH etc
This would be the one you want. You should always be able to find the link to this from the product page for the chip you are using.