How to compile assembly files using vs2008?

I use vs2008 . and need to compile project that include ".asm" files.

how I can do that?


Right-click the project in the Solution Explorer window, Custom Build Rules, tick "Microsoft Macro Assembler". This ensures that any .asm files you add to your project get compiled with the custom build rule for .asm files.

If you still have problems, do make sure you document the error message you see. They are meant to be helpful.

The basic question is more or less answered, but what if you want to do just assembly language in your Visual Studio project? Here is the answer:

  • Start with a General - Empty project.

  • Right-clicking on the project name in the solution explorer, set Custom Build Rules so that the Microsoft Macro Assembler is used.

  • Next, go to Project - Properties. Find the Linker in the dialog box and expand it (click on the +).

  • Under the Linker, select System.

  • On the top line, Subsystem, click the down arrow and choose "Console (/SUBSYSTEM:CONSOLE)."

  • In the same dialog box under Linker, select Advanced.

  • Edit the top line, Entry Point, so that it is the label you used as the starting point of your code. Note: You should not enter the underscore when filling in the Entry Point. VS apparently adds an underscore.

Your environment is now set to do assembly langauge programming as a project.

The procedure works also in Microsoft's free Visual C++ 2008 Express edition which is still downloadable from MS as of the date of this posting.

Good luck and have fun!

You will need to make use of MASM. MASM stands for Microsoft Macro Assembler Reference.

Another more straightforward and easier way of accomplishing asm in VS is inlining your asm code into your C/C++ source files.

Need Your Help

ui-helper-hidden-accessible class in jQuery-UI Dialog wrapper div issue

jquery jquery-ui jquery-ui-dialog

Can someone shed some light on what ui-helper-hidden-accessible jQuery UI CSS class does and how to make it work right or disable? It automatically makes my dialog window invisible. I just commente...

Singleton in a Servlet

java servlets singleton

Can i use a singleton within a servlet to share information between diffrent session.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.