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.
Setting up IDT?
-
EyeScream
RE:Setting up IDT?
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.
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.
-
St8ic
RE:Setting up IDT?
thanks! I found some additional material and I finaly figured it out....I almost can;t believe it works!