Code: Select all
idt_entries [0] = IdtEntry::makeEntry(isr0, 0x08, PrivilegeLevel::Ring0);
idt_entries [1] = IdtEntry::makeEntry(isr1, 0x08, PrivilegeLevel::Ring0);
idt_entries [2] = IdtEntry::makeEntry(isr2, 0x08, PrivilegeLevel::Ring0);
// ...
idt_entries[31] = IdtEntry::makeEntry(isr31, 0x08, PrivilegeLevel::Ring0);
idt_entries[32] = IdtEntry::makeEntry(irq0, 0x08, PrivilegeLevel::Ring0);
idt_entries[33] = IdtEntry::makeEntry(irq1, 0x08, PrivilegeLevel::Ring0);
// ...
idt_entries[47] = IdtEntry::makeEntry(irq15, 0x08, PrivilegeLevel::Ring0);
Code: Select all
for(int i = 0; i < num_isrs; i++) {
idt_entries[i] = IdtEntry::makeEntry(irqs[i], 0x08, PrivilegeLevel::Ring0);
}
Code: Select all
isr_handlers: resd 32
irq_handlers: resd 16