马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code,ds:data,es:table
table 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,1183000,1843000,2759000,75000,4649000,5937000
dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635,8226
dw 11542,14430,15257,17800
dw 5,3,42,104,85,210,123,111,105,125,140,136,153,211,199,209,224,239
dw 260,304,333
table ends
data segment
db 32 dup(0)
data ends
code segment
start: mov ax,data
mov ds,ax
mov ax,table
mov es,ax
sub di,di
sub bp,bp
mov dh,8
mov cx,21
只做了前2個數據,但巳不能顯示了....
s: push cx
mov cl,2
mov ax,es:[di]
mov ds:[0],ax
mov ax,es:[di+2]
mov ds:[2],ax
mov dl,3
call show_str
mov ax,es:[di+84]
mov dx,es:[di+86]
mov si,10h
call dtoc
mov dl,23
call show_str
add bp,2
add di,4
sub si,si
inc dh
pop cx
loop s
mov ax,4c00h
int 21h
dtoc: push ax
push cx
push dx
push si
push di
sub di,di
dtoc0: mov cx,10
call divdw
add cx,30h
push cx
inc di
mov cx,ax
jcxz dtoc1
jmp dtoc0
dtoc1: mov cx,dx
jcxz dtoc2
jmp dtoc0
dtoc2: mov cx,di
dtoc3: pop dx
mov ds:[si],dl
inc si
loop dtoc3
mov ds:[si],al
pop di
pop si
pop dx
pop cx
pop ax
ret
divdw: push bx
push ax
mov ax,dx
sub dx,dx
div cx
mov bx,ax
pop ax
div cx
mov cx,dx
mov dx,bx
pop bx
ret
show_str:
push ax
push bx
push es
push si
mov ax,160
mul dh
mov bx,ax
mov ax,2
mul dl
add bx,ax
mov ax,0b800h
mov es,ax
mov ch,0
mov al,cl
s0: mov cl,[si]
jcxz s1
mov es:[bx],cx
mov es:[bx+1],al
inc si
add bx,2
jmp s0
s1: pop si
pop es
pop bx
pop ax
ret
code ends
end start
|