www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/03/18:47:55

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
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: <t953cs440h0jlop43eu25f6emh7hurkkli@4ax.com>
References: <89m367$mjn$1 AT nnrp1 DOT deja DOT com>
NNTP-Posting-Host: modem-46.plutonium.dialup.pol.co.uk
Mime-Version: 1.0
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. ;-)

- Raw text -


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