#include<stdio.h> #include<conio.h> #include<dos.h> int initmouse(); union REGS i, o; int main() { int flag; flag = initmouse(); if ( flag == 0 ) printf("\nMouse support not available."); else printf("\nMouse support available."); getch(); return 0; } int initmouse() { i.x.ax = 0; int86(0X33,&i,&o); return ( o.x.ax ); }
Output :
Mouse support available.
- Int86() is a C function that allows to call interrupts in the C program
- Header File : dos.h
Usage is int86 (int intr num, union REGS *inregs, union REGS *outregs)[arrowlist]
- In and out register must be type of REGS.
- REGS is a built in UNION declaration in C.
- It is defined in the header file
No comments:
Post a Comment