The following are directions on how to use MASM in Visual Studio 2013 Premium Edition. The following
can also be used for Visual Studio 2012 Premium Edition with the change noted below * :

  • To create a new project, select New Project, then expand Visual C++, then select Win32 and note
    the default Win32 Console Application. Then determine the Name of the project, whether the
    default such as ConsoleApplication1 or one can key in another name such as Test1. Then
    determine where the project should be stored, whether in the default folder …\Visual Studio
    2013\Projects or key in another location such as F:\  for a jump drive,  then click OK.

  • Then in the Win 32 Application Wizard, click Next, note that the Application type:  should be
    Console application (if not select it), then check the Empty Project box, and then click Finish.

  • Now in the Solution Explorer, right click the name of the application (the default
    ConsoleApplication1 or Test1 from above), then hover on Build Dependencies and then click Build
    Customizations. ( * Note for Visual Studio 2012, one just clicks on Build Customizations). Then
    check the masm box and click OK.

  • Again in the Solution Explorer, right click on the name of the application (default
    ConsoleApplication1 or Test1) and select Properties. Then expand Linker and then click on Input.
    In the Additional Dependencies, type in msvcrt.lib; at the beginning of the list. Be careful not to
    delete any other entries, do not forget the semi-colon, and then click OK.

  • Then again in the Solution Explorer, right click on the name of the application (Test1 or default
    ConsoleApplication1), select Properties, then System, and verify that the SubSystem is Console. (If
    not select it from the list). Then back in the Linker list move from System to Advanced and for the
    Entry Point key in main. Then move to the bottom of the Advanced list and for Image Has Safe
    Exception Handlers, select No, click Apply, and then OK.

  • Now in the Solution Explorer, expand ConsoleApplication1  or Test1 (if not done so already), and
          right click on Source Files, hover on Add, and click New Item. Note that the default is C++ File
          (.cpp)
. At the bottom of the screen use the default name (Source) and change the extension from
          .cpp to .asm, or use a different name (such as TestMasm1.asm ). In either case be sure to use a
          .asm extension (because this indicates to use the Microsoft Assembler, MASM, instead of the
           C++ compiler) and then click
Add.

  • One can now key in a program or copy and paste a complete program from the “Guide to Assembly
    Language” website. Then click on BUILD and Build Solution. If there are no syntax errors, then click
    on DEBUG and then Start Without Debugging.

Notes on Visual Studio 2013