Path: utzoo!censor!geac!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Formatted text from a COM port Message-ID: <25E9D92B.20065@maccs.dcss.mcmaster.ca> Date: 27 Feb 90 01:34:34 GMT References: <1990Feb20.165257.21884@gpu.utcs.utoronto.ca> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 25 In article <1990Feb20.165257.21884@gpu.utcs.utoronto.ca> sarathy@gpu.utcs.utoronto.ca (Rajiv Sarathy) writes: $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. Use stdaux ... it's already there for you. But don't count on it working. The serial port is not interrupt-driven by default, and has no buffering except that provided by the chip you're using. Writing stuff to it works fine, but good luck trying to read from it! I have had no luck in Turbo Pascal or in Turbo C doing this; if you're sure you can write something fast enough not to miss a character, you can do it all with calls to the appropriate BIOS interrupt (14h, I think), but then the maximum speed your program will run at depends on the power of your computer. Might I suggest that you look around on simtel20 for a shareware/PD interrupt-driven comm port package? Also check out any decent PC BBSs in your area (Canada Remote Systems might, and I think I might have seen such programs on the Lamis BBS at (416) 754-4103, but CRS requries membership and Lamis also does, I think). I found a couple of such libraries somewhere last term, but never got around to checking them out and I don't think I have them anymore. -- Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca = "\nI'm only an undergraduate!!!\n"; **************************************************************************** I Think I'm Going Bald - Caress of Steel, Rush