I'd like to see all the asm produced by Visual Studio C++ to learn a bit about ASM, compilers, etc. I know with GCC, you can do it with the -S argument, b开发者_开发问答ut not in VS. How do I go about doing this?
The easiest way to do this is to start your program in the integrated debugger, then turn on the assembly language view. This shows the assembly language interleaved with your original source code.
Back when I used VS, this was Alt+F7 or something but it's probably changed. The advantage of doing this (over using -S
equivalent) is you can focus on exactly which line(s) of code you're interested in.
Right-click on your project and then Properties -> C/C++ -> Output files -> Assembler Output and set it to something else than No Listing. Equivalently, you can add one of the /FA switches to the compiler's command line.
精彩评论