Date: Wed, 12 Nov 1997 14:12:29 +0200 (IST) From: Eli Zaretskii To: Michael Mauch cc: djgpp AT delorie DOT com Subject: Re: RHIDE -- author(s) please read this In-Reply-To: <3469d3af.4126448@news.uni-duisburg.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 12 Nov 1997, Michael Mauch wrote: > DJGPP's kbhit() looks just at the keyboard buffer variables in DOS > memory - that's a fast method, but it doesn't allow multitaskers to > recognize that a program polls the keyboard most of its time. IMHO, a better way is to use the `select' library function. It is portable to Linux (and Unix in general) and calls `__dpmi_yield' internally while it waits. It also has a time-out option. Check it out in the library reference. > > And a last note: Have you ever tried, that the __dpmi_yield() > > has any effect? When I remember correct, I tried it already several > > times and couldn't see any effect. > > Maybe you can check again with the following little test program(s). AFAIK, the effect of `__dpmi_yield' depends on the DPMI host and on the details of how the scheduler works and which parameters did you set e.g. in the Property Sheet of the DOS box on Windows 95. Some DPMI 0.9 hosts don't do anything with that call.