From 8d5d5b8fcca8c9fad89f64f41a3d36c62453dba4 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sat, 18 Aug 2018 16:49:00 +0200 Subject: mouse up and running again --- asm/asm.h | 1 + asm/int_mouse_handler.asm | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 asm/int_mouse_handler.asm (limited to 'asm') 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 -- cgit v1.2.3