网站大量收购独家精品文档,联系QQ:2885784924

VC驱动模拟按键(国外英文资料).doc

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VC驱动模拟按键(国外英文资料)

VC驱动模拟按键(国外英文资料)Driver stage simulationIn the DOS era, when the user presses or let go of a key, can produce a keyboard interrupt (if the keyboard interrupt is allowed), so that the program will jump to the keyboard interrupt handler to perform in the BIOS. Open the Windows device manager, and you can see that the keyboard controller is controlled by two ports. The h60 is the data port, which can read the keyboard data, while the h64 is the control port for sending out the control signal. That is, from H60 port information can read the keyboard keys, when from the port to read a byte, the bytes of low seven is the key scan code, the higher one is said a press key or release the key. When pressing the key, the highest level is 0, which is called the passcode, and when the key is released, the highest level is 1, which is called the broken code. Since reading data from this port can get the key information, you can write the data to the port to simulate the key! Friends who have used QbASIC4.5 may know that there is an OUT command in QB that can write data to the specified port, while the INP function can read the data for the specified port. So lets take a look at how we can write code using QB:If you want to simulate pressing the next key, the scan code for this key is h50, so thats itOUT h64, hd2 send data HD2 to port h64 port. This is a KBC command that indicates that the data will be written to the keyboardOUT h60, h50 send the scan code h50 to port H60, indicating that the emulation is the key of the scan code for h50So what about the release of this bond? Like this, the break code that sends the key:OUT h64, hd2 send data HD2 to port h64 port. This is a KBC command that indicates that the data will be written to the keyboardOUT h60, (h50 OR h80), you can take the scan code h50 with the data H80 OR operation, you can get the high position 1, get the broken code, and express the release of the keyOkay, now the question is how to write data to the port in VB.

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档