Solved

Mouse driver

Posted on 1998-10-11
11
207 Views
Last Modified: 2010-04-15
I need to write a mouse driver for hi resolution in real mode .It's meens no Interapts .
Thanks and answer in C,C++,Pascal,Asmbler will do
By.
0
Comment
Question by:samcurr
11 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1253464
"It's meens no Interapts" ...  what does that mean? No BIOS mouse interrupts?
If not, you'd need to read directly from RS-232. I can explain, if you want this.
Otherwise, if you'd like a list of int 33 handlers which do the hi res mouse position reading
for you, i have a book which lists them. I could post you the ones you need, if you tell
which operations you need.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1253465
Just out of curiousity, why can't you use interupts (providing that is what you mean by "Interapts")?
0
 

Author Comment

by:samcurr
ID: 1253466
I already tried  interrupts they doesn't work with the graphic library I use .
RS-232 that’s the thing I need (I think).

0
 
LVL 6

Expert Comment

by:snoegler
ID: 1253467
I have done this some time ago, and i can't find the sources for my code again :(
But i remember how it was done:
All microsoft compatible mouses use the communication params 9600,n,8,1. You can ignore
the handshaking signals, i think. The you will always receive 3 byte pairs of information.
The first one contains information about the status of the mouse buttons, the second
(third) contains the delta value in x(y) direction.
Of course, all features like mouse acceleration and bounds checking you'd need to code
yourself. Also if you don't want to poll the mouse events, you'd need to write a IRQ 4 handler
for COM1(or IRQ3 for COM2).
I will search again for my old source code, maybe i'll find it.

Can you explain why the interrupts don't work? They would save you a good piece of time :)
0
 

Author Comment

by:samcurr
ID: 1253468
interrupts do work but only in part the mouse pointer is not displayed on the screen I don’t won’t to write a program which will constantly check thought the interrupts for mouse position.


0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:samcurr
ID: 1253469
interrupts do work but only in part the mouse pointer is not displayed on the screen I don’t won’t to write a program which will constantly check thought the interrupts for mouse position.
I will really if you find a source code I not very good in hardware.

0
 
LVL 6

Expert Comment

by:snoegler
ID: 1253470
You don't need to check the mouse position constantly using the mouse interrupts.
The mouse interrupt handlers support a user defined callback function which is called
everytime the mouse moves. But it is very much to post here ...
I would suggest that you buy yourself a book about system interrupts (perhaps an older
book) - shouldn't cost much money.
If you like me to explain, i will try, but i think you'll be better off having a book.
In short, you need to define an own interrupt handler which is called by the mouse support.
I would say that it's less effort to implement this instead of writing a mouse driver by yourself
But if you like, i'll post you the details - either on mouse interrupts or on mouse serial input.
0
 

Author Comment

by:samcurr
ID: 1253471
Thanks I will try to find a book but first if don't mind send to me anything you can on the
subject THe E.M.: b_samon@hotmail.com
Thanks , and if I still don't get it I will by a book .(by the way which book will you Suggest on programing hardware in general)
0
 
LVL 1

Accepted Solution

by:
cph earned 100 total points
ID: 1253472
Have a look at ctmousexx.zip where xx is the version (I think 1.5 is the latest)
It is part of the FreeDos Project on the web. the site is www.FreeDos.org
0
 

Author Comment

by:samcurr
ID: 1253473
to cph there exactly i looked for two hours sweept the
feedos up down & still didn't found it !!!!
0
 
LVL 1

Expert Comment

by:sergelebel
ID: 1253474
in case your still looking!  I have some good assembler code for mouse support fot text base & graphics mode...I would suspect you want interrupt driven mouse control since attempting to control it trough the port is a huge task..especially if your not to good in hardware... you can reach me at  <Assemblr@hotmail.com>
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now