|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Calling Assembly Routines from CInformation in this article applies to:
QUESTIONIn the C51 compiler manual, there is example of an assembly module calling a C function. Is there any example of a C program calling an assembly routine? ANSWERThere are no examples in the book, but it is easy to create your own. The asm routine must know how parameters are passed, values returned, and the naming conventions of segments. The steps you must follow to create an example are outlined below:
For example, the following code
when compiled generates the following assembly SRC file.
MORE INFORMATION
SEE ALSOATTACHED FILESRequest the files attached to this knowledgebase article. Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.