at 0040h:0017h is the byte that holds the status of this (and other) keys.
with 0 the list significant bit, and 7 the most significant bit, bit 4 set : scroll-lock is onbit 5 set : num-lock is activebit 6 set : caps-lock is active
check the following examples:
turn on scroll-lock:
mov bx,40hmov ds,bxor byte ptr [17h],10h ; (00010000 binary)
turn off num lock:
mov bx,40hmov ds,bxand byte ptr [17h],0DFh ; (11011111 binary)
if caps-lock is on, turn it off, if it is off, turn it on:
mov bx,40hmov ds,bxxor byte ptr [17h],40h ; (01000000 binary)
hope I helped
It looks like you're new here. If you want to get involved, click one of these buttons!