Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!pasteur!miro.Berkeley.EDU!foote From: foote@miro.Berkeley.EDU (Bill Foote) Newsgroups: comp.sys.ibm.pc.misc Subject: Writing data to com3: Message-ID: <9261@pasteur.Berkeley.EDU> Date: 28 Nov 90 00:40:02 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: foote@miro.Berkeley.EDU (Bill Foote) Organization: University of California at Berkeley Lines: 27 (The following is posted for a friend who doesn't have net access. Please reply via e-mail so I can forward the responses. Thanks.) Help! Could some one tell me how I can go about writing data out to a COM3 or COM4 port in DOS using C? Or can someone tell me if there are any DOS tricks or utilities out there that will let me do something like "mode com3:1200,8,1" and then "mode lpt1:=com3:"? I would like to do something like: fp = fopen ("COM3","w") ; fprintf (fp,"TEST\n") ; This works fine for COM1 and COM2 but it doesn't work for COM >= 3. I've got an AT compatible with 6 COM ports and COM1 and 2 are already in use. So therefore I'm stuck with this task of trying to write to COM 3 or higher. I'm running Microsoft C version 5.1. Thanks for all of your help. -- Charles Lei