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.

C callable assembly function

Hi!

Having some troubles with registers. I declared external function in C and call it with 3 parameters. This function written in .asm file with .global statement.

How I can read parameters in assembler and return to C? (Suppose it's A4, A6, B4 and B3 return registers)

What registers I can use for calculations? There is a problem if I use all registers that I need, when I return to main functions some important variables no longer have proper value.

Where and how I should store values in assembler for calculations?