From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] mouse under DJGPP Date: Fri, 20 Dec 1996 19:28:02 +0000 Organization: None Lines: 23 Distribution: world Message-ID: <+QzMTHACjuuyEwH6@talula.demon.co.uk> References: <01bbee00$9e9eab70$65216dc2 AT parkview> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Yeep writes: >I want to use the mouse in a program. >So I would use Int 33h. >But this is a real mode interrupt and if I use it with __dpmi_int__ it >would make my program *very* slow (at least accoring to various FAQ's). I don't think that is a problem. Mouse interrupts aren't frequent enough to cause trouble due to the mode switching overhead. Real mode <-> pmode reflection is only an issue with things like high-frequency timer interrupts or bulk data transfers to external devices. >Or do I need to poll the Com-ports myself? This is, IMHO, rather dangerous, since there are several different sorts of mice around and they don't all use the same protocols. Early versions of Allegro used to read the com ports directly (I still have the code if you are interested) but it only worked with MS serial mice. I switched to using int33, and haven't had any trouble with it... /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */