DM>> Depends on your OS. For example, under Linux, OS/2, and likely
DM>> Win32, fopen would work. Under DOS, however, you need to either
DM>> get a com port library, learn how to use a FOSSIL, or learn how
DM>> to deal with the serial port on a low level (via
DM>> outportb/inportb).
GD> Not so. The following works just fine under DOS:
GD> void offhook( void )
GD> {
GD> FILE *port ;
GD> port = fopen( "COM1", "w" );
GD> fprintf( port, "ATM0H1\n" );
GD> fclose( port );
GD> }
AZ> And how can I get responses ?
For *that* you will need a COMM library, I would think.
Gerry Danen (gdanen@connect.ab.ca) C+Net BBS @ 403-477-9545
http://www.geocities.com/SiliconValley/Way/9823
Moderator STN.Y2K: Year 2000 information & discussion
1 year, 339 days, 1 hour, 32 minutes, and 52 seconds until January 1, 2000.
--- Maximus 3.01
---------------
* Origin: C+Net BBS. Programming & Networking. (1:342/601)
|