Terminal Driver
Unlike in 391, we have a serial port instead of a keyboard. The functionality should still be the same though: Data received on the serial port should be interpreted just as a key press would be. In the words of 391:
When printable characters are typed at the keyboard, they should be displayed to the screen. You will need to keep
track of the screen location for this purpose. You do need to support scrolling and will need to interpret CTRL-L (non-
printable key) as meaning “clear the screen and put the cursor at the top” which will make your testing experience
more pleasant. You do also need to support backspace and line-buffered input. That is, when a read system call is
made to the terminal, you must only return data after the user presses enter. Until that time, data should be buffered
in the driver and edited appropriately (deleted from both screen and buffer when backspace is seen, etc.). The size of
buffer should be 128 characters.
Keep in mind that you will also want to have an external interface to support delivery of external data to the terminal
output. In particular, write system calls to the terminal should integrate cleanly with keyboard input. The hello
program in the file system will help to test the basics, and can be used to understand how user programs pass parameters
to your terminal.