[comp.sys.ibm.pc] Disabling the Keyboard

mcdonald@uxe.cso.uiuc.edu (09/30/88)

You don't say why you want to do this (disabling the keyboard),
but in general it is a bad idea. Bad thing can happen - the user
might have left a disk out of a drive, and the dread "abort, retry,
fail" message appears, and if the the keyboard is disabled, he
has to hit the big red switch. Other thinga can cause similar problems.
It is better to trap things and arrange to have your program die
gracefully. Control break and control c can be trapped by poking
the address of a handler function in absolute location 0x8c. You
need to read the DOS manual carefully to do this right. I think
that programs that trap ctrl-alt-del are EXTREMELY badly behaved - 
if a program gets stuck, it is much healthier on hard disks if a
reboot can be done by software rather than by turning off the 
switch.  You might also look into the interrupt vector at 0x90,
the DOS critical error handler.