bits 32 ; !!! IRQ !!! global Irq_0 global Irq_1 global Irq_2 global Irq_3 global Irq_4 global Irq_5 global Irq_6 global Irq_7 global Irq_8 global Irq_9 global Irq_10 global Irq_11 global Irq_12 global Irq_13 global Irq_14 global Irq_15 ; 32: IRQ0 Irq_0: cli push dword 0 push dword 32; Note that these don't push an error code on the stack: ; We need to push a dummy error code jmp irq_common_stub ; 33: IRQ1 Irq_1: cli push dword 0 push dword 33 jmp irq_common_stub ; 34: IRQ2 Irq_2: cli push dword 0 push dword 34 jmp irq_common_stub ; 35: IRQ3 Irq_3: cli push dword 0 push dword 35 jmp irq_common_stub ; 36: IRQ4 Irq_4: cli push dword 0 push dword 36 jmp irq_common_stub ; 37: IRQ5 Irq_5: cli push dword 0 push dword 37 jmp irq_common_stub ; 38: IRQ6 Irq_6: cli push dword 0 push dword 38 jmp irq_common_stub ; 39: IRQ7 Irq_7: cli push dword 0 push dword 39 jmp irq_common_stub ; 40: IRQ8 Irq_8: cli push dword 0 push dword 40 jmp irq_common_stub ; 41: IRQ9 Irq_9: cli push dword 0 push dword 41 jmp irq_common_stub ; 42: IRQ10 Irq_10: cli push dword 0 push dword 42 jmp irq_common_stub ; 43: IRQ11 Irq_11: cli push dword 0 push dword 43 jmp irq_common_stub ; 44: IRQ12 Irq_12: cli push dword 0 push dword 44 jmp irq_common_stub ; 45: IRQ13 Irq_13: cli push dword 0 push dword 45 jmp irq_common_stub ; 46: IRQ14 Irq_14: cli push dword 0 push dword 46 jmp irq_common_stub ; 47: IRQ15 Irq_15: cli push dword 0 push dword 47 jmp irq_common_stub extern IrqHandler ; This is a stub that we have created for IRQ based ISRs. This calls ; 'Irq__handler' in our C code. We need to create this in an 'irq.c' irq_common_stub: pusha push ds push es push fs push gs mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov eax, esp push eax mov eax, IrqHandler call eax pop eax pop gs pop fs pop es pop ds popa add esp, 8 iret