Subject: Re: Reverse Num-Lock problems
From: [email-masked] (Alan Sickels)
Date: 19 Apr 89 23:52:10 GMT

[email-masked] (Bob Calbridge) writes:
>Here's a problem that has started to pop up lately at our school district.
>Under certain circumstances the numeric key pad acts contrary to what the
>numlock light says.  We suspect anything from the keyboard to the software.

I've got an XT clone and it happens quite frequently to me.  This is what
is happening:  The true NUM-LOCK state on PC/XT's and clones is stored in
memory in bit 5 of byte 0040:0017H.  With the AT and 386's, the keyboard
communication is two way and the keyboard lights reflect the true state
of the memory location.  The PC/XT's can't do that so it's kept track of
independent of the true state.  This also annoyed me so I wrote a quick
assembly program to turn all the indicator bits off (i.e. NUM-LOCK,
CAPS-LOCK, and SCROLL-LOCK) and just make sure all the lights are off
when I run it.  Source code included.

   MOV     AX,0040H
   MOV     DS,AX
   MOV     BX,0017H
   AND     BYTE PTR [BX],8FH
   MOV     AH,4CH
   INT     21H

Alan Sickels