Statement-level inline assembly allows full access to local variables and function arguments without using the fralloc or frfree directives.
The following listing is an example of using local variables and function arguments in statement-level inline assembly. You may place statement-level assembly code anywhere in a C/C++ program.
long square(short a) { long result=0; asm { move.w a,d0 // fetch function argument `a' mulu.w d0,d0 // multiply move.l d0,result // store in local `result' variable } return result; }