Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Imagine you plug a dumb terminal into an RS232 port. The computer may have already sent some data. Or it may be in the middle of sending log messages to the console as you plug in.

With a code like this, your dumb terminal can be built so it just automatically works. Without it, the terminal may be off by some number of bytes, and you have to have some sort of other (probably manual) synchronization procedure.

Similarly, imagine you've dialed in over modem to a remote system. You get some errors or lost text due to noise on the phone line. Or some bytes are lost due to bad RS232 flow control or no flow control. Your terminal emulator would be able to recover.

There might also be uses where text is broadcast, such as in TV closed captions, although maybe those have their own framing so you know where strings begin.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: