From 4f13a235e01c359fcb5d68e7dcdf8b18861216cd Mon Sep 17 00:00:00 2001 From: pi97tejy3 Date: Sat, 2 Jul 2022 09:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BC=A0=E6=A0=87=E4=B8=AD=E6=96=AD=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mouse.s | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 mouse.s diff --git a/mouse.s b/mouse.s new file mode 100644 index 0000000..7e10b5d --- /dev/null +++ b/mouse.s @@ -0,0 +1,65 @@ +# 1 "mouse.S" +# 1 "" +# 1 "" +# 1 "mouse.S" +# 1 "mouse.S" +# 1 "" +# 1 "" +# 1 "mouse.S" + +# 1 "../../include/linux/config.h" 1 + + + + + + + + + + + + + + + + + + + + + +# 36 "../../include/linux/config.h" + +# 47 "../../include/linux/config.h" + +# 2 "mouse.S" 2 +.globl mouse_interrupt +mouse_interrupt: + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + push %ds + + movl $0x10,%eax + mov %ax,%ds + + //读入鼠标数据 + xor %eax,%eax + inb $0x60,%al + pushl %eax + call readmouse + addl $4,%esp + + //发送EOI + movb $0x20,%al + outb %al,$0xA0 + outb %al,$0x20 + + pop %ds + popl %edx + popl %ecx + popl %ebx + popl %eax + iret