home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / COMMS / CP409DOC.ARK / CPKERM.DOC < prev    next >
Text File  |  1988-05-20  |  102KB  |  2,250 lines

  1.  
  2.  
  3.  
  4. 1. CP/M-80 KERMIT
  5.  
  6. ********
  7. This document is formatted as an ordinary, plain text ASCII disk file.  Typeset
  8. copies are available  in  the  Kermit  User  Guide  from  Columbia  University.
  9. Changes should be made to CPKERM.MSS.
  10. ********
  11.  
  12. Program:    Bill   Catchings,  Columbia  University,  with  contributions  from
  13.             Charles Carvalho (ACC), Bernie Eiben (DEC),  Nick  Bush  (Stevens),
  14.             John   Bray  (University  of  Tennessee),  Bruce  Tanner  (Cerritos
  15.             College), Greg Small (University of California at Berkeley),  Kimmo
  16.             Laaksonen  (Helskini  University  of  Technology),  Brian Robertson
  17.             (Aberdeen University), A.J. Cole (Leeds University), John Shearwood
  18.             (Birmingham University), Tony Addyman (Salford University), Godfrey
  19.             Nix and Martin Carter (Nottingham University), Ian Young (Edinburgh
  20.             University),  Chris Miles (Manchester University), Richard Russell,
  21.             Dave Roberts, and many, many others.
  22.  
  23. Language:   8080 Assembler, M80, or MAC80
  24.  
  25. Version:    4.09
  26.  
  27. Date:       11th January, 1988
  28.  
  29. Documentation:
  30.             Charles  Carvalho,  ACC;  Frank  da  Cruz,  Columbia, Bertil Schou,
  31.             Loughborough University (with lots of help  from  Jon  Warbrick  of
  32.             Plymouth Polytechnic), and many others.
  33.  
  34. KERMIT-80 Capabilities At A Glance:
  35.   Local operation:                   Yes
  36.   Remote operation:                  Partial, Auto-receive only
  37.   Login scipts:                      No
  38.   Transfer text files:               Yes
  39.   Transfer binary files:             Yes
  40.   Wildcard send:                     Yes
  41.   File transfer interruption:        Yes
  42.   Filename collision avoidance:      Yes, poor
  43.   Can time out:                      Yes
  44.   8th-bit prefixing:                 Yes
  45.   Repeat count prefixing:            No
  46.   Alternate block checks:            Yes
  47.   Terminal emulation:                Yes, VT52 and others
  48.   Communication settings:            Yes; duplex, parity
  49.   Support for dial-out modems:       No
  50.   Transmit BREAK:                    Yes; most versions
  51.   IBM communication:                 Yes
  52.   Transaction logging:               No
  53.   Debug logging:                     No
  54.   Session logging:                   Yes
  55.   Raw file transmit:                 Yes
  56.   Act as server:                     No
  57.   Talk to server:                    Yes; SEND, GET, FIN, BYE
  58.   Advanced commands for servers:     No
  59.   Command/init files:                Yes
  60.   Command macros:                    No
  61.   Local file management:             Yes; DIR, ERA, TYPE, PRINT, COPY
  62.   Handle file attributes:            No
  63.   Extended packets:                  No
  64.   Sliding Windows:                   No
  65.   Printer control:                   Yes, better, but not perfect
  66.  
  67.  
  68. 1.1. Summary of CP/M
  69.  
  70. There  are  essentially  two versions of CP/M - Versions 2.2 and 3.0 (sometimes
  71. also called CP/M PLUS.)
  72.  
  73. CP/M-80 Version 2.2 is run in a single 64 Kbyte  "page",  usually  the  largest
  74. amount of memory on Z80 or 8080 systems.  The BIOS (Basic input/output system),
  75. BDOS (Basic Disk Operating System) and  CCP  (Command  console  processor)  all
  76. share  memory  with any transient program the user may wish to run.  Some basic
  77. commands are available through the CCP, like  DIR,  ERA  etc,while  others  are
  78. loaded from disk into the transient program area and run as a program, like PIP
  79. or STAT.
  80.  
  81. CP/M Version 3.0 (or CP/M PLUS) effectively removes the requirement  of  having
  82. the  CCP  and  BDOS  along  with a chunk of the BIOS code being resident in the
  83. single 64k byte page of memory.  This allows even more space  for  programs  in
  84. the  TPA, but still a little less than the maximum of 64k.  It is substantially
  85. different from CP/M version 2.2, with lots of added features.   Kermit-80  uses
  86. very few additional version 3.0 features, and only where absolutely necessary.
  87.  
  88. CP/M file specifications are of the form DEV:XXXXXXXX.YYY, where
  89.  
  90. DEV:            is  a  device  name, normally the A: or B: floppy.  If omitted,
  91.                 the device name defaults to your connected diskette.
  92.  
  93. XXXXXXXX        is a filename of up to 8 characters.
  94.  
  95. YYY             is the file type, up to 3 characters.
  96.  
  97. File names and file types may contain letters, digits, and some special charac-
  98. ters, including dash, dollar sign, and underscore, but no imbedded spaces.  Up-
  99. per and lower case letters are equivalent.
  100.  
  101. "Wildcard" file-group specifications are permitted in file names and file types
  102. (but  not device names) within certain contexts; a "*" matches a whole field, a
  103. "?"  matches a single character, including space.  Examples: "*.F??"  specifies
  104. all  files  whose types start with F and are 1, 2, or 3 characters long; "F?.*"
  105. specifies all files whose names start with F and are no more than  two  charac-
  106. ters long (before the trailing spaces).
  107.  
  108. The five CP/M commands are:
  109.  
  110. DIR file        Lists  the  the names of the specified files.  The default file
  111.                 specification is "*.*".  Example: "DIR B:*.FOR".
  112.  
  113. ERA file        Erases (deletes) the specified file(s); wildcards allowed.
  114.  
  115. REN new old     Changes the name of a file from old to new, e.g.
  116.                 "REN NEW.FOR=OLD.FOR".
  117.  
  118. SAVE            Saves the specified number of memory blocks into a file.   (Not
  119.                 on CP/M Plus systems)
  120.  
  121. TYPE file       Types the specified file on the screen, e.g.  "TYPE FOO.TXT".
  122.  
  123. The most important programs are:
  124.  
  125. STAT            Gives statistics on disk usage; sets and displays IOBYTE.  (Not
  126.                 on CP/M Plus systems)
  127.  
  128. PIP             Peripheral Interchange Program.  Copies files.  In response  to
  129.                 the "*" prompt, give a command of the form 
  130.  
  131.                     disk:outfile=disk:infile
  132.  
  133.                 Wildcards  ("*"  for a whole field or "?"  for a letter) can be
  134.                 used.  Examples: "A:=B:*.*" to copy a whole disk,  "A:=B:*.FOR"
  135.                 to  copy all the Fortran programs from disk B to disk A. If the
  136.                 disk specification is omitted, your  "connected"  disk  is  as-
  137.                 sumed.    Command  line  arguments are also accepted, e.g. "PIP
  138.                 A:=B:*.*".
  139.  
  140. There are equivalent commands for CP/M Version 3.0, but  are  not  loaded  into
  141. memory  in  the  same  way as for CP/M Version 2.2.  For further information on
  142. CP/M, consult your microcomputer manual or a CP/M handbook.
  143.  
  144.  
  145. 1.2. Kermit-80 Description
  146.  
  147. Since Kermit-80 runs on a standalone micro, it is  always  in  control  of  the
  148. screen  --  it  is always local.  Thus, it always keeps the screen updated with
  149. the file name and the packet number, whether sending or receiving.
  150.  
  151. Kermit-80 is capable of an imprecise or "fuzzy" timeout on  an  input  request,
  152. and  can  break deadlocks automatically.  In most cases, this is not important,
  153. because the KERMIT on the  other  side  is  most  likely  able  to  handle  the
  154. timeouts.   The timeouts done by Kermit-80 are fuzzy because they depend on the
  155. speed of the processor and other factors that can vary from system to system.
  156.  
  157. If, despite the timeout capability, the transmission appears to be  stuck  (and
  158. you  can tell that this has happened if the screen fails to change for a while)
  159. you can type carriage return to have the micro do what it would have done on  a
  160. timeout,  namely  NAK  the  expected packet to cause theforeign host to send it
  161. again (or, if the micro is sending, to retransmit the  last  packet).    Micro/
  162. micro or micro/IBM-mainframe transfers could require this kind of manual inter-
  163. vention.
  164.  
  165. File transfers may be interrupted in several ways.
  166.  
  167. Control-C       This will return you to Kermit-80 command level immediately, so
  168.                 that  you  can  connect  back to the remote system, or take any
  169.                 other desired action.
  170.  
  171. Control-X       When sending a file, this will terminate  the  sending  of  the
  172.                 current  file  with a signal to the KERMIT on the other side to
  173.                 discard what it got so far.  If there  are  more  files  to  be
  174.                 sent,  KERMIT-80  will go on to the next one.  When receiving a
  175.                 file, KERMIT-80 will send a signal to the remote KERMIT to stop
  176.                 sending  this file.  If the remote KERMIT understands this sig-
  177.                 nal (not all implementations of KERMIT  do),  it  will  comply,
  178.                 otherwise  the  file will keep coming.  In any case, the remote
  179.                 KERMIT will go on to the next file in the group, if any.
  180.  
  181. Control-Z       Like Control-X, except if a file group  is  being  transmitted,
  182.                 this will stop the transmission of the entire group.  If only a
  183.                 single  file  is  being  transmitted,  it  works  exactly  like
  184.                 Control-X.
  185.  
  186. Carriage Return If you type a carriage return Kermit-80 will resend the current
  187.                 packet.  You may do this repeatedly, up  to  the  packet  retry
  188.                 limit  (somewhere  between  5  and  16  times) for a particular
  189.                 packet.
  190.  
  191.  
  192.                               KERMIT-80 COMMANDS
  193.  
  194. KERMIT-80 uses the DECSYSTEM-20 keyword style command language.   Each  keyword
  195. may be abbreviated to its minumum unique length.  "?" may be typed to request a
  196. menu of the available options for the current field at any point in a  command.
  197. ESC  may  be typed at any point in a command to fill out the current keyword or
  198. filename; if sufficient characters have not been typed to identify the  current
  199. field uniquely, KERMIT-80 will sound a beep and allow you to continue from that
  200. point.
  201. BREAK   Send a Break condition to the remote computer.  This is  only  possible
  202.         if your system is capable of sending breaks.  It is intended to be used
  203.         with PAUSE, STRING etc and the TAKE command to do weird  and  wonderful
  204.         things, like automatic logging on to a remote host.
  205.  
  206. BYE     When  talking  to  a  remote Kermit Server, this command shuts down the
  207.         server and logs it out, and also exits from Kermit-80 to  CP/M  command
  208.         level.
  209.  
  210. CONNECT Establish  a "virtual terminal" connection to any host that may be con-
  211.         nected to the serial port, i.e. pass all typein to the serial port  and
  212.         display  all input from the serial port on the screen.  Also, emulate a
  213.         DEC  VT52  to  allow  cursor  control,  screen   clearing,   etc.,   if
  214.         VT52-EMULATION  is  ON  (see  below), in which case you should also set
  215.         your terminal type on the remote host to VT52.  (Some versions  emulate
  216.         other terminals.)
  217.  
  218.         Warning:  VT52  emulation  is only successful if your system or its at-
  219.         tached terminal can do the same sort of functions as  a  genuine  VT52.
  220.         Things to beware of are cursor addressing, clear to end of page and end
  221.         of line, clear screen, home cursor, and clear-and-home functions.   The
  222.         useability  of  VT52 emulation depends entirely on how many of the VT52
  223.         functions can be emulated by your terminal.
  224.  
  225.         The escape character differs from micro to micro; when  you  issue  the
  226.         CONNECT  command, the micro will print a message telling you how to get
  227.         back.  The escape sequence  is  generally  an  uncommonly-used  control
  228.         character,  like  CTRL-backslash  or  CTRL-rightbracket,  followed by a
  229.         single letter "command":
  230.  
  231.         C   Close Connection, return to Kermit-80> command level.
  232.         S   Display Status of connection, but maintain remote connection.
  233.         ?   List available single-character commands.
  234.         0   (zero) Send a null (0) character.
  235.         B   Send a BREAK signal.  Most systems provide this function.
  236.         D   Drop the line.  Used on the Apple with modem.  Automatically closes
  237.             the  connection after dropping the line.  The TORCH system acknowl-
  238.             edges this command but does nothing.
  239.         P   Toggle printer on or off.  Allows you to copy whatever goes to  the
  240.             screen to the printer.
  241.         S   Temporarily suspend logging to the log file.
  242.         Q   Restart logging to the log file
  243.         ^]  (or  whatever - a second copy of the escape character) Send the es-
  244.             cape character itself to the remote host.
  245.  
  246. DIRECTORY
  247.         This  provides a directory listing of the specified files.  If no files
  248.         are specified, all files on the default disk are listed.   File  sizes,
  249.         in  K,  are  included.    You  may interrupt the listing at any time by
  250.         typing any character.  The listing (even if interrupted) concludes with
  251.         a  display of the amount of free storage left on the disk.  You can in-
  252.         hibit the display of file sizes by SET DIRECTORY OFF.
  253.  
  254. ERASE filespec
  255.         This executes the CP/M ERA command on the specified file(s).  The names
  256.         of the files being erased are not displayed.
  257.  
  258. EXIT    Quit back to CP/M.  The return is made by a JMP 0 (Warmstart)
  259.  
  260. FCOPY source destination 
  261.         Copy  a named file to another file, either on the same drive or another
  262.         drive.
  263.  
  264. FINISH  Like LOGOUT, but shuts down the remote server without logging  it  out.
  265.         Leaves you at Kermit-80 command level; subsequent CONNECT commands will
  266.         put you back at host system command level.
  267.  
  268. GET filespec (local_filespec) 
  269.         When  Kermit-80  is  talking to a Kermit Server on the host, you should
  270.         use the GET command to request the server to send files to you, for ex-
  271.         ample:  
  272.  
  273.             get hlp:k*.hlp
  274.  
  275.         You  may  specify  a local filename if you want to save the remote file
  276.         under a different filename.  Limitation: If you  request  an  alternate
  277.         block  check type using the SET BLOCK command, the GET command will not
  278.         communicate it to the remote server.  If you want to have type 2  or  3
  279.         block checks done when getting files from the server, you have to issue
  280.         the appropriate SET BLOCK command to the remote KERMIT  before  putting
  281.         it in server mode.
  282.  
  283. HELP    List  all these commands, with a short description on what the commands
  284.         do.  A question mark will do the same.  If you  have  already  typed  a
  285.         command  but  do not know what the parameters are, type a space (to in-
  286.         dicate the end of the command) and a question mark.  You  will  be  in-
  287.         formed of what Kermit can expect at that stage.
  288.  
  289. INPUT time_delay string
  290.         Setup a string and time delay for your CP/M system to expect  from  the
  291.         host, then wait for that sting to be sent to your CP/M-80 system.
  292.  
  293. LOG filespec
  294.         When CONNECTed to a foreign host as a terminal, log the  terminal  ses-
  295.         sion  to  the  specified  diskette file.  This functionality depends to
  296.         some extent on the remote host's ability to do XON/XOFF  flow  control,
  297.         and  does  not  guarantee a complete transcript (after all, that's what
  298.         the KERMIT protocol is for).  The log file is closed when  the  connec-
  299.         tion  is  closed by typing the escape character followed by the single-
  300.         character command "C".
  301.  
  302. LOG (append) 
  303.         It  is  possible  to  temporarily suspend logging during connect state.
  304.         Typing an escape sequence can turn file logging on  (<escape-character>
  305.         R for Resume) or off (<escape-character> Q for quiet).
  306.  
  307.         Re-entering  connect  state will re-open the previously opened log file
  308.         and append to that file.
  309.  
  310. LOGOUT  Like BYE, but leaves you at Kermit-80 command level.
  311.  
  312. PAUSE delay_period
  313.         If  this  command  is  issued your CP/M system will wait a while before
  314.         proceeding with another command.  This is intended for use in TAKE com-
  315.         mands,  where  you may want to pause for a while before proceeding with
  316.         the rest of the TAKE file.  The actula delay is very  variable  between
  317.         systems, and values should be determined on a trial and error basis.
  318.  
  319. PRINT   Print a file to the console and printer.  Output to the printer is buf-
  320.         fered by the Kermit maintained printer buffer This routine is identical
  321.         to  TYPE  but  characters  are  echoed to the printer as well as to the
  322.         screen.  Suspending and aborting output is as described in TYPE.
  323.  
  324. RECEIVE filespec
  325.         Receive  file(s)  from the remote Kermit, and save them under the names
  326.         provided in the file headers supplied by the remote host.  If  a  local
  327.         filespec  is given, the file is saved under the given filename.  If the
  328.         names aren't legal, use as many legal characters from the name as  pos-
  329.         sible  (see  the  description of SET FILE-WARNING below).  If there's a
  330.         conflict, and FILE-WARNING is ON, warn the user  and  try  to  build  a
  331.         unique name for the file by adding "&" characters to the name.
  332.  
  333. SEND filespec
  334.         Send file(s) specified by filespec to the remote Kermit.  The  filespec
  335.         may contain CP/M wildcards.
  336.  
  337. SET parameter [value]
  338.         Set the specified parameter to the specified value.  Possible parameter
  339.         settings:
  340.  
  341.         AUTORECEIVE
  342.                 ON (or OFF).  Allows  several  files  to  be  received  without
  343.                 having  to  type RECEIVE on the receiving machine.  The routine
  344.                 simply looks for activity on the serial line, and if so  fudges
  345.                 a RECEIVE command.  The packet sent by the sender will be lost.
  346.  
  347.         BAUD-RATE value 
  348.                 Change the baud rate of the communications port.  This  command
  349.                 only  works  on  some  systems.  value is the numeric baud rate
  350.                 (300, 9600, etc.) desired.  Type SET BAUD followed by  a  ques-
  351.                 tion  mark for a list of supported baud rates.  On systems that
  352.                 do not support this command, you must set the  port  baud  rate
  353.                 from CP/M or other setup mechanism outside of KERMIT-80.
  354.  
  355.         BLOCK-CHECK-TYPE option 
  356.                 The options are:
  357.  
  358.                 1-CHARACTER-CHECKSUM
  359.                         Normal, default, standard 6-bit checksum.
  360.                 2-CHARACTER-CHECKSUM
  361.                         A 12-bit checksum encoded as two characters.
  362.                 3-CHARACTER-CRC-CCITT
  363.                         A  16-bit CCITT-format Cyclic Redundancy Check, encoded
  364.                         as 3 characters.
  365.  
  366.         BUFFER-SIZE value
  367.                 This  allows  you to set a buffer size during transfer of data.
  368.                 On some systems it takes so long that the remote end times  out
  369.                 while the local system is reading or writing to disk.  The size
  370.                 is the number of 128 disk sectors (nominal) and can be  from  1
  371.                 (128 bytes) to 64 (8 kbytes).
  372.  
  373.         CASE-SENSITIVITY ON (or OFF) 
  374.                 Kermit-80 usually maps lower  case  characters  to  upper  case
  375.                 character,  but  there  may  be times when lower case should be
  376.                 left alone.  SET CASE-SENSITIVITY ON will do this-but only  for
  377.                 some functions.
  378.  
  379.                 CP/M-80 filenames will still be mapped to uppercase characters.
  380.  
  381.         DEBUG   ON  (or  OFF).    Enables/disables displaying of packets on the
  382.                 screen during file transfer.  Not performed if the QUIET option
  383.                 has been set for the terminal (ie SET TERMINAL QUIET)
  384.  
  385.         DEFAULT-DISK drive letter 
  386.                 This allows you to set the default disk as source and  destina-
  387.                 tion  of  file  transfers.    In addition, issuing this command
  388.                 causes you to switch to the  specified  disk  and  log  it  in,
  389.                 write-enabled.    The  colon  must be included in the disk name
  390.                 (A:).  The selected disk appears in your KERMIT-80 prompt,  for
  391.                 instance 
  392.  
  393.                     Kermit-80 14A:>
  394.  
  395.         DIRECTORY-FILE-SIZE ON (or OFF).
  396.  
  397.                 By  setting  DIRECTORY-FILE-SIZE  OFF you can get an abreviated
  398.                 listing of your disk drive.  File sizes are not calculated, and
  399.                 five  files  are  shown on a line.  Setting this option ON will
  400.                 show file sizes of each file.
  401.  
  402.                 Both options will list the free space remaining.
  403.  
  404.         ESCAPE  Change the escape character for virtual  terminal  connections.
  405.                 Kermit-80  will  prompt you for the new escape character, which
  406.                 you enter literally.
  407.  
  408.         FILE-MODE option 
  409.                 Tells KERMIT-80 what kind of file it is sending, so that KERMIT
  410.                 can correctly determine the end of the file.  SET  FILE  BINARY
  411.                 means to send all the 128-byte blocks (ie logical CP/M sectors)
  412.                 of the file, including the last block in its entirety; SET FILE
  413.                 ASCII  is  used for text files, and transmission stops when the
  414.                 first Control-Z is encountered anywhere in the  file  (this  is
  415.                 the CP/M convention for marking the end of a text file).
  416.  
  417.                 SET  FILE-MODE DEFAULT tells Kermit to attempt to determine the
  418.                 file type by examining  the  file  being  transmitted.    If  a
  419.                 Control-Z  appears before the last block of the file, it is as-
  420.                 sumed to be BINARY; if, when the  first  Control-Z  is  encoun-
  421.                 tered,  the remainder of the file contains only control-Z's, it
  422.                 is assumed to be a text file.  Unfortunately, not all  programs
  423.                 fill  the  remainder  of  the  last  record of a text file with
  424.                 Control-Z's, so this algorithm is not always successful.
  425.  
  426.                 If binary transmission is used on a text file, or a  compressed
  427.                 file  (eg a .DQC file) some extraneous characters (up to 127 of
  428.                 them) may appear at the end of the file on the target system.
  429.  
  430.                 If ASCII transmission is used on a binary file,  any  8th  bits
  431.                 set  will  be stripped and a warning sent to the console.  When
  432.                 the first control-Z is encountered, the file is assumed  to  be
  433.                 at the end, even if it is not.
  434.  
  435.         FLOW-CONTROL ON (or OFF) 
  436.                 Sets XON/XOFF flow control on or off.  If set ON  the  host  is
  437.                 expected  to  respond  to an XOFF or XON sent by Kermit-80.  If
  438.                 set off, no flow control is assumed and  any  XON/XOFF  is  ig-
  439.                 nored.
  440.  
  441.         IBM ON (or OFF)
  442.                 Allow the transfer of files to and from an IBM  mainframe  com-
  443.                 puter.    This  makes  Kermit-80  wait  for  the IBM turnaround
  444.                 character (XON), ignore parity on input, add appropriate parity
  445.                 to  output,  and  use  local  echoing  during CONNECT.  As dis-
  446.                 tributed, KERMIT-80 uses MARK parity for IBM communication.  If
  447.                 you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
  448.                 KERMIT does not have timeout capability, SET IBM ON also  turns
  449.                 on the "fuzzy timer" automatically.
  450.  
  451.         LOCAL-ECHO ON (or OFF)
  452.                 When you CONNECT to a remote host, you must set  LOCAL-ECHO  ON
  453.                 if  the  host  is  half  duplex,  OFF  if  full duplex.  OFF by
  454.                 default.
  455.  
  456.         LOGGING ON (or OFF)
  457.                 Cease or resume logging whenever connect mode is entered.  This
  458.                 is really only applicable after a LOG command is no longer  re-
  459.                 quired.
  460.  
  461.         NO-EXIT This  command  is  applicable  only for Kermit initiated with a
  462.                 command tail.  For example, if Kermit was initiated by:
  463.  
  464.                 KERMIT ;SEND HELLO;NO-EXIT
  465.  
  466.                 Kermit would first seek out and execute the KERMIT.INI file (if
  467.                 present),  then  send  file  HELLO to a remote system.  Usually
  468.                 Kermit would exit back to CP/M, but NO-EXIT over-rides this.
  469.  
  470.                 Note the leading semicolon.  This clears  leading  spaces  from
  471.                 the first command.
  472.  
  473.         PORT port name 
  474.                 Allows you to switch  between  different  communication  ports.
  475.                 This  command is not available on all systems.  Type SET PORT ?
  476.                 for a list of valid options for your system. (Note:    If  your
  477.                 system does not support several ports, this command will return
  478.                 a "Not implemented" error if you try to set a port.)
  479.  
  480.         PRINTER ON (or OFF) 
  481.                 Turns  copying of CONNECT session to printer on and off.  It is
  482.                 also possible to toggle the printer  on/off  from  the  connect
  483.                 state, by typing <escape character> followed by P.
  484.  
  485.         PARITY option 
  486.                 Sets parity for outgoing characters to one  of  the  following:
  487.                 NONE,  SPACE, MARK, EVEN, or ODD.  On input, if parity is NONE,
  488.                 then the 8th bit is kept (as data), otherwise  it  is  stripped
  489.                 and  ignored.  The parity setting applies to both terminal con-
  490.                 nection and file transfer.  If you set parity to anything other
  491.                 than none, KERMIT-80 will attempt to use "8th bit prefixing" to
  492.                 transfer binary files.  If the other KERMIT is also capable  of
  493.                 8th  bit  prefixing,  then binary files can be transferred suc-
  494.                 cessfully; if not, the 8th bit of each data byte will  be  lost
  495.                 (you will see a warning on your screen if this happens).
  496.  
  497.         RECEIVE parameter [value] 
  498.                 Set a RECEIVE parameter.
  499.  
  500.                 PAD-CHAR
  501.                         Set  the  PAD  character  to use while receiving files.
  502.                         Currently a dummy, as for SET SEND PAD-CHAR.
  503.                 PADDING [value] 
  504.                         Set the number of PAD characters to use while receiving
  505.                         files.  Same as SET SEND PADDING.
  506.                 START-OF-PACKET [value] 
  507.                         Set the default start of Packet character for receiving
  508.                         files.  Apply the same rules and considerations as  for
  509.                         SET SEND START-OF-PACKET.
  510.  
  511.         SEND parameter [value] 
  512.                 Set a SEND parameter.
  513.  
  514.                 PAD-CHAR
  515.                         Set  the  Pad character to be used while sending files.
  516.                         It is currently a dummy entry, and  does  not  do  any-
  517.                         thing.
  518.                 PADDING [value] 
  519.                         Set the number of PAD-CHARS to be  used  while  sending
  520.                         files.  This too does nothing.
  521.                 START-OF-PACKET
  522.                         Set the default start of packet  character  to  another
  523.                         character  than  control-A.    This may be necessary on
  524.                         systems  (including  intervening  networks)  that  trap
  525.                         control-A  characters.   Choose a control character not
  526.                         otherwise used, ie not carriage return (13D, ODH), line
  527.                         feed  (10D, OAN), tabs (09D, 09H), backspace (08H), and
  528.                         bell (07H) or any  other  used  between  you  and  your
  529.                         remote system.
  530.  
  531.         TACTRAP set  the TAC intercept character.  If you are attached to a TAC
  532.                 it will swallow the intercept character (commercial AT sign  by
  533.                 default)  so  Kermit sends it twice.  With this command you can
  534.                 set the intercept character (ie  the  one  to  send  twice)  to
  535.                 another character.
  536.  
  537.         TERMINAL option 
  538.                 Select one of the following terminal characteristics:
  539.  
  540.                 OFF     sets emulation off, and its up to the attached terminal
  541.                         to  respond  to  escape  sequences sent from the remote
  542.                         host system.
  543.  
  544.                 DUMB    Like off, but carriage return and line feed  characters
  545.                         are  the  only  control characters accepted.  All other
  546.                         control characters are simply ignored. (Really a "Glass
  547.                         TTY").
  548.  
  549.                 EXTERNAL
  550.                         Emulation is provided for by a routine  in  the  system
  551.                         dependent  part  of Kermit.  Attempting to set this op-
  552.                         tion without having  and  externally  supplied  routine
  553.                         will returna "Not Implemented" error.
  554.  
  555.                 VT52    When  connected  as  a  terminal to a foreign host, the
  556.                         micro emulates a  VT52.    VT52  emulation  is  set  by
  557.                         default,  except  on  micros that already have terminal
  558.                         functionality built in, such as the DEC VT180 and  DEC-
  559.                         mate  (these act as VT100-series terminals).  Some sys-
  560.                         tems emulate other terminals, like the ADM3A; see table
  561.                         1-5.
  562.  
  563.                 QUIET   Do  not  display any file transfer information onto the
  564.                         console.  This mode is useful if you  console  takes  a
  565.                         long time to update the display.  Only the file name is
  566.                         displayed.  DEBUGging information is not displayed even
  567.                         if selected.
  568.  
  569.                 REGULAR Inverse  of  QUIET.    All  packets  etc  displayed, as
  570.                         ususal.
  571.  
  572.         TIMER ON (or OFF)
  573.                 Enable  or  disable  the  "fuzzy  timer".   The timer is off by
  574.                 default, because in the normal case KERMIT-80 is  communicating
  575.                 with a mainframe KERMIT that has its own timer.  Mainframe KER-
  576.                 MIT timers tend to be more precise  or  adaptable  to  changing
  577.                 conditions.    You should SET TIMER ON if you are communicating
  578.                 with a KERMIT that does not have a timer.  You should SET TIMER
  579.                 OFF if you are communicating over a network with long delays.
  580.  
  581.         USER new user number 
  582.                 Sets another user number to be active.  Acceptable user numbers
  583.                 are  0 to 31, though it is recommended to use user numbers 0 to
  584.                 15 only.  This is really only  useful  for  Winchester  Systems
  585.                 with high disk capacities.
  586.  
  587.         WARNING ON (or OFF)
  588.                 Warn user of  filename  conflicts  when  receiving  files  from
  589.                 remote  host,  and  attempt to generate a unique name by adding
  590.                 "&" characters to the given name.  ON by default.
  591.  
  592. SHOW    Display all setable parameters.  You will get  a  page  or  so  of  the
  593.         status af all parameters that can be set using the SET command.
  594.  
  595. STATUS  The same function as Show.
  596.  
  597. STRING line of text 
  598.         Send a character string to the host.  This simply copies the string  to
  599.         the  correct line, and assumes all appropriate parameters have been set
  600.         to be used eg baudrate, parity etc.  It is intended as  an  option  for
  601.         the TAKE command.
  602.  
  603. TAKE filespec
  604.         Take characters and commands from the specified file as  if  they  were
  605.         entered  from  the  keyboard.    This is useful if you want to set up a
  606.         batch job.  A command file can send, get, receive,  set  functions  etc
  607.         automatically.
  608.  
  609.         An  automatic "TAKE KERMIT.INI" is executed from the default drive when
  610.         Kermit-80 is loaded.  This can be used to set defaults  of  band  rate,
  611.         parity, filetype, default drive etc.
  612.  
  613.         If KERMIT.INI does not exist, control is given directly to the user.
  614.  
  615. TRANSMIT filespec wait character string 
  616.         Send the specified file to the system on the other end of  the  connec-
  617.         tion as though it were being typed at the terminal, one line at a time.
  618.         Each line sent is terminated with a carriage return, and any line feeds
  619.         are  stripped from the file sent.  After each line has been sent Kermit
  620.         waits for a character string from the host (eg a acrriage return).   If
  621.         not specified, a carriage return is assumed.  No KERMIT protocol is in-
  622.         volved.  An asterix (star) is sent to the console for every line  sent,
  623.         to  indicate how the transfer is progressing.  This is useful for send-
  624.         ing files to systems that don't have a KERMIT program.   During  trans-
  625.         mission, you may type one of these single-character commands:
  626.  
  627.         Control-C
  628.             Cease transmission, and drop into terminal emulation mode.
  629.         <CR>
  630.             Re-transmit the previous line.
  631.  
  632. TYPE    Type  a file to the console.  Typing any character other than Control-C
  633.         while the file is being displayed will suspend  the  output.    Another
  634.         character  will  resume output.  A Control-C will abort the rest of the
  635.         output.
  636.  
  637. VERSION Show the name, edit number, and edit date of  several  of  the  modules
  638.         that make up Kermit-80.
  639.  
  640.  
  641. 1.3. Kermit-80 Flavors
  642.  
  643. Many  of the systems supported use an external terminal, rather than a built-in
  644. console.  Kermit may be further customized for these systems  by  defining  (at
  645. assembly  time)  the terminal type to be used.  If the terminal type is unknown
  646. or does not match any of the existing terminal options, the generic  "CRT"  op-
  647. tion  may  be  selected.    In this case, Kermit cannot do fancy screen control
  648. during file transfer; it simply types the file names, packet numbers, and  mes-
  649. sages  in  sequence across and down the screen.  This works best if you can put
  650. your micro or terminal in "autowrap" mode; otherwise the  packet  numbers  will
  651. pile  up in the rightmost column; the filenames and messages will always appear
  652. on a new line, however.  If no specific terminal has been selected, Kermit can-
  653. not  do  VT52  emulation;  it  can act as a "dumb terminal" (sometimes called a
  654. "glass TTY"), or else its own built in terminal firmware provides  cursor  con-
  655. trol functions independent of the Kermit program.
  656.  
  657.  
  658. 1.3.1. Generic Kermit-80
  659.  
  660. "Generic Kermit-80" is an implementation of Kermit that should run on any 8080-
  661. compatible CP/M 2.2 system with no modification at all, or perhaps only a minor
  662. one.    Unlike other Kermit-80 implementations, it contains no system-dependent
  663. manipulation of the serial port.  All I/O  is  done  with  standard  CP/M  BIOS
  664. calls,  and  I/O redirection is done using the CP/M IOBYTE function, which, ac-
  665. cording to the Digital Research CP/M Operating System Manual,  is  an  optional
  666. feature of any particular CP/M implementation.  If your system does not provide
  667. the IOBYTE function, Generic Kermit-80 will not work; furthermore, not all sys-
  668. tems  that implement IOBYTE do so in the same way.  The SET PORT command may be
  669. used to select the devices to be used for input and output.   Table  1-1  lists
  670. the options to the SET PORT command and their effects.
  671.  
  672.     -----------------------------------------------------------------------
  673.  
  674.                    SET PORT xxx    input from      output to
  675.                         CRT            CRT:            CRT:
  676.                         PTR            PTR:            PTP:
  677.                         TTY            TTY:            TTY:
  678.                         UC1            UC1:            UC1:
  679.                         UR1            UR1:            UP1:
  680.                         UR2            UR2:            UP2:
  681.  
  682.                     Table 1-1:   Kermit-80 SET PORT Options
  683.  
  684.     -----------------------------------------------------------------------
  685.  
  686. The  default is SET PORT PTR.  In all cases, the console (CON:) and list (LST:)
  687. devices used are those selected when Kermit is started.
  688.  
  689. The reason all Kermit-80 implementations aren't generic is that a good deal  of
  690. speed is sacrificed by getting all services from the operating system.  While a
  691. specific implementation of Kermit-80 may be able to operate at 4800,  9600,  or
  692. even  56  Kilo baud, generic Kermit will fail to work on some systems at speeds
  693. in excess of 1200 baud.  In addition, many  features  of  Kermit  require  more
  694. specific  knowledge  of  the  hardware  involved.  Generic Kermit cannot send a
  695. BREAK signal, or change the baud rate, for example.
  696.  
  697.  
  698. 1.3.2. CP/M 3 Kermit
  699.  
  700. CP/M-3 Kermit (also  known  as  CP/M-Plus  Kermit)  is  a  version  of  generic
  701. Kermit-80,  and  should  run  on  most CP/M-3 (CP/M-Plus) systems.  It uses the
  702. auxilliary port (AUX:) to communicate to the remote Kermit.  The SET  BAUD  and
  703. SET  PORT  commands  are  not supported; nor can a BREAK be sent.  Like generic
  704. Kermit-80, a terminal may be selected at assembly time.
  705.  
  706.  
  707. 1.3.3. System-Specific Versions
  708.  
  709. There are also many versions of Kermit-80 tailored to specific systems.    Most
  710. of  these  operate  uniformly,  but  some  of  them  take  advantage (or suffer
  711. limitations) of the specific system.  Here are some of the special features for
  712. particular systems:
  713.  
  714. Amstrad: -- Two versions:
  715.  
  716.     PCW 8256
  717.         The PCW 8256/8512 with the serial inerafce attached.
  718.  
  719.     CPC 6128
  720.         The  664  with add on memory and 6128 are both supported.  Both systems
  721.         must run CP/M Plus, so the 664 will need an add on RAM  pack  and  CP/M
  722.         upgrade.    A  high speed transfer rate of 38k baud can be used between
  723.         Amstrad computers.
  724.  
  725. ACCESS:
  726.     Access  Matrix computer using port J5.  Supports SET BAUD-RATE for rates of
  727.     300-9600 baud.
  728.  
  729. Apple II -- four variations:
  730.  
  731.     APMMDM:
  732.         Apple  with Z80 Softcard and Micromodem II in slot 2 Dialout capability
  733.         provided in connect command; user is prompted for phone number if  car-
  734.         rier is not present.  During connect mode, ^]D drops carrier.  BYE com-
  735.         mand also causes carrier to be dropped.
  736.  
  737.     AP6551:
  738.         Apple  with  Z80  Softcard, and one of several 6551-based communication
  739.         cards; the slot number is a compile-time parameter (default is slot 2).
  740.         SET BAUD-RATE supported; speeds are 110-19200 baud.
  741.  
  742.     APCPS:
  743.         Apple with Z80 Softcard and CP Multi-Function Card.  The slot number is
  744.         again  a  compile-time  parameter.  SET BAUD-RATE is supported for baud
  745.         rates from 50 baud to 19200 baud.
  746.  
  747.     AP6850:
  748.         Apple  II  with  Z80 Softcard and a 6850-based USART in slot 2-the slot
  749.         being a compile-time parameter.  SET BAUD-RATE is not supported.
  750.  
  751. BBC:
  752.     Acorn  Computers  BBC  Computer  with  Acorn  Z80  second processor running
  753.     CP/M-80.  Supports SET BAUD-RATE and can send breaks.
  754.  
  755. BigBoard II:
  756.     Uses  serial  port  A. To use port B, change mnport, mnprts, and baudrt and
  757.     reassemble.  Can generate BREAK.    SET  BAUD-RATE  supported;  speeds  are
  758.     300-38400 baud.
  759.  
  760. Cifer:
  761.     Originally coded for Cifer 1886 using the VL: port set as TTYI:  and  TTYO:
  762.     but works successfully on 18xx and 28xx series machines.
  763.  
  764.     There  are  now two versions, each with two variations: Either running CP/M
  765.     Version 2.2 or 3.0, and either using the VL: or AUX: ports.  The VL:   port
  766.     version  can  only  use seven bits of data, so parity prefixing is required
  767.     for binary file transfers.  This restriction is removed by using  the  AUX:
  768.     port.   For those interested, the problem is due to the interprocessor link
  769.     between the video and CPU (!) boards.  The VL: port is on the video  board,
  770.     and  the  AUX: port on the CPU board, and the inter processor link can only
  771.     transfer seven bits of data.
  772.  
  773.     Supports SET BAUD-RATE, and can generate breaks on some models with a BREAK
  774.     key.
  775.  
  776. Comart:
  777.     Comart Communicator-Similar to Northstar equipment.  Can generate BREAK.
  778.  
  779. Compupro:
  780.     Based on Kermit 3.x, and has been merged into V4.09
  781.  
  782. CPT-85xx word processors:
  783.     Can generate BREAK.  SET BAUD-RATE supported; speeds are 50-9600 baud.
  784.  
  785. Cromemco:
  786.     Cromemco  computers  with  TU-ART  card.   Supports SET BAUD-RATE (110-9600
  787.     baud).
  788.  
  789. DEC DECmate II word processor (with Z80 card):
  790.     Can generate BREAK.
  791.  
  792. DEC VT180 (Robin):
  793.     Three output ports, referred to as COMMUNICATIONS,  GENERAL,  and  PRINTER.
  794.     Can generate BREAK.
  795.  
  796. Digicomp Delphi 100:
  797.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  798.  
  799. Discovery:
  800.     Action  Computer  Enterprises "Discovery" Multi-user Computer.  Uses Port B
  801.     on an 83U user board.  Supports SET  BAUD-RATE  for  50-19200  baud.    Can
  802.     generate BREAK.
  803.  
  804. Epson:
  805.     Epson PX-8 with LCD display.  Although it is quite different in  displaying
  806.     of  Packet Information, it works as any other CP/M-80 Kermit.  Supports SET
  807.     BAUD-RATE and can generate BREAK.
  808.  
  809. Generic Kermit:
  810.     Two  versions,  one  for CP/M version 2.2 and version 3.  These systems use
  811.     IOBYTE flipping (V2.2) and the AUX:  device to communicate  to  the  serial
  812.     line.    You  may have to SET PORT xxx before the version 2.2 will work, as
  813.     Kermit needs to know what device is the serial line.
  814.  
  815. Genie:
  816.     Eaca Video Genie.
  817.  
  818. Heath: Three Versions:
  819.  
  820.     H8QUAD
  821.         for Heath-8 systems with the quad io  board.    This  system  has  been
  822.         derived from V3.x code.  Note that this version will not run "as is" on
  823.         H89 systems.
  824.  
  825.     H89 For Heath-89 machines suports baud rates from 50 to 56,000 baud.
  826.  
  827.     Z100
  828.         For  Z-100  running  CP/M-85.  This version does not support setting of
  829.         baud rates.
  830.  
  831. Intertec Superbrain: Two Versions:
  832.  
  833.     BRAINA
  834.         For superbrain using AUX port.  Breaks and SET BAUD both supported
  835.  
  836.     BRAINM
  837.         As above, but using the MAIN port.
  838.  
  839. Ithaca:
  840.     Ithaca  Intersystems  based  computer  using the VIO card for all IO to the
  841.     outside world.  The system is strictly speaking a home-brew variant of  the
  842.     Ithaca  machine, using an S100 cardcage without a front panel.  It uses the
  843.     Extended BIOS by EuroMicro of London.  However, I see no  reason  for  this
  844.     version  not  running  on a genuine Ithaca Intersystems machine.  There are
  845.     patches needed to the EuroMicro BIOS to make this version work.
  846.  
  847. Kaypro:
  848.     Should  work  on  most  Kaypro  models,  as  well  as  some related systems
  849.     (Ferguson BigBoard I, Xerox 820).  For  the  newer  Kaypros  with  multiple
  850.     ports,  Kermit uses the one labeled "serial data"; it cannot use the serial
  851.     printer or internal modem ports (but it should be possible  to  modify  the
  852.     values  for  mnport,  mnprts,  and baudrt to do this).  Can generate BREAK.
  853.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  854.  
  855. Lobo:
  856.     Lobo MAX-80.  Supports SET BAUD-RATE and can generate BREAKS.
  857.  
  858. Merlin:
  859.     British Telecom Merlin M2215 (also Rair Black Box, possibly  also  the  ICL
  860.     PC?).  Requires a terminal.
  861.  
  862. Micromate:
  863.     PMC 101 Micromate.  Supports SET BAUD-RATE and can generate BREAK.
  864.  
  865. Micromint: Two versions
  866.  
  867.     S6  The Ciarcia/Micromint sb-180 board with a 6Mhz procoessor.  System  re-
  868.         quires a terminal.
  869.  
  870.     S9  As above, but with a 9Mhz processor.
  871.  
  872. NCR:
  873.     Decisionmate 5.  Uses the 2651 and is largely the same as the Ithaca Inter-
  874.     systems machine implementation.
  875.  
  876. Northstar: -- There are four versions available:
  877.  
  878.     NORTHS:
  879.         Northstar Horizon with HS10-4 board.  Supports SET  BAUD-RATE  and  SET
  880.         PORT.
  881.  
  882.     HORIZON:
  883.         Northstar Horizon using the serial ports on  the  Mother  board.    Can
  884.         generate BREAK.
  885.  
  886.     BASICNS:
  887.         Basic Northstar Horizon using the printer port.  Can generate BREAK.
  888.  
  889.     ADVANT:
  890.         Northstar  Advantage.    Supports SET BAUD-RATE and can generate BREAK.
  891.         Traps Control-0 in the system filter.
  892.  
  893. Morrow Decision I:
  894.     Uses  the Multi-I/O board.  Port 1 is the console, port 3 is the communica-
  895.     tions line.  SET BAUD-RATE supported; speeds are 75-56000 baud.
  896.  
  897. Morrow Micro Decision I:
  898.  
  899. Nokia MicroMikko:
  900.     Will  not  echo control-O (which locks keyboard).  SET BAUD-RATE supported;
  901.     speeds are 75-9600 baud.
  902.  
  903. Ohio Scientific:
  904.     Doesn't have screen control.
  905.  
  906. Osborne 1:
  907.     Uses serial line, not internal  modem.    Left-arrow  key  generates  <DEL>
  908.     ("delete"  or  "rubout" character) during connect mode.  SET BAUD-RATE sup-
  909.     ported; speeds are 300 and 1200 baud.  Now supports multi-sector buffering.
  910.  
  911. Research Machines: Two Versions:
  912.  
  913.     RM380ZM:
  914.         380Z and 5.25" disks supports SET BAUD.RATE
  915.  
  916.     RM380ZF:
  917.         380Z and 8" disks, otherwise as above.
  918.  
  919. Sanyo:
  920.     Sanyo MBC-1100.  This version derived from Kermit V3.x
  921.  
  922. ScreenTyper:
  923.     Details unkown.
  924.  
  925. TRS-80: Three versions:
  926.  
  927.     TRS80LB:
  928.         TRS-80 with Lifeboat CP/M
  929.  
  930.     TRS80PT:
  931.         TRS-80 with Pickles and Trout CP/M
  932.  
  933.     TRSM4:
  934.         TRS-80 Model 4 with Montezuma CP/M
  935.  
  936. Teletek:
  937.     Teletek Systemaster. Supports SET BAUD.
  938.  
  939. Telcon:
  940.     TELCON ZOBRA portable computer.
  941.  
  942. Torch:
  943.     Torch Unicorn 5 initially, but the code runs on other Z80 based CP/N (as in
  944.     Nut!)  systems.    It  uses  the BBC Computer as a "Base processor", and is
  945.     similar to the BBC version.  The base processors RS423 port is used  rather
  946.     than  any built in Modem.  (UK telecoms legislation effectively makes modem
  947.     control software tricky business...).   Two  potential  versions  exist-one
  948.     using  cursor positioning codes for a MCP and CCCP ROM combination of revi-
  949.     sion less than  1.00,  the  other  version  uses  the  additional  facility
  950.     MCP/CCCP  versions greater than 1.  Supports SET BAUD-RATE and can generate
  951.     BREAKs.
  952.  
  953.     Note that binary files must be transferred using  SET  PARITY  to  anything
  954.     other than NONE!  Parity is neither generated nor checked.
  955.  
  956. US Micro Sales:
  957.     S-100-8 based computer.
  958.  
  959. Vector Graphics:
  960.     Vector
  961.  
  962. Xerox:
  963.     Xerox 820.
  964.  
  965. Z80MU:
  966.     Development  Kermit  on a PC running the Z80MU Z80 and CP/M 2.2 development
  967.     system.  Allows development of the system independent modules to be done on
  968.     an IBM PC or clone.  Also allows the generation of new .HEX files, that may
  969.     then be KERMITed to the target system.  Note:  Not all  the  BDOS  or  BIOS
  970.     routines  are supported, so avoid "unusual" BIOS/BDOS calls.  (For example,
  971.     DIR from within Kermit will fail as one of the BIOS routines returning disk
  972.     parameters is not supported.)
  973.  
  974.  
  975. 1.4. Installation of Kermit-80
  976.  
  977. Kermit-80  was written originally for the Intertec SuperBrain in lowest-common-
  978. denominator  8080 code with the standard assembler, ASM (single source  module,
  979. no  macros,  no  advanced  instructions),  so that it could be assembled on any
  980. CP/M-80 system (the 8080  assembler  is  distributed  as  a  standard  part  of
  981. CP/M-80,  whereas  the  fancier Z80 or macro assemblers are normally commercial
  982. products).  It has since been modified to run on many other  systems  as  well.
  983. Kermit-80  should be able to run on any 8080-, 8085- or Z80-based microcomputer
  984. under  CP/M with appropriate minor changes to reflect the port I/O  and  screen
  985. control for the system (see below).
  986.  
  987. The  proliferation  of new systems supported by Kermit-80 made the program grow
  988. so large and complicated that it had to be broken  up  into  system-independent
  989. and  system-dependent  modules,  as of version 4 (this was done by Charles Car-
  990. valho of ACC).  Each module is composed of multiple files.   This  has  reduced
  991. the time and disk space necessary for assembly; Kermit-80 may once again be as-
  992. sembled on a CP/M system with roughly 250Kbytes of space.  The majority of  the
  993. code  does  not need to be reassembled to support a new system.  Unfortunately,
  994. it can no longer be assembled with ASM, since ASM does not support multiple in-
  995. put  files.   To allow it to be assembled on any CP/M system, the public-domain
  996. assembler LASM is included in the distribution kit. Kermit-80 may also  be  as-
  997. sembled  with  Microsoft's  M80  (not supplied).  In theory, any 8080 assembler
  998. supporting the INCLUDE directive ought to work, as well.
  999.  
  1000. All versions of Kermit-80 are assembled from the same set of sources, with sys-
  1001. tem dependencies taken care of by assembly-time conditionals within the system-
  1002. dependent module (eventually, the system-dependent module will itself be broken
  1003. up into multiple files, one for each system).  The most important system depen-
  1004. dencies are terminal emulation (when CONNECTed to the remote host)  and  screen
  1005. handling,  which  are  dependent  on the individual micro's escape codes (these
  1006. features are table driven and easily modified for other CP/M systems), and  the
  1007. lowest  level  I/O  routines  for  the  serial  communications  port.  The port
  1008. routines are best done only with BDOS calls, but  some  systems  do  not  allow
  1009. this, primarily because the BDOS routines strip the parity bit during port I/O,
  1010. and the parity bit is used for data when transmitting binary files.
  1011.  
  1012. Kermit-80's I/O routines must check the port status and go elsewhere if no  in-
  1013. put  is available; this allows for virtual terminal connection, keyboard inter-
  1014. ruption of stuck transmissions, etc.   On  systems  that  fully  implement  I/O
  1015. redirection  via the optional CP/M IOBYTE facility, this may be done by switch-
  1016. ing the IOBYTE definition.  On others, however, IN/OUT instructions  explicitly
  1017. referencing the port device registers must be used.
  1018.  
  1019. CP/M-80  KERMIT  versions  3.8  and later include a "fuzzy timer" that allows a
  1020. timeout to occur after an interval ranging from 5 to 20 seconds (depending upon
  1021. the  speed of the processor and the operating system routines) during which ex-
  1022. pected input does not appear at the port.  In this case, retransmission  occurs
  1023. automatically.  In any case, you may type a carriage return during transmission
  1024. to simulate a timeout when the transfer appears to be stuck.
  1025.  
  1026.  
  1027. 1.4.1. Organization of Kermit-80
  1028.  
  1029. Kermit-80 consists of two modules, each of which  is  generated  from  multiple
  1030. source  files.    The  first  module  contains the system-independent code; the
  1031. second module is configured for a particular system and merged with the system-
  1032. independent module to produce a customized Kermit-80.
  1033.  
  1034. The distribution kit contains:
  1035.  
  1036.    - the system-independent module, CPSKER.HEX;
  1037.    - the system-dependent modules, CPV*.HEX (see table 1-2 and 1-3);
  1038.    - the source files, CPS*.ASM and CPX*.ASM,
  1039.    - the public-domain CP/M assembler, LASM.*,
  1040.    - the public-domain CP/M load/patch utility, MLOAD.*
  1041.  
  1042. -------------------------------------------------------------------------------
  1043.  
  1044. Symbol  Filename System
  1045. ACCESS  CPVACC  Access Matrix
  1046. ADVANT  CPVADV  Northstar Advantage
  1047. AP6551  CPVAPL  Apple II, Z80 Softcard, 6551 ACIA in serial interface
  1048. AP6850  CPVA65  Apple II, Z80 Softcard, 6850 ACIA in Serial Iiterface
  1049. APMMDM  CPVAPM  Apple II, Z80 Softcard, Micromodem II in slot 2
  1050. APCPS   CPVCPS  Apple II, Z80 Softcard, with CPS multifunction card
  1051. BASICNS CPVBNS  Northstar Horizon (terminal required)
  1052. BBC     CPVBBC  Acorn "BBC" computer with Acorn Z80 second processor
  1053. BBII    CPVBB2  BigBoard II (terminal required)
  1054. BRAINM  CPVBRM  Intertec Superbrain using the main port
  1055. BRAINA  CPVBRA  Intertec Superbrain using the Aux port
  1056. CIFER2  CPVCIF  Cifer 1886 using the VL: Serial port and CP/M V2.2
  1057. CIFER3  CPVCI3  Cifer 1886 using the VL: Serial port and CP/M V3.0
  1058. CIFER2  CPVCA2  Cifer 1886 using the AUX: Serial port and CP/M V2.2
  1059. CIFER3  CPVCA3  Cifer 1886 using the AUX: Serial port and CP/M V3.0
  1060. CMEMCO  CPVCRO  Cromemco with TU-ART card. Terminal required)
  1061. COMART  CPVCOM  Comart Communicator (terminal required)
  1062. COMPRO  CPVPRO  Compupro with Interfacer 4 (or 3).  Terminal required.
  1063. CPC     CPVCPC  Amstrad CPC 664 and 6128 and CP/M 3
  1064. CPM3    CPVCP3  "Generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd)
  1065. CPT85XX CPVCPT  CPT-85xx wordprocessor with CP/M
  1066. DELPHI  CPVDEL  Digicomp Delphi 100 (terminal required)
  1067. DISC    CPVDIS  Action Computer Enterprises "Discovery" (terminal req'd)
  1068. DMII    CPVDM2  DECmate II with CP/M option
  1069. GENER   CPVGEN  "Generic": CPM 2.2 systems with IOBYTE (terminal req'd)
  1070. GENIE   CPVGNI  Video Genie
  1071. H8QUAD  CPVH8Q  Heath-8 with Quad 8 i/o board
  1072. HEATH   CPVH89  Heath/Zenith H89
  1073. HORIZON CPVHOR  Northstar Horizon (terminal required)
  1074. KPII    CPVKPR  Kaypro-II (and 4; probably supports all Kaypro systems)
  1075. LOBO    CPVLBO  Lobo Max-80
  1076.  
  1077. "symbol" is the symbol used to select the target system, in CPVTYP.ASM;
  1078.  
  1079. "filename" is the name under which the module is supplied in the distribution.
  1080.  
  1081.              Table 1-2:   Systems supported by Kermit-80 (Part 1)
  1082.  
  1083. -------------------------------------------------------------------------------
  1084.  
  1085. -------------------------------------------------------------------------------
  1086.  
  1087. Symbol  Filename System
  1088. M2215   CPVMRL  British Telecom Merlin/Rair Black Box (terminal required)
  1089. MDI     CPVMDI  Morrow Decision I (terminal required)
  1090. MIKKO   CPVMIK  MikroMikko
  1091. MMATE   CPVMM   PMC 101 Micromate (terminal required)
  1092. MMDI    CPVUD   Morrow Micro Decision I (terminal required)
  1093. NCRDMV  CPVDMV  NCR Decision Mate V.  (Terminal required?)
  1094. NORTHS  CPVNS   Northstar Horizon with HSIO-4 card (terminal req'd)
  1095. OSBRN1  CPVOSB  Osborne 1
  1096. OSI     CPVOSI  Ohio Scientific
  1097. PCI2651 CPVPCI  Ithaca Intersystems with VI0 card (terminal required)
  1098. PCW     CPVPCW  Amstrad PCW 8256/8512 with serial interface
  1099. PX8     CPVPX8  Epson PX-8
  1100. RM380ZM CPVRMM  Research Machines 380Z with MDS (5.25" discs)
  1101. RM380ZF CPVRMF  Research Machines 380Z with FDS (8" discs)
  1102. ROBIN   CPVROB  DEC VT180
  1103. S1008   CPVUSM  US Microsales S-100-8 (terminal required)
  1104. SANYO   CPVSAN  Sanyo MBC-1100
  1105. SB6     CPVSB6  Micromint SB-180 with 6Mhz CPU (terminal required)
  1106. SB9     CPVSB9  Micromint SB-180 with 9Mhz CPU (terminal required)
  1107. SCNTPR  CPVSCN  Screentyper
  1108. TELCON  CPVTEL  TELCON Zobra portable
  1109. TELETEK CPVTET  Teletek Systemaster
  1110. TORCH   CPVTRC  Torch computers BBC-B with Z80 second processors
  1111. TRS80LB CPVTLB  TRS-80 model II with Lifeboat 2.25C CP/M Display
  1112. TRS80PT CPVTPT  TRS-80 model II with Pickles + Trout CP/M Display
  1113. TRSM4   CPVTM4  TRS-80 model IV
  1114. VECTOR  CPVVEC  Vector Graphics
  1115. XER820  CPVXER  Xerox 820
  1116. Z100    CPVZ00  Z-100 under CP/M-85
  1117. Z80MU   CPVZ80  Z80MU development system on a PC
  1118.  
  1119. "symbol" is the symbol used to select the target system, in CPXTYP.ASM;
  1120.  
  1121. "filename" is the name under which the module is supplied in the distribution.
  1122.  
  1123.              Table 1-3:   Systems supported by Kermit-80 (Part 2)
  1124.  
  1125. -------------------------------------------------------------------------------
  1126.  
  1127. -------------------------------------------------------------------------------
  1128.  
  1129. Symbol  Terminal type
  1130. CRT     Dumb terminal type.  Does not do cursor addressing
  1131. ADM3A   Lear Seigler ADM 3A
  1132. ADM22   Lear Seigler ADM 22
  1133. AM230   Ampro 230
  1134. H1500   Hazeltine 1500
  1135. SMRTVD  Netronics Smartvid
  1136. SOROQ   Soroq IQ-120
  1137. TVI912  Televideo 912
  1138. TVI925  Televideo 925 or Freedom 100
  1139. VT52    Dec VT52 or equivalent (H19)
  1140. VT100   Dec VT100 or equivalent
  1141. WYSE    Wyse 100
  1142.  
  1143. "symbol" is the symbol used to select the target system, in CPXTYP.ASM;
  1144.  
  1145. "Terminal type" is the type of terminal "symbol" selects.
  1146.  
  1147.                  Table 1-4:   Terminals supported by Kermit-80
  1148.  
  1149. -------------------------------------------------------------------------------
  1150.  
  1151.  
  1152. 1.4.2. Downloading Kermit-80
  1153.  
  1154. You'll need either a pre-configured .COM file or the system-independent module,
  1155. CPSKER, in binary (.COM) or hex (.HEX) format and the system-dependent  overlay
  1156. for your system (from Tables 1-2 and 1-3).  If your system is not listed in the
  1157. table, get the generic CP/M 2.2 Kermit or the generic CP/M 3 Kermit.    If  you
  1158. already  have  a  version of Kermit on your micro and you want to install a new
  1159. version, simply use your present version to get the new files.    Transfer  the
  1160. files to your system and skip ahead to "merging the modules".
  1161.  
  1162. If you do not have a copy of Kermit on your micro, and you cannot borrow a Ker-
  1163. mit floppy but you do have access to a mainframe computer with a  copy  of  the
  1164. Kermit-80 distribution, you should read this section.
  1165.  
  1166. There  are  several  ways  to get Kermit from a host system to your micro.  The
  1167. easiest is to "download" the necessary "hex" files into your micro's memory and
  1168. then  save  it  on  the  disk.  If you have a terminal emulator program on your
  1169. micro which can save a copy of the session to disk, connect to your  host,  and
  1170. type  the necessary files.  Exit from the emulator, saving the session log, and
  1171. edit the session log to extract the hex files.   Skip  ahead  to  "merging  the
  1172. files".
  1173.  
  1174. The following is a procedure which, though far from foolproof, should allow you
  1175. to get a version of Kermit to your CP/M based micro.  It depends upon the  host
  1176. prompt,  or at least the first character of the host prompt, being some charac-
  1177. ter that cannot appear in a hex file (the valid characters for  hex  files  are
  1178. the  digits  0-9, the upper case letters A-F, the colon ``:'', carriage return,
  1179. and line feed).  As soon the prompt character is encountered, the transfer will
  1180. terminate.    If  your  host does not issue a prompt that will accommodate this
  1181. scheme, you can achieve the same effect by adding an atsign ``@'' to  the  very
  1182. end  of  the hex file before sending it from the host.  The program below looks
  1183. for an atsign (the normal DEC-20 prompt, hex 40).    DECSYSTEM-10  users  would
  1184. look for a dot, hex 2E; VAX/VMS or UNIX users would look for a dollar sign, hex
  1185. 24; UNIX C-Shell users would look for a percent sign, hex 26.
  1186.  
  1187.    1. For CP/M 2.2 systems, connect to a floppy disk with plenty  of  free
  1188.       space.    Run DDT and type in the following (the comments should not
  1189.       be typed in; they are there just  to  tell  you  what's  happening):
  1190.       (Note that this wont work for CP/M Plus or 3.0 systems!)
  1191.  
  1192.       ----------------------------------------------------------------
  1193.       -a100                   ;Begin assembling code at 100
  1194.       0100    LXI H,2FE       ;Where to store in memory
  1195.       0103    SHLD 200        ;Keep pointer there
  1196.       0106    MVI E,D         ;Get a CR
  1197.       0108    MVI C,4         ;Output to PUNCH (send to HOST)
  1198.       010A    CALL 5
  1199.       010D    MVI C,3         ;Input from READER (read from HOST)
  1200.       010F    CALL 5
  1201.       0112    ANI 7F          ;Strip parity bit
  1202.       0114    PUSH PSW        ;Save a and flags
  1203.       0115    MOV E,A         ;Move char to E for echo
  1204.       0116    MVI C,2         ;Output to screen
  1205.       0118    CALL 5
  1206.       011B    POP PSW         ;Restore A and flags
  1207.       011C    CPI 40          ;(or 4E,24,26,etc) System prompt?
  1208.       011E    JZ 127          ;Yes, have whole file in memory
  1209.       0121    CALL 17A        ;No, store another byte
  1210.       0124    JMP 10D         ;Read another byte
  1211.       0127    MVI A,1A        ;Get a Control-Z (CP/M EOF mark)
  1212.       0129    CALL 17A        ;Store it in memory
  1213.       012C    LXI H,300       ;Get memory pointer
  1214.       012F    SHLD 202        ;Store as DMA pointer
  1215.       0132    LDA 201         ;Get 'HI' byte of memory pointer
  1216.       0135    STA 200         ;and store it as 'LO' one
  1217.       0138    XRA A
  1218.       0139    STA 201         ;Zero 'HI' byte (slow *256)
  1219.       013C    MVI C,16        ;Make NEW file
  1220.       013E    LXI D,5C        ;With FCB1
  1221.       0141    CALL 5
  1222.       0144    CALL 15E        ;Write 128 bytes (sector)
  1223.       0147    CALL 15E        ;Write another sector
  1224.       014A    LXI H,FFFF      ;Get a 16-bit Minus One
  1225.       014D    XCHG            ;into DE
  1226.       014E    LHLD 200        ;Get 256-byte counter
  1227.       0151    DAD D           ;Decrement
  1228.       0152    SHLD 200        ;and store back
  1229.       0155    MVI A,2         ;Check if
  1230.       0157    CMP L           ; 256-byte counter down to offset
  1231.       0158    JZ 183          ;Yes, we're done
  1232.       015B    JMP 144         ;Keep writing..
  1233.       015E    LHLD 202        ;Get file-pointer
  1234.       0161    XCHG            ;into DE
  1235.       0162    MVI C,1A        ;Set DMA-address
  1236.       0164    CALL 5
  1237.       0167    MVI C,15        ;Write sector (128 bytes)
  1238.       0169    LXI D,5C        ;using FCB1
  1239.       016C    CALL 5
  1240.       016F    LHLD 202        ;Get file-pointer
  1241.       0172    LXI D,80        ;128-bytes
  1242.       0175    DAD D           ;added to file-pointer
  1243.       0176    SHLD 202        ;and save
  1244.       0179    RET             ;and return
  1245.       017A    LHLD 200        ;Get Memory-pointer
  1246.       017D    MOV M,A         ;Store character
  1247.       017E    INX H           ;Increment Pointer
  1248.       017F    SHLD 200        ;and save
  1249.       0182    RET             ;and return
  1250.       0183    MVI C,10        ;CLOSE file
  1251.       0185    LXI D,5C        ;using FCB1
  1252.       0188    CALL 5
  1253.       018B    JMP 0           ;Force WARM BOOT
  1254.       0179
  1255.       -^C                     ;(Type Control-C) Return to CP/M
  1256.       A>SAVE 1 FETCH.COM      ;Save program, we need to run it twice.
  1257.  
  1258.       Figure 1-1:   Bootstrap program for Kermit-80 and CP/M Version 2.2
  1259.  
  1260.       ----------------------------------------------------------------
  1261.  
  1262.       Alternatively,  an  assembler  source  file for this program is dis-
  1263.       tributed with CP/M Kermit as CPKFET.ASM.  You might prefer  to  type
  1264.       the  assembler version in and assemble and load it (ASM CPKFET, LOAD
  1265.       CPKFET, or MASM CPKFET, MLOAD CPKFET),  to  let  the  assembler  and
  1266.       loader catch any typing errors.
  1267.  
  1268.    2. Connect  to  your  host  using  a  terminal  or a terminal emulation
  1269.       program.  Ensure that your host does not have your terminal in "page
  1270.       mode" (does not pause at the end of each screenful).
  1271.  
  1272.    3. Tell  the host to display the first hex file (the system-independent
  1273.       module) at your terminal, e.g. give a command like TYPE  CPSKER.HEX,
  1274.       without a terminating carriage return.
  1275.  
  1276.    4. Return to your micro by switching the cable from the terminal to the
  1277.       micro, or by terminating the micro's terminal program.
  1278.  
  1279.    5. Make sure your IOBYTE is set so that RDR: and PUN: correspond to the
  1280.       I/O  port  that is connected to the host (this would normally be the
  1281.       case unless you have done something special to change things).
  1282.  
  1283.    6. Load the program you entered in the first step with DDT, and use  it
  1284.       to capture the first hex file:
  1285.  
  1286.           DDT FETCH.COM
  1287.           -icpsker.hex            ;Setup FCB for file CPSKER.HEX
  1288.           -g100,179               ;Execute the program.
  1289.  
  1290.       Now there should be a file CPSKER.HEX on your connected disk.
  1291.  
  1292.    7. Return  to the host, and tell it to display the second hex file (the
  1293.       system-dependent module for your configuration).  Again, do not type
  1294.       the terminating carraige return.
  1295.  
  1296.    8. Return to your micro, and run the capture program again:
  1297.  
  1298.           DDT FETCH.COM
  1299.           -icpxovl.hex            ;Setup FCB to create CPXOVL.HEX
  1300.           -g100,179               ;Execute the program.
  1301.  
  1302.       Now  there  should  be  a  file  CPXOVL.HEX  on your connected disk.
  1303.       Replace CPXOVL.HEX in this example with the appropriate overlay file
  1304.       for your system.
  1305.  
  1306. Merging the files:
  1307.  
  1308.    1. For  purposes  of  illustration, we will assume the system-dependent
  1309.       overlay is called "cpxovl.hex".  The two hex files may  be  combined
  1310.       with  MLOAD  or  DDT.  If you already have a running Kermit, you can
  1311.       transfer MLOAD.HEX to your system and create  MLOAD.COM  by  running
  1312.       LOAD.   If you're bootstrapping Kermit, you could transfer MLOAD.HEX
  1313.       to your system the same way you got the other two  .HEX  files,  but
  1314.       it's  probably  simpler  to  use  DDT to get Kermit running, and get
  1315.       MLOAD later if you need it.
  1316.  
  1317.    2. Using MLOAD, the two pieces may be easily merged:
  1318.  
  1319.           A>mload kermit49=cpsker,cpxovl
  1320.           [some messages about program size, etc.]
  1321.           A>
  1322.  
  1323.    3. If you don't have MLOAD running, it's a bit more complex:
  1324.  
  1325.           A>ddt cpsker.hex
  1326.           NEXT  PC
  1327.           3500 0100
  1328.           -icpxovl.hex
  1329.           -r
  1330.           NEXT  PC
  1331.           xxxx 0000
  1332.           -^C
  1333.           A>save dd kermit49.com
  1334.  
  1335.       The page count ("dd") used in the SAVE command  is  calculated  from
  1336.       the last address ("xxxx") given by DDT in response to the R command:
  1337.       drop the last two digits and add 1 if they were not zero, then  con-
  1338.       vert  from  hexadecimal (base 16) to decimal (base 10): 684F becomes
  1339.       69 hex, which is 105 decimal (5 times 16 plus 9) -- but 6700 becomes
  1340.       67  hex,  or  103 decimal (consult an introductory computing book if
  1341.       you don't understand number base conversion).
  1342.  
  1343.    4. If you are using the Z80MU CP/M and Z80 development  toolkit  on  an
  1344.       IBM  PC or clone, then follow the same instructions as for a genuine
  1345.       CP/M system.  When you have loaded your file, you will have to  ship
  1346.       the  .COM  or  two  .HEX  files to the target CP/M system. (Possibly
  1347.       using a previous issue of Kermit?)
  1348.  
  1349.    5. Note that CP/M hex files have checksums on each line.  If there were
  1350.       any transmission errors during the downloading process, MLOAD or DDT
  1351.       will notice a bad checksum and will report an error (something  like
  1352.       "Illegal Format").  If you get any errors during loading, either fix
  1353.       the hex file locally with an editor, or repeat the transfer.
  1354.  
  1355. You now should have a running version of Kermit-80, called KERMIT49.COM.
  1356.  
  1357. Test your new Kermit by running it.  If it gives you a prompt, it might be  OK.
  1358. (don't  delete your old one yet...).  Instead of a prompt, you could get one of
  1359. two messages indicating that the configuration information is invalid:  
  1360.  
  1361.     ?Kermit has not been configured for a target system
  1362.  
  1363. or 
  1364.  
  1365.     ?Consistency check on configuration failed
  1366.  
  1367. Of course, neither of these messages should appear if  you're  building  Kermit
  1368. from  the  distribution  kit.  The first message indicates that the overlay was
  1369. not found where the system-independent module expected to find it, probably be-
  1370. cause  the  overlay address is incorrect; the second indicates that the version
  1371. of CPXLNK used in the system-dependent module is incompatible with the  system-
  1372. independent module.
  1373.  
  1374. Once  you  are  satisfied that KERMIT40 works correctly, you should rename your
  1375. old KERMIT.COM to something else, like OKERMIT.COM, and rename KERMIT40.COM  to
  1376. KERMIT.COM.
  1377.  
  1378.  
  1379. 1.4.3. Assembling Kermit-80 from the sources
  1380.  
  1381. Kermit-80 is built in two pieces from the following files:
  1382.  
  1383. The system-independent files:
  1384.   CPSKER.ASM    header file
  1385.   CPSDEF.ASM    definitions for both KERMIT and KERSYS
  1386.   CPSMIT.ASM    initialization,  main  loop, miscellaneous commands (BYE, EXIT,
  1387.                 LOG, SET, SHOW, STATUS, and VERSION)
  1388.   CPSCOM.ASM    second part of commands, status and set file
  1389.   CPSPK1.ASM    part  1  of  the  KERMIT  protocol  handler   (SEND,   RECEIVE,
  1390.                 LOGOUT,and FINISH commands)
  1391.   CPSPK2.ASM    part 2 of the KERMIT protocol handler
  1392.   CPSREM.ASM    REMOTE routines (FINISH, BYE and LOGOUT in CPXPK*.ASM)
  1393.   CPSSER.ASM    SERVER routines (for the future)
  1394.   CPSTT.ASM     the transparent commands (TRANSMIT, CONNECT)
  1395.   CPSCPM.ASM    CP/M commands (DIR, ERA, USER, TYPE, PRINT, COPY)
  1396.   CPSWLD.ASM    the wildcard handler
  1397.   CPSCMD.ASM    the command parser
  1398.   CPSUTL.ASM    utility routines and data
  1399.   CPSDAT.ASM    data space and the overlay definitions
  1400.   CPXLNK.ASM    linkage area description
  1401.  
  1402. The system-dependent files:
  1403.   CPXTYP.ASM    system selection
  1404.   CPXLNK.ASM    system overlay specification and jump table
  1405.   CPXCOM.ASM    common routines for all systems
  1406.   CPXSWT.ASM    system selector or switcher
  1407.  
  1408. One of:
  1409.   CPXSYS.ASM    family file for some system-specific code
  1410.   CPXTOR.ASM    family file for Torch, Superbrain, PCI2651 etc
  1411.   CPXNOR.ASM    family file for Northstar and Comart machines
  1412.   CPXMRL.ASM    family file for British Telecom merlin/Rair Black Box
  1413.   CPXSB.ASM     family file for Micromint SB-180 systems
  1414.   CPXCIF.ASM    family file for Cifer systems
  1415.   CPXHEA.ASM    family file for Heath/Zenith systems
  1416.   CPXAPP.ASM    family file for Apple II systems
  1417.   CPXPCW.ASM    family file for Amstrad PCW 8256/8512 machines
  1418.   CPXBBI.ASM    family file for BigBoard, Kaypro and Xerox 820 systems
  1419.   CPXSYO.ASM    family file for Sanyo MBS-1100 systems
  1420.   CPXTM4.ASM    family file for Tandy Model 4 with CP/M systems
  1421.   CPXGNI.ASM    family file for Video Genie systems
  1422.   CPXPRO.ASM    family file for Compupro systems
  1423.   CPXZ80.ASM    family file for the Z80MU development system
  1424.  
  1425. and if you use a terminal,
  1426.   CPXVDU.ASM    display codes for VDUs etc.  Not always required
  1427.  
  1428. The  system-independent module contains all of the system-independent files ex-
  1429. cept for CPXLNK.ASM, which is assembled into  the  system-dependent  module  to
  1430. provide  the structures needed to connect the two modules.  As distributed, the
  1431. system-independent module  is  named  CPSKER.HEX.    If  you  have  a  copy  of
  1432. CPSKER.HEX, you do not need to reassemble the system-independent module to con-
  1433. figure Kermit for your system.
  1434.  
  1435. The system-dependent module consists  of  CPXTYP.ASM,  CPSDEF.ASM,  CPXLNK.ASM,
  1436. CPXSWT.ASM,  CPSCOM.ASM,  one  of  the  family  files  CPXSYS.ASM,  CPXTOR.ASM,
  1437. CPXMRL.ASM,  CPXSB.ASM,   CPXCIF.ASM,   CPXHEA.ASM,   CPXBBI.ASM,   CPXTM4.ASM,
  1438. CPXGNI.ASM,  CPXNOR.ASM,  CPXAPP.ASM,  CPXPCW.ASM,  or CPXPRO.ASM, and possibly
  1439. CPXVDU.ASM, if your system uses a terminal for the console.  One  copy  of  the
  1440. system-dependent  module  is supplied already assembled for each supported sys-
  1441. tem; the filename may be obtained from tables 1-2 and 1-3.  If  a  terminal  is
  1442. required for a system, a CRT (glass TTY device) has been selected.
  1443.  
  1444. After assembling the two pieces separately, they are combined with DDT or MLOAD
  1445. into a system-specific Kermit.
  1446.  
  1447. If you want to rebuild the system-independent module, the only change  you  may
  1448. need  to make is to select the assembler to be used, in CPSKER.ASM.  Define one
  1449. of MAC80, M80, or LASM to TRUE to select it as the assembler; the others should
  1450. be defined FALSE.
  1451.  
  1452. Assuming  you have the Microsoft Macro Assembler package (M80/L80), you'll need
  1453. to do the following:
  1454.  
  1455.     A>m80 cpsker=cpsker.asm
  1456.     A>l80 /p:100,cpsker,cpsker/n/e
  1457.  
  1458. This will produce CPSKER.COM.
  1459.  
  1460. If you are using LASM instead, do this:  
  1461.  
  1462.     A>lasm cpsker
  1463.  
  1464. LASM will generate CPSKER.HEX and  CPSKER.PRN.    LASM  allows  options  to  be
  1465. specified in the same way as the standard assembler, ASM, so the command 
  1466.  
  1467.     A>lasm cpsker.abz
  1468.  
  1469. will  read  the  source  files from drive A, send the .HEX file to drive B, and
  1470. suppress the listing file.
  1471.  
  1472. If you are using the Z80MU development system on an IBM PC or clone,  then  as-
  1473. semble  your  files  using either LASM and MLOAD or M80 and L80, as if you were
  1474. using a genuine CP/M-80 system.  Note that you will still have the  problem  of
  1475. transferring your assembled files to the target CP/M system.
  1476.  
  1477. If  you want to generate a system-dependent overlay for a particular system, or
  1478. want to change the terminal supported, you'll need  to  check  three  areas  in
  1479. CPXTYP.ASM:
  1480.  
  1481. First,  the  overlay  start ADDRESS.  The symbol "ovladr" is EQUated to the ad-
  1482. dress of "LNKFLG" in the system-independent module, as the starting address  of
  1483. the overlay (6000H for version 4.09).  You'll need to know this value if you're
  1484. building the overlay with M80/L80.  You won't  normally  need  to  change  this
  1485. value.
  1486.  
  1487. Second, the assembler being used.  Again, define one of MAC80, M80, and LASM to
  1488. be TRUE to select it, and define the others to  be  FALSE.    The  two  modules
  1489. (system-independent and system-dependent) do not need to be built with the same
  1490. assembler.
  1491.  
  1492. Third, the system configuration.  Locate your system in  tables  1-2  and  1-3,
  1493. then  define  the  appropriate  symbol TRUE, and the rest FALSE.  If the system
  1494. comes with a builtin console terminal, define all the terminal switches  FALSE.
  1495. If  the system uses an external terminal as the console, locate the terminal in
  1496. table 1-5 and define the appropriate symbol TRUE, and the remainder FALSE.   If
  1497. the terminal is not listed in table 1-5, use the CRT switch; in this case, VT52
  1498. emulation is not supported.
  1499.  
  1500. In addition, there are a few general and system-specific symbols which  may  be
  1501. altered to fit your system:
  1502.  
  1503. APSLOT          For Apple with 6551 ACIA, defines the slot number of the serial
  1504.                 card
  1505.  
  1506. CPUSPD          Processor speed in units of 100KHz  (currently  used  only  for
  1507.                 bbII and kpII for timing loops)
  1508.  
  1509. TAC             For  users  connecting through ARPAnet TACs: set to TRUE if you
  1510.                 wish the default TACTRAP status to be ON. (This may be overrid-
  1511.                 den  with  the  SET TACTRAP command).  If you're not connecting
  1512.                 through a TAC, set tac to FALSE and ignore tacval.
  1513.  
  1514. TACVAL          For ARPANET  TAC  users:  defines  the  default  TAC  intercept
  1515.                 character (may be overridden with the SET TACTRAP command).
  1516.  
  1517. If  you  are  just  assembling  an  existing configuration, you'll need to edit
  1518. CPXTYP.ASM only.  If you are adding support for a new system,  you  should  not
  1519. modify  CPSDEF.ASM  or CPXLNK.ASM; if you do, you'll have to change the system-
  1520. independent module also.  Eventually, CPXSYS.ASM will be  split  into  separate
  1521. files, each of which will generate one or more related systems.  When this hap-
  1522. pens, you'll want to pick the one closest to your system to use as  a  starting
  1523. point.
  1524.  
  1525. After  editing  CPXTYP.ASM  as necessary, assemble and link the overlay as fol-
  1526. lows:
  1527.  
  1528.    - With M80 (where "xxxx" is the hex value of ovladr from CPXLNK.ASM):
  1529.  
  1530.          A>m80 cpxtyp=cpxtyp.asm
  1531.          A>l80 /p:xxxx,cpxtyp,cpxtyp/n/x/e
  1532.  
  1533.    - With LASM:
  1534.  
  1535.          A>lasm cpxtyp
  1536.  
  1537. With an IBM PC or clone using the Z80MU softwrae, follow the instructions as if
  1538. you were using a real CP/M system.
  1539.  
  1540. The  overlay (CPXTYP.HEX) may then be merged with the system-independent module
  1541. as described above (creating a runnable Kermit from the distribution kit).
  1542.  
  1543. If you are using the Z80MU development system on a PC, and already have a  run-
  1544. ning Kermit-80 v3.9 or later, you can merge the two .HEX files into a .COM file
  1545. with LINK80 (TOPS 10/20), MLOAD (Z80MU), L80 (Z80MU), and transfer the new .COM
  1546. file to your micro with Kermit:
  1547.  
  1548.    - Z80MU on a PC and MLOAD:
  1549.  
  1550.          @MLOAD KERNEW=CPSKER,CPXTYP
  1551.  
  1552.    - Z80MU on a PC and C80:
  1553.  
  1554.          @L80 /P:xxxx,CPXTYP,CPXTYP/N/X/E
  1555.  
  1556. producing KERNEW.COM.
  1557.  
  1558. -------------------------------------------------------------------------------
  1559.  
  1560. Symbol         Terminal description
  1561. crt            Basic CRT, no cursor positioning
  1562. adm3a          ADM3A Display or lookalike
  1563. adm22          ADM22 Display or lookalike
  1564. am230          Ampro 230
  1565. h1500          Hazeltine 1500
  1566. smrtvd         Netronics Smartvid-80
  1567. soroq          Soroq IQ-120
  1568. tvi912         TVI 912
  1569. tvi925         TVI 925, Freedom 100
  1570. vt52           VT 52 or VT52 emulator such as Heath H19, H29, etc.
  1571. vt100          VT 100 or emulator (most ANSI terminals should work)
  1572. wyse           Wyse 100
  1573.  
  1574.                    Table 1-5:   Terminals known to Kermit-80
  1575.  
  1576. -------------------------------------------------------------------------------
  1577.  
  1578.  
  1579. 1.5. Adding Support For A New System
  1580.  
  1581. Kermit-80  is  built  from  a  common set of source files; the system-dependent
  1582. module makes heavy use of  conditional  assembly  (this  complication  will  be
  1583. removed  in  future  releases).  The system dependencies arise from attempts to
  1584. answer some questions:
  1585.  
  1586.    1. What kind of terminal is to be supported?
  1587.  
  1588.       For many micros, the console is an integral part of the system,  but
  1589.       others  can  use an external terminal.  In either case, the commands
  1590.       to manipulate the screen (position the  cursor,  erase  the  screen,
  1591.       etc) must be defined.
  1592.  
  1593.    2. How is the serial line accessed?
  1594.  
  1595.       For systems supporting the IOBYTE function, this is straightforward;
  1596.       the symbol "IOBYT" is defined TRUE.  If the serial line is  accessed
  1597.       with  IN  and OUT instructions, it may be possible to use the simple
  1598.       I/O routines provided.  In this case, the symbol "INOUT" is  defined
  1599.       TRUE,  the  MNPORT and MNPRTS are defined to be the data and control
  1600.       addresses, respectively, and bit masks for testing for  "input  data
  1601.       available" and "output buffer empty" must be defined.  If the inter-
  1602.       face is strange, leave IOBYT and INOUT set to FALSE, and provide the
  1603.       I/O routines.
  1604.  
  1605.    3. What initialization is necessary?
  1606.  
  1607.       You  may  wish  to set the baud rate or configure the serial line at
  1608.       startup.  Examples for a number of devices are present.
  1609.  
  1610.    4. What special features are to be supported?
  1611.  
  1612.       You may want to provide the capability  to  select  one  of  several
  1613.       serial  lines  with  the SET PORT command, or to change the speed of
  1614.       the serial line with the SET BAUD-RATE command.  To do this,  you'll
  1615.       need  to  build a command table, using the systems already supported
  1616.       as examples.  The ability to  send  a  BREAK  signal  is  desirable.
  1617.       Again,  examples  for  several different interfaces (ACIA, SIO, etc)
  1618.       are present.
  1619.  
  1620.    5. Do you want to design an external terminal type?
  1621.  
  1622.       There is a jump entry in the overlay file  to  allow  users  to  add
  1623.       their  own  termainl  emulator.    If you write the code for such an
  1624.       emulator, you must load this jump address with the address  of  your
  1625.       emulator, and SET TERMINAL EXTERNAL from within Kermit.  All charac-
  1626.       ters will be passed to this routine during connect mode.
  1627.  
  1628.  
  1629. 1.6. Notes on New Features in Kermit-80 Version 4
  1630.  
  1631.    - Debugging aids:  SET DEBUG ON will add two fields to the SEND/RECEIVE
  1632.      display, labelled "Spack" and "Rpack".  These display the last packet
  1633.      sent and received.  Of course, this slows down  the  transfer,  espe-
  1634.      cially if the console is an external terminal.  SET DEBUG OFF removes
  1635.      these fields.  The VERSION command displays the  name,  edit  number,
  1636.      and edit date of several of the modules that make up Kermit.
  1637.  
  1638.    - TAC  support: ARPAnet TACs (and many other communication devices such
  1639.      as terminal concentrators, modems,  port  contention  units,  network
  1640.      PADs,  etc)  use  a  printing  character  (like  "@") as an intercept
  1641.      character, to allow commands to be issued to the TAC, or modem,  etc.
  1642.      In  order to send this character to the host, it must be typed twice.
  1643.      The command "SET TAC CHARACTER" to Kermit enables the  "TACtrap"  and
  1644.      asks the user to specify the TAC intercept character.  This character
  1645.      will be automatically doubled when it appears in Kermit protocol mes-
  1646.      sages  (sent by the SEND or RECEIVE commands) or when it appears in a
  1647.      file being sent with the TRANSMIT command.  It is  not  automatically
  1648.      doubled when typed by the user in CONNECT mode.  "SET TAC ON" enables
  1649.      the TACtrap but does not change the TAC intercept character, which is
  1650.      initially "@".  "SET TAC OFF" disables the TACtrap.
  1651.  
  1652.    - File  buffering:    Previous  versions of Kermit-80 buffered only one
  1653.      sector (128 bytes) at a time during file transfer operations.    This
  1654.      version  buffers 16Kbytes at a time, reducing the number of times the
  1655.      floppy drive must be spun up and down, and increasing  the  effective
  1656.      throughput  of  the  link.    If  the disk transfer rate is too slow,
  1657.      however, the remote Kermit may time out and retransmit packets.  This
  1658.      will  show  up  on the screen in the "Retries:" field; if this occurs
  1659.      after disk activity, you may want to increase the  timeout  value  on
  1660.      the  remote  Kermit,  SET BUFFER <new value> while in Kermit,or reas-
  1661.      semble Kermit with a smaller value for MAXSEC  (in  CPSDEF.ASM)  This
  1662.      buffer  is also used by the TRANSMIT command; the log file enabled by
  1663.      the LOG command is still written a sector at a time.
  1664.  
  1665. This section is intended for people wanting to implement their own versions  of
  1666. Kermit-80 for computers not already defined.
  1667.  
  1668. The  system  independent  code  communicates  to routines for a specific system
  1669. through a set of tables.  These tables are defined in  CPXLNK.ASM,  and  should
  1670. not  be modified between revisions of Kermit.  If an entry is added or deleted,
  1671. then the whole of Kermit-80 needs reassembling.  Make sure that the changes  to
  1672. CPXLNK.ASM  are  duplicated  in  CPSUTL.ASM,  which  has the system independent
  1673. equivalent of CPXLNK.ASM.
  1674.  
  1675. The following entries/definitions apply to revision  4.09.    There  have  been
  1676. three additional entries since revision 4.05.
  1677.  
  1678. The  table  is  split  into  three  sectors; The first section defines two byte
  1679. "words" giving 16 bits of interface data; The second set is a set of  jumps  to
  1680. various functions, and finally the third set a set of pure data bytes.
  1681.  
  1682.  
  1683. 1.6.1. Interface Data.
  1684.  
  1685.         LNKFLG  Must  be  first  entry in overlay at overlay address.  Is a two
  1686.                 byte address giving the size of the linkage  table.    This  is
  1687.                 used to check for consistency of overlay's
  1688.  
  1689.         ENTSIZE Length of entry table, also used for consistency checking after
  1690.                 the overlay.  Currently 6
  1691.  
  1692.         SYSEDT  The address of a dollar-terminated string  giving  the  overlay
  1693.                 revision   level   and   date.     Points  to  a  string  like:
  1694.                 CPXSYS.ASM(33) 4-JUN-1986$
  1695.  
  1696.         FAMILY  The address of a dollar-terminated  string  giving  the  Family
  1697.                 overlay  revision  level  and  date.    If  the  system  is  in
  1698.                 CPXSYS.ASM rather than  a  particular  Family  overlay,  it  is
  1699.                 simply a pointer to $
  1700.  
  1701.  
  1702.  
  1703.  
  1704. 1.6.2. Jump Table.
  1705.  
  1706. This is split into three main sectors-
  1707.  
  1708.  
  1709.    1. Input/Output routines
  1710.  
  1711.    2. Screen formatting routines
  1712.  
  1713.    3. other system dependent routines
  1714.  
  1715.  
  1716.   SELMDM
  1717.   Parameters    None
  1718.   Returns       None
  1719.   Description   selects  the  modem  port.   Most systems do nothing and simply
  1720.                 return.  HL,DE and BC registers preserved.
  1721.  
  1722.   OUTMDM
  1723.   Parameters    None
  1724.   Returns       None
  1725.   Description   Output the character in E register to the communications  line.
  1726.                 BC,DE,HL registers preserved.
  1727.  
  1728.   INPMDM
  1729.   Parameters    None
  1730.   Returns       Accumulator either 0 or character from comms line if available
  1731.   Description   Check  modem  for character and if so, return it in A. HL,DE,BC
  1732.                 registers preserved, flags and accumulator lost.
  1733.  
  1734.   FLSMDM
  1735.   Parameters    None
  1736.   Returns       None
  1737.   Description   Clear any pending characters  in  the  input  buffer  from  the
  1738.                 modem.  No registers are preserved.
  1739.  
  1740.   SELCON
  1741.   Parameters    None
  1742.   Returns       None
  1743.   Description   Select  the  console.   This is a null subroutine for most sys-
  1744.                 tems, but for IOBYTE systems selects the console.
  1745.  
  1746.   OUTCON
  1747.   Parameters    Character in E
  1748.   Returns       None
  1749.   Description   Send the character in E to the console.  Any quirks  of  system
  1750.                 responding  in  an  odd manner should be handled.  No registers
  1751.                 preserved.
  1752.  
  1753.   INPCON
  1754.   Parameters    None
  1755.   Returns       Zero or character in A.
  1756.   Description   Get a character from the console or return a null if no charac-
  1757.                 ter to be read.  No registers are preserved.
  1758.  
  1759.   OUTLPT
  1760.   Parameters    Character in E
  1761.   Returns       None
  1762.   Description   Send  the  character  in  E  to  the  printer.   The console is
  1763.                 selected.  Only DE registers are preserved
  1764.  
  1765.   LPTSTAT
  1766.   Parameters    None
  1767.   Returns       00H or 0FFH in A register
  1768.   Description   Test the printer to see if it is ready to receive  a  character
  1769.                 to  be printed.  If a 00H is returned then the printer is ready
  1770.                 to receive a character.
  1771.  
  1772.   EXTTER
  1773.   Parameters    Character to be sent to the user supplied terminal emulator  in
  1774.                 the E register
  1775.   Returns       None
  1776.   Description   If  the  user  has  supplied a terminal emulator in the overlay
  1777.                 code, EXTTER will be a JMP <non zero address>.  If SET TERMINAL
  1778.                 EXTERNAL  has  been set, all caharcters will be passed verbatim
  1779.                 to this terminal emulator.  If there is no  external  emulator,
  1780.                 this code will never be called.  The user should reset terminal
  1781.                 conditions on initialisation of both the system and before CON-
  1782.                 NECT.  All registers should be preserved.
  1783.  
  1784.   XBDOS
  1785.   Parameters    Any required for calling BDOS
  1786.   Returns       Any expected from the called BDOS routine
  1787.   Description   This  is  an  alternative  entry to BDOS.  This entry will also
  1788.                 check the printer status etc.  For full details  see  the  code
  1789.                 for the BDOS trap in CPSUTL.ASM.
  1790.  
  1791.                 2b)
  1792.  
  1793.                 CLRLIN
  1794.   Parameters    None
  1795.   Returns       None
  1796.   Description   Clear the current line on the terminal
  1797.  
  1798.   CLRSPC
  1799.   Parameters    None
  1800.   Returns       None
  1801.   Description   Erase the current position (after a backspace)
  1802.  
  1803.   DELCHR
  1804.   Parameters    None
  1805.   Returns       None
  1806.   Description   Make  delete  (7FH)  look  like a backspace.  Some systems do a
  1807.                 backspace, space, backspace automatically others have to  simu-
  1808.                 late it
  1809.  
  1810.   CLRTOP
  1811.   Parameters    None
  1812.   Returns       None
  1813.   Description   Clear the screen and place the cursor at the top LH corner
  1814.  
  1815.   SCREND
  1816.   Parameters    None
  1817.   Returns       None
  1818.   Description   Place  the  cursor on the line for the Kermit-80 prompt after a
  1819.                 file transfer.  (Usually line 13)
  1820.  
  1821.   SCRERR
  1822.   Parameters    None
  1823.   Returns       None
  1824.   Description   Move cursor to the error message field  on  the  file  transfer
  1825.                 format screen
  1826.  
  1827.   SCRFLN
  1828.   Parameters    None
  1829.   Returns       None
  1830.   Description   Move the cursor to the filename field
  1831.  
  1832.   SCRNP
  1833.   Parameters    None
  1834.   Returns       None
  1835.   Description   Move the cursor to the packet count field
  1836.  
  1837.   SCRNRT
  1838.   Parameters    None
  1839.   Returns       None
  1840.   Description   Move cursor to the retry count field
  1841.  
  1842.   SCRST
  1843.   Parameters    None
  1844.   Returns       None
  1845.   Description   Move cursor to the status field
  1846.  
  1847.   RPPOS
  1848.   Parameters    None
  1849.   Returns       None
  1850.   Description   Move to the receive packet field (debugging use)
  1851.  
  1852.   SPPOS
  1853.   Parameters    None
  1854.   Returns       None
  1855.   Description   Move to the send packet field (for debugging use)
  1856.  
  1857.                 2c)
  1858.  
  1859.                 SYSINIT
  1860.   Parameters    None
  1861.   Returns       None
  1862.   Description   Initialize  the  system  specific  items.    No  registers  are
  1863.                 preserved.  Any initialization is done once only when Kermit-80
  1864.                 is first loaded.
  1865.  
  1866.   SYSEXIT
  1867.   Parameters    None
  1868.   Returns       None
  1869.   Description   Program termination.  De-initialize anything in preparation for
  1870.                 a return to CP/M
  1871.  
  1872.   SYSCON
  1873.   Parameters    None
  1874.   Returns       None
  1875.   Description   Initialize anything before entering the connect state.
  1876.  
  1877.   SYSCLS
  1878.   Parameters    None
  1879.   Returns       None
  1880.   Description   System dependent close routine when exiting connect state
  1881.  
  1882.   SYSINH
  1883.   Parameters    None
  1884.   Returns       None
  1885.   Description   Help routine to test for any  extensions  to  the  escape  menu
  1886.                 during  the connect state.  If a system has any special feature
  1887.                 it can use during connect  mode,  then  it  can  be  tested  as
  1888.                 <escape-character>xxx.   This entry is a string for printing to
  1889.                 the console for an <escape-character>?  Often used for generat-
  1890.                 ing breaks or controlling a modem.
  1891.  
  1892.   SYSINT
  1893.   Parameters    None
  1894.   Returns       None
  1895.   Description   This  is  a  test-and-jump on receipt of an escape sequence not
  1896.                 understood by Kermit-80.  If the character in A is  not  recog-
  1897.                 nized by your version of Kermit=80, do a rskip
  1898.  
  1899.   SYSFLT
  1900.   Parameters    Character in E
  1901.   Returns       Character in E. Either a 00H or anything else in A
  1902.   Description   Test  the  character in E. If it may not be printed to the con-
  1903.                 sole, set A to zero.  All other registers preserved.
  1904.                 NB <XON>,<XOFF>,<DEL>,<NULL> are always rejected.
  1905.  
  1906.   SYSBYE
  1907.   Parameters    None
  1908.   Returns       None
  1909.   Description   System dependent processing for the BYE command.  (eg  hang  up
  1910.                 the phone)
  1911.  
  1912.   SYSSPD
  1913.   Parameters    Value from table in DE
  1914.   Returns       None
  1915.   Description   The  system  dependent  code for baud rate change.  DE contains
  1916.                 the two byte value from the baud rate table.    This  value  is
  1917.                 also stored in "SPEED"
  1918.  
  1919.   SYSPRT
  1920.   Parameters    Value in DE
  1921.   Returns       None
  1922.   Description   The system dependent code for setting the port.  The parameters
  1923.                 are passed in DE, which are obtained from the port tables
  1924.  
  1925.   SYSSCR
  1926.   Parameters    String pointer in DE
  1927.   Returns       None
  1928.   Description   Setup the screen display for file transfer.  The Kermit version
  1929.                 string  is pointed to by DE.  If the terminal is not capable of
  1930.                 cursor addressing (eg dumb glass TTY) then only the  screen  is
  1931.                 cleared and the version string is printed.
  1932.  
  1933.   CSRPOS
  1934.   Parameters    Row number in B, column number in C
  1935.   Returns       None
  1936.   Description   Move  the  cursor  to  row  B, column C where B=1,C=1 is top LH
  1937.                 corner of screen.  The  routine  should  first  end  a  "cursor
  1938.                 position"  leading  string (up to four characters) then use the
  1939.                 parameters given to complete the versions cursor position func-
  1940.                 tion
  1941.  
  1942.   SYSSPC
  1943.   Parameters    None
  1944.   Returns       K bytes free in HL
  1945.   Description   Get  the  amount of free disk space on the selected disk drive.
  1946.                 This could be in the system independent  code.    Automatically
  1947.                 detects CP/M V2.2 or V3.0.  No registers saved.
  1948.  
  1949.   MOVER
  1950.   Parameters    Source Pointer in HL
  1951.                 Destination Pointer in DE
  1952.                 Byte count in BC
  1953.   Returns       None
  1954.   Description   Move (BC) bytes from (HL) to (DE) Z80 based systems do an LDIR,
  1955.                 while 8080 systems do it as a loop.  All registers destroyed
  1956.  
  1957.   PRTSTR
  1958.   Parameters    $ terminated string pointed to by DE
  1959.   Returns       None
  1960.   Description   Print the string onto the console.
  1961.  
  1962.                 3)
  1963.  
  1964.  
  1965.   PTTAB         WORD      Points to VT52 equivalent escape sequences.
  1966.  
  1967.   SPDTAB        WORD      Address of baud-rate command table,  or  0  if  table
  1968.                 does not exist
  1969.  
  1970.   SPDHLP        WORD      Address   of  baud-rate  help  table,  or  0  if  SET
  1971.                 BAUD-RATE is not supported.
  1972.  
  1973.   PRTTAB        WORD      Address of port command table or 0 if SET PORT is not
  1974.                 supported.
  1975.  
  1976.   PRTHLP        WORD      Address  of  port  help table or 0 if SET PORT is not
  1977.                 supported
  1978.  
  1979.   TIMOUT        BYTE      FUZZY-TIMER.  Set to value suitable  to  your  system
  1980.                 (depends largely on CPU speed)
  1981.  
  1982.   VTFLG         BYTE      VT52 emulation flag.  Set to 0 if terminal emulates a
  1983.                 VT52, 01 if emulation is required, or 0FFH  if  emulations  not
  1984.                 possible (eg for "CRT")
  1985.  
  1986.   ESCCHR        BYTE      default  escape character-usually control-] but some-
  1987.                 times control-\
  1988.  
  1989.   SPEED         WORD      Storage space for baud-rate.  Set to 0FFFFH  as  baud
  1990.                 rates are initially unknown.  Note that the STATUS routine only
  1991.                 looks at the first (least significant) byte.
  1992.  
  1993.   PORT          WORD      Storage space for port.  Set to 0FFFFH as  ports  may
  1994.                 not be implemented, and is initially unknown
  1995.  
  1996.   PRNFLG        BYTE      Printer  copy  flag-if  O  no copy.  Anything else =>
  1997.                 copy to printer
  1998.  
  1999.   DBGFLG        BYTE      Debugging flag.  If O then no debugging to  be  done.
  2000.                 (ie writing of debugging info during a file transfer)
  2001.  
  2002.   ECOFLG        BYTE      Local ECHO flag (default is off)
  2003.  
  2004.   FLWFLG        BYTE      File  warning  flag.   If set to 1 will not overwrite
  2005.                 files already existing on  disk  with  some-named  files  being
  2006.                 transferred
  2007.  
  2008.   IBMFLG        BYTE      IBM system is the host-assume IBM file transfers etc
  2009.  
  2010.   CPMFLG        BYTE      Flag indicating type of CP/M files to be transferred.
  2011.                 Default setting - DEFAULT
  2012.  
  2013.   PARITY        BYTE      Type of parity in use
  2014.                 0 = Even parity
  2015.                 3 = Mark parity
  2016.                 6 = No parity (8th bit is data)
  2017.                 9 = Odd parity
  2018.                 12 = Space parity
  2019.  
  2020.   SPSIZ         BYTE      Size of send packet
  2021.  
  2022.   RPSIZ         BYTE      Size of receive packet
  2023.  
  2024.   STIME         BYTE      Send timer (time-out)
  2025.  
  2026.   RTIME         BYTE      Receive timer (time-out)
  2027.  
  2028.   SPAD          BYTE      Send Padding (default=0)
  2029.  
  2030.   RPAD          BYTE      Receive Padding (default=0)
  2031.  
  2032.   SPADCH        BYTE      Send Padding character (default=NULL)
  2033.  
  2034.   RPADCH        BYTE      Receive Padding character (default=NULC)
  2035.  
  2036.   SEOL          BYTE      Send EOL character (default=CR)
  2037.  
  2038.   REOL          BYTE      Receive EOL character (default=CR)
  2039.  
  2040.   SQUOTE        BYTE      Send quote character (default=#)
  2041.  
  2042.   RQUOTE        BYTE      Receive quote character (default=#)
  2043.  
  2044.   CHKTYP        BYTE      Ascii value of checktype
  2045.                 31H="1"=checktype1 (6bits)
  2046.                 32H="2"=checktype2 (12bits)
  2047.                 33H="3"=CCITT checksum (CRC)
  2048.                 Default is 31H("1")
  2049.  
  2050.   TACFLG        BYTE      If set to on (non zero) send the TACCHR twice.   This
  2051.                 is  for  ARPA  TAC  users,  where the TAC swallows one "wakeup"
  2052.                 character.  If sent twice the TAC will pas one on and  go  back
  2053.                 to normal mode.
  2054.  
  2055.   TACCHR        BYTE      Desired TAC character.  It is ignored if TAC trapping
  2056.                 is turned off. Value to send twice if TAC interception  is  set
  2057.                 on.  Default=0, but set to commercial AT if the conditional as-
  2058.                 sembly flag TAC is set true
  2059.  
  2060.   BUFADR        WORD      Address of Multi-Sector buffering for I/O
  2061.  
  2062.   BUFSEC        BYTE      The  number  of  bytes  the  big  buffers  can  hold.
  2063.                 Default is 1. (0=256 sectors).
  2064.  
  2065.   FFUSSY        BYTE      Indicates  if  funny  characters  may be used in CP/M
  2066.                 file names (eg <>.,;?#[]) If zero, allow anything.  Default  is
  2067.                 nonzero
  2068.  
  2069.   BMAX          SPACE:(2bytes) Highest block number on selected disk drive
  2070.  
  2071.   BMASK         SPACE:(1byte) (Records/block)-1
  2072.  
  2073.   BSHIFTF       SPACE:(1byte) Number of shifts to multiply by rec.block
  2074.  
  2075.   NNAMS         SPACE:(1byte) Counter for file-names per line
  2076.  
  2077.  
  2078. 1.7. Future Work
  2079.  
  2080. Work that needs to be done in future releases includes:
  2081.  
  2082.    - Merge  in  support for additional CP/M-80 systems, particularly those
  2083.      for which support was recently added to the monolithic v3.x source.
  2084.  
  2085.    - Break up CPXSYS into discrete source  files,  one  for  each  system.
  2086.      These  source  files should serve as simple models for adding support
  2087.      for new systems to Kermit-80 -- only the very  basic  screen  defini-
  2088.      tions,  flags,  i/o  primitives, initializations, and so forth should
  2089.      appear in each system-dependent file.
  2090.  
  2091.    - Addition of missing features -- compression  of  repeated  characters
  2092.      during   packet   transmission,   transmission   of  file  attributes
  2093.      (particularly size, so that "percent done" can be displayed for  both
  2094.      incoming  and  outbound files), advanced commands for servers (REMOTE
  2095.      DIRECTORY, etc),  command  macros  and  initialization  files,  login
  2096.      scripts, remote operation and server mode, etc etc.  Any offers??
  2097.  
  2098.  
  2099.  
  2100. Index
  2101.  
  2102. ,
  2103.           8080   4, 5
  2104.  
  2105.           Append   2
  2106.           ARPAnet   9
  2107.           Attention Character   9
  2108.           Autoreceive   2
  2109.  
  2110.           Baud   2
  2111.           BIOS   4
  2112.           Block Check   2
  2113.           Bootstrap   7
  2114.           Break   1
  2115.           Buffer size   2
  2116.           Bye   2
  2117.  
  2118.           Carriage Return   1
  2119.           Case Sensitivity   2
  2120.           Cntl-C   1
  2121.           Cntl-X   1
  2122.           Cntl-Z   1
  2123.           Connect   2
  2124.           Control-C   1
  2125.           Control-X   1
  2126.           Control-Z   1
  2127.           Copy   2
  2128.           CP/M   5
  2129.           CP/M-80 Kermit   1
  2130.           CR   1
  2131.  
  2132.           Debug   2
  2133.           Default Disk   2
  2134.           Directory   2
  2135.           Directory file size   2
  2136.           Downloading   7
  2137.           Dumb terminal   3
  2138.  
  2139.           Eighth-Bit Prefix   3
  2140.           Erase   2
  2141.           Escape Character   2, 3
  2142.           Exit   2
  2143.           External   Terminal  Emulation
  2144.                   3
  2145.  
  2146.           File Copying   2
  2147.           File-mode   3
  2148.           File-Warning   2
  2149.           FINISH   2
  2150.           Flow Control   3
  2151.  
  2152.           Generic Kermit-80   4
  2153.           GET   2
  2154.  
  2155.           Help   2
  2156.  
  2157.           IBM   3
  2158.           Input   2
  2159.           Intercept Character   9
  2160.  
  2161.           Local   1
  2162.           Local-Echo   3
  2163.           LOG   2
  2164.           Logging   3
  2165.           LOGOUT   2
  2166.  
  2167.           NAK   1
  2168.           No-exit   3
  2169.  
  2170.           Pad character   3
  2171.           Parity   3
  2172.           Pause   2
  2173.           Port   3
  2174.           Print   2
  2175.           PRINTER   3
  2176.  
  2177.           RECEIVE   2
  2178.  
  2179.           SEND   2
  2180.           SET   2
  2181.           Set padding   3
  2182.           Set Receive   3
  2183.           Set Send   3
  2184.           Set Start of packet   3
  2185.           Show   3
  2186.           Status   3
  2187.           STRING   3
  2188.  
  2189.           TAC   9
  2190.           TacTrap   3
  2191.           Take   4
  2192.           Terminal emulation   3
  2193.           Timeout   1, 6
  2194.           TIMER   3
  2195.           TRANSMIT   4
  2196.           Type   4
  2197.  
  2198.           USER   3
  2199.  
  2200.           VERSION   4
  2201.           Virtual Terminal   2
  2202.           VT100   3
  2203.           VT52   3
  2204.  
  2205.           Warning   3
  2206.  
  2207.           XON/XOFF   2
  2208.  
  2209.           Z80   5
  2210.  
  2211.  
  2212.  
  2213.                                Table of Contents
  2214.  
  2215. 1. CP/M-80 KERMIT                                                             1
  2216.  
  2217.    1.1. Summary of CP/M                                                       1
  2218.    1.2. Kermit-80 Description                                                 1
  2219.    1.3. Kermit-80 Flavors                                                     4
  2220.        1.3.1. Generic Kermit-80                                               4
  2221.        1.3.2. CP/M 3 Kermit                                                   4
  2222.        1.3.3. System-Specific Versions                                        4
  2223.    1.4. Installation of Kermit-80                                             5
  2224.        1.4.1. Organization of Kermit-80                                       6
  2225.        1.4.2. Downloading Kermit-80                                           7
  2226.        1.4.3. Assembling Kermit-80 from the sources                           8
  2227.    1.5. Adding Support For A New System                                       9
  2228.    1.6. Notes on New Features in Kermit-80 Version 4                          9
  2229.        1.6.1. Interface Data.                                                 9
  2230.        1.6.2. Jump Table.                                                     9
  2231.    1.7. Future Work                                                          11
  2232.  
  2233. Index                                                                         i
  2234.  
  2235.  
  2236.  
  2237.                                 List of Figures
  2238.  
  2239.    Figure 1-1:   Bootstrap program for Kermit-80 and CP/M Version 2.2         7
  2240.  
  2241.  
  2242.  
  2243.                                 List of Tables
  2244.  
  2245.    Table 1-1:   Kermit-80 SET PORT Options                                    4
  2246.    Table 1-2:   Systems supported by Kermit-80 (Part 1)                       6
  2247.    Table 1-3:   Systems supported by Kermit-80 (Part 2)                       6
  2248.    Table 1-4:   Terminals supported by Kermit-80                              7
  2249.    Table 1-5:   Terminals known to Kermit-80                                  9
  2250.