Keil™, An ARM® Company

Cx51 User's Guide

SRC Compiler Directive

Abbreviation None.
Arguments SRC « (filename) »
Default None.
µVision 
  1. Right click on the file in the Project Window — Files tab
  2. Choose Options for... to open Options — Properties page
  3. Enable Generate Assembler SRC file
  4. Enable Assemble SRC file.
Description 

The SRC directive creates an assembler source (.SRC) file instead of an object (.OBJ) file. The source file may be assembled with the assembler. Refer to Source (SRC) File for more information regarding assembler source files.

The source file is saved as filename if specified. Otherwise, the source file is saved as the path and base name of the C source file with a .SRC extension.

Note

  • The compiler cannot simultaneously produce a source file and an object file.
See Also ASM, ENDASM
Example 
C51 SAMPLE.C SRC

C51 SAMPLE.C SRC(SML.ASM)

#pragma src