summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/asm.h1
-rw-r--r--asm/int_mouse_handler.asm19
2 files changed, 20 insertions, 0 deletions
diff --git a/asm/asm.h b/asm/asm.h
index 58c3f62..cc1d99d 100644
--- a/asm/asm.h
+++ b/asm/asm.h
@@ -1,5 +1,6 @@
void pic_setup();
void int_kb_handler();
+void int_mouse_handler();
void int_default_handler();
void int_clock_handler();
void int_syscall_handler();
diff --git a/asm/int_mouse_handler.asm b/asm/int_mouse_handler.asm
new file mode 100644
index 0000000..4e4882b
--- /dev/null
+++ b/asm/int_mouse_handler.asm
@@ -0,0 +1,19 @@
+global int_mouse_handler
+[extern mouse_handler]
+
+[bits 32]
+int_mouse_handler:
+
+ cli
+ pusha
+
+ call mouse_handler
+
+ mov al, 0x20 ;Port number AND command number to Acknowledge IRQ
+ out 0xa0, al ; came from slave
+ out 0x20, al ;Acknowledge IRQ, so we keep getting interrupts
+
+ popa
+ sti
+
+ iret ;Interrupt-Return