{ Questa unit disabilita Ctrl-Alt-Del.  Usarla Š facilissimo: basta includere
  la unit nel programma e... dimenticarla! }


Unit NoBoot;  { By Pino Navato }

interface

  { This unit doesn't export anything! }


implementation
uses Dos;

var KbdIntVec   : Procedure;
    OldExitProc : pointer;


procedure ExitHandler; far;
   begin
      ExitProc := OldExitProc;
      SetIntVec($9, Addr(KbdIntVec))   { Restore old vector }
   end;


procedure NewInt9; interrupt;
begin
   if (Port[$60] = 83) and ( (mem[$40:$17] and $0C) = $0C ) then
      port[$20] := $20   { Send End Of Interrupt to interrupt controller }
   else
      begin
         inline ($9C);   { PUSHF - Push flags }
         KbdIntVec       { Call old INT 9 }
      end
end;


begin  { Initialization }
   GetIntVec($9, @KbdIntVec);
   SetIntVec($9, Addr(NewInt9));   { Insert ISR into keyboard chain }
   OldExitProc := ExitProc;
   ExitProc := @ExitHandler
end.
