hoosang
asked on
Need to write a DOS program that sends string to COM port!
I need a sample DOS program written in C to send 3 byte string to COM port1 or 2.
Does anyone have a sample code about this issue?
I need the following functions to
open a port
send 3 byte string to a port and wait for return respond
close the port that has been opened.
Does anyone have a sample code about this issue?
I need the following functions to
open a port
send 3 byte string to a port and wait for return respond
close the port that has been opened.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> You can use inport and outport functions defined in dos.h header file.
inport() and outport() perform I/O from the *processor* ports, not the serial ports.
inport() and outport() perform I/O from the *processor* ports, not the serial ports.
Hi alexo,
I think we can use inport and outport for serial ports also by specifying their address or port ID . isn't it.
I think we can use inport and outport for serial ports also by specifying their address or port ID . isn't it.
Not really. Although there are processor ports corresponding to the serial ports, there is a protocol involved. You cannot just dump/read the data using in/out instructions and expect it to work.
You can use inport and outport functions defined in dos.h header file.