bioskey是什么函数 怎么用?
来源:百度知道 编辑:UC知道 时间:2024/09/24 07:24:05
bioskey: keyboard interface
int bioskey(int cmd);
Prototype in bios.h
cmd Action
0 Return key scancode from buffer and delete it from the buffer. Wait for the next key if the buffer is empty.
1 Return key scancode from buffer, but do not delete it from the buffer. Return 0 if the buffer is empty.
2 Return the BIOS shift state flags.
通过参数0、1、2完成三种功能,0读取一个按键,并从缓冲区取出,1从缓冲区读取一个按键,并且保留在缓冲区(下次可以读取),2获取SHIFT等键的状态。注意读出的不单是ASCII码,还包括扫描码。