How to control I/O in Linux?

Do anyone know how to program to control I/O - through RS 232?
For example VC++, inport & outport.
Any comment?

Have you tried to control your I/O through you bios? If not, once you boot your computer, hit F1 or delete, some older models will tell you to hit F2, to go into your Bios utilities. Then go to your power source. it will have I/O set up, and CPU cooling.Then run your program through this set up.

The following algorithm works on Unix OS , I hope it does so on Linux.

First open the non modem control com port by issusing open ( ) function.Then save the current serial port settings by tcgetattr( ) function.Now intialize the terminal settings and all control characters for the port.Clean the line and activate the settings for the port.In an conditional loop do read/write operation.