The TTY Demystified (2008)
What would a clean-slate implementation of a serial terminal look like today?I work in embedded, and a serial terminal is practically a must in any system, if only for debug. A way to provide input and receive output.You'll definitely want a FIFOs for RX/TX. You also likely want control chars and a way to shortcut the FIFO, if only to interrupt output. The FIFO means you can abstract away the exact physical communication medium.TUI interfaces mean you also want a way to tell the program what the dimensions of your screen are, through the control chars.What else?