课程设计1
assume cs:c,ds:d,es:td segment
db '1975','1976','1977','1978','1979','1980','1981','1982','1983','1984','1985'
db '1986','1987','1988','1989','1990','1991','1992','1993','1994','1995'
dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417,197514,345980,590827
dd 803530,1183000,1843000,2759000,3753000,4649000,5937000
dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635,8226,11542,14430
dw 15257,17800
d ends
t segment
db 22 dup ('year summ ne ?? ')
t ends
c segment
s:mov ax,d
mov ds,ax
mov ax,t
mov es,ax
mov bx,0
mov bx,00h
mov cx,21d
s1:push cx
mov cx,4
mov di,0
s10:mov ax,0
mov al,
mov es:,al
inc di
inc si
loop s10
s11:mov ax,
mov es:,ax
mov ax,
mov es:,ax
s12:mov ax,es:
mov dx,es:
mov cx,ds:
mov es:,cx
div cx
mov es:,ax
add bp,2h
add bx,10h
pop cx
loop s1
mov cx,15h
mov bp,0
mov bl,2
mov bh,3
cylc:push cx
push bx
show_str:mov cx,0
mov dh,bl
mov dl,bh
mov cl,2
mov ax,0b800h
mov ds,ax
mov ax,0
mov al,0a0h
mul dh
mov di,ax
mov al,2h
mul dl
sub ax,2h
add di,ax
mov dl,cl
mov bx,0
mov si,0
mov cx,4
dtoc1:mov al,es:[ bp+si]
mov ah,0
mov ,al
mov ,dl
inc bx
inc bx
inc si
loop dtoc1
jmp near ptr data2
dtoc2:mov bx,20h
mov si,0
mov dl,2h
o:mov cl,es:
mov ch,0
mov ,cl
mov ,dl
add bx,2
inc si
inc cx
loop o
jmp near ptr data3
dtoc3:mov bx,50h
mov si,0
mov dl,2h
o1:mov cl,es:
mov ch,0
mov ,cl
mov ,dl
add bx,2
inc si
inc cx
loop o1
jmp near ptr data4
dtoc4:mov bx,80h
mov si,0
mov dl,2h
o2:mov cl,es:
mov ch,0
mov ,cl
mov ,dl
add bx,2
inc si
inc cx
loop o2
jmp near ptr b
data2:mov bx,0
mov ax,es:
mov dx,es:
mov cx,0ah
call divdw2
jmp near ptr dtoc2
data3:mov bx,0
mov ax,es:
mov dx,0
mov cx,0ah
call divdw3
jmp near ptr dtoc3
data4:mov bx,0
mov ax,es:
mov dx,0
mov cx,0ah
call divdw4
jmp near ptr dtoc4
divdw2:mov cx,0ah
push ax
mov ax,dx
mov dx,0
div cx
mov si,ax
pop ax
div cx
mov cx,dx
mov dx,si
add cx,30h
push cx
inc bx
mov cx,ax
inc cx
loop divdw2
mov cx,bx
mov bx,0
a:pop ax
mov es:,al
inc bx
loop a
mov ax,0
mov es:,ax
ret
divdw3:mov cx,0ah
push ax
mov ax,dx
mov dx,0
div cx
mov si,ax
pop ax
div cx
mov cx,dx
mov dx,si
add cx,30h
push cx
inc bx
mov cx,ax
inc cx
loop divdw3
mov cx,bx
mov bx,0
a0:pop ax
mov es:,al
inc bx
loop a0
mov ax,0
mov es:,ax
ret
divdw4:mov cx,0ah
push ax
mov ax,dx
mov dx,0
div cx
mov si,ax
pop ax
div cx
mov cx,dx
mov dx,si
add cx,30h
push cx
inc bx
mov cx,ax
inc cx
loop divdw4
mov cx,bx
mov bx,0
a1:pop ax
mov es:,al
inc bx
loop a1
mov ax,0
mov es:,ax
ret
b:add bp,10h
pop bx
inc bl
pop cx
dec cx
jcxz e
jmp near ptr cylc
e:mov ax,4c00h
int 21h
c ends
end s 哇!!! 厉害 厉害啊,我当时做不来,都是直接看的答案
页:
[1]