码迷,mamicode.com
首页 > 其他好文 > 详细

使用Visual Studio编写汇编代码

时间:2015-06-27 16:17:56      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:

Expand the ‘Other Project Types‘ tree, Select ‘Visual Studio Solutions‘, and create a new ‘Blank Solution‘.

技术分享

File | Add | New Project…

Expand the ‘Other Languages‘, ‘Visual C++‘, ‘General‘ section and create a new ‘Empty Project‘.

技术分享

Now right click on the Project in the Solution Explorer and select ‘Build Customizations…‘.

技术分享

Tick the ‘masm‘ box and say OK.

技术分享

Add a new file to the project with the .asm extension by right clicking on the Project in the Solution Explorer and selecting ‘Add | New Item…‘ then ‘Text File‘. Enter a filename ending with .asm (e.g. test.asm). Press OK.

技术分享

Now (and if you skipped the last steps, this won’t work) right click on the Project and select ‘Properties‘. You should see a dialog like this (Note the MASM item at the bottom of the tree). If you don’t, then something went wrong.

技术分享

There are a few critical things to set up in the Linker options in order to get it to work:

Set the following property to Windows or Console as appropriate:

Configuration Properties > Linker > System> SubSystem

技术分享

Set the entry point to the name of your main method (as per the END directive – see code):

Configuration Properties > Linker > Advanced > EntryPoint

技术分享

All you have to do now is write some code and run it.

 

参考 http://www.cnblogs.com/awpatp/archive/2012/07/27/2611522.html

使用Visual Studio编写汇编代码

标签:

原文地址:http://www.cnblogs.com/rogerxi/p/4604130.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!