17.10 USING A MOUSE

Mouse has become indispensable input device. It helps to move the mouse pointer very easily and quickly on the screen. It can be used for drawing freehand. Let us study how we can accomplish this.

Mouse uses software interrupt as provided by function int86 from “dos.h”. This instruction is discussed in Box 17.3.

BOX 17.3 Software Interrupt int86

Turbo C++ has provided an instruction int86 in header file “dos.h”. This instruction issues a general 8086 software interrupt. It has three parameters

int intno

union REGS*inregs

union REGS*outregs

The first parameter intno specifies the software interrupt service number. The other two parameters are of inbuilt type union REGS. These variables are used to store all the 8086 CPU ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.