Microsoft Visual C++ 2005

Discussion in 'Programmer's Corner' started by lmartinez, Mar 26, 2009.

  1. lmartinez

    Thread Starter Active Member

    Mar 8, 2009
    224
    6
    I would like to know if anyone knows if I can combine assembly and c++ code in visual c++ 2005 to develop and application. I currently only write c++ code, but I would like to include assembly as well. In addition, is there a way to convert your c++ code to assembly code in the Microsoft visual c++ environment. Please advice on how to accomplish the above tasks. Thank you
     
  2. Mark44

    Well-Known Member

    Nov 26, 2007
    626
    1
    Yes, you can combine x86 assembly and C++ in Visual C++ 2005. The easiest way is to use inline assembly. The other way is to use MASM, the Microsoft assembler to create assembly files that you can link to your C++ code. Here's a link to the MSDN topic on inline assembly--there are related topics that this topic links to: http://msdn.microsoft.com/en-us/library/4ks26t93(VS.80).aspx.
    Converting c++ or c code to assembly is pretty easy, since that's essentially what compilers produce. You can see the assembly code that is produced from your C or C++ code in the MS debugger by looking at the disassembly window in the debugger.
     
  3. lmartinez

    Thread Starter Active Member

    Mar 8, 2009
    224
    6
    Thank you for the feedback. I will give it a try.
     
Loading...