Звук через PC Speaker
Автор: Nomadic
procedure TForm1.mybeep(Tone: Word; Delay: Integer);
begin
asm
mov al, 0b6H
out 43H, al
mov ax,Tone
out 42h,al
ror ax,8
out 42h,al
in al, 61H
or al, 03H
out 61H, al
end;
sleep(Delay);
asm
in al, 61H
and al, 0fcH
out 61H, al
end;
end;
|
|