-
Programming a Com port
I am trying to re-create an old BASIC program in 'C' to send data to a COM port.
The old program used the open statement ie "OPEN "COM1:4800,N,8,1" AS #1"
and then used PRINT#1,CHR$(0);CHR$(0);CHR$(0);CHR$(0);M$ to send the commands to a Yaesu 757 radio. M$ commands are from ASCII Chr 1 to 9 which are shown on a simple menu selection. Ive been able to recreate the simple menu program in 'C' but I have not been able to find out how to write it in 'C'. The old basic program works with Windows XP, 98, 95 ets without any problems. Any help is appreciated.....
-
Googling brought this:
http://forums.devshed.com/c-programm...2t-162565.html
Use C the file functions like fopen(), or the C++ fstream stuff, and you're good to go.