[comp.sys.ibm.pc] Caps Lock Blues?

DAVIS-M@osu-20.ircc.ohio-state.edu (Mark Davis Univ Sys) (10/22/88)

I am writing a text editor in Microsoft Quick Basic Version 4.0 and am having
trouble determining when the caps-lock key is enabled and disabled.  Is this
determined by some location in memory?????????????   If anyone can help I'd
sure appreciate it.

lupin3@ucscb.UCSC.EDU (-=/ Larry Hastings /=-) (10/22/88)

+-In article <12440256984046@osu-20.ircc.ohio-state.edu>, DAVIS-M@osu-20.ircc.ohio-state.edu (Mark Davis Univ Sys) wrote:-
+----------
|
| I am writing a text editor in Microsoft Quick Basic Version 4.0 and am having
| trouble determining when the caps-lock key is enabled and disabled.  Is this
| determined by some location in memory?
|
+----------

  Yep.  According to Peter Norton's Programmer's Guide to the IBM PC, hex 418
holds the following information:

     Bit
7 6 5 4 3 2 1 0     1=on, 0=off
X		1=Ins
  X		1=Caps Lock
    X		1=Num Lock
      X		1=Scroll Lock

  Also, int 16h function 02 returns (in AL):

     Bit
7 6 5 4 3 2 1 0     1=on, 0=off
X		Ins
  X		Caps Lock
    X		Num Lock
      X		Scroll Lock
	X	Alt
	  X	Ctrl
	    X	left Shift key
	      X right Shift key


--
 /|\ /|\   .. .  .   .    .     .      .       .        .         .          . 
| |\| |\|  .. .  .   .    .     .      .       .        .         .          .
|/|\|/|\|/||   _  _ _   _ |_| _  _ |_ -__  _  _ARPA: lupin3@ucscb.ucsc.EDU      
  | |/| |/|L_ (_\( ( (_/  | |(_\_) (_ || )(_)_)UUCP: *!ucbvax!ucscc!ucscb!lupin3
   \|/ \|/ larry      /   hastings        _/   WORK: sun!acad!metaware!funkster
  MetaWare "I'm hovering like a fly, waiting for the windshield on the freeway."
IncorporateDisclaimer:[MetaWare, UCSC]->opinion!=lhastings->opinion\\\Genesis

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (10/26/88)

In article <12440256984046@osu-20.ircc.ohio-state.edu> DAVIS-M@osu-20.ircc.ohio-state.edu (Mark Davis Univ Sys) writes:
| I am writing a text editor in Microsoft Quick Basic Version 4.0 and am having
| trouble determining when the caps-lock key is enabled and disabled.  Is this
| determined by some location in memory?????????????   If anyone can help I'd
| sure appreciate it.

There is a BIOS call to get this info. You can find it in memory, but
unless you also find a promise that it won't move why use it? I believe
that it's a subfunction of the call to read a key by scancode, but I
don't have a manual handy.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me