Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
pedrodemargomes wrote:I am trying to set rtc interruptions, but it is not working(triple fault).
In that case it's probably a problem with your GDT, IDT or stack (and not a problem with any of the code you posted). You should be able to get some information about what caused the triple fault from an emulator's logs (e.g. if the first exception was a general protection fault or page fault, etc).
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
pedrodemargomes wrote:I am trying to set rtc interruptions, but it is not working(triple fault).
In that case it's probably a problem with your GDT, IDT or stack (and not a problem with any of the code you posted). You should be able to get some information about what caused the triple fault from an emulator's logs (e.g. if the first exception was a general protection fault or page fault, etc).
Where in your code do you set up the IDT entry for your RTC Interrupt handler? I see you set up an entry for the keyboard at IDT[0x21] to handle IRQ1. To handle IRQ8 (RTC) you would need an IDT entry at IDT[0x28] with the way you set up the PICs and then point it at your rtc_handler function.