Original-Received: by NeXT.Mailer (1.118.3) PP-warning: Illegal Received field on preceding line From: Timothy "J." Wood Date: Fri, 26 May 95 12:16:35 -0700 To: "Paal-Kr. Engstad" Subject: Re: Keyboard interrupt handler brokenness Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Reply-To: tjw AT omnigroup DOT com References: <9505261108 DOT AA06832 AT omnigroup DOT com> Indeed, using _go32_dpmi_set_protected_mode_interrupt_vector() does seem to mostly fix the problem. It still beeps if you type a bunch really fast (and I've noticed that other programs don't have this behavior) so it isn't yet perfect, but certainly acceptable. Thanks. I'm still confused as to why the example code I had installed both a real and protocted mode handler but my code breaks if I have anything other than only protected mode handler. I guess I'll go through libc.i's section on this again now that I've learned a bit -- perhaps it will make more sense this time around. -tim Begin forwarded message: Date: Fri, 26 May 1995 14:35:27 +0000 (GMT) From: "Paal-Kr. Engstad" To: tjw AT omnigroup DOT com Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Keyboard interrupt handler brokenness In-Reply-To: <9505261108 DOT AA06832 AT omnigroup DOT com> On Fri, 26 May 1995, Timothy J. Wood wrote: > > I'm just starting my DOS hacking (having lived most of my life in > Unix) and I've just written my first DJGPP interrupt handler. This > does some simple keyboard operations -- detecting key down and up > and is pieced together from various pieces of examples that I've > found laying around. > > Amazingly, it works. Well, mostly. Two problems. As written > below, eventually the keyboard will start beeping. Presumably it's > input buffer it filled. In fact, when I hit escape, a bunch of > stuff is printed out; the contents of the full buffer, I assume. The problem is that you have chained the interrupt. This means that after your interrupt routine is done, the old interrupt is called. This is the one causing the input buffer to get filled. I can't remember out of memory which _go32_dpmi* function to use instead, but do 'info libc', and you will find out. PKE.