diff --git a/arch/exception.asm b/arch/exception.asm index 7bb3b1e..b014b67 100644 --- a/arch/exception.asm +++ b/arch/exception.asm @@ -2,7 +2,7 @@ %include "interrupt.asm" -[EXTERN exception_handler] +INTERRUPT_COMMON exception_handler, GDT_KERNEL_DS_SELECTOR INTERRUPT_NOERRCODE 0 ; #DE - Divide Error Exception INTERRUPT_NOERRCODE 1 ; #DB - Debug Exception @@ -36,5 +36,3 @@ INTERRUPT_NOERRCODE 28 ; Reserved INTERRUPT_NOERRCODE 29 ; Reserved INTERRUPT_NOERRCODE 30 ; Reserved INTERRUPT_NOERRCODE 31 ; Reserved - -INTERRUPT_COMMON exception_handler, GDT_KERNEL_DS_SELECTOR diff --git a/arch/hwint.asm b/arch/hwint.asm index cdbd130..194fd66 100644 --- a/arch/hwint.asm +++ b/arch/hwint.asm @@ -2,7 +2,7 @@ %include "interrupt.asm" -[EXTERN hwint_handler] +INTERRUPT_COMMON hwint_handler, GDT_KERNEL_DS_SELECTOR INTERRUPT_NOERRCODE 32 ; Programmable Interval Timer INTERRUPT_NOERRCODE 33 ; Keyboard @@ -21,5 +21,3 @@ INTERRUPT_NOERRCODE 44 ; Reserved INTERRUPT_NOERRCODE 45 ; Coprocessor exception INTERRUPT_NOERRCODE 46 ; Hard Drive Controller INTERRUPT_NOERRCODE 47 ; Reserved - -INTERRUPT_COMMON hwint_handler, GDT_KERNEL_DS_SELECTOR diff --git a/arch/interrupt.asm b/arch/interrupt.asm index 6334cb6..502670c 100644 --- a/arch/interrupt.asm +++ b/arch/interrupt.asm @@ -16,6 +16,7 @@ interrupt_%1: %endmacro %macro INTERRUPT_COMMON 2 +[EXTERN %1] interrupt_common: pusha ; Pushes edi,esi,ebp,esp,ebx,edx,ecx,eax diff --git a/arch/syscall.asm b/arch/syscall.asm index e4b591a..8e6ec0a 100644 --- a/arch/syscall.asm +++ b/arch/syscall.asm @@ -2,8 +2,6 @@ %include "interrupt.asm" -[EXTERN syscall_handler] +INTERRUPT_COMMON syscall_handler, GDT_KERNEL_DS_SELECTOR INTERRUPT_NOERRCODE INT_SYSCALL - -INTERRUPT_COMMON syscall_handler, GDT_KERNEL_DS_SELECTOR