I need to read(write) bytes from(into) a serial port in windows (need to connect 2 comps).
Can some 1 give examples for:

1. read a byte into comx
2. write a byte into comx
3. check if a byte in comx is availible
4. Initialise a port

(something like bios int 14H in dos mode)

or are there any functions availible in windows ? (where to find/documentation, examples etc.)

I write a prog. in Visual Basic 5.0 Learning Edition (doesent allow MSComm32.ocx :( ),
so i have to make a dll with NASM).

Can i write(read) bytes directly into 3f8-3ff (com1) ?

hope some 1 can help , thx
Posted on 2002-11-09 12:20:51 by tom9786
The serial ports are accesed like files.
That means: call CreateFile

The name of the file to open should be like "\\.\COM2"

I "think", though Ive never played with it myself.

But check out
search for createfile, more info...
Posted on 2002-11-09 13:16:26 by assant
The filename can be "COM2" without \\.\
You should read the MSDN
Posted on 2002-11-09 14:41:25 by greenant

Read Thread Serial Port I/O
Posted on 2002-11-10 13:13:43 by minor28