home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
POLYEDIT.LZH
/
MODEL
/
MOUSE98.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-10
|
798b
|
61 lines
#include <stdio.h>
#include <dos.h>
#include "mouse.h"
void MouseInit()
{
union REGS regs ;
regs.x.ax = 0 ;
int86( 0x33, ®s, ®s );
}
void MouseExit()
{
MouseOFF();
}
void MouseON()
{
#if 1
union REGS regs ;
regs.x.ax = 1 ;
int86( 0x33, ®s, ®s );
#endif
}
void MouseOFF()
{
#if 1
union REGS regs ;
regs.x.ax = 2 ;
int86( 0x33, ®s, ®s );
#endif
}
void MousePos( xp, yp )
int *xp, *yp ;
{
union REGS regs ;
regs.x.ax = 3 ;
int86( 0x33, ®s, ®s );
*xp = regs.x.cx ;
*yp = regs.x.dx ;
}
void MouseSwitch( leftp, rightp )
int *leftp, *rightp ;
{
union REGS regs ;
regs.x.ax = 3 ;
int86( 0x33, ®s, ®s );
*leftp = ( ( regs.x.bx & 1 ) != 0 );
*rightp = ( ( regs.x.bx & 2 ) != 0 );
}