{"id":496,"date":"2026-03-07T19:54:14","date_gmt":"2026-03-07T11:54:14","guid":{"rendered":"http:\/\/8.129.82.128\/?p=496"},"modified":"2026-03-07T19:54:14","modified_gmt":"2026-03-07T11:54:14","slug":"8086%e6%b1%87%e7%bc%966","status":"publish","type":"post","link":"http:\/\/8.129.82.128\/?p=496","title":{"rendered":"8086\u6c47\u7f16#6"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u7b2c\u516d\u7ae0 \u5305\u542b\u591a\u4e2a\u6bb5\u7684\u7a0b\u5e8f &#8211; \u6c47\u7f16\u8bed\u8a00\u63d0\u7eb2<\/title>\n    <style>\n        #asm-wrapper {\n            all: initial;\n            display: block;\n            width: 100%;\n            min-height: 100vh;\n            margin: 0;\n            padding: 30px 25px;\n            box-sizing: border-box;\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Microsoft YaHei\", sans-serif !important;\n            line-height: 1.8;\n            background: linear-gradient(180deg, #d4ecf7 0%, #a8e6cf 50%, #88d8b0 100%) !important;\n            color: #2c3e50 !important;\n        }\n        #asm-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }\n        #asm-wrapper h1 { text-align: center; color: #1a5276 !important; font-size: 1.8em; border-bottom: 3px solid #27ae60 !important; padding-bottom: 15px; }\n        #asm-wrapper h2 { color: #1e8449 !important; border-left: 4px solid #27ae60 !important; padding-left: 15px; margin-top: 30px; }\n        #asm-wrapper h3 { color: #196f3d !important; margin-top: 20px; }\n        #asm-wrapper p { margin: 10px 0; }\n        #asm-wrapper ul, #asm-wrapper ol { margin: 10px 0; padding-left: 25px; }\n        #asm-wrapper li { margin: 5px 0; }\n        #asm-wrapper strong { color: #e74c3c !important; font-weight: 700 !important; }\n        #asm-wrapper pre { background: #1e3d2f !important; color: #a8e6cf !important; padding: 15px 20px; border-radius: 8px; overflow-x: auto; font-size: 0.85em; line-height: 1.6; margin: 15px 0; border: 2px solid #27ae60; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }\n        #asm-wrapper pre code { background: none !important; padding: 0; color: inherit !important; border: none; }\n        #asm-wrapper table { width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 0.9em; }\n        #asm-wrapper th, #asm-wrapper td { border: 1px solid #7f8c8d; padding: 10px 12px; text-align: left; }\n        #asm-wrapper th { background: #27ae60 !important; color: white !important; }\n        #asm-wrapper tr:nth-child(even) { background: #d5f5e3 !important; }\n        #asm-wrapper img { max-width: 100%; height: auto; display: block; margin: 25px 0; padding: 15px; background: white !important; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 2px solid #27ae60; }\n        #asm-wrapper hr { border: none; border-top: 2px dashed #27ae60; margin: 30px 0; }\n<\/style>\n<\/head>\n<body>\n    <div id=\"asm-wrapper\">\n        <h1>\u7b2c\u516d\u7ae0 \u5305\u542b\u591a\u4e2a\u6bb5\u7684\u7a0b\u5e8f<\/h1>\n        \u7b2c\u516d\u7ae0 \u5305\u542b\u591a\u4e2a\u6bb5\u7684\u7a0b\u5e8f<\/strong><strong><\/strong><\/p>\n<p>\u7a0b\u5e8f\u53d6\u5f97\u6240\u9700\u7a7a\u95f4\u7684\u4e24\u4e2a\u65b9\u6cd5:\u5728\u52a0\u8f7d\u7a0b\u5e8f\u7684\u65f6\u5019\u4e3a\u7a0b\u5e8f\u5206\u914d\u3001\u6267\u884c\u8fc7\u7a0b\u4e2d\u5411\u7cfb\u7edf\u7533\u8bf7(\u52a8\u6001\u5185\u5b58\u7533\u8bf7)<\/p>\n<pre><code><![if !supportLists]>6.1 <![endif]>\u5728\u4ee3\u7801\u6bb5\u4e2d\u4f7f\u7528\u6570\u636e\n1.\u4f2a\u6307\u4ee4dw(define word)\u7528\u4e8e\u5b57\u578b\u6570\u636e\uff0c\u6bcf\u4e2a\u6570\u636e\u4e4b\u95f4\u4ee5\u9017\u53f7\u5206\u9694\ndd(define dword)\u7528\u4e8e\u5b9a\u4e49<strong>\u53cc\u5b57<\/strong>\u6570\u636e,db(define byte)\u7528\u4e8e\u5b9a\u4e49\u5b57\u8282\u578b\u6570\u636e\n<![if !supportLists]>2. <![endif]>\u7a0b\u5e8f\u7684\u5f00\u59cb\u5904\u504f\u79fb\u5730\u5740\u4e3a0,<u>dw\u5b9a\u4e49\u7684\u6570\u636e\u7684\u5730\u5740\u4f9d\u6b21\u9012\u589e\u3002<\/u><\/code><\/pre>\n<p>*\u5199\u6c47\u7f16\u7a0b\u5e8f\u65f6,\u524d\u9762\u5199\u7684\u5730\u5740\u5c31\u9760\u524d,\u540e\u9762\u5199\u7684\u5730\u5740\u9760\u540e<\/p>\n<p><![if !supportLists]>3. <![endif]><strong>\u7a0b\u5e8f\u9ed8\u8ba4\u4ee5CS:0\u4e3a\u5165\u53e3<\/strong><strong><\/strong><\/p>\n<p><![if !supportLists]>4. <![endif]>\u4f2a\u6307\u4ee4    <strong>end \u6807\u53f7<\/strong>\u53ef\u4ee5\u8bbe\u7f6e\u7a0b\u5e8f\u7684\u5165\u53e3\u4e3a\u67d0\u4e00\u6807\u53f7<\/u><\/p>\n<pre><code>\u603b\u7ed3:\u5728\u4ee3\u7801\u6bb5\u4f7f\u7528\u6570\u636e\u7684\u7a0b\u5e8f\u7684\u67b6\u6784\n<strong>assume cs:code<\/strong><strong><\/strong>\n<strong>code segment<\/strong><strong><\/strong>\n<strong>\u6570\u636e<\/strong><strong><\/strong>\n<strong>start:<\/strong><strong>;\u7a0b\u5e8f\u5165\u53e3<\/strong><strong><\/strong>\n<strong>\u4ee3\u7801<\/strong><strong><\/strong>\n<strong>code ends<\/strong><strong><\/strong>\n<strong>end start<\/strong><strong><\/strong>\n6.2\u5728\u4ee3\u7801\u6bb5\u4e2d\u4f7f\u7528\u6808\n<strong>\u6ce8:mov \u6bb5\u5bc4\u5b58\u5668,\u6bb5\u5bc4\u5b58\u5668 \u662f\u975e\u6cd5\u6307\u4ee4<\/strong><strong><\/strong><\/code><\/pre>\n<p>\u68c0\u6d4b\u70b96.1 <\/p>\n<pre><code>\uff081\uff09\u4e0b\u9762\u7684\u7a0b\u5e8f\u5b9e\u73b0\u4f9d\u6b21\u7528\u5185\u5b580:0~0:15\u5355\u5143\u4e2d\u7684\u5185\u5bb9\u6539\u5199\u7a0b\u5e8f\u4e2d\u7684\u6570\u636e\uff0c\u5b8c\u6210\u7a0b\u5e8f\uff1a\nProgram test-6-1\nassume cs:codesg \ncodesg segment \n        dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h \nstart:  mov ax,0 \n        mov ds,ax \n        mov bx,0 \n        mov cx,8 \n    s:  mov ax,[bx] \n        <u> mov cs:[bx],ax <\/u><u><\/u>\n        add bx,2 \n        loop s \n        mov ax,4c00h \n        int 21h \ncodesg ends \nend start\n\uff082\uff09\u4e0b\u9762\u7684\u7a0b\u5e8f\u5b9e\u73b0\u4f9d\u6b21\u7528\u5185\u5b580:0~0:15\u5355\u5143\u4e2d\u7684\u5185\u5bb9\u6539\u5199\u7a0b\u5e8f\u4e2d\u7684\u6570\u636e\uff0c\u6570\u636e\u7684\u4f20\u9001\u7528\u6808\u6765\u8fdb\u884c\u3002\u6808\u7a7a\u95f4\u8bbe\u7f6e\u5728\u7a0b\u5e8f\u5185\u3002\u5b8c\u6210\u7a0b\u5e8f\uff1a\nProgram test-6-1\nassume cs:codesg \ncodesg segment \n        dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h \n        dw 0,0,0,0,0,0,0,0,0,0 \nstart:  mov ax,<u> codesg <\/u>;\u6216mov ax,<u> cs <\/u>\n        mov ss,ax \n        mov sp,<u> 24h <\/u>;\u6216mov sp,<u> 36 <\/u>\n        mov ax,0 \n        mov ds,ax \n        mov bx,0 \n        mov cx,8 \n    s:  push [bx] \n        <u> pop cs:[bx] <\/u>;\u6216<u> pop ss:[bx] <\/u>\n        add bx,2  \n        loop s \n        mov ax,4c00h \n        int 21h \ncodesg ends \nend start\n6.3\u5c06\u6570\u636e\u3001\u4ee3\u7801\u3001\u6808\u653e\u5165\u4e0d\u540c\u7684\u6bb5\n<![if !supportLists]>1. <![endif]>assume\u6307\u4ee4\u53ef\u4ee5\u8fd9\u6837\u5199:assume cs:code,ds:data,ss:stack,es:extra\n\u6b64\u65f6data\u4e3a\u6570\u636e\u6bb5stack\u4e3a\u6808\u6bb5,extra\u4e3a\u9644\u52a0\u6bb5\uff0c\u5206\u522b\u4e0e\u5bf9\u5e94\u7684\u6bb5\u5173\u8054\u8d77\u6765\n<![if !supportLists]>2. <![endif]>\u5f15\u7528\u6bb5\u5730\u5740:\u7a0b\u5e8f\u4e2d\u6bb5\u540d\u76f8\u5f53\u4e8e\u6bb5\u5730\u5740,\u82e5\u7a0b\u5e8f\u7684assume\u6307\u4ee4\u4e3a\u4e0a\u9762\u7684\u6837\u5b50,\u5219mov ax,data\u5c06\u6570\u636e\u6bb5\u5730\u5740\u9001\u5165ax\n<![if !supportLists]>3. <![endif]>\u6c47\u7f16\u6e90\u7a0b\u5e8f\u53ef\u4ee5\u5b9a\u4e49\u8bb8\u591a\u6bb5,CPU\u5bf9\u6bb5\u4e2d\u5185\u5bb9\u7684\u5904\u7406\u53d6\u51b3\u4e8e\u6c47\u7f16\u4ee3\u7801<\/code><\/pre>\n<p>\u5b9e\u9a8c5 \u7f16\u5199\u3001\u8c03\u8bd5\u5177\u6709\u591a\u4e2a\u6bb5\u7684\u7a0b\u5e8f<\/p>\n<p><![if !supportLists]>\uff081\uff09<![endif]>\u5c06\u4e0b\u9762\u7684\u7a0b\u5e8f\u7f16\u8bd1\u8fde\u63a5\uff0c\u7528Debug\u52a0\u8f7d\u3001\u8ddf\u8e2a\uff0c\u7136\u540e\u56de\u7b54\u95ee\u9898\u3002<\/p>\n<pre><code>program ex-5-1\nassume cs:code,ds:data,ss:stack \ndata segment \n        dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h \ndata ends \nstack segment \n        dw 0,0,0,0,0,0,0,0 \nstack ends \ncode segment \nstart:  mov ax,stack \n        mov ss,ax \n        mov sp,16 \n        mov ax,data \n        mov ds,ax \n        push ds:[0] \n        push ds:[2] \n        pop ds:[2] \n        pop ds:[0] \n        mov ax,4c00h \n        int 21h \ncode ends \nend start \n\u2460CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cdata\u6bb5\u4e2d\u7684\u6570\u636e<u> \u4e0d\u53d8 <\/u>\u3002 <\/code><\/pre>\n<p>\u2461CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cCS=<u> 0C88H <\/u>\uff0cSS=<u> 0C87H <\/u>\uff0cDS=<u> 0C86H <\/u>\u3002<\/p>\n<p>\u2462\u8bbe\u7a0b\u5e8f\u52a0\u8f7d\u540e\uff0cCODE\u6bb5\u7684\u6bb5\u5730\u5740\u4e3aX\uff0c\u5219DATA\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X-2 <\/u>\uff0cSTACK\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X-1 <\/u>\u3002<\/p>\n<p>\uff082\uff09\u5c06\u4e0b\u9762\u7684\u7a0b\u5e8f\u7f16\u8bd1\u8fde\u63a5\uff0c\u7528Debug\u52a0\u8f7d\u3001\u8ddf\u8e2a\uff0c\u7136\u540e\u56de\u7b54\u95ee\u9898\u3002<\/p>\n<pre><code>Program ex-5-2\nassume cs:code,ds:data,ss:stack \ndata segment \n        dw 0123h,0456h\ndata ends \nstack segment \n        dw 0,0\nstack ends \ncode segment \nstart:  mov ax,stack \n        mov ss,ax \n        mov sp,16 \n        mov ax,data \n        mov ds,ax \n        push ds:[0] \n        push ds:[2] \n        pop ds:[2] \n        pop ds:[0] \n        mov ax,4c00h \n        int 21h \ncode ends \nend start \n\u2460CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cdata\u6bb5\u4e2d\u7684\u6570\u636e<u> \u4e0d\u53d8 <\/u>\u3002 <\/code><\/pre>\n<p>\u2461CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cCS=<u> 0C88H <\/u>\uff0cSS=<u> 0C87H <\/u>\uff0cDS=<u> 0C86H <\/u>\u3002<\/p>\n<p>\u2462\u8bbe\u7a0b\u5e8f\u52a0\u8f7d\u540e\uff0cCODE\u6bb5\u7684\u6bb5\u5730\u5740\u4e3aX\uff0c\u5219DATA\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X-2 <\/u>\uff0cSTACK\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X-1 <\/u>\u3002<\/p>\n<p>&#9315;\u5bf9\u4e8e\u5982\u4e0b\u5b9a\u4e49\u7684\u6bb5\uff1a<\/p>\n<pre><code>name segment\n\u2026\u2026\nname ends\n\u5982\u679c\u6bb5\u4e2d\u7684\u6570\u636e\u5360N\u4e2a\u5b57\u8282\uff0c\u5219\u7a0b\u5e8f\u52a0\u8f7d\u540e\uff0c\u8be5\u6bb5\u5b9e\u9645\u5360\u6709\u7684\u7a7a\u95f4\u4e3a<u> ((N+15)\/16)*16 <\/u>\u3002<\/code><\/pre>\n<p>&#9315;\u89e3\u6790\uff1a<\/p>\n<p>N\u5206\u4e3a\u88ab16\u6574\u9664\u548c\u4e0d\u88ab16\u6574\u9664\u3002 <\/p>\n<p>\u5f53N\u88ab16\u6574\u9664\u65f6\uff1a \u5360\u6709\u7684\u7a7a\u95f4\u4e3a(N\/16)*16 <\/p>\n<p>\u5f53N\u4e0d\u88ab16\u6574\u9664\u65f6\uff1a \u5360\u6709\u7684\u7a7a\u95f4\u4e3a(N\/16+1)*16\uff0cN\/16\u5f97\u51fa\u7684\u662f\u53ef\u4ee5\u6574\u9664\u7684\u90e8\u5206\uff0c\u8fd8\u6709\u4e00\u4e2a\u4f59\u6570\uff0c\u4f59\u6570\u80af\u5b9a\u5c0f\u4e8e16\uff0c\u52a0\u4e0a\u4e00\u4e2a16\u3002<\/p>\n<p>\u7a0b\u5e8f\u52a0\u8f7d\u540e\u5206\u914d\u7a7a\u95f4\u662f\u4ee516\u4e2a\u5b57\u8282\u4e3a\u5355\u4f4d\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u5982\u679c\u4e0d\u8db316\u4e2a\u5b57\u8282\u7684\u4e5f\u5206\u914d16\u4e2a\u5b57\u8282\u3002 <\/p>\n<p>\u4e24\u79cd\u60c5\u51b5\u603b\u7ed3\u6210\u4e00\u4e2a\u901a\u7528\u7684\u516c\u5f0f\uff1a((N+15)\/16)*16<\/p>\n<p>\uff083\uff09\u5c06\u4e0b\u9762\u7684\u7a0b\u5e8f\u7f16\u8bd1\u8fde\u63a5\uff0c\u7528Debug\u52a0\u8f7d\u3001\u8ddf\u8e2a\uff0c\u7136\u540e\u56de\u7b54\u95ee\u9898\u3002<\/p>\n<pre><code>Program ex-5-3\nassume cs:code,ds:data,ss:stack \ncode segment \nstart:  mov ax,stack \n        mov ss,ax \n        mov sp,16 \n        mov ax,data \n        mov ds,ax \n        push ds:[0] \n        push ds:[2] \n        pop ds:[2] \n        pop ds:[0] \n        mov ax,4c00h \n        int 21h \ncode ends \ndata segment \n        dw 0123h,0456h\ndata ends \nstack segment \n        dw 0,0\nstack ends \nend start \n\u2460CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cdata\u6bb5\u4e2d\u7684\u6570\u636e<u> \u4e0d\u53d8 <\/u>\u3002 <\/code><\/pre>\n<p>\u2461CPU\u6267\u884c\u7a0b\u5e8f\uff0c\u7a0b\u5e8f\u8fd4\u56de\u524d\uff0cCS=<u> 0C86H <\/u>\uff0cSS=<u> 0C8AH <\/u>\uff0cDS=<u> 0C89H <\/u>\u3002<\/p>\n<p>\u2462\u8bbe\u7a0b\u5e8f\u52a0\u8f7d\u540e\uff0cCODE\u6bb5\u7684\u6bb5\u5730\u5740\u4e3aX\uff0c\u5219DATA\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X+3 <\/u>\uff0cSTACK\u6bb5\u7684\u6bb5\u5730\u5740\u4e3a<u> X+4 <\/u>\u3002<\/p>\n<pre><code>\uff084\uff09\u5982\u679c\u5c06\uff081\uff09\u3001\uff082\uff09\u3001\uff083\uff09\u9898\u4e2d\u7684\u6700\u540e\u4e00\u6761\u4f2a\u6307\u4ee4\u201cend start\u201d\u6539\u4e3a\u201cend\u201d\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e0d\u6307\u660e\u7a0b\u5e8f\u7684\u5165\u53e3\uff09\uff0c\u5219\u54ea\u4e2a\u7a0b\u5e8f\u4ecd\u7136\u53ef\u4ee5\u6b63\u786e\u6267\u884c\uff1f\u8bf7\u8bf4\u660e\u539f\u56e0\u3002\n\u7b54\uff1a\u7b2c\u4e09\u6761\u7a0b\u5e8f\u4ecd\u7136\u53ef\u4ee5\u6b63\u786e\u6267\u884c\uff0c\u5982\u679c\u4e0d\u6307\u660e\u5165\u53e3\u4f4d\u7f6e\uff0c\u5219\u7a0b\u5e8f\u4ece\u6240\u5206\u914d\u7684\u7a7a\u95f4\u5f00\u59cb\u6267\u884c\uff0c\u524d2\u4e2a\u662f\u6570\u636e\u6bb5\uff0c\u53ea\u6709\u4ece\u7b2c3\u6761\u5f00\u59cb\u662f\u6307\u4ee4\u4ee3\u7801\u3002\n\uff085\uff09\u7a0b\u5e8f\u5982\u4e0b\uff0c\u7f16\u5199code\u6bb5\u4e2d\u4ee3\u7801\uff0c\u5c06a\u6bb5\u548cb\u6bb5\u4e2d\u7684\u6570\u636e\u4f9d\u6b21\u76f8\u52a0\uff0c\u5c06\u7ed3\u679c\u5b58\u5230C\u6bb5\u4e2d\u3002\nProgram ex-5-4-1<\/code><\/pre>\n<p>;\u7a0b\u5e8f\u4e00\uff1a\u4e24\u6b21\u5faa\u73af<\/p>\n<pre><code>assume cs:code\na segment\n    db 1,2,3,4,5,6,7,8\na ends\nb segment\n    db 1,2,3,4,5,6,7,8\nb ends\nc segment\n    db 0,0,0,0,0,0,0,0\nc ends\ncode segment\nstart: mov ax,a\n       mov ds,ax\n       mov ax,b\n       mov es,ax\n       mov bx,0\n       mov cx,8\n    s: mov al,[bx]\n       add es:[bx],al\n       inc bx\n       loop s\n       mov ax,c\n       mov ds,ax\n       mov bx,0\n       mov cx,8\n   s0: mov al,es:[bx]\n       mov [bx],al\n       inc bx\n       loop s0\n    mov ax,4c00h\n    int 21h\ncode ends\nend start\nProgram ex-5-4-2<\/code><\/pre>\n<p>;\u7a0b\u5e8f\u4e8c\uff1a\u4e00\u6b21\u5faa\u73af<\/p>\n<pre><code>assume cs:code\na segment\n    db 1,2,3,4,5,6,7,8\na ends\nb segment\n    db 1,2,3,4,5,6,7,8\nb ends\nc segment\n    db 0,0,0,0,0,0,0,0\nc ends\ncode segment\nstart: mov ax,a\n       mov ds,ax;ds\u6307\u5411a\u6bb5\u5730\u5740\n       mov ax,b\n       mov es,ax;es\u6307\u5411b\u6bb5\u5730\u5740\n       mov bx,0\n       mov cx,8\n    s: mov al,[bx]\n       add al,es:[bx]\n       mov dx,c\n       mov ds,dx;ds\u6307\u5411c\u6bb5\u5730\u5740\n       mov [bx],al\n       mov ax,a\n       mov ds,ax;\u91cd\u65b0\u5c06ds\u6307\u5411a\u6bb5\uff08\u597d\u50cf\u6b64\u5904\u8fd8\u80fd\u6539\u8fdb\uff09\n       inc bx\n       loop s\n    mov ax,4c00h\n    int 21h\ncode ends\nend start\nProgram ex-5-4-3<\/code><\/pre>\n<p>;\u7a0b\u5e8f\u4e09\uff1a\u7a0b\u5e8f\u4e8c\u7684\u6539\u8fdb\u7248<\/p>\n<pre><code>assume cs:code \na segment \n        db 1,2,3,4,5,6,7,8 \na ends \nb segment \n        db 1,2,3,4,5,6,7,8 \nb ends \nc segment \n        db 0,0,0,0,0,0,0,0 \nc ends \ncode segment \nstart: \n        mov ax,a \n        mov ds,ax \n        mov ax,b \n        mov es,ax \n        mov ax,c \n        mov ss,ax \n        mov bx,0 \n        mov cx,8 \ns:      mov ax,[bx] \n        mov ss:[bx],ax \n        mov ax,es:[bx] \n        add ss:[bx],ax \n        inc bx \n        loop s\n        mov ax,4c00h \n        int 21h \ncode ends \nend start\n\u81ea\u5df1\u7684\u505a\u6cd5\nProgram ex-5-4-4\nmov ax,a\nmov ds,ax\nmov ax,b\nmov es,ax\nmov ax,c\nmov ss,ax\nmov bx,0\nmov cx,8\ns:mov ax,ds:[bx]\nadd ax,es:[bx]\nmov ss:[bx],ax\ninc bx\nloop s\nmov ax,4c00h\nint 21h\n<![if !supportLists]>\uff086\uff09<![endif]>\u7a0b\u5e8f\u5982\u4e0b\uff0c\u7f16\u5199code\u6bb5\u4e2d\u4ee3\u7801\uff0c\u7528PUSH\u6307\u4ee4\u5c06A\u6bb5\u4e2d\u7684\u524d8\u4e2a\u5b57\u578b\u6570\u636e\uff0c\u9006\u5e8f\u5b58\u50a8\u5230B\u6bb5\u4e2d\u3002<\/code><\/pre>\n<p>Program ex-5-5-1<\/p>\n<pre><code>assume cs:code\na segment\n    dw 1,2,3,4,5,6,7,8\na ends\nb segment\n    dw 0,0,0,0,0,0,0,0\nb ends\ncode segment\nstart: mov ax,a\n       mov ds,ax;ds\u6307\u5411a\u6bb5\n       mov ax,b\n       mov bx,0;ds:bx\u6307\u5411a\u6bb5\u7684\u7b2c1\u4e2a\u5355\u5143\n       mov ss,ax\n       mov sp,16;\u8bbe\u7f6e\u6808\u9876\u6307\u5411b:16\n       mov cx,8\n    s: push [bx]\n       add bx,2\n       loop s;\u5c06a\u6bb5\u4e2d0\uff5e16\u4e2a\u5355\u5143\u9006\u6b21\u5165\u6808\ncode ends\nend start\n\u81ea\u5df1\u7684\u505a\u6cd5:\nProgram ex-5-5-2\nmov ax,a\nmov ds,ax\nmov ax,b\nmov ss,ax\nmov sp,16\nmov dx,0\nmov cx,8\ns:push ds:[dx]\nadd dx,2\nloop s\nmov ax,4c00h\nint 21h<\/code><\/pre>\n<p><strong>\n    <\/div>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u516d\u7ae0 \u5305\u542b\u591a\u4e2a\u6bb5\u7684\u7a0b\u5e8f &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18,9,8],"tags":[],"class_list":["post-496","post","type-post","status-publish","format-standard","hentry","category-assembly","category-9","category-8"],"_links":{"self":[{"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/8.129.82.128\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=496"}],"version-history":[{"count":1,"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":497,"href":"http:\/\/8.129.82.128\/index.php?rest_route=\/wp\/v2\/posts\/496\/revisions\/497"}],"wp:attachment":[{"href":"http:\/\/8.129.82.128\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/8.129.82.128\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/8.129.82.128\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}