RE:Necesito la interrupcion del speker
Hola!
Puedes utilizar las rutinas del altavoz interno
de freelib30.(ver anexo)
Para apoyarte puedes buscar información sobre:
-Timer 8253
-PIO 8255
(*Anexo:rutinas de freelib30*)
---------------------------------
Ideal
Public sound,nosound
Model Tiny
P186
CodeSeg
;****************** sound() -- Turn on speaker at specific frequency
;void sound(int freq);
freq equ bp+4
Proc sound
push bp ;Set up stack frame
mov bp,sp
pusha ;Save registers
mov dx,12h ;BX = 1193180 / freq.
mov ax,34DCh
mov bx,[freq]
div bx
xchg bx,ax
mov al,0B6h ;Set frequency
out 43h,al
mov al,bl
out 42h,al
mov al,bh
out 42h,al
in al,61h ;Turn on speaker
or al,3
out 61h,al
popa ;Restore registers
pop bp ;Delete stack frame
ret 2 ;Return
EndP sound
;****************** nosound() -- Turn off speaker
;void nosound(void);
Proc nosound
push ax ;Save AX
in al,61h ;Turn off speaker
and al,0FCh
out 61h,al
pop ax ;Res