#include "libsys.h"

unsigned int __read(int f,char *p,unsigned int len)
{
 unsigned char n=0,c;
  do{
   c=__chrin();
   __chrout(c);
   if(c=='\r') c='\n';
   *p++=c;
   n++;
  }while(n<len&&c!='\n');
  return n;

}
