; A device raising its line with nothing installed to answer it, CAUGHT. ; ; The other half of the fault that could not be handed over. A program that asks a device to ; interrupt it and then forgets the handler used to stop the machine dead; now it goes to a ; vector of its own with the port in Q, so the program can say which device it was that ; nobody was listening to. ; ; NOTHING IS TYPED AT THIS. The console raises its line once at the end of input as well as ; for an arriving byte - which is exactly so that a program driven by interrupts is told when ; nothing more is coming - and the test is run with no input at all, so that end is what ; arrives. ; ; Correct output is: ; nobody listening on port 00 ; and a clean halt. #Include console.asm #Program start: INIA 0x02 ; Interrupt when the console has something to say. OUTA 0x02 SIF spin: ; Never touches the console. Whatever happens below is something that interrupted this. BRI spin ; Q holds the port whose entry was empty. The console is port zero. nobody: SETD.0 NobodyText CALL printString MVQA CALL printByteHex CALL newLine ; The console back to how it was found, so nothing else is asked for, and stop. There is ; nothing to resume to: the loop above only exists to be interrupted. RSTA OUTA 0x02 HALT #Data NobodyText: "nobody listening on port " #Vectors Boot start NoDevice nobody