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

Restoring Resister Values

Note: This was originally posted on 17th March 2011 at http://forums.arm.com

Hi,
I am working with Cortex M3 and I wrote a program in which I am calling a C function that is implemented in Assembly language. Four parameters are passed to the function, which are assigned to the Registers R0-R3. After performing some calculations on R0-R3 in the subroutine implemented in assembly language, when I return back to the C function the values of the R0-R3 are not the same as at the function's entry point rather R0-R3 contain results of the calculations performed in the subroutines. How can I get the same values back as they were at the starting point of the function call?
Looking forward for some useful hint.
Thanks and Regards
Parents Reply Children
No data