/* abble.h: include in chatting tasks.
	please #define NEXTTASK= "..." */
/* modified Sep84 to demo variable send/recieve on M+ - PF */
#define EFN 12
#define BUFWORDS 256

 int		buf[BUFWORDS];

main(argc,argv)
int		argc;
char		**argv;
{char		sender[7];
 rad50		next[2];
 int		dsw;
 ascr50(6,NEXTTASK,next);
 while	(1)
	{printf("%s>",*argv);
	 zero(buf,512);
	 gets(buf);
	 if	(*buf)
		{dsw = vsda(next,buf,(strlen(buf)+2)>>1,EFN);
		 printf("vsda(%s)=%oo\n",NEXTTASK,dsw);
		 dsw = ustp(next);
		 printf("ustp(%s)=%oo\n",NEXTTASK,dsw);
		}
	 ;
	 do
		{zero(buf,BUFWORDS+BUFWORDS);
		 dsw = vrcs(NULL,buf,BUFWORDS);
		 printf("vrcs(NULL)=%oo\n",dsw);
		}
	 while	(dsw == IS_SET)
	 ;
	 /* here with something received */
	 r50toa(sender,buf,2);
	 sender[6]=0;
	 printf("%s:received \"%s\" from task:%s\n",*argv,buf+2,sender);
	}
 ;
}
