introduces how to call assembly class member functions in C++
This application note addresses the challenges of writing C++ callable assembly code, specifically focusing on name mangling and accessing class instance information. It provides a scheme to preserve the simplicity of standard C calls within a C++ environment. The document details how the C++ compiler modifies function names to differentiate parameters and explains the mechanism of passing the 'this' pointer in assembly routines.
The primary reason is so the compiler can differentiate between different member functions with the same name based on their parameters.
The 'this' pointer is passed in the R4 register, while other parameters start in the R8 register.
The return argument of a function is always placed in the R0 register.