/FA, /Fa (Listing File)

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Creates a listing file containing assembly code.

/FA[c|s|u]  
/Fapathname  

The arguments control the generation of source code and machine code and the extension of the listing file.

The following table describes the various values to /FA. It is possible to specify more than one value to /FA. For example, you can specify /FAsu.

OptionListing contents and file extension
/FAAssembly code; .asm
/FAcMachine and assembly code; .cod
/FAsSource and assembly code; .asm

If /FAcs is specified, the file extension will be .cod
/FAuCauses the output file to be created in UTF-8 format, with a byte order marker. By default, the file encoding is ANSI, but use /FAu if you want a listing file that displays correctly on any system, or if you are using Unicode source code files as input to the compiler.

If /FAsu is specified, and if a source code file uses Unicode encoding other than UTF-8, then the code lines in the .asm file may not display correctly.

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 usageResult
/FaOne source_file.asm is created for each source code file in the compilation.
/Fa filenamefilename.asm is placed in the current directory. Only valid when compiling a single source code file.
/Fa filename.extensionfilename.extension is placed in the current directory. Only valid when compiling a single source code file.
/Fa directory\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.
/Fa directory\filenamefilename.asm is placed in the specified directory. Only valid when compiling a single source code file.
/Fa directory\filename.extensionfilename.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 (/FAu must be specified in the Command Line property page, Additional Options box..

To set this compiler option programmatically

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

CL /FAcs HELLO.CPP  

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

Show: