Using the Mouse without using INT 33h->
I am trying to get information on the button status
and movement of the mouse without using INT 33h
by reading directly from the port the mouse is connected to.
According to a document "Programming the Microsoft Mouse"
at http://wotsit.org you could write a custom mouse driver
by doing this for example.
According to that same document the bytes you should
get when reading from the I/O port are formatted like this:
When the mouse is moved, three bytes containing the button status,
and the x and y decrement/increment are sent through the I/O port to
which the mouse is connected.
These bytes are formatted as follows (numbers are decimal):
Code:
Byte 1:
bit nr.: contains:
1 Not used.
2 1 (Indicates this is the first of three bytes of data.)
3 Left button status (0 = not pressed, 1 = pressed.)
4 Right button status (0 = not pressed, 1 = pressed.)
5 First bit of X decrement/increment.
6 Second bit of X decrement/increment.
7 First bit of Y decrement/increment.
8 Second bit of Y decrement/increment.
Byte 2:
bit nr.: contains:
1 Not used.
2 0
3-8 Bits 3-8 for X decrement/increment.
Byte 3:
bit nr.: contains:
1 Not used.
2 0
3-8 Bits 3-8 for Y decrement/increment.
Any way the problem is that I am getting no data at
all from the mouse. I have tried reading from several
ports using Debug and Quick Basic. Working in DOS mode,
using another mouse or disabling any mouse drivers
does not work either.
So my question is: what should I do
(send a byte before reading for example.)/What could be wrong?