/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.
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.
|Option||Listing contents and file extension|
|/FA||Assembly code; .asm|
|/FAc||Machine and assembly code; .cod|
|/FAs||Source and assembly code; .asm|
If /FAcs is specified, the file extension will be .cod
|/FAu||Causes 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||One source_file.asm is created for each source code file in the compilation.|
|/Fa filename||filename.asm is placed in the current directory. Only valid when compiling a single source code file.|
|/Fa filename.extension||filename.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\filename||filename.asm is placed in the specified |
|/Fa directory\filename.extension||filename.extension is placed in the specified |
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the C/C++ folder.
Click the Output Files property page.
Modify the ASM List Location (/Fa) or Assembler Output (/FA) property (/FAu must be specified in the Command Line property page, Additional Options box..
The following command line produces a combined source and machine-code listing called HELLO.cod:
CL /FAcs HELLO.CPP