📄 more15.c
字号:
#include <stdio.h>
#include <time.h>
#include <dos.h>
void main (void)
{
char buffer[256];
char key_pressed = 0;
long int counter = 1;
union REGS inregs, outregs;
time_t start_time, current_time, end_time;
while (fgets(buffer, sizeof(buffer), stdin))
{
fputs (buffer, stdout);
if ((++counter % 25) == 0)
{
time (&start_time);
end_time = start_time + 15;
do
{
key_pressed = 0;
time (¤t_time);
inregs.h.ah = 1;
int86 (0x16, &inregs, &outregs);
if ((outregs.x.flags & 64) == 0)
{
key_pressed = 1;
do {
inregs.h.ah = 0;
int86 (0x16, &inregs, &outregs);
inregs.h.ah = 1;
int86 (0x16, &inregs, &outregs);
} while (! (outregs.x.flags & 64));
}
}
while ((current_time != end_time) && (! key_pressed));
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -