how to access ports in UNIX

How to access to COM1 Port COM2 ports in UNIX
is there any functions

Please refer unix network programming by Richerd Stevens