[comp.os.msdos.programmer] Mouse interface to Turbo-C... Help!!!

cowgilc@mist.CS.ORST.EDU (Clayton Cowgill) (10/01/90)

I just migrated to a PC compatible platform from certain 68000/mouse driven
machines and am currently having problems using a microsoft compatible mouse
in my own program written in Turbo-C.

I'm using source code from SIMTEL20 (GMOUSE.ARC) for the int86(0x33...) stuff
and can read and set all mouse attributes except I can't set the mouse cursor
(graphics cursor) to look like any recognizable shape. It always looks like
binary trash...

The program runs on an 8088 XT compatible with 512K RAM and the 'small'
memory model for Turbo-C. It's a 'quick and dirty' program for my own use
only.

Would some kind soul be generous enough to send me a working Turbo-C source
for implementing a mouse cursor in graphics modes? Thanks in advance!!!

					-Clay

-- 
+-------------------------------------------+---------------------------------+
| "Yeah. Yup. That cop is definitely turn-  | Clayton Cowgill                 |
|  ing around..."                           | cowgilc@prism.cs.orst.edu       |
| Disclaimer: I'm not speaking for anyone.  | "So... Think he noticed?"       |

nbladt@aut.UUCP (Norbert Bladt) (10/09/90)

cowgilc@mist.CS.ORST.EDU (Clayton Cowgill) writes:


>I just migrated to a PC compatible platform from certain 68000/mouse driven
>machines and am currently having problems using a microsoft compatible mouse
>in my own program written in Turbo-C.

>I'm using source code from SIMTEL20 (GMOUSE.ARC) for the int86(0x33...) stuff
>and can read and set all mouse attributes except I can't set the mouse cursor
>(graphics cursor) to look like any recognizable shape. It always looks like
>binary trash...
There is a bug in this module ! It forgot to set the ES register (it used
another register for setting the pointer to the cursor mask). In addition,
the definition for the cursor and screen masks are WRONG. (I just
use an FAR array of 16-bit integers). They don't set the cursor shape
in their tests, right ?

>Would some kind soul be generous enough to send me a working Turbo-C source
>for implementing a mouse cursor in graphics modes? Thanks in advance!!!
I fixed it, because I use this library in my programs (for private
use like you, so far). If you need these fixes, please e-mail and I will
send it to you. (I am at work right now and have the sources at home).
I got my information for setting the mouse cursor from the manual which
came with the (Genius) mouse.
Perhaps you could look at your mouse manual and fix the bug yourself
in the meantime. As I said it's just that they don't set the ES register
before they call the mouse driver.

>					-Clay
Norbert Bladt.
-- 
Please use this path as return address. DON'T USE THE RETURN PATH IN THE HEADER
Norbert Bladt, Ascom Autelca AG, Worbstr. 201, CH-3073 Guemligen, Switzerland
Phone: +41 31 52 92 14
EMail: ..!uunet!mcsun!chx400!hslrswi!bladt