Solved

Mouse driver

Posted on 1998-10-11
11
208 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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
 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to declare a 2-dimensional version of strlen 4 208
XCode crashes while uploading to app store. 5 262
How to get time_t value that is a week old 6 168
Computer slow / BSOD 10 59
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

776 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