mitch@arcturus.UUCP (Mitchell S. Gorman) (05/09/89)
Hey gang. I'm trying to build a TP5.0 unit to allow me to use the mouse in my applications. I've been using the TP: Advanced Programmer's Guide as a guide (imagine that! :^), but, unfortunately, there seems to be some problems with what the book says certain functions under 33h are supposed to do. So what I'm looking for is a listing of all the functions under 33, complete with calling parameters and possible return values (a la Norton's book, which BTW has NOTHING on this interrupt. What was Pete THINKING of??? ;^). Can anyone help? Merci bien. Mitch @ Rockwell, Anaheim Disclaimer: Why does my cat always watch me like that when I use my "alternate input device"?
dor@beach.cis.ufl.edu (Douglas R. Oosting) (05/11/89)
In article <4612@arcturus> mitch@arcturus.UUCP (Mitchell S. Gorman) writes: > > So what I'm looking for is a listing of all the functions under 33, >complete with calling parameters and possible return values (a la Norton's >book, which BTW has NOTHING on this interrupt. What was Pete THINKING >of??? ;^). > Mitch @ Rockwell, Anaheim OK...heres a listing, gleamed from the "DOS Programmer's Reference" by Terry Dettman...EXCELLENT book, BTW. Lists almost any interrupt a guy could want... (remember, to call you place all function numbers in AX) Function 00h Returns mouse parameters...upon return, AX contains 0000h (installed) or FFFFh (not installed). BX contains the number of buttons available. Function 01h Display Mouse Cursor. No returned values, this only sets a flag to turn the cursor on. Function 02h Turn off Mouse Cursor. Complement to function 01h. Function 03h Get position. Returns BX = button status if lsb is 1, left button is depressed 0 means not depressed if bit 1 is 1, right button is depressed, 0 meand not depressed other 6 higher bits not defined. CX = X coordinate (always from 0 to 199) DX = Y coordinate (always from 0 to 639) Translation of CX,DX coordinates by screen mode: Screen Mode Mouse Coordinates 00h,01h x = 16*column, y = 8*row 02h,03h x = 8*column, y = 8*row 04h,05h x = 2*screen X, y = screen Y 06h x and y are screen values 07h x = 8*screen column, y = 8*screen row 0eh-10h x and y are screen values Function 04h Set Mouse Position. Call with CX = x coord, DX = y coord. Operation of mouse resumes from this point on screen. Function 05h Get button press info. BX = (0=left, 1=right). Returns AX = button status (0=released, 1=pressed) BX = count of button presses CX = cursor X position at last button press DX = cursor Y position at last button press (provides info since last call to this function) Function 06h Get button release info. Complement for function 05h above. Same return info, except based on last RELEASE of button. Function 07h Set Mouse X Bound. Call with CX = minimum bound, DX = maximum bound. Function 08h Set Mouse Y Bound. Call with CX = minimum bound, DX = maximum bound. Function 09h Set Graphics Cursor...pretty complex; you need to find this elsewhere Function 0AH Set text mode cursor. Call with BX = (0=attribute cursor, 1=hardware cursor) CX = start of screen mask/hardware cursor scan line DX = end of cursor mask/hardware cursor scan line (note definition of CX and DX changes if using attribute or hardware) low byte of screen mask should be FFh, low byte of cursor mask should be 00h. Function 0Bh Get Physical Movement. Returns CX = # of X positions moved, DX = # of y pos. moved. (both from -32768 to 32767). This is the relative movement between calls. Units approximate about .5 millimeters (.02 inches). Function 0Ch Set up user-defined input mask. CX = call mask (bit mapped) DX = address offset to function Creates a special handler for conditions recognized by mouse driver. CX map bit # 43210 ....1 Cursor position changed ...1. Left button pressed ..1.. Left button released .1... Right button pressed 1.... Right button released. Calling Function 00h restores mask to 0. This should be done before your program terminates. Function 0Dh Set light pen emulation. Pressing both keys acts as if a light pen is touched to the screen at current cursor location. Function 0Eh Turns off light pen emulation. Function 0Fh Sets ratio between physical movement of the cursor & coordinate changes. CX = # physical positions to change in 8 x coords (default 8) DX = # physical positions to change in 8 y coords (default 16) In both CX and DX, high bit must be zero, minimum value allowed is 1. Function 10h Conditional off. CX = upper X screen coords DX = upper Y screen coord SI = lower X screen coord DI = lower Y screen coord Specifies where the cursor is turned off. After use, be sure to call 01h. Function 13h Double speed threshold. Dx = threshold speed (physical positions/second) to move cursor by factor of 2. There are more functions, dealing with user-interrupt vectors. If you want these too, send me mail -- this is quite long enough already! Hope this helps... -- Entropy Requires | Douglas R. Oosting, University of Florida No maintenance... | dor@beach.cis.ufl.edu or Pendragon@oak.circa.ufl.edu --Markoff Chaney |...{mailrus|gatech}!uflorida!beach.cis.ufl.edu!dor In the Society : Cadrys ap Dulas o Caereira, Barony of An Crosaire, Trimaris
mitch@arcturus.UUCP (Mitchell S. Gorman) (05/12/89)
In article <20269@uflorida.cis.ufl.EDU>, dor@beach.cis.ufl.edu (Douglas R. Oosting) writes:
...a pretty nice description of the mouse interrupt functions. I also
received some email from Peter Camilleri with a full explicit description
including i/o paramters. Thanks to both of you.
And of course, if anyone else should happen to post/email before
they see this, thank you as well!!!
Mitch @ Rockwell, Anaheim
Disclaimer: "I've always relied on the kahndness of strangers!"
simon@ms.uky.edu (G. Simon Gales) (05/16/89)
In article <4612@arcturus> mitch@arcturus.UUCP (Mitchell S. Gorman) writes: > So what I'm looking for is a listing of all the functions under 33, >complete with calling parameters and possible return values (a la Norton's >book, which BTW has NOTHING on this interrupt. What was Pete THINKING >of??? ;^). I got a book last Christmas called 'DOS Programmer's Reference' that covers everything pretty well. Not a book for users. DOS Programmers Reference 1988 Terry R. Dettmann Que (tm) Corporation Carmel, Indiana ISBN 0-88022-327-8 Library of Congress Catolog No. 87-60811 [ about 830 pages for $22.95 ] -- /------------------------------------------------------------------------\ Simon Gales@University of Ky {rutgers, uunet}!ukma!simon - simon@ms.uky.edu - simon@UKMA.BITNET