Keil Logo

Inline Assembly

Inline assembly is assembly code that you can insert into your C programs. The Keil C166 C Compiler supports two different methods of inline assembly.

  • Traditional Inline Assembly:
    Traditional inline assembly requires that you place your assembly instructions between ASM and ENDASM directives and that you compile your C source file into a .SRC file using the SRC directive which you must assemble with the Keil A166 Assembler.
  • Extended Inline Assembly:
    Integrated inline assembly inserts the assembly code directly into the object file output by the compiler and requires no further processing by the assembler. Inline assembly source blocks are marked by the __asm keyword.

The following table compares the inline assembler methods.

Inline Assembly Comparison Traditional Integrated
Direct to Object NO YES
Access to C Variables NO YES
Source-Level Debugging NO YES
C166 Instructions YES YES
C167 Instructions YES YES
XC16x Instructions YES YES
ST10 Instructions YES YES
MAC Instructions YES YES
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.