Metropoli BBS
VIEWER: sound.asm MODE: TEXT (ASCII)
include qlib.inc

sound proc,f:word
  pushad
  mov bx,f
  mov ax,34ddh
  mov dx,12h
  cmp dx,bx
  jnc s1
  div bx
  mov bx,ax
  in al,61h
  test al,3
  jnz s2
  or al,3
  out 061h,al
  mov al,0B6h
  out 43h,al
s2:
  mov al,bl
  out 42h,al
  mov al,bh
  out 42h,al
s1:
  popad
  xor eax,eax
  ret
sound endp

nosound proc
  in al,61h
  and al,0FCh
  out 61h,al
  xor eax,eax
  ret
nosound endp

end

[ RETURN TO DIRECTORY ]