How to move cursor with mouse?

流过昼夜 提交于 2019-12-13 07:51:10

问题


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.


回答1:


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

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

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.

See the following articles in OSDEV:

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



来源:https://stackoverflow.com/questions/54042732/how-to-move-cursor-with-mouse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!