[comp.sys.ibm.pc] MS Mouse

jbeard@ntvax.uucp (Jeff Beardsley) (10/25/89)

I have a problem with the MicroSoft Mouse, which I think someone out
in net-land may be able to answer quickly.

I have been working on an application which uses the MicroSoft Mouse,
and recently added EGA 43 line mode support (mostly).  However, the mouse
cursor annoyingly stays in the upper 25 lines of display.

If someone out there with the MS-Mouse Technical Reference could clue
me in, I would greatly appreciate it.

Thanks in advance!
-- 
-------- Jeff Beardsley at UNT ----------- <jbeard@dept.csci.unt.edu> --------

liber@darth.PGH.PA.US (Eric Liber) (10/26/89)

In article <1989Oct24.213459.1312@ntvax.uucp>, jbeard@ntvax.uucp (Jeff Beardsley) writes:
> and recently added EGA 43 line mode support (mostly).  However, the mouse
> cursor annoyingly stays in the upper 25 lines of display.
> 
> If someone out there with the MS-Mouse Technical Reference could clue
> me in, I would greatly appreciate it.
> -------- Jeff Beardsley at UNT ----------- <jbeard@dept.csci.unt.edu> --------
The mouse is called through interupt 33h with parameters in ax,bx,cx,dx
(hmmm... maby you already know this if you already using a mouse in your
code...) .. anyway ax is the desired mouse function. Herewith are the function
numbers and specifics about the one you need (ax function value in decimal NOT
HEX):

 0 - Mouse installed flag and reset
 1 - Show cursor
 2 - hide cursor
 3 - get mouse position and button status
 4 - set mouse cursor position
 5 - get button press information
 6 - get button release information
 7 - set minimum and maximum horizontal position
 8 - set minimum and maximum vertical position
     **** this is the one you want ***
 9 - set graphics cursor block
10 - set text cursor
11 - read mouse motion counters
12 - set user-defined subroutine mask
13 - light pen emulation mode on
14 - light pen emulation mode off
15 - set mickey/pixel ratio
16 - conditional off
19 - set double speed threshold

If you call function 0 (to see if a mouse is present) it also resets the mouse
to its default values.. what do you suppose the min/max cursor postions are?
You betchum red rider
min/max horizontal = 0/639
min/max vertical   = 0/199

so you can't get to the bottom 150 lines of a ega screen (640/350).
To do so:
after your reset call make the following call:

	ax = 8 (base 10)
	cx = 0 (minimum position)
	dx = 349 (maximum position)
	do an int 33h

if you are using a vga in the 50 line mode:
	dx = 479

that should fix you up.

If you need any more help just ask.
Good luck
Eric (the red baron) Liber