home *** CD-ROM | disk | FTP | other *** search
- program commtest;
-
- uses crt,jbcomm50,modem7;
-
- var ch : char;
- comport : porttype;
- result,
- i : integer;
- quit : boolean;
- name : filestr;
-
- begin
- assign(output,'');
- rewrite(output);
- directvideo:=false;
- comport:=com5;
- c_open(comport,2400,p_none,8,1,9192,256);
- quit:=false;
- repeat
- if keypressed then
- begin
- ch:=readkey;
- if ch<>#0 then
- c_putc(comport,ch)
- else
- begin
- name:=' ';
- ch:=readkey;
- case ch of
- #68:quit:=true;
- #59:begin
- i:=0;
- while (name<>'') and (i<1) do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',xmodem_crc);
- writeln(result,' files sent.');
- end
- end;
- #60:begin
- i:=0;
- while (name<>'') and (i<1) do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',xmodem_chk);
- writeln(result,' files sent.');
- end
- end;
- #61:begin
- i:=0;
- while (name<>'') do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',modem7_crc);
- writeln(result,' files sent.');
- end
- end;
- #62:begin
- i:=0;
- while (name<>'') do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',modem7_chk);
- writeln(result,' files sent.');
- end
- end;
- #63:begin
- i:=0;
- while (name<>'') do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',telink);
- writeln(result,' files sent.');
- end
- end;
- #64:begin
- i:=0;
- while (name<>'') and (i<1) do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',ymodem);
- writeln(result,' files sent.');
- end
- end;
- #65:begin
- i:=0;
- while (name<>'') do
- begin
- write('Enter name: ');
- readln(name);
- if name<>'' then
- begin
- addfile(comport,name);
- inc(i)
- end
- end;
- if i>0 then
- begin
- result:=tmodem7(comport,'',ymodem_batch);
- writeln(result,' files sent.');
- end
- end;
- #104:begin
- result:=rmodem7(comport,'',xmodem_chk);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
- end;
- #105:begin
- result:=rmodem7(comport,'',xmodem_crc);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end;
- #106:begin
- result:=rmodem7(comport,'',modem7_chk);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end;
- #107:begin
- result:=rmodem7(comport,'',modem7_crc);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end;
- #108:begin
- result:=rmodem7(comport,'',telink);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end;
- #109:begin
- result:=rmodem7(comport,'',ymodem);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end;
- #110:begin
- result:=rmodem7(comport,'',ymodem_batch);
- writeln('Received ',result,' files');
- repeat until getfile(comport)=''
-
- end
- end
- end
- end;
- if c_inready(comport)>0 then write(c_getc(comport))
- until quit;
- c_close(comport,true)
- end.