Configuring Visual Studio 2010 for Assembly Development

In my last blog entry “Assembling Old-School Skills” I bemoaned the fact (or what I thought the fact was) that Visual Studio 2010 ended up just being a glorified text editor when doing MASM development.

Buzzzz! Wrong!

You can in fact configure Visual Studio 2010 for use in MASM Assembly development.  The following list of steps are what is needed to accomplish this:

  • Create a Visual C++ “Win32 Console Application” project


  • Press ‘Next’, uncheck ‘Precompiled header’ and press ‘Finish’
  • Choose ‘Build Customizations…’ from the projects context menu and press ‘OK’


  • Delete all .cpp and .h files from the project
  • Add the file ‘Main.asm’ under ‘Source Files’
  • Add the following text from the tutorial at to ‘Main.asm’
        .model flat,stdcall
        option casemap:none

        includelib kernel32.lib
        includelib user32.lib

        MsgBoxCaption db "Iczelion Tutorial No.2",0
        MsgBoxText db "Win32 Assembly is Great!",0

        invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK
        invoke ExitProcess, NULL
        end start
  • Now when you look at the project properties you will find ‘Microsoft Macro Assembler’ under the ‘Configuration Properties’


  • In the project properties edit the following:
    • Linker –> General
      • Additional Library Directories
    • Microsoft Macro Assembler
      • General
        • Include Paths – Add the path to your .inc files.  I’m using the ones from the MASM32 SDK.
      • Listing File
        • Assembled Code Listing File – Set to something similar to: $(IntDir)%(FileName).lst
  • Ignore the auto-correct squiggly at the beginning for the ‘PCH warning’.  It seems to be something to do with Visual Studio 2010 SP1 ‘PCH warning after installing SP1
  • Compile and run your code

Leave a Reply

Your email address will not be published. Required fields are marked *