Search This Blog

Loading...

C Program to display mouse pointer in text mode

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

int initializemouse();
void showmousepointer();

union REGS i, o;

main()
{
   int status;

   status = initializemouse();

   if ( status == 0 )
      printf("Mouse is not supported. \n");
   else
      showmousepointer();

   getch();
   return 0;
}

int initializemouse()
{
   i.x.ax = 0;
   int86(0X33,&i,&o);
   return ( o.x.ax );
}

void showmousepointer()
{
   i.x.ax = 1;
   int86(0X33,&i,&o);
}

No comments:

Post a Comment