The MSP430 IAR C/C++ Compiler provides several ways to mix C or C++ and
assembler:
● Modules written entirely in assembler
● Intrinsic functions (the C alternative)
● Inline assembler.
When an application is written partly in assembler language and partly in C or C++, you
are faced with a number of questions:
● How should the assembler code be written so that it can be called from C?
● Where does the assembler code find its parameters, and how is the return value
passed back to the caller?
● How should assembler code call functions written in C?
● How are global C variables accessed from code written in assembler language?
● Why does not the debugger display the call stack when assembler code is being
debugged?