Tuesday, September 18, 2012

Code#99:C Program to check if mouse support is available or not

| |
#include<dos.h>
#include<conio.h>

int initmouse();

union REGS i, o;

main()
{
   int status;

   status = initmouse();

   if ( status == 0 )
      printf("Mouse support not available.\n");
   else
      printf("Mouse support available.\n");

   getch();
   return 0;
}

int initmouse()
{
   i.x.ax = 0;
   int86(0X33,&i,&o);
   return ( o.x.ax );
}
output:
Mouse support available

0 comments:

Post a Comment

Powered by Blogger.