www.pudn.com > ASYNC13.rar > READ.C


/* A module of ASYNCx.LIB version 1.20 */ 
 
#include  
#include "asyncdef.h" 
 
/************************************************************ 
 Receive n objects of size s from the port associated with p 
 within t eighteenths of a second. Start puting them into 
 memory starting at where buf points. Return the number of 
 whole objects received. 
************************************************************/ 
int a_read(void *buf,int s,int n,ASYNC *p,int t) 
{unsigned i; 
 byte *bp; 
 unsigned long t0,far *t1; 
 if (p) 
  {t1=(unsigned long far *)MK_FP(0x40,0x6c); 
   t0=*t1; 
   bp=(byte *)buf; 
   n*=s; 
   for(i=0;i