
segment procedure help;
UCSD Pascal KERMIT for the Terak p-System, from Kate MacGregor, Cornell U
 Adapted for the Magiscan 2 by H Balen, Lancaster U 

procedure keypress;

var
  ch: char;

begin
writeln;
writeln('---------------Press any key to continue---------------');
repeat
until readch(terminal,ch);
writeln(chr(ff){clearscreen})
end; (* keypress *)

procedure help1;

var ch: char;

begin
write(chr(ff));
if (noun = nullsym) then
  begin
  writeln('KERMIT is a family of  programs that do reliable file transfer');
  writeln('between computers over TTY lines.  KERMIT can also be used to ');
  writeln('make the microcomputer behave as a terminal for a mainframe.  ');
  writeln('These are the commands for theUCSD p-system version, ');
  writeln('KERMIT-UCSD:');
  writeln
  end; (* if *)
if (noun = nullsym) or (noun = consym) then
  begin
  writeln('  CONNECT     To make a "virutual terminal" connection to ');
  writeln('              a remote system. To break the connection and');
  writeln('              "escape" back to the micro, type the escape ');
  writeln('              sequence (CTRL-] C, that is Control rightbracket');
  writeln('              followed immediately by the letter C.)');
  writeln;
  end; (* if *)
if (noun = nullsym) or (noun = exitsym) then
  begin
  writeln('  EXIT        To return back to main command level of the');
  writeln('              p-system.');
  writeln;
  end; (* if *)
if (noun = nullsym) or (noun = helpsym) then
  begin
  writeln('  HELP        To get a list of KERMIT commands.');
  writeln;
  end; (* if *)
if (noun = nullsym) or (noun = quitsym) then
  begin
  writeln('  QUIT        Same as EXIT.');
  writeln;
  end; (* if *)
if (noun = nullsym) or (noun = recsym) then
  begin
  writeln('  RECEIVE     To accept a file from the remote system.');
  writeln;
  end; (* if *)
end; (* help1 *)

procedure help2;

var
  ch  : char;

begin
if (noun = nullsym) or (noun = loadsym) then
  begin
  writeln('  LOAD        To load an image from the current disk.');
  writeln;
  end; (* if *)
if (noun = nullsym) or (noun = sendsym) then
  begin
  writeln('  SEND        To send a file or group of files to the remote');
  writeln('              system.');
  writeln;
  end; (* if *)
if (noun = nullsym) then
    keypress;
end{help2};

procedure help3;

var ch: char;

begin
if (noun = nullsym) or (noun = setsym) then
  begin
  writeln('  SET         To establish system-dependent parameters.  The ');
  writeln('              SET options are as follows: ');
  writeln;
  if (adj = nullsym) or (adj = baudsym) then
    begin
    writeln('              BAUD             75 to 9600, default is 1200. ');
    writeln('                               This sets the baud rate for the');
    writeln('                               system, should be done before');
    writeln('                               a conect, and is a mutiple of');
    writeln('                               75 by a power of two.');
    writeln;
    end;{if}
  if (adj = nullsym) or (adj = debugsym) then
    begin
    writeln('              DEBUG            To set debug mode ON or OFF ');
    writeln('                               (default is OFF).');
    writeln;
    end; (* if *)
  if (adj = nullsym) or (adj = dirsym) then
    begin
    writeln('              DISK             4/5/9/10, default is 5. This');
    writeln('                               sets the drive to be one of');
    writeln('                               the volumes/disks in existance');
    writeln('                               on the M2.');
    writeln;
    end;{if}
  if (adj = nullsym) then
      keypress;
  end; (* if *)
end; (* help3 *)

procedure help4;

begin
if (noun = nullsym) or (noun = setsym) then
  begin
  if (adj = nullsym) or (adj = escsym) then
    begin
    writeln('              ESCAPE           To change the escape sequence');
    writeln('                               that lets you return to the ');
    writeln('                               PC Kermit from the remote host.');
    writeln('                               The default is CTRL-] c.');
    writeln;
    end; (* if *)
  if (adj = nullsym) or (adj = filewarnsym) then
    begin
    writeln('              FILE-WARNING     ON/OFF, default is OFF.  If');
    writeln('                               ON, Kermit will warn you and');
    writeln('                               rename an incoming file so as');
    writeln('                               not to write over a file that');
    writeln('                               currently exists with the');
    writeln('                               same name');
    writeln;
    end; (* if *)
  end; (* if *)
end; (* help4 *)

procedure help5;

begin
if (noun = setsym) or (noun = nullsym) then
  begin
  if (adj = nullsym) or (adj = ibmsym) then
    begin
    writeln('              IBM              ON/OFF, default is OFF.  This');
    writeln('                               flag should be ON only when ');
    writeln('                               transfering files between the');
    writeln('                               micro and an IBM VM/CMS system.');
    writeln('                               It also causes the parity to be');
    writeln('                               set appropriately (mark) and ');
    writeln('                               activates local echoing');
    writeln;
    end; (* if *)
  if (adj = nullsym) then
      keypress;
  if (adj = nullsym) or (adj = localsym) then
    begin
    writeln('              LOCAL-ECHO       ON/OFF, default is OFF. This');
    writeln('                               sets the duplex.  It should be');
    writeln('                               ON when using the IBM and OFF ');
    writeln('                               for the DEC-20.');
    writeln;
    end; (* if *)
  end; (* if *)
end; (* help5 *)

procedure Help6;

begin
if (noun = setsym) or (noun = nullsym) then
  begin
  if (adj = nullsym) or (adj = paritysym) then
    begin
    writeln('              PARITY           EVEN, ODD, MARK, SPACE, ');
    writeln('                               or NONE. NONE is the default');
    writeln('                               but if the IBM flag is set, ');
    writeln('                               parity is set to MARK. This ');
    writeln('                               flag selects the parity for ');
    writeln('                               outgoing and incoming ');
    writeln('                               characters during CONNECT and');
    writeln('                               file transfer to match the');
    writeln('                               requirements of the host.');
    writeln;
    end; (* if *)
  if (noun = paritysym) then
    KeyPress
  end{if};
if (noun = transym) or (noun = nullsym) then
  begin
  writeln('  TRANSFER    To set the type of transfer, the types can ');
  writeln('              be TEXT, CODE, DATA, IMAGE. The format of the ');
  writeln('              command is TRANSFER TYPE <type>          ');
  writeln;
  if (noun = transym) then
    KeyPress;
  end; (* if *)
end{help6};

procedure Help7;
 
begin
if (noun = nullsym) or (noun = showsym) then
  begin
  writeln('  SHOW        To see the values of parameters that can be');
  writeln('              modified via the SET command.  Options are the');
  writeln('              same as for SET,  except that a SHOW ALL ');
  writeln('              command has been added.');
  KeyPress;
  end; (* if *)
end{Help7};

begin
help1;
help2;
help3;
help4;
help5;
help6;
help7
end; (* help *)

