-
Accessing Ports
Hi all. Here is my problem. I am trying to write a program that recieves text from a serial port (Comm 1 or Comm 2) and write them to a text file.
The trouble I'm running into is accessing the serial port itself. I looked up the comm ports and found there port ranges. Each has a range of 8 ports.
Anyone know which port the data is recieved and on which port the data is sent?
Once I can interface the ports I can easily send the data to the file.
Thanks for your time.
Mike
-
Borland Turbo C Version 2.01
Windows 98
-
You can open a serial port for reading and writing with the CreateFile() API function.
-
Thanks for the help. I'm not fimilar with CreateFile(). What would the syntax be?
Thanks
-
> CreateFile() API function.
That's a windows API function isn't it?
Thantos is using the oldest of the old DOS compiler
I think it's called bioscom in bios.h - well it is here in DJGPP, but
you might have to look around.
-
Thanks Salem.
I noticed you refered to my compiler as the oldest of old. I guess I'd have to agree with that. I got it from my uncle about 10 years ago and he had it awhile. Do you know of a good C compiler that is doesn't cost a whole lot?
-
Dev-C++ is a good, free Windows compiler.
DJGPP is a good, free DOS compiler.