Programming
The interface driver processes can be described simply:
INPUT: Wait until an input buffer is available
Wait until IMP ready
Start input
Wait until input is complete
IF Input Error
THEN clear Input Error // Flush smashed message. Input
// buffer will be reused.
ELSE queue message on input queue
GOTO INPUT
OUTPUT: Wait until a message is present on output queue
Wait until IMP ready
Start output
Wait until output is complete
IF Output Error
THEN clear Output Error // smashed message is flushed
ELSE deque message from output queue // Free up
// output buffer
GOTO 0UTPUT
The only initialization required for system startup or restart is clearing the host READY flop, waiting 1/2 second, and setting the host READY flop. Simply starting (or restarting) the above processes will properly resynchronize host-IMP communication. As explained in RFC #636, the IMP ready line (and error flops) should only affect the two processes above: this resynchronization should be invisible to the NCP, and should have no effect on the connection data base. The NCP will be resynchronized or reinitialized by the type 10 IMP-to-host message "interface was reset."
Actually, it is possible to share a single Error flop between the input and output processes by implementing Input Error and Output Error as software flags. A process testing for error must test both the Error flop and its own flag. An interlock is required (e.g. a mutual exclusion semaphore) to guarantee that only one process at a time is testing and modifying the flags. If the Error flop is set, the process must copy it into the other process' flag before clearing the flop and its own flag.