visual-studio 如何从 VS2005 中的 C 文件获取汇编程序输出

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34635/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:25:04  来源:igfitidea点击:

How do I get the assembler output from a C file in VS2005

cvisual-studioassembly

提问by Peter C

I think the file that is produced is an .asm file, any idea how to produce this in Visual Studio when you do a build?

我认为生成的文件是一个 .asm 文件,你知道如何在 Visual Studio 中生成这个文件吗?

采纳答案by Shog9

  1. Open the Properties page for a project
  2. Select the Configuration Properties -> C/C++ -> Output Filesbranch
  3. Change the Assembler Output option to something other than No Listing
  4. Make sure ASM List Location is set to a valid path or sub-path
  5. Build.
  1. 打开项目的“属性”页面
  2. 选择Configuration Properties -> C/C++ -> Output Files分支
  3. 将汇编器输出选项更改为除 No Listing
  4. 确保 ASM 列表位置设置为有效路径或子路径
  5. 建造。

回答by John Richardson

Project->Properties->Configuration Properties->C/C++->Output Files

项目->属性->配置属性->C/C++->输出文件

There you should see an option for Assembler Output.

在那里你应该看到一个汇编输出选项。

John.

约翰。

回答by Andrew O'Reilly

Or if using the Visual Studio command line,

或者,如果使用 Visual Studio 命令行,

cl.exe /Fa[assembler code filename]

cl.exe /Fa[汇编代码文件名]

If you just want to view the assembler code in the IDE you can start the debugger and then select the Go To Dissassembly choice on the right click menu.

如果您只想在 IDE 中查看汇编代码,您可以启动调试器,然后在右键菜单中选择 Go To Dissassembly 选项。