The code I found uses the RTC IRQ, which is 8, or 40, after remapping.
Anyways, I set a handler for it using setvect, and it simply won't fire.
I've read somewhere that I might be required to unmask the IRQ, or something,
but I couldn't find such code doing that for the keyboard or floppy to use as a reference.
I have the code waiting for the IRQ to fire, so my OS hangs right there.
Here's the code that sets up the IRQ, I pass it 40 as IRQ, which should work, based on the tut's IRQ mappings.
Code: Select all
void rtc_install(int irq)
{
unsigned char status;
write_register(0x0A, read_register(0x0A) | 0x0F); // important line here
status = read_register(0x0B);
status |= 0x02; // 24 hour clock
status |= 0x10; // update ended interrupts
status &= ~0x20; // no alarm interrupts
status &= ~0x40; // no periodic interrupt
bcd = !(status & 0x04); // check if data type is BCD
write_register(0x0B, status);
read_register(0x0C);
setvect(irq, rtc_handler);
while(!Interrupt); // pause till interrupt
}