Article View: comp.os.os2.programmer
Article #1392Re: What is wrong with this post(Idle dos box/giveup time slice)?
From: Chris Shabsin
Date: Fri, 04 Sep 1992 07:19
Date: Fri, 04 Sep 1992 07:19
18 lines
1431 bytes
1431 bytes
Well, kbhit() just checks a register somewhere, it does NOT wait for the key to be hit. (You obviously know this...) Basically, I assume that OS/2 doesn't detect this to be idle because you're just checking a memory location, as near as it can tell... (unless you want it to have hard-coded memory locations for things such as keyboard buffer in the idle-testing code). When you call the interrupt to wait for a key, this TELLS it what you are doing, explicitly. You should be doing it that way, anyway. These are all guesses of mine, but I am pretty sure it's how it works. -- -Chris Shabsin -shabby@athena.mit.edu -member, SIPB, PWLCSBHNM, MITMB, VWA, MITCC, PWN -founder, Gations, Inc. -"You got the power, you got the might, get ready for battle, beat that Black Knight!" -Black Knight pinball game...
Technical Details
Message-ID:
<SHABBY.92Sep4031932@w20-575-48.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!shabbyReferences:
<mg.714119080@elan> <mg.714820699@elan>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!shabby From: shabby@Athena.MIT.EDU (Chris Shabsin) Subject: Re: What is wrong with this post(Idle dos box/giveup time slice)? In-Reply-To: mg@elan's message of 26 Aug 92 09:18:19 GMT Message-ID: <SHABBY.92Sep4031932@w20-575-48.mit.edu> Sender: news@athena.mit.edu (News system) Nntp-Posting-Host: w20-575-48.mit.edu Organization: Massachusetts Institute of Technology References: <mg.714119080@elan> <mg.714820699@elan> Date: Fri, 4 Sep 1992 07:19:39 GMT Lines: 18