From: "Michael Stewart" Newsgroups: comp.os.msdos.djgpp Subject: Re: wierd problem Date: Mon, 12 Jul 1999 09:43:50 +0100 Organization: (Posted via) Netcom Internet Ltd. Message-ID: <7mc9ra$sq1$2@taliesin.netcom.net.uk> References: <37893502 DOT 9FB263CB AT geocities DOT com> NNTP-Posting-Host: hgty.capgemini.co.uk X-Trace: taliesin.netcom.net.uk 931769002 29505 194.42.240.2 (12 Jul 1999 08:43:22 GMT) X-Complaints-To: abuse AT corp DOT netcom DOT net DOT uk NNTP-Posting-Date: 12 Jul 1999 08:43:22 GMT X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sahab Yazdani wrote in message <37893502 DOT 9FB263CB AT geocities DOT com>... >okay, first I wrote a keyboard handling class in C++, and every thing >seemed to go okay, now I have a funny implementation of it, for instance >(extremely simplified code): > > >The funny thing is that the first call to GetKeyPressed works, but the >second one doesn't (the one thats in the function). No matter which key >you press it crashes, and it destroys the DOS box along with it (because >windows notices that the interrupt handler hasn't been released). A >person that I asked said that the keyboard interrupt address has >changed???? Anyways any help would be greatly appriecited. If you want >some source code, plz just e-mail! Sounds like you're not signalling the end of the interrupt. If that is the case then just put this line at the end of the interrupt handler. outportb (0x20, 0x20); For a working C++ keyboard handler see my webpage (http://www.reggin.freeserve.co.uk/ in the snippets section) Michael Stewart