Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile C++ to asm in Visual Studio [duplicate]

Possible Duplicate:
How to generate assembly code from C++ source in Visual Studio 2010

Hello. How can I compile C++ code to asm in Visual Studio?

In gcc I just add one parampeter: -s

like image 773
Hooch Avatar asked May 20 '11 18:05

Hooch


People also ask

Does C++ compile to asm?

It depends on the compiler. There are no real rules regarding what C++ compiles into, except at some point it should be able run on a computer. Most compilers have a switch to compile to assembly.

How do I add an asm file to my project?

asm, add the other file to the project by choosing "Add Files to Project" from the Project menu, or choose "Add Files" when right-clicking in the project window. There's no need to do anything to the linker script. Whether your main code (presumably in main. asm) is able to call the functions defined in func.


2 Answers

Looks like /FAs is the command-line argument. There is also a setting in the GUI: http://codegem.org/2008/10/generate-assembly-from-c-code-in-visual-studio

like image 192
Chris Morgan Avatar answered Sep 25 '22 17:09

Chris Morgan


find project in solution explorer

right click properties

c/c++

output files

assembler output

like image 34
danatel Avatar answered Sep 23 '22 17:09

danatel