Article View: comp.os.msdos.programmer
Article #5161Re: Disabling an Internal DOS Command
From: Doug Stevens
Date: Tue, 12 Mar 1991 18:15
Date: Tue, 12 Mar 1991 18:15
20 lines
1199 bytes
1199 bytes
> In <LEVERICW.91Mar4113004@cheetah.ece.clarkson.edu> levericw@cheetah.ece.clarkson.edu (Walden Leverich) writes:
>
> >> Is there any way to set the state of the NumLock key. I already know
> >> how to detect the state of the key, but what I really need to do is
> >> set it to be either on or off. Any help would be appreciated.
>
Here's what I use (it turns off the light on my machines, too):
#define KEYBD_STATUS_BYTE ((char far *)0x00400017L)
#define NUM_LOCK_MASK 0x20
void main(void)
{
*KEYBD_STATUS_BYTE &= ~NUM_LOCK_MASK;
}
(obviously, it can be made smaller in asm language, but I wanted something
quick and dirty).
Technical Details
Message-ID:
<6326@videovax.tv.tek.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!zephyr.ens.tek.com!videovax!dougsReferences:
<1991Mar4.151301.12925@cbnewsk.att.com> <1991Mar6.233821.15345@bradley.bradley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!zephyr.ens.tek.com!videovax!dougs From: dougs@videovax.tv.tek.com (Doug Stevens) Newsgroups: comp.os.msdos.programmer Subject: Re: Disabling an Internal DOS Command Summary: Turning off numlock Message-ID: <6326@videovax.tv.tek.com> Date: 12 Mar 91 18:15:03 GMT References: <1991Mar4.151301.12925@cbnewsk.att.com> <1991Mar6.233821.15345@bradley.bradley.edu> Distribution: usa Organization: Tektronix TV Measurement Systems, Beaverton OR Lines: 20