Article View: comp.os.msdos.programmer
Article #3465Re: Mouse under svgabgixx.zip - Help us, Jordan!
From: Jordan Powell Hargrave
Date: Fri, 02 Oct 1992 00:42
Date: Fri, 02 Oct 1992 00:42
38 lines
1743 bytes
1743 bytes
Mouse support for my BGI drivers is through the standard int 0x33 interface
for mouse calls. (Your mouse driver must already be loaded for these
functions to work)
The mouse driver (mouse.com/sys) worked in SuperVGA modes, but did not
have support for drawing the cursor itself. The mouse support in the BGI
drivers adds this functionality.
So, to get the mouse to work with the BGI drivers:
...
union REGS regs;
int gd, gm, havemouse;
gd = DETECT;
installuserdriver(driver_name,Always);
initgraph(&gd,&gm,"");
regs.x.ax = 0;
int86(0x33,®s,®s);
// regs.x.ax will be 0 or 0xFFFF, forget which one specifies if the mouse
// is available right now, been using Unix too long ;-)
// Anyway, set havemouse to true if the mouse is available
if (havemouse) {
regs.x.ax = 1;
int8x(0x33,®s,®s);
// display mouse cursor
}
// etc
Check books/files on mouse programming for a more detailed account of how
to use the int 0x33 functions.
Oh, by the way, make sure to include a closegraph statement before exiting
your program, the BGI driver captures the 0x33 interrupt, and if it is not
released, nasty things will happen.
Jordan Hargrave
Technical Details
Message-ID:
<0en0hrW00WB8FWLPIM@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jh5y+Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jh5y+ From: jh5y+@andrew.cmu.edu (Jordan Powell Hargrave) Newsgroups: comp.os.msdos.programmer Subject: Re: Mouse under svgabgixx.zip - Help us, Jordan! Message-ID: <0en0hrW00WB8FWLPIM@andrew.cmu.edu> Date: 2 Oct 92 00:42:31 GMT Article-I.D.: andrew.0en0hrW00WB8FWLPIM Organization: Senior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA Lines: 38