Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!ucla-cs!wales From: wales@valeria.cs.ucla.edu (Rich Wales) Newsgroups: comp.sys.ibm.pc Subject: Re: CTRL-ALT-DEL key Message-ID: <22000@shemp.CS.UCLA.EDU> Date: 19 Mar 89 22:17:34 GMT References: <1623@arctic.nprdc.arpa> Sender: news@CS.UCLA.EDU Reply-To: wales@CS.UCLA.EDU (Rich Wales) Organization: UCLA CS Department, Los Angeles Lines: 49 In article <1623@arctic.nprdc.arpa> snguyen@nprdc.arpa (Son Nguyen) writes: I just wonder if (possibly done) we could write a program to detect the pressing of these three keys: CTRL-ALT-DEL. In other words, can I write a software in the "C" language or in IBM assembly language to detect and maybe disable them? I sent Son a reply via e-mail -- then decided that it might well be of general interest, so I'm posting my comments too. My understanding is that the CTRL/ALT/DEL combo is detected in the ROM BIOS "interrupt 09h" handler -- the routine that, among other things, translates keyboard scan codes into the corresponding characters. Hence, writing a normal program to intercept CTRL/ALT/DEL wouldn't work, since your program would never get a chance to see the offending key combination. You've got to hook up to the Int 09h vector and check for CTRL/ALT/DEL *before* the BIOS routine does -- or else write your own complete Int 09h handler and run it in place of the ROM BIOS code. If you are willing/able to work with assembly language, you might grab a copy of a program called FASTBUFF (available via anonymous FTP from WSMR-SIMTEL20.ARMY.MIL; file name PD1:FASTBUFF.ARC; about 28K bytes long). FASTBUFF is a keyboard buffer extender for PC's and XT's, and it interposes its own processing ahead of the system's own Int 09h handler in the BIOS. By modifying FASTBUFF, you can definitely do some novel things. I, for example, added an option to my copy of FASTBUFF so I could rearrange the ESC, BS, and `/~ keys on my XT clone's 84-key keyboard. These keys are now in the same places as the corresponding keys on my Sun workstation at school (I even pried off and rearranged the key caps!). You might be able to add some code to FASTBUFF to check for CTRL/ALT/DEL and prevent a call to the BIOS Int 09h handler as long as that combina- tion was held down. I haven't tried this myself, but you would check for the DEL key's scan code (53h), plus the CTRL and ALT bits in the status byte at RAM location 00417h. If you aren't familiar with SIMTEL20, remember that it's a DECsystem-20 with 36-byte words. To FTP a binary file from SIMTEL20 to a UNIX sys- tem, use the command "tenex" (*NOT* "binary" or "bin") first to set the proper data transfer mode. -- Rich Wales // UCLA Computer Science Department // +1 (213) 825-5683 3531 Boelter Hall // Los Angeles, California 90024-1596 // USA wales@CS.UCLA.EDU ...!(uunet,ucbvax,rutgers)!cs.ucla.edu!wales "Now, drop your weapons, or I'll kill him with this deadly jelly baby."