delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/22/13:21:16

Message-ID: <335CE77C.2E66@mcs.nl>
Date: Tue, 22 Apr 1997 18:29:48 +0200
From: Peter Zijlstra <peter AT mcs DOT nl>
Reply-To: peter AT mcs DOT nl
Organization: Zembla
MIME-Version: 1.0
To: DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: Clear key buffer
References: <5jhpi3$5nf AT maia DOT cc DOT upv DOT es>

Usuario Invitado wrote:
> 
> >I suggest to do it the usual way:
> >
> >       #include <conio.h>
> >       while (kbhit ())
> >         getch ();
> >
> >This clears the keyboard buffer, no matter what TSR has taken over
> >Int 16h.  It might be slower, but how many times per second do you
> >need to clear the keyboard buffer, anyway?
> 
> The code can't be slow... I'm developing a game, and I need to clear the
> buffer every 6/7 times, to avoid those noising beeps...
> 
> I can tell you that I've never heared before about a keyboard enhancer... it's
> a program?
> 
> But thank you anyway, and I've already found the solution twice days ago... if
> you want it, i'll post it... I dont have the code right here...
> 
> Theuzifan

Hey, what about hooking that interrupt so you´re not dependant on the
systems whims anymore... !! That´s what is usually done for games, and
is what I usually do.

Greetinx,

Peter

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019