ints.asm (1037B)
1 bits 32 2 3 extern excp_handler 4 5 %macro isr_no_err_stub 1 6 global isr_stub_%1 7 isr_stub_%1: 8 push dword 0 9 push dword %1 10 jmp isr_common_stub 11 %endmacro 12 13 %macro isr_err_stub 1 14 global isr_stub_%1 15 isr_stub_%1: 16 push dword %1 17 jmp isr_common_stub 18 %endmacro 19 20 section .text 21 22 isr_common_stub: 23 pusha 24 25 mov ax, ds 26 push eax 27 28 mov ax, 0x10 29 mov ds, ax 30 mov es, ax 31 32 call excp_handler 33 34 pop eax 35 mov ds, ax 36 mov es, ax 37 38 ; heh, popa 39 popa 40 add esp, 8 41 iret 42 43 isr_no_err_stub 0 44 isr_no_err_stub 1 45 isr_no_err_stub 2 46 isr_no_err_stub 3 47 isr_no_err_stub 4 48 isr_no_err_stub 5 49 isr_no_err_stub 6 50 isr_no_err_stub 7 51 isr_err_stub 8 52 isr_no_err_stub 9 53 isr_err_stub 10 54 isr_err_stub 11 55 isr_err_stub 12 56 isr_err_stub 13 57 isr_err_stub 14 58 isr_no_err_stub 15 59 isr_no_err_stub 16 60 isr_err_stub 17 61 isr_no_err_stub 18 62 isr_no_err_stub 19 63 isr_no_err_stub 20 64 isr_no_err_stub 21 65 isr_no_err_stub 22 66 isr_no_err_stub 23 67 isr_no_err_stub 24 68 isr_no_err_stub 25 69 isr_no_err_stub 26 70 isr_no_err_stub 27 71 isr_no_err_stub 28 72 isr_no_err_stub 29 73 isr_err_stub 30 74 isr_no_err_stub 31 75