zoukankan      html  css  js  c++  java
  • Keyboard Toggle Keys

    TITLE Keyboard Toggle Keys (Keybd.asm)
    
    Comment !
    The following example program demonstrates GetKeyState by checking the states of the Num-
    Lock and Left Shift keys:
    
    Last update: 05/02/2002
    !
    
    INCLUDE Irvine32.inc
    INCLUDE Macros.inc
    
    ; GetKeyState sets bit 0 in EAX if a toggle key is
    ; currently on (CapsLock, NumLock, ScrollLock).
    ; It sets the high bit of EAX if the specified key is
    ; currently down.
    .code
    main PROC
    INVOKE GetKeyState, VK_NUMLOCK
    test al,1
    .IF !Zero?
    mWrite <"The NumLock key is ON",0dh,0ah>
    .ENDIF
    INVOKE GetKeyState, VK_LSHIFT
    test eax,80000000h
    .IF !Zero?
    mWrite <"The Left Shift key is currently DOWN",0dh,0ah>
    .ENDIF
    exit
    main ENDP
    END main
  • 相关阅读:
    7月17日
    7月16日学习记录
    7月15日学习记录
    git 学习
    投稿相关
    ubuntu16.04 安装以及要做的事情
    python学习使用
    图像相关
    不识别移动硬盘
    深度学习
  • 原文地址:https://www.cnblogs.com/dreamafar/p/5978731.html
Copyright © 2011-2022 走看看