home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / modems / modem / cp405src.ark / CP4KER.DOC < prev    next >
Encoding:
Text File  |  1986-12-26  |  55.2 KB  |  1,220 lines

  1.  
  2.  
  3.  
  4. 12. CP/M-80 KERMIT
  5.  
  6. Program:    Bill   Catchings,  Columbia  University,  with  contributions  from
  7.             Charles Carvalho (ACC), Bernie Eiben (DEC),  Nick  Bush  (Stevens),
  8.             John   Bray  (University  of  Tennessee),  Bruce  Tanner  (Cerritos
  9.             College), Greg Small (University of California at Berkeley),  Kimmo
  10.             Laaksonen (Helskini University of Technology), and many others.
  11. Language:   8080 Assembler or MAC80
  12. Version:    4.05
  13. Date:       February 1985
  14. Documentation:
  15.             Charles Carvalho, ACC; Frank da Cruz, Columbia
  16.  
  17. KERMIT-80 Capabilities At A Glance:
  18.  
  19.   Local operation:                   Yes
  20.   Remote operation:                  No
  21.   Transfers text files:              Yes
  22.   Transfers binary files:            Yes
  23.   Wildcard send:                     Yes
  24.   ^X/^Z interruption:                Yes
  25.   Filename collision avoidance:      Yes
  26.   Can time out:                      Yes
  27.   8th-bit prefixing:                 Yes
  28.   Repeat count prefixing:            No
  29.   Alternate block checks:            Yes
  30.   Terminal emulation:                Yes, VT52 and others
  31.   Communication settings:            Yes; duplex, parity
  32.   Transmit BREAK:                    Yes; some versions
  33.   IBM communication:                 Yes
  34.   Transaction logging:               No
  35.   Session logging (raw download):    Yes
  36.   Raw upload:                        Yes
  37.   Act as server:                     No
  38.   Talk to server:                    Yes; SEND, GET, FIN, BYE
  39.   Advanced commands for servers:     No
  40.   Local file management:             Yes; DIR, ERA, SET DEFAULT disk
  41.   Handle file attributes:            No
  42.   Command/init files:                No
  43.   Printer control:                   Yes, limited
  44.  
  45.  
  46. 12.1. Summary of CP/M
  47.  
  48. CP/M-80 (version 2.2) has only five built-in commands, and they all  deal  with
  49. files; other functions are done by invoking programs.
  50.  
  51. CP/M file specifications are of the form DEV:XXXXXXXX.YYY, where
  52.  
  53. DEV:            is  a  device  name, normally the A: or B: floppy.  If omitted,
  54.                 the device name defaults to your connected diskette.
  55.  
  56. XXXXXXXX        is a filename of up to 8 characters.
  57.  
  58. YYY             is the file type, up to 3 characters.
  59.  
  60.  
  61.  
  62. File names and file types may contain letters, digits, and some special charac-
  63. ters, including dash, dollar sign, and underscore, but no imbedded spaces.  Up-
  64. per and lower case letters are equivalent.
  65.  
  66. "Wildcard" file-group specifications are permitted in file names and file types
  67. (but  not device names) within certain contexts; a "*" matches a whole field, a
  68. "?"  matches a single character, including space.  Examples: "*.F??"  specifies
  69. all  files  whose types start with F and are 1, 2, or 3 characters long; "F?.*"
  70. specifies all files whose names start with F and are no more than  two  charac-
  71. ters long (before the trailing spaces).
  72.  
  73. The five CP/M commands are:
  74.  
  75. DIR file        Lists  the  the names of the specified files.  The default file
  76.                 specification is "*.*".  Example: "DIR B:*.FOR".
  77.  
  78. ERA file        Erases (deletes) the specified file(s); wildcards allowed.
  79.  
  80. REN new old     Changes the name of a file from old to new, e.g.
  81.                 "REN NEW.FOR=OLD.FOR".
  82.  
  83. SAVE            Saves the specified number of memory blocks into a file.
  84.  
  85. TYPE file       Types the specified file on the screen, e.g.  "TYPE FOO.TXT".
  86.  
  87. The most important programs are:
  88.  
  89. STAT            Gives statistics on disk usage; sets and displays IOBYTE.
  90.  
  91. PIP             Peripheral Interchange Program.  Copies files.  In response  to
  92.                 the "*" prompt, give a command of the form 
  93.  
  94.                   disk:outfile=disk:infile
  95.  
  96.                 Wildcards  ("*"  for a whole field or "?"  for a letter) can be
  97.                 used.  Examples: "A:=B:*.*" to copy a whole disk,  "A:=B:*.FOR"
  98.                 to  copy all the Fortran programs from disk B to disk A. If the
  99.                 disk specification is omitted, your  "connected"  disk  is  as-
  100.                 sumed.    Command  line  arguments are also accepted, e.g. "PIP
  101.                 A:=B:*.*".
  102.  
  103. For further information on CP/M, consult your microcomputer manual  or  a  CP/M
  104. handbook.
  105.  
  106.  
  107. 12.2. Kermit-80 Description
  108.  
  109. Since  Kermit-80  runs  on  a  standalone micro, it is always in control of the
  110. screen -- it is always local.  Thus, it always keeps the  screen  updated  with
  111. the  file  name and the packet number, whether sending or receiving.  Kermit-80
  112. is capable of an imprecise or "fuzzy" timeout on  an  input  request,  and  can
  113. break  deadlocks  automatically.  In most cases, this is not important, because
  114. the KERMIT on the other side is most likely able to handle the timeouts.    The
  115. timeouts  done  by  Kermit-80 are fuzzy because they depend on the speed of the
  116. processor and other factors that can vary from system to system.
  117.  
  118.  
  119.  
  120. If despite the timeout capability, the transmission appears to  be  stuck  (and
  121. you  can tell that this has happened if the screen fails to change for a while)
  122. you can type carriage return to have the micro do what it would have done on  a
  123. timeout,  namely  NAK  the  expected packet to cause to foreign host to send it
  124. again (or, if the micro is sending, to retransmit the  last  packet).    Micro/
  125. micro or micro/IBM-mainframe transfers could require this kind of manual inter-
  126. vention.
  127.  
  128. File transfers may be interrupted in several ways.
  129.  
  130. Control-C       This will return you to Kermit-80 command level immediately, so
  131.                 that  you  can  connect  back to the remote system, or take any
  132.                 other desired action.
  133.  
  134. Control-X       When sending a file, this will terminate  the  sending  of  the
  135.                 current  file  with a signal to the KERMIT on the other side to
  136.                 discard what it got so far.  If there  are  more  files  to  be
  137.                 sent,  KERMIT-80  will go on to the next one.  When receiving a
  138.                 file, KERMIT-80 will send a signal to the remote KERMIT to stop
  139.                 sending  this file.  If the remote KERMIT understands this sig-
  140.                 nal (not all implementations of KERMIT  do),  it  will  comply,
  141.                 otherwise  the  file will keep coming.  In any case, the remote
  142.                 KERMIT will go on to the next file in the group, if any.
  143.  
  144. Control-Z       Like Control-X, except if a file group  is  being  transmitted,
  145.                 this will stop the transmission of the entire group.  If only a
  146.                 single  file  is  being  transmitted,  it  works  exactly  like
  147.                 Control-X.
  148.  
  149. Carriage Return If you type a carriage return Kermit-80 will resend the current
  150.                 packet.  You may do this repeatedly, up  to  the  packet  retry
  151.                 limit  (somewhere  between  5  and  16  times) for a particular
  152.                 packet.
  153.  
  154.  
  155.                               KERMIT-80 COMMANDS
  156.  
  157. KERMIT-80 uses the DECSYSTEM-20 keyword style command language.   Each  keyword
  158. may be abbreviated to its minumum unique length.  "?" may be typed to request a
  159. menu of the available options for the current field at any point in a  command.
  160. ESC  may  be typed at any point in a command to fill out the current keyword or
  161. filename; if sufficient characters have not been typed to identify the  current
  162. field uniquely, KERMIT-80 will sound a beep and allow you to continue from that
  163. point.
  164.  
  165. CONNECT Establish a "virtual terminal" connection to any host that may be  con-
  166.         nected  to the serial port, i.e. pass all typein to the serial port and
  167.         display all input from the serial port on the screen.  Also, emulate  a
  168.         DEC   VT52   to   allow  cursor  control,  screen  clearing,  etc.,  if
  169.         VT52-EMULATION is ON (see below), in which case  you  should  also  set
  170.         your  terminal type on the remote host to VT52.  (Some versions emulate
  171.         other terminals.)  The escape character differs from  micro  to  micro;
  172.         when  you  issue  the  CONNECT  command, the micro will print a message
  173.         telling you how to get back.   The  escape  sequence  is  generally  an
  174.         uncommonly-used    control    character,    like    CTRL-backslash   or
  175.         CTRL-rightbracket, followed by a single letter "command".
  176.  
  177.  
  178.  
  179.         C   Close Connection, return to Kermit-80> command level.
  180.         S   Display Status of connection, but maintain remote connection.
  181.         ?   List available single-character commands.
  182.         0   (zero) Send a null (0) character.
  183.         B   Send a BREAK signal.  Only some systems provide this function.
  184.         ^]  (or whatever - a second copy of the escape character) Send the  es-
  185.             cape character itself to the remote host.
  186.  
  187. SEND filespec
  188.         Send file(s) specified by filespec to the remote Kermit.  The  filespec
  189.         may contain CP/M wildcards.
  190.  
  191. RECEIVE Receive  file(s)  from  the  remote Kermit.  Store them under the names
  192.         provided in the file headers supplied by the remote host.  If the names
  193.         aren't  legal,  use  as many legal characters from the name as possible
  194.         (see the description of SET FILE-WARNING below).   If  there's  a  con-
  195.         flict,  and FILE-WARNING is ON, warn the user and try to build a unique
  196.         name for the file by adding "&" characters to the name.
  197.  
  198. GET filespec
  199.         When  Kermit-80  is  talking to a Kermit Server on the host, you should
  200.         use the GET command to request the server to send files to you, for ex-
  201.         ample:  
  202.  
  203.           get hlp:k*.hlp
  204.  
  205.         Limitation:  If you request an alternate block check type using the SET
  206.         BLOCK command, the GET command will not communicate it  to  the  remote
  207.         server.  If you want to have type 2 or 3 block checks done when getting
  208.         files from the server, you have to issue the appropriate SET BLOCK com-
  209.         mand to the remote KERMIT before putting it in server mode.
  210.  
  211. LOG filespec
  212.         When CONNECTed to a foreign host as a terminal, log the  terminal  ses-
  213.         sion  to  the  specified  diskette file.  This functionality depends to
  214.         some extent on the remote host's ability to do XON/XOFF  flow  control,
  215.         and  does  not  guarantee a complete transcript (after all, that's what
  216.         the KERMIT protocol is for).  The log file is closed when  the  connec-
  217.         tion  is  closed by typing the escape character followed by the single-
  218.         character command "C".
  219.  
  220. TRANSMIT filespec
  221.         Send  the  specified file to the system on the other end of the connec-
  222.         tion as though it were being typed at the terminal, one line at a time.
  223.         No  KERMIT  protocol is involved.  You must manually confirm each line.
  224.         This is useful for sending files to systems that don't  have  a  KERMIT
  225.         program.    During transmission, you may type the escape character fol-
  226.         lowed by one of these single-character commands:
  227.  
  228.         C   Cease transmission
  229.         R   Re-transmit the previous line
  230.  
  231. BYE     When talking to a remote Kermit Server, this  command  shuts  down  the
  232.         server  and  logs it out, and also exits from Kermit-80 to CP/M command
  233.         level.
  234.  
  235.  
  236.  
  237. LOGOUT  Like BYE, but leaves you at Kermit-80 command level.
  238.  
  239. FINISH  Like LOGOUT, but shuts down the remote server without logging  it  out.
  240.         Leaves you at Kermit-80 command level; subsequent CONNECT commands will
  241.         put you back at host system command level.
  242.  
  243. VERSION Show the name, edit number, and edit date of  several  of  the  modules
  244.         that make up Kermit-80.
  245.  
  246. SET parameter [value]
  247.         Set the specified parameter to the specified value.  Possible settings:
  248.  
  249.         WARNING ON (or OFF)
  250.                 Warn  user  of  filename  conflicts  when  receiving files from
  251.                 remote host, and attempt to generate a unique  name  by  adding
  252.                 "&" characters to the given name.  ON by default.
  253.  
  254.         VT52-EMULATION ON (or OFF)
  255.                 When connected as  a  terminal  to  a  foreign  host,  controls
  256.                 whether  the  micro  emulates  a VT52 or runs in "native mode".
  257.                 VT52 emulation is ON by default, except on micros that  already
  258.                 have terminal functionality built in, such as the DEC VT180 and
  259.                 DECmate (these act as VT100-series terminals).    Some  systems
  260.                 emulate other terminals, like the ADM3A; see table 12-3.
  261.  
  262.         LOCAL-ECHO ON (or OFF)
  263.                 When you CONNECT to a remote host, you must set  LOCAL-ECHO  ON
  264.                 if  the  host  is  half  duplex,  OFF  if  full duplex.  OFF by
  265.                 default.
  266.  
  267.         ESCAPE  Change the escape character for virtual  terminal  connections.
  268.                 Kermit-80  will  prompt you for the new escape character, which
  269.                 you enter literally.
  270.  
  271.         BAUD-RATE
  272.                 Change  the baud rate of the communications port.  This command
  273.                 only works on some systems.  value is  the  numeric  baud  rate
  274.                 (300,  9600,  etc.) desired.  Type SET BAUD followed by a ques-
  275.                 tion mark for a list of supported baud rates.  On systems  that
  276.                 do  not  support  this command, you must set the port baud rate
  277.                 from CP/M or other setup mechanism outside of KERMIT-80.
  278.  
  279.         PARITY  Sets parity for outgoing characters to one  of  the  following:
  280.                 NONE,  SPACE, MARK, EVEN, or ODD.  On input, if parity is NONE,
  281.                 then the 8th bit is kept (as data), otherwise  it  is  stripped
  282.                 and  ignored.  The parity setting applies to both terminal con-
  283.                 nection and file transfer.  If you set parity to anything other
  284.                 than none, KERMIT-80 will attempt to use "8th bit prefixing" to
  285.                 transfer binary files.  If the other KERMIT is also capable  of
  286.                 8th  bit  prefixing,  then binary files can be transferred suc-
  287.                 cessfully; if not, the 8th bit of each data byte will  be  lost
  288.                 (you will see a warning on your screen if this happens).
  289.  
  290.         TIMER ON (or OFF)
  291.                 Enable or disable the "fuzzy timer".    The  timer  is  off  by
  292.                 default,  because in the normal case KERMIT-80 is communicating
  293.  
  294.  
  295.  
  296.                 with a mainframe KERMIT that has its own timer.  Mainframe KER-
  297.                 MIT  timers  tend  to  be more precise or adaptable to changing
  298.                 conditions.  You should SET TIMER ON if you  are  communicating
  299.                 with a KERMIT that does not have a timer.  You should SET TIMER
  300.                 OFF if you are communicating over a network with long delays.
  301.  
  302.         IBM ON (or OFF)
  303.                 Allow  the  transfer of files to and from an IBM mainframe com-
  304.                 puter.  This  makes  Kermit-80  wait  for  the  IBM  turnaround
  305.                 character (XON), ignore parity on input, add appropriate parity
  306.                 to output, and use local  echoing  during  CONNECT.    As  dis-
  307.                 tributed, KERMIT-80 uses MARK parity for IBM communication.  If
  308.                 you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
  309.                 KERMIT  does not have timeout capability, SET IBM ON also turns
  310.                 on the "fuzzy timer" automatically.
  311.  
  312.         BLOCK-CHECK-TYPE
  313.                 The options are:
  314.  
  315.                 1-CHARACTER-CHECKSUM
  316.                         Normal, default, standard 6-bit checksum.
  317.                 2-CHARACTER-CHECKSUM
  318.                         A 12-bit checksum encoded as two characters.
  319.                 3-CHARACTER-CRC-CCITT
  320.                         A 16-bit CCITT-format Cyclic Redundancy Check,  encoded
  321.                         as 3 characters.
  322.  
  323.                 The  2  and  3 character options should only be used under con-
  324.                 ditions of extreme line noise.  Many implementations of  KERMIT
  325.                 only support the single character checksum.
  326.  
  327.         FILE-MODE
  328.                 Tells KERMIT-80 what kind of file it is sending, so that KERMIT
  329.                 can  correctly  determine the end of the file.  SET FILE BINARY
  330.                 means to send all the 128-byte blocks of  the  file,  including
  331.                 the last block in its entirety; SET FILE ASCII is used for text
  332.                 files, and transmission stops when the first Control-Z  is  en-
  333.                 countered anywhere in the file (this is the CP/M convention for
  334.                 marking the end of a text file).  SET FILE DEFAULT tells Kermit
  335.                 to attempt to determine the file type by examining the file be-
  336.                 ing transmitted.  If a Control-Z appears before the last  block
  337.                 of  the  file,  it  is assumed to be BINARY; if, when the first
  338.                 Control-Z is encountered, the remainder of  the  file  contains
  339.                 only  control-Z's,  it  is  assumed  to be a text file.  Unfor-
  340.                 tunately, not all programs  fill  the  remainder  of  the  last
  341.                 record  of  a  text file with Control-Z's, so this algorithm is
  342.                 not always successful.  If binary transmission  is  used  on  a
  343.                 text  file,  some extraneous characters (up to 127 of them) may
  344.                 appear at the end of the file on the target system.   If  ASCII
  345.                 transmission is used on a binary file, the entire file will not
  346.                 be sent if it happens to contain any data bytes that correspond
  347.                 to Control-Z.
  348.  
  349.         DEFAULT-DISK
  350.                 This allows you to set the default disk as source and  destina-
  351.                 tion  of  file  transfers.    In addition, issuing this command
  352.  
  353.  
  354.  
  355.                 causes you to switch to the  specified  disk  and  log  it  in,
  356.                 write-enabled.    The  colon  must be included in the disk name
  357.                 (A:).  The selected disk appears in your KERMIT-80 prompt,  for
  358.                 instance 
  359.  
  360.                   Kermit-80 A:>
  361.  
  362.         PORT    Allows  you  to  switch  between different communication ports.
  363.                 This command is not available on all systems.  Type SET PORT  ?
  364.                 for a list of valid options for your system.
  365.  
  366.         PRINTER ON  or OFF.  Turns copying of CONNECT session to printer on and
  367.                 off.  No attempt is made to do buffering or flow control;  Ker-
  368.                 mit assumes the printer can keep up.
  369.  
  370.         DEBUG   ON  or  OFF.    Enables/disables  displaying  of packets on the
  371.                 screen during file transfer.
  372.  
  373. DIRECTORY
  374.         This  provides a directory listing of the specified files.  If no files
  375.         are specified, all files on the default disk are listed.   File  sizes,
  376.         in  K,  are  included.    You  may interrupt the listing at any time by
  377.         typing any character.  The listing (even if interrupted) concludes with
  378.         a display of the amount of free storage left on the disk.
  379.  
  380. ERASE   This executes the CP/M ERA command on the specified file(s).  The names
  381.         of the files being erased are not displayed.
  382.  
  383.  
  384. 12.3. Kermit-80 Flavors
  385.  
  386. Many of the systems supported use an external terminal, rather than a  built-in
  387. console.    Kermit  may be further customized for these systems by defining (at
  388. assembly time) the terminal type to be used.  If the terminal type  is  unknown
  389. or  does  not match any of the existing terminal options, the generic "CRT" op-
  390. tion may be selected.  In this case, Kermit  cannot  do  fancy  screen  control
  391. during  file transfer; it simply types the file names, packet numbers, and mes-
  392. sages in sequence across and down the screen.  This works best if you  can  put
  393. your  micro  or  terminal in "autowrap" mode; otherwise the packet numbers will
  394. pile up in the rightmost column; the filenames and messages will always  appear
  395. on a new line, however.  If no specific terminal has been selected, Kermit can-
  396. not do VT52 emulation; it can act as a  "dumb  terminal"  (sometimes  called  a
  397. "glass  TTY"),  or else its own built in terminal firmware provides cursor con-
  398. trol functions independent of the Kermit program.
  399.  
  400.  
  401. 12.3.1. Generic Kermit-80
  402.  
  403. "Generic Kermit-80" is an implementation of Kermit that should run on any 8080-
  404. compatible CP/M 2.2 system with no modification at all, or perhaps only a minor
  405. one.  Unlike other Kermit-80 implementations, it contains  no  system-dependent
  406. manipulation  of  the  serial  port.    All I/O is done with standard CP/M BIOS
  407. calls, and I/O redirection is done using the CP/M IOBYTE function,  which,  ac-
  408. cording  to  the  Digital Research CP/M Operating System Manual, is an optional
  409. feature of any particular CP/M implementation.  If your system does not provide
  410. the IOBYTE function, Generic Kermit-80 will not work; furthermore, not all sys-
  411.  
  412.  
  413.  
  414. tems that implement IOBYTE do so in the same way.  The SET PORT command may  be
  415. used  to  select the devices to be used for input and output.  Table 12-1 lists
  416. the options to the SET PORT command and their effects.
  417.  
  418.   -------------------------------------------------------------------------
  419.  
  420.  
  421.                     SET PORT xxx    input from      output to
  422.                          CRT            CRT:            CRT:
  423.                          PTR            PTR:            PTP:
  424.                          TTY            TTY:            TTY:
  425.                          UC1            UC1:            UC1:
  426.                          UR1            UR1:            UP1:
  427.                          UR2            UR2:            UP2:
  428.                    Table 12-1:   Kermit-80 SET PORT Options
  429.  
  430.   -------------------------------------------------------------------------
  431.  
  432. The default is SET PORT PTR.  In all cases, the console (CON:) and list  (LST:)
  433. devices used are those selected when Kermit is started.
  434.  
  435. The  reason all Kermit-80 implementations aren't generic is that a good deal of
  436. speed is sacrificed by getting all services from the operating system.  While a
  437. specific  implementation  of Kermit-80 may be able to operate at 4800, 9600, or
  438. even 19200 baud, Generic Kermit will fail to work on some systems at speeds  in
  439. excess  of  1200  baud.    In  addition,  many  features of Kermit require more
  440. specific knowledge of the hardware involved -- Generic  Kermit  cannot  send  a
  441. BREAK signal, or change the baud rate.
  442.  
  443.  
  444. 12.3.2. CP/M 3 Kermit
  445.  
  446. CP/M  3  Kermit  should  run  on  most CP/M 3 (CP/M-Plus) systems.  It uses the
  447. auxilliary port (AUX:) to communicate to the remote Kermit.  The SET  BAUD  and
  448. SET  PORT  commands  are  not supported; nor can a BREAK be sent.  Like Generic
  449. Kermit, a terminal may be selected at assembly time.
  450.  
  451.  
  452. 12.3.3. System-Specific Versions
  453.  
  454. There are also many versions of Kermit-80 tailored to specific systems.    Most
  455. of  these  operate  uniformly,  but  some  of  them  take  advantage (or suffer
  456. limitations) of the specific system.  Here are some of the special features for
  457. particular systems:
  458.  
  459. Apple II -- two variations:
  460.  
  461.     APMMDM:
  462.         Apple with Z80 Softcard and Micromodem II in slot 2 Dialout  capability
  463.         provided  in connect command; user is prompted for phone number if car-
  464.         rier is not present.  During connect mode, ^]D drops carrier.  BYE com-
  465.         mand also causes carrier to be dropped.
  466.  
  467.     AP6551:
  468.         Apple with Z80 Softcard, and one of  several  6551-based  communication
  469.         cards; the slot number is a compile-time parameter (default is slot 2).
  470.  
  471.  
  472.  
  473.         SET BAUD-RATE supported; speeds are 110-19200 baud.
  474.  
  475. BigBoard II:
  476.     Uses  serial  port  A. To use port B, change mnport, mnprts, and baudrt and
  477.     reassemble.  Can generate BREAK.    SET  BAUD-RATE  supported;  speeds  are
  478.     300-38400 baud.
  479.  
  480. Digicomp Delphi 100:
  481.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  482.  
  483. CPT-85xx word processors:
  484.     Can generate BREAK.  SET BAUD-RATE supported; speeds are 50-9600 baud.
  485.  
  486. DEC DECmate II word processor (with Z80 card):
  487.     Can generate BREAK.
  488.  
  489. DEC VT180 (Robin):
  490.     Three  output  ports,  referred to as COMMUNICATIONS, GENERAL, and PRINTER.
  491.     Can generate BREAK.
  492.  
  493. Intertec SuperBrain:  SET BAUD-RATE supported; speeds are 50-19200 baud.
  494.  
  495. Kaypro:
  496.     Should  work  on  most  Kaypro  models,  as  well  as  some related systems
  497.     (Ferguson BigBoard I, Xerox 820).  For  the  newer  Kaypros  with  multiple
  498.     ports,  Kermit uses the one labeled "serial data"; it cannot use the serial
  499.     printer or internal modem ports (but it should be possible  to  modify  the
  500.     values  for  mnport,  mnprts,  and baudrt to do this).  Can generate BREAK.
  501.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  502.  
  503. Morrow Decision I:
  504.     Uses  the Multi-I/O board.  Port 1 is the console, port 3 is the communica-
  505.     tions line.  SET BAUD-RATE supported; speeds are 75-56000 baud.
  506.  
  507. Nokia MicroMikko:
  508.     Will  not  echo control-O (which locks keyboard).  SET BAUD-RATE supported;
  509.     speeds are 75-9600 baud.
  510.  
  511. Ohio Scientific:
  512.     Doesn't have screen control.
  513.  
  514. Osborne 1:Uses serial line, not internal modem.  Left-arrow key generates <DEL>
  515.     ("delete" or "rubout" character) during connect mode.  SET  BAUD-RATE  sup-
  516.     ported; speeds are 300 and 1200 baud.
  517.  
  518. TRS-80: Two versions, one for Lifeboat CP/M, one for Pickles & Trout CP/M.
  519.  
  520.  
  521. 12.4. Installation of Kermit-80
  522.  
  523. Kermit-80  was written originally for the Intertec SuperBrain in lowest-common-
  524. denominator  8080 code with the standard assembler, ASM (single source  module,
  525. no  macros,  no  advanced  instructions),  so that it could be assembled on any
  526. CP/M-80 system (the 8080  assembler  is  distributed  as  a  standard  part  of
  527. CP/M-80,  whereas  the  fancier Z80 or macro assemblers are normally commercial
  528. products).  It has since been modified to run on many other  systems  as  well.
  529.  
  530.  
  531.  
  532. Kermit-80  should be able to run on any 8080-, 8085- or Z80-based microcomputer
  533. under  CP/M with appropriate minor changes to reflect the port i/o  and  screen
  534. control for the system (see below).
  535.  
  536. The  proliferation  of new systems supported by Kermit-80 made the program grow
  537. so large and complicated that it had to be broken  up  into  system-independent
  538. and  system-dependent  modules,  as of version 4 (this was done by Charles Car-
  539. valho of ACC).  Each module is composed of multiple files.   This  has  reduced
  540. the time and disk space necessary for assembly; Kermit-80 may once again be as-
  541. sembled on a CP/M system with roughly 150Kbytes of space.  The majority of  the
  542. code  does  not need to be reassembled to support a new system.  Unfortunately,
  543. it can no longer be assembled with ASM, since ASM does not support multiple in-
  544. put  files.   To allow it to be assembled on any CP/M system, the public-domain
  545. assembler LASM is included in the distribution kit; Kermit-80 may also  be  as-
  546. sembled  with Microsoft's M80 (not supplied), or cross-assembled on a DEC-10 or
  547. DEC-20 with MAC80 (also supplied in the distribution kit).  In theory, any 8080
  548. assembler supporting the INCLUDE directive ought to work, as well.
  549.  
  550. All versions of Kermit-80 are assembled from the same set of sources, with sys-
  551. tem dependencies taken care of by assembly-time conditionals within the system-
  552. dependent module (eventually, the system-dependent module will itself be broken
  553. up into multiple files, one for each system).  The most important system depen-
  554. dencies  are  terminal emulation (when CONNECTed to the remote host) and screen
  555. handling, which are dependent on the individual  micro's  escape  codes  (these
  556. features  are table driven and easily modified for other CP/M systems), and the
  557. lowest level i/o routines  for  the  serial  communications  port.    The  port
  558. routines  are  best  done  only  with BDOS calls, but some systems do not allow
  559. this, primarily because the BDOS routines strip the parity bit during port i/o,
  560. and the parity bit is used for data when transmitting binary files.
  561.  
  562. Kermit-80's  I/O routines must check the port status and go elsewhere if no in-
  563. put is available; this allows for virtual terminal connection, keyboard  inter-
  564. ruption  of  stuck  transmissions,  etc.    On systems that fully implement I/O
  565. redirection via the optional CP/M IOBYTE facility, this may be done by  switch-
  566. ing  the IOBYTE definition.  On others, however, IN/OUT instructions explicitly
  567. referencing the port device registers must be used.
  568.  
  569. CP/M-80 KERMIT versions 3.8 and later include a "fuzzy  timer"  that  allows  a
  570. timeout to occur after an interval ranging from 5 to 20 seconds (depending upon
  571. the speed of the processor and the operating system routines) during which  ex-
  572. pected  input does not appear at the port.  In this case, retransmission occurs
  573. automatically.  In any case, you may type a carriage return during transmission
  574. to simulate a timeout when the transfer appears to be stuck.
  575.  
  576.  
  577. 12.4.1. Organization of Kermit-80
  578.  
  579. Kermit-80  consists  of  two  modules, each of which is generated from multiple
  580. source files.  The first  module  contains  the  system-independent  code;  the
  581. second module is configured for a particular system and merged with the system-
  582. independent module to produce a customized Kermit-80.
  583.  
  584. The distribution kit contains:
  585.  
  586.    - the system-independent module, CP4KER.HEX;
  587.    - the system-dependent modules, CP4*.HEX (see table 12-2);
  588.  
  589.  
  590.  
  591.    - the source files, CP4*.ASM,
  592.    - the DEC-10/DEC-20 cross-assembler and linker, MAC80.* and LINK80.*,
  593.    - the public-domain CP/M assembler, LASM.*,
  594.    - the public-domain CP/M load/patch utility, MLOAD.*
  595.  
  596. -------------------------------------------------------------------------------
  597.  
  598.  
  599. Symbol  Filename System
  600. AP6551  CP4APL  Apple II, Z80 Softcard, 6551 ACIA in serial interface
  601. APMMDM  CP4APM  Apple II, Z80 Softcard, Micromodem II in slot 2
  602. BBII    CP4BB2  BigBoard II (terminal required)
  603. BRAIN   CP4BRN  Intertec SuperBrain.
  604. CPM3    CP4CP3  "generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd)
  605. DELPHI  CP4DEL  Digicomp Delphi 100 (terminal required)
  606. DMII    CP4DM2  DECmate II with CP/M option
  607. GENER   CP4GEN  "Generic": CPM 2.2 systems with IOBYTE (terminal req'd)
  608. HEATH   CP4H89  Heath/Zenith H89.
  609. KPII    CP4KPR  Kaypro-II (and 4; probably supports all Kaypro systems)
  610. MDI     CP4MDI  Morrow Decision I (terminal required)
  611. MIKKO   CP4MIK  MikroMikko
  612. MMDI    CP4UDI  Morrow Micro Decision I (terminal required)
  613. OSBRN1  CP4OSB  Osborne 1
  614. OSI     CP4OSI  Ohio Scientific
  615. ROBIN   CP4ROB  DEC VT180
  616. TELCON  CP4TEL  TELCON Zorba portable
  617. TRS80LB CP4TLB  TRS-80 model II with Lifeboat 2.25C CP/M Display
  618. TRS80PT CP4TPT  TRS-80 model II with Pickles + Trout CP/M Display
  619. VECTOR  CP4VEC  Vector Graphics.
  620. Z100    CP4Z00  Z-100 under CP/M-85
  621.  
  622. "symbol" is the symbol  used  to  select  the  target  system,  in  CP4TYP.ASM;
  623. "filename" is the name under which the module is supplied in the distribution.
  624.  
  625.                  Table 12-2:   Systems supported by Kermit-80
  626.  
  627. -------------------------------------------------------------------------------
  628.  
  629.  
  630. 12.4.2. Downloading Kermit-80
  631.  
  632. You'll need either a pre-configured .COM file or the system-independent module,
  633. CP4KER, in binary (.COM) or hex (.HEX) format and the system-dependent  overlay
  634. for  your system (from table 12-2).  If your system is not listed in the table,
  635. get the generic CP/M 2.2 Kermit or the generic CP/M 3 Kermit.  If  you  already
  636. have  a  version of Kermit on your micro and you want to install a new version,
  637. simply use your present version to get the new files.  Transfer  the  files  to
  638. your system and skip ahead to "merging the modules".
  639.  
  640. If you do not have a copy of Kermit on your micro, and you cannot borrow a Ker-
  641. mit floppy but you do have access to a mainframe computer with a  copy  of  the
  642. Kermit-80 distribution, you should read this section.
  643.  
  644. There  are  several  ways  to get Kermit from a host system to your micro.  The
  645. easiest is to "download" the necessary "hex" files into your micro's memory and
  646. then  save  it  on  the  disk.  If you have a terminal emulator program on your
  647.  
  648.  
  649.  
  650. micro which can save a copy of the session to disk, connect to your  host,  and
  651. type  the necessary files.  Exit from the emulator, saving the session log, and
  652. edit the session log to extract the hex files.   Skip  ahead  to  "merging  the
  653. files".
  654.  
  655. The following is a procedure which, though far from foolproof, should allow you
  656. to get a version of Kermit to your CP/M based micro.  It depends upon the  host
  657. prompt,  or at least the first character of the host prompt, being some charac-
  658. ter that cannot appear in a hex file (the valid characters for  hex  files  are
  659. the  digits  0-9, the upper case letters A-F, the colon ``:'', carriage return,
  660. and line feed).  As soon the prompt character is encountered, the transfer will
  661. terminate.    If  your  host does not issue a prompt that will accommodate this
  662. scheme, you can achieve the same effect by adding an atsign ``@'' to  the  very
  663. end  of  the hex file before sending it from the host.  The program below looks
  664. for an atsign (the normal DEC-20 prompt, hex 40).    DECSYSTEM-10  users  would
  665. look for a dot, hex 2E.
  666.  
  667.    1. On  your  micro, connect to a floppy disk with plenty of free space.
  668.       Run DDT and type in the following (the comments should not be  typed
  669.       in; they are there just to tell you what's happening):
  670.  
  671.         -a100                   ;Begin assembling code at 100
  672.         0100    LXI H,2FE       ;Where to store in memory
  673.         0103    SHLD 200        ;Keep pointer there
  674.         0106    MVI E,D         ;Get a CR
  675.         0108    MVI C,4         ;Output to PUNCH {send to HOST}
  676.         010A    CALL 5
  677.         010D    MVI C,3         ;Input from READER {read from HOST}
  678.         010F    CALL 5
  679.         0112    ANI 7F          ;Strip parity bit
  680.         0114    PUSH PSW        ;save a and flags
  681.         0115    MOV E,A         ;move char to e for echo
  682.         0116    MVI C,2         ;Output to screen
  683.         0118    CALL 5
  684.         011B    POP PSW         ;restore a and flags
  685.         011C    CPI 40          ;Is it our DEC-20 prompt?
  686.         011E    JZ 127          ;Yes, have whole file in memory
  687.         0121    CALL 17A        ;no , store another byte
  688.         0124    JMP 10D         ;read another byte
  689.         0127    MVI A,1A        ;Get a Control-Z {CP/M EOF mark}
  690.         0129    CALL 17A        ;store it in memory
  691.         012C    LXI H,300       ;Get memory pointer
  692.         012F    SHLD 202        ;Store as DMA pointer
  693.         0132    LDA 201         ;Get 'HI' byte of memory pointer
  694.         0135    STA 200         ;and store it as 'LO' one
  695.         0138    XRA A
  696.         0139    STA 201         ;Zero 'HI' byte {slow *256}
  697.         013C    MVI C,16        ;Make NEW file
  698.         013E    LXI D,5C        ;With FCB1
  699.         0141    CALL 5
  700.         0144    CALL 15E        ;Write 128 bytes {sector}
  701.         0147    CALL 15E        ;Write another sector
  702.         014A    LXI H,FFFF      ;Get a 16-bit Minus One
  703.         014D    XCHG            ;into DE
  704.         014E    LHLD 200        ;Get 256-byte counter
  705.         0151    DAD D           ;decrement
  706.  
  707.  
  708.  
  709.         0152    SHLD 200        ;and store back
  710.         0155    MVI A,2         ;Check if
  711.         0157    CMP L           ; 256-byte counter down to offset
  712.         0158    JZ 183          ;Yes, wer'e done
  713.         015B    JMP 144         ;Keep writing..
  714.         015E    LHLD 202        ;Get file-pointer
  715.         0161    XCHG            ;into DE
  716.         0162    MVI C,1A        ;Set DMA-address
  717.         0164    CALL 5
  718.         0167    MVI C,15        ;Write sector {128 bytes}
  719.         0169    LXI D,5C        ;using FCB1
  720.         016C    CALL 5
  721.         016F    LHLD 202        ;Get file-pointer
  722.         0172    LXI D,80        ;128-bytes
  723.         0175    DAD D           ;added to file-pointer
  724.         0176    SHLD 202        ;and save
  725.         0179    RET             ;and return
  726.         017A    LHLD 200        ;Get Memory-pointer
  727.         017D    MOV M,A         ;store character
  728.         017E    INX H           ;Increment Pointer
  729.         017F    SHLD 200        ;and save
  730.         0182    RET             ;and return
  731.         0183    MVI C,10        ;CLOSE file
  732.         0185    LXI D,5C        ;using FCB1
  733.         0188    CALL 5
  734.         018B    JMP 0           ;Force WARM BOOT
  735.  
  736.    2. Connect  to  your  host  using  a  terminal  or a terminal emulation
  737.       facility.  Ensure that your host does  not  have  your  terminal  in
  738.       "page  mode".  E.g. on the DEC-20, give the Exec command TERMINAL NO
  739.       PAUSE END-OF-PAGE.
  740.  
  741.    3. Tell the host to display the first hex file (the  system-independent
  742.       module) at your terminal.  E.g. on the DEC-20, give the Exec command
  743.       TYPE CP4KER.HEX, without a terminating carriage return.
  744.  
  745.    4. Return to your micro.  Make sure your IOBYTE is set so that RDR: and
  746.       PUN:  correspond  to  the  I/O  port that is connected to the DEC-20
  747.       (this would normally be the case unless you have done something spe-
  748.       cial  to  change things).  Load the program you entered in the first
  749.       step with DDT, and use it to capture the first hex file:
  750.  
  751.         DDT FETCH.COM
  752.         -icp4ker.hex            ;Setup FCB for file CP4KER.HEX.
  753.         -g100,179               ;Execute the program.
  754.  
  755.       Now there should be a file CP4KER.HEX on your connected disk.
  756.  
  757.    5. Return to the host, and tell it to display the second hex file  (the
  758.       system-dependent module for your configuration).  Again, do not type
  759.       the terminating carraige return.
  760.  
  761.    6. Return to your micro, and run the capture program again:
  762.  
  763.         DDT FETCH.COM
  764.         -icp4ovl.hex            ;Setup FCB to create CP4OVL.HEX
  765.  
  766.  
  767.  
  768.         -g100,179               ;Execute the program.
  769.  
  770.       Now there should be a file CP4OVL.HEX on your connected disk.
  771.  
  772. Merging the files:
  773.  
  774.    1. For purposes of illustration, we will  assume  the  system-dependent
  775.       overlay  is  called "cp4ovl.hex".  The two hex files may be combined
  776.       with MLOAD or DDT.  If you already have a running  Kermit,  you  can
  777.       transfer  MLOAD.HEX  to  your system and create MLOAD.COM by running
  778.       LOAD.  If you're bootstrapping Kermit, you could transfer  MLOAD.HEX
  779.       to  your  system  the same way you got the other two .HEX files, but
  780.       it's probably simpler to use DDT to  get  Kermit  running,  and  get
  781.       MLOAD later if you need it.
  782.  
  783.    2. Using MLOAD, the two pieces may be easily merged:
  784.  
  785.         A>mload kermit40=cp4ker,cp4ovl
  786.         [some messages about program size, etc.]
  787.         A>
  788.  
  789.    3. If you don't have MLOAD running, it's a bit more complex:
  790.  
  791.         A>ddt cp4ker.hex
  792.         NEXT  PC
  793.         3500 0100
  794.         -icp4ovl.hex
  795.         -r
  796.         NEXT  PC
  797.         xxxx 0000
  798.         -^C
  799.         A>save dd kermit40.com
  800.  
  801.       The  page  count  ("dd") used in the SAVE command is calculated from
  802.       the last address ("xxxx") given by DDT in response to the R command:
  803.       drop  the last two digits and add 1 if they were not zero, then con-
  804.       vert from hexadecimal (base 16) to decimal (base 10):  384F  becomes
  805.       39  hex, which is 57 decimal (3 times 16 plus 9) -- but 3700 becomes
  806.       37 hex, or 55 decimal (consult an introductory computing book if you
  807.       don't understand number base conversion).
  808.  
  809.    4. Note that CP/M hex files have checksums on each line.  If there were
  810.       any transmission errors during the downloading process, MLOAD or DDT
  811.       will  notice a bad checksum and will report an error (something like
  812.       "Illegal Format").  If you get any errors during loading, either fix
  813.       the hex file locally with an editor, or repeat the transfer.
  814.  
  815. You now should have a running version of Kermit-80, called KERMIT40.COM.
  816.  
  817. Test  your new Kermit by running it.  If it gives you a prompt, it might be OK.
  818. (don't delete your old one yet...).  Instead of a prompt, you could get one  of
  819. two messages indicating that the configuration information is invalid:  
  820.  
  821.   ?Kermit has not been configured for a target system
  822.  
  823. or 
  824.  
  825.  
  826.  
  827.   ?Consistency check on configuration failed
  828.  
  829. Of  course,  neither  of these messages should appear if you're building Kermit
  830. from the distribution kit.  The first message indicates that  the  overlay  was
  831. not found where the system-independent module expected to find it, probably be-
  832. cause the overlay address is incorrect; the second indicates that  the  version
  833. of  CP4LNK used in the system-dependent module is incompatible with the system-
  834. independent module.
  835.  
  836. Once you are satisfied that KERMIT40 works correctly, you  should  rename  your
  837. old  KERMIT.COM to something else, like OKERMIT.COM, and rename KERMIT40.COM to
  838. KERMIT.COM.
  839.  
  840.  
  841. 12.4.3. Assembling Kermit-80 from the sources
  842.  
  843. Kermit-80 is built in two pieces from the following 12 files:
  844.  
  845. The system-independent files:
  846.   CP4KER.ASM    header file
  847.   CP4DEF.ASM    definitions for both KERMIT and KERSYS
  848.   CP4MIT.ASM    initialization, main loop, miscellaneous commands  (BYE,  EXIT,
  849.                 LOG, SET, SHOW, STATUS, and VERSION)
  850.   CP4PKT.ASM    the  KERMIT protocol handler (SEND, RECEIVE, LOGOUT, and FINISH
  851.                 commands)
  852.   CP4TT.ASM      the transparent commands (TRANSMIT, CONNECT)
  853.   CP4CPM.ASM    CP/M commands (DIR, ERA)
  854.   CP4WLD.ASM    the wildcard handler
  855.   CP4CMD.ASM    the command parser
  856.   CP4UTL.ASM    utility routines and data
  857.   CP4LNK.ASM    linkage area description
  858.  
  859. The system-dependent files:
  860.   CP4TYP.ASM    system selection
  861.   CP4SYS.ASM    system-specific code
  862.  
  863. The system-independent module contains all of the system-independent files  ex-
  864. cept  for  CP4LNK.ASM,  which  is assembled into the system-dependent module to
  865. provide the structures needed to connect the two modules.  As distributed,  the
  866. system-independent  module  is  named  CP4KER.HEX.    If  you  have  a  copy of
  867. CP4KER.HEX, you do not need to reassemble the system-independent module to con-
  868. figure Kermit for your system.
  869.  
  870. The system-dependent module consists of CP4TYP.ASM, CP4DEF.ASM, CP4LNK.ASM, and
  871. CP4SYS.ASM.  One copy of the system-dependent module is  supplied  already  as-
  872. sembled  for  each  supported  system;  the filename may be obtained from table
  873. 12-2.
  874.  
  875. After assembling the two pieces separately, they are combined with DDT or MLOAD
  876. into a system-specific Kermit.
  877.  
  878. If  you  want to rebuild the system-independent module, the only change you may
  879. need to make is to select the assembler to be used, in CP4KER.ASM.  Define  one
  880. of MAC80, M80, or LASM to TRUE to select it as the assembler; the others should
  881. be defined FALSE.
  882.  
  883.  
  884.  
  885. Assuming you have the Microsoft Macro Assembler package (M80/L80), you'll  need
  886. to do the following:
  887.  
  888.   A>m80 cp4ker=cp4ker.asm
  889.   A>l80 /p:100,cp4ker,cp4ker/n/e
  890.  
  891. This will produce CP4KER.COM.
  892.  
  893. If you are using LASM instead, do this:  
  894.  
  895.   A>lasm cp4ker
  896.  
  897. LASM  will  generate  CP4KER.HEX  and  CP4KER.PRN.    LASM allows options to be
  898. specified in the same way as the standard assembler, ASM, so the command 
  899.  
  900.   A>lasm cp4ker.abz
  901.  
  902. will read the source files from drive A, send the .HEX file  to  drive  B,  and
  903. suppress the listing file.
  904.  
  905. If  you have access to a TOPS-10 or TOPS-20 system, you can cross-assemble Ker-
  906. mit there with MAC80, producing CP4KER.HEX:
  907.  
  908.   .run mac80
  909.   *=cp4ker.asm
  910.  
  911. If you want to generate a system-dependent overlay for a particular system,  or
  912. want  to  change  the  terminal  supported, you'll need to check three areas in
  913. CP4TYP.ASM:
  914.  
  915. First, the overlay start ADDRESS.  The symbol "ovladr" is EQUated  to  the  ad-
  916. dress  of "LNKFLG" in the system-independent module, as the starting address of
  917. the overlay (3400H for version 4.05).  You'll need to know this value if you're
  918. building  the  overlay  with  M80/L80.   You won't normally need to change this
  919. value.
  920.  
  921. Second, the assembler being used.  Again, define one of MAC80, M80, and LASM to
  922. be  TRUE  to  select  it,  and  define the others to be FALSE.  The two modules
  923. (system-independent and system-dependent) do not need to be built with the same
  924. assembler.
  925.  
  926. Third, the system configuration.  Locate your system in table 12-2, then define
  927. the appropriate symbol TRUE, and the rest FALSE.  If the system  comes  with  a
  928. builtin  console terminal, define all the terminal switches FALSE.  If the sys-
  929. tem uses an external terminal as the console, locate the terminal in table 12-3
  930. and  define  the appropriate symbol TRUE, and the remainder FALSE.  If the ter-
  931. minal is not listed in table 12-3, use the  CRT  switch;  in  this  case,  VT52
  932. emulation is not supported.
  933.  
  934. In  addition,  there are a few general and system-specific symbols which may be
  935. altered to fit your system:
  936.  
  937. APSLOT          For Apple with 6551 ACIA, defines the slot number of the serial
  938.                 card
  939.  
  940. CPUSPD          Processor  speed  in  units  of 100KHz (currently used only for
  941.  
  942.  
  943.  
  944.                 bbII and kpII for timing loops)
  945.  
  946. TAC             For users connecting through ARPAnet TACs: set to TRUE  if  you
  947.                 wish the default TACTRAP status to be ON. (This may be overrid-
  948.                 den with the SET TACTRAP command).  If  you're  not  connecting
  949.                 through a TAC, set tac to FALSE and ignore tacval.
  950.  
  951. TACVAL          For  ARPANET  TAC  users:  defines  the  default  TAC intercept
  952.                 character (may be overridden with the SET TACTRAP command)
  953.  
  954. If you are just assembling an  existing  configuration,  you'll  need  to  edit
  955. CP4TYP.ASM  only.    If you are adding support for a new system, you should not
  956. modify CP4DEF.ASM or CP4LNK.ASM; if you do, you'll have to change  the  system-
  957. independent  module  also.   Eventually, CP4SYS.ASM will be split into separate
  958. files, each of which will generate one or more related systems.  When this hap-
  959. pens,  you'll  want to pick the one closest to your system to use as a starting
  960. point.
  961.  
  962. After editing CP4TYP.ASM as necessary, assemble and link the  overlay  as  fol-
  963. lows:
  964.  
  965.    - With M80 (where "xxxx" is the hex value of ovladr from CP4LNK.ASM):
  966.  
  967.        A>m80 cp4typ=cp4typ.asm
  968.        A>l80 /p:xxxx,cp4typ,cp4typ/n/x/e
  969.  
  970.    - With LASM:
  971.  
  972.        A>lasm cp4typ
  973.  
  974.    - With MAC80 on TOPS-10:
  975.  
  976.        .run mac80
  977.        *=cp4typ.asm
  978.  
  979.    - With MAC80 on TOPS-20:
  980.  
  981.        @run mac80
  982.        *=cp4typ.asm
  983.  
  984. The  overlay (cp4typ.hex) may then be merged with the system-independent module
  985. as described above (creating a runnable Kermit from the distribution kit).
  986.  
  987. If you have a TOPS-10 or TOPS-20 system and already have  a  running  Kermit-80
  988. v3.9  or  later, you can merge the two .HEX files into a .COM file with LINK80,
  989. and transfer the new .COM file to your micro with Kermit:
  990.  
  991.    - Tops-10:
  992.  
  993.        .copy kernew.hex=cp4ker.hex,cp4typ.hex
  994.        .link80 kernew
  995.  
  996.    - Tops-20:
  997.  
  998.        @append cp4ker.hex,cp4typ.hex (to) kernew.hex
  999.        @link80 kernew
  1000.  
  1001.  
  1002.  
  1003. producing KERNEW.COM.  If LINK80 says "?Data overlaid", you have an old version
  1004. of LINK80, and will have to transfer the .HEX files to the micro and merge them
  1005. there.
  1006.  
  1007. -------------------------------------------------------------------------------
  1008.  
  1009.  
  1010. Symbol         Terminal description
  1011. crt            Basic CRT, no cursor positioning
  1012. adm3a          ADM3A Display or lookalike
  1013. smrtvd         Netronics Smartvid-80
  1014. tvi925         TVI925, Freedom 100
  1015. vt52           VT52 or VT52 emulator such as Heath H19, H29, etc.
  1016. vt100          VT100 or emulator (most ANSI terminals should work)
  1017.  
  1018.                   Table 12-3:   Terminals known to Kermit-80
  1019.  
  1020. -------------------------------------------------------------------------------
  1021.  
  1022.  
  1023. 12.5. Adding Support For A New System
  1024.  
  1025. Kermit-80 is built from a common set  of  source  files;  the  system-dependent
  1026. module  makes  heavy  use  of  conditional  assembly (this complication will be
  1027. removed in future releases).  The system dependencies arise  from  attempts  to
  1028. answer some questions:
  1029.  
  1030.    1. What kind of terminal is to be supported?
  1031.  
  1032.       For  many micros, the console is an integral part of the system, but
  1033.       others can use an external terminal.  In either case,  the  commands
  1034.       to  manipulate  the  screen  (position the curser, erase the screen,
  1035.       etc) must be defined.
  1036.  
  1037.    2. How is the serial line accessed?
  1038.  
  1039.       For systems supporting the IOBYTE function, this is straightforward;
  1040.       the  symbol "IOBYT" is defined TRUE.  If the serial line is accessed
  1041.       with IN and OUT instructions, it may be possible to use  the  simple
  1042.       I/O  routines provided.  In this case, the symbol "INOUT" is defined
  1043.       TRUE, the MNPORT and MNPRTS are defined to be the data  and  control
  1044.       addresses,  respectively,  and bit masks for testing for "input data
  1045.       available" and "output buffer empty" must be defined.  If the inter-
  1046.       face is strange, leave IOBYT and INOUT set to FALSE, and provide the
  1047.       I/O routines.
  1048.  
  1049.    3. What initialization is necessary?
  1050.  
  1051.       You may wish to set the baud rate or configure the  serial  line  at
  1052.       startup.  Examples for a number of devices are present.
  1053.  
  1054.    4. What special features are to be supported?
  1055.  
  1056.       You  may  want  to  provide  the capability to select one of several
  1057.       serial lines with the SET PORT command, or to change  the  speed  of
  1058.       the  serial line with the SET BAUD-RATE command.  To do this, you'll
  1059.  
  1060.  
  1061.  
  1062.       need to build a command table, using the systems  already  supported
  1063.       as  examples.    The  ability  to  send a BREAK signal is desirable.
  1064.       Again, examples for several different interfaces  (ACIA,  SIO,  etc)
  1065.       are present.
  1066.  
  1067.  
  1068. 12.6. Notes on New Features in Kermit-80 Version 4
  1069.  
  1070. Debugging  aids:  SET DEBUG ON will add two fields to the SEND/RECEIVE display,
  1071. labelled "Spack" and "Rpack".  These display the last packet sent and received.
  1072. Of course, this slows down the transfer, especially if the console is an exter-
  1073. nal terminal.  SET DEBUG OFF removes these fields.  The  VERSION  command  dis-
  1074. plays  the name, edit number, and edit date of several of the modules that make
  1075. up Kermit.
  1076.  
  1077. TAC support: ARPAnet TACs (and many other communication devices  such  as  ter-
  1078. minal  concentrators,  modems,  port contention units, network PADs, etc) use a
  1079. printing character (normally "@") as an intercept character, to allow  commands
  1080. to  be issued to the TAC.  In order to send this character to the host, it must
  1081. be typed twice.  The command "SET TAC CHARACTER" to Kermit enables the  TACtrap
  1082. and  asks the user to specify the TAC intercept character.  This character will
  1083. be automatically doubled when it appears in Kermit protocol messages  (sent  by
  1084. the  SEND or RECEIVE commands) or when it appears in a file being sent with the
  1085. TRANSMIT command.  It is not automatically doubled when typed by  the  user  in
  1086. CONNECT mode.  "SET TAC ON" enables the TACtrap but does not change the TAC in-
  1087. tercept character, which is initially "@".  "SET TAC OFF" disables the TACtrap.
  1088. (These comments apply equally to any communication device that uses a printable
  1089. attention character which it will pass through if doubled.)
  1090.  
  1091. File buffering:  Previous versions of Kermit-80 buffered only one  sector  (128
  1092. bytes)  at  a  time  during  file  transfer  operations.   This version buffers
  1093. 16Kbytes at a time, reducing the number of times the floppy drive must be  spun
  1094. up  and down, and increasing the effective throughput of the link.  If the disk
  1095. transfer rate is  too  slow,  howver,  the  remote  Kermit  may  time  out  and
  1096. retransmit  packets.   This will show up on the screen in the "Retries:" field;
  1097. if this occurs after disk activity, you may want to increase the timeout  value
  1098. on  the remote Kermit, or reassemble Kermit with a smaller value for MAXSEC (in
  1099. CP4SYS.ASM).  This buffer is also used by the TRANSMIT command;  the  log  file
  1100. enabled by the LOG command is still written a sector at a time.
  1101.  
  1102.  
  1103. 12.7. Future Work
  1104.  
  1105. Work that needs to be done in future releases includes:
  1106.  
  1107.    - Merge  in  support for additional CP/M-80 systems, particularly those
  1108.      for which support was recently added to the monolithic v3.x source.
  1109.  
  1110.    - Break up CP4SYS into discrete source  files,  one  for  each  system.
  1111.      These  source  files should serve as simple models for adding support
  1112.      for new systems to Kermit-80 -- only the very  basic  screen  defini-
  1113.      tions,  flags,  i/o  primitives, initializations, and so forth should
  1114.      appear in each system-dependent file.
  1115.  
  1116.    - Make the file-stepping mechanism faster (buffer the FCB's  in  chunks
  1117.  
  1118.  
  1119.  
  1120.                                                     th
  1121.      of 16 or 32 or 64).  Currently, to access the n   file in a directory
  1122.      requires n(n+1)/2 lookups...
  1123.  
  1124.    - Addition of missing features -- compression  of  repeated  characters
  1125.      during   packet   transmission,   transmission   of  file  attributes
  1126.      (particularly size, so that "percent done" can be displayed for  both
  1127.      incoming  and  outbound files), advanced commands for servers (REMOTE
  1128.      DIRECTORY, etc),  command  macros  and  initialization  files,  login
  1129.      scripts, remote operation and server mode, etc etc.
  1130.  
  1131.  
  1132.  
  1133. Index
  1134.  
  1135. ,
  1136.  
  1137.           8080   221, 223            XON/XOFF   218
  1138.  
  1139.           ARPAnet   233              Z80   223
  1140.           Attention Character   233
  1141.  
  1142.           Baud   219
  1143.           BIOS   221
  1144.           Block Check   220
  1145.           Bootstrap   225
  1146.           BYE   218
  1147.  
  1148.           Connect   217
  1149.           CP/M   224
  1150.  
  1151.           Downloading   225
  1152.  
  1153.           Eighth-Bit Prefix   219
  1154.           Escape Character   217, 219
  1155.  
  1156.           File-Warning   218
  1157.           FINISH   219
  1158.  
  1159.           Generic Kermit-80   221
  1160.           GET   218
  1161.  
  1162.           IBM   220
  1163.           Intercept Character   233
  1164.  
  1165.           Local   216
  1166.           Local-Echo   219
  1167.           LOG   218
  1168.           LOGOUT   218
  1169.  
  1170.           NAK   217
  1171.  
  1172.           Parity   219
  1173.  
  1174.           RECEIVE   218
  1175.  
  1176.           SEND   218
  1177.           SET   219
  1178.  
  1179.           TAC   233
  1180.           Timeout   216, 217, 224
  1181.           TIMER   219
  1182.           TRANSMIT   218
  1183.  
  1184.           VERSION   219
  1185.           Virtual Terminal   217
  1186.           VT100   219
  1187.           VT52   219
  1188.  
  1189.           Warning   219
  1190.  
  1191.  
  1192.  
  1193.                                Table of Contents
  1194.  
  1195. 12. CP/M-80 KERMIT                                                          215
  1196.  
  1197.    12.1. Summary of CP/M                                                    215
  1198.    12.2. Kermit-80 Description                                              216
  1199.    12.3. Kermit-80 Flavors                                                  221
  1200.        12.3.1. Generic Kermit-80                                            221
  1201.        12.3.2. CP/M 3 Kermit                                                222
  1202.        12.3.3. System-Specific Versions                                     222
  1203.    12.4. Installation of Kermit-80                                          223
  1204.        12.4.1. Organization of Kermit-80                                    224
  1205.        12.4.2. Downloading Kermit-80                                        225
  1206.        12.4.3. Assembling Kermit-80 from the sources                        229
  1207.    12.5. Adding Support For A New System                                    232
  1208.    12.6. Notes on New Features in Kermit-80 Version 4                       233
  1209.    12.7. Future Work                                                        233
  1210.  
  1211. Index                                                                         i
  1212.  
  1213.  
  1214.  
  1215. List of Tables
  1216.  
  1217.    Table 12-1:   Kermit-80 SET PORT Options                                 222
  1218.    Table 12-2:   Systems supported by Kermit-80                             225
  1219.    Table 12-3:   Terminals known to Kermit-80                               232
  1220.