On Mon, 2 Apr 2001, Christos Tranoris wrote:

> Hello
> 
> I would like to write an example program under RTL
> and I would like to access the status of NumLock for example.
> The status in dos is on a byt located on segment 0x0040 and offset 0x0017.
> As a new to RTL, how I can get this status under RTL?
> How I can read this byte at this address?
> any idea would be helpful.
> 

Unless you have a good reason for doing that from RTL, it is something
much better left to the normal linux drivers.  In DOS our programs had to
do virtually everything in one monolith, but under rt-linux you should
break your task into multiple cooperating programs instead. 
        To do special things with the keyboard and learn more about it a
good place to stat is by typing:

man dumpkeys
man loadkeys
man console
man vcs
man keytables

You can cause the NUMLOCK key to generate a unique byte sequence which you
can read with a very simple user level "C" program.  If you need to advise
your rt-linux code of the NUMLOCK state, you can simply use an rt-fifo to
pass it over.  
        If you are using X, there's a  program that's part of the linux 
X distribution you can run ( I can't remember the name, sorry...) that
will dump X events to the screen.  Also the tcl/tk language has extensive
capability to bind keys to events.  Try "man n bind" for more info.

-Wayne


-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to