This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Call C function (that calls another C function) from assembly code

Hi all,
I want to call a C function (for example: func1() ) from my old assembly code. The problem is that if func1() calls another C function( func2() ), what will happen? How does the compiler pass parameters to the second function? If it also passes through R1-R7, does it destroy the parameters of func1()?
Thanks for reading this topic.

Parents
  • "I confuse that if the first C function calls another C function"

    What happens inside the function is entirely irrelevant - See my original post.

    You just need to see the function as a "black box" - it has a defined interface, and what actually goes on inside the box is of no concern.

Reply
  • "I confuse that if the first C function calls another C function"

    What happens inside the function is entirely irrelevant - See my original post.

    You just need to see the function as a "black box" - it has a defined interface, and what actually goes on inside the box is of no concern.

Children
No data