{"id":1274,"date":"2018-10-23T23:08:13","date_gmt":"2018-10-23T15:08:13","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=1274"},"modified":"2018-10-24T21:10:49","modified_gmt":"2018-10-24T13:10:49","slug":"%e6%b1%87%e7%bc%96%e7%ae%80%e5%8d%95%e5%ae%9e%e7%8e%b0%e4%b8%a4%e4%b8%aa%e6%95%b0%e5%80%bc%e7%9a%84%e4%ba%a4%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/assembler\/2018\/10\/23\/2308131274.html","title":{"rendered":"\u6c47\u7f16\u7b80\u5355\u5b9e\u73b0\u4e24\u4e2a\u6570\u503c\u7684\u4ea4\u6362"},"content":{"rendered":"<pre lang=\"asm\" line=\"1\">assume ss:stack, ds:data, cs:code\r\n;\u5806\u6808\u6bb5\r\nstack segment\r\n    db 20 dup(1);\u521d\u59cb\u531620\u4e2a\u5b57\u8282\u7a7a\u95f4\r\nstack ends\r\n;\u6570\u636e\u6bb5\r\ndata segment\r\n    db 20 dup(2);\u521d\u59cb\u531620\u4e2a\u5b57\u8282\u7a7a\u95f4    \r\ndata ends\r\n;\u4ee3\u7801\u6bb5\r\ncode segment\r\nstart:\r\n    ;\u521d\u59cb\u5316\u5806\u6808\u5bc4\u5b58\u5668\r\n    mov ax, stack\r\n    mov ss, ax  \r\n    mov sp, 20;\u590d\u4f4d\u6808\u9876\r\n    ;\u521d\u59cb\u5316\u6570\u636e\u5bc4\u5b58\u5668\r\n    mov ax, data\r\n    mov ds, ax\r\n    \r\n    mov ax, 1122h\r\n    mov bx, 3344h\r\n    ;\u5c06ax\u3001bx\u5206\u522b\u8fdb\u6808\r\n    push ax\r\n    push bx\r\n    ;\u6839\u636e\u6808\u540e\u8fdb\u5148\u51fa\u7684\u539f\u5219\uff0c\u53ef\u4ea4\u6362ax\u4e0ebx\u7684\u503c\r\n    pop ax;\u5c06\u6808\u9876\u6570\u636e\u8d4b\u503c\u7ed9ax\uff0c\u5f53\u524d\u6808\u9876\u4e3abx\u7684\u503c\r\n    pop bx;bx\u5df2\u51fa\u6808\uff0c\u5f53\u524d\u6808\u9876\u4e3aax\u7684\u503c\r\n    ;\u9000\u51fa\u7a0b\u5e8f\r\n    mov ah, 4ch\r\n    int 21h\r\ncode ends\r\nend start<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247-300x195.png\" alt=\"\" width=\"600\" height=\"390\" class=\"alignnone size-medium wp-image-1275\" srcset=\"https:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247-300x195.png 300w, https:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247-768x500.png 768w, https:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247-1024x666.png 1024w, https:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247-624x406.png 624w, https:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2018\/10\/Parallels-\u56fe\u7247.png 1814w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>assume ss:stack, ds:data, cs:code ;\u5806\u6808\u6bb5 stack segment db 20 dup(1);\u521d\u59cb\u531620\u4e2a\u5b57\u8282\u7a7a\u95f4 stack ends ;\u6570\u636e\u6bb5 data segment db 20 dup(2);\u521d\u59cb\u531620\u4e2a\u5b57\u8282\u7a7a\u95f4 data ends ;\u4ee3\u7801\u6bb5 code segment start: ;\u521d\u59cb\u5316\u5806\u6808\u5bc4\u5b58\u5668 mov ax, stack mov ss, ax mov sp, 20;\u590d\u4f4d\u6808\u9876 ;\u521d\u59cb\u5316\u6570\u636e\u5bc4\u5b58\u5668 mov ax, data mov ds, ax mov ax, 1122h mov bx, 3344h ;\u5c06ax\u3001bx\u5206\u522b\u8fdb\u6808 push ax push bx ;\u6839\u636e\u6808\u540e\u8fdb\u5148\u51fa\u7684\u539f\u5219\uff0c\u53ef\u4ea4\u6362ax\u4e0ebx\u7684\u503c pop ax;\u5c06\u6808\u9876\u6570\u636e\u8d4b\u503c\u7ed9ax\uff0c\u5f53\u524d\u6808\u9876\u4e3abx\u7684\u503c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124],"tags":[121],"class_list":["post-1274","post","type-post","status-publish","format-standard","hentry","category-assembler","tag-121"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=1274"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1274\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=1274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=1274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=1274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}