🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1391

Re: Formatted text from a COM port

#1391
From: Scott Beckstead
Date: Thu, 22 Feb 1990 06:29
35 lines
1968 bytes
In article <1990Feb20.165257.21884@gpu.utcs.utoronto.ca> sarathy@gpu.utcs.utoronto.ca (Rajiv Sarathy) writes:
>Over the last couple of months several people have asked how to read/write
>from PC serial ports in C.  However, none of the posters summarized any
>info they received.  
>
>Since I have no record of who the posters were, and postings are cleared every
>week on this machine, I would like to either see a summary, or have someone
>help me.
>
>I need to read formatted text from the serial port.  Unfortunately, fopen
>doesn't open "com1:", so I can't see how to use fscanf.
>
>This problem has definitely been tackled several times before by users of
>digitizers, etc.  Please help!
>
>If it matters, I can use any of MSC5.1, QC2 with MASM, MASM5.1
>
>Thanks in advance.
>
>-- 
>
> Rajiv Partha Sarathy  	      _  _ /^\    INTERNET sarathy@gpu.utcs.utoronto.ca
> ................ooooooooOOOO(_)(_)\_/      BITNET sarathy@utorgpu.bitnet
> University Of Toronto Computing Services     UUCP sarathy@utgpu.uucp

  Best solution I can think of (and have used) is read the raw data into a 
buffer and use scanf(...) works just as well as fscanf(...) just takes a 
little longer.  Have you tried any of the "canned" libraries for the serial
ports??
Scott

-- 
Scott Beckstead      | Sew Crates was a grate greek.  
CIS 76106,3720       |     Dang that one got right by the spelling checker
FIDO 1:206/2814      | don't look at me YOU wrote it!
Technical Details
Message-ID: <1990Feb22.062908.11853@wilbur.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ogicse!caesar.cs.montana.edu!samsung!rex!ames!ncar!ico!ism780c!wilbur!scott
References: <1990Feb20.165257.21884@gpu.utcs.utoronto.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ogicse!caesar.cs.montana.edu!samsung!rex!ames!ncar!ico!ism780c!wilbur!scott
From: scott@wilbur.uucp (Scott Beckstead)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: Formatted text from a COM port
Message-ID: <1990Feb22.062908.11853@wilbur.uucp>
Date: 22 Feb 90 06:29:08 GMT
References: <1990Feb20.165257.21884@gpu.utcs.utoronto.ca>
Reply-To: scott@wilbur.UUCP (Scott Beckstead)
Organization: Wilbur's Bike Shop, Westlake Village, Ca
Lines: 35