From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: Keyboard handler problem Date: Mon, 14 Sep 1998 18:05:03 +0300 Organization: NetVision LTD. Lines: 25 Message-ID: References: <35FA1969 DOT 4D46 AT post DOT tau DOT ac DOT il> NNTP-Posting-Host: is.elta.co.il Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <35FA1969.4D46@post.tau.ac.il> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Fri, 11 Sep 1998, Tal Lavi wrote: > After about ten key presses that works fine, the keyboard buffer seems > to be full, and it's beeping me whenever I press a key. Does anyone know > how to fix it(clean the buffer or something)? Why do you chain to the original handler? Do you really need that? If you do, you need to somehow make sure some other code in your program reads the keyboard using the BIOS functions. Otherwise, the BIOS will put the keystrokes into its buffer, and when that fills, it will beep on you. > Does anyone knows what "outportb(0x20,0x20)" is for? When the PIC (the Programmable Interrupt Controller) sees one of the IRQ lines triggered, it disables that IRQ line until you send the EIO (End Of Interrupt) command, which is what the above does. In other words, if you don't send the EOI, you will never see that interrupt again. > And yet another strange thing I noticed, I can use int 9 OR int 8! for > some strange reason, both of them seem to work! how can that be? Bugs always seem mysterious at first... ;-).