DH> I want to write program to use the modem and serial port.
ofstream modem("COM1", ios::out|ios::binary) ;
modem << "ATZ\r" << flush ;
You didn't specify an operating system, but this approach works for just
about all PC operating systems. Raw MS-DOS/PC-DOS will not do
interrupt-driven comms. However, DOS applications that use the above
technique will run well, and *will* take advantage of interrupt-driven comms,
albeit unknowingly, when run on operating systems like OS/2 Warp.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|