Not knowing what operating system you are using, here is some old and ugly Turbo C code. You could leave out the x,y info. It contains the one big hint, that you might as well use assembler ...
/************************** m_releas.cf ******************************
**
** Returns pointers to the coordinate values x, y of the mouse cursor
** position at which the button was clicked (x, y values jump in steps
** of 8 in text mode). Also returns a pointer to the number of times
** the button was released. This value will reset to 0 after the call.
** This function is preferred over the m_button_press() function.
** call m_button_release(0, &x, &y, &rnum)
**
** Written in TURBO C V.2.0 by vegaseat 2/13/89
**
************************************************************************/
void m_button_release(int button, int *x, int *y, int *rel)
/* mouse function #6, find out how many times a button has been released */
/* which button left = 0, right = 1 Returns position x (0-639),y (0-199) */
/* at which the click occured and number of releases, call resets to 0 */
{ /* needs DOS.H and union REGS inreg, outreg */
inreg.x.ax = 6;
inreg.x.bx = button;
int86(0x33,&inreg,&outreg);
*x = outreg.x.cx;
*y = outreg.x.dx;
*rel = outreg.x.bx;
}
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004