23. November 2024, 04:52
[global _isr_0][extern _interrupt_0]_isr_0: pusha push ds push es push fs push gs call _interrupt_0 pop gs pop fs pop es pop ds popa iret
extern isr0isr_0:pushapush dspush espush fspush gscall isr0pop gspop fspop espop dspopairet
unsigned short int selector = 0x08; asm volatile ("movw %%cs, %0 " : "=g" (selector)); IDT[_number].l_offset = (offset & 0xFFFF); //Lowword of offset IDT[_number].h_offset = (offset >> 16); //highword of offset
__attribute__ ((packed))
IDTR.limit = (256*sizeof(interrupt))-1; IDTR.base = IDT; idtr *IDTRptr = &IDTR;