Smaller ISR/IRQ Registration in the IDT
-
- Member
- Posts: 190
- Joined: Tue Sep 26, 2006 1:40 pm
- Libera.chat IRC: Nokurn
- Location: Ontario, CA, USA
- Contact:
Smaller ISR/IRQ Registration in the IDT
Would it be possible to cut down on the number of idt_set_gate lines from Bran's tutorial? For example, instead of passing (unsigned)isr30, you would pass (unsigned)((isr1 - isr0) * idx)? Is it possible?
-
- Member
- Posts: 190
- Joined: Tue Sep 26, 2006 1:40 pm
- Libera.chat IRC: Nokurn
- Location: Ontario, CA, USA
- Contact:
My new kernel is in C++, and, well, here's a snippet from my code, it's self explanatory:
Code: Select all
// error: ISO C++ forbids using pointer to a function in subtraction
// Workaround for C++?
//for(int idx = 0; idx <= INTERRUPT_CNT; idx++) {
// IDT.SetGate(idx, (unsigned)((Interrupt1 - Interrupt0) * idx), 0x08,
// 0x8E);
//}