{"id":252750,"date":"2015-03-10T16:46:02","date_gmt":"2015-03-10T12:46:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=252750"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=252750","title":{"rendered":"Assembler \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 C++ \u0432 Visual Studio 2013"},"content":{"rendered":"<p> \t\t\t\u0418\u0434\u0435\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u043d\u043e\u0432\u0430\u044f, \u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0432\u0430 \u0434\u043d\u044f \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0438\u0441\u043a \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0425\u0430\u0431\u0440\u0430 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u0435\u0445, \u043a\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e *.asm \u0438 *.cpp \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u0430\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b C++ \u0438\u0437 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4><b>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/b><\/h4>\n<p>  \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0441 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/111275\/\">\u00ab\u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0434\u043b\u044f Windows \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Visual Studio\u00bb<\/a> (\u043e\u0442\u0441\u044e\u0434\u0430 \u0438 \u043f\u043e\u0447\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434). \u0422\u0430\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Visual Studio 2005, \u0430 \u0434\u043b\u044f 2013-\u0439 \u0441\u0442\u0443\u0434\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u0439, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u044f\u0442 \u043d\u0435\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043b\u0433\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439.<\/p>\n<h4><b>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/b><\/h4>\n<p>  <\/p>\n<ol>\n<li>TL;DR<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430<\/li>\n<li>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0421++ \u0438 Asm<\/li>\n<li>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<\/ol>\n<p>  <\/p>\n<h4><b>TL;DR<\/b><\/h4>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u0443 \u043a\u043e\u0433\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435: \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 (\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438) \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430 \u0430\u0434\u0434\u043e\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.<\/p>\n<h4><b>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/b><\/h4>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c Visual Studio, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>File -&gt; New -&gt; Project&#8230;<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/8d2\/c85\/346\/8d2c8534671449e79621fb9e2fcfb389.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d <b>Win32 Console Application<\/b>, \u043a\u043b\u0438\u043a\u0430\u0435\u043c <b>\u041e\u041a<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/c36\/0ec\/cd2\/c360eccd2e9a4d08872d5011cd55bc4d.png\" alt=\"image\"\/><\/p>\n<p>  \u0416\u043c\u0435\u043c <b>Next<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/ec9\/76c\/968\/ec976c96817e439b825b82d3b7cba72a.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <b>Empty project<\/b> \u0438 \u0436\u043c\u0435\u043c <b>Finish<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/564\/aea\/db2\/564aeadb209342459df8a625e5948d4f.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 <b>Source Files<\/b>, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Add -&gt; New Item&#8230;<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/613\/fc6\/417\/613fc64174924fbe9fd402fc4abe7575.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>C++ File<\/b> \u0438 \u0436\u043c\u0435\u043c <b>Add<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/1bf\/89c\/339\/1bf89c33992840378f5031df3a4dff91.png\" alt=\"image\"\/><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c *.asm \u0444\u0430\u0439\u043b (\u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u043f\u043e\u043b\u0435 <b>Name<\/b>):<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/848\/40f\/173\/84840f17347649ab85575914eb733a02.png\" alt=\"image\"\/><\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e: \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438 (\u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435), \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 *.obj \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044c\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0434\u0440\u0443\u0433\u0438\u043c<\/b>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Build Dependencies -&gt; Build Customizations&#8230;<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/1de\/a34\/25a\/1dea3425a605412cab718678f8f52476.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <b>masm<\/b> \u0438 \u0436\u043c\u0435\u043c <b>\u041e\u041a<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/0c3\/f1d\/206\/0c3f1d206a6549608ea1d29ac84ee630.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u0444\u0430\u0439\u043b\u0435 *.asm, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Properties&#8230;<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/589\/728\/295\/58972829532b4d4a837c766c4d29950f.png\" alt=\"image\"\/> <\/p>\n<p>  \u0412 \u043f\u043e\u043b\u0435 <b>Item Type<\/b> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Microsoft Macro Assembler<\/b> \u0438 \u0436\u043c\u0435\u043c <b>\u041e\u041a<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/3a6\/f1d\/4df\/3a6f1d4dfa7f4bf0b14b246920cbb772.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Project -&gt; Properties&#8230;<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/8cf\/122\/ca4\/8cf122ca471246829aa40c9c2e5791eb.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Configuration Properties -&gt; Microsoft Macro Assembler -&gt; Listing File<\/b>. \u0412 \u043f\u043e\u043b\u0435 <b>Assembled Code Listing File<\/b> \u0432\u0432\u043e\u0434\u0438\u043c <b>$(ProjectName).lst<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/b69\/a1b\/890\/b69a1b8902824eb39eba1f5dafcf108f.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Configuration Properties -&gt; Linker -&gt; Advanced<\/b>. \u0412 \u043f\u043e\u043b\u0435 <b>Image Has Safe Exception Handlers<\/b> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <b>No<\/b>. \u0416\u043c\u0435\u043c <b>\u041e\u041a<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/074\/22f\/538\/07422f538fa940d885331fe56cedc9bb.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <b>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0421++ \u0438 Asm<\/b>.<\/p><\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c Visual Studio, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>File -&gt; New -&gt; Project&#8230;<\/b>.<\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d <b>Win32 Console Application<\/b>, \u043a\u043b\u0438\u043a\u0430\u0435\u043c <b>\u041e\u041a<\/b>.<\/p>\n<p>  \u0416\u043c\u0435\u043c <b>Next<\/b>.<\/p>\n<p>  \u0421\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <b>Empty project<\/b> \u0438 \u0436\u043c\u0435\u043c <b>Finish<\/b>.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 <b>Source Files<\/b>, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Add -&gt; New Item&#8230;<\/b>.<\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>C++ File<\/b> \u0438 \u0436\u043c\u0435\u043c <b>Add<\/b>.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c *.asm \u0444\u0430\u0439\u043b (\u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u043f\u043e\u043b\u0435 <b>Name<\/b>).<\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e: \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438(\u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435), \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 *.obj \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0434\u0440\u0443\u0433\u0438\u043c<\/b>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Build Dependencies -&gt; Build Customizations&#8230;<\/b><\/p>\n<p>  \u0421\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <b>masm<\/b> \u0438 \u0436\u043c\u0435\u043c <b>\u041e\u041a<\/b>.<\/p>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u0444\u0430\u0439\u043b\u0435 *.asm, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Properties&#8230;<\/b><\/p>\n<p>  \u0412 \u043f\u043e\u043b\u0435 <b>Item Type<\/b> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Microsoft Macro Assembler<\/b> \u0438 \u0436\u043c\u0435\u043c <b>\u041e\u041a<\/b>.<\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Project -&gt; Properties&#8230;<\/b><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Configuration Properties -&gt; Microsoft Macro Assembler -&gt; Listing File<\/b>. \u0412 \u043f\u043e\u043b\u0435 <b>Assembled Code Listing File<\/b> \u0432\u0432\u043e\u0434\u0438\u043c <b>$(ProjectName).lst<\/b>.<\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <b>Configuration Properties -&gt; Linker -&gt; Advanced<\/b>. \u0412 \u043f\u043e\u043b\u0435 <b>Image Has Safe Exception Handlers<\/b> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <b>No<\/b>. \u0416\u043c\u0435\u043c <b>\u041e\u041a<\/b>.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <b>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0421++ \u0438 Asm<\/b>.  <\/div>\n<\/div>\n<p>  <\/p>\n<h4><b>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430<\/b><\/h4>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u0434\u0434\u043e\u043d \u0434\u043b\u044f Visual Studio \u2014 <a href=\"http:\/\/asmhighlighter.codeplex.com\/\">asmHighlighter<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f VS2013 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0440\u0430\u0437\u0434\u0435\u043b Discussions, \u044f \u043d\u0430\u0448\u0435\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <i>Trass3r<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f <a href=\"https:\/\/github.com\/Trass3r\/AsmHighlighter\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c<\/a> \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0430\u0434\u0434\u043e\u043d\u0430 \u0434\u043b\u044f VS2013. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <a href=\"https:\/\/www.visualstudio.com\/integrate\/explore\/explore-vside-vsi\">Visual Studio SDK<\/a> \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c *.vsix \u043f\u0430\u043a\u0435\u0442 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/mnxoid\/AsmHighlighter\/blob\/master\/AsmHighlighter\/bin\/Debug\/AsmHighlighter.vsix\">\u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435<\/a>.<\/p>\n<h4><b>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0421++ \u0438 Asm<\/b><\/h4>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\/\u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ol>\n<li>\u0415\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.\n<pre><code>EXTRN  printf : proc ;we'll use printf <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>call<\/i>:<\/p>\n<pre><code>;printf(ebx,eax) push eax; push ebx call printf add esp, 8 ;pop x2 <\/code><\/pre>\n<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0430\u0434\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u043f.1 \u043d\u0430\u0434\u043e \u0435\u0449\u0435 \u043f\u0438\u0441\u0430\u0442\u044c <i>extern \u00abC\u00bb<\/i> \u043f\u0435\u0440\u0435\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430.\n<pre><code class=\"cpp\">extern &quot;C&quot; void* readName() { \tchar* name = (char*)calloc(1, 255); \tscanf(&quot;%s&quot;, name); \twhile (getchar() != '\\n'); \treturn name; } <\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 *.asm \u0444\u0430\u0439\u043b\u0435:  <\/p>\n<pre><code>EXTRN  readName : proc ;and void* readName() <\/code><\/pre>\n<p>\u0438  <\/p>\n<pre><code>call readName ;eax = readName() <\/code><\/pre>\n<p>  <\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Asm-\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 C++ \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f:\n<pre><code class=\"cpp\">extern &quot;C&quot; { \tvoid sayHello(); } <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044e Asm-\u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<pre><code>sayHello PROC  call readName ;eax = readName() lea ebx, helloFormat ;ebx = &helloFormat  ;printf(ebx,eax) push eax push ebx call printf add esp, 8 ;pop x2  retn  sayHello ENDP <\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Source.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#define _CRT_SECURE_NO_WARNINGS #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  extern &quot;C&quot; { \tvoid sayHello(); }  void main() { \tprintf(&quot;Hello, what is your name?\\n&quot;); \tsayHello(); \twhile (getchar() != '\\n'); } extern &quot;C&quot; void* readName() { \tchar* name = (char*)calloc(1, 255); \tscanf(&quot;%s&quot;, name); \twhile (getchar() != '\\n'); \treturn name; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">AsmSource.asm<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>.686 .MODEL FLAT, C .STACK .DATA ;-----------Local data------------------------------ helloFormat BYTE &quot;Hello, %s!&quot;, 10, 13, 0 .CODE ;-----------External usage-------------------------- EXTRN  printf : proc;\/\/ we'll use printf EXTRN  readName : proc;\/\/and void* readName() ;-----------Function definitions-------------------- sayHello PROC  call readName; eax = readName() lea ebx, helloFormat; ebx = &helloFormat  ;printf(ebx,eax) push eax push ebx call printf add esp, 8;pop x2  retn  sayHello ENDP  END <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4><b>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/b><\/h4>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/mnxoid\/MnxoidAsmExperiments\/blob\/master\/AsmCpp.zip\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u041f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 asm \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/mnxoid\/AsmHighlighter\/blob\/master\/AsmHighlighter\/bin\/Debug\/AsmHighlighter.vsix\">\u0437\u0434\u0435\u0441\u044c<\/a>. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/252647\/\"> http:\/\/habrahabr.ru\/post\/252647\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> \t\t\t\u0418\u0434\u0435\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u043d\u043e\u0432\u0430\u044f, \u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0432\u0430 \u0434\u043d\u044f \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0438\u0441\u043a \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0425\u0430\u0431\u0440\u0430 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u0435\u0445, \u043a\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e *.asm \u0438 *.cpp \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u0430\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b C++ \u0438\u0437 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-252750","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252750"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252750\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}