Simple C or C++ script to read serial port buffer

hi!!

i am using turbo compiler. and i need a c++ code to read data from serial port and write it to a file. could someone please mail me the code. its urgent please.

[email protected]

thanks
 
C

Curt Wuollet

I'd be happy to except that the serial port code for Linux would probably not compile. The IO stuff is where C compilers vary with the operating system and the implementation. In fact, the serial port functions are not a part of the C language, they are system calls. It shouldn't be hard to find an example, I'm sure someone has published a Turbo C terminal emulator or the like. The closest I might come is some ancient Mix C code.

Regards
cww
 
>you can read a data from the serial port using turbo C compiler, use inport and outport to read. if you want the code mail me. i will send you. <

Can you please help me by sending the code of the same

NP, neha.0312 [at] gmail.com
 
Hi neha,

i would be very thankfull if u plz send me the c code for reading data bytes from serial port like rs232 or COM.

-my email is shashank_gs [at] yahoo.co.in
 
Top