setmcr.c

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

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

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

/**************************************************************
 Set the value of the Modem Control Register. If the UART's
 interrupt is enabled, do not let the programmer disable it.
 **************************************************************/

void a_setmcr(ASYNC *p,int newval)
{newval|=inportb(p->base+MCR) & 8;
 if (p)
   outportb(p->base+MCR,newval);
} /* a_setmcr(p,newval) */

⌨️ 快捷键说明

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