Friday, 16 August 2013

A 1ms-timer scheduler with Beep

A 1ms-timer scheduler with Beep

I am developing a Forth-OS based on the Brokenthorn OS-tutorials:
https://sites.google.com/site/forthoperatingsystem/ and I'd like to add
beep (speaker) and as far as I know the only way is to use the PIT. For
example in Mike-OS they write to 0x42 and 0x43 (both are PIT) in order to
set up frequency then they turn the speaker on and off by using port 0x61.
However I have a 1-ms timer(PIT) interrupt which calls the scheduler
function. I tested beep with Bochs, QEMU and on a real hardware but they
never beeped. My questions are: is it possible to use both the PIT-irq and
beep at the same time or setting beep will ruin the PIT-irq? If it's
possible, how?
Regards, Rob

No comments:

Post a Comment