论文部分内容阅读
键盘是计算机最常用的输入设备,了解键盘与计算机之间的通信过程,对于编制程序是非常重要的。键盘缓冲区,是计算机键盘输入过程中的一个重要环节,也是程序员关注的地方。所谓键盘缓冲区,是一个环型队列,用来临时保存从键盘输入的字符,它的结构如附图所示。在BIOS数据区中有完整的关于缓冲区的信息和物理结构,BIOS数据区段址为0040H,具体信息位置如下:1A—1B:缓冲区的首指针1C—1D:缓冲区的尾指针80:缓冲区的始地址指示82:缓冲区的末地址指示1E:缓冲区的首址3E:缓冲区的末址即在1E—3E之间的32个字节就为键盘缓冲区。每个按键占两个字节,高端为扫描码,低端为ASCII码,
Keyboard is the most commonly used computer input device, to understand the communication process between the keyboard and the computer, for the preparation of the program is very important. Keyboard buffer, is an important part of the computer keyboard input process, but also the programmer’s attention. The so-called keyboard buffer, is a ring queue, used to temporarily save the keyboard input from the character, its structure as shown in the figure. In the BIOS data area has a complete information about the buffer and the physical structure of the BIOS data segment address 0040H, the specific location information as follows: 1A-1B: the first pointer to the buffer 1C-1D: the tail pointer buffer 80: Start address of buffer indicates 82: End of buffer address indicates 1E: First address of buffer 3E: End of buffer, that is, 32 bytes between 1E-3E is the keyboard buffer. Each button accounts for two bytes, high-end scan code, low-end ASCII code,