Path: 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 > In 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).