Assignment #2

Write a program that receives the settings for transmission through the serial port. The settings are:
  1. Word length.
  2. Number of stop bits.
  3. Parity (even, odd, or no parity).
  4. Transfer rate (given the transfer rate you must compute the baud rate).
Using the outp() function set the LCR, DLL and DLM.
Have the same program when run with a different input flag print out the current settings (using inp). The second execution should of course print the settings set by the first execution of the program.