Mail Archives: djgpp/1998/01/05/22:02:42
From: | Jeff Weeks <pweeks AT execulink DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Writting a mouse driver... looking for help (this isn't a FAQ)
|
Date: | Mon, 05 Jan 1998 20:39:37 -0500
|
Organization: | Code X Software
|
Lines: | 46
|
Message-ID: | <34B18B58.B961BDB3@execulink.com>
|
NNTP-Posting-Host: | ppp24.a11.execulink.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Okay, so I'm porting my Linux GUI (a windowing system I wrote) to
DOS (don't see that everyday... Linux to Dos, not the other way
around... anyway... ;) Everything worked fine. I was quite pleased to
have gotten a Vesa 2 driver written and ported the whole thing is less
than an hour. HOWEVER, I still don't have a mouse driver.
What I'm wondering, though, is what my best (ie: fastest, and/or
easiest) method would be. I have a fair bit of mouse programming docs
around here and I seem to remember that the mouse can be accessed from
port 3F8. Can anybody confirm that? If so, can I read from ports
without switching to real mode (never did figure that out... my guess is
yes, but I need confirmation).
Now, the function I have is simply int get_pointer(int *x, int *y) (it
returns the button status). My guess is that I can just have this
function read from the above port and return what information it finds.
I don't even need to mess around in interrupts do I? Personally, I'd
rather leave interrupts out of this. Does anybody see any problems with
that? get_pointer is polled fairly often, so it acts almost like an
interrupt anyway.
So, basically in the process of writting this message I've carved out a
simple solution, but it's based on stuff that I need confirmation on.
If any body can confirm, please do. If anybody spots some gaping holes
in my solution, please speak up.
Lastly, it would be appreciated if a quick reply is possible. Quite
frankly, this is an ISP that's due rather soon ;) It's finished under
Linux, but I need to port to DOS to give it to my teacher.
Thanks in advance,
Jeff
PS: Please respond via email when possible. I can't afford to miss this
stuff.
--------------------------------------------
- Code X Software -
Programming to a Higher Power
email: mailto:pweeks AT execulink DOT com
web: http://www.execulink.com/~pweeks/
--------------------------------------------
- Raw text -