using turboc++
-------------------------------------------------
//program to activate/detection mouse
#include <dos.h>
#include<stdio.h>
#include<conio.h>
union REGS in_put, out_put;// input and output variables stored in union
//input for signal detection;output for screen display
void mouse_detected ()
{
in_put.x.ax = 0;// ax is register used for mouse; 'x' is member of reg.
int86 (0X33,&in_put,&out_put); //invokes interrupt using 0X33; for mouse, it is 0X33
if (out_put.x.ax == 0) //condition testing
printf("\nMouse Failed To Initialize");
else
printf ("\nMouse was Succesfully Initialized");
//initialization on screen
}
int main ()
{
mouse_detected ();//calling of function
getch ();
return 0;
}
-------------------------------------------------
//program to activate/detection mouse
#include <dos.h>
#include<stdio.h>
#include<conio.h>
union REGS in_put, out_put;// input and output variables stored in union
//input for signal detection;output for screen display
void mouse_detected ()
{
in_put.x.ax = 0;// ax is register used for mouse; 'x' is member of reg.
int86 (0X33,&in_put,&out_put); //invokes interrupt using 0X33; for mouse, it is 0X33
if (out_put.x.ax == 0) //condition testing
printf("\nMouse Failed To Initialize");
else
printf ("\nMouse was Succesfully Initialized");
//initialization on screen
}
int main ()
{
mouse_detected ();//calling of function
getch ();
return 0;
}
No comments:
Post a Comment