; A software interrupt that names a vector with nothing in it, CAUGHT. ; ; That fault used to be the one the machine had no way of handing over, because the thing ; that would hand it over is the thing that has just found nothing to hand it to. It stopped ; the machine, and no program could do anything about it - which made calling a service the ; system does not implement fatal, and that is an ordinary mistake to make. ; ; It goes to a vector of its own now, with the number of the empty entry in Q. This catches ; it, says which one it was, steps over the SWI and its operand, and carries on - so the ; output says both that the fault arrived and that a program can survive it. ; ; Correct output is: ; empty vector 28 ; carried on ; and a clean halt. #Include console.asm #Program start: SWI 0d40 ; Forty is 0x28, and nothing is installed there. SETD.0 Carried CALL printString CALL newLine HALT ; Entered because there was nowhere to go. Q holds which entry was empty, and it is the only ; thing on this machine a handler is handed in a register. missing: SETD.0 EmptyText CALL printString MVQA CALL printByteHex CALL newLine ; ---- Carrying on past it ---- ; ; The frame holds the address after the SWI and the byte naming its vector, so a bare RETI ; already lands past the instruction that faulted. That is not true of every fault here - ; a refused port or a byte that does not decode both resume ON the thing that failed - so ; it is worth saying out loud which kind this one is. RETI #Data EmptyText: "empty vector " Carried: "carried on" #Vectors Boot start NoHandler missing