naked

Suppresses the compiler-generated stackframe setup, cleanup, and return code.

  naked  
Remarks

Functions with this directive cannot access local variables by name. They should not contain C code that implicitly or explicitly uses local variables or memory.

Counterpart to the return directive.

Example

The following listing is an example use of this directive.

Listing: Naked Directive Example
long square(short)
{

  asm{

    naked             // no stackframe or compiler-generated rts

    move.w  4(sp),d0  // fetch function argument from stack

    mulu.w  d0,d0     // multiply

    rts               // return from function: result in D0

  }

}