Page 1 of 1

IDT

Posted: Wed Mar 26, 2003 1:52 pm
by slacker
would this be a valid IDT descriptor?
assume the ISR for int 0 is located at 0x200000 linear

start_idt:
;int 0
dw 0x0020 ;offset 31-16
dw 0x8e00 ;settings 16-0
dw CODEsel ;code selctor 31-16
dw 0x0000 ;offset 15-0

Re:IDT

Posted: Wed Mar 26, 2003 3:45 pm
by Therx
I think you have got the settings and code selector the wrong way round but other than that it should work if the ISR was located at 2mb

Re:IDT

Posted: Wed Mar 26, 2003 4:04 pm
by slacker
on the site
....http://osdev.neopages.net/tutorials/interrupts.3.php
it is backwords fropm what i have but i dont understand why because the data is read from bit 31 to bit 0..right?

Re:IDT

Posted: Wed Mar 26, 2003 4:18 pm
by Ozguxxx
Hi, I sometimes do confuse these order but If you take a look at 386 programmers reference, interrupt gates are (and all data structures) defined with their low to high order byte sequence I mean at the right of all dwords(ie four bytes) they have put numbers 0,4,8... which gives us the sequence in which they should be placed in memory. I hope this clears some things...

Re:IDT

Posted: Wed Mar 26, 2003 4:28 pm
by slacker
i get it. i get it. thanks