unit UPCSpeaker; interface procedure Sound(Frequency: word); procedure NoSound; implementation procedure Sound; assembler; asm mov al, 0b6H out 43H, al mov ax, Frequency out 42h,al ror ax,8 out 42h,al in al, 61H or al, 03H out 61H, al end; procedure NoSound; assembler; asm in al, 61H and al, 0fcH out 61H, al end; end.