如何用鼠标移动光标? [英] How to move cursor with mouse?

查看:189
本文介绍了如何用鼠标移动光标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在x86汇编中开发实模式操作系统.我设法用键盘移动了光标,但是我想用鼠标移动了光标.我不知道我发现int 33h可以处理鼠标,但是我似乎无法使用int 33h来移动光标.

I am developing a realmode operating system in x86 assembly. I managed to move cursor with keyboard, but I want to move the cursor with mouse. I don't know how. I found int 33h deals with the mouse, but I can't seem to move the cursor using int 33h.

推荐答案

中断int 10hint 1Fh是BIOS中断.可以在引导操作系统之前使用它们.

Interrupts int 10h to int 1Fh are BIOS interrupts; they can be used before the OS is booted.

中断int 20hint 2Fh是DOS中断;只有在已加载DOS的情况下才能使用它们.

Interrupts int 20h to int 2Fh are DOS interrupts; they can only be used when DOS has already been loaded.

其他中断(例如int 33h)是设备驱动程序使用的中断; int 33h仅在加载DOS鼠标驱动程序时才能使用.

Other interrupts (e.g. int 33h) are interrupts used by device drivers; int 33h can only be used when a DOS mouse driver is loaded.

如果要在未安装鼠标驱动程序的情况下访问鼠标(例如,在您自己的引导加载程序中),则必须直接访问硬件.

When you want to access the mouse when there is no mouse driver installed (e.g. in your own boot loader), you'll directly have to access the hardware.

请参阅OSDEV中的以下文章:

See the following articles in OSDEV:

https://wiki.osdev.org/%228042%22_PS/2_Controller
https://wiki.osdev.org/PS/2_Mouse

这篇关于如何用鼠标移动光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆