马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code,ss:stack,ds:data
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'
dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417,197514
dd 345980,590827,803530,118300,184300,275900,375300,464900,593700
dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635,8226
dw 11542,14430,15257,17800
data ends
table segment
db 21 dup('year summ ne ??')
table ends
stack segment
dw 21 dup(0)
stack ends
code segment
start: mov ax,data
mov ds,ax
mov ax,table
mov es,ax
mov si,0
mov di,0
mov ax,stack
mov ss,ax
mov sp,42
mov cx,21
mov ax,0
mov dx,0
s: push cx
mov cx,2
s0:mov al,0[bx][si]
mov ah,1[bx][si]
mov es:0[di],al
mov es:1[di],ah
mov al,84[bx][si]
mov ah,85[bx][si]
mov es:5[di],al
mov es:6[di],ah
push di
push si
push dx
mov dl,2
mov ax,si
div dl
mov si,ax
pop dx
mov di,dx
mov al,168[bx][si]
mov es:10[di],al
pop si
pop di
add si,2
add di,2
add dx,1
loop s0
add di,11
add dx,13
pop cx
loop s
mov si,0
mov ax,table
mov ds,ax
mov dx,0
mov cx,8
s1: mov ax,5[bx][si]
div byte ptr 10[bx][si]
mov dl,al
mov 13[bx][si],dx
add si,15
loop s1
mov ax,0
mov ah,5[bx][si]
mov dl,6[bx][si]
div word ptr 10[bx][si]
mov dx,0
mov dl,ah
mov ax,dx
mov 13[bx][si],ax
add si,15
mov cx,12
s2: mov dx,7[bx][si]
mov ax,5[bx][si]
div word ptr 10[bx][si]
mov 13[bx][si],ax
add si,15
loop s2
mov ax,4c00h
int 21h
code ends
end start
写这个花了3天时间,确实学习了不少东西,一些错误和调试都熟悉不少 |