When an interrupt occurs, the event handler would typically perform the following steps: 1) find out what action needs to be taken, 2) perform the needed action, 3) perform whatever interface specific action is necessary to acknowledge the interrupt, and 4) re-enable interrupts with the ENABLE INTR command. The following example shows the typical sequence of statements used for interrupt set up and handling:
10 ON KBD CALL To_modem
20 ON INTR 9 CALL From_modem !Tell BASIC to interrupt