[comp.os.msdos.programmer] Programming Problem--Microsoft Mouse

sharyn@jhunix.HCF.JHU.EDU (Sharyn Elis Horowitz) (02/20/91)

I have encountered a strange programming problem.  I redifined the graphics
mouse cursor in my program as follows:

mov ax,9
mov bx,7
mov cx,7
mov es,SEG pattern
mov dx,OFFSET pattern

Those two 7's should put the "hot spot" of the graphics cursor in the center,
seven pixels over and seven pixels down.  Works fine on every Microsoft
compatible mouse I've tried (Logitech, Genius, et al) except one: a real
Microsoft mouse.  Does anyone have any idea why this code works on all
the compatibles but not the real thing?

Thanks in advance,
Eric Ruck
sharyn@jhunix (bitnet)

ccastdf@prism.gatech.EDU (Dave) (02/20/91)

sharyn@jhunix.HCF.JHU.EDU (Sharyn Elis Horowitz) writes:


>I have encountered a strange programming problem.  I redifined the graphics
>mouse cursor in my program as follows:

>mov ax,9
>mov bx,7
>mov cx,7
>mov es,SEG pattern
>mov dx,OFFSET pattern

>Those two 7's should put the "hot spot" of the graphics cursor in the center,
>seven pixels over and seven pixels down.  Works fine on every Microsoft
>compatible mouse I've tried (Logitech, Genius, et al) except one: a real
>Microsoft mouse.  Does anyone have any idea why this code works on all
>the compatibles but not the real thing?

From: Advanced MSDOS Programming p598

...In display modes 4 and 5, the horizontal offset must be an even number.


Could this be your problem?


Dave
-- 
David Frascone 				ccastdf@prism.gatech.edu
Georgia Institute of Technology,
Atlanta Georgia, 30332
Office of Information Technology--User Assistant

bmarsh@cod.NOSC.MIL (William C. Marsh) (02/21/91)

In article <7612@jhunix.HCF.JHU.EDU> sharyn@jhunix.HCF.JHU.EDU (Sharyn Elis Horowitz) writes:
>I have encountered a strange programming problem.  I redifined the graphics
>mouse cursor in my program as follows:

Code Removed...

>Those two 7's should put the "hot spot" of the graphics cursor in the center,
>seven pixels over and seven pixels down.  Works fine on every Microsoft
>compatible mouse I've tried (Logitech, Genius, et al) except one: a real
>Microsoft mouse.  Does anyone have any idea why this code works on all
>the compatibles but not the real thing?

I found the same problem when I went from a Logitech Mouse to the Microsoft
Mouse.  It seems, if you add a /Y switch when you start the mouse driver,
it clears up this problem.  However, this option, whatever it is since it's
not documented, causes another program (Klondike) to have very jerky mouse
movements, though I haven't noticed anything wrong with my programs.

Hope this Helps!

Bill
-- 
Bill Marsh, Naval Ocean Systems Center, San Diego, CA
{arpa,mil}net: bmarsh@cod.nosc.mil
uucp: {ihnp4,akgua,decvax,dcdwest,ucbvax}!sdcsvax!nosc!bmarsh
"If you are not part of the solution, you're part of the problem..."