User:Johnburger/Demo/Exec/Alloc/IDT
From OSDev Wiki
< User:Johnburger | Demo
This module provides a function which modifies an Entry in the Interrupt Descriptor Table.
Note that the IDT should only ever hold System Descriptors - Memory Descriptors in the IDT don't make any sense!
Demo/Exec/Alloc/IDT.inc
; ; Exec/Alloc/IDT.inc ; ; This module provides functions to modify the IDT. ;------------------------------------------------------------------------------- ; This function modifies an IDT entry. ; Input: EBX = IDT Descriptor entry ; CX:EAX = Selector : Offset of handler ; DL = Descriptor Type ; Output: ES, EAX, EDI modified Exec.Alloc.IDT: MOV DI,Selector(Exec.LDT.IDT, LDT, RPL0) MOV ES,DI ; Point to IDT with ES CALL Exec.Alloc.DT.Sys RET