Also... I found the realmode way to do it with int 21h... I need a way that works without BIOS interrupts..
Thanks in advance.

The system speaker is connected to the PIT. Try searching the internet for ways to reprogram the PIT and to which port it's connected (don't have any books handy right now).Guest wrote: Is there a way to make the computer beep without writing a fully fledged sound driver (like write to some port or something) ? Help is appreciated...
Also... I found the realmode way to do it with int 21h... I need a way that works without BIOS interrupts..
Thanks in advance.![]()
Code: Select all
;----------------------------------;
; PC-speaker; beep ;
;----------------------------------;
beep:
push eax
in al, 0x61 ; turn the speaker on.
or al, 3
out 0x61, al
;; delay for 150ms or something here...
in al, 0x61
and al, 0xFC ; some do 0xFD, some 0xFC... :/
out 0x61, al
pop ecx
ret