🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3057

Re: Num-Caps-Scroll Lock

#3057
From: Dr. David Curtis
Date: Thu, 15 Nov 1990 09:57
27 lines
1391 bytes
>In article <10264@uhccux.uhcc.Hawaii.Edu>,
>swalker@uhunix1.uhcc.Hawaii.Edu (Sunny Walker) writes:
>> I am a new programmer and was wondering if it is possible to change the state
>> of the Num-Caps-Scroll Lock keys from a program, (id est, turn on/off Num Loc

In Zortech C:

#include <dos.h>

main()
{
char state; /* maybe this shoud be unsigned char */
peek(0x0,0x417,&state,1); /* get keyboard status byte */
state &= ~0x20; /* Num lock bit off */
poke(0x0,0x417,&state,1);
}

This turns off my Num lock key when I boot up.


Dave Curtis

Academic Department of Psychiatry,    Janet:       dc@UK.AC.UCL.SM.PSYCH
Middlesex Hospital,                   Elsewhere:   dc@PSYCH.SM.UCL.AC.UK
Mortimer Street, London W1N 8AA.      EARN/Bitnet: dc%PSYCH.SM.UCL@UKACRL
Tel 081-380 9475 Fax 081-323 1459     Usenet: ...!mcsun!ukc!mrccrc!D.Curtis
Technical Details
Message-ID: <332@tin.crc.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!lll-winken!uunet!mcsun!ukc!mrccrc!dcurtis
References: <10264@uhccux.uhcc.Hawaii.Edu> <90318.104843ESR@SLACVM.SLAC.STANFORD.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!lll-winken!uunet!mcsun!ukc!mrccrc!dcurtis
From: dcurtis@crc.ac.uk (Dr. David Curtis)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Num-Caps-Scroll Lock
Message-ID: <332@tin.crc.ac.uk>
Date: 15 Nov 90 09:57:58 GMT
References: <10264@uhccux.uhcc.Hawaii.Edu> <90318.104843ESR@SLACVM.SLAC.STANFORD.EDU>
Reply-To: dcurtis@crc.ac.uk (Dr. David Curtis)
Distribution: comp
Organization: MRC Human Genome Resource Centre
Lines: 27