Specifying Inline Assembly Statements

To specify that a block of C or C++ source code should be interpreted as assembly language, use the asm keyword.

Note: To ensure that the C/C++ compiler recognizes the asm keyword, you must clear the ANSI Keywords Only checkbox in the C/C++ Language panel.

As an alternative, the compiler also recognizes the keyword __asm even if the ANSI Keywords Only checkbox is checked.

There are a few ways to use assembly language with the CodeWarrior compilers.

Keep these tips in mind as you write inline assembly statements: