Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!decwrl!ogicse!cvedc!gssc!gened From: gened@gssc.UUCP (Gene Daniel) Newsgroups: comp.os.msdos.programmer Subject: Re: Polling keyboard Message-ID: <6317@gssc.UUCP> Date: 2 Sep 90 07:53:28 GMT References: <944@beguine.UUCP> Organization: Graphic Software Systems, Inc. Beaverton, Or. Lines: 20 In article <944@beguine.UUCP> Aamir.Zakaria@samba.acs.unc.edu (BBS Account) writes: >Can anyone tell me how, in either C or assembly language (8088), I can poll >the keyboard for character input without actually waiting for input, i.e. >just check if the user has hit a key. > > >Thanks! Most "C" compilers on PC's have a function called kbhit() it returns non-zero if a key stroke is available to be input. This function is available in Microsoft, Borland and Zortech runtime libraries. I seem to remember it has been available ever since the BDS compiler on 8080 CP/M machines. -- Gene Daniel | gened@gss.com Graphic Software Systems, Inc. | or P.O. Box 4900 | ..!tektronix!sequent!gssc!gened Beaverton, Oregon 97005-7161 |