delorie.com/archives/browse.cgi | search |
From: | "Steve Chalkley" <sjc AT conceptii DOT co DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Why dose'nt this work ?? |
Date: | Mon, 10 Jan 2000 19:24:30 -0000 |
Organization: | NTL Internet News Service |
Lines: | 36 |
Message-ID: | <85dbjk$e3v$1@nclient5-gui.server.ntli.net> |
References: | <Pine DOT LNX DOT 4 DOT 10 DOT 10001081354250 DOT 614-100000 AT yahoo DOT com> |
NNTP-Posting-Host: | p-119-belinda.tch.cableol.net |
X-Trace: | nclient5-gui.server.ntli.net 947532212 14463 194.168.10.119 (10 Jan 2000 19:23:32 GMT) |
X-Complaints-To: | abuse AT net DOT ntl DOT com |
NNTP-Posting-Date: | 10 Jan 2000 19:23:32 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2615.200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Prashant TR <prashant_tr AT yahoo DOT com> wrote in message news:Pine DOT LNX DOT 4 DOT 10 DOT 10001081354250 DOT 614-100000 AT yahoo DOT com... > > On Sat, 8 Jan 2000, Santosh . H wrote: > > > Helpp!. Could someone please tell me why this bit o code > > prints nothing.All this is supposed to do is to read in values direct > > from com port and print 'em out > > That's because you need to do lots of other things like initializing the > com port, setting the baud rate, no. of bits, etc. This is a slightly > tough job, > believe me. Fortunately, mouse drivers do this job. > > Prashant > I've never touched the serial ports from DJGPP but on the printf front try using printf("%x\n", input[2]); This way _any_ data in input[2] should be visible, if the serial port has deposited something into your variable there's no guarantee that it's printable :-) It might also be a good idea to read the serial status register to see if something is actually in there. HTH Steve Chalkley
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |