|
-
Aug 17th, 2003, 10:51 AM
#1
Thread Starter
Frenzied Member
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?
-
Aug 23rd, 2003, 11:00 PM
#2
Fanatic Member
Did you use INT 33h, function 00h to initialize the mouse?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Aug 24th, 2003, 03:21 AM
#3
Thread Starter
Frenzied Member
I tried your suggestion, it doesn't work.
Besides using int 33h is what I am trying to avoid.
This code is used to do get the 3 bytes from
the mouse by reading directly from the I/O ports
WITHOUT using interrupt 33h.
The code by the way is Q(uick )Basic code.
Code:
DEFINT A-Z
CLS
DO
LOCATE 1
FOR x = 0 TO 2
PRINT USING "###"; INP(&H3F8)
NEXT x
LOOP
I have tried the I/O ports 2E8h, 2F8h and 3E8h as well.
None worked.
-
Aug 25th, 2003, 10:19 AM
#4
Fanatic Member
Your link is not working. Could you give me a different site?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Aug 26th, 2003, 02:37 AM
#5
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|