delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/23/05:56:16

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <20020123105549.98938.qmail@web9101.mail.yahoo.com>
Date: Wed, 23 Jan 2002 02:55:49 -0800 (PST)
From: ROLAND <roland_asmann AT yahoo DOT com>
Subject: Re: kbhit()
To: djgpp AT delorie DOT com
Cc: eliz AT is DOT elta DOT co DOT il
In-Reply-To: <Pine.SUN.3.91.1020123121137.6845X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--- Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> Something is wrong with the rest of your code:
> kbhit() _is_ the function 
> you are looking for.  It returns immediately,
> without waiting for a key 
> to be pressed.

This is what my code looks like:

if(kbhit()==0){
     if(getkey()==3){
          interrupt();
     }
}
printf("Reading...\n");
COMReadBufferTimed(DJGPPdev,anmes,NULL,256,&charsin,1000);

I know that the program doesn't work, 'cause I never
see the "Reading..." on the screen. It also doesn't go
to interrupt, 'cause then the progam has to stop
(interrupt closes the port and exits)...
What is the problem with my code???

Roland


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

- Raw text -


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