Problem in opening COM1:

GORDON ALLEN R gordon at news.colorado.edu
Thu Feb 21 03:16:04 AEST 1991


panguyen at vela.acs.oakland.edu (panguyen) writes:

>#include <stdio.h>
>main()
>{
>  fopen( "COM1", "r+" );
>  fprintf( "CHN %d \r", 3 );
>} 
>This will cough back at me with the following errors,	  

>   Write fault error writing device COM1
>   Abort, Retry, Ignore ?


You can refer to the following for help with serial communications:

The C Toolbox by Hunt, 1986
Supercharging C with Assembly Language by Chesley and Waite, 1987

C Asynch Manager software by Blaise Publ

There is another rather large volume on serial communications with C, but I
don't remember the name.  

Briefly, fopen() works for files not devices, as far as I know, in MS-DOS based
systems. 

-- 
Allen Gordon 
University of Colorado, Boulder
gordon at tramp.colorado.edu 
gordon_A at cubldr.colorado.edu
--
Allen Gordon 
University of Colorado, Boulder
gordon at tramp.colorado.edu 
gordon_A at cubldr.colorado.edu



More information about the Comp.lang.c mailing list