系统如何对特殊的专用键执行操作?
每当我们使用汇编语言从用户那里获得输入时,数字/字母的 ASCII 代码存储在寄存器“AL”中。同样,我想知道如果我按“Ctrl+C”、“Ctrl+V”或“Ctrl+X”等,系统会执行哪些操作,即
- 扫描代码如何存储?
- 程序是什么?
- 系统正在使用哪些寄存器?
我主要关注的是了解硬件根据上述指令执行的内部操作。
Whenever we get input from user, using assembly language, the ASCII code of digit/letter stores in register 'AL'. In the same way I want to know if I press like 'Ctrl+C' , 'Ctrl+V' or 'Ctrl+X' etc what actions are performed by the system i.e.,
- how scan code is stored?
- what is the procedure?
- which registers are being used by the system?
Mainly my focus is to know the internal operations performed by the hardware on above instructions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从广义上讲,此功能是由 BIOS 中的键盘例程定义的。 本文档,尽管以 MS-DOS 为重点,对低级 BIOS 键盘例程提供了相当好的解释。在此处描述的标准 PC BIOS 中,您通常需要解释 AH 寄存器的值,其中包含 击键的扫描代码。例如,在标准美国 PC-AT 键盘上,左 Ctrl 的按键扫描代码为
0x1D
。In very broad terms, this functionality is defined by the keyboard routines in the BIOS. This document, although MS-DOS focused, provides a fairly good explanation of the low level BIOS keyboard routines. In the standard PC BIOS as described here, you would generally need to interpret the value of the AH register which contains the scan code of the keystroke. For example, on the standard US PC-AT keyboard, the key down scan code for left Ctrl is
0x1D
.通常,操作系统要么使用 BIOS,要么直接捕获键盘中断并从键盘提取 make/break 代码(假设键盘处于 make/break 模式,通常是这样,但不是必须如此)。
Normally an OS would either use the BIOS, or would trap the keyboard interrupt directly and pull make/break codes from the keyboard (assuming keyboard is in make/break mode, which it usually is, but doesn't have to be).