home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / ibm / pc / misc / 10960 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.4 KB

  1. Path: sparky!uunet!mcsun!uknet!axion!pcellik
  2. From: pcellik@axion.bt.co.uk (Peter SPHINX Cellik)
  3. Newsgroups: comp.sys.ibm.pc.misc
  4. Subject: Re: Suppress Booting by Ctrl-Alt-Delete
  5. Keywords: Booting, Ctrl-Alt-Delete
  6. Message-ID: <1992Jul29.092129@axion.bt.co.uk>
  7. Date: 29 Jul 92 08:21:29 GMT
  8. References: <1992Jul28.071823.26750@Informatik.TU-Muenchen.DE>
  9. Sender: news@axion.bt.co.uk
  10. Reply-To: pcellik@axion.bt.co.uk (Peter SPHINX Cellik)
  11. Organization: British Telecom Research Labs
  12. Lines: 84
  13.  
  14.  
  15. In article <1992Jul28.071823.26750@Informatik.TU-Muenchen.DE>, listl@Informatik.TU-Muenchen.DE (Andreas Listl) writes:
  16. |> 
  17. |> Hello,
  18. |> 
  19. |> I am looking for a TSR-Program (TSR = Terminate and stay resident) which 
  20. |> prevents the computer of beeing booted, if someone presses Ctrl-Alt-Delete.
  21. |> A small C-Program would be fine.
  22. |> 
  23.  
  24. How about a small C-- program:
  25.  
  26. /*
  27.     Title:  NOBOOT.C--
  28.     Description:  A small TSR program that disables the <CTRL><ALT><DEL> reboot.
  29.     Run File Size:  254 bytes.
  30. */
  31.  
  32.  
  33. ?include "KEYCODES.H--"
  34.  
  35. word oldkeyhandle[2]={};
  36. byte altflag=0,ctrlflag=0;
  37.  
  38. ?define s_upctrl s_ctrl+128
  39. ?define s_upalt  s_alt+128
  40.  
  41.  
  42. interrupt keyhandle ()
  43. {
  44. $ PUSH DS
  45. $ PUSH AX
  46. DS = CS;
  47. $ IN AL,KEYBOARD_PORT
  48. IF( AL == s_alt )
  49.     altflag = 1;
  50. ELSE IF( AL == s_ctrl )
  51.     ctrlflag = 1;
  52. ELSE IF( AL == s_upalt )
  53.     altflag = 0;
  54. ELSE IF( AL == s_upctrl )
  55.     altflag = 1;
  56. ELSE IF( AL == s_del )
  57.     IF( ctrlflag == 1 )
  58.         IF( altflag == 1 )
  59.             {@ EATKEY();
  60.             @ EOI();
  61.             $ POP AX
  62.             $ POP DS
  63.             return();
  64.             }
  65. $ POP AX
  66. $ POP DS
  67. $ JMP FAR CSWORD[#oldkeyhandle]
  68. }
  69.  
  70.  
  71. main ()
  72. {
  73. @ WRITESTR("NOBOOT installed.  <CTRL><ALT><DEL> is now disabled.\n");
  74. @ GETINTVECT(#oldkeyhandle,KEYBOARD_INT);
  75. @ SETINTVECT( ,KEYBOARD_INT,CS,#keyhandle);
  76. @ KEEP( , , ,#main);
  77. }
  78.  
  79. /* end of NOBOOT.C-- */
  80.  
  81.  
  82. C-- is a low level language that is a mix between C and 8086+ assembly.
  83. C-- is currently Pre-Beta, and the Pre-Beta version is currently available
  84. as FreeWare.  Since it is still Pre-Beta, it is not widely distributed as
  85. yet.  I can send you a ZIP of it if you wish, that is if we work out a way
  86. to get the ZIP to you.
  87.  
  88. I don't know how large the resident code is of the TSR, but my guess is
  89. under 220 bytes, not too bad.
  90.  
  91.         SPHINX
  92.  
  93.  
  94. ====================================================
  95. === Kill others only if you wish to be killed.   ===
  96. ===                                       SPHINX ===   
  97. ====================================================
  98.