toggle numlock with assembly
I need a simple program that toggles numlock key, to be written in assembly. I googled this problem and I found these pages:
Art of Assembly 1
Art of Assembly 2
but beca开发者_开发百科use of my little experience in assembly, they lead me to no where. any idea and help appreciated.
If you don't mind using the Windows API, then look into the keybd_event function. I'm pretty sure you can call it from assembly. Just google how to do it. I have successfully used this function in VB.Net to toggle CAPS Lock. I have not programmed in Intel assembly language in about 8-9 years.
http://msdn.microsoft.com/en-us/library/ms646304(v=vs.85).aspx
Call SendInput. It's possible to call this from assembly, although much easier through a higher-level language. For instance, you could write the SendInput call in C, then call your C routine from assembly.
精彩评论