TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: JAMES VAHN
from: ROBERT GLODT
date: 1997-10-06 18:40:00
subject: Re: lock keys

 * Reply to msg originally in 80xxx
 -=> Quoting James Vahn to Robert Glodt <=-
 JV> Mmm.. Some BIOS require that you call 16/1 to update things..
 JV> mov  dx,0040h           ; Set Data segment to 0040h
 JV> mov  ds,dx
 JV> mov  bx,0017h
 JV> mov  al,[bx]            ; Get the byte at 0040:0017
 JV> xor  al,00100000b       ; Toggle bit 5, NumLock
 JV> mov  [bx],al            ; Put it back into 0040:0017
 JV> mov  ah,1
 JV> int  16h                ; Update Keyboard.
 JV> ret
 JV> Here's one that talks to the ports. 
that worked. but when i put it in a loop (do/while) in C++ it locks
up the computer, no ctrl-break, so i gotta reboot. I don't know exactly
how many time i'm gonna have to tell ya'll how horrible i am at assembly.
I use it so sparingly that i don't know what to do other than to type what
you put in your letters and to change the numbers. thas what i did and it
only seems to do the NumLock key (10000000b,01000000b,00100000b, etc..).
i even removed the 'ret' to see wat'd happen, nuthin there... i'm not sure
how i'm supposed to addapt this to make all 3 lights flicker a bit and then
sontinue on with my program...
... Corvette, the ultimate of ultimates
___ Blue Wave/DOS v2.30 [NR]
--- Maximus/2 3.01
---------------
* Origin: Micro-Addictus Hospital (1:346/7)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.