Xref: utzoo comp.sys.ibm.pc:21200 comp.sources.wanted:5534 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!killer!convex!uunet!mcvax!enea!infovax!bl From: bl@infovax.UUCP (Bj|rn Larsson) Newsgroups: comp.sys.ibm.pc,comp.sources.wanted Subject: Re: PCcurses charget.c and conio.h Summary: PCcurses & C86: kbhit() function Keywords: PCcurses Message-ID: <142@infovax.UUCP> Date: 11 Nov 88 19:13:28 GMT References: <406@dcscg1.UUCP> Organization: INFOVOX AB, SOLNA, SWEDEN Lines: 26 In article <406@dcscg1.UUCP>, cpp90221@dcscg1.UUCP (Duane L. Rezac) writes: > I am working on porting the PCcurses package to the Computer Innovations > C86 > references a file conio.h, which apparently contains a definition of a macro > kbhit(). Can anyone provide information on what kbhit() is and how I could kbhit() in MicroSoft 'C' and Turbo'C' returns 0 if there is no character to read from the keyboard, and 1 if there is. This could be simulated by using one of the BIOS interrupts (INT 16 with AH = 1) or some appropriate INT 21 DOS function. It is better to use the direct calls to the BIOS PROM's, since calling via DOS means that raw input (if you use it) is partly risky - DOS calls check for CTRL-BREAK, CTRL-C, CTRL-P, CTRL-S and CTRL-Q, which you dont want if you go raw. The BIOS routine does no such checks. Also, I would like those of you who port PCcurses to other compilers to send diff listings to me and/or Steve Creps (creps@silver.bacs.indiana.edu) so we can have ONE reference version. -- Bjorn [And... Hi Steve! I can post now (I think)!] _ __ ._ : Bjorn Larsson ) ) . .. / "SPEECH TECHNOLOGY" : INFOVOX AB /--< _ _ __ / __. _ _ _ _ __ : Box 2503 _/___)__/_(_)_/(_/ <_ (/\___(_/l_/(_/ )_/ )_(_)_/ <_ : S-171 02 Solna ======= / =============================================== : SWEDEN ' (...seismo!mcvax!enea!infovax!bl - bl@infovax.UUCP) :