Page 1 of 1

IDT question

Posted: Sat Aug 09, 2003 11:00 pm
by SystemHalted
Ive been reading tutorials on IDTs IRQs and ISRs now all I need is to know how to put my ISRs into the ITDs. Please Help.

RE:IDT question

Posted: Sun Aug 10, 2003 11:00 pm
by Xenos
You need segment:offset of each ISR to create IDT entries. Each IDT entry is 8 bytes long (it starts, say at my_idt_entry). Put the lower word of the ISR offset to [my_idt_entry], the higher word to [my_idt_entry+6]. The segment goes to [my_idt_entry+2]. The word at [my_idt_entry+4] contains information about what kind of descriptor it is. Put 0x0e00 here for an interrupt gate (IF is cleared automatically on entry, nice for IRQs) or 0x0f00 for a trap gate (IF is not cleared, used for traps like int3 etc.). That's it!

RE:IDT question

Posted: Sun Aug 10, 2003 11:00 pm
by SystemHalted
Great. Thanks