diff options
Diffstat (limited to 'src/core/int.S')
| -rw-r--r-- | src/core/int.S | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/int.S b/src/core/int.S new file mode 100644 index 0000000..d5ad643 --- /dev/null +++ b/src/core/int.S @@ -0,0 +1,33 @@ +.extern printk + +.macro call_printk msg + mov \msg, %rdi + mov $0, %eax # Required for variadic functions + call printk +.endm + +.globl INT_DEFAULT +INT_DEFAULT: + iretq + +.globl INT_0 +INT_0: + call_printk $MSG_INT_0 + INT_0_INFINITE: + jmp INT_0_INFINITE + iretq + +.globl INT_14 +INT_14: + call_printk $MSG_INT_14 + mov $0, %eax + call printk + INT_14_INFINITE: + jmp INT_14_INFINITE + iretq + + +MSG_INT_0: +.asciz "Zero Division error!" +MSG_INT_14: +.asciz "Page fault!" |
