{"id":1416,"date":"2021-07-06T13:49:07","date_gmt":"2021-07-06T05:49:07","guid":{"rendered":"https:\/\/gnonstop.linkpc.net\/wp\/?p=1416"},"modified":"2025-08-22T21:34:25","modified_gmt":"2025-08-22T13:34:25","slug":"c-asm-%e6%b7%b7%e5%90%88%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88-__asm","status":"publish","type":"post","link":"https:\/\/guerilla.ddns.net\/wp\/?p=1416","title":{"rendered":"C++\/asm \u6df7\u5408\u7a0b\u5f0f\u8a2d\u8a08 __asm"},"content":{"rendered":"<p>\u95dc\u9375\u5b57 <b>__asm<\/b> \u6703\u53eb\u7528\u5167\u5d4c\u7d44\u5408\u8a9e\u8a00\uff0c\u800c\u4e14\u53ef\u4ee5\u51fa\u73fe\u5728 C \u6216 C++ \u8a9e\u53e5\u5408\u6cd5\u7684\u4efb\u4f55\u4f4d\u7f6e\u3002<br \/>\n&nbsp;<br \/>\nC\/C++<\/p>\n<pre><code class=\"language-cpp\" data-line=\"\">__asm {\n   mov al, 2\n   mov dx, 0xD007\n   out dx, al\n}<\/code><\/pre>\n<p>&nbsp;<br \/>\n\u6216\u8005\uff0c\u53ef\u4ee5\u5c07 __asm \u6bcf\u500b\u5143\u4ef6\u6307\u4ee4\u653e\u5728\u524d\u9762\uff1a<\/p>\n<pre><code class=\"language-cpp\" data-line=\"\">__asm mov al, 2\n__asm mov dx, 0xD007\n__asm out dx, al<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>ref: <a href=\"https:\/\/docs.microsoft.com\/cpp\/assembler\/inline\/asm\" rel=\"noopener\" target=\"_blank\">__asm | Microsoft Docs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u95dc\u9375\u5b57 __asm \u6703\u53eb\u7528\u5167\u5d4c\u7d44\u5408\u8a9e\u8a00\uff0c\u800c\u4e14\u53ef\u4ee5\u51fa\u73fe\u5728 C \u6216 C++ \u8a9e\u53e5\u5408\u6cd5\u7684\u4efb\u4f55\u4f4d\u7f6e\u3002 &nbsp; C [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[212],"tags":[85,27],"class_list":["post-1416","post","type-post","status-publish","format-standard","hentry","category-coding","tag-c","tag-coding"],"_links":{"self":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1416"}],"version-history":[{"count":5,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1416\/revisions"}],"predecessor-version":[{"id":3398,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1416\/revisions\/3398"}],"wp:attachment":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}