{ File: [22,311]VSDAPATST.PAS      Last edit: 14-APR-1988 12:19:12 
}

Program VSDAPATST;


{History:

   Philip Hannay.  14-Apr-88.  Created for testing VSDAPA.

}

%include ex:[22,320]general3.typ;

%include ex:[22,320]vsdapa.ext;
%include ex:[22,320]catr56.ext;

Type
  ch512 = packed array [1..512] of char;

Var
 task: ch6;
 rtask: rad56;
 msg1: ch512;  {even boundry buffer}
 fill1: char;
 msg2: ch512;  {odd boundry buffer}
 fill2: char;
 stat, i, len: integer;
 resp: char;
 bufadr: address;

Begin
writeln('Begin VSDAPA test');
writeln;
write('Enter target task name> ');
readln(task);
catr56(task,rtask);
for i:=1 to 512 do msg1[i]:= ' ';
write('Enter msg to send> ');
readln(msg1);
msg2:=msg1;
write('Enter msg length in words>');
readln(len);
writeln;
write('CR to send');
readln(resp);
writeln;
writeln('Sending word aligned message');
writeln;
bufadr:= loophole(address,ref(msg1));
VSDAPA(rtask,bufadr,len,f0);
stat:= $DSW;
writeln;
writeln('Send done, DSW = ',stat:1);
writeln;
writeln('Sending non-word (odd address) aligned message');
writeln;
bufadr:= loophole(address,ref(msg2));
VSDAPA(rtask,bufadr,len,f0);
stat:= $DSW;
writeln;
writeln('Send done, DSW = ',stat:1);
writeln;
writeln('Done with test');
end.
