aboutsummaryrefslogtreecommitdiff
path: root/kernel/isr-as.S
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2015-02-01 16:40:00 -0500
committerFranklin Wei <frankhwei536@gmail.com>2015-02-01 16:40:00 -0500
commit957b031689658c1ff67ea8a8a04640be9bec2d7d (patch)
tree231c46b390d8d242461a0c571b8fbcf671e8c370 /kernel/isr-as.S
parent439d724ce5939cab7a5c858d1829f212e01e0402 (diff)
downloadkappa-957b031689658c1ff67ea8a8a04640be9bec2d7d.zip
kappa-957b031689658c1ff67ea8a8a04640be9bec2d7d.tar.gz
kappa-957b031689658c1ff67ea8a8a04640be9bec2d7d.tar.bz2
kappa-957b031689658c1ff67ea8a8a04640be9bec2d7d.tar.xz
a lot of kernel work
Diffstat (limited to 'kernel/isr-as.S')
-rw-r--r--kernel/isr-as.S213
1 files changed, 213 insertions, 0 deletions
diff --git a/kernel/isr-as.S b/kernel/isr-as.S
new file mode 100644
index 0000000..53e15b4
--- /dev/null
+++ b/kernel/isr-as.S
@@ -0,0 +1,213 @@
+isr_handler:
+ pusha
+ push %ds
+ push %es
+ push %fs
+ push %gs
+ mov $0x10, %ax # Load the Kernel Data Segment descriptor!
+ mov %ax, %ds
+ mov %ax, %es
+ mov %ax, %fs
+ mov %ax, %gs
+ mov %esp, %eax # Push us the stack
+ push %eax
+ mov $isr_handler, %eax
+ call *%eax
+ pop %eax
+ pop %gs
+ pop %fs
+ pop %es
+ pop %ds
+ popa
+ add $8, %esp
+ iret
+
+ # stub ISR's:
+ .global _isr0
+ .global _isr1
+ .global _isr2
+ .global _isr3
+ .global _isr4
+ .global _isr5
+ .global _isr6
+ .global _isr7
+ .global _isr8
+ .global _isr9
+ .global _isr10
+ .global _isr11
+ .global _isr12
+ .global _isr13
+ .global _isr14
+ .global _isr15
+ .global _isr16
+ .global _isr17
+ .global _isr18
+ .global _isr19
+ .global _isr20
+ .global _isr21
+ .global _isr22
+ .global _isr23
+ .global _isr24
+ .global _isr25
+ .global _isr26
+ .global _isr27
+ .global _isr28
+ .global _isr29
+ .global _isr30
+ .global _isr31
+# Interrupts 8, 10, 11, 12, 13, and 14 push error codes onto the stack
+
+_isr0:
+ cli
+ push $0
+ push $0
+ jmp isr_handler
+_isr1:
+ cli
+ push $0
+ push $1
+ jmp isr_handler
+_isr2:
+ cli
+ push $0
+ push $2
+ jmp isr_handler
+_isr3:
+ cli
+ push $0
+ push $3
+ jmp isr_handler
+_isr4:
+ cli
+ push $0
+ push $4
+ jmp isr_handler
+_isr5:
+ cli
+ push $0
+ push $5
+ jmp isr_handler
+_isr6:
+ cli
+ push $0
+ push $6
+ jmp isr_handler
+_isr7:
+ cli
+ push $0
+ push $7
+ jmp isr_handler
+_isr8:
+ cli
+ push $8
+ jmp isr_handler
+_isr9:
+ cli
+ push $0
+ push $9
+ jmp isr_handler
+_isr10:
+ cli
+ push $10
+ jmp isr_handler
+_isr11:
+ cli
+ push $11
+ jmp isr_handler
+_isr12:
+ cli
+ push $12
+ jmp isr_handler
+_isr13:
+ cli
+ push $13
+ jmp isr_handler
+_isr14:
+ cli
+ push $14
+ jmp isr_handler
+_isr15:
+ cli
+ push $0
+ push $15
+ jmp isr_handler
+_isr16:
+ cli
+ push $0
+ push $16
+ jmp isr_handler
+_isr17:
+ cli
+ push $0
+ push $17
+ jmp isr_handler
+_isr18:
+ cli
+ push $0
+ push $18
+ jmp isr_handler
+_isr19:
+ cli
+ push $0
+ push $19
+ jmp isr_handler
+_isr20:
+ cli
+ push $0
+ push $20
+ jmp isr_handler
+_isr21:
+ cli
+ push $0
+ push $21
+ jmp isr_handler
+_isr22:
+ cli
+ push $0
+ push $22
+ jmp isr_handler
+_isr23:
+ cli
+ push $0
+ push $23
+ jmp isr_handler
+_isr24:
+ cli
+ push $0
+ push $24
+ jmp isr_handler
+_isr25:
+ cli
+ push $0
+ push $25
+ jmp isr_handler
+_isr26:
+ cli
+ push $0
+ push $26
+ jmp isr_handler
+_isr27:
+ cli
+ push $0
+ push $27
+ jmp isr_handler
+_isr28:
+ cli
+ push $0
+ push $28
+ jmp isr_handler
+_isr29:
+ cli
+ push $0
+ push $29
+ jmp isr_handler
+_isr30:
+ cli
+ push $0
+ push $30
+ jmp isr_handler
+_isr31:
+ cli
+ push $0
+ push $31
+ jmp isr_handler