assume cs:codesg
data segment
db '1975','1976','1977','1978','1979','1980','1981','1982','1983'
db '1984','1985','1986','1987','1988','1989','1990','1991','1992'
db '1993','1994','1995'
;以上是表示21年的21个字符串
dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417,197514
dd 345980,590827,803530,1183000,1843000,2759000,3753000,4649000,5937000
;以上是表示21年公司总收入的21个dword数据
dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5636,8226
dw 11542,14430,15257,17800
;以上是表示21年公司雇员人数的21个word型数据
data ends
table segment
db 21 dup('year summ ne ?? ')
table ends
codesg segment
start:mov ax,data ;将data看成原代码段
mov ds,ax
mov ax,table ;将table看成目标代码段
mov es,ax
mov cx,21 ;雇员数的代码
mov di,0
mov si,0
s3:mov dx,ds:[si+168]
mov es:[di+10],dx
add si,2
add di,10H
loop s3
mov bx,0 ;年份和总收入的代码
mov si,0
mov di,0
mov cx,21
s1:mov ax,cx
mov cx,4
s2:mov dl,ds:[si+bx]
mov es:[di+bx],dl
mov dl,ds:[si+bx+84]
mov es:[di+bx+5],dl
inc bx
loop s2
add si,4
mov bx,0
add di,10H
mov cx,ax
loop s1
mov si,0 ;前8个人均收入的算法
mov bx,0
mov di,0
mov cx,8
s6:mov ax,ds:[si+84]
div byte ptr ds:[bx+168]
mov ah,0
mov es:[di+13],ax
add si,4
add bx,2
add di,10H
loop s6
mov bx,0 ;后13个人均收入算法
mov di,80H
mov cx,13
mov si,0
s5:mov ax,ds:[si+116]
mov dx,ds:[si+116+2]
div word ptr ds:[bx+184]
mov es:[di+13],ax
add di,10H
add bx,2
add si,4
loop s5
mov ax,4c00H
int 21H
codesg ends
end start
这是我当初学汇编时候的程序,希望对你有帮助