home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / NEWS / 554 / JUIN / NOBOOT.PAS < prev    next >
Pascal/Delphi Source File  |  1993-10-07  |  2KB  |  51 lines

  1. {─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 450 of 474                                                               
  3. From : Per-Eric Larsson                    2:203/410.15         25 Jun 93  13:00 
  4. To   : Danny Melton                        1:2210/8330.0                         
  5. Subj : disabling the CTRL-ALT-DE                                              
  6. ────────────────────────────────────────────────────────────────────────────────
  7. Monday June 21 1993 01:35, Danny Melton wrote to Bradley Wayth:
  8.  
  9.  DM> If you want to disable CTRL-ALT-DEL, there's an easy way to do it.  You
  10.  DM> need to write an interrupt service routine which ties into the keyboard
  11.  DM> interrupt (09h).  Read the key from the keyboard; if it the delete key
  12.  DM> and both the CTRL and ALT keys have been pressed, change the shift
  13.  DM> status byte in BIOS RAM to get rid of the CTRL and ALT.  Then allow the
  14.  DM> DELETE key to be processed by the rest of the interrupt handler.  When
  15.  DM> the rest of the keyboard handler is finished, restore the original shift
  16.  DM> status in BIOS RAM and return from the hardware interrupt.
  17.  
  18. --------------------------------}
  19. {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X-,Y-}
  20. {$M $800,0,0}
  21. program noboot;
  22. uses Crt, Dos;
  23. var
  24.   KbdIntVec : Procedure;
  25. {$F+}
  26. procedure Keyclick; interrupt;
  27. var
  28.  b:byte;
  29.     x,y:byte;
  30. begin
  31.   b:=Port[$60];
  32.   if b = 83 then IF (mem[$40:$17] and $0C) = $0c then begin
  33.   x:=wherex;
  34.   y:=wherey;
  35.         gotoxy(4,4);        Write('╔═════════════════╗');
  36.         gotoxy(4,5);        Write('║ boot ? Ledsen ! ║');
  37.         gotoxy(4,6);        Write('╚═════════════════╝');
  38.         gotoxy(x,y);
  39.         mem[$40:$17]:=mem[$40:$17] and $F3;
  40.  end;
  41.   inline ($9C);
  42.   KbdIntVec;
  43. end;
  44. {$F-}
  45. begin
  46.   GetIntVec($9,@KbdIntVec);
  47.   SetIntVec($9,Addr(Keyclick));
  48.   Writeln('NoBoot - Sätter Ctrl-Alt-Del ur Funktion');
  49.   Writeln('Copyright PEL-Data, Borås 1993');
  50.   Keep(0);
  51. end.