我看过以下内容topic https://stackoverflow.com/questions/219120/x86-assembly-protected-mode-keyboard-access.
我有兴趣通过 IN / OUT 指令联系键盘并设置各种模式,例如打开大写锁定 LED。到目前为止,我在这样做时遇到了问题。
下列link http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH20/CH20-2.html可能有帮助。
我尝试过各种组合,例如
mov al,0EDh ;ED command - Send LED bits. The next byte written to port 60h updates the LEDs on the keyboard.
out 60h,al ;out on port 60h
mov al,00000111b ;led status - all leds on. bits 3-7 = reserved(zero)
out 60h,al ;out on port 60h
我将不胜感激任何帮助。
谢谢。
编辑:
正如我所说,使用端口 60h 不起作用
我在网上搜索了 0040:0017 的用法。
其中一篇网站指出,第 5、6、7 位包含有关 LED 状态的数据
我尝试使用这段代码:
mov al,es:[0017h]
or al,11100000b
mov es:[0017h],al
它也不起作用。
我可能做错了,所以有人可以帮助我或给我发送一个打开所有 3 个 LED 的工作代码吗?
EDIT2:我在安装在虚拟机上的 MS-DOS 上运行了我的应用程序,并且代码运行良好。
我的问题是:如何让它在 MS-DOS 之外工作?