home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pub / ucsdappleii / helper.text < prev    next >
Text File  |  2020-01-01  |  12KB  |  518 lines

  1. (* >>>> HELPER.TEXT  **************************************************)
  2.  
  3. (*$I-*)
  4. (*$R-*)
  5. (*$S+*)
  6. (*$V-*)
  7.  
  8. UNIT helper;      INTRINSIC  CODE 22;
  9.  
  10.  
  11. INTERFACE
  12.  
  13. USES  kermglob,
  14.       kermutil;
  15.  
  16. PROCEDURE help;
  17.  
  18. IMPLEMENTATION
  19.  
  20. PROCEDURE help;
  21.  
  22.  
  23. const  scrpr   = 'resp. on screen or on the printer.';
  24.        numpar  = 'Takes a number as parameter.';
  25.        charpar = 'Takes a character as parameter.';
  26.        onoffp  = 'Takes ON / OFF as parameter.';
  27.        conval  = 'Valid only during CONNECT.';
  28.        ftval   = 'Valid only during file transfer.';
  29.        dumpval = 'Valid only in screendump mode.';
  30.  
  31. Var  i : integer;
  32.      ch : char;
  33.  
  34.  
  35. (************  Auxiliary procedures ***********************************)
  36.  
  37.  
  38.  
  39. PROCEDURE wait;
  40.  
  41. begin
  42.   if not pr_out then
  43.     begin
  44.       ch := ' ';
  45.       gotoxy( 0, 23 );
  46.       write('----------- ');
  47.       write('( Type <spacebar> to continue or '); write_ctl( esc_char );
  48.       write(' to quit help ) ------------');
  49.       read( keyboard, ch );
  50.       if ch = esc_char then begin
  51.                               writeln;
  52.                               writeln;
  53.                               exit( help );
  54.                             end;
  55.       page( output );
  56.     end;
  57. end;
  58.  
  59.  
  60. PROCEDURE line;
  61.  
  62. begin
  63.   for i := 1 to 24 do write(p,'-');
  64. end;
  65.  
  66.  
  67. PROCEDURE word1( sym : vocab );
  68.  
  69. begin
  70.   writeln(p);
  71.   line;
  72.   writeln(p);
  73.   writeln(p, vocablist[sym] );
  74.   line;
  75.   writeln(p);
  76.   writeln(p);
  77. end;
  78.  
  79.  
  80. PROCEDURE word2( sym1, sym2 : vocab );
  81.  
  82. begin
  83.   writeln(p);
  84.   line;
  85.   writeln(p);
  86.   writeln(p, vocablist[sym1], '   ', vocablist[sym2] );
  87.   line;
  88.   writeln(p);
  89.   writeln(p);
  90. end;
  91.  
  92.  
  93. PROCEDURE aciaset( sym : vocab );
  94.  
  95. begin
  96.   write(p,'According to the file ', setup_file, ' this command should ');
  97.   if ( ( aciaimplem=A6850 ) and ( sym=baudsym ) ) or
  98.        ( aciaimplem=unknown ) or ( aciaimplem>A6551 )
  99.    then writeln(p,'not work.')
  100.    else begin
  101.           writeln(p,'work.');
  102.           writeln(p,'Consult your serial card manual for valid settings.');
  103.         end;
  104. end;
  105.  
  106.  
  107. (*********** Introduction procedure  ***********************************)
  108.  
  109.  
  110. PROCEDURE introkermit;
  111. begin
  112.   writeln(p,'KERMIT is a family of programs that do reliable file transfer');
  113.   writeln(p,'between computers over TTY lines. ( BYTE june & july 1984 )');
  114.   writeln(p,'KERMIT can also be used to make the micro computer behave as a');
  115.   writeln(p,'terminal for a mainframe.');
  116.   writeln(p);
  117.   writeln(p,'These are the commands for the Apple ][(e) UCSD KERMIT ',version);
  118.   writeln(p);
  119.   writeln(p);
  120. end;
  121.  
  122.  
  123. (********* These procedures explain the commands except SET ************)
  124.  
  125.  
  126. PROCEDURE helpsend;
  127. begin
  128.   word1( sendsym );
  129.   writeln(p,'To send a file to the remote system.');
  130.   writeln(p,'Takes a filename as parameter.');
  131. end;
  132.  
  133. PROCEDURE helpdir;
  134. begin
  135.   word2( dirsym, pdirsym );
  136.   writeln(p,'Lists the directory of a disk ', scrpr );
  137.   writeln(p, numpar, ' ( 4,5,9..12 )');
  138. end;
  139.  
  140. PROCEDURE helphelp;
  141. begin
  142.   word2( helpsym, phelpsym );
  143.   writeln(p,'To get an explanation of KERMIT commands ', scrpr );
  144. end;
  145.  
  146. PROCEDURE helpshow;
  147. begin
  148.   word2( showsym, pshowsym );
  149.   writeln(p,'Shows the values of the parameters that can be modified via');
  150.   writeln(p,'the SET command ', scrpr );
  151. end;
  152.  
  153. PROCEDURE helpconn;
  154. begin
  155.   word1( consym );
  156.   writeln(p,'To make a virtual terminal connection to a remote system.');
  157.   writeln(p,'To break the connection and escape back to the micro KERMIT');
  158.   write(p,'command level type '); write_ctl( esc_char );
  159.   writeln(p,' immediately followed by <C>.');
  160.   writeln(p,'When the Apple screen starts scrolling host characters may');
  161.   writeln(p,'be lost at > 1200 baud. To prevent this set the host''s');
  162.   writeln(p,'linefeed fill to a count of about 5.');
  163. end;
  164.  
  165. PROCEDURE helpexit;
  166. begin
  167.   word2( exitsym, quitsym );
  168.   writeln(p,'To return back to the Apple UCSD p-system command level.');
  169. end;
  170.  
  171. PROCEDURE helprec;
  172. begin
  173.   word1( recsym );
  174.   writeln(p,'To accept a file or group of files from the remote system.');
  175. end;
  176.  
  177.  
  178. (***********  The following procedures explain the SET subcommands  ********)
  179.  
  180.  
  181. PROCEDURE baudset;
  182. begin
  183.   word2( setsym, baudsym );
  184.   writeln(p,'To set the serial baud rate.');
  185.   writeln(p, numpar );
  186.   aciaset( baudsym );
  187. end;
  188.  
  189. PROCEDURE parset;
  190. begin
  191.   word2( setsym, paritysym );
  192.   writeln(p,'This selects the parity for outgoing characters to match the');
  193.   writeln(p,'requirements of the host.');
  194.   writeln(p,'Takes as parameters : ', vocablist[nonesym], vocablist[oddsym]:4,
  195.             vocablist[evensym]:5, vocablist[marksym]:5, vocablist[spacesym]:6 );
  196.   writeln(p,'When the IBM flag is set, parity is set to ', vocablist[marksym],
  197.             ' ( if possible ).');
  198.   aciaset( paritysym );
  199. end;
  200.  
  201. PROCEDURE wordlset;
  202. begin
  203.   word2( setsym, wordlensym );
  204.   writeln(p,'Sets the number of databits for outgoing & incoming characters.');
  205.   writeln(p, numpar );
  206.   aciaset ( wordlensym );
  207. end;
  208.  
  209. PROCEDURE stopbset;
  210. begin
  211.   word2( setsym, stopbsym );
  212.   writeln(p,'Sets the number of stopbits for outgoing & incoming characters.');
  213.   writeln(p, numpar );
  214.   aciaset( stopbsym );
  215. end;
  216.  
  217. PROCEDURE debugset;
  218. begin
  219.   word2( setsym, debugsym );
  220.   writeln(p,'Shows packets sent & received during filetransfer when ON.');
  221.   writeln(p, onoffp );
  222.   writeln(p, ftval );
  223. end;
  224.  
  225. PROCEDURE delset;
  226. begin
  227.   word2( setsym, delsym );
  228.   writeln(p,'Changes the Apple <backspace> key to a <del> key for the host');
  229.   writeln(p,'when set to ON.');
  230.   writeln(p, onoffp );
  231.   writeln(p, conval );
  232. end;
  233.  
  234. PROCEDURE emulset;
  235. begin
  236.   word2( setsym, emulatesym );
  237.   writeln(p,'Not implemented.');
  238. end;
  239.  
  240. PROCEDURE eolnset;
  241. begin
  242.   word2( setsym, eolnsym );
  243.   writeln(p,'Sets the "end-of-line" character sent after a KERMIT package.');
  244.   writeln(p, charpar );
  245.   writeln(p, ftval );
  246. end;
  247.  
  248. PROCEDURE escset;
  249. begin
  250.   word2( setsym, escsym );
  251.   writeln(p,'Sets the escape character preceding the <C>.');
  252.   write(p,'The sequence '); write_ctl( esc_char );
  253.   writeln(p,' <C> returns you to the KERMIT command level.');
  254.   writeln(p, charpar );
  255.   writeln(p, conval );
  256. end;
  257.  
  258. PROCEDURE filewset;
  259. begin
  260.   word2( setsym, filewarnsym );
  261.   writeln(p,'Changes names of received files to protect already existing');
  262.   writeln(p,'files with similar names.');
  263.   writeln(p, onoffp );
  264.   writeln(p, ftval );
  265. end;
  266.  
  267. PROCEDURE ibmset;
  268. begin
  269.   word2( setsym, ibmsym );
  270.   writeln(p,'When communicating with an IBM VM/CMS mainframe this flag');
  271.   writeln(p,'should be on.');
  272.   writeln(p,'It also sets ', vocablist[paritysym], ' to ',
  273.              vocablist[marksym], ' and activates ', vocablist[localsym],
  274.              '.');
  275.   writeln(p, onoffp );
  276. end;
  277.  
  278. PROCEDURE localset;
  279. begin
  280.   word2( setsym, localsym );
  281.   writeln(p,'This sets the duplex : it should be ON for th IBM VM/CMS');
  282.   writeln(p,'and OFF for the CYBER, VAX, DEC-20.');
  283.   writeln(p, onoffp );
  284. end;
  285.  
  286. PROCEDURE maxtryset;
  287. begin
  288.   word2( setsym, maxtrysym );
  289.   writeln(p,'Maximum number of times KERMIT tries to receive a correct');
  290.   writeln(p,'package before breaking off the file transfer. At the start');
  291.   writeln(p,'of file transfer this number is five times higher to allow');
  292.   writeln(p,'the other side extra time to start file transfer.');
  293.   writeln(p, numpar );
  294. end;
  295.  
  296. PROCEDURE nofeedset;
  297. begin
  298.   word2( setsym, nofeedsym );
  299.   writeln(p,'Replaces an incoming formfeed character with carriage return.');
  300.   writeln(p, onoffp );
  301. end;
  302.  
  303. PROCEDURE prefixset;
  304. begin
  305.   word2( setsym, prefixsym );
  306.   writeln(p,'Sets the prefix name of the (disk)volume for incoming files.');
  307.   writeln(p,'Takes a volume name as parameter.');
  308.   writeln(p, ftval );
  309. end;
  310.  
  311. PROCEDURE rejset;
  312. begin
  313.   word2( setsym, rejectsym );
  314.   writeln(p,'When set control characters coming from the host are not');
  315.   writeln(p,'echoed to the Apple screen or printer except :');
  316.   writeln(p,'backspace, carr. return, formfeed, linefeed, bell.');
  317.   writeln(p, onoffp );
  318.   writeln(p, conval );
  319. end;
  320.  
  321. PROCEDURE textfset;
  322. begin
  323.   word2( setsym, textfsym );
  324.   writeln(p,' ON : incoming and outgoing files will be treated as UCSD');
  325.   writeln(p,'      textfiles and the 8th bit of each character is masked.');
  326.   writeln(p,'OFF : incoming and outgoing files will be treated as UCSD');
  327.   writeln(p,'      datafiles and the 8th bit of each char. is not masked.');
  328.   writeln(p,'UCSD data & code files can thus be transfered only if both');
  329.   writeln(p,'sides are set to 8-bit word length, no parity and if the 8th');
  330.   writeln(p,'bit is not altered during transmission.');
  331.   writeln(p, ftval );
  332. end;
  333.  
  334. PROCEDURE timoutset;
  335. begin
  336.   word2( setsym, timeoutsym );
  337.   writeln(p,'Time-out period specified to host in approx. seconds (1..31).');
  338.   writeln(p,'( Note : some host KERMITs do not take this parameter and');
  339.   writeln(p,'         just keep waiting.)');
  340.   writeln(p, numpar );
  341.   writeln(p, ftval );
  342. end;
  343.  
  344. PROCEDURE maxpackset;
  345. begin
  346.   word2( setsym, maxpsym );
  347.   writeln(p,'Sets this side''s maximum KERMIT package length ( 20..94 ).');
  348.   writeln(p,'Reduce package length on noisy lines.');
  349.   writeln(p, numpar );
  350.   writeln(p, ftval );
  351. end;
  352.  
  353. PROCEDURE xoffset;
  354. begin
  355.   word2( setsym, xoffsym );
  356.   writeln(p,'A Xoff/Xon protocol is used during ',vocablist[consym],
  357.              ' when a screendump to the printer');
  358.   writeln(p,'is requested.');
  359.   writeln(p,'Set Xoff & Xon  according to the requirements of the host.');
  360.   writeln(p,'( Note : at some hosts the Xon/Xoff char''s should first be');
  361.   writeln(p,'         defined by a terminal definition command. )');
  362.   writeln(p, charpar );
  363.   writeln(p, dumpval );
  364. end;
  365.  
  366. PROCEDURE xonset;
  367. begin
  368.   word2( setsym, xonsym );
  369.   writeln(p,'See ', vocablist[setsym],vocablist[xoffsym] : 11, '.');
  370.   writeln(p,'( Note : if IBM flag is on this character is also used in the');
  371.   write(  p,'         file-transfer protocol. It should then be set to ');
  372.   write_ctl( chr(17) ); writeln(p,' )');
  373. end;
  374.  
  375. PROCEDURE xoffwset;
  376. begin
  377.   word2( setsym, xoffwaitsym );
  378.   writeln(p,'If characters are lost during a screendump to the printer then');
  379.   writeln(p,'increase this parameter.');
  380.   writeln(p, numpar, ' (1..255 )');
  381.   writeln(p, conval );
  382.   writeln(p, dumpval );
  383. end;
  384.  
  385.  
  386.  
  387. (*************** This procedure list all SET subcommands  ****************)
  388.  
  389.  
  390. PROCEDURE allset;
  391. begin
  392.   page( output );
  393.   word1( setsym );
  394.   writeln(p,'To establish system dependent parameters.');
  395.   writeln(p,'The ', vocablist[ setsym ], ' options are as follows :');
  396.   writeln(p);
  397.   baudset;
  398.   wait;
  399.   debugset;
  400.   delset;
  401.   wait;
  402.   emulset;
  403.   eolnset;
  404.   escset;
  405.   wait;
  406.   filewset;
  407.   ibmset;
  408.   wait;
  409.   localset;
  410.   maxpackset;
  411.   wait;
  412.   maxtryset;
  413.   nofeedset;
  414.   wait;
  415.   parset;
  416.   prefixset;
  417.   wait;
  418.   rejset;
  419.   stopbset;
  420.   wait;
  421.   textfset;
  422.   wait;
  423.   timoutset;
  424.   wordlset;
  425.   wait;
  426.   xoffset;
  427.   xonset;
  428.   wait;
  429.   xoffwset;
  430. end;
  431.  
  432.  
  433. (*********** This procedure explains the SET command ********************)
  434.  
  435.  
  436. PROCEDURE helpset;
  437.  
  438. begin
  439.   case adj of
  440.     nullsym       : allset;
  441.     baudsym       : baudset;
  442.     debugsym      : debugset;
  443.     delsym        : delset;
  444.     emulatesym    : emulset;
  445.     eolnsym       : eolnset;
  446.     escsym        : escset;
  447.     filewarnsym   : filewset;
  448.     ibmsym        : ibmset;
  449.     localsym      : localset;
  450.     maxpsym       : maxpackset;
  451.     maxtrysym     : maxtryset;
  452.     nofeedsym     : nofeedset;
  453.     paritysym     : parset;
  454.     prefixsym     : prefixset;
  455.     rejectsym     : rejset;
  456.     stopbsym      : stopbset;
  457.     textfsym      : textfset;
  458.     timeoutsym    : timoutset;
  459.     wordlensym    : wordlset;
  460.     xoffsym       : xoffset;
  461.     xonsym        : xonset;
  462.     xoffwaitsym   : xoffwset;
  463.   end;  { case }
  464. end;   {  helpset }
  465.  
  466.  
  467.  
  468. (**************** This procedure shows all valid HELP commands ************)
  469.  
  470.  
  471. PROCEDURE helpall;
  472.  
  473. begin
  474.   page( output );
  475.   introkermit;
  476.   helpconn;
  477.   wait;
  478.   helpdir;
  479.   helpexit;
  480.   helphelp;
  481.   wait;
  482.   helprec;
  483.   helpsend;
  484.   helpshow;
  485.   wait;
  486.   helpset;
  487. end;
  488.  
  489.  
  490. (********************* Finally here starts procedure HELP  ****************)
  491.  
  492.  
  493. begin   {  help  }
  494.   close(p);
  495.   if pr_out and print_enable then reset(p, pr_file )
  496.                              else reset(p, cs_file );
  497.   writeln(p);
  498.   case noun of
  499.     nullsym              :  helpall;
  500.     setsym               :  helpset;
  501.     showsym, pshowsym    :  helpshow;
  502.     dirsym , pdirsym     :  helpdir;
  503.     helpsym, phelpsym    :  helphelp;
  504.     exitsym, quitsym     :  helpexit;
  505.     recsym               :  helprec;
  506.     sendsym              :  helpsend;
  507.     consym               :  helpconn;
  508.   end;  {  case  }
  509.   writeln(p);
  510.   pr_out := false;
  511. end;   {  help  }
  512.  
  513.  
  514.  
  515. begin   {  unit  helper  }
  516. end.
  517.  
  518.