K kmkmwgw Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #1 我需要PC喇叭发音,可beep不发音,API函数的beepmessagebox声音小, 不知道大侠们有办法吗?金山毒霸发现病毒就响一声,真讨厌,可我 想发音却做不到。(注意不是音箱)
H honestman Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #2 messagebeep(0); procedure sound(mhz : integer); {mhz = the frequency of the pc speaker} var count : word; oldport, newport : byte; begin count := 1193280 div mhz; asm mov al,$b6 out $43,al mov ax,count out $42,al mov al,ah out $42,al mov al,3 out $61,al end; end; procedure nosound; {turn off the pc speaker} begin asm mov al,0 out $61,al end; end;
messagebeep(0); procedure sound(mhz : integer); {mhz = the frequency of the pc speaker} var count : word; oldport, newport : byte; begin count := 1193280 div mhz; asm mov al,$b6 out $43,al mov ax,count out $42,al mov al,ah out $42,al mov al,3 out $61,al end; end; procedure nosound; {turn off the pc speaker} begin asm mov al,0 out $61,al end; end;
K kmkmwgw Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #3 Thank you ; 能把汇编和delphi结合真佩服,汇编真有用。