Page 1 of 1
Setting up IDT?
Posted: Thu Jan 29, 2004 12:00 am
by St8ic
I need to define a couple interrupts for my OS, but I don't know where to start on making an IDT. Can anyone help with some basics? It just needs to be small and simple.
Thanks.
RE:Setting up IDT?
Posted: Fri Jan 30, 2004 12:00 am
by EyeScream
1. Allocate a memory area for the IDT. The size is 8 * IDTEntryCount.
2. Fill the area with descriptors. They must follow the IDT format (read the Intel docs).
3. Disable interrupts (CLI), lock the bus (LOCK) and load the IDTR with LIDT [YourTable]. Enable interrupts and pray.
And NEVER overwrite the table once it's loaded. You'll get bad results. You might also want to re-program PIC. There are lots of info on this subject, so... go on and read!
Mike.
RE:Setting up IDT?
Posted: Sat Jan 31, 2004 12:00 am
by St8ic
thanks! I found some additional material and I finaly figured it out....I almost can;t believe it works!