⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 write.c

📁 异步通讯C语言例行子程序
💻 C
字号:
/* A module of ASYNCx.LIB version 1.02 */

#include "asyncdef.h"

/*******************************************************
 Send n objects of size s to the port associated with p
 starting with the one pointed to by buf. Return the
 number of objects transmitted. If there is an error
 during this process, return a short count.
*******************************************************/
int a_write(void *buf,int s,int n,ASYNC *p)
{byte *bp;
 int i;
 if (p)
  {bp=(byte *)buf;
   n*=s;
   i=0;
   while(i<n)
     if (a_putc(*bp,p)==*bp)
      {bp++;
       i++;
      }
   return(n/s);
  }
 return 0;
} /* end of a_write(buf,s,n,p) */

⌨️ 快捷键说明

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