AdSense

Search Meh!

Amz 2

Sunday, December 9, 2012

How to use Microsoft Macro Assembler(MASM) with Microsoft Visual Studio 2012

Step by step Instructions with PICTURES!

This is the starting window when you launch Microsoft Visual 2012

Open a new Visual Studio Project as shown.

onclick="javascript: document.getElementById('image1').style.height='100%'; document.getElementById('image1').style.width='100%';" />


 Now open a new C++ Project.

 Right-click your project and configure Build Customizations so that MASM is ticked.

 Next,add your assembly source file.

 If you try to assembly immediately, you'll get something like this.
error 1000: cannot open file: Irvine32.inc
error MS83721: The command "ml.exe/c/nologo/ZI/Fo"Debug\TEST.obj" /W3?errorReport.prompt....\TEST.asm"exited with code 1


 So you'll have to configure a few options in the preferences section of your project. First is to place this: "c:\Irvine" without the quotes into the location shown below:

 Next problem:
error LNK1221: a subsystem can't be inferred and must be defined

 Next solution: Place "Console (/SUBSYSTEM:CONSOLE)" without quotes as shown:

 Again another problem:
error LNK2019: unresolved external symbol_DumpRegs 0 referenced in functioned_main 0
error LNK1120: 1 unresolved externals


 And so again the solution: Place "user32.lib;irvine32.lib;%(AdditionalDependencies)" accordingly:

 Last problem:
error LNK1104: cannot open file "irvine32.lib"


 Last solution: Use "c:\Irvine;%(AdditionalLibraryDirectories)" here:

 And you're done and now able to start doing assembly programming.


Reference from: http://www.codeproject.com/Articles/271627/Assembly-Programming-with-Visual-Studio-2010-2012





I'm sorry if the images are too small. For some reason the images don't enlarge on click except for 1 in the middle. I've still have to work out the kinks so in the mean time go HERE for the enlarged version at SlickPic.



No comments:

Post a Comment

All readers are welcome to Comment. Comments will be moderated before they are gazetted.