马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs: codesg,ds :data,es:table
data segment
db '1975','1976','1977','1978','1979','1980','1981'
db '1982','1983','1984','1985','1986','1987','1988'
db '1989','1990','1991','1992','1993','1994','1995'
;21年的21个字符串,地址(0~53H)
dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417
dd 197514,345980,590827,803530,1183000,1843000,2759000
dd 3753000,4649000,5937000
;21年公司总收入的21个dword,地址(54H~0A7H)
dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635
dw 8226,11542,14430,15275,17800
;21年每年聘请员工,地址(0A8H~0D1H)
data ends
table segment
db 21 dup('year summ ne ?? ') ;21*16 byte
table ends
codesg segment
start: mov ax,data
mov ds,ax
mov ax,table
mov es,ax
mov di,0
mov bx,0
mov si,0
mov bp,0;bp控制table行
mov cx,21
sy: mov ax,[si]
mov es:[bp+di],ax
add si,2
add di,2
mov dx,[si]
mov es:[bp+di],dx
mov di,0
add si,2
add bp,10h
loop sy ;实现年份的内存复制
mov si,0
mov di,5
mov bp,0
mov cx,21
sr: mov ax,[si+54h]
mov es:[bp+di],ax
add si,2
add di,2
mov dx,[si+54h]
mov es:[bp+di],dx
mov di,5
add si,2
add bp,10h
loop sr ;实现收入的内存复制
mov di,0AH
mov bp,0
MOV SI,0
mov cx,21
SL: mov ax,[si+0A8H]
mov es:[bp+di],ax
add si,2
ADD BP,10H
LOOP SL ;实现雇员人数的内存复制
mov bp,0
MOV BX,0
MOV SI,0
mov cx,21
SLL: mov ax,[si+54h]
add si,2
add di,2
mov dx,[si+54h]
mov di,5
add si,2
DIV WORD PTR [BX+0A8H]
ADD BX,2
MOV ES:[BP+0DH],AX
add bp,10h
LOOP SLL ;实现收入的内存复制
mov ax,4c00h
int 21h
codesg ends
end start
|