A processor access input/output devices via input/output (I/O) locations. An I/O location is much like a memory location. Some processors access I/O location via special instructions. Others map certain regions of memory to access I/O devices.
Regardless of the access method, each I/O device has several I/O locations that allow a processor to communicate with it. For example, a serial port (for asynchronous serial communication) has a transmit data register (not to be confused with a processor register) to store a single byte to be transmitted.
However, a serial port also has at least one control register to control its behavior and report status. For example, at least one bit relates to whether the byte in the transmit data register is done transmitting. Other bits control the number of data bits, stop bits, baud rates, and other attributes.
For receiving a byte, a read-only bit of an I/O register indicates whether a received byte is ready to be read from a receiver data register. Most serial ports are at least double buffered. This means that as a byte is fully received in the shift register, it is placed in the receiver data register. However, the next byte will then be received in the shift register. without overwriting the receiver data register.
When two bytes are fully received, then the second byte overwrites the first one in the receiver data register if a serial port is only double buffered. Most serial ports have a depth of 16-bytes. This means that they can receive up to 16 bytes (without taking any byte off for processing) before a byte is lost.