{"id":448,"date":"2021-06-09T21:14:52","date_gmt":"2021-06-09T13:14:52","guid":{"rendered":"https:\/\/sanlangcode.com\/?p=448"},"modified":"2021-06-09T21:14:52","modified_gmt":"2021-06-09T13:14:52","slug":"%e3%80%90%e6%b1%87%e7%bc%96%e3%80%91%e5%ae%9e%e7%8e%b0%e9%9f%b3%e4%b9%90%e7%9a%84%e6%92%ad%e6%94%be%e5%8e%9f%e7%90%86%ef%bc%88%e9%99%84%e4%bb%a3%e7%a0%81%ef%bc%89","status":"publish","type":"post","link":"https:\/\/sanlangcode.com\/index.php\/2021\/06\/09\/%e3%80%90%e6%b1%87%e7%bc%96%e3%80%91%e5%ae%9e%e7%8e%b0%e9%9f%b3%e4%b9%90%e7%9a%84%e6%92%ad%e6%94%be%e5%8e%9f%e7%90%86%ef%bc%88%e9%99%84%e4%bb%a3%e7%a0%81%ef%bc%89\/","title":{"rendered":"\u3010\u6c47\u7f16\u3011\u5b9e\u73b0\u97f3\u4e50\u7684\u64ad\u653e\u539f\u7406\uff08\u9644\u4ee3\u7801\uff09"},"content":{"rendered":"\n<p>\u5728\u4ecb\u7ecd\u97f3\u4e50\u7684\u64ad\u653e\u4e4b\u524d\uff0c\u5148\u6765\u8bf4\u8bf4\u5982\u4f55\u7528\u6c47\u7f16\u53d1\u51fa\u58f0\u97f3\uff0c\u4e4b\u540e\u5728\u4ecb\u7ecd\u5982\u4f55\u7528\u53d1\u51fa\u6709\u9891\u7387\u7684\u58f0\u97f3\u3002<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u5587\u53ed\u7684\u6784\u9020\u5927\u81f4\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u4e3b\u8981\u7531<strong>\u7eb8\u76c6\u3001\u7ebf\u5708\u3001\u6c38\u4e45\u78c1\u94c1<\/strong>\u7b49\u7ec4\u6210\u3002\u5f53\u6709\u7535\u6d41\u901a\u8fc7\u7ebf\u5708\u65f6\uff0c\u7ebf\u5708\u4ea7\u751f\u7684\u78c1\u573a\u548c\u6c38\u4e45\u78c1\u94c1\u7684\u78c1\u573a\u76f8\u4e92\u4f5c\u7528\uff0c\u4ece\u800c\u4f7f\u7ebf\u5708\u4ea7\u751f\u632f\u52a8\u3002\u548c\u7ebf\u5708\u76f8\u8fde\u7684\u7eb8\u76c6\u4e5f\u968f\u4e4b\u79fb\u52a8\uff0c\u82e5\u901a\u8fc7\u7ebf\u5708\u7684\u7535\u6d41\u65f6\u8fde\u7eed\u53d8\u5316\u7684\uff0c\u5219\u7ebf\u5708\u79fb\u52a8\u7684\u5e45\u5ea6\u4e5f\u4f1a\u53d8\u5316\uff0c\u4ece\u800c<strong>\u7275\u52a8\u7eb8\u76c6\u632f\u52a8\uff0c\u4ea7\u751f\u58f0\u97f3<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1003\" height=\"325\" src=\"https:\/\/sanlangcode.com\/wp-content\/uploads\/2021\/06\/image.png\" alt=\"\" class=\"wp-image-449\" srcset=\"https:\/\/sanlangcode.com\/wp-content\/uploads\/2021\/06\/image.png 1003w, https:\/\/sanlangcode.com\/wp-content\/uploads\/2021\/06\/image-300x97.png 300w, https:\/\/sanlangcode.com\/wp-content\/uploads\/2021\/06\/image-768x249.png 768w, https:\/\/sanlangcode.com\/wp-content\/uploads\/2021\/06\/image-670x217.png 670w\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n\n\n\n<p><strong>\u90a3\u4e48PC\u673a\u7684\u5c0f\u5587\u53ed\u662f\u600e\u6837\u4e0e\u673a\u5668\u76f8\u8fde\u7684\u5462?<\/strong><\/p>\n\n\n\n<p>\u56fe2-2\u8868\u793a\u4e86\u5587\u53ed\u4e0e\u673a\u5668\u7b80\u5355\u7684\u76f8\u8fde\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u5587\u53ed\u7684\u4e00\u7aef\u8fde\u63a5\u5728\u7535\u6e90\u6b63\u6781\uff0c\u53e6\u4e00\u7aef\u4e0e\u673a\u5668\u768461H\u7aef\u53e3\u7684bit\u4f4d\u76f8\u8fde\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u60f3\u8c61\uff0c<strong>\u82e5\u80fd\u8fde\u7eed\u6539\u53d861H\u7aef\u53e3\u7684bit\u4f4d0,1\u72b6\u6001\uff0c<\/strong><\/p>\n\n\n\n<p><strong>\u5c31\u53ef\u4ee5\u4f7f\u5587\u53ed\u7ebf\u5708\u5185\u7684\u7535\u6d41\u65f6\u6709\u65f6\u65e0\uff0c\u4ece\u800c\u4f7f\u5587\u53ed\u53d1\u58f0<\/strong>\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u7f16\u5236\u7684\u6c47\u7f16\u7a0b\u5e8f\u7684\u5de5\u4f5c\uff0c\u5c31\u662f\u8fde\u7eed\u6539\u53d861H\u7aef\u53e3\u7684bit\u4f4d\u72b6\u6001\u3002<\/p>\n\n\n\n<p>\u4e0a\u9762\u4ecb\u7ecd\u4e86\u901a\u8fc7\u7aef\u53e361H\u7684bit\u4f4d\u53d1\u51fa\u58f0\u97f3\u7684\u6280\u672f\u65f6\u9057\u7559\u4e0b\u4e00\u4e2a\u95ee\u9898\uff0c<\/p>\n\n\n\n<p>\u90a3\u5c31\u662f<strong>\u5982\u4f55\u7cbe\u786e\u7684\u63a7\u5236\u58f0\u97f3\u7684\u9891\u7387<\/strong>\u3002<\/p>\n\n\n\n<p><strong>\u73b0\u5728\u5c31\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898<\/strong><\/p>\n\n\n\n<p>\u65e9\u671f\u7684PC\u673a\u6709\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u5b9a\u65f6\u7684\u7535\u8def\uff0c\u578b\u53f7\u4e3a8253\/8254\u3002<\/p>\n\n\n\n<p>\u5b83\u6709\u4e09\u4e2a\u901a\u9053\uff0c\u7b2c\u4e00\u4e2a\u901a\u9053\u7528\u4e8e\u63a7\u5236\u59cb\u7ec8\u6b63\u5e38\u8fd0\u8f6c\uff1b<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u4e2a\u901a\u9053\u7528\u4e8e\u5b58\u50a8\u5668\u5237\u65b0\uff1b\u8fd9\u4e24\u4e2a\u901a\u9053\u4e0e\u6211\u4eec\u73b0\u5728\u8981\u8ba8\u8bba\u7684\u95ee\u9898\u65e0\u5173\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e09\u4e2a\u5c31\u662f\u4e00\u7ec4\u7535\u8def\u57df\u5587\u53ed\u76f8\u8fde\u3002<\/p>\n\n\n\n<p>\u5982\u4e0b\u56fe\u6240\u793a\u5c31\u662fPC\u673a\u4e2d\u5b8c\u6574\u7684\u53d1\u58f0\u7535\u8def\uff0c<\/p>\n\n\n\n<p>\u5b9a\u65f6\u5668\u901a\u90533\u7684G\u7aef\u4e0e61H\u7aef\u53e3\u7684bit0\u4f4d\u76f8\u8fde\uff0c<\/p>\n\n\n\n<p>\u5982\u679c\u628a61H\u7aef\u53e3\u7684bit0\u4f4d\u7f6e\u4e3a1\uff0c\u90a3\u4e48\u5b9a\u65f6\u5668\u901a\u90533\u5c31\u4f1a\u88ab\u542f\u52a8\uff0c<\/p>\n\n\n\n<p>\u6b64\u65f6\u5c06\u6709\u4e00\u7ec4\u4fe1\u53f7\u4eceOUT\u8f93\u51fa\uff0c\u4fe1\u53f7\u7684\u9891\u7387\u53ef\u4ee5\u7528\u7a0b\u5e8f\u63a7\u5236\uff1b<\/p>\n\n\n\n<p>\u82e561H\u7684\u7aef\u53e3bit0\u4f4d\u4e3a0\uff0c\u5219\u5b9a\u65f6\u5668\u88ab\u5173\u95ed\uff0cout\u7aef\u5c31\u6052\u4e3a1.<\/p>\n\n\n\n<p><strong>\u53d1\u58f0\u7a0b\u5e8f\u8bbe\u8ba1\u539f\u7406\uff1a<\/strong><\/p>\n\n\n\n<p>PC\u673a\u53d1\u58f0\u7cfb\u7edf\u4ee58254\u76842\u53f7\u8ba1\u6570\u5668\u4e3a\u6838\u5fc3\u3002<\/p>\n\n\n\n<p>\u7cfb\u7edf\u521d\u59cb\u5316\u65f6\uff0c2\u53f7\u8ba1\u6570\u5668I\u4f5c\u5728\u201c\u65b9\u6ce2\u53d1\u751f\u5668\u201d\u65b9\u5f0f\uff0c\u521d\u503c\u4e3a\u4e8c\u8fdb\u5236\u6570\uff0c<\/p>\n\n\n\n<p>\u5199\u5165\u987a\u5e8f\u4e3a\u5148\u4f4e\u540e\u9ad8\uff0cCLK2\u4e3a1\uff0e193182MHz\uff0c<\/p>\n\n\n\n<p>\u5f53\u8ba1\u6570\u521d\u503c\u4e3a533H\u65f6\uff0cOUT2\u8f93\u51fa\u7684\u65b9\u6ce2\u5927\u7ea6\u4e3a900Hz\uff0c<\/p>\n\n\n\n<p>\u7ecf\u8fc7\u7b80\u5355\u7684\u6ee4\u6ce2\u4e4b\u540e\uff0c\u9001\u81f3\u626c\u58f0\u5668\u3002<\/p>\n\n\n\n<p>\u6539\u53d81\u30014\u53f7\u8ba1\u6570\u5668\u7684\u8ba1\u6570\u521d\u503c\u5c31\u53ef\u4ee5\u4f7f\u626c\u58f0\u5668\u53d1\u51fa\u4e0d\u540c\u9891\u7387\u7684\u97f3\u54cd\u3002<\/p>\n\n\n\n<p>&nbsp;ROM BIOS \u4e2d\u6709\u4e2aBEEP\u5b50\u7a0b\u5e8f,<\/p>\n\n\n\n<p>\u8fd9\u80fd\u6839\u636eBL\u4e2d\u7ec4\u51fa\u7684\u65f6\u95f4\u8ba1\u6570\u503c\u63a7\u52368254\u5b9a\u65f6\u5668,<\/p>\n\n\n\n<p>\u4ea7\u751f\u6301\u7eed\u65f6\u95f4\u4e3a1\u4e2a\u6216\u51e0\u4e2a0.5\u79d2,\u9891\u7387\u4e3a896HZ\u7684\u58f0\u97f3\uff0c<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u5e76\u4fee\u6539BEEP\uff0c\u4f7f\u5176\u4ea7\u751f\u4efb\u4e00\u9891\u7387\u7684\u58f0\u97f3\u3002<\/p>\n\n\n\n<p>\u4e3a\u6b64\u6211\u4eec\u9700\u8981\u505a\u4e24\u70b9\u4fee\u6539\uff0c\u9996\u5148\uff0cBEEP\u7a0b\u5e8f\u53ea\u80fd\u4ea7\u751f896HZ\u7684\u58f0\u97f3\uff0c<\/p>\n\n\n\n<p>\u6211\u4eec\u7684\u901a\u7528\u53d1\u58f0\u7a0b\u5e8f\u5e94\u80fd\u4ea7\u751f\u4efb\u4e00\u9891\u7387\u7684\u58f0\u97f3\u3002<\/p>\n\n\n\n<p>\u5176\u6b21\uff0cBEEP\u4ea7\u751f\u58f0\u97f3\u7684\u6301\u7eed\u65f6\u95f4\uff08\u97f3\u957f\uff09\u53ea\u80fd\u662f0.5\u79d2\u7684\u500d\u6570\uff0c<\/p>\n\n\n\n<p>\u6211\u4eec\u5e0c\u671b\u58f0\u97f3\u7684\u6301\u7eed\u65f6\u95f4\u66f4\u6613\u4e8e\u8c03\u6574\uff0c\u4f8b\u5982\u53ef\u4ee5\u662f10ms\u7684\u500d\u6570\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u77e5\u9053BEEP\u80fd\u5c06\u8ba1\u6570\u503c533H\u9001\u7ed9\u5b9a\u65f6\u56682\u4ea7\u751f896HZ\u7684\u58f0\u97f3\u7684\uff0c<\/p>\n\n\n\n<p>\u90a3\u4e48\u4ea7\u751f\u5176\u5b83\u9891\u7387\u58f0\u97f3\u7684\u65f6\u95f4\u8ba1\u6570\u503c\u5e94\u4e3a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>533H\u00d7896\u00f7\u7ed9\u5b9a\u9891\u7387=123280H\u00f7\u7ed9\u5b9a\u9891\u7387<\/code><\/pre>\n\n\n\n<p>\u53d1\u58f0\u7a0b\u5e8f\u5305\u62ec<strong>4\u4e2a\u6b65\u9aa4<\/strong>\uff1a&nbsp;<\/p>\n\n\n\n<p>\uff081\uff09\u57288253\u4e2d\u768442\u7aef\u53e3\u9001\u4e00\u4e2a\u63a7\u5236\u5b570B6H\uff0810110110B\uff09\uff0c<\/p>\n\n\n\n<p>\u8be5\u63a7\u5236\u5b57\u5bf9\u5b9a\u65f6\u56682\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u4f7f\u5b9a\u65f6\u56682\u51c6\u5907\u63a5\u6536\u8ba1\u6570\u521d\u503c\u3002&nbsp;<\/p>\n\n\n\n<p>\uff082\uff09\u57288253\u4e2d\u768442H\u7aef\u53e3(Timer2)\u88c5\u5165\u4e00\u4e2a16\u4f4d\u7684\u8ba1\u6570\u503c<\/p>\n\n\n\n<p>\uff08533H\u00d7895\/\u9891\u7387\uff09\uff0c\u4ee5\u5efa\u7acb\u5c06\u8981\u4ea7\u751f\u7684\u58f0\u97f3\u9891\u7387\u3002&nbsp;<\/p>\n\n\n\n<p>\uff083\uff09\u628a\u8f93\u51fa\u7aef\u53e361H\u7684PB0\u3001PB1\u4e24\u4f4d\u7f6e1\uff0c\u53d1\u51fa\u58f0\u97f3\u3002&nbsp;<\/p>\n\n\n\n<p>&nbsp;(4)\u6ce8\u610f\u97f3\u4e50\u8282\u62cd\u8868\u7684\u9891\u7387\u8868\u7684\u8bbe\u5b9a\u3002<\/p>\n\n\n\n<p>\u4e00\u4e2a\u9891\u7387\u5bf9\u5e94\u4e00\u4e2a\u8282\u62cd\uff0c\u5982\u679c\u9891\u7387\u8868\u548c\u8282\u62cd\u8868\u6709\u95ee\u9898\uff0c<\/p>\n\n\n\n<p>\u540c\u6837\u4e0d\u4f1a\u53d1\u51fa\u58f0\u97f3\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u53d1\u97f3\u90e8\u5206\uff1a<\/p>\n\n\n\n<p>PC\u673a\u4e0a\u7684\u5927\u591a\u6570\u8f93\u5165\/\u8f93\u51fa\uff08I\/O\uff09<\/p>\n\n\n\n<p>\u90fd\u662f\u7531\u4e3b\u677f\u4e0a\u76848255\uff08\u62168255A\uff09\u53ef\u7f16\u7a0b\u5e8f\u5916\u56f4\u63a5\u53e3\u82af\u7247\uff08PPI\uff09\u7ba1\u7406\u7684\u3002<\/p>\n\n\n\n<p>PPI\u5305\u62ec3\u4e2a8\u4f4d\u5bc4\u5b58\u5668\uff0c<\/p>\n\n\n\n<p>\u4e24\u4e2a\u7528\u4e8e\u8f93\u5165\u529f\u80fd\uff0c\u4e00\u4e2a\u7528\u4e8e\u8f93\u51fa\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u8f93\u5165\u5bc4\u5b58\u5668\u5206\u914d\u7684I\/O\u7aef\u53e3\u53f7\u4e3a60H\u548c62H\uff0c<\/p>\n\n\n\n<p>\u8f93\u51fa\u5bc4\u5b58\u5668\u5206\u914d\u7684I\/O\u7aef\u53e3\u53f7\u4e3a61H\u3002<\/p>\n\n\n\n<p>\u7531PPI\u8f93\u51fa\u5bc4\u5b58\u5668\u4e2d\u76840\u30011\u4e24\u4f4d\u6765\u9009\u62e9\u626c\u58f0\u5668\u7684\u9a71\u52a8\u65b9\u5f0f\u3002<\/p>\n\n\n\n<p>\u8fde\u63a5\u5230\u626c\u58f0\u5668\u4e0a\u7684\u662f\u5b9a\u65f6\u56682\uff0c<\/p>\n\n\n\n<p>\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0cGATE2\u4e0e\u7aef\u53e361H\u7684PB0\u76f8\u8fde\uff0c<\/p>\n\n\n\n<p>\u5f53PB0=1\u65f6\uff0cGATE2\u83b7\u5f97\u9ad8\u7535\u5e73\uff0c\u4f7f\u5b9a\u65f6\u56682\u53ef\u4ee5\u5728\u6a21\u5f0f3\uff08\u65b9\u6ce2\uff09\u4e0b\u5de5\u4f5c\u3002\u5b9a\u65f6\u56682\u7684OUT2\u4e0e\u7aef\u53e361H\u7684PB1\u901a\u8fc7\u4e00\u4e2a\u4e0e\u95e8\u4e0e\u626c\u58f0\u5668\u7684\u9a71\u52a8\u7535\u8def\u76f8\u8fde\u3002\u5f53PB1=1\u65f6\uff0c\u5141\u8bb8OUT2\u7684\u8f93\u51fa\u4fe1\u53f7\u5230\u8fbe\u626c\u58f0\u5668\u7535\u8def\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c<strong>\u53ea\u6709PB0\u548cPB1\u540c\u65f6\u4e3a\u201c1\u201d\u65f6\uff0c\u624d\u80fd\u9a71\u52a8\u626c\u58f0\u5668\u5730\u58f0<\/strong>\u3002<\/p>\n\n\n\n<p><br>\u901a\u8fc7\u4ee5\u4e0b\u6307\u4ee4\u5b9e\u73b0\uff1a&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>IN&nbsp;AL\uff0c61H&nbsp;<\/code><code>OR AL\uff0c3 <\/code><code>OUT 61H\uff0cAL<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684\u6307\u4ee4\u7528\u4ee5\u6253\u5f00\u626c\u58f0\u5668\uff0c\u5982\u8981\u5173\u95ed\u626c\u58f0\u5668\u65f6\u5219\u4e3a\uff1a&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>AND AL\uff0c0FCH <\/code><code>OUT 61H\uff0cAL<\/code><\/pre>\n\n\n\n<p>\u5f53\u4ece8255\u4e2d\u91c7\u96c6\u5230\u8f93\u5165\u7684\u6570\u636e\u65f6\uff0c\u9700\u8981\u786e\u5b9a\u76f8\u5e94\u7684\u9891\u7387\uff0c\u6240\u4ee5\u5728\u8f6f\u4ef6\u7f16\u7a0b\u65f6\u8981\u5efa\u7acb\u4e00\u4e2a\u6570\u636e\u8868\uff1a&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>TABLE DW 493\uff0c440\uff0c392\uff0c349\uff0c329\uff0c293\uff0c261<\/code><\/pre>\n\n\n\n<p>\u628a\u76f8\u5e94\u7684\u9891\u7387\u9001\u5230\u4e00\u4e2a\u5bc4\u5b58\u5668\u4e0a\uff0c\u901a\u8fc7\u516c\u5f0f\uff1a&nbsp;<\/p>\n\n\n\n<p><strong>\u8ba1\u6570\u503c=533H\u00d7896\u00f7 f=1234DCH\u00f7 f&nbsp;<\/strong><\/p>\n\n\n\n<p>\u7b97\u51fa\u8ba1\u6570\u503c\uff0c\u518d\u628a\u7b97\u5f97\u7684\u8ba1\u6570\u503c\u9001\u7ed98253\uff0c\u5c31\u53ef\u4ea7\u751f\u6240\u8981\u9891\u7387\u7684\u65b9\u6ce2\u3002\u5728\u628a\u8ba1\u6570\u503c\u90018253\u524d\uff0c\u5fc5\u987b\u5148\u628a8253\u8fdb\u884c\u521d\u59cb\u5316\uff1a&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>MOV AL\uff0c0B6H <\/code><code>OUT 43H\uff0cAL<\/code><\/pre>\n\n\n\n<p>\u4f7f\u5176\u9009\u7528\u901a\u90532\uff0c\u5de5\u4f5c\u5728\u65b9\u5f0f3\u4e0b\u3002<\/p>\n\n\n\n<p>\u5c31\u6574\u4e2a\u7535\u8def\u800c\u8a00\uff0c\u63a5\u597d\u7535\u8def\u540e\uff0c<\/p>\n\n\n\n<p>\u901a\u8fc7\u8f6f\u4ef6\u7f16\u7a0b\u4e0d\u65ad\u5730\u91c7\u96c6\u4ece8255\u53e3\u4e2d\u8f93\u5165\u7684\u4fe1\u53f7\uff0c<\/p>\n\n\n\n<p>\u800c8\u4e2a\u5f00\u5173\u90fd\u63a5\u57288255\u7684A\u53e3\u4e0a\uff0c<\/p>\n\n\n\n<p>\u53ea\u8981\u6709\u5f00\u5173\u6309\u4e0b\uff0c\u5c31\u4f1a\u91c7\u96c6\u5230\u4e00\u4e2a\u6570\u636e\uff0c<\/p>\n\n\n\n<p>\u6839\u636e\u8fd9\u4e2a\u6570\u636e\u4e0e\u4e8b\u5148\u7f16\u597d\u7684\u8868\u5bf9\u5e94\uff0c\u5f97\u5230\u4e00\u4e2a\u8ba1\u6570\u503c\uff0c<\/p>\n\n\n\n<p>\u628a\u8fd9\u4e2a\u8ba1\u6570\u503c\u9001\u7ed98253\u7684\u901a\u90532\uff0c8253\u7684\u901a\u90532\u5de5\u4f5c\u7684\u65b9\u5f0f3\u4e0b\uff0c<\/p>\n\n\n\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u4ea7\u751f\u6ee1\u8db3\u9891\u7387\u8981\u6c42\u7684\u53d1\u58f0\u65b9\u6ce2\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u65b9\u6ce2\u7ecf\u9a71\u52a8\u653e\u5927\u5c31\u53ef\u4ee5\u4f7f\u626c\u58f0\u5668\u53d1\u51fa\u76f8\u5e94\u7684\u58f0\u97f3\u3002<\/p>\n\n\n\n<p>\u6240\u4ee58255\u5728\u8fd9\u91cc\u5b8c\u6210\u4e24\u4e2a\u4efb\u52a1\uff0c\u5b83\u4e0d\u4ec5\u4eceA\u53e3\u4e2d\u91c7\u96c6\u5230\u6570\u636e\uff0c<\/p>\n\n\n\n<p>\u800c\u4e14B\u53e3\u7684PB1\u548cPB0\u4e24\u4e2a\u4f4d\u8981\u63a7\u5236\u53d1\u58f0\u3002<\/p>\n\n\n\n<p>8253\u7684\u4e3b\u8981\u4efb\u52a1\u5c31\u662f\u4ea7\u751f\u6240\u8981\u6c42\u53d1\u58f0\u7684\u4e0d\u540c\u9891\u7387\u7684\u65b9\u6ce2\u3002<\/p>\n\n\n\n<p><strong>\u53c2\u8003\u4ee3\u7801\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>;\u5b9a\u4e49\u6570\u636e\u6bb5\ndata segment\n     infor1 db 0Dh, 0AH, \"welocom you to come here listeng! $\"\n\n\n     mus_freg  dw 330,294,262,294,3 dup (330)     ;\u9891\u7387\u8868\n               dw 3 dup (294),330,392,392\n               dw 330,294,262,294,4 dup (330)\n               dw 294,294,330,294,262,-1\n     mus_time  dw 6 dup (25),50                   ;\u8282\u62cd\u8868\n               dw 2 dup (25,25,50)\n               dw 12 dup (25),100\ndata ends\n\n\n;\u6808\u6bb5\u5b9a\u4e49\nstack segment stack\n      db 200 dup(?)\nstack ends\n\n\n;--------\u5b57\u7b26\u4e32\u8f93\u51fa\u5b8f----------\nSHOWBM MACRO b\n     LEA DX,b\n     MOV AH,9\n     INT 21H\n ENDM\n\n\n;----------\u97f3\u4e50\u5730\u5740\u5b8f-----------\nADDRESS MACRO A,B\n     LEA SI,A\n     LEA BP,DS:B\nENDM\n;-------------------------------\n\n\n;\u4ee3\u7801\u6bb5\u5b9a\u4e49\ncode segment\n     assume ds:data, ss:stack, cs:code\nstart:\n     mov ax, data\n     mov ds, ax\n     mov ax, stack\n     mov ss, ax\n     mov sp, 200\n\n     address mus_freg, mus_time\n     call music\n\n\nexit:     \n     mov ah, 4cH\n     int 21h\n\n\n;------------\u53d1\u58f0-------------\ngensound proc near\n     push ax\n     push bx\n     push cx\n     push dx\n     push di\n\n\n     mov al, 0b6H\n     out 43h, al\n     mov dx, 12h\n     mov ax, 348ch\n     div di\n     out 42h, al\n\n\n     mov al, ah\n     out 42h, al\n\n\n     in al, 61h\n     mov ah, al\n     or al, 3\n     out 61h, al\nwait1:\n     mov cx, 3314\n     call waitf\ndelay1:\n     dec bx\n     jnz wait1\n\n\n     mov al, ah\n     out 61h, al\n\n\n     pop di\n     pop dx\n     pop cx\n     pop bx\n     pop ax\n     ret \ngensound endp\n\n\n;--------------------------\nwaitf proc near\n      push ax\nwaitf1:\n      in al,61h\n      and al,10h\n      cmp al,ah\n      je waitf1\n      mov ah,al\n      loop waitf1\n      pop ax\n      ret\nwaitf endp\n;--------------\u53d1\u58f0\u8c03\u7528\u51fd\u6570----------------\nmusic proc near\n      xor ax, ax\nfreg:\n      mov di, &#91;si]\n      cmp di, 0FFFFH\n      je end_mus\n      mov bx, ds:&#91;bp]\n      call gensound\n      add si, 2\n      add bp, 2\n      jmp freg\nend_mus:\n      ret\nmusic endp\n\n\ncode ends\n     end start<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5728\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u8fd9\u6837\u7684\u60c5\u51b5\uff1a\u4f60\u7528\u7684\u662fDOSBOX\u865a\u62df\u673a\u8fdb\u884c\u7f16\u7a0b\uff0c\u7136\u540e\u8fdb\u884c\u6d4b\u8bd5\u4e4b\u540e\uff0c\u4e00\u5207\u901a\u8fc7\u3002\u4f46\u662f\u79fb\u690d\u523032\u4f4dwin7\u7684\u865a\u62df8086\u5c31\u6ca1\u6709\u4efb\u4f55\u58f0\u97f3\u4e86\u3002\u8fd9\u662f\u6211\u4eb2\u8eab\u4f53\u4f1a\u7684\u7ecf\u5386\u3002\u81ea\u5df1\u4e5f\u4e0d\u662f\u5f88\u6e05\u695a\u8fd9\u5230\u5e95\u662f\u95ee\u4ec0\u4e48\uff0c\u4f1a\u56e0\u4e3a\u58f0\u5361\u7684\u8bbe\u8ba1\u4e0d\u4e00\u6837\uff1f\u8fd8\u662f\u8bf4\u4e0d\u540c\u7684\u58f0\u5361\u6709\u4e0d\u540c\u7684\u63a7\u5236\u65b9\u5f0f\uff1f\u5c31\u662f\u5efa\u8bae\u5927\u5bb6\u5982\u679c\u5408\u4f5c\u7528\u6c47\u7f16\u7f16\u5199\u7a0b\u5e8f\u65f6\uff0c\u8981\u6ce8\u610f\u5e73\u53f0\u7684\u7edf\u4e00\uff0c\u4e0d\u7136\u4f1a\u51fa\u73b0\u8bb8\u591a\u95ee\u9898\u3002\uff08\u4e0a\u9762\u7684\u7a0b\u5e8f\u5b9e\u5728DOSBOX\u4e2d\u6d4b\u8bd5\u6210\u529f\u7684~~\uff09<\/p>\n\n\n\n<p>\u7ecf\u8fc7\u52aa\u529b\u7684\u8c03\u8bd5\u548c\u53d1\u73b0<\/p>\n\n\n\n<p>\u627e\u5230\u4e86\u4e3a\u4ec0\u4e48\u5728dosbox\u4e0b\u53ef\u4ee5\u53d1\u58f0<\/p>\n\n\n\n<p>\u5728cmd\u4e2d\u4e0d\u80fd\u7684\u539f\u56e0\uff1a<\/p>\n\n\n\n<p>\u56e0\u4e3adosbox\u865a\u62df\u673a\u7684cpu\u9891\u7387\u6bd4\u8f83\u5c0f\uff0c\u6240\u4ee5\u53ef\u4ee5\u4e00\u6b21\u987a\u5229\u7684\u8bfb\u53d6\u5230\u6bcf\u4e2a\u9891\u7387\u70b9\uff0c\u4f46\u662f\u5728windows xp\u4e0b\u8fd0\u884c\u65f6\uff0ccpud\u7684\u9891\u7387\u8981\u6bd4dosbox\u4e0b\u7684\u9891\u7387\u5feb\u7684\u591a\uff0c\u6240\u4ee5\u5f53\u8bfb\u5230\u7b2c\u4e00\u4e2a\u9891\u7387\u8fd8\u6ca1\u6709\u6765\u5f97\u53ca\u53d1\u58f0\uff0c\u6709\u8bfb\u5230\u4e86\u4e0b\u4e00\u4e2a\u9891\u7387\uff0c\u4ee5\u81f3\u4e8e\u9891\u7387\u8868\u5df2\u7ecf\u4e0d\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u9891\u7387\u4e86\uff0c\u6240\u4ee5\u4e0d\u80fd\u53d1\u58f0\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u5982\u679c\u8981\u5728windows xp\u4e0b\u8fd0\u884c\u53d1\u58f0\uff0c<\/p>\n\n\n\n<p>\u5fc5\u987b\u7ed9\u6bcf\u4e00\u6b21\u8bfb\u53d6\u9891\u7387\u7684\u4e0b\u4e00\u6761\u8bed\u53e5\u6dfb\u52a0\u4e00\u4e2a\u5ef6\u8fdf\u51fd\u6570\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4ecb\u7ecd\u97f3\u4e50\u7684\u64ad\u653e\u4e4b\u524d\uff0c\u5148\u6765\u8bf4\u8bf4\u5982&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=448"}],"version-history":[{"count":0,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/448\/revisions"}],"wp:attachment":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}