#include <stdio.h>

static void __GetLn1()="\tjsr\t$FD6F";

static unsigned char pos=255;

#define __read __ign_write
#include "libsys.h"
#undef __read

__mask(1) unsigned int __read(int f,const char *p,unsigned int len)
{
  unsigned char n,c;
  if(pos==255){
    __GetLn1();
    pos=0;
  }
  n=0;
  do{
    c=(((unsigned char*)0x200)[pos])&127;
    if(c=='\r'){c='\n';pos=254;}
    *p++=c;
    n++;pos++;
  }while(n<len&&c!='\n');
  return n;
}

}
