注册 登录
编程论坛 汇编论坛

汇编能引起了声卡无效,为什么?

oscarpp 发布于 2006-04-17 21:37, 1013 次点击

小弟于近日编了一个程序,不料运行后使得集成声卡不能工作,电脑成了哑巴,有高手能帮小弟分析一下哪里出了错,该怎么解决吗?小弟必将对您感恩戴德一万年!!(本程序想用8255实现抢答功能,在数码管上显示抢答者,并发出声音)

附程序:

data segment
ttt dd 500000
table db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov ax,cs
mov ds,ax
mov bx,offset table
mov dx,303h
mov al,0bch
out dx,al
mov dx,offset int_proc
mov ax,250fh
int 21h
cli
mov dx,21h
in al,dx
and al,7fh
out dx,al
sti
ll:jmp ll
int_proc: mov dx,300
in al,dx
mov ch,al
mov al,20h
out 20h,al
test ch,0ffh
jz int_proc
cmp ch,01h
je ll1
ll1: mov dx,201h
mov al,[bx]
out dx,al
mov ah,02h
mov dl,07
int 21h
last: mov dx,200h
mov al,01h
out dx,al
call delay
mov ah,1
int 16h
cmp al,20h
je close
in al,21h
or al,80h
out 21h,al
sti
close:mov dx,200h
mov al,0
out dx,al
call delay
jmp int_proc
delay: mov ah,86h
mov cx,word ptr ttt+2
mov dx,word ptr ttt
int 15h
mov ah,4ch
int 21h
code ends
end start

1 回复
#2
lj_8606032006-04-18 16:07
啊??这个...
怎么会出现这种情况???
1