|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
/FA, /Fa (Listing File)
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; |
|/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||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
- 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.
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