I work under W98SE and I use next segment of code for turn on NumLock.
'************************************
DEF SEG = 0
M = PEEK( &H417 ) 'get keyboard toggles
BIT SET M%, 5 'turn on num lock
POKE &H417, M% 'set keyboard toggles
DEF SEG
' ************************************
It works pretty good if this segment is a part of a large program.
After compiling into "LARGEPRO.EXE" NumLock is on and stay on
when program finished.
Stand alone segment works good in IDE.
After compiling stand alone segment
into "NUMLOCK.EXE" it does not work.
Why ?
Thanks for help.
Lubos
------------------
'************************************
DEF SEG = 0
M = PEEK( &H417 ) 'get keyboard toggles
BIT SET M%, 5 'turn on num lock
POKE &H417, M% 'set keyboard toggles
DEF SEG
' ************************************
It works pretty good if this segment is a part of a large program.
After compiling into "LARGEPRO.EXE" NumLock is on and stay on
when program finished.

Stand alone segment works good in IDE.

After compiling stand alone segment
into "NUMLOCK.EXE" it does not work.

Why ?
Thanks for help.
Lubos
------------------
Comment