disable receive_serial_data: if (RCSTA.2 = 1) then ' A framing error occurred. ' Read RCREG to clear the error but don't use the data. hserin [serial_in] else ' No framing error occurred. Wait for a LF code ' (0Ah), 5 characters, or a timeout. hserin 1000, continue, [STR received_text\5\$a] gosub respond_to_command continue: endif resume enable Listing 2. The interrupt service routine stores received data.