Gday Bojan
I use the freeware AsynchPro with D6,
http://sourceforge.net/projects/tpapro/
and it does everything you could ever want.
Lots of worked examples too.
I see its valid for D4 but i've never tried it with that.
Otherwise, you can use simple embedded assembler code to read/write as long as you use something like Userport to disable the Windows port security.
Andrew