From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: _bios_serialcom() in djgpp Date: Sat, 04 Mar 2000 23:11:11 +0000 Organization: Customer of Planet Online Lines: 20 Message-ID: References: <89m367$mjn$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: modem-46.plutonium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news7.svr.pol.co.uk 952125629 25065 62.136.66.174 (3 Mar 2000 23:20:29 GMT) NNTP-Posting-Date: 3 Mar 2000 23:20:29 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com wsimpson AT my-deja DOT com wrote: > My current problem is that when I try to read the device hooked up to > com1, I get nothing really. If I print it as > %d the value is 32768 > %c prints a vertical space > %s garbage > I think it is because the initialization of the port failed, or because > the reading of the data from the port failed, or both. Hence my > questions. Try: unsigned char data; And/Or: printf("%02X", data & 0xFF); /* Two digit hex */ Or some such combination. ;-)