getlsr.c

来自「异步通讯C语言例行子程序」· C语言 代码 · 共 16 行

C
16
字号
/* A module of ASYNCx.LIB version 1.02 */

#include <dos.h>
#include "asyncdef.h"

/**************************************************************
 Return the value of the Line Status Register. If the
 specified port is not open, return -1.
 **************************************************************/

int a_getlsr(ASYNC *p)
{if (p)
   return(inportb(p->base+LSR));
 return -1;
} /* end of a_getlsr(p) */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?