serial port routines

Does anybody have a library of serial port routines??   I will be changing
code that has been in use for 15 years.  I will add a 5 port serial card to
a PC where a operator will enter numbers via a numeric keypad.

thanks...

Darryl