发一个改变定时中断时间的程序:
void ChangeTimerInterval(unsigned int ms)
{
unsigned int count = (unsigned int) (((long) 119318) * ms / 100);
disable();
outportb(0x43, 0x3C);
outportb(0x40, (unsigned char) (count & 0xFF));
outportb(0x40, (unsigned char) ((count >> 8) & 0xFF));
enable();
} |