Sunteți pe pagina 1din 2

Disabling AT Key Lock Switch via 8042 Keyboard Controller

Or How To Boot a Key Locked AT without the Key


(C) 1990 Pierre R. Desloover for Ataspec Software

The mechanics of disabling the key lock sensing on an AT system

"The most surprising aspect of the keyboard controller is its


ability to be programmed to ignore the lock switch on the front
panel. If bit 3 of the command byte is turned on, the keyboard
is active no matter what the position of the lock."

To disable key lock via 8042, simply issue write command to 8042 Status
Port (64H), test and wait until the 8042 Status Port (64H) bit 1 is
clear, then send the subsequent command byte 4DH to 8042 Port A which
is the data port for the 8042 and 6805.

Featured utility NOKEYLOK.COM

The utility NOKEYLOK.COM featured in this article does exactly that.


If you were to run this utility and then lock your AT computer with the
key, your system would still be able to receive keyboard input because
the utility has disabled the system's keylock sensing ability. This is
a fine exercise, but let's put the utility to a more practical use. Let's
say your AT system is not on and key locked and you've forgotten or
misplaced your key. How would you then unlock your AT?

Unlocking a locked AT at system boot-up time is another matter however


since the ROM BIOS will sense that the keyboard is locked, issue the
"Keyboard is locked - please unlock - Strike the F1 key to continue"
error message, and will refuse to complete the boot-up process until
it is unlocked and able to receive keyboard input. This would seem
like a dead end and time to call the locksmith or find the key, but
I have discovered a way to get around even this problem. First place
the NOKEYLOK.COM utility program in the autoexec.bat of a bootable
diskette, preferably before the occasion arises that you need to unlock
your locked AT system and don't have the key. Next, complete the
following steps and your keyboard should be fully operative!

Steps to unlock your AT without a key

1 - Power off computer if not already off.

2 - Insert bootable diskette with NOKEYLOK.COM utility in the


Autoexec.bat file into drive A:. Close drive door.

3 - Unplug AT Keyboard cord from computer.

4 - Power on computer. Note: the ROM BIOS boot-up process will hang
momentarily, but then display "Keyboard failure" error message and
continue the system initialization. The system will then boot
the operating system off of drive A: and process the Autoexec.bat
file which will execute the NOKEYLOK.COM utility.

5 - Plug AT Keyboard cord back into computer.


Unassembled DEBUG listing of the NOKEYLOK.COM utility

-u 100 l17

1BF4:0100 FA CLI
1BF4:0101 B060 MOV AL,60
1BF4:0103 E664 OUT 64,AL
1BF4:0105 31C9 XOR CX,CX
1BF4:0107 E464 IN AL,64
1BF4:0109 A802 TEST AL,02
1BF4:010B E0FA LOOPNZ 0107
1BF4:010D B04D MOV AL,4D
1BF4:010F E660 OUT 60,AL
1BF4:0111 FB STI
1BF4:0112 B8004C MOV AX,4C00
1BF4:0115 CD21 INT 21
-q

S-ar putea să vă placă și