📄 break.c
字号:
/* A module of ASYNCx.LIB version 1.02 */
#include <dos.h>
#include "asyncdef.h"
/************************************************/
/** turn on the BREAK signal for between count **/
/** and count+1 eighteenths of a second. **/
/************************************************/
int a_break(ASYNC *p,int count)
{unsigned long t0;
unsigned long far *t1;
byte lcr;
if (p)
{t1=(unsigned long far *)MK_FP(0x40,0x6c);
t0=*t1;
lcr=inportb(p->base+LCR);
outportb(p->base+LCR,lcr | 0x40); /* turn on the BREAK signal */
while(*(t1)-t0<=(long)count); /* wait for count ticks to pass */
outportb(p->base+LCR,lcr); /* turn off the BREAK signal */
return 0;
}
return -1;
} /* end of a_break(p,count) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -