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

Need to know how to make an ARMV8 assembly call from C code

Hello. I'm working on a DS-5 project for a computer architecture class.

Our instructor set up and put the project up for download. However for our final project my group and I are to work together on a small implementation of our choice.

Since its not easy to work on assembly in the same file together, we would like to add two additional calls to our C code provided by the instructor.

I need to know how to do such a thing. If someone could point me to a tutorial or explain the process I would greatly appreciate it!

  • The standards document is Procedure Call Standard for the ARM 64-bit Architecture (AArch64)

    Write a small routine in C with the interface you want and compile with the -S option. That will give you something to look at and copy for starters.

  • Hello - I see this message is still marked as unanswered.

    DS-5 contains a number of examples. Go to File -> Import -> DS-5 -> Examples and Programming Libraries -> Examples -> Armv8 Bare-Metal, and select any of the startup* examples that best match your final target.


    As Daith writes, the C code will obey the Procedure Call standard, so you can understand in which registers parameters are passed, and which registers are corruptible, which should be stacked etc.