# include # define DUSART 0177022 # define CUSART 0177020 # define TIMCONTR 0177030 # define TIMD0 0177036 # define NULL 0 # define MAXBUF 10000 static int *pldata = DUSART; static int *plcontrol = CUSART; static int *mode = TIMCONTR; static int *tim0 = TIMD0; static char buf[MAXBUF]; $$narg=1; FILE *out; main() { int i, filelength; static char len[5]; out=fopen("DK:IBM.TXT","wn"); setusart(); for( i = 0; i < 5; i++) { len[i] = getplc(); } sscanf(len,"%d",&filelength); for( i = 0; i < filelength; i++) { buf[i] = getplc(); } printf("\nfilelength = %s %d\n",len,filelength); for( i=0; i