🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.msdos.programmer
5 messages
5 total messages Started by RHEAUME, MICHEL Mon, 28 Sep 1992 02:15
Toggling NumLock
#641
Author: RHEAUME, MICHEL
Date: Mon, 28 Sep 1992 02:15
13 lines
836 bytes
As simple as it sounds, I can't think of a way to
toggle the NumLock key (through software of course!).

It's not anywhere in the ASCII charts, buy I'd like 
to do this through software since it's on everytime
I boot my machine, and I'm getting too lazy to reach
alllll the way over to the keypad to kill it.

anyone? anyone?

A N    D        R                E                                       W

sig(h)  
Re: Toggling NumLock
#646
Author: DAVID SCOTT PASCHAL
Date: Mon, 28 Sep 1992 14:49
22 lines
1056 bytes
Hi.  Just zero out the word at address 0040:0017h and this will turn everything
(caps/num/scroll lock, insert toggle, etc.) off.  Here's some assembly-language
code you can try:

; NONUMLOK.ASM.

		.model		tiny

Code		segment
		assume		cs:Code
		org		100h
Start:		mov		ax,40h
		mov		ds,ax
		mov		word ptr ds:[17h],0
		mov		ax,4C00h
		int		21h
Code		ends
		end		Start

Tschuess,
David Paschal
Re: Toggling NumLock
#647
Author: Kevin Gallagher
Date: Mon, 28 Sep 1992 16:33
25 lines
1731 bytes
In article <27SEP199221155761@pavo.concordia.ca> m_rheau@pavo.concordia.ca (RHEAUME, MICHEL) writes:
>As simple as it sounds, I can't think of a way to
>toggle the NumLock key (through software of course!).

The 1st Edition of PC Magazine's DOS Power Tools book comes with a disk
containing two 46 byte com files entitled NUMOFF.COM and NUMON.COM.
Unfortunately, they did not include the source.  However, I think these are
probably available for download from the PC Magazine BBS.

Notice I said the 1st Edition.  The 2nd Edition of the book, which has been
updated to cover MS-DOS 5.0, no longer has these two programs on the software
disks that come with the book.

I am sure there are public domain programs which do the same thing, but I
don't personally know of any.

Newer systems provide a setup option which allows you to select the default
setting which NUM LOCK should have at the completion of a system boot.
Perhaps your's has this option and you just didn't notice.

-- 
----------------------------------------------------------------------------
Kevin Gallagher        kgallagh@digi.lonestar.org OR ...!uunet!digi!kgallagh
DSC Communications Corporation   Addr: MS 152, 1000 Coit Rd, Plano, TX 75075
----------------------------------------------------------------------------
Re: Toggling NumLock (C source included)
#649
Author: John Steele
Date: Mon, 28 Sep 1992 22:33
39 lines
1929 bytes
In <1992Sep28.163323.10278@digi.lonestar.org> kgallagh@digi.lonestar.org (Kevin Gallagher) writes:

>In article <27SEP199221155761@pavo.concordia.ca> m_rheau@pavo.concordia.ca (RHEAUME, MICHEL) writes:
>>As simple as it sounds, I can't think of a way to
>>toggle the NumLock key (through software of course!).

>The 1st Edition of PC Magazine's DOS Power Tools book comes with a disk
>containing two 46 byte com files entitled NUMOFF.COM and NUMON.COM.
>Unfortunately, they did not include the source.  However, I think these are
>probably available for download from the PC Magazine BBS.

Here's some Microsoft source to turn it off (should work under Borland's 
also, but I haven't tried it):

/*
 *  NUMOFF.C - Turns the NumLock off
 *
 *  cl -Ox numoff.c
 */

#if !defined(MK_FP)
#define MK_FP(seg,ofs)  ((void far *) (((unsigned long)(seg) << 16) | \
                        (unsigned)(ofs)))
#endif

main ()
  {
  *(int far *) MK_FP (0x40, 0x17) &= 0xDF;
  }

Enjoy,
  John
-- 
#include <disclaimer.h>			/* route all flames to /dev/null  */
/**************************************************************************/
/*   Systems Analyst      | John Steele     email: jsteele@netcom.com     */
/* Video Business Systems |                                               */
/*   1-800-255-3088       |    Most people spell COBOLSUX incorrectly...  */
/**************************************************************************/
Re: Toggling NumLock
#669
Author: Keith Rice
Date: Thu, 01 Oct 1992 01:10
27 lines
1821 bytes
In <1992Sep28.163323.10278@digi.lonestar.org> kgallagh@digi.lonestar.org (Kevin Gallagher) writes:

>>As simple as it sounds, I can't think of a way to
>>toggle the NumLock key (through software of course!).

>The 1st Edition of PC Magazine's DOS Power Tools book comes with a disk
>containing two 46 byte com files entitled NUMOFF.COM and NUMON.COM.
>Unfortunately, they did not include the source.  However, I think these are
>probably available for download from the PC Magazine BBS.

If they're only 46 bytes each then uuencode them and post them here.
If somone wants the code they can look at the executable with DEBUG
and figure it out.  That should be a piece of cake since they're so
small.  As far as the BBS is concerned, it's no longer in existence
as a BBS.  It's been converted to a section of CompuServe called
PCMagNet (GO PCMAG).

--
_____________________________
__-----____--___--__-----____	D. Keith Rice
__--__--___--__--___--__--___	University of North Texas
__--___--__--_--____--___--__	Department of Computer Science
__--___--__----_____--__--___	Denton, Texas, USA
__--___--__--_--____--_--____
__--__--___--__--___--__--___	drice@ponder.csci.unt.edu
__-----____--___--__--___--__
_____________________________
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads