为了方便,程序中仅举出8年的数据
assume cs:code,ds:data,ss:stack data segment db '1975','1976','1977','1978','1979','1980','1981','1982' dd 16,22,382,1356,2390,8000,16000,24486 dw 3,7,9,13,28,38,130,220 data ends table segment db 8 dup ('year summ ne ?? ') table ends stack segment dw 0,0,0,0,0,0,0,0 stack ends code segment start: mov ax,data mov ds,ax mov ax,table mov es,ax mov bx,0 mov si,0 mov cx,8 s0: push cx mov cx,2 s1: mov ax,ds:[si] mov es:[bx].0[si],ax mov ax,ds:[si+32] mov es:[bx].5[si],ax add si,2 loop s1 pop cx add bx,12 loop s0 mov bx,0 mov si,0 mov cx,8 s2: mov ax,ds:[64+si] mov es:[bx].10,ax add si,2 add bx,16 loop s2 mov bx,0 mov si,0 mov di,0 mov cx,8 s3: mov ax,ds:[32+si] add si,2 mov dx,ds:[32+si] add si,2 div word ptr ds:[64+di] add di,2 mov es:[bx].13,ax add bx,16 loop s3 code ends end start