jwright@atanasoff.cs.iastate.edu (Jim Wright) (02/24/89)
I have a large project which I developed using a Microsoft bus mouse. It works fine with the bus mouse. Recently, due to limited slots in the AT, I have been forced to switch to a Microsoft serial mouse. Now my programs no longer work. Reinstalling the bus mouse is not an option. Symptoms: * At start-up, the programs receive a constant stream of mouse button presses. Any mouse activity will clear this. * Occasionally, the program is told (by the mouse driver) that the mouse position is something which it is not. This occurs at startup when the program reacts to the spurious button presses. Probably a side-effect. There may be more bugs in there, but that's what I've observed so far. I called Microsoft and they were real helpful -- "Send us your source code and in about a month we should be able to look at it." Yes, that is a REAL quote. :-( I'm sure there is a software fix for this problem. Freelance and Harvard Graphics both work correctly with either the serial or bus mouse. I.e. the mouse hardware is not broken. My mouse interface code is located in a single file used by all programs, so it will be easy to fix (once I have a fix). Excerpts shown below. As a first guess, I'd say the problem is in starting up the mouse. But _I_ sure can't see anything wrong. Thanks. Jim Wright jwright@atanasoff.cs.iastate.edu /* --- mouse.c --- */ /* these defines currently set up for MSC5.0 */ #include <stdio.h> #include <dos.h> #include <addon/mouse.h> /* prototypes & define my constants */ #define REGISTERS union REGS reg #define AX reg.x.ax /* BX,CX,DX similar */ #define MOUSECALL int86(0x33, ®, ®) int m_start() { REGISTERS; /* declare registers */ AX = 0; /* mouse reset and check status */ MOUSECALL; if (!AX) return (-1); /* no driver detected */ return (BX); /* number of buttons */ } void m_cursor(int state) { REGISTERS; AX = (state==M_ON)?1:2; /* show or hide cursor */ MOUSECALL; } void m_getxy(int *px, int *py) { REGISTERS; AX = 3; /* get cursor position */ MOUSECALL; *px = CX; *py = DX; } Und so weiter...
jwright@atanasoff.cs.iastate.edu (Jim Wright) (02/28/89)
[Previously posted, but I think disk problems here trashed it...] I have a large project which I developed using a Microsoft bus mouse. It works fine with the bus mouse. Recently, due to limited slots in the AT, I have been forced to switch to a Microsoft serial mouse. Now my programs no longer work. Reinstalling the bus mouse is not an option. Symptoms: * At start-up, the programs receive a constant stream of mouse button presses. Any mouse activity will clear this. * Occasionally, the program is told (by the mouse driver) that the mouse position is something which it is not. This occurs at startup when the program reacts to the spurious button presses. Probably a side-effect. There may be more bugs in there, but that's what I've observed so far. I called Microsoft and they were real helpful -- "Send us your source code and in about a month we should be able to look at it." Yes, that is a REAL quote. :-( I'm sure there is a software fix for this problem. Freelance and Harvard Graphics both work correctly with either the serial or bus mouse. I.e. the mouse hardware is not broken. My mouse interface code is located in a single file used by all programs, so it will be easy to fix (once I have a fix). Excerpts shown below. As a first guess, I'd say the problem is in starting up the mouse. But _I_ sure can't see anything wrong. Thanks. Jim Wright jwright@atanasoff.cs.iastate.edu /* --- mouse.c --- */ /* these defines currently set up for MSC5.0 */ #include <stdio.h> #include <dos.h> #include <addon/mouse.h> /* prototypes & define my constants */ #define REGISTERS union REGS reg #define AX reg.x.ax /* BX,CX,DX similar */ #define MOUSECALL int86(0x33, ®, ®) int m_start() { REGISTERS; /* declare registers */ AX = 0; /* mouse reset and check status */ MOUSECALL; if (!AX) return (-1); /* no driver detected */ return (BX); /* number of buttons */ } void m_cursor(int state) { REGISTERS; AX = (state==M_ON)?1:2; /* show or hide cursor */ MOUSECALL; } void m_getxy(int *px, int *py) { REGISTERS; AX = 3; /* get cursor position */ MOUSECALL; *px = CX; *py = DX; } Und so weiter... -- Jim Wright jwright@atanasoff.cs.iastate.edu