This is implemented in uart
uart
A very basic UART driver, connects to 0x3F8 port (COM1). And can be read and written to.
0x3F8
It is used by the console to print and read characters.