The RS-232 protocol - YouTube
Ben shows how to bitbang a RS232 input on his 6502 breadboard computer.
Well done explanation how RS232 works and how to do that with a simple input port on a 6502.
It is not identical but close to how the KIM-1/PAL-1 getch routine works.
The KIM-1 is a bit more intelligent, since it adapts to the baud rate, Ben uses 9600 fixed in (half-) bit delay functions.