a c program for interacting with serial ports