[comp.lang.c] The name of COM1 port in "fopen"

jc@axiom.maths.uq.oz.au (J Chen) (07/23/90)

Does anybody know what the name of COM1 port is in the "fopen"
function in Microsoft C-5.1. I would like to develop a simple
communication program by "fopen" function on COM1 port.

J. CHEN

e-mail address: jc@axiom.maths.uq.oz.au

========================================================================

gordon@osiris.cso.uiuc.edu (John Gordon) (07/23/90)

	I'm not sure, but I think the beast you're looking for is stdaux.  It
is an automatically-opened file pointer, like stdin & stdout.  It is mentioned
on pages 60 - 64 of the MSC 5.1 Runtime Library Reference manual, but it
never says exactly what it is.

	Hope this helps.


---
John Gordon
Internet: gordon@osiris.cso.uiuc.edu        #include <disclaimer.h>
          gordon@cerl.cecer.army.mil       #include <clever_saying.h>
GEnie:    j.gordon14                  

brianh@hpcvia.CV.HP.COM (brian_helterline) (07/24/90)

>Does anybody know what the name of COM1 port is in the "fopen"
>function in Microsoft C-5.1. I would like to develop a simple
>communication program by "fopen" function on COM1 port.
>
>J. CHEN
>
>e-mail address: jc@axiom.maths.uq.oz.au
>
>========================================================================
>----------

	I better choice may be to use _bios_serialcom() which
	allows you to set all the standard RS232 parameters.
	Of course, the port is not interrupt driven so your
	program had better set up interrupts or be extremely
	quick to catch all incoming characters.  If you aren't
	fast enough, all you will get is the last character 
	received. (usually just a LF or something like that)

	An easier way to use COM1 for communication is to buy
	a serial COM package that works with MSC.  I use one
	from GreenLeaf Software.  It does what I need and I
	believe it cost ~$200 U.S.

	GreenLeaf Software Inc.
	16479 Dallas Parkway
	Bent Tree Tower Two, Suite 570
	Dallas, TX  75248
	Tel (214) 248-2561

	Please note that I am not associated with GreenLeaf Software.
	I am just a satisfied customer.

-------------------------------------------------------------------------------
Brian Helterline                                        brianh@hpcvia.cv.HP.COM
Hewlett Packard                                         ..!hp-pcd!hpcvia!brianh
Corvallis, OR  97330           				Warning: error C390 - 
							No saying found.
							core dump.
-------------------------------------------------------------------------------