Export (0) Print
Expand All

/FA, /Fa (Listing File)

/FA[c|s|cs]
/Fapathname

The /FA option creates a listing file containing assembly code. The arguments control the generation of source code and machine code and the extension of the listing file.

Option Listing contents;
file extension
/FA Assembly code; .asm
/FAc Machine and assembly code; .cod
/FAs Source and assembly code; .asm
/FAcs Machine, source, and assembly code; .cod

By default, the listing file gets the same base name as the source file. You can change the name of the listing file and the directory where it is created using the /Fa option.

/Fa usage Result
/Fa One source_file.asm is created for each source code file in the compilation.
/Fafilename filename.asm is placed in the current directory. Only valid when compiling a single source code file.
/Fafilename.extension filename.extension is placed in the current directory. Only valid when compiling a single source code file.
/Fadirectory\ One source_file.asm is created and placed in the specified directory for each source code file in the compilation. Note the required trailing backslash. Only paths on the current disk are allowed.
/Fadirectory\filename filename.asm is placed in the specified directory. Only valid when compiling a single source code file.
/Fadirectory\filename.extension filename.extension is placed in the specified directory. Only valid when compiling a single source code file.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Output Files property page.
  4. Modify the ASM List Location (/Fa) or Assembler Output (/FA) property.

To set this compiler option programmatically

See AssemblerListingLocation Property or AssemblerOutput Property.

Example

The following command line produces a combined source and machine-code listing called HELLO.cod:

CL /FAcs HELLO.CPP

See Also

Output-File (/F) Options | Compiler Options | Setting Compiler Options | Specifying the Pathname

Show:
© 2014 Microsoft