SetKeyBoardLeds:
push eax
mov al,0xed
out 60h,al
KeyBoardWait:
in al,64h
test al,10b
jne KeyBoardWait
mov al,byte [keyBoardStatus]
and al,111b
out 60h,al
pop eax
ret
例如,
mov [keyBoardStatus],0xb0 ; Initialise keyboard LED state
call SetKeyBoardLeds
;--------------------------------- This will toggle CapsLock LED
xor [keyBoardStatus],4
call SetKeyBoardLeds
;---------------------------------
and [keyBoardStatus],0xfb
call SetKeyBoardLeds
2条答案
按热度按时间9wbgstp71#
例如,
其中keyBoardStatus是一个字节(它将保存当前的键盘LED状态)。
xggvc2p62#
您可以读取my code以供参考:
压榨: