-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the ArduinoAssembly wiki!
When writing in assembly language understanding how the GCC compiler uses the registers when calling and returning values from a function call is very important. The following link provides more information about how GCC uses the registers in the AVR processors.
https://gcc.gnu.org/wiki/avr-gcc#Call-Used_Registers
Another issue with writing an assembly language and calling a library function is function name mangling. This happens with functions that are written in C++. The following link provides more information about name mangling.
https://www.ibm.com/docs/en/i/7.2?topic=linkage-name-mangling-c-only
To get around this when writing in a assembly language, the best solution is to write a C code wrapper around the C++ function call. The tones library has an example of how this might be done.