Working serial port functions, and a debugger-type thing.