Keil Logo


Information in this article applies to:

  • C166 Version 3.12
  • C51 Version 5.50
  • C251 Version 2.14


For the "SRC" directive, the C166 compiler manual states that this directive cannot be used with µVision.  How is in-line assembly then added to a C source file?


There is a misprint in the manual that creates this misconception. What is actually meant is: there is no "compiler option" in the µVision interface. The SRC directive is active in the C166 Compiler.


Include the line:

#pragma SRC

in the top of your C source file. This generates an assembler file equivalent to your C code, in a new file with the same name as your C file but with an .SRC extension.


  • Refer to SRC in the C166 User's Guide.
  • Refer to SRC in the Cx51 User's Guide.

Last Reviewed: Friday, July 15, 2005

Did this article provide the answer you needed?
Not Sure
  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.