home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / bbcmicro / bbckerdoc.txt < prev    next >
Text File  |  2020-01-01  |  265KB  |  8,447 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              BBC KERMIT USER GUIDE
  9.                              =====================
  10.      
  11.  
  12.  
  13.  
  14.  
  15.      This  guide  describes how to use the implementation of KERMIT for the
  16.      BBC Computer produced by  the  Computing  Department's  Communications
  17.      Group at Lancaster University. BBC KERMIT may be used on BBC models B,
  18.      B+  and  B+128; and also on the Master 128. It operates with the Acorn
  19.      DFS, 1770 DFS, ADFS, Econet, and  any  other  Acorn-compatible  filing
  20.      system.
  21.      
  22.      
  23.      
  24.      
  25.      
  26.      
  27.             The information in this edition applies to version 1.42
  28.      
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.                                                                 EDITION 4.1
  48.                                                                   July 1986
  49.      
  50.                                                               Alan Phillips
  51.      
  52.  
  53.  
  54.      
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                              BBC KERMIT User Guide
  61.  
  62.  
  63.  
  64.      
  65.                                     CONTENTS
  66.      
  67.      
  68.      
  69.      
  70.                1.  INTRODUCTION
  71.                    1.1  BBC KERMIT capabilities at a glance
  72.                    
  73.                    
  74.                    
  75.                2.  AN OVERVIEW OF KERMIT
  76.                
  77.                
  78.                
  79.                3.  CONTROLLING BBC KERMIT
  80.                    3.1  Entering BBC KERMIT
  81.                         3.1.1  The RAM version
  82.                         3.1.2  The sideways ROM version
  83.                    3.2  Leaving BBC KERMIT
  84.                    3.3  BBC KERMIT command language
  85.                         3.3.1  Command format
  86.                         3.3.2  Abbreviating commands and parameters
  87.                         3.3.3  Numeric parameters
  88.                         3.3.4  Obtaining help
  89.                    3.4  Reading commands from a file
  90.                    3.5  Storing parameter settings
  91.                    3.6  Setting the command screen width
  92.                    3.7  Function and cursor keys
  93.                    3.8  Using an auto-boot file
  94.                    
  95.                    
  96.                    
  97.                4.  USING BBC KERMIT AS A TERMINAL EMULATOR
  98.                    4.1  Running a terminal session
  99.                         4.1.1  Choosing the terminal emulation required
  100.                         4.1.2  Setting the line speed
  101.                         4.1.3  Setting parity
  102.                         4.1.4  Selecting the flow control method
  103.                         4.1.5  Specifying an "ignore" character
  104.                         4.1.6  Starting terminal emulation
  105.                         4.1.7  Sending a break signal
  106.                         4.1.8  Using the function keys
  107.                         4.1.9  Using the cursor keys
  108.                         4.1.10 Pausing screen output
  109.                         4.1.11 Returning to command mode
  110.                    4.2  Logging output to a disc file
  111.                    4.3  Logging output to a printer
  112.                    4.4  Sending files to a host without KERMIT
  113.                    4.5  VT52 keypad emulation
  114.                    
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                    
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                              BBC KERMIT User Guide
  127.  
  128.  
  129.  
  130.                5.  TRANSFERRING FILES WITH KERMIT
  131.                    5.1  Principles
  132.                    5.2  File type
  133.                         5.2.1  Binary files
  134.                         5.2.2  Printable text (ASCII) files
  135.                         5.2.3  How to decide on the file type to use
  136.                    5.3  Sending eight bit data
  137.                    5.4  Starting up the mainframe KERMIT
  138.                    5.5  Using BBC KERMIT with a remote server
  139.                         5.5.1  Sending files to a server
  140.                         5.5.2  Fetching files from a server
  141.                         5.5.3  Controlling a remote server
  142.                         5.5.4  Closing down the server
  143.                    5.6  Using BBC KERMIT with a remote non-server
  144.                         5.6.1  Sending files to a non-server
  145.                         5.6.2  Receiving files from a non-server
  146.                    5.7  Transferring data to and from memory
  147.                    5.8  Transferring data to a parallel printer
  148.                    5.9  Handling problems
  149.                    5.10 Advanced facilities
  150.                         5.10.1  Interrupting transfers
  151.                         5.10.2  Using timeouts
  152.                         5.10.3  File name translation
  153.                         5.10.4  Detailed protocol control
  154.                         
  155.                         
  156.           Appendices
  157.           
  158.                A1. BBC KERMIT COMMANDS
  159.                    A1.1  Commands for general control of BBC KERMIT
  160.                    A1.2  Commands for transferring data
  161.                    A1.3  Commands for terminal emulation
  162.                    A1.4  Commands for control of remote servers
  163.                    A1.5  Commands for detailed protocol control
  164.                    
  165.                    
  166.                A2. OBTAINING, BUILDING AND MODIFYING BBC KERMIT
  167.                    A2.1 Obtaining BBC KERMIT
  168.                         A2.1.1 The source files
  169.                    A2.2 Building BBC KERMIT from a hex file
  170.                    A2.3 Building BBC KERMIT from source
  171.                         A2.3.1 Source file layout
  172.                         A2.3.2 The assembly process
  173.                    A2.4 Changing KERMIT defaults
  174.                         A2.4.1 Changing the source
  175.                         A2.4.2 Patching the object code
  176.                         A2.4.3 Format of the defaults block
  177.                    A2.5 The hex to binary converter program
  178.                    A2.6 Contact addresses
  179.                    
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.                    
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                              BBC KERMIT User Guide
  193.  
  194.  
  195.  
  196.                    
  197.                    
  198.                    
  199.                A3. USING THE EDT EDITOR ON VAX/VMS
  200.                    A3.1 Setting up the terminal details
  201.                    A3.2 Edit keypad keys
  202.                         A3.2.1 Models B, B+ and B+128
  203.                         A3.2.2 The Master 128
  204.      
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.      
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                              BBC KERMIT User Guide
  259.  
  260.  
  261.  
  262.      1: INTRODUCTION
  263.      
  264.         This  user  guide  describes  the  KERMIT implementation on the BBC
  265.      Micro produced by the Communications Group of the Computing Department
  266.      at Lancaster University. It is intended to provide enough  information
  267.      for  a  novice KERMIT user to be able to transfer data to and from his
  268.      BBC micro to another KERMIT system. Other KERMIT systems are  desribed
  269.      only  in  passing:  thus you will almost certainly need to consult the
  270.      equivalent user guide for the KERMIT system on the other machine.
  271.      
  272.         The guide is divided into several chapters. The next chapter  is  a
  273.      general  overview of KERMIT as a whole, and explains its advantages as
  274.      a file transfer system over "dumb  capture"  pograms.  The  succeeding
  275.      chapter describes the command language that BBC KERMIT uses. Following
  276.      that  are  chapters that describe how to use BBC KERMIT as a terminal,
  277.      and how to use it to transfer data.
  278.      
  279.         The appendices comprise the "reference section". They  describe  in
  280.      full  detail  the  commands  available in BBC KERMIT, grouping them by
  281.      functionality  (i.e.  "Commands  for  file  transfer",  "Commands  for
  282.      terminal  emulation",  etc).  They  also  describe  how  to obtain BBC
  283.      KERMIT, and, having obtained it, how to build  it  from  the  assembly
  284.      language sources or modify the compiled binary version.
  285.      
  286.      
  287.         BBC  KERMIT is, of course, freely available to anyone who wants it.
  288.      It can be obtained from  the  KERMIT  tapes  distributed  by  Columbia
  289.      University;   alternatively,  it  can  be  picked  up  from  Lancaster
  290.      University's KERMIT distribution service. This latter  option  enables
  291.      it  to  be  acquired  either  over  file  transfer  from the Lancaster
  292.      University VAX 11/780 system, or on Acorn format discs, or  (in  small
  293.      numbers)  as  programmed  EPROMs.  The  Lancaster  KERMIT distribution
  294.      service also maintains on-line bulletin files giving  details  of  new
  295.      releases of BBC KERMIT and of reported bugs: these can be consulted in
  296.      a public-access username.
  297.      
  298.      
  299.         Lancaster  University  intend  to  continue  development of the BBC
  300.      KERMIT system. We welcome any comments or  suggestions  that  you  may
  301.      wish to pass on, as well as reports of bugs, problems and deficiencies
  302.      in  the  program  or  the  documentation.  The  addresses are given in
  303.      Appendix 2.
  304.      
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.                                        1
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                              BBC KERMIT User Guide
  325.  
  326.  
  327.  
  328.      1.1 BBC KERMIT CAPABILITIES AT A GLANCE
  329.      
  330.      
  331.      
  332.           Local operation                    Yes
  333.           Remote operation                   No
  334.           Transfer text files                Yes
  335.           Transfer binary files              Yes
  336.           Wildcard send                      Yes
  337.           ^X/^Z interruption                 Yes
  338.           Filename collision avoidance       Yes
  339.           Can time out                       Yes
  340.           8th-bit-prefixing                  Yes
  341.           Repeat count prefixing             No
  342.           Alternate block checks             No
  343.           Terminal emulation                 Yes
  344.           Communications settings            Yes
  345.           Transmit BREAK                     Yes
  346.           IBM mainframe communication        Yes
  347.           Transaction logging                No
  348.           Session logging (raw download)     Yes
  349.           Raw transmit                       Yes
  350.           Act as server                      No
  351.           Talk to server                     Yes
  352.           Advanced server functions          No
  353.           Advanced commands for servers      Yes
  354.           Local file management              Yes
  355.           Handle file attributes             No
  356.           Command files                      Yes
  357.           Command macros                     No
  358.           
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.                                        2
  385.  
  386.  
  387.  
  388.  
  389.                              BBC KERMIT User Guide
  390.  
  391.  
  392.      2: AN OVERVIEW OF KERMIT
  393.      
  394.      
  395.         KERMIT is a system, devised at the Center for Computing  Activities
  396.      at  the  University  of  Columbia  in  New York (CUCCA), to permit the
  397.      simple and flexible  transfer  of  data  from  a  microcomputer  to  a
  398.      mainframe  or  another  microcomputer.  CUCCA  retain the copyright on
  399.      KERMIT (the programs are not "public domain"), but have published full
  400.      information on it and permit anyone  to  implement  it  on  their  own
  401.      machines,  provided  this is not done for commercial purposes and that
  402.      copies are sent to them for distribution. The result is that KERMIT is
  403.      now available on a very wide range of machines indeed: very few micros
  404.      and mainframes do not have a KERMIT of some sort  suitable  for  them,
  405.      and  the programs can be easily acquired from the Lancaster University
  406.      KERMIT distribution service.
  407.      
  408.         The primary design aim of KERMIT is to permit the reliable transfer
  409.      of any data whatsoever between systems, and to make the data usable on
  410.      the system that receives it if this is  possible.  To  illustrate  why
  411.      this  is  important,  and  not  possible  with  simple systems, we can
  412.      consider an ordinary terminal emulation system that allows data to  be
  413.      captured into files or sent from them.
  414.      
  415.         Simple  terminal  emulator  systems,  such  as  those  commercially
  416.      available for the BBC micro, do permit you to transfer  files  from  a
  417.      mainframe  in  a  rudimentary way. You would tell the emulator to copy
  418.      any characters that appear on the screen into a  file,  then  ask  the
  419.      mainframe to display the file. The reverse process would let you input
  420.      data into a mainframe file from your BBC discs.
  421.      
  422.         The  problems arise in the nature of the communications system that
  423.      connect the micro to the mainframe, and how the mainframe itself  uses
  424.      this  system.  A  character of data in a file occupies one byte, which
  425.      consists of 8 binary digits or "bits". If you regard  the  pattern  of
  426.      bits representing a character as a number, this allows numbers ranging
  427.      from  0  to  255 to be used. However, many communications systems will
  428.      allow only 7 of the eight bits to be transmitted along them. The  most
  429.      significant   bit,   termed   the   "parity   bit",  is  used  by  the
  430.      communications system as an error-checking device. Thus,  even  though
  431.      you  send  a byte of 8 bits to the mainframe, it may receive only 7 of
  432.      them. This immediately restricts the range of characters that  can  be
  433.      sent to those whose codes are in the range 0 to 127.
  434.      
  435.         A  further  restriction may be imposed if the communications system
  436.      uses some of those characters  for  its  own  control  purposes:  thus
  437.      systems  often  will  use  the characters whose codes are 17 and 19 to
  438.      prevent overloads occurring. In  such  systems,  you  cannot  transmit
  439.      these  characters  at  all.  To make matters even worse, some machines
  440.      will (apparently arbitrarily) decide that you could not possibly  want
  441.      to  send some characters, so, if you do send them, it will change them
  442.      into something else entirely.
  443.      
  444.         As far as the BBC micro is concerned, you  could  just  about  live
  445.      with  such  problems.  The  character  range  0  to 127 covers all the
  446.      printable characters, so that  transferring  text  files  should  just
  447.      about be possible. Of course, if the communications line you are using
  448.  
  449.  
  450.                                        3
  451.  
  452.  
  453.  
  454.  
  455.                              BBC KERMIT User Guide
  456.  
  457.  
  458.      is unreliable or noisy (a dial up connection over telephone lines, for
  459.      instance,   can   be  expected  to  garble  a  significant  number  of
  460.      characters) there is  nothing  to  prevent  data  being  corrupted  in
  461.      transmission,  so  that  you  will  never  be  sure that the data that
  462.      arrives is the data that you sent.
  463.      
  464.         But although text  files  are  about  manageable,  those  including
  465.      teletext  control  codes  or  word  processor control codes are highly
  466.      unlikely to be, since such codes are likely to lie in the range 128 to
  467.      255. And tokenised BASIC programs produced by SAVE haven't a  hope  of
  468.      being transferred in any useful way at all.
  469.      
  470.         KERMIT  overcomes  all  these  difficulties by encoding the data it
  471.      sends according to a standard set of rules or  "protocol".  The  rules
  472.      recognise   that   many   characters  cannot  be  transmitted  down  a
  473.      communications line, so  if  those  characters  occur,  they  will  be
  474.      translated  into something that can be transmitted. The receiving end,
  475.      of course, will translate them back again  to  what  they  were.  This
  476.      technique  enables you to send any data at all, even SAVEd BASIC files
  477.      or machine code programs. It further guarantees that the data you send
  478.      is the data that  arrives,  since  KERMIT  uses  special  methods  for
  479.      detecting  garbling and will repeat any transmissions that did not get
  480.      through correctly. KERMIT's encoding and checking techniques are  more
  481.      efficient than some other systems that offer this facility, since only
  482.      bytes that need encoding actually are encoded, thus keeping the volume
  483.      of data sent to the minimum possible.
  484.      
  485.         Besides  the problems of actually transferring data corectly, there
  486.      is  the  problem  of  making  it  usable  on  the  other  end  of  the
  487.      transmission link. If you are sending, say, a SAVEd BASIC program to a
  488.      VAX,  this  isn't  a problem, since the VAX can't understand BBC BASIC
  489.      anyway. Nor does it matter if you  use  the  VAX  system  only  as  an
  490.      archive:  it's  irrelevant how the data is held on the VAX, as long as
  491.      when it is brought back to the BBC side it looks the same as  when  it
  492.      was sent.
  493.      
  494.         The  usability  problem  does appear, though, if you want to move a
  495.      file from a BBC to a VAX and then actually use  it  on  the  VAX.  You
  496.      might,  for  instance, word process a file on a BBC, then send it to a
  497.      VAX to be printed. In this case, you do not want to transfer the  data
  498.      byte-for-byte,  since  the  way the BBC and the VAX denote things like
  499.      the end of each line of text will almost certainly be different.  What
  500.      you  require is that the file of printable lines on the BBC, which you
  501.      can process on that machine, becomes a file of  printable  records  on
  502.      the VAX, that can be processed there.
  503.      
  504.         Using  a  dumb terminal emulator system would probably let you send
  505.      the data, but it would appear byte-for-byte as it was on the BBC.  And
  506.      probably  you  would  get  a file on the VAX with extra line-feeds and
  507.      carriage-returns that would need laborious editing  before  you  could
  508.      use the file sensibly.
  509.      
  510.         With  KERMIT  the  problem  can  easily be circumvented. The KERMIT
  511.      protocols define a standard way of indicating the end of  a  printable
  512.      line.  When  you  send  a file from the BBC, BBC KERMIT will translate
  513.      whatever ends the lines of text in your file into this  standard  form
  514.  
  515.  
  516.                                        4
  517.  
  518.  
  519.  
  520.  
  521.                              BBC KERMIT User Guide
  522.  
  523.  
  524.      before  sending  the  data.  The  receiving  end, seeing this standard
  525.      end-of-line indicator, will translate  it  into  however it  indicates
  526.      end-of-line.  You  thus  end  up  with a usable file of lines, with no
  527.      extra characters anywhere.
  528.      
  529.      
  530.         The requirements you must meet before using KERMIT are simple.  You
  531.      will need a BBC KERMIT in your BBC micro; a KERMIT program in whatever
  532.      mainframe  or micro you wish to transfer data to; and a way of linking
  533.      the machines, be it a network, an ordinary cable, or a  piece  of  wet
  534.      string.
  535.      
  536.         For  a  micro  to micro transfer KERMIT is extremely simple to use.
  537.      You would, for example, tell one machine that it is going to receive a
  538.      file, tell the other to send it, and sit back and let them get on with
  539.      it. Micro to mainframe transfers involve an extra step, which is  also
  540.      simple.  BBC  KERMIT  includes  its own terminal emulator program: you
  541.      initially use this to log in to the mainframe as though the BBC  micro
  542.      were  an  ordinary  terminal.  Once  logged  in,  you start the KERMIT
  543.      program on the mainframe, and can then flip from  giving  commands  to
  544.      this  mainframe  KERMIT,  to giving commands to BBC KERMIT. As before,
  545.      once you have told each side to transfer a file, you just sit back and
  546.      relax while it happens.
  547.      
  548.         And KERMIT provides one further facility to  help  you  spend  your
  549.      time  doing  more useful things. As well as sending one file at a time
  550.      from one machine to the other, you can send them in groups: thus,  you
  551.      could  say  "send all the files on my disc to the VAX" in one command.
  552.      The KERMIT programs will send the files one by one until all are gone,
  553.      quite automatically.
  554.      
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.                                        5
  583.  
  584.  
  585.  
  586.  
  587.                              BBC KERMIT User Guide
  588.  
  589.  
  590.      3: CONTROLLING BBC KERMIT
  591.      
  592.      
  593.         In this section we shall look at how you start and stop BBC KERMIT,
  594.      and also how its command language operates.
  595.      
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.                                        6
  649.  
  650.  
  651.  
  652.  
  653.                              BBC KERMIT User Guide
  654.  
  655.  
  656.      3.1 ENTERING BBC KERMIT
  657.      
  658.      
  659.      BBC KERMIT exists in two  versions:  one  that  runs  as  an  ordinary
  660.      program  in the BBC Computer's main memory, and one that is programmed
  661.      into an EPROM and runs as a sideways ROM. The versions have  the  same
  662.      file transfer facilities, but the version that runs in memory provides
  663.      only a 40-character terminal emulation on the model B as opposed to an
  664.      80-character  VT52  emulation.  On models B+ and B+128, and the Master
  665.      128, both versions give identical terminal emulation facilities.
  666.      
  667.         BBC KERMIT is not compatible with the 6502 second processor, so  if
  668.      you  have  been  using  one  you  will  need to power it off and press
  669.      CONTROL-BREAK to reset the system. Similarly it will not  run  on  the
  670.      Master  Turbo-Card:  you  will  need  to  use  the  control  panel  or
  671.      *CONFIGURE command to disable the card before using BBC KERMIT.
  672.      
  673.      
  674.      3.1.1 The RAM version
  675.      
  676.      
  677.           The RAM version of BBC KERMIT will be kept on a disc, and  it  is
  678.           up  to  you what you call the file. Assuming it is called KERMIT,
  679.           you could enter it with the command
  680.           
  681.                                   *RUN KERMIT
  682.           
  683.           
  684.           If the file is in the default or library directory, you could run
  685.           it by simply typing
  686.           
  687.                                     *KERMIT
  688.           
  689.           
  690.           The BBC Computer User Guide and the guide  for  the  Disc  Filing
  691.           System you are using will explain this in more detail if you wish
  692.           to consult them.
  693.           
  694.           
  695.           
  696.      3.1.2 The sideways ROM version
  697.      
  698.      
  699.           The  EPROM  containing  the  sideways  ROM  version of BBC KERMIT
  700.           should be fitted into one of the sideways  ROM  sockets  on  your
  701.           machine  in the same way as other sideways ROMs such as Wordwise.
  702.           If you are using a model B or B+ with a sideways  RAM  board,  or
  703.           have  a  B+128  or  Master  128, you will be able to load the BBC
  704.           KERMIT sideways ROM version to sideways RAM and run it there,  as
  705.           the program is completely unprotected.
  706.           
  707.           
  708.           If  you  fit  the BBC KERMIT ROM as the highest priority language
  709.           ROM in the machine, you will find that the  KERMIT  command  mode
  710.           screen  will appear when you power the machine on. Otherwise, you
  711.           will need to give an operating system command  to  enter  KERMIT:
  712.  
  713.  
  714.                                        7
  715.  
  716.  
  717.  
  718.  
  719.                              BBC KERMIT User Guide
  720.  
  721.  
  722.           simply type
  723.           
  724.                                     *KERMIT
  725.           
  726.           and the KERMIT command mode screen will appear.
  727.           
  728.           The command you give can be abbreviated if you wish, but you must
  729.           follow  the  abbreviation  with  a  ".". The minimum abbreviation
  730.           possible is "*KER.", so you could type any one of
  731.           
  732.                               *KER.
  733.                               *KERM.
  734.                               *KERMI.
  735.                            or *KERMIT
  736.                            
  737.           if you wished.
  738.           
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.                                        8
  781.  
  782.  
  783.  
  784.  
  785.                              BBC KERMIT User Guide
  786.  
  787.  
  788.      3.2 LEAVING BBC KERMIT
  789.      
  790.      
  791.         To leave either the RAM or sideways ROM versions of BBC KERMIT  you
  792.      would  normally use the EXIT command. This will reset the parts of the
  793.      system that KERMIT has been using, and will enter BASIC. 
  794.      
  795.         Alternatively, you can issue an operating system  command  such  as
  796.      *WORDWISE if you wish to enter another language ROM. Here, though, you
  797.      may  need  to  press  the BREAK  key  to  reset  the screen if the new
  798.      language ROM does not do this itself.
  799.      
  800.         Note that the RAM version of  BBC  KERMIT  adjusts  OSHWM  so  that
  801.      commands  such  as *COMPACT will not corrupt the KERMIT program. OSHWM
  802.      is reset  when  you  use  the  EXIT  command  or  press CONTROL-BREAK;
  803.      however,  if  you leave KERMIT with, for example, *BASIC, OSHWM is not
  804.      reset, so you will find that you have  very  little  memory  left  for
  805.      programs. Pressing CONTROL-BREAK will correct this.
  806.      
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.                                        9
  847.  
  848.  
  849.  
  850.  
  851.                              BBC KERMIT User Guide
  852.  
  853.  
  854.      3.3 BBC KERMIT COMMAND LANGUAGE
  855.      
  856.      
  857.         You  control  what  you want BBC KERMIT to do, and how it should do
  858.      it, by giving it commands in its "command language". The format of the
  859.      command language closely  follows  that  used  on  most  other  KERMIT
  860.      implementations on other machines.
  861.      
  862.         There  are  some  diferences in what commands are available between
  863.      the sideways ROM version and the RAM  version  of  BBC  KERMIT.  These
  864.      differences will be noted in the following sections of this guide, and
  865.      are marked clearly in Appendix 1.
  866.      
  867.      
  868.      
  869.      
  870.      3.3.1. Command format
  871.      
  872.      
  873.           When  you start BBC KERMIT, you will see a MODE 7 screen known as
  874.           the "command screen" appear. This will be showing a  prompt  line
  875.           saying
  876.           
  877.                                       BBC>
  878.           
  879.           in  yellow, indicating that BBC KERMIT is expecting you to type a
  880.           command. You can type either a KERMIT command,  or  an  operating
  881.           system  command  preceded as usual by a "*". This allows you, for
  882.           instance, to look at a disc catalogue, or to  delete  files  from
  883.           within  KERMIT.  Like  operating system commands, KERMIT commands
  884.           can be typed in upper case, lower case, or any mixture of the two
  885.           as you please.
  886.           
  887.           KERMIT's own commands are not preceded by an asterisk.  They  all
  888.           take  the  form  of  a  command  name,  such  as "SET", sometimes
  889.           followed  by  one  or  more  further  pieces  of  information  or
  890.           "parameters",  which must be separated from each other by spaces.
  891.           For example, one command you might use is
  892.           
  893.                                 SET PARITY EVEN
  894.           
  895.           to set one of the values used for communicating  with  the  other
  896.           system.  Here  the  command is "SET", and "PARITY" and "EVEN" are
  897.           parameters to the command. Since there  are  a  large  number  of
  898.           variations  to  the  SET  command, these are often referred to in
  899.           this guide as separate commands. Thus you will see references  to
  900.           the "SET FILE TYPE" command, for instance. You can regard this as
  901.           either a command whose name has spaces in it, or as a form of the
  902.           SET  command  with  its  first  parameters  "FILE" and "TYPE". In
  903.           either case, the effect will be the same.
  904.           
  905.           At the end of each command you should press  the  RETURN  key  to
  906.           send  the  line  to  KERMIT for action. If you have made a typing
  907.           mistake you can use the cursor keys and the DELETE key exactly as
  908.           for other BBC micro languages. Pressing CONTROL  and  U  together
  909.           will cancel the entire input line.
  910.  
  911.  
  912.                                        10
  913.  
  914.  
  915.  
  916.  
  917.                              BBC KERMIT User Guide
  918.  
  919.  
  920.           
  921.           Appendix 1 gives the complete specification of all the BBC KERMIT
  922.           commands.  The  commands  are grouped according to their function
  923.           (such  as  "file  transfer  control"),   rather   than   in   one
  924.           alphabetical  list.  Thus  you  will  find  variations of the SET
  925.           command appearing in many places,  grouped  with  other  commands
  926.           that function in the same area.
  927.           
  928.           Sometimes, not all the parameters of some commands need be typed.
  929.           In  these  cases,  BBC KERMIT will take a "default" value for the
  930.           parameter you did not supply. The reference section will tell you
  931.           which parameters can be omitted, and what values BBC KERMIT  will
  932.           assume if they are omitted.
  933.           
  934.           
  935.           
  936.           
  937.      3.3.2. Abbreviating commands and parameters
  938.      
  939.      
  940.           To  reduce  the  amount of typing that you need to do, BBC KERMIT
  941.           allows you to abbreviate all commands and  most  parameters.  You
  942.           may  abbreviate  to  as few characters as you wish, provided that
  943.           what you type is unique. Thus
  944.           
  945.                                    TAKE
  946.                                    TAK
  947.                                    TA
  948.                                    
  949.           are legal, but
  950.           
  951.                                    S
  952.           
  953.           is not, since it could stand for either SET,  SAVE  or  SHOW.  To
  954.           take a full example, you could type either
  955.           
  956.                               SET FILE TYPE BINARY
  957.           
  958.           or abbreviate it as far as
  959.           
  960.                                    SE FI T B
  961.           
  962.           
  963.           
  964.           
  965.      3.3.3. Numeric parameters
  966.      
  967.      
  968.           Except  where  explicitely stated, numeric parameters to commands
  969.           can be typed in either decimal or hexadecimal.  By  default,  BBC
  970.           KERMIT  expects  the  value to be decimal, but you can indicate a
  971.           hexadecimal number by preceding the parameter  with  either  "X",
  972.           "$" or "&".
  973.           
  974.           Thus
  975.           
  976.  
  977.  
  978.                                        11
  979.  
  980.  
  981.  
  982.  
  983.                              BBC KERMIT User Guide
  984.  
  985.  
  986.                                       123
  987.           
  988.           is a decimal value, and
  989.           
  990.                                       &123
  991.           
  992.           is a hexadecimal value.
  993.           
  994.           
  995.           As   an   example:  the  number  28  (decimal)  is  expressed  in
  996.           hexadecimal as 1C, so the two commands
  997.           
  998.                               SET SEND PADDING 28
  999.           
  1000.           and
  1001.           
  1002.                               SET SEND PADDING &1C
  1003.           
  1004.           will have the same effect.
  1005.           
  1006.           
  1007.           
  1008.           
  1009.      3.3.4. Obtaining help
  1010.      
  1011.      
  1012.           Quite often, you may wish a reminder as  to  what  parameters  or
  1013.           commands  you  can  give.  BBC KERMIT has an "auto-help" facility
  1014.           that will act as an "aide-memoire" for you.
  1015.           
  1016.           To use auto-help, simply type a "?" at any place in an input line
  1017.           while typing a command. BBC KERMIT will immediately  give  you  a
  1018.           list of the commands or parameters that you can use at that place
  1019.           in the line, or will output a short message explaining the use of
  1020.           that  parameter. It then retypes the command line up to the place
  1021.           where you typed the question mark, so that you can type in one of
  1022.           the options. You can, of course, change your mind and rub out all
  1023.           or part of the line at this point, or press ESCAPE to  cancel  it
  1024.           altogether.
  1025.           
  1026.           For example, if you type a question mark after the prompt thus:
  1027.           
  1028.                BBC> ?
  1029.           
  1030.           BBC KERMIT will output a list of the commands you can use. If you
  1031.           choose the LOGGING command, you might then type
  1032.           
  1033.                BBC> LOGGING ?
  1034.           
  1035.           BBC  KERMIT  will now tell you that you can type either ON or OFF
  1036.           at this point, and will retype your line, so you will now see
  1037.           
  1038.                BBC> LOGGING
  1039.           
  1040.           with the cursor positioned after "LOGGING", ready for more input.
  1041.           
  1042.  
  1043.  
  1044.                                        12
  1045.  
  1046.  
  1047.  
  1048.  
  1049.                              BBC KERMIT User Guide
  1050.  
  1051.  
  1052.           If you type a question mark at a place where there  are  no  more
  1053.           possible parameters, BBC KERMIT will output
  1054.           
  1055.                       No more parameters for this command
  1056.           
  1057.           to indicate that here you can only either type RETURN to obey the
  1058.           command, or change the line to something else.
  1059.           
  1060.           The   examples   above  have  shown  the  "?"  character  as  the
  1061.           "help-trigger" that invokes  auto-help.  There  may,  though,  be
  1062.           times  when  you  require  to  type a "?" without it causing this
  1063.           action - for example, as part of a remote  filename.  BBC  KERMIT
  1064.           lets  you redefine the character that will trigger auto-help with
  1065.           the SET HELP-TRIGGER command: you  can  set  it  to  any  of  the
  1066.           characters "?", "&", "/", "#", or "@".
  1067.           
  1068.           Automatic  line retyping will also occur if you make a mistake in
  1069.           a command. BBC KERMIT will retype the line up to the point  where
  1070.           it  found the error, so you will not need to type the entire line
  1071.           again.
  1072.           
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.                                        13
  1111.  
  1112.  
  1113.  
  1114.  
  1115.                              BBC KERMIT User Guide
  1116.  
  1117.  
  1118.      3.4 READING COMMANDS FROM A FILE
  1119.      
  1120.      
  1121.         As an alternative to typing commands in on the  keyboard,  you  can
  1122.      place  them  in  a file (for example using *BUILD or a word processor)
  1123.      known as a "TAKE file", and tell BBC KERMIT to read the commands  from
  1124.      there  instead  of  from  the  keyboard.  This  is  done with the TAKE
  1125.      command.
  1126.      
  1127.         BBC KERMIT will read the file in  as  though  the  characters  were
  1128.      coming  from the keyboard, and will obey its contents as commands. You
  1129.      can include either KERMIT commands or operating system commands in the
  1130.      file, the only exception being another  TAKE  command,  which  is  not
  1131.      allowed.  Additionally,  you  can  place  comment lines in the file to
  1132.      describe what it does: any line that starts with a colon (":") will be
  1133.      ignored by KERMIT. Blank lines are also ignored.
  1134.      
  1135.         The SET TAKE-ECHO command allows to you specify  whether  you  wish
  1136.      KERMIT  to  display  the  lines  it reads from the file as it goes. By
  1137.      default you will see the  commands  on  the  screen  before  they  are
  1138.      obeyed.
  1139.      
  1140.         If  an error occurs in a TAKE file, KERMIT will close it and revert
  1141.      to reading  input  from  the  keyboard.  You  can  yourself  stop  the
  1142.      execution of a TAKE file at any time by pressing the ESCAPE key.
  1143.      
  1144.         The  most  common use of a TAKE file is to save you typing a number
  1145.      of SET commands to configure BBC KERMIT every time you start  it:  the
  1146.      job  of  configuration  can then be done with one TAKE command. (Note,
  1147.      though, that the LOAD and SAVE commands provide an even better way  of
  1148.      doing this).
  1149.      
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.                                        14
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.                              BBC KERMIT User Guide
  1183.  
  1184.  
  1185.      3.5 STORING PARAMETER SETTINGS
  1186.      
  1187.      
  1188.         Once  you have changed a number of parameters with the SET command,
  1189.      it is useful to be able to store  them  to  avoid  repitition  of  the
  1190.      commands  at a later time. The SAVE command lets you record the values
  1191.      of all the BBC KERMIT parameters in a disc file: subsequently the LOAD
  1192.      command will read these values  back  and  make  them  operative.  You
  1193.      could,  for  example,  keep  a number of sets of parameters in various
  1194.      files to suit varying needs.
  1195.      
  1196.         If you are running the sideways ROM version BBC KERMIT in  sideways
  1197.      RAM  on  an  expansion board instead of in EPROM, you have the further
  1198.      option of permanently changing the default settings. The  FIX  command
  1199.      will  replace  the  default  values  stored within BBC KERMIT with the
  1200.      values currently in use. This command is  not  available  in  the  RAM
  1201.      version.
  1202.      
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.                                        15
  1244.  
  1245.  
  1246.  
  1247.  
  1248.                              BBC KERMIT User Guide
  1249.  
  1250.  
  1251.      3.6 SETTING THE COMMAND SCREEN WIDTH
  1252.      
  1253.      
  1254.         The  normal  command  screen  used  by  BBC  KERMIT  uses  the  BBC
  1255.      Computer's MODE 7, giving you a 40 character wide  screen  in  colour.
  1256.      This  is  quite  adequate for operating BBC KERMIT normally, but there
  1257.      are occasions, such as when you are using *TYPE to examine a file,  or
  1258.      when  you  are  displaying  output from a remote KERMIT server program
  1259.      (described in section 5.4.3), when it is convenient to have a line  of
  1260.      80 characters.
  1261.      
  1262.         If you have the sideways ROM version of BBC KERMIT on a model B, or
  1263.      are  using  a  B+,  B+128  or  Master 128 with either version, you may
  1264.      change the width of the command screen to suit  your  needs  with  the
  1265.      WIDTH command. Typing
  1266.      
  1267.                                     WIDTH 80
  1268.      
  1269.      will change the command screen into an 80 character screen, and
  1270.      
  1271.                                     WIDTH 40
  1272.      
  1273.      will return to a 40 character screen.
  1274.      
  1275.      
  1276.         The characteristics of the 80 byte command screen are controlled by
  1277.      the  same  commands as for the 80 byte terminal emulation screen: thus
  1278.      the commands
  1279.      
  1280.      
  1281.                                  SET VDU-COLOUR
  1282.      
  1283.      and
  1284.      
  1285.                                      SET TV
  1286.      
  1287.      control the text colour and whether a  *TV  command  is  automatically
  1288.      issued.
  1289.      
  1290.      
  1291.         Remember, though, that the 80 character command screen will use the
  1292.      BBC Computer's main memory down to address &4000 on all models, so you
  1293.      should  not  use it if you have prepared data for transfer from memory
  1294.      above that address. The status screen used to display the progress  of
  1295.      file  transfers will always be in MODE 7, regardless of the use of the
  1296.      WIDTH command.
  1297.      
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.                                        16
  1310.  
  1311.  
  1312.  
  1313.  
  1314.                              BBC KERMIT User Guide
  1315.  
  1316.  
  1317.      3.7 FUNCTION AND CURSOR KEYS
  1318.      
  1319.      
  1320.         In command mode, the 10 red  function  keys  on  the  BBC  Computer
  1321.      keyboard  behave as they do in BASIC. You can program strings onto the
  1322.      keys using the *KEY command as described  in  the  BBC  Computer  User
  1323.      Guide, and pressing the keys will produce the strings. The four cursor
  1324.      keys  also  have their normal function, and you can use them, the COPY
  1325.      key and the DELETE key to edit your command lines as you  would  lines
  1326.      of BASIC.
  1327.      
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.                                        17
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                              BBC KERMIT User Guide
  1381.  
  1382.  
  1383.      3.8 USING AN AUTOBOOT FILE
  1384.      
  1385.         One  way  of  starting  BBC KERMIT up and automatically setting the
  1386.      parameters to suitable values is to create a !BOOT file (using  *BUILD
  1387.      or a word processor, for example) on a disc containing the appropriate
  1388.      commands.  You  should  consult your Disc Filing System user guide for
  1389.      details of how to set up the system so you can use autoboot.
  1390.      
  1391.         For example, you might create the file to hold
  1392.      
  1393.      
  1394.                     *KERMIT
  1395.                     SET BAUD 1200 RECEIVE
  1396.                     SET BAUD 75 TRANSMIT
  1397.                     
  1398.      Then, when you press SHIFT-BREAK, the commands in the file will  enter
  1399.      BBC  KERMIT,  then  set  the baud rates up before returning control to
  1400.      you.
  1401.      
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.                                        18
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                              BBC KERMIT User Guide
  1447.  
  1448.  
  1449.      4: USING BBC KERMIT AS A TERMINAL EMULATOR
  1450.      
  1451.      
  1452.         BBC KERMIT includes facilities that enable  you  to  use  your  BBC
  1453.      computer  as  a  terminal  connected  to  a  mainframe  computer.  The
  1454.      facilities are not as sophisticated as those offered by  a  ROM  whose
  1455.      sole purpose is terminal emulation, since the prime use of KERMIT as a
  1456.      terminal is to allow you to start running a remote KERMIT program on a
  1457.      mainframe, but it is still quite usable.
  1458.      
  1459.         If  you  are  using the RAM version of BBC KERMIT on a model B, the
  1460.      only type of terminal emulation provided is as  a  40  character  wide
  1461.      teletype device.
  1462.      
  1463.         If  you  are  using  the  sideways ROM version, or have a model B+,
  1464.      B+128 or Master 128 with either version, you may choose from  3  types
  1465.      of  terminal  emulations.  By  default,  BBC  KERMIT  provides  an  80
  1466.      character wide terminal compatible with the DEC VT52 standard. If  you
  1467.      wish, you may select an 80 character wide simple teletype device, or a
  1468.      40  character  wide teletype. Normally, you would need the latter mode
  1469.      only if you wanted to transfer a large amount of data to or  from  the
  1470.      BBC's  memory:  the 40 character wide terminal emulation uses BBC mode
  1471.      7, so that memory below &7C00 is available to you.  The  80  character
  1472.      wide teletype and VT52 emulations use memory down to &3D00.
  1473.      
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.                                        19
  1508.  
  1509.  
  1510.  
  1511.  
  1512.                              BBC KERMIT User Guide
  1513.  
  1514.  
  1515.      4.1 RUNNING A TERMINAL SESSION
  1516.      
  1517.      
  1518.         In  this  section  we  shall  look  at how to set up BBC KERMIT for
  1519.      terminal emulation and how to control the emulation functions.
  1520.      
  1521.      
  1522.      
  1523.      
  1524.      4.1.1 Choosing the terminal emulation required
  1525.      
  1526.      
  1527.           If you are using the RAM version of BBC KERMIT on a model B,  you
  1528.           should  ignore  this  section, since only a 40 character teletype
  1529.           emulation is provided. Although you are allowed to  select  other
  1530.           emulation types, you will not be able to use them.
  1531.           
  1532.           If  you  have  the  sideways ROM version of BBC KERMIT, or have a
  1533.           model B+, B+128 or  Master  128,  you  should  first  decide  the
  1534.           emulation mode you wish to choose. The command you will need here
  1535.           is
  1536.           
  1537.                                   SET TERMINAL
  1538.           
  1539.           to choose the emulation you require.
  1540.           
  1541.           For example, the command
  1542.           
  1543.                                SET TERMINAL TT80
  1544.           
  1545.           will  turn  BBC  KERMIT  into  a  simple teletype device using an
  1546.           80-column screen.
  1547.           
  1548.           
  1549.           
  1550.      4.1.2 Setting the line speed
  1551.      
  1552.      
  1553.           For both the RAM and sideways ROM versions of BBC KERMIT you  may
  1554.           need to change the speed at which characters are transmitted down
  1555.           the communications line. The
  1556.           
  1557.                                     SET BAUD
  1558.           
  1559.           command  accomplishes  this.  If  you have the wrong setting, you
  1560.           will find either gibberish or nothing at  all  appearing  on  the
  1561.           screen.  The  default  setting that BBC KERMIT uses is a speed of
  1562.           9600 baud for both transmitting and receiving data.  If  you  are
  1563.           unsure  of  what  setting to use, consult the Advisory or Systems
  1564.           Support personnel of  your  computer  centre.  For  example,  the
  1565.           command
  1566.           
  1567.                                  SET BAUD 1200
  1568.           
  1569.           would  set  up BBC KERMIT to use a baud rate of 1200 for transmit
  1570.           and receive.
  1571.  
  1572.  
  1573.                                        20
  1574.  
  1575.  
  1576.  
  1577.  
  1578.                              BBC KERMIT User Guide
  1579.  
  1580.  
  1581.           
  1582.           Some  communications  equipment  may   require   that   data   is
  1583.           transmitted  and  received  at different baud rates: for example,
  1584.           some modems may enable the host to send data to you at 1200 baud,
  1585.           but require you to send to the host at 75 baud. BBC KERMIT allows
  1586.           you to select such a "split  baud  rate"  mode  by  specifying  a
  1587.           further  parameter  to the SET BAUD command. In the example here,
  1588.           of 1200 baud receive and 75 baud transmit,  you  should  set  the
  1589.           baud rates with the two commands
  1590.           
  1591.           
  1592.                              SET BAUD 1200 RECEIVE
  1593.           
  1594.           and
  1595.           
  1596.                               SET BAUD 75 TRANSMIT
  1597.           
  1598.           
  1599.           
  1600.           
  1601.      4.1.3 Setting parity
  1602.      
  1603.      
  1604.           For  both the sideways ROM and RAM versions of BBC KERMIT you may
  1605.           need  to  change  the  "parity"  value  which  is  used  on   the
  1606.           communications  line.  The parity setting determines what is done
  1607.           with the eighth bit  of  every  data  byte:  some  communications
  1608.           systems or mainframes may insist that this byte be always set, or
  1609.           always  clear,  or should reflect the contents of the other seven
  1610.           bits in some way.
  1611.           
  1612.           You change the parity setting with the
  1613.           
  1614.                                    SET PARITY
  1615.           
  1616.           command. As with line speed, if you use  the  wrong  setting  you
  1617.           will  probably  see  garbage  appearing  on  the screen, and file
  1618.           transfers will not work. As an example, the command
  1619.           
  1620.                                 SET PARITY NONE
  1621.           
  1622.           would tell BBC KERMIT to use a parity value  of  NONE  (sometimes
  1623.           expressed as "no parity"). You should consult the systems support
  1624.           personnel  at your site if you are unsure of the correct setting.
  1625.           Parity also affects how KERMIT decides to transfer some types  of
  1626.           file, and you should consult section 5.3 for more information.
  1627.           
  1628.           By default, BBC KERMIT uses a parity setting of SPACE.
  1629.           
  1630.           
  1631.           
  1632.           
  1633.      4.1.4 Selecting the flow control method
  1634.      
  1635.      
  1636.           When  two computers transfer data between each other, some method
  1637.  
  1638.  
  1639.                                        21
  1640.  
  1641.  
  1642.  
  1643.  
  1644.                              BBC KERMIT User Guide
  1645.  
  1646.  
  1647.           is needed to control the data flow,  to  stop  one  side  sending
  1648.           faster  than  the  other  can receive and process that data. This
  1649.           process is termed "flow control", and gives the machine  that  is
  1650.           receiving the data the ability to tell the other side "don't send
  1651.           any  more  data  till I tell you, as I have a backlog of bytes to
  1652.           display".
  1653.           
  1654.           BBC KERMIT supports  the  two  most  common  techniques  of  flow
  1655.           control, and you can switch at will between them. The command
  1656.           
  1657.                            SET FLOW-CONTROL XON/XOFF
  1658.           
  1659.           selects  "XON/XOFF"  flow  control,  whereby  "stop"  and "go" is
  1660.           signalled by sending  special  byte  values.  Alternatively,  the
  1661.           command
  1662.           
  1663.                             SET FLOW-CONTROL CTS/RTS
  1664.           
  1665.           will  select  "CTS/RTS"  or "hardware" flow control, where "stop"
  1666.           and "go" is signalled by changing voltages on the line connecting
  1667.           the systems.
  1668.           
  1669.           The  setting  you  should  use  will  depend  entirely   on   the
  1670.           communications  system or mainframe you are using, and you should
  1671.           consult the systems support personnel at your site for advice. If
  1672.           you have the wrong setting you will probably find parts of output
  1673.           lines missing when you use terminal mode.
  1674.           
  1675.           By default, BBC KERMIT will use XON/XOFF flow control.
  1676.           
  1677.           
  1678.           
  1679.           
  1680.      4.1.5 Specifying an "ignore" character
  1681.      
  1682.      
  1683.           Some mainframe systems assume that  all  terminals  connected  to
  1684.           them  are  produced  by  the  same  manufacturer,  and  will send
  1685.           "filler" characters to them, assuming that the terminal will know
  1686.           that they are not to be displayed on the screen. BBC  KERMIT,  of
  1687.           course,  is  unaware  that  this  is  being done, so will take no
  1688.           special action: all characters with ASCII codes greater than  31,
  1689.           and  the  CR, LF, DEL, BS and FF characters will be output to the
  1690.           screen. (TAB characters are expanded into spaces  and  ESCAPE  is
  1691.           handled specially).
  1692.           
  1693.           If  the  filler  character  the  mainframe  sends  is one that is
  1694.           normally displayed by BBC KERMIT, you can suppress its output  by
  1695.           nominating it as the "ignore character". For example,
  1696.           
  1697.                                  SET IGNORE &7F
  1698.           
  1699.           would cause DEL characters (ASCII code &7F) to be ignored. Typing
  1700.           
  1701.                                    SET IGNORE
  1702.           
  1703.  
  1704.  
  1705.                                        22
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                              BBC KERMIT User Guide
  1711.  
  1712.  
  1713.           on its own would switch off the ignore facility once more.
  1714.           
  1715.           
  1716.           
  1717.           
  1718.      4.1.6 Starting terminal emulation
  1719.      
  1720.      
  1721.           To start BBC KERMIT as a terminal emulator, you should set up the
  1722.           speed,  parity,  flow  control  and  "ignore" character values as
  1723.           described above, then type the command
  1724.           
  1725.                                     CONNECT
  1726.           
  1727.           This sets up the screen in the required mode and clears  it.  Any
  1728.           characters  you  type  now  are sent directly to the RS423 output
  1729.           port, exactly as they would be if the BBC were a  real  terminal.
  1730.           You  may  now  "wake  up" the system you are connected to, and do
  1731.           anything else you wish.
  1732.           
  1733.           Note that if you have chosen a terminal emulation that BBC KERMIT
  1734.           cannot provide (for instance, if you have selected VT52 mode with
  1735.           the RAM version on a  model  B),  the  CONNECT  command  will  be
  1736.           rejected  and  the error message "Terminal not supported" will be
  1737.           displayed.
  1738.           
  1739.           In all terminal emulation modes BBC KERMIT will display a "status
  1740.           line" at the top  of  the  screen.  The  line  contains  a  brief
  1741.           reminder  of the functions you can select by pressing the CONTROL
  1742.           key with  a  function  key  and  indicates  what  facilities  are
  1743.           currently operating.
  1744.           
  1745.           
  1746.           
  1747.           
  1748.      4.1.7 Sending a break signal
  1749.      
  1750.      
  1751.           Many  mainframe  computer  or  communications systems require the
  1752.           terminal to send them a "break" signal for some operations.
  1753.           
  1754.           BBC KERMIT allows you to  send  either  of  two  types  of  break
  1755.           signal. Pressing CONTROL and F9 will send a "short break" signal:
  1756.           this  is  the  most commonly-used type, and the break signal will
  1757.           last about 240 milliseconds. In some circumstances a "long break"
  1758.           signal may be needed: pressing CONTROL and F8 will send a  signal
  1759.           lasting  3.5  seconds.  Your  systems support or advisory service
  1760.           will be able to tell you which, if any, break signal you need  to
  1761.           use.
  1762.           
  1763.           Note  that  you should not press the key marked BREAK for sending
  1764.           break signals.
  1765.           
  1766.           
  1767.           
  1768.           
  1769.  
  1770.  
  1771.                                        23
  1772.  
  1773.  
  1774.  
  1775.  
  1776.                              BBC KERMIT User Guide
  1777.  
  1778.  
  1779.      4.1.8 Using the function keys
  1780.      
  1781.      
  1782.           In terminal emulation mode BBC KERMIT reserves  the  10  function
  1783.           keys  for  its  own  use:  in VT52 emulation mode it uses them to
  1784.           emulate the "keypad" keys of the  real  VT52.  However,  you  can
  1785.           still  use the function keys to produce strings, but now you will
  1786.           need to press the CONTROL and SHIFT keys at the same time as  the
  1787.           function key concerned.
  1788.           
  1789.           As an example, suppose that in BBC KERMIT command mode (or indeed
  1790.           before  you  started  to run BBC KERMIT) you issued the Operating
  1791.           System command
  1792.           
  1793.           
  1794.                              *KEY 0 type myfile.dat
  1795.           
  1796.           
  1797.           Then, in terminal emulation mode, pressing CONTROL-SHIFT-F0 would
  1798.           produce the string "type myfile.dat" on the screen exactly as  if
  1799.           you had typed it from the keyboard.
  1800.           
  1801.           
  1802.           
  1803.           
  1804.      4.1.9 Using the cursor keys
  1805.      
  1806.      
  1807.           BBC  KERMIT  uses  the  four  cursor  keys  in  one  of two ways,
  1808.           depending on what terminal emulation you have selected.
  1809.           
  1810.           If you have selected either a 40 character  or  an  80  character
  1811.           teletype emulation, the keys function as normal BBC Computer edit
  1812.           keys.  You  can use them in conjunction with the COPY key to edit
  1813.           lines, in exactly the same way as you would edit a BASIC program.
  1814.           
  1815.           In VT52 emulation mode, though, the cursor keys will  by  default
  1816.           produce  VT52  ESCAPE sequences that programs such as the VAX/VMS
  1817.           EDT editor expect,  and  these  are  described  below.  You  can,
  1818.           though,  specify  that  they  should  be used as BBC edit keys by
  1819.           pressing CONTROL and F4. An "E" will appear in the status line to
  1820.           remind you, and the keys will now operate as BBC edit  keys.  Any
  1821.           program  you  are running on the mainframe will not be aware that
  1822.           you have pressed a cursor  key.  To  return  to  using  VT52-mode
  1823.           cursor keys, press CONTROL and F4 once more.
  1824.           
  1825.           
  1826.           
  1827.           
  1828.      4.1.10 Pausing screen output
  1829.      
  1830.      
  1831.           You have several choices if you wish to stop output to the screen
  1832.           for  a  moment (for example to study part of a file that is being
  1833.           listed). One method uses the standard "stop scroll" mechanism  of
  1834.           the  BBC  Computer:  output will stop if you hold the CONTROL and
  1835.  
  1836.  
  1837.                                        24
  1838.  
  1839.  
  1840.  
  1841.  
  1842.                              BBC KERMIT User Guide
  1843.  
  1844.  
  1845.           SHIFT keys down together, and will resume when you release them.
  1846.           
  1847.           If you wish to hold the  screen  while  you  do  something  else,
  1848.           though,  a better method is to use BBC KERMIT's own mechanism. If
  1849.           you press the CONTROL and F3 keys once, output to the screen will
  1850.           stop. An "H" will be displayed on the  status  line  to  indicate
  1851.           that  you  have suspended output. The screen will remain as it is
  1852.           until you again press CONTROL and F3: unlike the first technique,
  1853.           this lets you move away from the machine if you wish.
  1854.           
  1855.           
  1856.           
  1857.           
  1858.      4.1.11 Returning to command mode
  1859.      
  1860.      
  1861.           At some point, particularly if you  are  going  to  perform  file
  1862.           transfers,  you  will  wish  to leave terminal emulation mode and
  1863.           return to the command screen, since  the  commands  that  perform
  1864.           file  transfer  can  be  issued only from KERMIT command mode. To
  1865.           return to command mode you should press CONTROL and F0  together:
  1866.           the BBC KERMIT command screen will reappear and you may issue any
  1867.           BBC  KERMIT  commands  you wish, and return to terminal emulation
  1868.           mode when you require.
  1869.           
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.                                        25
  1904.  
  1905.  
  1906.  
  1907.  
  1908.                              BBC KERMIT User Guide
  1909.  
  1910.  
  1911.      4.2 LOGGING OUTPUT TO A DISC FILE
  1912.      
  1913.      
  1914.         You may wish to record your terminal session in a file on disc  for
  1915.      later use: this is a convenient way of down-loading a text file from a
  1916.      mainframe  if  it does not have a KERMIT facility of its own (however,
  1917.      it is strongly recommended that you do use KERMIT  for  file  transfer
  1918.      whenever possible).
  1919.      
  1920.         Terminal  logging  must  be  initiated  from the BBC KERMIT command
  1921.      screen before  you  issue  the  CONNECT  command  to  start   terminal
  1922.      emulation. You could type, for example
  1923.      
  1924.                                 LOGGING ON MYLOG
  1925.      
  1926.      which  would  initiate logging, and open a file called MYLOG to record
  1927.      the data. At this point, though, although logging is initiated, it  is
  1928.      not active, so nothing will be sent to the file.
  1929.      
  1930.         Once  you  have entered terminal emulation mode you can activate or
  1931.      deactivate logging at will. Pressing CONTROL and F1 once will activate
  1932.      logging: any character that appears on the screen will  be  copied  to
  1933.      the  file.  Pressing CONTROL and F1 again will deactivate logging, and
  1934.      no characters will go the file. You may  repeat  this  activation  and
  1935.      de-activation  as  often  as  you wish. A "D" will appear at the right
  1936.      hand side of the status line whenever logging is active, to remind you
  1937.      that output is being sent to disc.
  1938.      
  1939.         When you have finished your terminal session, you should return  to
  1940.      the command screen by pressing CONTROL and F0, then issue the
  1941.      
  1942.                                   LOGGING OFF
  1943.      
  1944.      command  to  terminate  logging  and  close  the  file.  This  step is
  1945.      important: if you don't do it some data will be lost from the file.
  1946.      
  1947.      
  1948.         A possible sequence you could use to capture a  text  file  from  a
  1949.      mainframe would be this:
  1950.      
  1951.             1. Issue the command, for example,
  1952.                
  1953.                                LOGGING ON MYFILE
  1954.                
  1955.                to open a file and initiate logging.
  1956.                
  1957.             2. Enter terminal emulation mode with the command
  1958.                
  1959.                                     CONNECT
  1960.                
  1961.             3. Log in to the mainframe, and type the command to list a file
  1962.                to  the terminal, but don't press RETURN to send the command
  1963.                to the mainframe.
  1964.                
  1965.             4. Activate logging to the disc file by  pressing  CONTROL  and
  1966.                F1.
  1967.  
  1968.  
  1969.                                        26
  1970.  
  1971.  
  1972.  
  1973.  
  1974.                              BBC KERMIT User Guide
  1975.  
  1976.  
  1977.                
  1978.             5. Press RETURN to send the listing command to the mainframe.
  1979.                
  1980.             6. When  the  file  has  been  displayed  on  the screen, press
  1981.                CONTROL and F1 again to deactivate logging.
  1982.                
  1983.             7. Return to the BBC KERMIT command screen by pressing  CONTROL
  1984.                and F0.
  1985.                
  1986.             8. Terminate logging and close the file with the command
  1987.                
  1988.                                   LOGGING OFF
  1989.                
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.                                        27
  2036.  
  2037.  
  2038.  
  2039.  
  2040.                              BBC KERMIT User Guide
  2041.  
  2042.  
  2043.      4.3 LOGGING OUTPUT TO A PRINTER
  2044.      
  2045.      
  2046.         BBC KERMIT allows you to copy all the characters that appear on the
  2047.      screen to a printer, to give a hard copy log of a terminal session. At
  2048.      any  time  while  you  are  in  terminal mode, pressing CONTROL and F2
  2049.      together will turn on the copying of bytes to  the  printer;  pressing
  2050.      CONTROL  and F2 once more will turn it off again. A "P" will appear on
  2051.      the right of the status line whenever bytes are being  logged  to  the
  2052.      printer.
  2053.      
  2054.         An  alternative,  and  preferable way of obtaining a hard copy of a
  2055.      file on your printer is to use the file  transfer  facilities  of  BBC
  2056.      KERMIT  to  move  the  file  from  the  mainframe  to your BBC system,
  2057.      specifying that the data be sent directly to the printer with the
  2058.      
  2059.                             SET DESTINATION PRINTER
  2060.      
  2061.      command. This method, although slower, has the advantages of providing
  2062.      an error-free copy of the file, and enabling  all  possible  character
  2063.      values to be sent. The technique is further described in Chapter 5.
  2064.      
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.                                        28
  2102.  
  2103.  
  2104.  
  2105.  
  2106.                              BBC KERMIT User Guide
  2107.  
  2108.  
  2109.      4.4 SENDING A FILE TO A HOST WITHOUT KERMIT
  2110.      
  2111.         BBC  KERMIT  contains facilities to let you transfer files from BBC
  2112.      discs to another machine even if that machine does not have  a  KERMIT
  2113.      program  of  its  own.  This  facility, sometimes called "raw send" is
  2114.      controlled by the TRANSMIT command. You should note, though, that  ths
  2115.      method  offers  no  error-correction  at all, so you should always use
  2116.      KERMIT to transfer data if you can.
  2117.      
  2118.         For example, suppose you wish to transfer the contents  of  a  file
  2119.      :1.RESULTS  to a mainframe that does not have KERMIT. You can take the
  2120.      following steps:
  2121.      
  2122.             1. Use the CONNECT command to enter terminal mode, and  log  in
  2123.                to the host.
  2124.                
  2125.             2. Type  the  host  command  needed to store what you type in a
  2126.                file. Your system may have an INPUT or  CREATE  command,  or
  2127.                you  may  need  to  use  the editor to do this: if in doubt,
  2128.                consult your systems support personnel or advisory service.
  2129.                
  2130.             3. Press CONTROL and F0 to return to BBC KERMIT command mode.
  2131.                
  2132.             4. Issue the TRANSMIT command. In this example, you would type
  2133.                
  2134.                               TRANSMIT :1.RESULTS
  2135.                
  2136.                BBC KERMIT  will  now  return  to  terminal  mode,  and  the
  2137.                contents  of  file :1.RESULTS will be sent to the host, just
  2138.                as if you were typing at  the  keyboard.  In  order  not  to
  2139.                overload  the  host  system with data arriving at too high a
  2140.                rate, BBC KERMIT will pause for half-a-second after  sending
  2141.                each line of the file.
  2142.                
  2143.             5. Once the file has been sent, type whatever is needed to tell
  2144.                the host that there is no more data to go into the file, and
  2145.                carry on with your terminal session.
  2146.                
  2147.         Note that you can press ESCAPE at any time to terminate sending the
  2148.      file.  BBC KERMIT will once more take input from the keyboard, exactly
  2149.      as normal.
  2150.      
  2151.         It may sometimes happen that  your  file  contains  line-feed  (LF)
  2152.      characters   at   the   end   of  each  line  as  well  as  the  usual
  2153.      carriage-return  (CR)  characters,  and  these  can  sometimes   cause
  2154.      problems  at  the  host  end. Accordingly, BBC KERMIT lets you control
  2155.      what happens to them, as follows:
  2156.      
  2157.           If the file type you have set with the SET FILE TYPE  command  is
  2158.           ASCII  CR,  line-feed  characters in the file are ignored and not
  2159.           sent to the host.
  2160.           
  2161.           If the file type is anything else, the data in the file  is  sent
  2162.           exactly as it is, without any changes.
  2163.      
  2164.  
  2165.  
  2166.  
  2167.                                        29
  2168.  
  2169.  
  2170.  
  2171.  
  2172.                              BBC KERMIT User Guide
  2173.  
  2174.  
  2175.      4.5 VT52 KEYPAD EMULATION
  2176.      
  2177.      
  2178.         Since  the  model  B,  B+ and B+128 keyboards do not possess a VT52
  2179.      keypad, it is necessary to emulate these keys using  the  10  function
  2180.      keys.  In  VT52  terminal  emulation mode the function and cursor keys
  2181.      correspond to the VT52 keypad in the following way:
  2182.      
  2183.      
  2184.                BBC key      VT52 keypad key  ESCAPE sequence
  2185.                
  2186.                F0                  0             ESC ? p
  2187.                F1                  1             ESC ? q
  2188.                F2                  2             ESC ? r
  2189.                F3                  3             ESC ? s
  2190.                F4                  4             ESC ? t
  2191.                F5                  5             ESC ? u
  2192.                F6                  6             ESC ? v
  2193.                F7                  7             ESC ? w
  2194.                F8                  8             ESC ? x
  2195.                F9                  9             ESC ? y
  2196.                
  2197.                SHIFT-F1            PF1           ESC P
  2198.                SHIFT-F2            PF2           ESC Q
  2199.                SHIFT-F3            PF3           ESC R
  2200.                SHIFT-F4            PF4           ESC S
  2201.                SHIFT-F5            MINUS         ESC ? m
  2202.                SHIFT-F6            COMMA         ESC ? l
  2203.                SHIFT-F7            PERIOD        ESC ? n
  2204.                SHIFT-F8            ENTER         ESC ? M
  2205.                
  2206.                UP                  UP            ESC A
  2207.                DOWN                DOWN          ESC B
  2208.                RIGHT               RIGHT         ESC C
  2209.                LEFT                LEFT          ESC D
  2210.      
  2211.         Note that keys PF4, MINUS and COMMA may not exist on  a  real  VT52
  2212.      device,  although they are present and usable on a VT100 terminal that
  2213.      is operating in VT52 mode.
  2214.      
  2215.      
  2216.         The Master 128 allows you to use the above keys as  described,  but
  2217.      also  lets  you use the built-in keypad, which is considerably easier.
  2218.      The arrangement of the keys correspond to a real VT52 keypad  closely,
  2219.      and they have the following meaning:
  2220.      
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.                                        30
  2234.  
  2235.  
  2236.  
  2237.  
  2238.                              BBC KERMIT User Guide
  2239.  
  2240.  
  2241.                        ---------------------------------
  2242.                        !       !       !       !       !
  2243.                        !  PF1  !  PF2  !  PF3  !  PF4  !
  2244.                        !       !       !       !       !
  2245.                        !       !       !       !       !
  2246.                        ---------------------------------
  2247.                        !       !       !       !       !
  2248.                        !   7   !   8   !   9   ! MINUS !
  2249.                        !       !       !       !       !
  2250.                        !       !       !       !       !
  2251.                        ---------------------------------
  2252.                        !       !       !       !       !
  2253.                        !   4   !   5   !   6   !       !
  2254.                        !       !       !       !       !
  2255.                        !       !       !       !       !
  2256.                        ---------------------------------
  2257.                        !       !       !       !       !
  2258.                        !   1   !   2   !   3   ! COMMA !
  2259.                        !       !       !       !       !
  2260.                        !       !       !       !       !
  2261.                        ---------------------------------
  2262.                        !       !       !               !
  2263.                        !   0   ! PERIOD!    ENTER      !
  2264.                        !       !       !               !
  2265.                        !       !       !               !
  2266.                        ---------------------------------
  2267.                        
  2268.                        
  2269.         Note that the keypad DELETE key is not used.
  2270.      
  2271.      
  2272.         Appendix 3 details the use of the function keys with the EDT editor
  2273.      available on the VAX/VMS Operating System.
  2274.      
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.                                        31
  2300.  
  2301.  
  2302.  
  2303.  
  2304.                              BBC KERMIT User Guide
  2305.  
  2306.  
  2307.      5: TRANSFERRING FILES WITH BBC KERMIT
  2308.      
  2309.      
  2310.         The primary use of BBC KERMIT is to transfer files between it and a
  2311.      mainframe  computer,  or  between  it  and  another microcomputer. The
  2312.      methods used will be substantially the same whatever the other  system
  2313.      is,  since  any  KERMIT  system should be able to communicate with any
  2314.      other. Though the general techniques  will  be  the  same,  the  exact
  2315.      commands  used  to control the remote KERMIT will vary from one system
  2316.      to another. You will need to consult the user  guide  for  the  remote
  2317.      system  to  discover  how  it should be controlled. In this section we
  2318.      shall cover in detail how BBC KERMIT is controlled.
  2319.      
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.                                        32
  2366.  
  2367.  
  2368.  
  2369.  
  2370.                              BBC KERMIT User Guide
  2371.  
  2372.  
  2373.      5.1 PRINCIPLES
  2374.      
  2375.      
  2376.         KERMIT differs from other "dumb" file transfer systems (such as you
  2377.      might find in a terminal emulator ROM, for instance) in that  it  aims
  2378.      to  transfer files not only reliably, but also in a usable way between
  2379.      systems. Thus, if you have a program source on your BBC discs that you
  2380.      can edit with some BBC micro editor, and transfer this to a mainframe,
  2381.      the resulting file should also be editable on the mainframe's editors.
  2382.      KERMIT will resolve all the differences in how  files  are  stored  on
  2383.      your  behalf,  so  that,  in this example, the mainframe file will not
  2384.      contain extra line-feed characters at  inconvenient  places  that  the
  2385.      mainframe editors cannot handle.
  2386.      
  2387.         Transferring  files with KERMIT involves several discrete steps. We
  2388.      shall consider here the most common case of transfer  to  and  from  a
  2389.      mainframe and look at the several steps involved in a general way.
  2390.      
  2391.           1. You  start  BBC  KERMIT  is and set it up for the transfer. In
  2392.              particular, you may wish to tell it what types of file are  to
  2393.              be  moved.  You  will  also  need  to  set  the parameters for
  2394.              terminal  emulation,  and,  depending  on  the  needs  of  the
  2395.              communications  system  and the remote KERMIT, you may need to
  2396.              change some of the  more  detailed  aspects  of  BBC  KERMIT's
  2397.              operation (though this is unlikely).
  2398.              
  2399.           2. You  enter  terminal emulation mode, and log the BBC system in
  2400.              to the mainframe as though it were an ordinary terminal.
  2401.              
  2402.           3. Using the BBC system as a terminal, you start the  mainframe's
  2403.              own KERMIT program running.
  2404.              
  2405.           4. You  can  now  give  commands  to  the  mainframe KERMIT (from
  2406.              terminal emulation mode) and to the BBC  KERMIT  (from  KERMIT
  2407.              command  mode)  to transfer your files. The two KERMIT systems
  2408.              will communicate with each other  using  the  standard  KERMIT
  2409.              protocol.
  2410.              
  2411.           5. After  the  transfers are done, you can log the BBC system out
  2412.              from the mainframe.
  2413.              
  2414.         In practice, the steps taken will range up and down  this  list  as
  2415.      required.  For  example,  BBC  KERMIT parameters can be changed at any
  2416.      time, not only at the start, and if you are  moving  several  tyes  of
  2417.      file you will need to change them frequently. Also, things may be made
  2418.      much simpler if the mainframe KERMIT provides what is known as "server
  2419.      mode  operation" - we shall discuss this later. The following sections
  2420.      will discuss the various aspects of file transfer in more detail.
  2421.      
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.                                        33
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.                              BBC KERMIT User Guide
  2438.  
  2439.  
  2440.      5.2 FILE TYPE
  2441.      
  2442.      
  2443.         The most important thing  that  you  will  need  to  consider  when
  2444.      transferring  files  using  BBC  KERMIT  is the file type of the files
  2445.      involved. As we saw in the overview of KERMIT in chapter 2, one of the
  2446.      facilities that KERMIT provides is that files  are  transferred  in  a
  2447.      usable  way, with the method the sending system uses to denote the end
  2448.      of a line being automatically translated into the method the receiving
  2449.      end uses. Many operating systems (for example MS-DOS)  don't  care  at
  2450.      all  how  you  denote  the  end of a printable line, and will raise no
  2451.      objections whether your file  uses  Carriage-Return  bytes,  Line-Feed
  2452.      bytes  or  anything  else.  Mainframes,  though, are usually much more
  2453.      choosy, and can be quite perverse. Some mainframe systems store actual
  2454.      byte sequences (such as an actual Carriage-Return byte) in the file to
  2455.      mark the end of a line. Others may assume a line is finished when some
  2456.      byte such as Carriage-Return is input, but don't store the actual byte
  2457.      in the file, using instead some method  of  recording  the  number  of
  2458.      characters  in the line. And even worse, some mainframe systems expect
  2459.      you to decide what they should do - this can be  particularly  awkward
  2460.      if  you  are  transferring binary  files that don't contain printable,
  2461.      separate records anyway.
  2462.      
  2463.         The way the KERMIT system  in  general  handles  this  is  that all
  2464.      KERMITs, when sending a file, translate their own system's end-of-file
  2465.      indication  into  a standard  form.  The KERMIT that receives the file
  2466.      then knows exactly where each record ends,  and  translates  the  data
  2467.      into whatever format its system needs.
  2468.      
  2469.         Now  this  would  be perfectly simple and easy, except for the fact
  2470.      that on the BBC Computer there is no uniform way of denoting  the  end
  2471.      of a record. Each program or ROM you may use can use whatever bytes it
  2472.      likes  to  denote  the  end  of  a  record, and these are likely to be
  2473.      different.  Thus   a   file   you   produce   with   *SPOOL   contains
  2474.      Line-Feed/Carriage-Return  pairs  at  the end of a line, but a spooled
  2475.      Wordwise file contains only Carriage-Returns. There is no way  at  all
  2476.      for BBC KERMIT to know what bytes are used, so it is up to you to tell
  2477.      it by setting a "file type".
  2478.      
  2479.         How  end-of-record  is  denoted is also of importance when you move
  2480.      files to BBC KERMIT from another system. Here you will want BBC KERMIT
  2481.      to  translate  the  KERMIT  standard  end-of-record   indicator   into
  2482.      something  suitable  for  whatever  program  or  ROM  you are going to
  2483.      process the file with.
  2484.      
  2485.         In the sections below we shall look at the possible file types  you
  2486.      can  select, then examine how you can work out what the type should be
  2487.      for a particular file.
  2488.      
  2489.      
  2490.      
  2491.      
  2492.      5.2.1 Binary files
  2493.           
  2494.           
  2495.           These files contain data that is not  primarily  printable  text,
  2496.  
  2497.  
  2498.                                        34
  2499.  
  2500.  
  2501.  
  2502.  
  2503.                              BBC KERMIT User Guide
  2504.  
  2505.  
  2506.           such as SAVEd BASIC programs, machine-code programs, screen dumps
  2507.           or  *SAVEd  areas  of  memory. When you transfer these files, you
  2508.           wish every byte in the file on one system to appear unchanged  in
  2509.           the file on the other system, regardless of what it is.
  2510.           
  2511.           You  tell  BBC KERMIT that you are handling binary files with the
  2512.           command
  2513.           
  2514.                               SET FILE TYPE BINARY
  2515.           
  2516.           which tells it not to change any data that  it  either  sends  or
  2517.           receives.  You  may  need  to  issue  a comparable command to the
  2518.           remote KERMIT, to  prevent  it  trying  to  manipulate  the  data
  2519.           itself. Some remote KERMITs may not allow you to send pure binary
  2520.           data,  though,  and  you will not be able to send binary files to
  2521.           them in this case.
  2522.           
  2523.           
  2524.           
  2525.           
  2526.      5.2.2 Printable text (ASCII) files
  2527.      
  2528.      
  2529.           These files contain printable text, such  as  you  might  produce
  2530.           with  the  *BUILD command, or by spooling a BASIC program listing
  2531.           to disc. When you transfer one of these files, you will want  the
  2532.           two  KERMITs  to  translate  the  way end-of-record is indicated,
  2533.           rather than transfer every byte exactly as it is.
  2534.           
  2535.           You tell BBC KERMIT that ASCII text files are to  be  transferred
  2536.           with the
  2537.           
  2538.                               SET FILE TYPE ASCII
  2539.           
  2540.           command.  This  specifies that the files are text, but BBC KERMIT
  2541.           will also need to know how the end of a printed line is indicated
  2542.           in this file.  The  command  shown  above  sets  the  end-of-line
  2543.           indication    to   the   default   of   Line-Feed   followed   by
  2544.           Carriage-Return (LFCR), but this may not be what you require. You
  2545.           can tell BBC KERMIT your needs with a further parameter, which is
  2546.           one of the strings LFCR, CRLF, LF or CR.
  2547.           
  2548.           Thus, for example,
  2549.           
  2550.                              SET FILE TYPE ASCII CR
  2551.           
  2552.           tells  BBC  KERMIT  that  files  are  text,  and  end-of-line  is
  2553.           indicated  by  a  Carriage-Return  byte on its own. When you then
  2554.           send a file, every CR byte is translated into the internal KERMIT
  2555.           represenation of end-of-line. On receiving a file,  the  internal
  2556.           KERMIT form will be translated into a CR for you.
  2557.           
  2558.           
  2559.           
  2560.           
  2561.      
  2562.  
  2563.  
  2564.                                        35
  2565.  
  2566.  
  2567.  
  2568.  
  2569.                              BBC KERMIT User Guide
  2570.  
  2571.  
  2572.      5.2.3 How to decide on the file type to use
  2573.      
  2574.      
  2575.           There  is, unfortunately, no easy way of telling how the end of a
  2576.           printed line is denoted in a file. However, you can  inspect  the
  2577.           file with the *DUMP command with, for instance
  2578.           
  2579.                                    *DUMP FILE
  2580.           
  2581.           This (on the Acorn DFS, at any rate) will print a file in hex and
  2582.           character  form  on  the screen. You can then locate the end of a
  2583.           line of text and see what characters follow in the  hex  area  of
  2584.           the  dump:  a CR byte appears as 0D, and an LF will appear as 0A.
  2585.           In this example, if your file contained only the lines
  2586.           
  2587.                                    ABCDE
  2588.                                    FGH
  2589.                                    IJKL
  2590.                                    
  2591.           you might see the dump looking like this
  2592.           
  2593.                     0000: 41 42 43 44 45 0D 46 47  ABCDE.FG
  2594.                     0008: 48 0D 49 4A 4B 4C 0D **  H.IJKL..
  2595.           
  2596.           which would indicate that the file starts with  a  line  "ABCDE",
  2597.           terminated  by one CR byte, then has a line "FGH" terminated by a
  2598.           CR byte, then a line "IJKL" terminated with a CR byte. You  would
  2599.           then need
  2600.           
  2601.                              SET FILE TYPE ASCII CR
  2602.           
  2603.           to transfer such a file.
  2604.           
  2605.           
  2606.            The sequences you should look for in the dump are then:
  2607.           
  2608.                                    0D      CR
  2609.                                    0A      LF
  2610.                                    0D 0A   CRLF
  2611.                                    0A 0D   LFCR
  2612.                                    
  2613.           If  you  ever  encounter  a  sequence  such as 0D 0D (CR CR) this
  2614.           indicates that one line terminates with a CR, and the next  line,
  2615.           also terminating with a CR, is blank.
  2616.           
  2617.           
  2618.           Some  of the common files you will come across have the following
  2619.           file type:
  2620.                
  2621.                
  2622.                
  2623.                SAVEd BASIC               BINARY
  2624.                Spooled BASIC listings    ASCII LFCR
  2625.                Saved WORDWISE files      BINARY
  2626.                Spooled WORDWISE text     ASCII CR
  2627.                *BUILD files              ASCII CR
  2628.  
  2629.  
  2630.                                        36
  2631.  
  2632.  
  2633.  
  2634.  
  2635.                              BBC KERMIT User Guide
  2636.  
  2637.  
  2638.                ADE editor files          ASCII LFCR
  2639.                *SAVEd files              BINARY
  2640.                Machine code programs     BINARY
  2641.                
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.                                        37
  2697.  
  2698.  
  2699.  
  2700.  
  2701.                              BBC KERMIT User Guide
  2702.  
  2703.  
  2704.      5.3 SENDING EIGHT BIT DATA
  2705.      
  2706.      
  2707.         As we saw in chapter 2, characters are stored in a file in "bytes",
  2708.      and each byte consists of 8 separate binary digits or bits. Each  byte
  2709.      can  contain a number between 0 and 255, and so there are 256 possible
  2710.      characters that you can write into a file. Unfortunately, it is common
  2711.      for communications systems to let through only 7 bits from each  byte,
  2712.      using  the  eighth  bit  for their own purposes. Thus you can normally
  2713.      send only characters whose ASCII codes are in the range 0 to 127. Many
  2714.      text files on the BBC, though, and  every  binary  file  will  contain
  2715.      bytes from the whole character set, with codes from 0 to 255, so there
  2716.      is a potential problem in transferring such data correctly.
  2717.      
  2718.         KERMIT  in general has a technique for overcoming this restriction,
  2719.      by encoding characters in the range 128 to 255 into special  sequences
  2720.      that can  be  sent  down  any  communications  line. Almost all modern
  2721.      KERMITs will use  this  technique,  which  is  known  as  "eighth  bit
  2722.      prefixing",  but  you  may  encounter  an older implementation on some
  2723.      machine that does not support it. In  this  case  your  data  will  be
  2724.      garbled  in  transmission.  There  is,  regrettably, no way round this
  2725.      problem from within KERMIT, but BBC KERMIT  will  warn  you  when  the
  2726.      problem  is detected: a message "WARNING : Non ASCII data encountered"
  2727.      will appear on the display screen.
  2728.      
  2729.         In order that the amount of data sent down the  communication  line
  2730.      is  not  unnecessarily  large, there are some rules governing when BBC
  2731.      KERMIT and the remote KERMIT will perform eighth-bit-prefixing,  since
  2732.      the  technique increases the amount of data that must be sent whenever
  2733.      characters that use the eighth bit are encountered.
  2734.      
  2735.             1. If the remote system has been set up with its  own  commands
  2736.                to  ask for eighth-bit-prefixing, BBC KERMIT will always use
  2737.                it.
  2738.                
  2739.             2. If you have used the SET PARITY command to  select  a  value
  2740.                that  implies  that  only  7  data bits can be sent down the
  2741.                communication line (i.e. if you have set the value to SPACE,
  2742.                EVEN, ODD or MARK) then  BBC  KERMIT  will  attempt  to  use
  2743.                eighth-bit-prefixing. Whenever you send a file from the BBC,
  2744.                BBC   KERMIT   will   request   the  remote  system  to  use
  2745.                eighth-bit-prefixing; whenever the remote sends  a  file  to
  2746.                the BBC, BBC KERMIT will use eighth-bit-prefixing unless the
  2747.                remote KERMIT has said that it does not implement it.
  2748.                
  2749.         The status screen will tell you whether or not eighth-bit-prefixing
  2750.      is  in  use  during  a  transfer  so that you will know when you might
  2751.      expect problems.
  2752.      
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.                                        38
  2763.  
  2764.  
  2765.  
  2766.  
  2767.                              BBC KERMIT User Guide
  2768.  
  2769.  
  2770.      5.4 STARTING UP THE MAINFRAME KERMIT
  2771.      
  2772.      
  2773.         In order to run the KERMIT program on  the  mainframe  system,  you
  2774.      will  need  to  log  your  BBC  computer  in  as a terminal, using BBC
  2775.      KERMIT's terminal emulation facilities. This is described in detail in
  2776.      Chapter 4.
  2777.      
  2778.         Once you have logged in,  you  can  start  the  mainframe's  KERMIT
  2779.      program.  How this is done is of course dependent on the other system,
  2780.      but the command is probably "KERMIT" or something similar. You  should
  2781.      consult  the  user guide for the mainframe system to find exactly what
  2782.      to do.
  2783.      
  2784.         The mainframe KERMIT will certainly be able to operate as a  normal
  2785.      KERMIT  (termed non-server  mode). In this mode, you will need to give
  2786.      commands both to it and to BBC KERMIT for every file transfer (here  a
  2787.      transfer of a group of files in one go counts as one operation), which
  2788.      will  involve you in continual changes between BBC KERMIT command mode
  2789.      and terminal mode. Alternatively, more sophisticated mainframe KERMITs
  2790.      may operate in "server" mode.  Here  you  issue  one  command  to  the
  2791.      mainframe  KERMIT  (usually  "SERVER"  or something similar) to put it
  2792.      into server mode. Now you can control all operations from  BBC  KERMIT
  2793.      command  mode:  you do not need to continually switch to terminal mode
  2794.      to  give  commands  to  the  mainframe  KERMIT.  You  can  start  file
  2795.      transfers, and even, with some mainframe KERMITs, manipulate files and
  2796.      obtain  directory  listings  from  the mainframe side simply by giving
  2797.      commands to  BBC  KERMIT.  In  general,  you  should  always  set  the
  2798.      mainframe KERMIT into server mode if this is possible.
  2799.      
  2800.         The  exact  way  in which you transfer files will depend on whether
  2801.      you are talking to a server or a non-server,  and  we  shall  consider
  2802.      each in turn.
  2803.      
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.                                        39
  2829.  
  2830.  
  2831.  
  2832.  
  2833.                              BBC KERMIT User Guide
  2834.  
  2835.  
  2836.      5.5 USING BBC KERMIT WITH A REMOTE SERVER
  2837.      
  2838.      
  2839.         As  we have seen, you should put the remote KERMIT into server mode
  2840.      with a command such as "SERVER". You will then probably see a  message
  2841.      telling  you something like "use your micro's local escape sequence to
  2842.      return to command mode": the exact text (and  whether  it  appears  at
  2843.      all) depends on the remote system in use. You should press CONTROL and
  2844.      F0  together,  and BBC KERMIT will enter command mode, showing you the
  2845.      command mode screen.
  2846.      
  2847.         You can now control the whole operation  from  BBC  KERMIT  command
  2848.      mode.
  2849.      
  2850.      
  2851.      
  2852.      
  2853.      5.5.1. Sending files to a server
  2854.      
  2855.      
  2856.           To  send  a file to a server you simply use the command SEND. The
  2857.           reference  section  describes  the  use  of  the   command,   its
  2858.           side-effects and facilities, in detail, and you should consult it
  2859.           for further information.
  2860.           
  2861.           The  basic  use of the command is simple. To send, for example, a
  2862.           file called BEEBLE, you would type
  2863.           
  2864.                                   SEND BEEBLE
  2865.           
  2866.           You will now see the file  transfer  status  screen  appear,  and
  2867.           information  about  the transfer will be displayed. Normally, BBC
  2868.           KERMIT will pause for 30 seconds here - this is because it has to
  2869.           cater for the requirements  of  a  non-server  remote  system  as
  2870.           described  below.  You can either wait the full time, after which
  2871.           the transfer will start, or you can press any key  to  force  the
  2872.           transfer to begin at once. You can alter this pause period if you
  2873.           wish  with  the  SET  DELAY  command  -  this is described in the
  2874.           reference section.
  2875.           
  2876.           In this example, BBC KERMIT will ask the remote  system  to  call
  2877.           the  file  it  receives  BEEBLE.BBC  (although  the remote system
  2878.           doesn't have to if it doesn't want to or if that  isn't  a  legal
  2879.           filename  for  it  to  use).  If you wanted the file on the other
  2880.           system to be called something  else,  you  can  use  a  different
  2881.           format of the SEND command, putting
  2882.           
  2883.                        SEND BEEBLE /44d/frogspawn/pudding
  2884.           
  2885.           Here  BBC  KERMIT will ask the remote system to store the data in
  2886.           "/44d/frogspawn/pudding". You  can  put  what  you  like  in  the
  2887.           filename,  providing  that  it does not contain spaces and is not
  2888.           more than 48 characters long.
  2889.           
  2890.           Alternatively, you can make BBC KERMIT  add  a  different  suffix
  2891.           from ".BBC" when it is forming the remote file name. The command
  2892.  
  2893.  
  2894.                                        40
  2895.  
  2896.  
  2897.  
  2898.  
  2899.                              BBC KERMIT User Guide
  2900.  
  2901.  
  2902.           
  2903.                               SET FILE SUFFIX TOAD
  2904.           
  2905.           would  cause  BBC KERMIT to add ".TOAD" to the name, for example.
  2906.           The command also allows you to  stop  any  suffix  at  all  being
  2907.           added:  you  should  consult  the  reference  section for further
  2908.           details.
  2909.           
  2910.           You can, if you wish, send a group of files in one  operation  by
  2911.           specifying  "wildcard"  characters  in  the name. BBC KERMIT will
  2912.           then send all the files whose names match, one  after  the  other
  2913.           automatically.  Two different wildcard characters can be used, as
  2914.           follows:
  2915.           
  2916.           
  2917.             1. The "*" character can be used to match against any number of
  2918.                characters in the names of the files in the directory. Thus,
  2919.                if you specified a name
  2920.                
  2921.                                       B*S
  2922.                
  2923.                then files called BIRDS, BAGS, BLINKS, BUS and BS  would  be
  2924.                transferred.
  2925.                
  2926.                If  you specify a name simply as "*", then all files will be
  2927.                transferred.
  2928.                
  2929.                
  2930.             2. The "#" wildcard character can  be  used  to  match  against
  2931.                exactly  one  character  in the real filenames. Thus, if you
  2932.                specified a name
  2933.                
  2934.                                       B#G
  2935.                
  2936.                then files BUG and BIG would be transferred, but files  BANG
  2937.                and BG would not be.
  2938.                
  2939.           BBC  KERMIT  uses  the  facilities  of  the Disc Filing System to
  2940.           locate files whose names match a wildcarded one, and depending on
  2941.           its operation there may be restrictions on where you can make  it
  2942.           search. If you using the Acorn DFS or DNFS, for example, only the
  2943.           current directory is searched, so that although a wildcarded name
  2944.           such as
  2945.           
  2946.                                       DAT*
  2947.           
  2948.           is acceptable, a name such as
  2949.           
  2950.                                     :1.DAT*
  2951.           
  2952.           cannot be used, and no matching files will be found for it.
  2953.           
  2954.           
  2955.           
  2956.           
  2957.      
  2958.  
  2959.  
  2960.                                        41
  2961.  
  2962.  
  2963.  
  2964.  
  2965.                              BBC KERMIT User Guide
  2966.  
  2967.  
  2968.      5.5.2. Fetching files from a server
  2969.      
  2970.      
  2971.           Fetching files from a server is also simple. If the remote system
  2972.           has a file called GROMMET.TXT, you can move it to the BBC with
  2973.           
  2974.                                 GET GROMMET.TXT
  2975.           
  2976.           The  file  transfer  status  screen will appear, and the transfer
  2977.           will start immediately.
  2978.           
  2979.           In this example, the data will be stored in a file called GROMMET
  2980.           in the current directory and drive. If you want a different name,
  2981.           you could put, for instance,
  2982.           
  2983.                            GET GROMMET.TXT :3.B.PLUG
  2984.           
  2985.           and the data will be stored in file :3.B.PLUG.
  2986.           
  2987.           In the first example, there is of course  a  risk  that  you  may
  2988.           already have a file called GROMMET: this risk is increased if BBC
  2989.           KERMIT has to change the file name a lot to make it acceptable to
  2990.           the  Disc  Filing System. Accordingly, by default BBC KERMIT will
  2991.           try to amend the name it uses if there  is  a  clash.  Characters
  2992.           will  be  changed,  starting  from the right, into "&" characters
  2993.           until a unique name is formed. You will  be  told  whenever  this
  2994.           occurs.  If  you  wish, you can change this facility: issuing the
  2995.           command
  2996.           
  2997.                               SET FILE WARNING OFF
  2998.           
  2999.           will turn this check off, and BBC KERMIT will overwrite any  file
  3000.           whose  name  is  the  same  as  the new file, losing its original
  3001.           contents.
  3002.           
  3003.           
  3004.           Note that BBC KERMIT will transform unacceptable  names  to  make
  3005.           them  legal to the Acorn filing system standard: it will not take
  3006.           advantage of filing systems that allow, for example,  file  names
  3007.           longer than 7 characters.
  3008.           
  3009.           
  3010.           You  can  fetch a group of files from the server in one operation
  3011.           by including the remote system's wildcard character in the  name.
  3012.           The remote system will then send each file in turn automatically.
  3013.           
  3014.           
  3015.           
  3016.           
  3017.      5.5.3 Controlling a remote server
  3018.      
  3019.      
  3020.           Many  of  the  more  modern mainframe KERMITs that support server
  3021.           mode operation allow the micro KERMIT  to  perform  a  number  of
  3022.           useful  operations  on  mainframe  files  through  them.  If  the
  3023.           mainframe KERMIT you are using is one of these, you will be  able
  3024.  
  3025.  
  3026.                                        42
  3027.  
  3028.  
  3029.  
  3030.  
  3031.                              BBC KERMIT User Guide
  3032.  
  3033.  
  3034.           to  do things such as listing files and directories, deleting and
  3035.           renaming files, all with commands issued  to BBC  KERMIT  without
  3036.           the need to enter terminal emulation mode.
  3037.           
  3038.           These  operations  are  all initiated with the BBC KERMIT command
  3039.           REMOTE, which passes a request to the mainframe system  for  some
  3040.           action.  The  command  is  always  followed by some parameters to
  3041.           specify the action you are requesting, and we shall look  at  the
  3042.           various  possibilities  below.  You should note, though, that not
  3043.           all servers implement all the  facilities  described  here  (some
  3044.           implement   none   at  all),  and  some  interpret  the  commands
  3045.           differently from others. You should consult the  user  guide  for
  3046.           the server in use to see the precise details.
  3047.           
  3048.           Note here that some mainframes may take a long time to respond to
  3049.           these  commands, so that you may need to turn timeouts off if you
  3050.           have been using them.
  3051.           
  3052.           You can interrupt any REMOTE command producing a large amount  of
  3053.           output by pressing CONTROL and Z.
  3054.           
  3055.           
  3056.           
  3057.            1.  Listing a directory
  3058.                
  3059.                The command
  3060.                
  3061.                                    REMOTE DIR
  3062.                
  3063.                will  produce a directory listing from the server. The exact
  3064.                layout and selection of names will  depend  on  the  server:
  3065.                some will allow you to specify, for example
  3066.                
  3067.                                 REMOTE DIR ABC*
  3068.                
  3069.                to list all files with names starting "ABC".
  3070.                
  3071.                
  3072.                
  3073.            2.  Changing the current directory
  3074.                
  3075.                The command
  3076.                
  3077.                                    REMOTE CWD
  3078.                
  3079.                will request the server to change the default place in which
  3080.                it looks for files. Typing the command on its own will reset
  3081.                the  directory to whatever the default value is: if, though,
  3082.                you typed something like
  3083.                
  3084.                               REMOTE CWD [.SUBDIR]
  3085.                
  3086.                you would change the  directory  to  [.SUBDIR].  If  you  do
  3087.                specify a name here, BBC KERMIT will ask you for a password:
  3088.                if  your  mainframe  system requires one you should type it,
  3089.                then press RETURN. The password will not be  echoed  on  the
  3090.  
  3091.  
  3092.                                        43
  3093.  
  3094.  
  3095.  
  3096.  
  3097.                              BBC KERMIT User Guide
  3098.  
  3099.  
  3100.                screen  as  you  type.  If  your  system  does not require a
  3101.                password, simply press RETURN here.
  3102.                
  3103.                
  3104.                
  3105.            3.  Displaying a file
  3106.                
  3107.                The command
  3108.                
  3109.                                   REMOTE TYPE
  3110.                
  3111.                will display a file  owned  by  the  mainframe  on  the  BBC
  3112.                screen. You could, for example, type
  3113.                
  3114.                              REMOTE TYPE MYLIST.LIS
  3115.                
  3116.                to examine a file called MYLIST.LIS.
  3117.                
  3118.                
  3119.                
  3120.            4.  Obtaining help
  3121.                
  3122.                The command
  3123.                
  3124.                                   REMOTE HELP
  3125.                
  3126.                requests the server to display some help information to you.
  3127.                You  can  either  type  the  command  by itself, or, on some
  3128.                systems, you can specify a topic. Thus
  3129.                
  3130.                                   REMOTE HELP
  3131.                
  3132.                will normally provide you with a "first level" display, and
  3133.                
  3134.                                REMOTE HELP files
  3135.                
  3136.                for example might produce some help on the specific topic of
  3137.                "files".
  3138.                
  3139.                
  3140.                
  3141.            5.  Displaying server status
  3142.                
  3143.                Issuing the command
  3144.                
  3145.                                  REMOTE STATUS
  3146.                
  3147.                will produce  a  display  giving  details  of  the  server's
  3148.                operation.
  3149.                
  3150.                
  3151.                
  3152.            6.  Examining who is logged in
  3153.                
  3154.                Issuing the command
  3155.                
  3156.  
  3157.  
  3158.                                        44
  3159.  
  3160.  
  3161.  
  3162.  
  3163.                              BBC KERMIT User Guide
  3164.  
  3165.  
  3166.                                    REMOTE WHO
  3167.                
  3168.                will produce a list of all the users currently logged in.
  3169.                
  3170.                
  3171.                
  3172.            7.  Copying a file
  3173.                
  3174.                The command
  3175.                
  3176.                                   REMOTE COPY
  3177.                
  3178.                requests  the  server  to  copy a file on the mainframe. You
  3179.                could type, for example
  3180.                
  3181.                       REMOTE COPY LUMBER.TXT DUTCHELM.DED
  3182.                
  3183.                to copy file LUMBER.TXT to a new file called DUTCHELM.DED.
  3184.                
  3185.                
  3186.                
  3187.            8.  Renaming a file
  3188.                
  3189.                The command
  3190.                
  3191.                                  REMOTE RENAME
  3192.                
  3193.                requests the server to change the name  of  a  file  on  the
  3194.                mainframe. You could type, for instance
  3195.                
  3196.                      REMOTE RENAME /wondrous/thing /old/hat
  3197.                
  3198.                to change the name of /wondrous/thing to /old/hat.
  3199.                
  3200.                
  3201.                
  3202.            9.  Deleting a file
  3203.                
  3204.                The command
  3205.                
  3206.                                  REMOTE DELETE
  3207.                
  3208.                requests the server to delete a file on the mainframe. Thus,
  3209.                typing
  3210.                
  3211.                             REMOTE DELETE DOCTOR.WHO
  3212.                
  3213.                would delete the file DOCTOR.WHO.
  3214.                
  3215.                
  3216.                
  3217.            10. Interrogating disc space usage
  3218.                
  3219.                The command
  3220.                
  3221.                                   REMOTE SPACE
  3222.  
  3223.  
  3224.                                        45
  3225.  
  3226.  
  3227.  
  3228.  
  3229.                              BBC KERMIT User Guide
  3230.  
  3231.  
  3232.                
  3233.                requests  the  server  to report on your current disc usage.
  3234.                Some servers may allow you to specify a selection parameter:
  3235.                thus you might be able to type
  3236.                
  3237.                              REMOTE SPACE //disc99
  3238.                
  3239.                to see how much space you have available on a specific  disc
  3240.                drive.
  3241.                
  3242.                
  3243.            11. Issuing a host command
  3244.                
  3245.                The command
  3246.                
  3247.                                   REMOTE HOST
  3248.                
  3249.                requests  the  server  to  issue  a  command  to the command
  3250.                interpreter of  the  host.  The  command  to  be  issued  is
  3251.                whatever  follows  REMOTE HOST on the line: thus if you were
  3252.                to type
  3253.                
  3254.                          REMOTE HOST CREATE/DIR [.FRED]
  3255.                
  3256.                when using a VAX/VMS server, the command
  3257.                
  3258.                                CREATE/DIR [.FRED]
  3259.                
  3260.                would be issued to  the  command  interpreter  to  create  a
  3261.                directory.
  3262.                
  3263.                Note  that  care is needed in the choice of command: it must
  3264.                be one that requires no input from the  terminal,  since  of
  3265.                course, there is no terminal available to provide the input.
  3266.                
  3267.                
  3268.                
  3269.                
  3270.      5.5.4. Closing down the server
  3271.      
  3272.      
  3273.           Once you have finished moving data, you can close down the remote
  3274.           KERMIT  server.  Again, you do this from BBC KERMIT command mode.
  3275.           Typing the command
  3276.           
  3277.                                       BYE
  3278.           
  3279.           will tell the server to close down, and  your  terminal  will  be
  3280.           automatically logged out.
  3281.           
  3282.           Typing
  3283.           
  3284.                                      FINISH
  3285.           
  3286.           
  3287.  
  3288.  
  3289.  
  3290.                                        46
  3291.  
  3292.  
  3293.  
  3294.  
  3295.                              BBC KERMIT User Guide
  3296.  
  3297.  
  3298.           will  tell  the  remote  KERMIT  to cease operating, but here the
  3299.           terminal will still be logged in.
  3300.           
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.                                        47
  3357.  
  3358.  
  3359.  
  3360.  
  3361.                              BBC KERMIT User Guide
  3362.  
  3363.  
  3364.      5.6 USING BBC KERMIT WITH A REMOTE NON-SERVER
  3365.      
  3366.      
  3367.         Transferring data to  and  from  a  non-server  is  a  little  more
  3368.      complicated, since you will need to continually change from BBC KERMIT
  3369.      command  mode to terminal mode and back again. With a little practice,
  3370.      though, the technique becomes natural.
  3371.      
  3372.      
  3373.      
  3374.      
  3375.      5.6.1. Sending files to a non-server
  3376.      
  3377.      
  3378.           To send a file to a non-server you use the command SEND. However,
  3379.           unlike sending files to a server, you must also tell  the  remote
  3380.           KERMIT that a file is on its way.
  3381.           
  3382.           One means of doing this is as follows:
  3383.           
  3384.           
  3385.             1. In terminal mode, start the remote KERMIT program, and issue
  3386.                its RECEIVE command. This tells it to expect a file from BBC
  3387.                KERMIT.  The  remote system may output a message when you do
  3388.                this, but more probably it will do nothing but wait for  you
  3389.                do something.
  3390.                
  3391.             2. Press  CONTROL and F0 to return BBC KERMIT to KERMIT command
  3392.                mode.
  3393.                
  3394.             3. Issue the BBC KERMIT  SEND  command.  What  happens  now  is
  3395.                identical  to  the actions described above for sending files
  3396.                to a server: you can use the  same  wildcard  facilities  to
  3397.                select files, etc., as described in section 5.5.1.
  3398.                
  3399.                
  3400.           If  you  are transferring to another micro KERMIT, you would need
  3401.           to do this:
  3402.           
  3403.           
  3404.             1. From BBC KERMIT command mode,  issue  the  SEND  command  as
  3405.                above.
  3406.                
  3407.             2. From  the  other  micro's  command  mode,  issue its RECEIVE
  3408.                command. BBC KERMIT by default allows you 30 seconds  to  do
  3409.                this: you can change this interval if you wish. The command
  3410.                
  3411.                                   SET DELAY 10
  3412.                
  3413.                for example, changes the delay to 10 seconds.
  3414.                
  3415.                
  3416.                
  3417.      
  3418.  
  3419.  
  3420.  
  3421.  
  3422.                                        48
  3423.  
  3424.  
  3425.  
  3426.  
  3427.                              BBC KERMIT User Guide
  3428.  
  3429.  
  3430.      5.6.2. Receiving files from a non-server
  3431.      
  3432.      
  3433.           If  the  remote  KERMIT  system is not a server, you will need to
  3434.           transfer files from it by the exact reverse  of  the  above  SEND
  3435.           procedure:  all  you  need  to do is reverse the roles of the two
  3436.           machines. Thus, you could take the following steps:
  3437.           
  3438.           
  3439.             1. In terminal mode, start the remote KERMIT program, and issue
  3440.                its SEND command. This tells it to transfer a  file  to  the
  3441.                BBC  system.  There will normally be a delay before anything
  3442.                happens - the interval may be anything from  a  few  seconds
  3443.                upwards,  and is intended to let you do the next step before
  3444.                the transfer starts. On many KERMITs there will be a command
  3445.                to let you change the interval if you find it too short.
  3446.                
  3447.             2. Press CONTROL and F0 to return to BBC KERMIT command mode.
  3448.                
  3449.             3. Issue the RECEIVE command to BBC  KERMIT.  When  the  remote
  3450.                system's delay time expires, it will start to send the file.
  3451.                The  RECEIVE  command tells BBC KERMIT to sit and wait until
  3452.                this happens.
  3453.                
  3454.                
  3455.           If you are transferring files between micro systems, you could do
  3456.           
  3457.           
  3458.             1. From BBC KERMIT command mode, issue the RECEIVE command.
  3459.                
  3460.             2. On the remote system, issue the SEND command.  The  transfer
  3461.                will  start  once  the  remote  system's  delay  period  has
  3462.                expired.
  3463.                
  3464.                
  3465.           The advantage of the above approach is that you have no  need  to
  3466.           hurry  to  prepare the BBC system, since the RECEIVE command will
  3467.           leave it waiting indefinitely for  you  to  get  the  other  side
  3468.           going. You can't, though, use this method when you are talking to
  3469.           a  mainframe KERMIT, since once you issue the RECEIVE command you
  3470.           cannot enter  terminal  mode  to  issue  the  corresponding  SEND
  3471.           command to the remote system.
  3472.           
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.                                        49
  3489.  
  3490.  
  3491.  
  3492.  
  3493.                              BBC KERMIT User Guide
  3494.  
  3495.  
  3496.      5.7 TRANSFERRING DATA TO AND FROM MEMORY
  3497.      
  3498.      
  3499.         BBC  KERMIT  will transfer data not only to and from files on disc,
  3500.      but also to and from the BBC's random-access memory. BBC KERMIT  knows
  3501.      at all times the currently-defined "source" and "destination" of data,
  3502.      which  tell  it  what  to  do when sending and receiving respectively.
  3503.      Source and destination can be set to either "file"  (the  default)  or
  3504.      "memory".
  3505.      
  3506.         For example, suppose you wished to send the contents of memory from
  3507.      address &1900 to &357C inclusive to the remote system. You would issue
  3508.      the command
  3509.      
  3510.                           SET SOURCE MEMORY 1900 357D
  3511.      
  3512.      to  tell BBC KERMIT that data it sends now comes from meory instead of
  3513.      file, and also tells it where in memory. Note that the second  address
  3514.      given  is  "357D":  this  value is the last address to be transferred,
  3515.      plus one.
  3516.      
  3517.         When you now issue the SEND command, the contents of this  area  of
  3518.      memory  will  be transferred. Since there is no BBC file involved, the
  3519.      form of the SEND command  changes  slightly.  There  is  now  only one
  3520.      parameter,  which  you  must supply: this is the name of the file that
  3521.      you wish to be used on the remote system. Thus you might type
  3522.      
  3523.                                SEND /mem/contents
  3524.      
  3525.      to send the memory contents to a file "/mem/contents"  on  the  remote
  3526.      system.
  3527.      
  3528.      Bringing  data  from  the  remote  KERMIT  into the BBC memory is also
  3529.      simple. You might, for example, issue the command
  3530.      
  3531.                           SET DESTINATION MEMORY 1B00
  3532.      
  3533.      to tell BBC KERMIT that data now goes into memory, starting at address
  3534.      &1B00. Here also there is no BBC file involved, so the  forms  of  the
  3535.      GET   and  RECEIVE  commands  change  slightly.  RECEIVE  now  has  no
  3536.      parameters: all you are allowed to type is
  3537.      
  3538.                                     RECEIVE
  3539.      
  3540.      The GET command now has only one parameter, which is the name  of  the
  3541.      file you wish the remote server to send you. Thus, you would type
  3542.      
  3543.                                  GET /mem/dump
  3544.      
  3545.      to bring the contents of file "/mem/dump" into the BBC's memory.
  3546.      
  3547.      
  3548.      There  are  some  points  that  you  should  bear  in  mind when doing
  3549.      transfers to and from memory:
  3550.      
  3551.             1. The effect of the SET SOURCE and  SET  DESTINATION  commands
  3552.  
  3553.  
  3554.                                        50
  3555.  
  3556.  
  3557.  
  3558.  
  3559.                              BBC KERMIT User Guide
  3560.  
  3561.  
  3562.                persist until you specify otherwise. Thus, if you transfer a
  3563.                group  of  files  from  the remote system to BBC KERMIT, all
  3564.                will end up in the same memory area.
  3565.                
  3566.             2. BBC KERMIT has no way of knowing whether the  addresses  you
  3567.                specify are sensible: it is up to you to get them right.
  3568.                
  3569.             3. Although  no files are involved, the transfer of data to and
  3570.                from memory still obeys the settings  defined  by  the   SET
  3571.                FILE  TYPE  command. Thus if you wish to transfer the memory
  3572.                contents as unchanged binary data, you must type
  3573.                
  3574.                               SET FILE TYPE BINARY
  3575.                
  3576.                to tell BBC KERMIT this.
  3577.                
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.                                        51
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.                              BBC KERMIT User Guide
  3627.  
  3628.  
  3629.      5.8 TRANSFERRING DATA TO A PRINTER
  3630.      
  3631.      
  3632.         When you transfer a file from another system to your BBC  Computer,
  3633.      BBC KERMIT will allow you to send it directly to a printer rather than
  3634.      to disc or memory. The command
  3635.      
  3636.                             SET DESTINATION PRINTER
  3637.      
  3638.      will  select this option: after you have issued it, all files that you
  3639.      transfer with RECEIVE or GET will go directly to the printer.  Routing
  3640.      to the printer will persist until you specify another destination.
  3641.      
  3642.         This technique is very similar in result to using the terminal mode
  3643.      "log  to  printer"  facility described in chapter 4. However, terminal
  3644.      logging, since it does not use the KERMIT transfer protocols,  suffers
  3645.      from  all  the restrictions described in the introductory chapters. It
  3646.      is prone to error if you are using a noisy  communications  line,  and
  3647.      also, of course, you may not be able to transfer all the characters of
  3648.      a particular file. Using the "transfer to printer" option will let you
  3649.      accomplish  the  result  using  all  of  KERMIT's  error detection and
  3650.      transfer facilities.
  3651.      
  3652.         A little care may be needed when using this facility, especially if
  3653.      the KERMIT on the other machine is able to time out. Printers are  far
  3654.      slower  than  discs,  of  course, so it will take BBC KERMIT very much
  3655.      longer to deal with output from the other system and  acknowledge  it.
  3656.      The  other  system may expect a rapid response, and so may assume that
  3657.      the data did not arrive and start to take recovery action. You can get
  3658.      round this potential problem by either setting a very long timeout  on
  3659.      the remote system, or by disabling its time-out facility altogether.
  3660.      
  3661.         In  this  mode BBC KERMIT will treat incoming data according to the
  3662.      file type you have specified  with  the  SET FILE TYPE  command,  even
  3663.      though  no  file  is  involved.  Thus, for instance, you might need to
  3664.      specify
  3665.      
  3666.                               SET FILE TYPE BINARY
  3667.      
  3668.      if you are transferring a graphics dump to a printer. You can also use
  3669.      the file type to control whether lines of a text file  are  terminated
  3670.      with   a   Carriage-Return   and   a   Line-Feed,   or   simply  by  a
  3671.      Carriage-Return. If you have your printer set to perform an  automatic
  3672.      line feed when a Carriage-Return byte is printed, you should use
  3673.      
  3674.                              SET FILE TYPE ASCII CR
  3675.      
  3676.      otherwise, you should use
  3677.      
  3678.                             SET FILE TYPE ASCII CRLF
  3679.      
  3680.      You  should  note  here that the "printer ignore" byte set by *FX 6 is
  3681.      not used by BBC KERMIT.
  3682.      
  3683.  
  3684.  
  3685.  
  3686.  
  3687.                                        52
  3688.  
  3689.  
  3690.  
  3691.  
  3692.                              BBC KERMIT User Guide
  3693.  
  3694.  
  3695.      5.9 HANDLING PROBLEMS
  3696.      
  3697.      
  3698.         By design, KERMIT is a highly reliable file  transfer  system,  and
  3699.      performs considerably better than any "dumb capture" facility within a
  3700.      terminal  emulator.  The error-detection capabilities of KERMIT ensure
  3701.      that data is transmitted  correctly:  in  the  rare  cases  where  the
  3702.      communications system you are using is unreliable, KERMIT systems will
  3703.      abort a file transfer rather than transfer garbage.
  3704.      
  3705.         That  said,  there  are  some  cases where you may need to give BBC
  3706.      KERMIT some assistance. The most common case will arise when one  byte
  3707.      is  transmitted by one system but does not arrive at the other. KERMIT
  3708.      breaks data up into small chunks called "packets", and if the  missing
  3709.      byte  is  one of the ones that the KERMIT systems use to control these
  3710.      packets, you may end up with a machine that  is  waiting  forever  for
  3711.      something that will never arrive.
  3712.      
  3713.         The simplest way out of this possible problem is for you to keep an
  3714.      eye  on  the progress of the transfer and see when it appears to grind
  3715.      to a halt. The file transfer status display  shows  you  a  continuous
  3716.      count  of  the  packets as they are transmitted and received: normally
  3717.      the number will increment steadily. If the number does not change  for
  3718.      a  significant time (and here you must bear in mind that the mainframe
  3719.      you are talking to may  be  running  very  slowly,  so  allow  a  good
  3720.      interval  to  pass), you can press the RETURN key once. This tells BBC
  3721.      KERMIT to drop whatever it was doing, and retransmit its  last  packet
  3722.      of  data  to  the other end. If the other system was stuck waiting for
  3723.      data that had been lost, the retransmission will prod  it  into  life,
  3724.      and  the  automatic recovery mechanisms of KERMIT should allow the two
  3725.      ends to pick up the transfer from where it stopped.
  3726.      
  3727.         If you wish, you can automate this recovery by using the  "timeout"
  3728.      facility  of  BBC  KERMIT.  This  is described below in the section on
  3729.      "Advanced facilities"
  3730.      
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.                                        53
  3754.  
  3755.  
  3756.  
  3757.  
  3758.                              BBC KERMIT User Guide
  3759.  
  3760.  
  3761.      5.10 ADVANCED FACILITIES
  3762.      
  3763.      
  3764.         BBC KERMIT permits you to use  some  more  advanced  techniques  to
  3765.      control  file  transfers.  Some of these facilities involve the remote
  3766.      KERMIT system, and it is possible that you will  find  a  system  that
  3767.      does not implement them, since they are fairly recent additions to the
  3768.      KERMIT specification. However, BBC KERMIT will be able to detect this,
  3769.      and will act accordingly.
  3770.      
  3771.      
  3772.      
  3773.      
  3774.      5.10.1. Interrupting transfers
  3775.      
  3776.      
  3777.           If  you  discover  that you don't want a transfer to continue for
  3778.           some reason, you may interrupt it at  any  point  by  pressing  a
  3779.           control key. There are two possibilities here:
  3780.           
  3781.           
  3782.             1. To interrupt one file
  3783.                
  3784.                Pressing  CONTROL  and X together will interrupt the sending
  3785.                or receiving of a file. If the file was one of a group (i.e.
  3786.                you have specified  a  wildcard  character  to  one  of  the
  3787.                systems),  BBC  KERMIT  and  the remote system will carry on
  3788.                with the next file in the group.
  3789.                
  3790.             2. To interrupt a group
  3791.                
  3792.                Pressing CONTROL and Z together will interrupt  the  sending
  3793.                and  receiving of one file, as in (1) above. However, if the
  3794.                file was part of a group, the whole group is abandoned.
  3795.                
  3796.                
  3797.           As  we  saw  earlier,  transfer  interruption  uses  some  fairly
  3798.           recently  devised  KERMIT  facilities. BBC KERMIT will notify the
  3799.           remote system that you wish to interrupt the  transfer,  and  the
  3800.           remote  system will acknowledge this if it supports the facility.
  3801.           However, if it does not support the interrupt facility,  it  will
  3802.           not respond correctly. When BBC KERMIT detects this situation, it
  3803.           will  use a different method to abort the transfer, by simulating
  3804.           an irrecoverable  error.  The  transfer  will  be  terminated  as
  3805.           before,  but here the systems will not be able to carry on to the
  3806.           next file of a group, so that CONTROL-X and CONTROL-Z  will  both
  3807.           have the same effect.
  3808.           
  3809.           A  more  drastic  way  of interrupting a transfer is to press the
  3810.           CONTROL and E keys together. This causes BBC KERMIT to notify the
  3811.           remote system of an  irrecoverable  error,  which  will  cause  a
  3812.           transfer  to  be abandoned. This technique, though, should really
  3813.           only be used if the transfer is going wrong in some way.
  3814.           
  3815.           If you interrupt the reception of a file  into  BBC  KERMIT  (or,
  3816.           indeed if an error such as "Disc full" or "Can't extend" occurs),
  3817.  
  3818.  
  3819.                                        54
  3820.  
  3821.  
  3822.  
  3823.  
  3824.                              BBC KERMIT User Guide
  3825.  
  3826.  
  3827.           you  will  be left with a file on disc that contains only part of
  3828.           the data that should have been sent. By default, BBC KERMIT  will
  3829.           delete  this  partial  file  for  you.  If,  though,  you want to
  3830.           preserve whatever data has been transferred, you  can  issue  the
  3831.           command
  3832.           
  3833.                               SET INCOMPLETE KEEP
  3834.           
  3835.           after  which BBC KERMIT will close the file normally and preserve
  3836.           it. You can re-instate the normal situation at any time with  the
  3837.           command
  3838.           
  3839.                              SET INCOMPLETE DELETE
  3840.           
  3841.           
  3842.           
  3843.           
  3844.      5.10.2. Using timeouts
  3845.      
  3846.      
  3847.           As  we  saw  above, it is possible to automate the detection that
  3848.           the transfer has stopped.  This  is  done  by  defining  "timeout
  3849.           periods":  if  one or other system has not received any data when
  3850.           its timeout expires, it will try to re-establish contact with the
  3851.           other.
  3852.           
  3853.           You control the use of  timeouts  in  two  ways.  The  first  way
  3854.           enables  you  to  tell the remote system what timeout interval it
  3855.           should use when receiving data from BBC KERMIT. This  information
  3856.           is  transmitted  to  the remote system when a transfer starts. By
  3857.           default, BBC KERMIT asks the remote system to use a timeout of 30
  3858.           seconds, but you can  change  this  with  the  SET  SEND  TIMEOUT
  3859.           command.  Note,  though, that the remote system may or may not do
  3860.           as it is asked: it may not support the timeout facility;  it  may
  3861.           ignore  the  value  sent and use its own interval; or the timeout
  3862.           facility may need to be switched on by your giving it a command.
  3863.           
  3864.           BBC KERMIT can also timeout if data  does  not  arrive  from  the
  3865.           remote  system  within  a given interval. By default, the timeout
  3866.           facility is turned off,  so  BBC  KERMIT  will  never  time  out.
  3867.           Issuing the command
  3868.           
  3869.                                   SET TIMER ON
  3870.           
  3871.           will  switch  the  timeout facility on, and by default BBC KERMIT
  3872.           will time out if it has not received any data in 15 seconds.  The
  3873.           SET  RECEIVE  TIMEOUT  command  lets  you change this interval as
  3874.           required. You can turn the timeout facility off a any time with
  3875.           
  3876.                                  SET TIMER OFF
  3877.           
  3878.           
  3879.           Note that here the remote system may ask  BBC  KERMIT  to  use  a
  3880.           specified  timeout  period  when  a  transfer starts. BBC KERMIT,
  3881.           though, always ignores this request, and decides what  to  do  on
  3882.           the basis of the SET commands you have issued.
  3883.  
  3884.  
  3885.                                        55
  3886.  
  3887.  
  3888.  
  3889.  
  3890.                              BBC KERMIT User Guide
  3891.  
  3892.  
  3893.           
  3894.           
  3895.           
  3896.           
  3897.      5.10.3. File name translation
  3898.      
  3899.      
  3900.           As  the preceding sections explained, a KERMIT program that sends
  3901.           a file will pass the receiving KERMIT  a  standard-form  filename
  3902.           derived  from  the  real name. Thus, a remote system may tell BBC
  3903.           KERMIT to receive a file called
  3904.           
  3905.                                     DATA.DAT
  3906.           
  3907.           which has the "normal" format "name.type".
  3908.           
  3909.           By default, BBC KERMIT will translate  the  filenames  the  other
  3910.           system  sends  it,  in an attempt to form a name tht is legal for
  3911.           the filing system in use.  It  will  discard  the  dot  and  what
  3912.           follows it, and use the rest of the name as its basis.
  3913.           
  3914.           This  approach  is  normally exactly what you require, especially
  3915.           for mainframe-to-micro transfers. However, sometimes you  may  be
  3916.           able to control the name the remote system sends, and may be able
  3917.           to  ensure  that  it is a legal BBC filename without translation.
  3918.           For example, if you are sending a file from  one  BBC  KERMIT  to
  3919.           another, the sending command
  3920.           
  3921.                           SEND MYFILE $.PROGRAM.LIST3
  3922.           
  3923.           would pass the name "$.PROGRAM.LIST3" to the other machine - here
  3924.           you  have told  the sender the name to use rather than letting it
  3925.           generate a "name.type" form.
  3926.           
  3927.           In this case, you would tell the receiving system to use the name
  3928.           exactly as it is with the command
  3929.           
  3930.                            SET FILE NAME UNTRANSLATED
  3931.           
  3932.           command. It will  store  the  incoming  data  in  a  file  called
  3933.           $.PROGRAM.LIST3  -  it's  up to you to make sure this really is a
  3934.           legal filename.
  3935.           
  3936.           You can restore the normal translation action at  any  time  with
  3937.           the command
  3938.           
  3939.                               SET FILE NAME NORMAL
  3940.           
  3941.           
  3942.           
  3943.           
  3944.      5.10.4. Detailed protocol control
  3945.      
  3946.      
  3947.           The  rules  by which files are transferred between KERMIT systems
  3948.           are termed the "KERMIT protocol". These rules  define  in  detail
  3949.  
  3950.  
  3951.                                        56
  3952.  
  3953.  
  3954.  
  3955.  
  3956.                              BBC KERMIT User Guide
  3957.  
  3958.  
  3959.           how data should be transferred: they specify how much can be sent
  3960.           in one chunk or packet; what control sequences indicate the start
  3961.           and  end  of a packet; what character encoding is to be used, and
  3962.           so on. In almost every case you will have no need to  change  any
  3963.           of  these  settings,  since they are carefully chosen so that any
  3964.           KERMIT can communicate to any other KERMIT in  just  about  every
  3965.           circumstance.
  3966.           
  3967.           However,  it is possible that you may come across cases where you
  3968.           need to change some of the protocol values, either to improve the
  3969.           performance of  the  file  transfer  mechanism,  or  because  the
  3970.           standard settings are inappropriate and do not work.
  3971.           
  3972.           The  protocol  values  are  changed  by  the SET command, and BBC
  3973.           KERMIT  allows  you  to  change  all  the  possible  values.  The
  3974.           reference  section  details  all  the  SET commands concerned and
  3975.           their effects. A detailed discussion of the various possibilities
  3976.           is beyond the scope  of  this  user  guide,  though,  since  some
  3977.           understanding  of  the  KERMIT  protocol is needed. You will find
  3978.           this explained in the "KERMIT  Protocol  Manual"  (Edition  5  or
  3979.           later);  or  you  might  contact the systems support personnel at
  3980.           your computer centre.
  3981.      
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.                                        57
  4018.  
  4019.  
  4020.  
  4021.  
  4022.                              BBC KERMIT User Guide
  4023.  
  4024.  
  4025.      APPENDIX 1 : BBC KERMIT COMMANDS
  4026.      
  4027.      
  4028.         This  appendix  lists  in full detail all the commands available in
  4029.      BBC KERMIT. The commands are grouped in sections appropriate to  their
  4030.      usage.
  4031.      
  4032.         Throughout  the  appendix,  commands  are presented in a formal way
  4033.      that shows you exactly what you may or must type at  each  point.  For
  4034.      example, you might see a command described as having a format
  4035.      
  4036.                                SET PAUSE <number>
  4037.      
  4038.      Here  the  fixed  parts,  that  you must  type,  are shown in capitals
  4039.      (although, of course, you can type the  command  in  either  upper  or
  4040.      lower  case  if  you wish). The third part of this particular command,
  4041.      "<number>" is shown enclosed in "<>" brackets: this indicates that you
  4042.      must provide some sort of value yourself, rather than type the  actual
  4043.      word shown. The fact that the parameter is described as "number" tells
  4044.      you  that  a  number  of  some  sort is needed: the description of the
  4045.      command will tell you what sort of number, why you should  supply  it,
  4046.      and whether you could leave it out and let BBC KERMIT itself provide a
  4047.      suitable value. You shouldn't include the "<>" brackets in the command
  4048.      that you type.
  4049.      
  4050.         Thus, a valid way of typing the command in this example would be
  4051.      
  4052.                                   SET PAUSE 10
  4053.      
  4054.      where  you have supplied the numeric value "10" in the expected place.
  4055.      BBC KERMIT will always  tell  you  if  you  either  omit  a  necessary
  4056.      parameter or supply too many parameters.
  4057.      
  4058.         All  commands,  and  most  parameters,  can be abbreviated to their
  4059.      first few characters, provided that what you type uniquely  identifies
  4060.      the command or parameter you mean. The command specification will tell
  4061.      you about the few cases where parameters must always be typed in full.
  4062.      
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.                                        58
  4084.  
  4085.  
  4086.  
  4087.  
  4088.                              BBC KERMIT User Guide
  4089.  
  4090.  
  4091.      A1.1 COMMANDS FOR GENERAL CONTROL OF BBC KERMIT
  4092.      
  4093.      
  4094.         The commands listed in this section are used to control the general
  4095.      operation of BBC KERMIT.
  4096.      
  4097.      
  4098.      
  4099.      CLOSE
  4100.      
  4101.           This  command  closes  any  files  that  may  be  open.  The only
  4102.           circumstance in which this command  is  needed  is  if  you  have
  4103.           entered  BBC KERMIT when the maximum number of permitted files is
  4104.           already open: in such a case you would not be  able  to  transfer
  4105.           any data until the files were closed.
  4106.           
  4107.           The command has no parameters.
  4108.           
  4109.           Example:
  4110.           
  4111.                                      CLOSE
  4112.           
  4113.           
  4114.      DISPLAY
  4115.      
  4116.           This  command displays whatever follows it on the command line to
  4117.           the screen. It is mostly for use within TAKE files, where it  can
  4118.           be used to indicate progress, etc.
  4119.           
  4120.           The command format is:
  4121.           
  4122.                                DISPLAY <message>
  4123.           
  4124.           The parameters are:
  4125.           
  4126.           <message>
  4127.                     The   text   to  be  displayed.  Unlike  other  command
  4128.                     parameters, spaces are not taken  as  delimiters  here:
  4129.                     everything  from  the first non-space after the command
  4130.                     to the end of the line is output.
  4131.                     
  4132.           Example:
  4133.           
  4134.                              DISPLAY About to start
  4135.           
  4136.           will output "About to start" on the screen.
  4137.           
  4138.           
  4139.      EXIT
  4140.      
  4141.           This command causes BBC KERMIT to return to BASIC at the end of a
  4142.           session.
  4143.           
  4144.           The command has no parameters.
  4145.           
  4146.           
  4147.  
  4148.  
  4149.                                        59
  4150.  
  4151.  
  4152.  
  4153.  
  4154.                              BBC KERMIT User Guide
  4155.  
  4156.  
  4157.           Example:
  4158.           
  4159.                                       EXIT
  4160.           
  4161.           
  4162.      FIX
  4163.      
  4164.           This command, available in the sideways ROM version only, updates
  4165.           the default parameter table within BBC  KERMIT  with  the  values
  4166.           currently  established  with  the  SET command. Since the command
  4167.           needs write access to the address area &8000 to &BFFF  where  the
  4168.           BBC  KERMIT  code  is  held,  it can be used only if you have BBC
  4169.           KERMIT in sideways RAM.
  4170.           
  4171.           The command will ask if you are sure that you wish to do this: if
  4172.           you reply "Y" the default table will be changed. The  new  values
  4173.           will then be the defaults used when you enteR BBC KERMIT again.
  4174.           
  4175.           The command has no parameters.
  4176.           
  4177.           Example:
  4178.           
  4179.                                       FIX
  4180.           
  4181.           
  4182.      JSR
  4183.           This  command,  available in the sideway ROM version only, allows
  4184.           you to call some machine  code  routines  you  may  have  written
  4185.           yourself  and  loaded into memory. The code is entered with a JSR
  4186.           instruction and should exit with an RTS.
  4187.           
  4188.           The command format is:
  4189.           
  4190.                                  JSR <address>
  4191.           
  4192.           The parameters are as follows:
  4193.           
  4194.           <address>
  4195.                     Specifies the address of the code to be entered.
  4196.                     
  4197.           Example:
  4198.           
  4199.                                    JSR &2000
  4200.           
  4201.           enters some of your code at address &2000.
  4202.           
  4203.           
  4204.      LOAD
  4205.      
  4206.           This command loads a complete set of BBC KERMIT parameters  (i.e.
  4207.           the  values  established  by the SET command) from a file on disc
  4208.           produced by the SAVE command. You could use this command to avoid
  4209.           having to type a large number of  SET  commands  every  time  you
  4210.           start BBC KERMIT up.
  4211.           
  4212.           The command format is :
  4213.  
  4214.  
  4215.                                        60
  4216.  
  4217.  
  4218.  
  4219.  
  4220.                              BBC KERMIT User Guide
  4221.  
  4222.  
  4223.           
  4224.                                 LOAD <filename>
  4225.           
  4226.           The parameters are as follows :
  4227.           
  4228.           <filename>
  4229.                     Specifies  the  name  of  a  file  produced by the SAVE
  4230.                     command.
  4231.                     
  4232.           If the file is in the correct format, BBC KERMIT  will  load  its
  4233.           contents into memory, overwriting all the previous control values
  4234.           established by the SET command.
  4235.           
  4236.           Example :
  4237.           
  4238.                                 LOAD :1.K.PARAMS
  4239.           
  4240.           would  set  all  the  KERMIT control values from the data held in
  4241.           file :1.K.PARAMS.
  4242.           
  4243.           
  4244.      RESET
  4245.      
  4246.           This command restores all the KERMIT  control  values  (i.e.  the
  4247.           values controlled by the SET command) to the values they had when
  4248.           BBC KERMIT was started.
  4249.           
  4250.           Using  this  command enables you to instantly restore the control
  4251.           values to their initial state after changes  without  needing  to
  4252.           use the SET command.
  4253.           
  4254.           The command has no parameters.
  4255.           
  4256.           Example:
  4257.           
  4258.                                      RESET
  4259.           
  4260.           
  4261.      SAVE
  4262.      
  4263.           This  command records all the current KERMIT control values (i.e.
  4264.           the values established by the SET command) in a file on disc. You
  4265.           may subsequently use the LOAD command to re-establish  the  saved
  4266.           values.
  4267.           
  4268.           This  command  enables  you to configure BBC KERMIT to your exact
  4269.           requirements once only, record the new settings,  then,  whenever
  4270.           you  start  BBC  KERMIT  again, you can reset these values in one
  4271.           operation.
  4272.           
  4273.           The command format is :
  4274.           
  4275.                                 SAVE <filename>
  4276.           
  4277.           The parameters are :
  4278.           
  4279.  
  4280.  
  4281.                                        61
  4282.  
  4283.  
  4284.  
  4285.  
  4286.                              BBC KERMIT User Guide
  4287.  
  4288.  
  4289.           <filename>
  4290.                     This is the name of a  file  on  disc  into  which  the
  4291.                     control values will be written.
  4292.                     
  4293.           Example:
  4294.           
  4295.                                 SAVE :1.K.PARAMS
  4296.           
  4297.           will write the current control values to the file :1.K.PARAMS.
  4298.           
  4299.           
  4300.      SET BAUD
  4301.      
  4302.           This  command  allows  you to define the line speed ("baud rate")
  4303.           that BBC KERMIT will use on the RS423 port. BBC KERMIT allows you
  4304.           to set the receive and transmit rates to the same, or  different,
  4305.           values as you wish. The command format is:
  4306.           
  4307.                          SET BAUD <number> <direction>
  4308.           
  4309.           The parameters are:
  4310.           
  4311.           <number>
  4312.                     This  specifies the baud rate to be used. It can be any
  4313.                     of the baud rates supported by the BBC micro, that  is,
  4314.                     any  of the values 75, 110, 300, 1200, 2400, 4800, 9600
  4315.                     or 19200.
  4316.                     
  4317.           <direction>
  4318.                     This specifies whether you  wish  to  set  the  receive
  4319.                     rate,  the  transmit  rate,  or  both and can be one of
  4320.                     RECEIVE, TRANSMIT or BOTH. If you omit  the  parameter,
  4321.                     BBC KERMIT assumes you mean BOTH.
  4322.                     
  4323.           The command takes immediate effect. By default, BBC KERMIT uses a
  4324.           baud rate of 9600 baud for transmit and receive.
  4325.           
  4326.           Examples:
  4327.           
  4328.                                  SET BAUD 1200
  4329.           
  4330.           will set the baud rate to 1200 baud for transmit and receive.
  4331.           
  4332.           
  4333.                               SET BAUD 75 TRANSMIT
  4334.           
  4335.           will  set  the  baud  rate  to 75 baud for transmitting data, but
  4336.           leaves the receive baud rate unchanged.
  4337.           
  4338.           
  4339.      SET DEBUGGING
  4340.      
  4341.           This command allows you turn the BBC KERMIT debugging facility on
  4342.           or off. The command format is:
  4343.           
  4344.                              SET DEBUGGING <action>
  4345.  
  4346.  
  4347.                                        62
  4348.  
  4349.  
  4350.  
  4351.  
  4352.                              BBC KERMIT User Guide
  4353.  
  4354.  
  4355.           
  4356.           The parameters are:
  4357.           
  4358.           <action>
  4359.                     This must be either ON or OFF.
  4360.                     
  4361.           If debugging is on, BBC KERMIT will output information during all
  4362.           file transfers to enable you to trace errors. It will record  the
  4363.           protocol   state,  the  contents  of  all  packets  received  and
  4364.           transmitted, plus indications of its  internal  operations.  This
  4365.           information is output to the printer.
  4366.           
  4367.           When  debugging  is  on it can be suspended or activated during a
  4368.           file transfer at will. Pressing  CONTROL  and  D  when  the  file
  4369.           transfer  status  display  is  showing  will  suspend  debugging;
  4370.           pressing it again will restart it.
  4371.           
  4372.           By default, debugging is OFF.
  4373.           
  4374.           
  4375.           Example:
  4376.           
  4377.                                 SET DEBUGGING ON
  4378.           
  4379.           will turn the debugging facility ON.
  4380.           
  4381.           
  4382.      SET FLOW-CONTROL
  4383.      
  4384.           This command defines how BBC KERMIT controls the flow of data  in
  4385.           and  out  of  the  RS423  port, in order to stop either it or the
  4386.           remote system becoming overloaded.
  4387.           
  4388.           The command format is
  4389.           
  4390.                             SET FLOW-CONTROL <type>
  4391.           
  4392.           The parameters are:
  4393.           
  4394.           <type>
  4395.                     This defines the type of flow control you wish. It  can
  4396.                     be  either  XON/XOFF  if you wish flow control to be by
  4397.                     the method of sending XON and XOFF control  characters,
  4398.                     or  CTS/RTS  if  you  wish  flow  control to be done by
  4399.                     hardware signals.
  4400.                     
  4401.           The type of flow control you should select  will  depend  on  the
  4402.           system  you  are  connected  to:  consult  your  systems  support
  4403.           personnel if you are unsure what to use.
  4404.           
  4405.           By default, BBC KERMIT uses XON/XOFF flow control.
  4406.           
  4407.           
  4408.           Example:
  4409.           
  4410.                             SET FLOW-CONTROL CTS/RTS
  4411.  
  4412.  
  4413.                                        63
  4414.  
  4415.  
  4416.  
  4417.  
  4418.                              BBC KERMIT User Guide
  4419.  
  4420.  
  4421.           
  4422.           will select hardware flow control.
  4423.           
  4424.           
  4425.           
  4426.           
  4427.      SET HANDSHAKE
  4428.      
  4429.           This command specifies whether "handshaking" is  to  be  done  in
  4430.           file  transfer  mode.  This  operation is needed if BBC KERMIT is
  4431.           linked to some IBM mainframes,  and  causes  it  to  wait  for  a
  4432.           "handshake"  character  to  be  sent from the mainframe before it
  4433.           attempts to send a data packet.
  4434.           
  4435.           The command format is
  4436.           
  4437.                               SET HANDSHAKE <type>
  4438.           
  4439.           The parameters are:
  4440.           
  4441.           <type>
  4442.                     The type of handshake byte the mainframe is using.  The
  4443.                     value should be one of NONE, BELL, CR, LF, XON or XOFF.
  4444.                     The  first value specifies that no handshaking is to be
  4445.                     done: the others specify that it is  to  be  done  with
  4446.                     handshake   bytes   of   &07,  &0D,  &0A,  &11  or  &13
  4447.                     respectively.
  4448.                     
  4449.           By default, BBC KERMIT uses a value of NONE  and  handshaking  is
  4450.           not performed.
  4451.           
  4452.           Example:
  4453.           
  4454.                                SET HANDSHAKE XON
  4455.           
  4456.           will turn handshaking on, and specify that an XON byte (code &13)
  4457.           is to be used.
  4458.           
  4459.           
  4460.           
  4461.      SET MUX-WAIT
  4462.      
  4463.           This  command  is  used  in cases where the communications system
  4464.           that BBC KERMIT is connected to is slow to respond to characters.
  4465.           It causes BBC KERMIT to wait  for  a  specified  number  of  byte
  4466.           periods  before  checking that it is clear to transmit each byte.
  4467.           This delay is independent of the type of flow-control selected.
  4468.           
  4469.           The command format is:
  4470.           
  4471.                              SET MUX-WAIT <number>
  4472.           
  4473.           The parameters are:
  4474.           
  4475.           <number>
  4476.                     The number of byte periods for which  BBC  KERMIT  will
  4477.  
  4478.  
  4479.                                        64
  4480.  
  4481.  
  4482.  
  4483.  
  4484.                              BBC KERMIT User Guide
  4485.  
  4486.  
  4487.                     wait, in the range 0 to 255.
  4488.                     
  4489.           By  default, a value of 0 is used, so BBC KERMIT imposes no delay
  4490.           before transmitting each byte.
  4491.           
  4492.           Example:
  4493.           
  4494.                                  SET MUX-WAIT 1
  4495.           
  4496.           causes BBC KERMIT to delay for one  byte  period  before  testing
  4497.           that it is clear to send a character.
  4498.           
  4499.           
  4500.      SET PARITY
  4501.      
  4502.           This command lets you define how characters are sent and received
  4503.           on  the  RS423  port  in  terms  of what happens to the eighth or
  4504.           "parity" bit of each byte.
  4505.           
  4506.           The command format is
  4507.           
  4508.                                SET PARITY <type>
  4509.           
  4510.           The parameters are:
  4511.           
  4512.           <type>
  4513.                     This selects the type of parity you wish to be applied.
  4514.                     It can be one of MARK, SPACE, ODD, EVEN or NONE.
  4515.                     
  4516.           The setting of parity you select is dependent on the  system  you
  4517.           are  connected  to:  you  should  consult  your  systems  support
  4518.           personnel for advice if you are unsure of what to use.
  4519.           
  4520.           The  setting  of  parity  also  affects  how  the  file  transfer
  4521.           mechanism  copes  with  data  whose  ASCII codes are in the range
  4522.           128..255. If parity is anything other than NONE, BBC KERMIT  will
  4523.           assume  that  it  cannot send such data directly, and will try to
  4524.           arrange with the remote system to encode it in a way that can  be
  4525.           transmitted  correctly.  If  parity  is NONE, however, BBC KERMIT
  4526.           will assume that all data can be transmitted, and will  only  use
  4527.           the  encoding technique if the remote system explicitely asks for
  4528.           it. In the case of some networks this may cause confusion,  since
  4529.           the  network may not use parity, and the recommended way of using
  4530.           terminals might then be with parity NONE. However, the  mainframe
  4531.           system  itself  may  operate  with,  say,  SPACE  parity, and may
  4532.           discard the parity bit from every byte it sends or receives. This
  4533.           requires BBC KERMIT to encode bytes in the range 128..255, but if
  4534.           parity is NONE it will do this only if the other system asks  for
  4535.           it.  To  be  safe, you would normally set parity to SPACE in such
  4536.           cases.
  4537.           
  4538.           By default, BBC KERMIT sets parity to SPACE.
  4539.           
  4540.           
  4541.           Example:
  4542.           
  4543.  
  4544.  
  4545.                                        65
  4546.  
  4547.  
  4548.  
  4549.  
  4550.                              BBC KERMIT User Guide
  4551.  
  4552.  
  4553.                                 SET PARITY EVEN
  4554.           
  4555.           selects EVEN parity.
  4556.           
  4557.           
  4558.           
  4559.      SET TAKE-ECHO
  4560.      
  4561.           This command defines whether the commands that BBC  KERMIT  obeys
  4562.           from  a  TAKE  file  instead of the keyboard are displayed on the
  4563.           screen as they are executed.
  4564.           
  4565.           The command format is
  4566.           
  4567.                              SET TAKE-ECHO <action>
  4568.           
  4569.           The parameters are
  4570.           
  4571.           <action>
  4572.                     This must be either ON or OFF
  4573.                     
  4574.           Setting TAKE-ECHO to ON will cause all the commands from the TAKE
  4575.           file to be displayed on screen before they are obeyed. If  it  is
  4576.           set  to  OFF,  the  commands will be obeyed, but you will not see
  4577.           them on the screen.
  4578.           
  4579.           By default, TAKE-ECHO is ON.
  4580.           
  4581.           
  4582.           Example:
  4583.           
  4584.                                SET TAKE-ECHO OFF
  4585.           
  4586.           will turn off the display of commands from TAKE files.
  4587.           
  4588.           
  4589.           
  4590.           
  4591.      SHOW
  4592.      
  4593.           This command displays  the  values  of  all  the  KERMIT  control
  4594.           values. The display is broken up into several screens full: after
  4595.           each  screen  you are given the option of pressing the RETURN key
  4596.           to see the next screen, or the  ESCAPE  key  to  quit  and  input
  4597.           another command.
  4598.           
  4599.           The  output  of  the  SHOW  command  uses a 40 byte MODE 7 screen
  4600.           whether or not you have used the WIDTH command to  select  an  80
  4601.           byte wide command screen.
  4602.           
  4603.           The command has no parameters.
  4604.           
  4605.           Example:
  4606.           
  4607.                                       SHOW
  4608.           
  4609.  
  4610.  
  4611.                                        66
  4612.  
  4613.  
  4614.  
  4615.  
  4616.                              BBC KERMIT User Guide
  4617.  
  4618.  
  4619.           
  4620.      TAKE
  4621.      
  4622.           This  command causes BBC KERMIT to read all further commands from
  4623.           a file instead of from the keyboard. The file can be  constructed
  4624.           with  an  editor,  a  word-processing  system, or with the *BUILD
  4625.           command as you prefer.
  4626.           
  4627.           The command format is:
  4628.           
  4629.                                 TAKE <filename>
  4630.           
  4631.           The parameters are:
  4632.           
  4633.           <filename>
  4634.                     This specifies the name of a file containing BBC KERMIT
  4635.                     commands, in the same format as if they were  typed  at
  4636.                     the keyboard.
  4637.                     
  4638.           Once  you issue the TAKE command, BBC KERMIT will read characters
  4639.           from the specified file instead of the keyboard.  Any  KERMIT  or
  4640.           Operating  System  command can be issued from within a TAKE file,
  4641.           except a further  TAKE  command.  By  default,  BBC  KERMIT  will
  4642.           display  each  command on the screen as it is obeyed, but you can
  4643.           switch this echo off with the SET TAKE-ECHO command.
  4644.           
  4645.           You may stop the use of the TAKE file at any  point  by  pressing
  4646.           the  ESCAPE  key.  Execution will also stop if any command within
  4647.           the TAKE file causes  an  error,  or  if  you  interrupt  a  file
  4648.           transfer with by pressing CONTROL and Z (but not CONTROL and X).
  4649.           
  4650.           Example:
  4651.           
  4652.                                  TAKE :3.THINGS
  4653.           
  4654.           will read subsequent commands from the file :3.THINGS.
  4655.           
  4656.           
  4657.      WAIT
  4658.      
  4659.           This command, primarily used within TAKE files, causes BBC KERMIT
  4660.           to  wait before proceeding with the next command. You can specify
  4661.           an indefinite wait, or nominate a length of time: in either  case
  4662.           pressing any key will terminate the command.
  4663.           
  4664.           The command format is:
  4665.           
  4666.                                   WAIT <time>
  4667.           
  4668.           The parameters are:
  4669.           
  4670.           <time>
  4671.                     The interval in seconds for which BBC KERMIT will wait,
  4672.                     in  the  range  0  to  255.  If you omit the value, BBC
  4673.                     KERMIT waits until a key is pressed.
  4674.                     
  4675.  
  4676.  
  4677.                                        67
  4678.  
  4679.  
  4680.  
  4681.  
  4682.                              BBC KERMIT User Guide
  4683.  
  4684.  
  4685.           Example:
  4686.           
  4687.                                     WAIT 30
  4688.           
  4689.           causes BBC KERMIT to wait for 30  seconds,  or  until  a  key  is
  4690.           pressed.
  4691.           
  4692.           
  4693.           
  4694.           
  4695.      WIDTH
  4696.      
  4697.           This  command  allows you to choose between a 40 character and an
  4698.           80 character command screen. It  may  not  be  used  in  the  RAM
  4699.           version on a model B.
  4700.           
  4701.           Normally,  BBC  KERMIT  uses  a MODE 7 command screen, but if you
  4702.           wish to *TYPE a BBC file or  are  using  the  REMOTE  command  to
  4703.           obtain  information  from  a  remote  server then an 80 byte wide
  4704.           screen can be more convenient. The text colour used  for  the  80
  4705.           character screen is controlled by the SET VDU-COLOUR command, and
  4706.           the  SET TV  command  determines  whether a *TV command is issued
  4707.           automatically on changing  from  40  character  to  80  character
  4708.           screens.
  4709.           
  4710.           The command format is
  4711.           
  4712.                                  WIDTH <width>
  4713.           
  4714.           The parameters are:
  4715.           
  4716.           <width>
  4717.                     Specifies  the  width  of the command screen. The value
  4718.                     can be either 40 or 80.
  4719.                     
  4720.           By default, BBC KERMIT uses a 40 character command screen.
  4721.           
  4722.           
  4723.           Example:
  4724.           
  4725.                                     WIDTH 80
  4726.           
  4727.           selects an 80 character command screen.
  4728.           
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.                                        68
  4744.  
  4745.  
  4746.  
  4747.  
  4748.                              BBC KERMIT User Guide
  4749.  
  4750.  
  4751.           
  4752.      A1.2 COMMANDS FOR TRANSFERRING DATA
  4753.      
  4754.      
  4755.         In this section we  shall  look  at  the  detailed  format  of  the
  4756.      commands  that  you  use  to  transfer  files using BBC KERMIT, and to
  4757.      control how BBC KERMIT will perform the transfers.
  4758.      
  4759.      
  4760.      
  4761.      
  4762.      GET
  4763.      
  4764.           This command should only be used if the remote KERMIT is  running
  4765.           in  server  mode.  BBC  KERMIT  will  send  the server a command,
  4766.           requesting it to transfer a file: the effect is to "pull" a  file
  4767.           from the remote server to BBC KERMIT.
  4768.           
  4769.           The format of the command is this:
  4770.           
  4771.                          GET <remote-file> <local-file>
  4772.           
  4773.           The parameters are as follows:
  4774.           
  4775.           <remote-file>
  4776.                     This  parameter is mandatory, and specifies the name of
  4777.                     the file on the remote machine. The format of the  name
  4778.                     will,  of  course,  be  that  required  by  the  remote
  4779.                     machine.
  4780.                     
  4781.           <local-file>
  4782.                     This parameter is optional, and specifies the  name  of
  4783.                     the  file on the BBC system into which you wish data to
  4784.                     be  transferred.  This  name  may  include  drive   and
  4785.                     directory  specifications if you wish the file to be on
  4786.                     a drive and directory other than the current default.
  4787.                     
  4788.           When this command is issued, BBC KERMIT will send  a  command  to
  4789.           the  remote  server  to  pull the file from it. The transfer will
  4790.           take place automatically, and you need do nothing further.
  4791.           
  4792.           There are several points to be considered about  the  format  and
  4793.           use of the filename parameters.
  4794.           
  4795.             1. If   you  have  used  the  SET  DESTINATION  MEMORY  or  SET
  4796.                DESTINATION PRINTER commands to transfer data into the BBC's
  4797.                RAM or to a printer instead of into a  file,  you must  omit
  4798.                the <local-file> parameter.
  4799.                
  4800.             2. If  the  destination of the data is a file, and you omit the
  4801.                <local-file> parameter, BBC KERMIT will try  to  generate  a
  4802.                legal  BBC  filename from the <remote-file> you supplied. If
  4803.                this name is the same as a file that already exists, then by
  4804.                default BBC KERMIT will try to alter it until  there  is  no
  4805.                clash. The display will tell you what is happening, and give
  4806.                you  the  name  of  the  file  that  is actually going to be
  4807.  
  4808.  
  4809.                                        69
  4810.  
  4811.  
  4812.  
  4813.  
  4814.                              BBC KERMIT User Guide
  4815.  
  4816.  
  4817.                written. You may prevent this renaming  operation  with  the
  4818.                SET  FILE WARNING command: if you turn the facility off, any
  4819.                existing file will be overwritten.
  4820.                
  4821.             3. If you do specify a <local-file> parameter, then BBC  KERMIT
  4822.                will  use  this file for the received data whether or not it
  4823.                exists already. It will not attempt to rename  the  file  to
  4824.                miss an existing one.
  4825.                
  4826.             4. You  may  GET  a  group  of  files from the remote server by
  4827.                putting  that  system's   wildcard   characters   into   the
  4828.                <remote-file>. The remote server will send each file in turn
  4829.                automatically,  and  you need take no action until the group
  4830.                transfer is complete. Note that, if you do include wildcards
  4831.                in  the  <remote-file>  parameter,   you   must   omit   the
  4832.                <local-file>  parameter  or  all  the  files from the remote
  4833.                server will be placed in the same BBC file.
  4834.                
  4835.                
  4836.      RECEIVE
  4837.      
  4838.           This command should be used only  if  the  remote  KERMIT  is not
  4839.           running  in server mode, and causes BBC KERMIT to wait for a file
  4840.           transfer to be started by the remote system. You will  thus  need
  4841.           to  issue  a  SEND  command  to the other KERMIT in order to make
  4842.           something happen.
  4843.           
  4844.           The command format is this:
  4845.           
  4846.                               RECEIVE <local-file>
  4847.           
  4848.           The parameters are:
  4849.           
  4850.           <local-file>
  4851.                     This parameter is optional, and specifies the name of a
  4852.                     file on the BBC system into which you wish data  to  be
  4853.                     transferred.  It  must be a legal BBC filename, and can
  4854.                     include drive and directory specifications.
  4855.                     
  4856.           When the command is issued, BBC KERMIT will wait passively for  a
  4857.           signal  from the remote KERMIT that a file transfer is beginning.
  4858.           This signal will include the name of the file that is being sent:
  4859.           if you have included the <local-file> parameter, this name is for
  4860.           information only, and the data will be written to  the  file  you
  4861.           have identified.
  4862.           
  4863.           If  you  do  omit  the  <local-file>  parameter,  BBC KERMIT will
  4864.           attempt to  generate  a  suitable  BBC  filename  from  the  name
  4865.           supplied  by the remote system. The actions taken are the same as
  4866.           those described above in the GET command.
  4867.           
  4868.           Some points that  must  be  considered  when  using  the  RECEIVE
  4869.           command are:
  4870.           
  4871.             1. If   you  have  used  the  SET  DESTINATION  MEMORY  or  SET
  4872.                DESTINATION PRINTER commands to transfer data into the BBC's
  4873.  
  4874.  
  4875.                                        70
  4876.  
  4877.  
  4878.  
  4879.  
  4880.                              BBC KERMIT User Guide
  4881.  
  4882.  
  4883.                RAM or to a printer instead of into a  file,  you must  omit
  4884.                the <local-file> parameter.
  4885.                
  4886.             2. If  you  have  directed the remote system to send a group of
  4887.                files by including a wildcard in the  filename,  you  should
  4888.                omit the <local-file> parameter, or all the data will end up
  4889.                in  the  one  BBC  file,  each file overwriting the previous
  4890.                ones.
  4891.                
  4892.                
  4893.                
  4894.      SEND
  4895.      
  4896.      
  4897.           This command is used whether  or  not  the  remote  KERMIT  is  a
  4898.           server, and sends a file or group of files to it.
  4899.           
  4900.           The command has two possible formats:
  4901.           
  4902.                         SEND <local-file> <remote-file>
  4903.           
  4904.           used if you are transferring data from a BBC file, and
  4905.           
  4906.                                SEND <remote-file>
  4907.           
  4908.           if you are sending data from the BBC's memory.
  4909.           
  4910.           The parameters are as follows:
  4911.           
  4912.           <local-file>
  4913.                     This  parameter  specifies  the name of the file on the
  4914.                     BBC that you wish to send, and can  be  any  legal  BBC
  4915.                     filename.
  4916.                     
  4917.           <remote-file>
  4918.                     This parameter is optional if you are sending data from
  4919.                     a  file, and mandatory if you are sending data from the
  4920.                     BBC's memory. It specifies the filename that BBC KERMIT
  4921.                     will send to the remote system to  identify  the  file:
  4922.                     this  may  be  used by the remote system as the name of
  4923.                     the file that it  puts  the  data  into,  but  this  is
  4924.                     entirely  up  to  the remote system. If the filename is
  4925.                     legal for the remote system, the file would normally be
  4926.                     called by this name.
  4927.                     
  4928.           If the remote KERMIT is not running  in  server  mode,  you  must
  4929.           issue  a  RECEIVE  command to the remote system to prepare it for
  4930.           this SEND. You can either do  this  before  you  issue  the  SEND
  4931.           command,  or  you  can  issue  the  SEND first and then issue the
  4932.           RECEIVE to the other system. To  allow  you  to  do  this  latter
  4933.           option,  BBC  KERMIT  will pause after you issue the SEND command
  4934.           (by default for 30 seconds) before it  actually  starts  sending.
  4935.           You  can  change  this pause interval with the SET DELAY command;
  4936.           alternatively, pressing any key while BBC KERMIT is waiting  will
  4937.           make it start the transfer immediately.
  4938.           
  4939.  
  4940.  
  4941.                                        71
  4942.  
  4943.  
  4944.  
  4945.  
  4946.                              BBC KERMIT User Guide
  4947.  
  4948.  
  4949.           Some points to note about the SEND command are:
  4950.           
  4951.             1. If  you  omit  the  <remote-file> parameter, BBC KERMIT will
  4952.                generate a "generally acceptable" name from the <local-file>
  4953.                parameter and pass this to the remote system. It forms  this
  4954.                name    by   stripping   off   any   drive   and   directory
  4955.                specifications, then adding a filename suffix  in  the  form
  4956.                ".XXX"  to  what  remains.  By  default, the suffix added is
  4957.                ".BBC", but the SET FILE SUFFIX command allows you to change
  4958.                this, or suppress it altogether.
  4959.                
  4960.             2. You may send a group of files in one operation by  including
  4961.                the  "*"  or  "#"  wildcard  characters in <local-file>. BBC
  4962.                KERMIT will then send all files  in  the  current  directory
  4963.                whose names match. You should not specify drive or directory
  4964.                details in the name if you include wildcards: you may select
  4965.                different  drives  with  the  DFS  *DRIVE command before you
  4966.                issue  the  SEND  if  you  need  to.  You  must   omit   the
  4967.                <remote-file> name if you include wildcards in <local-file>.
  4968.                
  4969.                
  4970.                
  4971.      SET DELAY
  4972.      
  4973.           This command sets the period for which BBC KERMIT will wait after
  4974.           you issue a SEND command.
  4975.           
  4976.           The command format is
  4977.           
  4978.                                SET DELAY <number>
  4979.           
  4980.           The parameters are
  4981.           
  4982.           <number>
  4983.                     The delay in seconds, in the range 0 to 255.
  4984.                     
  4985.           When you issue a SEND command, BBC KERMIT will do nothing for the
  4986.           specified  period  to  enable  you  to issue commands to a remote
  4987.           system. You can interrupt the delay and make BBC  KERMIT  proceed
  4988.           by pressing any key.
  4989.           
  4990.           By  default, BBC KERMIT will delay for 30 seconds after you issue
  4991.           a SEND command.
  4992.           Example:
  4993.           
  4994.                                   SET DELAY 5
  4995.           
  4996.           will cause BBC KERMIT to wait after a SEND command for 5 seconds,
  4997.           or until a key is pressed.
  4998.           
  4999.           
  5000.           
  5001.      SET DESTINATION FILE
  5002.      
  5003.           This command specifies that any data received by BBC KERMIT is to
  5004.           be stored in a file, rather than placed into the BBC's memory  or
  5005.  
  5006.  
  5007.                                        72
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.                              BBC KERMIT User Guide
  5014.  
  5015.  
  5016.           sent directly to the parallel printer.
  5017.           
  5018.           The command format is
  5019.           
  5020.                               SET DESTINATION FILE
  5021.           
  5022.           This is the default condition when BBC KERMIT is entered.
  5023.           
  5024.           
  5025.           
  5026.      SET DESTINATION MEMORY
  5027.      
  5028.           This  command,  available  in  the  sideways  ROM  version  only,
  5029.           specifies that data received by BBC KERMIT is to be  placed  into
  5030.           the BBC's memory rather than being stored in a file.
  5031.           
  5032.           The command format is
  5033.           
  5034.                         SET DESTINATION MEMORY <address>
  5035.           
  5036.           The parameters are:
  5037.           
  5038.           <address>
  5039.                     This  specifies  the  address  where you want the first
  5040.                     byte received to be placed. The value must be from 1 to
  5041.                     4 hexadecimal digits, optionally preceded by  "X",  "$"
  5042.                     or "&".
  5043.                     
  5044.           After  issuing  this command, any data that you receive is placed
  5045.           in memory instead of a file. The first  byte  is  placed  at  the
  5046.           specified  address,  and  subsequent  bytes  are placed at higher
  5047.           addresses. BBC  KERMIT  will  not  allow  the  received  data  to
  5048.           overflow  into the mode 7 file transfer status display screen, so
  5049.           that the highest address available is &7BFF.
  5050.           
  5051.           BBC KERMIT makes no checks on the address supplied: it is  up  to
  5052.           you  to  ensure  that  you  direct  data to a sensible place. The
  5053.           destination for incoming data will remain the BBC's memory  until
  5054.           you specify otherwise.
  5055.           
  5056.           Note  that BBC KERMIT will process the data received according to
  5057.           the currently defined file type, even though the  destination  is
  5058.           not a file.
  5059.           
  5060.           The default condition for BBC KERMIT is to place data in files.
  5061.           
  5062.           
  5063.           The RAM version of BBC KERMIT always uses destination FILE.
  5064.           
  5065.           
  5066.           Example:
  5067.           
  5068.                           SET DESTINATION MEMORY 1900
  5069.           
  5070.           will  cause  incoming  data  to go to memory, starting at address
  5071.           &1900 (the default value of PAGE for Acorn DFS systems).
  5072.  
  5073.  
  5074.                                        73
  5075.  
  5076.  
  5077.  
  5078.  
  5079.                              BBC KERMIT User Guide
  5080.  
  5081.  
  5082.           
  5083.           
  5084.           
  5085.      SET DESTINATION PRINTER
  5086.      
  5087.           This command specifies that data received by BBC KERMIT is to  be
  5088.           transferred directly to a printer rather that stored in a file or
  5089.           in memory.
  5090.           
  5091.           The command format is
  5092.           
  5093.                             SET DESTINATION PRINTER
  5094.           
  5095.           The  default  condition  is  for BBC KERMIT to transfer data into
  5096.           files.
  5097.           
  5098.           Note that BBC KERMIT will process the data received according  to
  5099.           the currently defined file type, even though no file is involved.
  5100.           
  5101.           
  5102.           
  5103.      SET INCOMPLETE
  5104.      
  5105.           This  command  defines  what  BBC  KERMIT  will  do if either you
  5106.           interrupt the reception of a file, or if an error occurs while  a
  5107.           file is being received.
  5108.           
  5109.           The command format is
  5110.           
  5111.                             SET INCOMPLETE <action>
  5112.           
  5113.           The parameters are
  5114.           
  5115.           <action>
  5116.                     This must be either KEEP or DELETE.
  5117.                     
  5118.           If  the  action is set to DELETE, BBC KERMIT will delete any file
  5119.           whose reception is interrupted and is  thus  incomplete.  If  the
  5120.           action  is  set to KEEP, BBC KERMIT will close the file normally,
  5121.           and you will be able to use whatever data was received before the
  5122.           interruption or error.
  5123.           
  5124.           By default, BBC KERMIT will DELETE an incomplete file.
  5125.           
  5126.           Example:
  5127.           
  5128.                               SET INCOMPLETE KEEP
  5129.           
  5130.           causes BBC KERMIT to leave an incomplete file on the  disc  after
  5131.           the transfer.
  5132.           
  5133.           
  5134.           
  5135.      
  5136.  
  5137.  
  5138.  
  5139.  
  5140.                                        74
  5141.  
  5142.  
  5143.  
  5144.  
  5145.                              BBC KERMIT User Guide
  5146.  
  5147.  
  5148.      SET FILE BUFFER-SIZE
  5149.      
  5150.           This command, available in the sideways ROM version only, defines
  5151.           the size of buffer BBC KERMIT uses when reading or writing files.
  5152.           
  5153.           The command format is
  5154.           
  5155.                          SET FILE BUFFER-SIZE <number>
  5156.           
  5157.           The parameters are:
  5158.           
  5159.           <number>
  5160.                     This  specifies  the  size  of  the buffer, in 256 byte
  5161.                     pages. It must be a value from 1 to 64.
  5162.                     
  5163.           BBC KERMIT uses the file buffer to read and write files in  large
  5164.           chunks,  which  can  improve  performance in some cases. However,
  5165.           with large buffers, although BBC KERMIT  will  access  the  discs
  5166.           less  frequently, it will take longer when it does, so the remote
  5167.           KERMIT may mistakenly think that contact has been lost.  If  this
  5168.           occurs, the buffer size can be reduced.
  5169.           
  5170.           By default, BBC KERMIT uses a buffer of 16 pages (4K bytes).
  5171.           
  5172.           The  RAM  version of BBC KERMIT uses a file buffer of 8 pages (2K
  5173.           bytes).
  5174.           
  5175.           
  5176.           Example:
  5177.           
  5178.                              SET FILE BUFFER-SIZE 1
  5179.           
  5180.           changes the file buffer to be 1 256 byte page long.
  5181.           
  5182.           
  5183.           
  5184.           
  5185.           
  5186.      SET FILE SUFFIX
  5187.      
  5188.           This command defines the characters that BBC KERMIT will add to a
  5189.           BBC filename when generating a "generally acceptable" filename to
  5190.           send to the remote system.
  5191.           
  5192.           The command format is
  5193.           
  5194.                             SET FILE SUFFIX <string>
  5195.           
  5196.           The parameters are
  5197.           
  5198.           <string>
  5199.                     This is the suffix you wish added, consisting of up  to
  5200.                     8  characters.  The  "."  is not part of the suffix and
  5201.                     should not be included.
  5202.                     
  5203.           BBC  KERMIT  will,  when  generating  a  "generally   acceptable"
  5204.  
  5205.  
  5206.                                        75
  5207.  
  5208.  
  5209.  
  5210.  
  5211.                              BBC KERMIT User Guide
  5212.  
  5213.  
  5214.           filename,  take  the  final  part of the BBC filename, add a ".",
  5215.           then add the suffix defined by this command.  This  command  lets
  5216.           you  change the suffix to suit your requirements. If you omit the
  5217.           string, BBC KERMIT will not add anything to the BBC  filename  at
  5218.           all (not even the ".")
  5219.           
  5220.           By default, the suffix added to the BBC filename is "BBC".
  5221.           
  5222.           
  5223.           Examples:
  5224.           
  5225.                               SET FILE SUFFIX ADE
  5226.           
  5227.           will  cause  BBC  KERMIT  to  add ".ADE" to BBC filenames for the
  5228.           remote name.
  5229.           
  5230.                                 SET FILE SUFFIX
  5231.           
  5232.           will cause it not to add anything at all to the BBC filename.
  5233.           
  5234.           
  5235.           
  5236.      SET FILE NAME
  5237.      
  5238.           
  5239.           This command controls how BBC KERMIT handles the  filename  given
  5240.           it by a remote system when it is receiving a file.
  5241.           
  5242.           The command format is
  5243.           
  5244.                              SET FILE NAME <action>
  5245.           
  5246.           The parameters are
  5247.           
  5248.           <action>
  5249.                     This can be one of NORMAL or UNTRANSLATED.
  5250.                     
  5251.           If  you set the action to NORMAL, BBC KERMIT will assume that the
  5252.           name given by the remote  system  has  the  standard  "name.type"
  5253.           form,  and will generate a BBC filename from it. If the action is
  5254.           UNTRANSLATED, BBC KERMIT will use the exact name  to  create  the
  5255.           file: it is up to you to ensure that what the remote system gives
  5256.           it really is a valid BBC file name.
  5257.           
  5258.           By  default,  BBC  KERMIT  will  translate  filenames sent by the
  5259.           remote system. (action NORMAL).
  5260.           
  5261.           Example:
  5262.           
  5263.                            SET FILE NAME UNTRANSLATED
  5264.           
  5265.           causes BBC KERMIT to use the name sent exactly as it is.
  5266.           
  5267.           
  5268.           
  5269.      
  5270.  
  5271.  
  5272.                                        76
  5273.  
  5274.  
  5275.  
  5276.  
  5277.                              BBC KERMIT User Guide
  5278.  
  5279.  
  5280.      SET FILE TYPE ASCII
  5281.      
  5282.           This command  tells  BBC  KERMIT  that  files  it  transmits  and
  5283.           receives  are  to taken as containing printable ASCII text and to
  5284.           transform them accordingly.
  5285.           
  5286.           The command format is
  5287.           
  5288.                        SET FILE TYPE ASCII <end-of-line>
  5289.           
  5290.           The parameters are
  5291.           
  5292.           <end-of-line>
  5293.                     This optional parameter tells BBC KERMIT how a file you
  5294.                     are sending denotes the end of a line of text,  or  how
  5295.                     you  wish  this to be denoted in a file you receive. It
  5296.                     can be one of LFCR, CRLF, CR or LF, where LF stands for
  5297.                     the Line Feed character, and CR for Carriage Return. If
  5298.                     you omit the parameter, BBC KERMIT assumes LFCR.
  5299.                     
  5300.           After  using  this  command,  BBC  KERMIT  treats  all  files  as
  5301.           containing  printable  ASCII  text,  with  the  end  of each line
  5302.           indicated by the specified sequence of control  characters.  When
  5303.           sending  a  file,  it  will  transform  every  occurrence  of the
  5304.           specified  sequence  into  KERMIT's  standard   "end   of   line"
  5305.           indicator,  and  the  remote  KERMIT should then change this into
  5306.           whatever the standard representation of end-of-line is on its own
  5307.           system. When  receiving  files,  BBC  KERMIT  will  change  every
  5308.           occurrence  of  the  standard KERMIT indicator into the specified
  5309.           sequence of bytes.
  5310.           
  5311.           Note  that  this  command  has  effect  even  if  the  source  or
  5312.           destination  of  data  is memory rather than files. Also, you may
  5313.           need to give an equivalent command to the remote KERMIT system to
  5314.           make it treat the data correctly.
  5315.           
  5316.           By default, BBC KERMIT treats files as ASCII, with  end  of  line
  5317.           indicated by LFCR bytes.
  5318.           
  5319.           Example:
  5320.           
  5321.                              SET FILE TYPE ASCII CR
  5322.           
  5323.           specifies  a file type of ASCII, with lines being terminated with
  5324.           a CR (&0D) byte.
  5325.           
  5326.           
  5327.           
  5328.      SET FILE TYPE BINARY
  5329.      
  5330.           This command tells BBC KERMIT that all files it receives or sends
  5331.           should be treated as containing binary data.
  5332.           
  5333.           The command format is
  5334.           
  5335.                               SET FILE TYPE BINARY
  5336.  
  5337.  
  5338.                                        77
  5339.  
  5340.  
  5341.  
  5342.  
  5343.                              BBC KERMIT User Guide
  5344.  
  5345.  
  5346.           
  5347.           After using this command, BBC KERMIT will transmit the bytes from
  5348.           a file exactly as they are, and will  not  change  any  of  them.
  5349.           Similarly,  the  data it receives will be written to file with no
  5350.           alteration.
  5351.           
  5352.           Note  that  this  command  has  effect  even  if  the  source  or
  5353.           destination  of  data is the BBC's memory or the parallel printer
  5354.           rather than a file. Also, you may  need  to  give  an  equivalent
  5355.           command  to  the  remote  KERMIT system to make it treat the data
  5356.           correctly.
  5357.           
  5358.           By default, BBC KERMITs treats files as ASCII text.
  5359.           
  5360.           
  5361.           Example:
  5362.           
  5363.                               SET FILE TYPE BINARY
  5364.           
  5365.           makes BBC KERMIT treat files as containing binary data.
  5366.           
  5367.           
  5368.           
  5369.      SET FILE WARNING
  5370.      
  5371.           This command specifies the action that BBC KERMIT  must  take  on
  5372.           receiving  a  file  if  the name it tries to store the data under
  5373.           clashes with that of an existing file.
  5374.           
  5375.           The command format is
  5376.           
  5377.                            SET FILE WARNING <action>
  5378.           
  5379.           The parameters are
  5380.           
  5381.           <action>
  5382.                     This must be either ON or OFF.
  5383.                     
  5384.           If the file warning facility is ON, BBC KERMIT will check whether
  5385.           the name it wishes to use to store incoming data clashes with  an
  5386.           existing  file  name.  If  it does, a warning is displayed on the
  5387.           screen, and BBC KERMIT will change the  right-most  character  of
  5388.           the  name  to  a  "+" and check again. If this still clashes, the
  5389.           next right-most characer is changed, and so  on.  An  error  will
  5390.           occur  if  no  unique name is found by the time the name has been
  5391.           changed to be entirely "+" characters.
  5392.           
  5393.           If file warning is OFF, BBC  KERMIT  will  make  no  checks.  Any
  5394.           existing file will be overwritten with the new data.
  5395.           
  5396.           By default, file warning is ON.
  5397.           
  5398.           
  5399.           Example:
  5400.           
  5401.                               SET FILE WARNING OFF
  5402.  
  5403.  
  5404.                                        78
  5405.  
  5406.  
  5407.  
  5408.  
  5409.                              BBC KERMIT User Guide
  5410.  
  5411.  
  5412.           
  5413.           turns off the file warning facility.
  5414.           
  5415.           
  5416.           
  5417.      SET RECEIVE TIMEOUT
  5418.      
  5419.           This  command  defines  the  interval after which BBC KERMIT will
  5420.           take action if it has received no data from the remote system.
  5421.           
  5422.           The command format is
  5423.           
  5424.                          SET RECEIVE TIMEOUT <interval>
  5425.           
  5426.           The parameters are
  5427.           
  5428.           <interval>
  5429.                     Specifies the timeout period in seconds, in the range 0
  5430.                     to 255.
  5431.                     
  5432.           The command defines the timeout that BBC KERMIT is to use.  Note,
  5433.           though,  that  BBC  KERMIT  will  not  perform any timeout at all
  5434.           unless you have used the SET TIMER command to turn  the  facility
  5435.           on - by default it is OFF.
  5436.           
  5437.           The  choice  of  the  timeout period will depend on many factors.
  5438.           Regard should be paid to how fast the remote system is running  -
  5439.           if it is mainframe, it could be running slowly due to heavy use -
  5440.           and  also to the delays that operating over a network may impose.
  5441.           Care should be taken not to set the value too low, or BBC  KERMIT
  5442.           will repeatedly timeout unnecessarily.
  5443.           
  5444.           By default, a timeout interval of 15 seconds is set.
  5445.           
  5446.           Example:
  5447.           
  5448.                              SET RECEIVE TIMEOUT 10
  5449.           
  5450.           causes  BBC  KERMIT to timeout if no data has been received after
  5451.           10 seconds, providing that the timeout facility is turned on.
  5452.           
  5453.           
  5454.      SET SEND TIMEOUT
  5455.      
  5456.           This command sets the timeout interval that BBC KERMIT  asks  the
  5457.           remote system to use. The remote system should timeout if no data
  5458.           has been received from BBC KERMIT after this interval.
  5459.           
  5460.           The command format is
  5461.           
  5462.                           SET SEND TIMEOUT <interval>
  5463.           
  5464.           The parameters are
  5465.           
  5466.           <interval>
  5467.                     specifies  the  interval  required  in  seconds, in the
  5468.  
  5469.  
  5470.                                        79
  5471.  
  5472.  
  5473.  
  5474.  
  5475.                              BBC KERMIT User Guide
  5476.  
  5477.  
  5478.                     range 0 to 94.
  5479.                     
  5480.           BBC KERMIT will pass this value  to  the  remote  system  at  the
  5481.           beginning  of  every  file  transfer.  Note,  though,  that it is
  5482.           entirely up to the remote system  whether  it  uses  this  value,
  5483.           ignores  it, or uses a value of its own. You may need to give the
  5484.           remote system commands to turn its timeout facility on.
  5485.           
  5486.           By default, BBC KERMIT requests the remote  system  to  time  out
  5487.           after 15 seconds.
  5488.           
  5489.           Example
  5490.           
  5491.                               SET SEND TIMEOUT 10
  5492.           
  5493.           causes  BBC  KERMIT to ask the remote system to time out after 10
  5494.           seconds if no data has been received from the BBC system
  5495.           
  5496.           
  5497.           
  5498.      SET SOURCE FILE
  5499.      
  5500.           This  command,  available  in  the  sideways  ROM  version  only,
  5501.           specifies  that  data  transmitted  to the remote system is taken
  5502.           from files rather than the BBC's memory.
  5503.           
  5504.           The command format is
  5505.           
  5506.                                 SET SOURCE FILE
  5507.           
  5508.           This is the default condition when BBC KERMIT is entered.
  5509.           
  5510.           The RAM version of BBC KERMIT always uses source FILE.
  5511.           
  5512.           
  5513.      SET SOURCE MEMORY
  5514.      
  5515.           This command, available in the sideways ROM version only,  causes
  5516.           data  transmitted to the remote system to be taken from the BBC's
  5517.           memory rather than from files.
  5518.           
  5519.           The command format is
  5520.           
  5521.                 SET SOURCE MEMORY <start-address> <end-address>
  5522.           
  5523.           The parameters are
  5524.           
  5525.           <start-address>
  5526.                     Specifies  the  address  of  the  first  byte   to   be
  5527.                     transferred.  The value must be from 1 to 4 hexadecimal
  5528.                     digits, optionally preceded by "X", "$" or "&".
  5529.                     
  5530.           <end-address>
  5531.                     Specifies  the  address  of  the  last   byte   to   be
  5532.                     transferred  plus  one.  The  value must be from 1 to 4
  5533.                     hexadecimal digits, optionally preceded by "X", "$"  or
  5534.  
  5535.  
  5536.                                        80
  5537.  
  5538.  
  5539.  
  5540.  
  5541.                              BBC KERMIT User Guide
  5542.  
  5543.  
  5544.                     "&".
  5545.                     
  5546.           After  issuing  this  command, BBC KERMIT will send data from the
  5547.           BBC's memory instead of from a file. the area  of  memory  to  be
  5548.           transmitted is defined by the two command parameters: it is up to
  5549.           you to ensure that the addresses are sensible.
  5550.           
  5551.           Note  that  BBC  KERMIT  will  still process the data transmitted
  5552.           according to the defined file type, even  though  the  source  of
  5553.           data is not a file.
  5554.           
  5555.           By default, BBC KERMIT will use source FILE.
  5556.           
  5557.           The RAM version of BBC KERMIT always uses source FILE.
  5558.           
  5559.           Example
  5560.           
  5561.                           SET SOURCE MEMORY 1B00 3200
  5562.           
  5563.           will  cause  BBC KERMIT to send the data between memory addresses
  5564.           &1B00 and &31FF inclusive in a SEND command.
  5565.           
  5566.           
  5567.           
  5568.           
  5569.      SET TIMER
  5570.      
  5571.           This command controls whether BBC KERMIT will timeout if no  data
  5572.           is  received  from the remote system after the timeout period has
  5573.           expired.
  5574.           
  5575.           The command format is
  5576.           
  5577.                                SET TIMER <action>
  5578.           
  5579.           The parameters are
  5580.           
  5581.           <action>
  5582.                     This must be either ON or OFF.
  5583.                     
  5584.           If the timer facility is turned ON, BBC KERMIT will use the value
  5585.           defined by SET RECEIVE TIMEOUT to time the remote system out.  If
  5586.           it  is  OFF,  the  value is ignored, and BBC KERMIT will wait for
  5587.           ever for data.
  5588.           
  5589.           By default, the timer is OFF.
  5590.           
  5591.           Example
  5592.           
  5593.                                   SET TIMER ON
  5594.           
  5595.           turns the timeout facility on.
  5596.           
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.                                        81
  5603.  
  5604.  
  5605.  
  5606.  
  5607.                              BBC KERMIT User Guide
  5608.  
  5609.  
  5610.           
  5611.      A1.3: COMMANDS FOR TERMINAL EMULATION
  5612.      
  5613.      
  5614.      
  5615.         In this section we shall consider the commands that you can use  to
  5616.      control the terminal emulation facilities of BBC KERMIT.
  5617.      
  5618.      
  5619.      
  5620.      
  5621.      CONNECT
  5622.      
  5623.           This  command  changes BBC KERMIT from command mode into terminal
  5624.           emulation mode. Once you have issued the command the screen  will
  5625.           clear  and  will  become  a  40  character  or  80 character wide
  5626.           terminal screen. From this point, anything you type will  not  be
  5627.           examined  by  BBC  KERMIT, but will be sent directly to the RS423
  5628.           output and the system you are linked to.
  5629.           
  5630.           You may now operate your BBC micro as  if  it  were  an  ordinary
  5631.           terminal.  Depending on how you have set up BBC KERMIT, this will
  5632.           be either an ordinary teletype device, or one compatible with the
  5633.           DEC VT52 standard.
  5634.           
  5635.           At any time you can return to KERMIT command mode by pressing the
  5636.           CONTROL and F0 keys together. You will  then  be  able  to  issue
  5637.           KERMIT  commands  as  before: the CONNECT command will re-instate
  5638.           you as a terminal at the point where you left off.
  5639.           
  5640.           Note that if you have  selected  a  terminal  type  that  is  not
  5641.           possible (for exaple, you have selected a VT52 in the RAM version
  5642.           on  a  model  B),  the  command  will  produce  an  error message
  5643.           "Terminal not supported"
  5644.           
  5645.           The command has no parameters.
  5646.           
  5647.           Example:
  5648.           
  5649.                                     CONNECT
  5650.           
  5651.           
  5652.           Whenever you  enter  terminal  mode  with  the  CONNECT  command,
  5653.           printer  logging  will  be off, disc logging will be deactivated,
  5654.           and any pause you may  have  placed  on  screen  output  will  be
  5655.           lifted.
  5656.           
  5657.           
  5658.           
  5659.      LOGGING
  5660.      
  5661.           This  command  is  used to initiate or terminate terminal session
  5662.           logging, the facility by which all characters  appearing  on  the
  5663.           screen in terminal mode are also written to a file.
  5664.           
  5665.           The command has two formats:
  5666.  
  5667.  
  5668.                                        82
  5669.  
  5670.  
  5671.  
  5672.  
  5673.                              BBC KERMIT User Guide
  5674.  
  5675.  
  5676.           
  5677.                              LOGGING ON <filename>
  5678.           or
  5679.                                   LOGGING OFF
  5680.           
  5681.           
  5682.           The  first  format initiates terminal session logging and opens a
  5683.           file of name <filename>. The second format terminates logging and
  5684.           closes the file.
  5685.           
  5686.           When you use the command to initiate  logging,  BBC  KERMIT  will
  5687.           open  a  file  on  disc  in  readiness. At this point, though, no
  5688.           logging will take place. To cause characters to be written to the
  5689.           files, you will need to  press  the  CONTROL  and  F1  keys  from
  5690.           terminal  mode  (i.e.  after  using  the  CONNECT  command).  Now
  5691.           characters appearing on screen will be written  to  the  further.
  5692.           Pressing  CONTROL and F1 again will stop logging; a further press
  5693.           will restart it, and so on.
  5694.           
  5695.           You should remember to always use the
  5696.           
  5697.                                   LOGGING OFF
  5698.           
  5699.           command when you have finished, or you may lose  some  data  that
  5700.           has not yet been written to the disc.
  5701.           
  5702.           
  5703.           Example:
  5704.           
  5705.                                LOGGING ON LOGFILE
  5706.           
  5707.           opens a file LOGFILE for terminal logging.
  5708.           
  5709.           
  5710.      SET IGNORE
  5711.      
  5712.           This command nominates one character that will be totally ignored
  5713.           when it is received from the host.
  5714.           
  5715.           The command format is
  5716.           
  5717.                               SET IGNORE <number>
  5718.           
  5719.           The parameters are:
  5720.           
  5721.           <number>
  5722.                     The numeric code of the character to be ignored. If you
  5723.                     omit  the value, any previous setting will be cancelled
  5724.                     and all characters will be actioned.
  5725.                     
  5726.           By default, BBC KERMIT will display  all  characters  with  ASCII
  5727.           codes  greater  than  31,  and  also  the  CR, LF, DEL, BS and FF
  5728.           control codes. TAB  characters  are  expanded  into  spaces,  and
  5729.           ESCAPE  is  either  displayed  or taken as starting a VT52 ESCAPE
  5730.           sequence. All other characters are always ignored.
  5731.           
  5732.  
  5733.  
  5734.                                        83
  5735.  
  5736.  
  5737.  
  5738.  
  5739.                              BBC KERMIT User Guide
  5740.  
  5741.  
  5742.           
  5743.           Example:
  5744.           
  5745.                                  SET IGNORE &7F
  5746.           
  5747.           causes the DEL character (code &7F) to be  ignored  if  the  host
  5748.           sends it.
  5749.           
  5750.           
  5751.      SET KEY-CLICK
  5752.      
  5753.           This  command  controls  whether  an  audible  click  is produced
  5754.           whenever you press a key in terminal emulation mode.
  5755.           
  5756.           The command format is
  5757.           
  5758.                              SET KEY-CLICK <action>
  5759.           
  5760.           The parameters are:
  5761.           
  5762.           <action>
  5763.                     This must be either ON or OFF
  5764.                     
  5765.           Setting key-click to ON will cause a click to be produced whenver
  5766.           you press a key.
  5767.           
  5768.           By default, key-click is OFF.
  5769.           
  5770.           
  5771.           Example
  5772.           
  5773.                                 SET KEY-CLICK ON
  5774.           
  5775.           will turn the audible key-click ON.
  5776.           
  5777.            
  5778.      
  5779.      SET LOCAL-ECHO
  5780.      
  5781.           This command lets you define  how  characters  you  type  on  the
  5782.           keyboard  in  terminal  emulation mode are to be displayed on the
  5783.           screen. When you press a key, the character is sent to the remote
  5784.           system,  which  may  then  echo   it   back   to   your   screen.
  5785.           Alternatively,  it  may  not  perform this echo: in this case BBC
  5786.           KERMIT must put the character on the screen itself.
  5787.           
  5788.           The command format is
  5789.           
  5790.                             SET LOCAL-ECHO <action>
  5791.           
  5792.           The parameters are:
  5793.           
  5794.           <action>
  5795.                     This must be either ON or OFF
  5796.                     
  5797.           If local echo is ON, BBC KERMIT itself will display characters on
  5798.  
  5799.  
  5800.                                        84
  5801.  
  5802.  
  5803.  
  5804.  
  5805.                              BBC KERMIT User Guide
  5806.  
  5807.  
  5808.           the screen. If it is OFF, the remote system is expected  to  echo
  5809.           each character back as you type it.
  5810.           
  5811.           By default, local echo is OFF.
  5812.           
  5813.           
  5814.           Example
  5815.           
  5816.           
  5817.                                SET LOCAL-ECHO ON
  5818.           
  5819.           will turn local echo on.
  5820.           
  5821.           
  5822.      SET TERMINAL
  5823.      
  5824.           This  command allows you to select the type of terminal emulation
  5825.           you reuire in terminal mode.
  5826.           
  5827.           The command format is
  5828.           
  5829.                               SET TERMINAL <type>
  5830.           
  5831.           
  5832.           The parameters are:
  5833.           
  5834.           
  5835.           <type>
  5836.                     This can be one of TT40, TT80 or VT52.  The  first  two
  5837.                     provide  teletype  emulations  using 40 or 80 byte wide
  5838.                     screens, and the last gives VT52 emulation. Some  other
  5839.                     types  may  be  selectable by ths command, but only the
  5840.                     three above are used in this release of BBC KERMIT.
  5841.                     
  5842.           Note that the command will  allow  you  to  select  any  type  of
  5843.           emulation,  whether  or  not  it  can  actually  be provided. The
  5844.           CONNECT command will fail, though, if the type  required  is  not
  5845.           available.
  5846.           
  5847.           By  default, the sideways ROM version of BBC KERMIT provides VT52
  5848.           emulation on all machines. The RAM version of BBC KERMIT provides
  5849.           VT52 emulation on the B+, B+128 and Master 128, and TT40  on  the
  5850.           model B.
  5851.           
  5852.           
  5853.           Example
  5854.           
  5855.                                SET TERMINAL TT80
  5856.           
  5857.           Makes  the  BBC micro appear as a simple teletype device using an
  5858.           80 column screen.
  5859.           
  5860.           
  5861.           
  5862.      
  5863.  
  5864.  
  5865.  
  5866.                                        85
  5867.  
  5868.  
  5869.  
  5870.  
  5871.                              BBC KERMIT User Guide
  5872.  
  5873.  
  5874.      SET TV
  5875.      
  5876.           This  command  lets  you  specify  whether  BBC   KERMIT   should
  5877.           automatically  issue  a  *TV  command  when  it  enters  terminal
  5878.           emulation mode or 80 character command screen mode.
  5879.           
  5880.           The command format is
  5881.           
  5882.                           SET TV <number-1> <number-2>
  5883.           
  5884.           The parameters are:
  5885.           
  5886.           <number-1>
  5887.                     The first *TV parameter to be used.
  5888.                     
  5889.           <number-2>
  5890.                     The second *TV parameter to be used.
  5891.                     
  5892.           If you omit both parameters, BBC KERMIT will no  longer  issue  a
  5893.           *TV command: however, the effect of any previously issued command
  5894.           will persist. By default, BBC KERMIT issues a *TV 0 1 to turn off
  5895.           interlace.
  5896.           
  5897.           Example:
  5898.           
  5899.                                   SET TV 255 1
  5900.           
  5901.           causes  BBC  KERMIT  to  issue  a  *TV 255 1  command on entering
  5902.           terminal mode or 80 character command screen mode.
  5903.           
  5904.           
  5905.      SET VDU-COLOUR
  5906.      
  5907.           This command, available in the sideways ROM  version  only,  lets
  5908.           you  select  the  colour  used  for text in 80 character terminal
  5909.           emulation mode or 80 character command screen mode.  The  command
  5910.           has  no  effect  for  40  character terminal mode. The background
  5911.           colour cannot be changed, and will always be black.
  5912.           
  5913.           The command format is
  5914.           
  5915.                             SET VDU-COLOUR <colour>
  5916.           
  5917.           The parameters are:
  5918.           
  5919.           <colour>
  5920.                     Specifies the colour to be used, and  must  be  one  of
  5921.                     RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN or WHITE.
  5922.                     
  5923.           By default, the text colour used is white.
  5924.           
  5925.           Example:
  5926.           
  5927.                               SET VDU-COLOUR GREEN
  5928.           
  5929.           will select green text on a black background.
  5930.  
  5931.  
  5932.                                        86
  5933.  
  5934.  
  5935.  
  5936.  
  5937.                              BBC KERMIT User Guide
  5938.  
  5939.  
  5940.           
  5941.           
  5942.      TRANSMIT
  5943.      
  5944.      
  5945.           This  command  allows  you  to send a text file from the BBC to a
  5946.           host that does not have KERMIT. Binary files cannot  normally  be
  5947.           sent in this way.
  5948.           
  5949.           The command format is
  5950.           
  5951.                               TRANSMIT <filename>
  5952.           
  5953.           The parameters are:
  5954.           
  5955.           <filename>
  5956.                     This specifies the file you wish to send. 
  5957.                     
  5958.                     
  5959.           When  you issue this command, BBC KERMIT will automatically enter
  5960.           terminal mode and will send the contents of the file to the host.
  5961.           It will remain in terminal mode after all the data has been sent,
  5962.           and you will be able to type at the keyboard as  normal.  Sending
  5963.           the file can be interruped at any time by pressing ESCAPE.
  5964.           
  5965.           Example:
  5966.           
  5967.                                 TRANSMIT DELEG8
  5968.           
  5969.           will send the text file DELEG8 to the host in terminal mode.
  5970.           
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.                                        87
  5999.  
  6000.  
  6001.  
  6002.  
  6003.                              BBC KERMIT User Guide
  6004.  
  6005.  
  6006.      A1.4 COMMANDS FOR CONTROL OF REMOTE SERVERS
  6007.      
  6008.      
  6009.         This  section specifies the command that you can use to control the
  6010.      operation of a remote server.
  6011.      
  6012.         It is important to note that servers vary in  which  commands  they
  6013.      implement  from  this section, and also on the exact way in which they
  6014.      action  others. All  servers  should  implement  the  BYE  and  FINISH
  6015.      commands,  but  some  may  treat  them  both  as  FINISH and leave the
  6016.      terminal session logged in. Some servers implement all the  facilities
  6017.      described   under  the  REMOTE  command  below,  some  implement  them
  6018.      partially or in different ways, and some don't implement them at  all.
  6019.      In  particular,  some  servers  may  implement commands such as REMOTE
  6020.      DIRECTORY but ignore any parameters you supply. The  only  way  to  be
  6021.      sure is to consult the user guide for the server concerned.
  6022.      
  6023.      If  you  do  attempt to use a server command that is not available, an
  6024.      error  message  such  as  "Unimplemented  server  command"   will   be
  6025.      displayed.
  6026.      
  6027.      In  all  cases, you can interrupt a REMOTE command that is producing a
  6028.      large amount of output by  pressing  CONTROL  and  Z.  The  techniques
  6029.      described  in chapter 5 for handling problems are also applicable here
  6030.      should the transfer of the output stop for some  reason:  however  the
  6031.      REMOTE  command  does  not  provide  you  with  any  indication of the
  6032.      progress or otherwise of the transfer.
  6033.      
  6034.      Most of the REMOTE commands produce at least one line of  output  from
  6035.      the  remote  server which is displayed on BBC KERMIT's command screen.
  6036.      Often this output will be formatted assuming that  the  screen  is  80
  6037.      characters  wide:  if  you  are  using the sideways ROM version of BBC
  6038.      KERMIT, or are using a B+, B+128 or Master 128,  you  can  change  the
  6039.      command screen width from 40 to 80 characters with the command
  6040.      
  6041.                                     WIDTH 80
  6042.      
  6043.      so that the output layout looks correct.
  6044.      
  6045.      
  6046.      
  6047.      
  6048.      
  6049.      
  6050.      BYE
  6051.      
  6052.           This command tells the remote server to cease operation, and also
  6053.           to log out the terminal job in which it is running.
  6054.           
  6055.           The command has no parameters.
  6056.           
  6057.           Example:
  6058.           
  6059.                                       BYE
  6060.           
  6061.           
  6062.  
  6063.  
  6064.                                        88
  6065.  
  6066.  
  6067.  
  6068.  
  6069.                              BBC KERMIT User Guide
  6070.  
  6071.  
  6072.           
  6073.      FINISH
  6074.      
  6075.           This  command  tells the remote server to cease operation, but to
  6076.           leave the terminal session logged in.
  6077.           
  6078.           The command has no parameters.
  6079.           
  6080.           Example:
  6081.           
  6082.                                      FINISH
  6083.           
  6084.           
  6085.           
  6086.      REMOTE COPY
  6087.      
  6088.           This command instructs the server to copy one  file  to  another,
  6089.           leaving the source file unchanged.
  6090.           
  6091.           The command format is
  6092.           
  6093.                         REMOTE COPY <oldfile> <newfile>
  6094.           
  6095.           The parameters are:
  6096.           
  6097.           <oldfile>
  6098.                     Specifies the source file for the copy operation.
  6099.                     
  6100.           <newfile>
  6101.                     Specifies the name of the file the data is to be copied
  6102.                     into.
  6103.                     
  6104.           Example:
  6105.           
  6106.                        REMOTE COPY LURGI.ILL SICKNOTE.LIS
  6107.           
  6108.           would  copy  the  contents  of  file  LURGI.ILL  into  a new file
  6109.           SICKNOTE.LIS.
  6110.           
  6111.           
  6112.           
  6113.           
  6114.      REMOTE CWD
  6115.      
  6116.           This command instructs the server to change its  current  working
  6117.           directory (or wherever it looks for files unless told otherwise).
  6118.           
  6119.           The command format is
  6120.           
  6121.                              REMOTE CWD <directory>
  6122.           
  6123.           The parameters are:
  6124.           
  6125.           <directory>
  6126.                     This  optional  parameter  specifies  the  name  of the
  6127.                     directory to be used in future.
  6128.  
  6129.  
  6130.                                        89
  6131.  
  6132.  
  6133.  
  6134.  
  6135.                              BBC KERMIT User Guide
  6136.  
  6137.  
  6138.                     
  6139.           If you omit the directory  name,  the  server  should  reset  its
  6140.           current  directory to that in force when you logged in. If you do
  6141.           specify a name, BBC KERMIT will prompt you  for  a  password,  in
  6142.           case  the  server  system  requires  one. You can either type the
  6143.           password, which will not be echoed  to  the  screen,  then  press
  6144.           RETURN; or, if no password is needed, simply press RETURN.
  6145.           
  6146.           Example:
  6147.           
  6148.                               REMOTE CWD [.SUBDIR]
  6149.           
  6150.           would  tell  a  server  running  under VAX/VMS to set the current
  6151.           directory to be [.SUBDIR]
  6152.           
  6153.           
  6154.           
  6155.      REMOTE DELETE
  6156.      
  6157.           This command instructs the server to delete the specified file.
  6158.           
  6159.           The command format is
  6160.           
  6161.                             REMOTE DELETE <filename>
  6162.           
  6163.           The parameters are:
  6164.           
  6165.           <filename>
  6166.                     Specifies the file you wish  deleted.  The  server  may
  6167.                     permit you to specify a wildcarded name, or it may not.
  6168.                     
  6169.                     
  6170.           Example:
  6171.           
  6172.                        REMOTE DELETE /temp/notalotofgood
  6173.           
  6174.           would ask the server to delete the file /temp/notalotofgood.
  6175.           
  6176.           
  6177.           
  6178.      REMOTE DIRECTORY
  6179.      
  6180.           This command instructs the server to produce a directory listing,
  6181.           which is displayed on BBC KERMIT's command screen.
  6182.           
  6183.           The command format is
  6184.           
  6185.                           REMOTE DIRECTORY <filespec>
  6186.           
  6187.           The parameters are:
  6188.           
  6189.           <filespec>
  6190.                     This  optional  parameter gives a file specification or
  6191.                     other  string  that   refines   a   directory   listing
  6192.                     selection.  If  you  omit  it, the server would usually
  6193.                     display a list of all files in the current directory.
  6194.  
  6195.  
  6196.                                        90
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.                              BBC KERMIT User Guide
  6203.  
  6204.  
  6205.                     
  6206.           Example:
  6207.           
  6208.                            REMOTE DIRECTORY WORD*.LIS
  6209.           
  6210.           would ask the server for a listing of the names of all the  files
  6211.           with names starting "WORD" and with file type "LIS".
  6212.           
  6213.           
  6214.           
  6215.      REMOTE HELP
  6216.      
  6217.           This  command  asks  the  server to display some help information
  6218.           about itself.
  6219.           
  6220.           The command format is
  6221.           
  6222.                               REMOTE HELP <topic>
  6223.           
  6224.           The parameters are:
  6225.           
  6226.           <topic>
  6227.                     This optional parameter specifies a specific  topic  on
  6228.                     which  help is needed: the server may refine its output
  6229.                     to suit, or it may ignore the selection. If you omit it
  6230.                     the  server   would   usually   output   some   general
  6231.                     information.  Unlike  other command parameters, <topic>
  6232.                     consists of the whole of the rest of the  command  line
  6233.                     and so may include spaces.
  6234.                     
  6235.           Example:
  6236.           
  6237.                                   REMOTE HELP
  6238.           
  6239.           asks the server for general help information.
  6240.           
  6241.           
  6242.      REMOTE HOST
  6243.      
  6244.           This  command  asks  the  server  to pass a command string to the
  6245.           mainframe operating system's command interpreter for execution.
  6246.           
  6247.           The command format is
  6248.           
  6249.                              REMOTE HOST <command>
  6250.           
  6251.           The parameters are:
  6252.           
  6253.           <command>
  6254.                     This is the command you wish  to  be  executed.  Unlike
  6255.                     other  command  parameters  it consists of the whole of
  6256.                     the rest of  the  command  line,  and  so  can  contain
  6257.                     spaces.
  6258.                     
  6259.           Some  care  is needed in the choice of command that you ask to be
  6260.           executed. Since the operating system has no means of carrying  on
  6261.  
  6262.  
  6263.                                        91
  6264.  
  6265.  
  6266.  
  6267.  
  6268.                              BBC KERMIT User Guide
  6269.  
  6270.  
  6271.           a  dialogue  with  you,  commands  that  require  interaction, or
  6272.           otherwise cannot run in batch mode are unsuitable.
  6273.           
  6274.           Example:
  6275.           
  6276.                      REMOTE HOST %allow readaccess data.dat
  6277.           
  6278.           would pass a command "%allow readaccess data.dat" to the server's
  6279.           operating system for execution.
  6280.           
  6281.           
  6282.           
  6283.      REMOTE RENAME
  6284.      
  6285.           This command requests the server to change the name of a file.
  6286.           
  6287.           The command format is
  6288.           
  6289.                        REMOTE RENAME <oldname> <newname>
  6290.           
  6291.           The parameters are:
  6292.           
  6293.           <oldname>
  6294.                     Specifies the file whose name is to be changed.
  6295.                     
  6296.           <newname>
  6297.                     Specifies the new name to be given to the file.
  6298.                     
  6299.           Example:
  6300.           
  6301.                         REMOTE RENAME napoleon snowball
  6302.           
  6303.           asks the  server  to  change  the  name  of  file  "napoleon"  to
  6304.           "snowball".
  6305.           
  6306.           
  6307.           
  6308.      REMOTE SPACE
  6309.      
  6310.           This  command  asks  the  server  to display details of your disc
  6311.           usage.
  6312.           
  6313.           The command format is
  6314.           
  6315.                             REMOTE SPACE <selector>
  6316.           
  6317.           The parameters are:
  6318.           
  6319.           <selector>
  6320.                     This optional  parameter  specifies  some  selector  by
  6321.                     which  the  server  refines  its  calculations  of disc
  6322.                     usage.
  6323.                     
  6324.           Example:
  6325.           
  6326.                                   REMOTE SPACE
  6327.  
  6328.  
  6329.                                        92
  6330.  
  6331.  
  6332.  
  6333.  
  6334.                              BBC KERMIT User Guide
  6335.  
  6336.  
  6337.           
  6338.           produces a display of the disc space you are using.
  6339.           
  6340.           
  6341.      REMOTE STATUS
  6342.      
  6343.           This command requests the server to display details about its own
  6344.           status.
  6345.           
  6346.           The command has no parameters.
  6347.           
  6348.           Example:
  6349.           
  6350.                                  REMOTE STATUS
  6351.           
  6352.           
  6353.           
  6354.           
  6355.      REMOTE TYPE
  6356.      
  6357.           This command request the server to type a file on the BBC  KERMIT
  6358.           command screen.
  6359.           
  6360.           The command format is
  6361.           
  6362.                              REMOTE TYPE <filename>
  6363.           
  6364.           The parameters are:
  6365.           
  6366.           <filename>
  6367.                     The  name  of the file you wish to be typed. The server
  6368.                     may permit you to specify wildcards, in which case  the
  6369.                     matching files will be displayed one after the other.
  6370.                     
  6371.           Example:
  6372.           
  6373.                               REMOTE TYPE DATA.LIS
  6374.           
  6375.           would type the contents of file DATA.LIS.
  6376.           
  6377.           
  6378.      REMOTE WHO
  6379.      
  6380.           This  command  requests  the  server  to display details of other
  6381.           users logged in to the system.
  6382.           
  6383.           The command has no parameters.
  6384.           
  6385.           Example:
  6386.           
  6387.                                    REMOTE WHO
  6388.           
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.                                        93
  6396.  
  6397.  
  6398.  
  6399.  
  6400.                              BBC KERMIT User Guide
  6401.  
  6402.  
  6403.           
  6404.      A1.5: COMMANDS FOR DETAILED PROTOCOL CONTROL
  6405.      
  6406.      
  6407.      
  6408.         The commands described in this section are used to  exert  detailed
  6409.      control over the KERMIT protocol. As explained earlier, it is unlikely
  6410.      that  you  would  ever need to use them. You should consult the KERMIT
  6411.      Protocol Manual for a detailed  description  of  the  facilities  they
  6412.      control.
  6413.      
  6414.      
  6415.      
  6416.      
  6417.      
  6418.      SET EIGHT-BIT-PREFIX
  6419.      
  6420.           This  command  defines  the  eight-bit-prefix  character that BBC
  6421.           KERMIT will ask the remote system to agree to use.
  6422.           
  6423.           The command format is
  6424.           
  6425.                         SET EIGHT-BIT-PREFIX <character>
  6426.           
  6427.           The parameters are
  6428.           
  6429.           <character>
  6430.                     The printable character to be used.
  6431.                     
  6432.           By default, BBC KERMIT will attempt to use the "&"  character  as
  6433.           its eight-bit prefix.
  6434.           
  6435.           Example
  6436.           
  6437.                              SET EIGHT-BIT-PREFIX %
  6438.           
  6439.           sets the eight-bit prefix character to be "%".
  6440.           
  6441.           
  6442.      SET PAUSE
  6443.      
  6444.           This  command  defines  a "turn-round" delay that BBC KERMIT will
  6445.           use in packet transmission. It defines the time that  BBC  KERMIT
  6446.           will  wait,  after  receiving  a  packet  from the remote system,
  6447.           before transmitting the next to it. This overcomes problems  with
  6448.           some  systems  that cannot accept input that comes too soon after
  6449.           output.
  6450.           
  6451.           The command format is
  6452.           
  6453.                                SET PAUSE <number>
  6454.           
  6455.           The parameters are
  6456.           
  6457.           <number>
  6458.                     The pause time in seconds, in the range 0 to 255.
  6459.  
  6460.  
  6461.                                        94
  6462.  
  6463.  
  6464.  
  6465.  
  6466.                              BBC KERMIT User Guide
  6467.  
  6468.  
  6469.                     
  6470.           By default, BBC KERMIT does not pause (i.e. the  pause  value  is
  6471.           0).
  6472.           
  6473.           
  6474.           Example
  6475.           
  6476.                                   SET PAUSE 1
  6477.           
  6478.           causes  BBC KERMIT to pause for 1 second after receiving a packet
  6479.           before transmitting one.
  6480.           
  6481.           
  6482.           
  6483.      SET RECEIVE END-OF-LINE
  6484.      
  6485.           This command defines the value that BBC KERMIT requests the other
  6486.           end to use to signal the end of a packet.
  6487.           
  6488.           The command format is
  6489.           
  6490.                         SET RECEIVE END-OF-LINE <number>
  6491.           
  6492.           The parameters are
  6493.           
  6494.           <number>
  6495.                     The number of the control character in the range  0  to
  6496.                     31.
  6497.                     
  6498.           
  6499.           
  6500.           By  default,  BBC  KERMIT  asks for packets to be terminated with
  6501.           Carriage Return (&0D).
  6502.           
  6503.           Example
  6504.           
  6505.                           SET RECEIVE END-OF-LINE &0A
  6506.           
  6507.           requests the remote KERMIT to terminate packets  with  Line  Feed
  6508.           (code &0A).
  6509.           
  6510.           
  6511.           
  6512.      SET RECEIVE PACKET-LENGTH
  6513.      
  6514.           This command defines the maximum packet size that BBC KERMIT will
  6515.           ask  the  remote  system  to  send.  You  can use this command to
  6516.           optimise transfers on a noisy communications line: short  packets
  6517.           will  have  a  higher  chance  of  succesful transmission in such
  6518.           circumstances.
  6519.           
  6520.           The command format is
  6521.           
  6522.                        SET RECEIVE PACKET-LENGTH <number>
  6523.           
  6524.           The parameters are
  6525.  
  6526.  
  6527.                                        95
  6528.  
  6529.  
  6530.  
  6531.  
  6532.                              BBC KERMIT User Guide
  6533.  
  6534.  
  6535.           
  6536.           <number>
  6537.                     The maximum size  of  packet  wanted  from  the  remote
  6538.                     system, in the range 35 to 94.
  6539.                     
  6540.           By  default,  BBC  KERMIT asks the remote system to use a maximum
  6541.           packet size of 94 bytes.
  6542.           
  6543.           Example
  6544.           
  6545.                           SET RECEIVE PACKET-LENGTH 60
  6546.           
  6547.           causes BBC KERMIT to request the remote system to use  a  maximum
  6548.           packet size of 60 bytes.
  6549.           
  6550.           
  6551.           
  6552.      SET RECEIVE PADCHAR
  6553.      
  6554.           This  command  defines the character that BBC KERMIT requests the
  6555.           other to use when padding before sending a packet.
  6556.           
  6557.           The command format is
  6558.           
  6559.                           SET RECEIVE PADCHAR <number>
  6560.           
  6561.           The parameters are
  6562.           
  6563.           <number>
  6564.                     The numeric code  of  the  character  to  be  used  for
  6565.                     padding in the range 0 to 31.
  6566.                     
  6567.           By default, BBC KERMIT will ask for a pad character of code 0.
  6568.           
  6569.           
  6570.           Example
  6571.           
  6572.                             SET RECEIVE PADCHAR &07
  6573.           
  6574.           requests the remote KERMIT to pad with &07 characters.
  6575.           
  6576.           
  6577.           
  6578.      SET RECEIVE PADDING
  6579.      
  6580.           This command defines the number of pad characters that BBC KERMIT
  6581.           will ask the other end to send before each packet.
  6582.           
  6583.           The command format is
  6584.           
  6585.                           SET RECEIVE PADDING <number>
  6586.           
  6587.           The parameters are
  6588.           
  6589.           <number>
  6590.                     The  number  of  pad characters to be requested, in the
  6591.  
  6592.  
  6593.                                        96
  6594.  
  6595.  
  6596.  
  6597.  
  6598.                              BBC KERMIT User Guide
  6599.  
  6600.  
  6601.                     range 0 to 94.
  6602.                     
  6603.           By default, BBC KERMIT asks for no pad characters to be sent.
  6604.           
  6605.           
  6606.           Example
  6607.           
  6608.                              SET RECEIVE PADDING 10
  6609.           
  6610.           will cause BBC KERMIT to request the  remote  system  to  precede
  6611.           each packet with 10 pad characters.
  6612.           
  6613.           
  6614.      SET RECEIVE START-OF-PACKET
  6615.      
  6616.           This  command defines to BBC KERMIT the character that the remote
  6617.           system will use to indicate the start of each packet.
  6618.           
  6619.           The command format is
  6620.           
  6621.                       SET RECEIVE START-OF-PACKET <number>
  6622.           
  6623.           The parameters are
  6624.           
  6625.           <number>
  6626.                     The numeric code of the  character  the  remote  system
  6627.                     will use, in the range 0 to 31.
  6628.                     
  6629.           By  default,  BBC KERMIT will expect the remote system to precede
  6630.           each packet with a &01 character.
  6631.           
  6632.           Example
  6633.           
  6634.                         SET RECEIVE START-OF-PACKET &03
  6635.           
  6636.           tells BBC KERMIT that the remote system will precede each  packet
  6637.           with a &03 character.
  6638.           
  6639.           
  6640.           
  6641.      SET RETRIES
  6642.      
  6643.           This  command  defines the number of times BBC KERMIT will repeat
  6644.           an attempt to transmit a packet to, or receive a packet from, the
  6645.           remote system. You may need to increase the  number  of  attempts
  6646.           allowed if you are using a noisy communications line.
  6647.           
  6648.           The command format is
  6649.           
  6650.                               SET RETRIES <number>
  6651.           
  6652.           The parameters are:
  6653.           
  6654.           <number>
  6655.                     The  number  of  retries  to be made, in the range 1 to
  6656.                     255.
  6657.  
  6658.  
  6659.                                        97
  6660.  
  6661.  
  6662.  
  6663.  
  6664.                              BBC KERMIT User Guide
  6665.  
  6666.  
  6667.                     
  6668.           By default, BBC KERMIT will make 5 retry attempts (i.e.  a  total
  6669.           of  6  attempts  in  all) before deciding that a packet cannot be
  6670.           transmitted  or  received  correctly  and  abandoning  the   file
  6671.           transfer.
  6672.           
  6673.           Example:
  6674.           
  6675.                                  SET RETRIES 16
  6676.           
  6677.           will cause BBC KERMIT to make 16 retry attempts before abandoning
  6678.           the transfer.
  6679.           
  6680.           
  6681.           
  6682.           
  6683.      
  6684.      SET SEND END-OF-LINE
  6685.      
  6686.           This  command  defines  the character that BBC KERMIT will use to
  6687.           terminate the first packet it sends to the remote system in  each
  6688.           transfer.  Subsequent packets will be terminated by the character
  6689.           that the remote system requests when  it  tells  BBC  KERMIT  its
  6690.           requirements.
  6691.           
  6692.           The command format is
  6693.           
  6694.                          SET SEND END-OF-LINE <number>
  6695.           
  6696.           The parameters are
  6697.           
  6698.           <number>
  6699.                     The  numeric  code  of the character to be used, in the
  6700.                     range 0 to 31.
  6701.                     
  6702.           By default, BBC KERMIT uses &0D (Carriage Return).
  6703.           
  6704.           Example
  6705.           
  6706.                             SET SEND END-OF-LINE &0A
  6707.           
  6708.           causes the first packet sent in each transfer to  be  ended  with
  6709.           Line Feed (code &0A).
  6710.           
  6711.           
  6712.      SET SEND PADCHAR
  6713.      
  6714.           This  command defines the padding character with which BBC KERMIT
  6715.           will  precede  the  first  packet  to  be  sent  in  a  transfer.
  6716.           Subsequent packets will be preceded by the character requested by
  6717.           the remote system in its SEND-INIT packet.
  6718.           
  6719.           The command format is
  6720.           
  6721.                            SET SEND PADCHAR <number>
  6722.           
  6723.  
  6724.  
  6725.                                        98
  6726.  
  6727.  
  6728.  
  6729.  
  6730.                              BBC KERMIT User Guide
  6731.  
  6732.  
  6733.           The parameters are
  6734.           
  6735.           <number>
  6736.                     The  numeric  code  of the character to be used, in the
  6737.                     range 0 to 255.
  6738.                     
  6739.           By default, BBC KERMIT uses a pad character of NUL (code &00).
  6740.           
  6741.           Example
  6742.           
  6743.                               SET SEND PADCHAR &03
  6744.           
  6745.           sets the pad character used to be &03.
  6746.           
  6747.           
  6748.      SET SEND PADDING
  6749.      
  6750.           This command defines the number of pad characters BBC KERMIT will
  6751.           send before the first packet in a  transfer.  Subsequent  packets
  6752.           will  be  preceded  by  the number requested by the remote system
  6753.           when it tells BBC KERMIT its requirements.
  6754.           
  6755.           The command format is
  6756.           
  6757.                            SET SEND PADDING <number>
  6758.           
  6759.           The parameters are
  6760.           
  6761.           <number>
  6762.                     The number of pad characters to be sent, in the range 0
  6763.                     to 255.
  6764.                     
  6765.           By default, BBC KERMIT sends no pad characters.
  6766.           
  6767.           Example
  6768.           
  6769.                               SET SEND PADDING 21
  6770.           
  6771.           causes BBC KERMIT to send 21  pad  characters  before  its  first
  6772.           packet.
  6773.           
  6774.           
  6775.      SET SEND QUOTE
  6776.      
  6777.           This  command  defines  the character that BBC KERMIT will use to
  6778.           prefix control characters in data packets that  it  sends.  Since
  6779.           every  occurence  of the quote character in a file must itself be
  6780.           preceded by a quote  when  transmitted,  this  command  lets  you
  6781.           minimise the data to be moved if the file contains a large number
  6782.           of the normal quote character.
  6783.           
  6784.           The command format is
  6785.           
  6786.                            SET SEND QUOTE <character>
  6787.           
  6788.           The parameters are
  6789.  
  6790.  
  6791.                                        99
  6792.  
  6793.  
  6794.  
  6795.  
  6796.                              BBC KERMIT User Guide
  6797.  
  6798.  
  6799.           
  6800.           <character>
  6801.                     The printable character to be used.
  6802.                     
  6803.           By default, BBC KERMIT uses the "#" character.
  6804.           
  6805.           Example
  6806.           
  6807.                                 SET SEND QUOTE $
  6808.           
  6809.           causes  BBC  KERMIT to prefix control characters it sends in data
  6810.           packets with a "$".
  6811.           
  6812.           
  6813.      SET SEND START-OF-PACKET
  6814.      
  6815.           This command defines the character that BBC KERMIT will  send  to
  6816.           indicate the start of every packet.
  6817.           
  6818.           The command format is
  6819.           
  6820.                        SET SEND START-OF-PACKET <number>
  6821.           
  6822.           The parameters are
  6823.           
  6824.           <number>
  6825.                     The  numeric  code  of the character to be sent, in the
  6826.                     range 0 to 31.
  6827.                     
  6828.           By default, BBC KERMIT sends a &01 character in  front  of  every
  6829.           packet.
  6830.           
  6831.           Example
  6832.           
  6833.                           SET SEND START-OF-PACKET &04
  6834.           
  6835.           causes  BBC  KERMIT  to  precede every packet it sends with a &04
  6836.           character.
  6837.      
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.                                       100
  6858.  
  6859.  
  6860.  
  6861.  
  6862.                              BBC KERMIT User Guide
  6863.  
  6864.  
  6865.      APPENDIX 2 : OBTAINING, BUILDING AND MODIFYING BBC KERMIT
  6866.      
  6867.      
  6868.         This appendix describes how you can get  hold  of  BBC  KERMIT  and
  6869.      build  it  from  the  assembly language sources, or modify an existing
  6870.      version.
  6871.      
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.                                       101
  6924.  
  6925.  
  6926.  
  6927.  
  6928.                              BBC KERMIT User Guide
  6929.  
  6930.  
  6931.      A2.1 OBTAINING BBC KERMIT
  6932.      
  6933.      
  6934.         There are several ways of acquiring a BBC KERMIT, as follows:
  6935.      
  6936.          1. You can obtain the files from the KERMIT tapes  distributed  by
  6937.             Columbia University in New York, or by anonymous FTP from their
  6938.             CU20B system.
  6939.             
  6940.          2. You  can obtain the files from Lancaster KERMIT distribution by
  6941.             file transfer over the JANET or PSS networks, by  using  KERMIT
  6942.             itself, or on magnetic tape. The files are held online on a VAX
  6943.             11/780 running VMS and can be freely accessed by anyone.
  6944.             
  6945.          3. You  can  obtain  the  files  on  Acorn  DFS  format discs from
  6946.             Lancaster KERMIT distribution: the  sources  and  the  compiled
  6947.             binaries  will  need  1  double-sided  80  track drive, and the
  6948.             documentation (in Wordwise Plus and printable format)  needs  2
  6949.             more. 
  6950.             
  6951.         If  you  are  within  the  UK  you  should use option 2 or 3 above:
  6952.      Columbia will refer  all  KERMIT  supply  enquiries  from  the  UK  to
  6953.      Lancaster in the first instance. Also, Lancaster will generally have a
  6954.      more up-to-date release of BBC KERMIT than is available from Columbia.
  6955.      
  6956.         Options  2  and 3 will get you the source files exactly as you need
  6957.      them for the ADE assembler. For reasons of space, though, the  sources
  6958.      are  distributed  by Columbia as one monolithic file: you will need to
  6959.      process this file with an editor on your mainframe to  split  it  into
  6960.      its  components at the clearly marked points before moving it to a BBC
  6961.      machine.
  6962.      
  6963.         However you get the files,  you  will  eventually  have  a  set  of
  6964.      assembler  source  files  from  which  you  need  to generate compiled
  6965.      binaries. If you get BBC KERMIT on disc  from  Lancaster  distribution
  6966.      you  will  find  binary  files  already  there,  called ROMnnn for the
  6967.      sideways ROM version and RAMnnn for the RAM version (where nnn is  the
  6968.      mark  and  version  number).  Otherwise  you  will  find  files called
  6969.      BBCROM.HEX and BBCRAM.HEX, which are Intel hex dumps of  the  compiled
  6970.      binaries.  You  should  get  these onto a BBC disc, then run the small
  6971.      BASIC program BBCDEHEX.BAS to convert them to binary form.
  6972.      
  6973.         The binary of the RAM version can be *RUN immediately: that for the
  6974.      sideways ROM version should either be  loaded  into  sideways  RAM  at
  6975.      address  &8000  or  programmed into a 16K 27128 EPROM. For those sites
  6976.      not  possessing  EPROM  programming   facilities,   Lancaster   KERMIT
  6977.      distribution is willing to program a small number of EPROMs for anyone
  6978.      who supplies them.
  6979.      
  6980.      
  6981.      
  6982.      
  6983.      A2.1.1 The source files
  6984.      
  6985.      
  6986.           The BBC KERMIT assembler source is held in a fair number of files
  6987.  
  6988.  
  6989.                                       102
  6990.  
  6991.  
  6992.  
  6993.  
  6994.                              BBC KERMIT User Guide
  6995.  
  6996.  
  6997.           and is now very large (and still growing). The source is split by
  6998.           functionality, and further divided to keep the files small enough
  6999.           to  permit  easy and quick editing (we have taken about 800 lines
  7000.           as the limit for a file). The organisation  is  not  fixed  -  we
  7001.           shall refine it with experience and as the system changes, so the
  7002.           names  are  not  guaranteed  to  be unchanged from one release to
  7003.           another.
  7004.           
  7005.            For version 1.40 the files  that  make  up  BBC  KERMIT  are  as
  7006.           follows:
  7007.           
  7008.           
  7009.           a. Files supplied on disc
  7010.           
  7011.           
  7012.           BBC  KERMIT  as issued on disc consists of two sets of files. The
  7013.           first set consists of the assembler source files and two compiled
  7014.           binary files: the files are
  7015.           
  7016.                BBCMIT    This is the first file to be assembled, containing
  7017.                          compilation switches and messages.
  7018.                BBCDEF    Various global defines.
  7019.                BBCWKS    Workspace declarations
  7020.                BBCMAI    The entry code to the system.
  7021.                BBCCPR    The command processor.
  7022.                BBCCMD    Command routines  for  general  commands  such  as
  7023.                          TAKE, SEND, etc.
  7024.                BBCGEN    Command  routines  for  generic  functions such as
  7025.                          BYE, REMOTE etc.
  7026.                BBCST1    The SET command part 1.
  7027.                BBCST2    The SET command part 2.
  7028.                BBCSHW    The SHOW command.
  7029.                BBCREC    Code for receiving files.
  7030.                BBCSND    Code for sending files.
  7031.                BBCCOM    Communications handling code.
  7032.                BBCTM1    Terminal emulation part 1.
  7033.                BBCTM2    Terminal emulation part 2.
  7034.                BBCPM1    Packet handling code part 1.
  7035.                BBCPM2    Packet handling code part 2.
  7036.                BBCPM3    Packet handling code part 3.
  7037.                BBCFIL    File handling code.
  7038.                BBCSB1    General subroutines.
  7039.                BBCSB2    General subroutines.
  7040.                BBCSB3    General subroutines.
  7041.                BBCSB4    General subroutines.
  7042.                BBCTX1    Texts for messages part 1.
  7043.                BBCTX2    Texts for messages part 2.
  7044.                          
  7045.                ROMnnn    The compiled binary  file  for  the  sideways  ROM
  7046.                          version.  Here  "nnn"  gives  the mark and version
  7047.                          number.
  7048.                RAMnnn    The compiled binary file for the  version  running
  7049.                          in RAM.
  7050.                          
  7051.                A.Assem   A  compiled binary file for a 65C02 assembler that
  7052.                          you can use as an alternative to ADE.
  7053.  
  7054.  
  7055.                                       103
  7056.  
  7057.  
  7058.  
  7059.  
  7060.                              BBC KERMIT User Guide
  7061.  
  7062.  
  7063.                          
  7064.                A.ReadMe  Notes  on  the  65C02  assembler,  describing  its
  7065.                          differences from ADE.
  7066.                          
  7067.           The  second  set  of the files is that comprising the User Guide.
  7068.           This is supplied as Wordwise Plus source files, and as a spooled,
  7069.           printable file.
  7070.           
  7071.           
  7072.           
  7073.           b. Files on the Lancaster VAX filestore
  7074.           
  7075.            The VAX filestore contains most of the above  files  apart  from
  7076.           the  WordWise Plus source files for the User Guide. The assembler
  7077.           source files have the same names as those on the discs, but  each
  7078.           filename has a suffix ".ADE" added to it.
  7079.           
  7080.           The other files are:
  7081.           
  7082.                BBCKERMIT.DOC A  printable  copy  of  the  user  guide. This
  7083.                              contains no printer  control  characters,  and
  7084.                              uses 66 lines on each printed page.
  7085.                              
  7086.                BBCKERMIT.BWR An up-to-date list of known bugs and problems.
  7087.                              (Note   that  this  file  may  not  always  be
  7088.                              present)
  7089.                              
  7090.                BBCROM.HEX    The compiled sideways ROM version in Intel hex
  7091.                              format.
  7092.                              
  7093.                BBCRAM.HEX    The compiled RAM version in Intel hex format.
  7094.                              
  7095.                BBCHEX.BAS    The BASIC program used to convert  the  binary
  7096.                              files to Intel hex.
  7097.                              
  7098.                BBCDEHEX.BAS  A  BASIC  program to convert from Intel hex to
  7099.                              binary. Note that the  version  supplied  with
  7100.                              BBC  KERMIT  release  1.02 is not suitable for
  7101.                              use with release 1.30 and later versions.
  7102.                              
  7103.                BBCASM.HEX    An Intel hex form of the 65C02 assembler  that
  7104.                              you can use as an alternative to ADE.
  7105.                              
  7106.                BBCASM.DOC    Notes on the 65C02 assembler.
  7107.                              
  7108.                              
  7109.           c. Files on tapes from Columbia
  7110.           
  7111.           Here  the  files  consist of one large source file BBCKERMIT.ADE,
  7112.           containing a concatenation of  the  separate  sources,  plus  the
  7113.           additional  files  listed  above in (b). The Wordwise Plus format
  7114.           files for the User Guide are not available from Columbia.
  7115.           
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.                                       104
  7122.  
  7123.  
  7124.  
  7125.  
  7126.                              BBC KERMIT User Guide
  7127.  
  7128.  
  7129.      A2.2 BUILDING BBC KERMIT FROM A HEX FILE
  7130.      
  7131.      
  7132.      
  7133.         The easiest way to obtain a binary version  of  BBC  KERMIT,  apart
  7134.      from  getting  one on a disc from Lancaster KERMIT distribution, is to
  7135.      generate it from one of the Intel hex format files.
  7136.      
  7137.         The hex files will be found on  Columbia  tapes  and  in  Lancaster
  7138.      filestore  as  BBCROM.HEX  and  BBCRAM.HEX.  They  are  in  completely
  7139.      standard format, so can be converted with any utility you may  already
  7140.      have.  However  a  small BASIC program is provided to do this for you:
  7141.      this is in file BBCDEHEX.BAS, and is also listed below.
  7142.      
  7143.         You will need to get the Intel hex files you require to use onto  a
  7144.      BBC disc in some way to start with. An ordinary terminal emulator with
  7145.      dumb  capture  facility  will suffice for this. You will also need the
  7146.      BBCDEHEX.BAS program: you can capture this in the same way, or,  since
  7147.      it  is  short, type it in from the listing. Note that earlier releases
  7148.      of this program should not be used with BBC KERMIT  version  1.30  and
  7149.      later.  If  you capture the program, say into a file called DEHEX, you
  7150.      will need to convert it from text form into a BASIC program in memory.
  7151.      You can do this with the commands
  7152.      
  7153.                                   *EXEC DEHEX
  7154.                                   SAVE"BDEHEX"
  7155.      
  7156.      for example.
  7157.      
  7158.         Once the program is ready you can simply RUN it. It will ask you to
  7159.      name the input and output files to use, then will do all the necessary
  7160.      conversion work.
  7161.      
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.                                       105
  7188.  
  7189.  
  7190.  
  7191.  
  7192.                              BBC KERMIT User Guide
  7193.  
  7194.  
  7195.      A2.3 BUILDING BBC KERMIT FROM SOURCE
  7196.      
  7197.      
  7198.         Generating BBC KERMIT from the assembly sources is  a  fairly  easy
  7199.      process.  You  will  need  to arrange the source files on the discs to
  7200.      match the CHN directives, as described below.
  7201.      
  7202.         BBC KERMIT  was  developed  using  the  ADE  assembler/editor  ROM,
  7203.      available  commercially (see Appendix 2 section 6 for the address). An
  7204.      alternative to ADE is now available: a 65C02 macro  assembler  written
  7205.      at  Lancaster  is  distributed  with  BBC  KERMIT. This assembler runs
  7206.      either in a 27128 EPROM or  in  sideways  RAM,  and  is  substantially
  7207.      faster  than ADE. From version 1.42 onwards the sources are compatible
  7208.      with both assemblers.
  7209.      
  7210.      
  7211.      
  7212.      
  7213.      A2.3.1 Source file layout
  7214.      
  7215.      
  7216.           To  compile  BBC  KERMIT  you  will  need  either  2   80   track
  7217.           single-sided  units,  or  1 80 track double-sided unit if you are
  7218.           using DFS, or an Econet file server.
  7219.           
  7220.           The source files are divided into 2 groups, reflecting  how  they
  7221.           can  be  held  on 80 track BBC discs. Files from BBCMIT to BBCSND
  7222.           inclusive should be held on one disc  surface.  Files  BBCCOM  to
  7223.           BBCTX2 can be held on either the reverse side of this disc, or on
  7224.           side  1  of  another  disc. Questions output from the BBCMIT file
  7225.           during assembly allow the system to configure itself to point  to
  7226.           the  right  drives:  you should reply "N" to the initial question
  7227.           "All files on one disc surface?"
  7228.           
  7229.           There should be space for the object file to  be  placed  on  the
  7230.           first of the two surfaces.
  7231.           
  7232.           Note  that  if  you are using an Econet file server you can place
  7233.           all the files on one disc: in this case you should reply  "Y"  to
  7234.           the question "All files on one disc surface?".
  7235.           
  7236.           
  7237.           
  7238.           
  7239.      A2.3.2 The assembly process
  7240.      
  7241.      
  7242.           
  7243.           Having  arranged  the files on your BBC discs as described above,
  7244.           you can compile them very simply.
  7245.           
  7246.           
  7247.                a. Using ADE
  7248.                
  7249.                To use the ADE assembler, simply type the command
  7250.                
  7251.  
  7252.  
  7253.                                       106
  7254.  
  7255.  
  7256.  
  7257.  
  7258.                              BBC KERMIT User Guide
  7259.  
  7260.  
  7261.                                *ASM BBCMIT KERMIT
  7262.                
  7263.                Precede this command with CTRL-B if you wish  to  produce  a
  7264.                listing on a printer.
  7265.                
  7266.                The  file  BBCMIT  will  output  some  questions  to  you to
  7267.                determine what it is to do. The first question is whether or
  7268.                not you are using the ADE  assembler:  reply  "Y"  to  this.
  7269.                Futher  questions  will  be  on the disc layout, whether you
  7270.                wish to build the sideways  ROM  or  the  RAM  version,  and
  7271.                whether  you  wish  a listing to be output, then will do the
  7272.                assembly.
  7273.                
  7274.                
  7275.                b. Using the Lancaster 65C02 assembler
  7276.                
  7277.                To use the Lancaster  65C02  assembler,  you  will  need  to
  7278.                either  program  the code into a 27128 EPROM or load it into
  7279.                sideways RAM. Once there, you can compile BBC KERMIT.
  7280.                
  7281.                To simply check the syntax of the sources, without producing
  7282.                an object code file, type the command
  7283.                
  7284.                               *ASSEMBLE BBCMIT -A
  7285.                
  7286.                File BBCMIT will ask you if you are using ADE: reply "N"  to
  7287.                this.  It then asks you the same questions on disc layout as
  7288.                described above.
  7289.                
  7290.                To produce object code, the command  you  use  becomes,  for
  7291.                example
  7292.                
  7293.                           *ASSEMBLE BBCMIT -A -OKERMIT
  7294.                
  7295.                where the output code file here is called KERMIT.
  7296.                
  7297.                Both the commands shown above produce listings to the screen
  7298.                only.  To list to a printer, you should add a "-P" option to
  7299.                the command: thus, for example
  7300.                
  7301.                         *ASSEMBLE BBCMIT -A -OKERMIT -P
  7302.                
  7303.                produces object code in file KERMIT and  a  listing  to  the
  7304.                printer.
  7305.                
  7306.                Note  that  the  "-A"  option  is essential  if  you use the
  7307.                Lancaster 65C02 assembler for BBC KERMIT.
  7308.                
  7309.                
  7310.           Whichever assembler you use, the  listing  is  configured  to  be
  7311.           produced  on  an  EPSON  FX80 or compatible printer, and switches
  7312.           itself into 8 lines per  inch,  condensed  print  mode.  If  your
  7313.           printer is not EPSON-compatible, you will need to change the PAGE
  7314.           and SYSVDU commands in file BBCMIT to suit your requirements.
  7315.           
  7316.           The  output  listing from ADE will need up to 132 characters on a
  7317.  
  7318.  
  7319.                                       107
  7320.  
  7321.  
  7322.  
  7323.  
  7324.                              BBC KERMIT User Guide
  7325.  
  7326.  
  7327.           line.  On  the  Lancaster  65C02  assembler  the  line  width  is
  7328.           configurable:  if your printer only has 80 byte lines then change
  7329.           the PAGE directive in file BBCMIT to read
  7330.           
  7331.                                   PAGE   88,80
  7332.           
  7333.           The listing currently takes over 2 hours to  print  on  an  EPSON
  7334.           FX80, and occupies over 200 pages.
  7335.           
  7336.           If  you  wish,  you  can  list only some of the source files in a
  7337.           compilation. File BBCMIT contains a number of  boolean  switches,
  7338.           one for each source file, that dictate whether that file is to be
  7339.           listed if "selective listing" is specified. You should change the
  7340.           switches  for the files you wish to list, then specify "selective
  7341.           listing"  to  the  question  that  is  output  at  the  start  of
  7342.           compilation.
  7343.           
  7344.  
  7345.  
  7346.  
  7347.  
  7348.  
  7349.  
  7350.  
  7351.  
  7352.  
  7353.  
  7354.  
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.                                       108
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.                              BBC KERMIT User Guide
  7392.  
  7393.  
  7394.      
  7395.      A2.4 CHANGING KERMIT DEFAULTS
  7396.      
  7397.      
  7398.         There  are  several ways to arrange for BBC KERMIT to use different
  7399.      control values. The easiest is to leave the code as it is, and use the
  7400.      LOAD, SAVE or TAKE commands to reset the values as you want them  when
  7401.      you  start up. You can, of course, change the source and recompile: or
  7402.      you can leave the source alone and patch the object code.
  7403.      
  7404.         BBC KERMIT maintains the current control values in a RAM table, and
  7405.      the SET command manipulates the values therein. On start up, or  using
  7406.      the  RESET  command,  KERMIT  copies  a block of defaults into the RAM
  7407.      table. The SAVE command writes the RAM table to a file, and  the  LOAD
  7408.      command reloads from a file into the table.
  7409.      
  7410.      
  7411.      
  7412.      
  7413.      A2.4.1 Changing the source
  7414.      
  7415.           
  7416.           You  can  change  the defaults by altering the values held in the
  7417.           main defaults table. This is held in the source file BBCMAI,  and
  7418.           is  clearly  marked.  Each  value  is  commented  to  show  which
  7419.           parameter it defines: for possible values see below.
  7420.           
  7421.           
  7422.           
  7423.      
  7424.      A2.4.2 Patching the object code
  7425.      
  7426.           
  7427.           If you do not wish to recompile, you can load the object file  to
  7428.           memory  and  patch  it  with a machine-code monitor such as EXMON
  7429.           before  programming  another  EPROM  or  saving   it   to   disc.
  7430.           Alternatively,  you  can use a default setting program written in
  7431.           BASIC by Dave Walker of University  College  Cardiff  to  do  the
  7432.           changes: this is available on disc in file B.Patcher, or from the
  7433.           Lancaster  distribution  machine  in  file  BBCPATCHER.BAS.  This
  7434.           program handles the process automatically, so there is no need to
  7435.           consult the following section.
  7436.           
  7437.            The defaults block is not in a fixed place in the program image,
  7438.           but the code contains pointers to let you locate it. You can find
  7439.           the base of the defaults table in the following way:
  7440.           
  7441.           
  7442.           a. The sideways ROM version
  7443.           
  7444.           
  7445.             1. Look at byte $8007. This gives an offset  to  the  copyright
  7446.                text  in  the  ROM header. Add $8000 to the contents to form
  7447.                the address of the zero byte preceding the string.
  7448.                
  7449.             2. Follow to the end of the copyright string  (which  currently
  7450.  
  7451.  
  7452.                                       109
  7453.  
  7454.  
  7455.  
  7456.  
  7457.                              BBC KERMIT User Guide
  7458.  
  7459.  
  7460.                reads "(C) CUCCA 1986") and find the terminating zero byte.
  7461.                
  7462.             3. The succeeding bytes are then as follows:
  7463.                
  7464.                Byte 0    The mark number of this release.
  7465.                     1    The version number.
  7466.                     2-3  The  address  (low-high)  of the first byte of the
  7467.                          defaults table in the ROM.
  7468.                     4-5  The address (low-high) of the first unused byte in
  7469.                          the ROM.
  7470.                          
  7471.                          
  7472.           b. The RAM version
  7473.           
  7474.                The first bytes of the program are as follows
  7475.                
  7476.                Byte 0-2  A JMP instruction to the first executable byte  of
  7477.                          the image.
  7478.                     3    The mark number of this release.
  7479.                     4    The version number.
  7480.                     5-6  The  address  (low-high)  of the first byte of the
  7481.                          defaults table in the program.
  7482.                     7-8  The address (low-high) of the first unused byte in
  7483.                          the program.
  7484.                          
  7485.                Note that if you wish to add patch code to the program,  you
  7486.                should place it after the last byte of the image, then alter
  7487.                the  address  held  in bytes 7-8 to be that of the next byte
  7488.                after your added code. Failure to change this  address  will
  7489.                result    in   your   patch   being   overwritten   by   the
  7490.                dynamically-allocated file buffer when the program runs.
  7491.                
  7492.                
  7493.                
  7494.                
  7495.      A2.4.3 Format of the defaults block
  7496.      
  7497.      
  7498.         The data in the defaults block is defined as follows:
  7499.      
  7500.           Byte 0     The transmit baud rate. This should be set to a number
  7501.                      in the range 1..8, where the value is as for the *FX 7
  7502.                      command. (SET BAUD n TRANSMIT)
  7503.                      
  7504.                1     The receive baud rate. This should be set to a  number
  7505.                      in the range 1..8, where the value is as for the *FX 8
  7506.                      command. (SET BAUD n RECEIVE)
  7507.                      
  7508.                2     The  local  echo  flag,  set to 0 for off or 1 for on.
  7509.                      (SET LOCAL-ECHO)
  7510.                      
  7511.                3     No longer used.
  7512.                      
  7513.                4     The debug flag, set to 0 for off or  1  for  on.  (SET
  7514.                      DEBUGGING)
  7515.                      
  7516.  
  7517.  
  7518.                                       110
  7519.  
  7520.  
  7521.  
  7522.  
  7523.                              BBC KERMIT User Guide
  7524.  
  7525.  
  7526.                5     No longer used.
  7527.                      
  7528.                6     The timeout value BBC KERMIT will ask the other system
  7529.                      to use, in the range 0..94. (SET SEND TIMEOUT)
  7530.                      
  7531.                7     The  timeout  value  BBC KERMIT will use on the remote
  7532.                      system (if TIMER is on)  in  the  range  0..255.  (SET
  7533.                      RECEIVE TIMEOUT)
  7534.                      
  7535.                8     The  TIMER  flag,  set  to 0 for off or 1 for on. (SET
  7536.                      TIMER)
  7537.                      
  7538.                9     The pause BBC KERMIT uses on packet turnround, in  the
  7539.                      range 0..255 (SET PAUSE)
  7540.                      
  7541.                10    The  delay  after  the  SEND command is issued, in the
  7542.                      range 0..255 (SET DELAY)
  7543.                      
  7544.                11    No longer used.
  7545.                      
  7546.                12    No longer used.
  7547.                      
  7548.                13    The terminal mode keyclick flag, set to 0 for off or 1
  7549.                      for on. (SET KEY-CLICK)
  7550.                      
  7551.                14    The quote character BBC KERMIT will send. (SET QUOTE)
  7552.                      
  7553.                15    The  eight-bit  prefix  BBC  KERMIT   will   use   for
  7554.                      preference. (SET EIGHT-BIT-PREFIX)
  7555.                      
  7556.                16    The  end-of-line  byte  that  BBC  KERMIT uses for the
  7557.                      first packet it sends. (SET SEND END-OF-LINE)
  7558.                      
  7559.                17    The end-of-line byte the remote system will use.  (SET
  7560.                      RECEIVE END-OF-LINE)
  7561.                      
  7562.                18    The  pad  character  BBC  KERMIT  will send. (SET SEND
  7563.                      PADCHAR)
  7564.                      
  7565.                19    The number of pad characters  BBC  KERMIT  will  send.
  7566.                      (SET SEND PADDING)
  7567.                      
  7568.                20    The  pad  character  BBC  KERMIT  will  ask the remote
  7569.                      system to send. (SET RECEIVE PADCHAR)
  7570.                      
  7571.                21    The number of pad characters BBC KERMIT will  ask  the
  7572.                      other end to send. (SET RECEIVE PADDING)
  7573.                      
  7574.                22    The current parity setting. This should be one of:
  7575.                                    0 MARK
  7576.                                    1 SPACE
  7577.                                    2 EVEN
  7578.                                    3 ODD
  7579.                                    4 NONE
  7580.                                    
  7581.                23    The current file type. This should be 0 for ASCII or 1
  7582.  
  7583.  
  7584.                                       111
  7585.  
  7586.  
  7587.  
  7588.  
  7589.                              BBC KERMIT User Guide
  7590.  
  7591.  
  7592.                      for BINARY. (SET FILE TYPE)
  7593.                      
  7594.                24    The  current  end-of-record  type used for ASCII files
  7595.                      (SET FILE TYPE ASCII). The value should be one of:
  7596.                                    0 LFCR
  7597.                                    1 CRLF
  7598.                                    2 LF
  7599.                                    3 CR
  7600.                                    
  7601.                25    The current source of data. The value is 0 for FILE or
  7602.                      1 for MEMORY. (SET SOURCE)
  7603.                      
  7604.                26-27 The  base  address  for   the   source   memory   area
  7605.                      (low-high).  This  must  be  set if byte 25 is 1. (SET
  7606.                      SOURCE MEMORY)
  7607.                      
  7608.                28-29 The top address for the  source  memory  area  plus  1
  7609.                      (low-high).  This  must  be  set if byte 25 is 1. (SET
  7610.                      SOURCE MEMORY)
  7611.                      
  7612.                30    The current destination for  data  (SET  DESTINATION).
  7613.                      Values are
  7614.                      
  7615.                                    0 FILE
  7616.                                    1 MEMORY
  7617.                                    2 PRINTER
  7618.                                    
  7619.                31-32 The  base  address  for  the  destination  memory area
  7620.                      (low-high). This must be set if byte  30  is  1.  (SET
  7621.                      DESTINATION MEMORY)
  7622.                      
  7623.                33-34 The  highest  address  for the destination memory area
  7624.                      (low-high). The value is normally the base of the MODE
  7625.                      7 screen area $7BFF, and must be set if byte 30  is  1
  7626.                      (SET DESTINATION MEMORY).
  7627.                      
  7628.                35    The  start  of  packet  character that BBC KERMIT will
  7629.                      send. (SET SEND START-OF-PACKET)
  7630.                      
  7631.                36    The start of packet character that the  remote  system
  7632.                      will send. (SET RECEIVE START-OF-PACKET)
  7633.                      
  7634.                37    The  maximum  packet  size  BBC KERMIT asks the remote
  7635.                      system to send. (SET RECEIVE PACKET-LENGTH)
  7636.                      
  7637.                38    The size of the file buffer area used  in  pages.  the
  7638.                      value   must   be   in  the  range  1..64.  (SET  FILE
  7639.                      BUFFER-SIZE)
  7640.                      
  7641.                39    The file warning flag, set to 0 for off or 1  for  on.
  7642.                      (SET FILE WARNING)
  7643.                      
  7644.                40    The  incomplete  file  disposition  flag, set to 0 for
  7645.                      DELETE or 1 for KEEP. (SET INCOMPLETE)
  7646.                      
  7647.                41    The current flow control method, set to 0 for XON/XOFF
  7648.  
  7649.  
  7650.                                       112
  7651.  
  7652.  
  7653.  
  7654.  
  7655.                              BBC KERMIT User Guide
  7656.  
  7657.  
  7658.                      or 1 for CTS/RTS. (SET FLOW-CONTROL)
  7659.                      
  7660.                42    The significant size of the file suffix string defined
  7661.                      in the next field. The value is 1..8 if  a  suffix  is
  7662.                      wanted, or 0 if none is to be added. (SET FILE SUFFIX)
  7663.                      
  7664.                43-50 The  suffix  added  to a BBC name to generate a remote
  7665.                      file name. The number of characters used is defined by
  7666.                      byte 42. Note that the suffix does not include the "."
  7667.                      character. (SET FILE SUFFIX).
  7668.                      
  7669.                51    The TAKE-echo flag, set to 0 for off or 1 for on. (SET
  7670.                      TAKE-ECHO)
  7671.                      
  7672.                52    The colour  to  be  used  for  text  in  80  character
  7673.                      terminal  mode.  Colours  available  are  red,  green,
  7674.                      yellow, blue, magenta, cyan and  white,  corresponding
  7675.                      to values 1..7 (SET VDU-COLOUR)
  7676.                      
  7677.                53    *TV  flag, set to 1 if a *TV is to be done on entry to
  7678.                      terminal mode and 0 if it is not. (SET TV)
  7679.                      
  7680.                54-55 The two *TV parameters to be used if  byte  53  is  1.
  7681.                      (SET TV)
  7682.                      
  7683.                56    VDU  ignore  flag,  set to 1 if an ignore character is
  7684.                      defined, and 0 if it is not. (SET IGNORE)
  7685.                      
  7686.                57    The incoming terminal-mode character to be ignored  if
  7687.                      byte 56 is 1. (SET IGNORE)
  7688.                      
  7689.                58    The  number  of  byte  periods  to wait before testing
  7690.                      clear-to-send  when  transmitting  a  character.  (SET
  7691.                      MUX-WAIT)
  7692.                      
  7693.                59    The  character that triggers a help display in command
  7694.                      mode. (SET HELP-TRIGGER)
  7695.                      
  7696.                60    The maximum number of retries BBC KERMIT will make  in
  7697.                      an attempt to send a packet (SET RETRIES)
  7698.                      
  7699.                61    The  handshake  type in use (SET HANDSHAKE). The value
  7700.                      should be one of
  7701.                      
  7702.                                    0 NONE
  7703.                                    1 BELL
  7704.                                    2 CR
  7705.                                    3 LF
  7706.                                    4 XON
  7707.                                    5 XOFF
  7708.                                    
  7709.                62    The terminal emulation type to be used (SET TERMINAL).
  7710.                      The values currently allocated are:
  7711.                                    0 TT40
  7712.                                    1 TT80
  7713.                                    2 VT52
  7714.  
  7715.  
  7716.                                       113
  7717.  
  7718.  
  7719.  
  7720.  
  7721.                              BBC KERMIT User Guide
  7722.  
  7723.  
  7724.                                    3 VT100
  7725.                                    4 TEK
  7726.                                    5 Un-named (A)
  7727.                                    6 Un-named (B)
  7728.                                    
  7729.                      If the value is set to $FF, BBC Kermit  will  use  the
  7730.                      default appropriate to the machine it is running in.
  7731.                      
  7732.                63    Controls  how  filenames sent by the remote system are
  7733.                      handled (SET FILE NAME). Values allowed are:
  7734.                      
  7735.                                    0 Translate name from name.type format
  7736.                                    1 Use name exactly as specified
  7737.                                    
  7738.                                    
  7739.           The table format is fixed, and will not be changed  by  Lancaster
  7740.           in later releases. Additional facilities will be added to the end
  7741.           of  the  block  only. Note that it is up to you to make sure that
  7742.           the values you put in the default  block  make  sense:  what  BBC
  7743.           KERMIT  does  with  inconsistent  ones is unlikely to be anything
  7744.           you'ld like it to.
  7745.           
  7746.  
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754.  
  7755.  
  7756.  
  7757.  
  7758.  
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.                                       114
  7783.  
  7784.  
  7785.  
  7786.  
  7787.                              BBC KERMIT User Guide
  7788.  
  7789.  
  7790.      A2.5 THE HEX TO BINARY CONVERTER PROGRAM
  7791.      
  7792.      
  7793.           The Intel hex forms of the compiled BBC KERMIT and the  Lancaster
  7794.           65C02 assembler can be converted into binary files using a simple
  7795.           converter  supplied as the file BBCDEHEX.BAS. This can be brought
  7796.           on  to  a  BBC  disc  and  *EXEC'd  to  give  a  BASIC   program:
  7797.           alternatively,  since  the  program  is short, it can be typed in
  7798.           directly. For convenience, a listing of the program  is  supplied
  7799.           below.
  7800.           
  7801.           
  7802.             100 REM Intel hex to binary converter
  7803.             120 REM Version 2 November 1985
  7804.             140
  7805.             160 CLOSE#0
  7806.             180 DIM image 20480
  7807.             200
  7808.             220 INPUT "Name of input hex file?    " in$
  7809.             240 INPUT "Name of output binary file? " out$
  7810.             260 in%=OPENIN(in$)
  7811.             280 IF in%=0 THEN PRINT"Input file does not exist":END
  7812.             300
  7813.             320 imagesize% = 0
  7814.             340 record% = 0
  7815.             360 REPEAT
  7816.             380   REPEAT
  7817.             400     UNTIL (BGET#in%=ASC(":")) OR EOF#in%
  7818.             420   IF EOF#in% THEN PROCsave:CLOSE#0:END ELSE PROCreadrecord
  7819.             440   UNTIL FALSE
  7820.             460
  7821.             480 END
  7822.             500
  7823.             520
  7824.             540 DEF PROCreadrecord
  7825.             560 LOCAL count%,address%,storedcsum%,type%
  7826.             580 record%=record%+1
  7827.             600 csum%=0
  7828.             620 count%=FNgetbyte
  7829.             640 address%=FNgetbyte*256+FNgetbyte
  7830.             660 IF record%=1 THEN base% = address%
  7831.             680 PRINT"Record ";record%;" : Size ";count%;", address
  7832.           $";~address%
  7833.             700
  7834.             720 type% = FNgetbyte
  7835.             740 IF type%<>0 AND type%<>1 THEN PRINT"*** Unknown record type
  7836.           ";type%;" detected":CLOSE#0:END
  7837.             760 IF type% <> 0 THEN PRINT"+++ End-of-file record
  7838.           detected":ENDPROC
  7839.             780 PROCreaddata(count%)
  7840.             800 storedcsum% = FNgetbyte
  7841.             820 IF csum%<>0 THEN PRINT"*** Checksum error":CLOSE#0:END
  7842.             840 ENDPROC
  7843.             860
  7844.             880 DEF FNgetbyte
  7845.             900 LOCAL value%
  7846.  
  7847.  
  7848.                                       115
  7849.  
  7850.  
  7851.  
  7852.  
  7853.                              BBC KERMIT User Guide
  7854.  
  7855.  
  7856.             920 value%=FNgetnibble*16 + FNgetnibble
  7857.             940 csum% = (csum% + value%) AND &FF
  7858.             960 =value%
  7859.             980
  7860.            1000 DEF FNgetnibble
  7861.            1020 LOCAL char%
  7862.            1040 char% = BGET#in%
  7863.            1060 IF char%>=ASC("A") THEN =char%-ASC("A")+10 ELSE
  7864.           =char%-ASC("0")
  7865.            1080
  7866.            1100 DEF PROCreaddata(count%)
  7867.            1120 LOCAL I%
  7868.            1140 pointer% = address% - base%
  7869.            1160 FOR I% = 1 TO count%
  7870.            1180   image?pointer% = FNgetbyte
  7871.            1200   address% = address% + 1
  7872.            1220   pointer% = pointer% + 1
  7873.            1240   NEXT
  7874.            1260 IF pointer% > imagesize% THEN imagesize% = pointer%
  7875.            1280 ENDPROC
  7876.            1300
  7877.            1320 DEF PROCsave
  7878.            1340 loadaddress% = base% OR &FFFF0000
  7879.            1360 OSCLI("*SAVE
  7880.           "+out$+" "+STR$~image+" "+STR$~(imagesize%+image)+" "+STR$~loadad
  7881.           dress%+" "+STR$~loadaddress%)
  7882.            1380 ENDPROC
  7883.           
  7884.           
  7885.           
  7886.  
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.                                       116
  7915.  
  7916.  
  7917.  
  7918.  
  7919.                              BBC KERMIT User Guide
  7920.  
  7921.  
  7922.      A2.6 CONTACT ADDRESSES
  7923.      
  7924.      
  7925.      If you wish to use the ADE assembler/editor, you can obtain it from
  7926.      
  7927.                     SYSTEM
  7928.                     12 Collegiate Crescent
  7929.                     Sheffield
  7930.                     UK
  7931.                     
  7932.      See  adverts in Acorn User for the current price. Currently BBC KERMIT
  7933.      is compiled using version 2.02. ADE will continue to  be  the  primary
  7934.      assembly  method  used  for  BBC  KERMIT,  but  all releases from 1.42
  7935.      onwards will be also be fully  compatible  with  the  Lancaster  65C02
  7936.      assembler  supplied  with  it. The 65C02 assembler does not contain an
  7937.      editor, but you  can  use  any  word  processor  or  other  editor  to
  7938.      manipulate the source files.
  7939.      
  7940.         If  you  wish  advice,  or  have any bug reports or comments on BBC
  7941.      KERMIT, you can contact me at Lancaster University in several ways.
  7942.      
  7943.      Postal address
  7944.      
  7945.                     Alan Phillips
  7946.                     Communications Group
  7947.                     Department of Computing
  7948.                     Computer Building
  7949.                     Lancaster University
  7950.                     Lancaster UK
  7951.                     
  7952.                     
  7953.      Telephone
  7954.      
  7955.                     0524-65201 x 4881
  7956.                     
  7957.      Electronic mail
  7958.      
  7959.                     SYSKERMIT @ LANCS.VAX1
  7960.                     
  7961.                     JANET address 000010404000.FTP.MAIL
  7962.                     PSS address   234252400101.000010404000.FTP.MAIL
  7963.                     
  7964.         Contact by electronic mail is  the  preferred  method  if  you  can
  7965.      manage it: please remember to specify your name, where you are mailing
  7966.      from, and the full mail address and NRS name (if you have one) for the
  7967.      reply.  I  can  reply only with difficulty and no guarantee of success
  7968.      over ARPA, as the gateway I have to use is of low reliability: I  have
  7969.      no  authorisation  for  uucp  so  cannot reply at all by this route. A
  7970.      JANET address is preferred if you can provide one. I will  attempt  to
  7971.      reply  to  all  enquiries,  and  will  usually do so within one or two
  7972.      weeks: if you don't hear from me by then, you should assume that I  am
  7973.      unable  to  get  mail to you for some reason and contact me by another
  7974.      route.
  7975.      
  7976.         I will be pleased to supply  details  of  our  KERMIT  distribution
  7977.      service  on  request:  we  have a complete collection of all available
  7978.  
  7979.  
  7980.                                       117
  7981.  
  7982.  
  7983.  
  7984.  
  7985.                              BBC KERMIT User Guide
  7986.  
  7987.  
  7988.      KERMIT implementations, and can distribute  these  on  magnetic  tape,
  7989.      over the JANET or PSS networks, or, for some versions, on floppy disc.
  7990.      Distribution   is   free   to  all  educational  or  research  council
  7991.      institutions: commercial customers are asked to pay a  small  handling
  7992.      charge.  The  increasing  use  of  this  service  means that we cannot
  7993.      currently undertake distribution to new customers outside  the  UK  or
  7994.      Eire.
  7995.      
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.  
  8024.  
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.                                       118
  8047.  
  8048.  
  8049.  
  8050.  
  8051.                              BBC KERMIT User Guide
  8052.  
  8053.  
  8054.      
  8055.      APPENDIX 3 : USING THE EDT EDITOR ON VAX/VMS
  8056.      
  8057.      
  8058.         If  you are using the sideways ROM version of BBC KERMIT on a model
  8059.      B, or either version on a B+, B+128 or Master 128, you will be able to
  8060.      use the EDT screen editor on VAX/VMS mainframes to  edit  your  files.
  8061.      This Appendix describes how you should set up your job to do this, and
  8062.      how the BBC Computer's function keys are used to control the editor.
  8063.      
  8064.         If  you are using the RAM version of BBC KERMIT on a model B, which
  8065.      emulates only a 40 character wide teletype, you will still be able  to
  8066.      use EDT, but only in line mode.
  8067.      
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.  
  8081.  
  8082.  
  8083.  
  8084.  
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.                                       119
  8113.  
  8114.  
  8115.  
  8116.  
  8117.                              BBC KERMIT User Guide
  8118.  
  8119.  
  8120.      A3.1 SETTING UP THE TERMINAL DETAILS
  8121.      
  8122.      
  8123.         In  order to use the full facilities of the EDT editor you must, of
  8124.      course, set BBC KERMIT to provide a VT52 terminal emulation.  This  is
  8125.      the default setting, but if you have changed the terminal type you can
  8126.      return to VT52 mode with the command
  8127.      
  8128.                                SET TERMINAL VT52
  8129.      
  8130.      before you use the CONNECT command to enter terminal mode.
  8131.      
  8132.         Depending  on  how the VAX/VMS system has been set up, you may also
  8133.      need to configure it to know that your terminal is a VT52 and not, for
  8134.      instance, a VT100. You can see what VMS thinks  your  terminal  is  by
  8135.      issuing the DCL command
  8136.      
  8137.                                 $ SHOW TERMINAL
  8138.      
  8139.      during a job. If the default terminal type is a VT52, you need take no
  8140.      further action: EDT will automatically adapt itself to use the correct
  8141.      screen control commands.
  8142.      
  8143.         If,  though, the default terminal type is not a VT52, you will need
  8144.      to take some action. You can do one of several things here:
  8145.      
  8146.          1. If you are  connected  to  your  VAX  system  with  a  directly
  8147.             connected  permanent line, you could ask your system manager to
  8148.             set the terminal characteristics that VMS will use.  This  will
  8149.             be permanent, and once it is done the default terminal type for
  8150.             that line will be a VT52. This will not, though, be possible if
  8151.             you  are  using  some  sort  of  network to link you to the VAX
  8152.             system.
  8153.             
  8154.          2. Whenever you start a terminal job, you could issue the command
  8155.             
  8156.                            $ SET TERMINAL/DEVICE=VT52
  8157.             
  8158.             to tell VMS that you are using a VT52. You must do  this before
  8159.             you  use  the  EDT editor (or anything else, such as MAIL, that
  8160.             sends screen-control characters). You could include the command
  8161.             in your LOGIN.COM file to save you having to remember to  issue
  8162.             it every time: however, the terminal type will then be wrong if
  8163.             you ever use a device that is not a VT52.
  8164.             
  8165.          3. You could include in your LOGIN.COM file the command
  8166.             
  8167.                                $ SET TERM/INQUIRE
  8168.             
  8169.             This  will  make VMS send an "inquiry sequence" to the terminal
  8170.             when you log in: BBC KERMIT will  then  identify  itself  as  a
  8171.             VT52,  and VMS will set itself up accordingly. This is probably
  8172.             the preferable method, since it will adapt itself automatically
  8173.             whatver device type you use. However, there are some drawbacks.
  8174.             If you use a device  that  does  not  respond  to  the  inquiry
  8175.             sequence  you will see some rubbish charaters appear, and login
  8176.  
  8177.  
  8178.                                       120
  8179.  
  8180.  
  8181.  
  8182.  
  8183.                              BBC KERMIT User Guide
  8184.  
  8185.  
  8186.             may be slowed down slightly: also, any commands you type  while
  8187.             waiting  for  the login sequence to complete will be discarded.
  8188.             There is also the problem that  some  peculiar  terminals  (ICL
  8189.             terminals  are  apparently  bad here) may interpret the inquiry
  8190.             sequence as something  else  entirely,  and  may  do  something
  8191.             strange or even stop working altogether.
  8192.             
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.                                       121
  8245.  
  8246.  
  8247.  
  8248.  
  8249.                              BBC KERMIT User Guide
  8250.  
  8251.  
  8252.      A3.2 EDIT KEYPAD KEYS
  8253.      
  8254.      
  8255.         As we saw in section 4.4, the models B, B+ and B+128 do not possess
  8256.      keys  corresponding  to  the  VT52 keypad, so BBC KERMIT emulates them
  8257.      using the red function keys. Section 4.4 specified the  actual  ESCAPE
  8258.      sequences  that  the keys will send to the host computer in VT52 mode:
  8259.      here we shall consider the use of the keys in terms of the EDT editor.
  8260.      If you have a Master 128 you will be able to use the  keypad  keys  to
  8261.      send the ESCAPE sequences.
  8262.      
  8263.      
  8264.      A3.2.1 Models B, B+ and B+128
  8265.      
  8266.           These  machines  do not have keypads, so you will need to use the
  8267.           red function keys to send the ESCAPE sequences to EDT. Note  that
  8268.           some editor functions are invoked by pressing a sequence of keys:
  8269.           in the list below
  8270.           
  8271.                                        F3
  8272.           
  8273.           indicates that you should press key F3, and
  8274.           
  8275.                                   SHIFT-F1/F3
  8276.           
  8277.           indicates that you should press SHIFT-F1 (the GOLD function) then
  8278.           F3.
  8279.           
  8280.           
  8281.           BBC key sequence         VT52 keypad key     EDT function
  8282.           
  8283.           SHIFT-F1                 PF1                 GOLD
  8284.           
  8285.           SHIFT-F2                 PF2                 HELP
  8286.           
  8287.           SHIFT-F3                 PF3                 DELETE LINE
  8288.           SHIFT-F1/SHIFT-F3        GOLD/PF1            UNDELETE LINE
  8289.           
  8290.           SHIFT-F7                 PERIOD              SELECT
  8291.           SHIFT-F1/SHIFT-F7        GOLD/PERIOD         RESET
  8292.           
  8293.           SHIFT-F8                 ENTER               ENTER
  8294.           SHIFT-F1/SHIFT-F8        GOLD/ENTER          SUBS
  8295.           
  8296.           F0                       0                   LINE
  8297.           SHIFT-F1/F0              GOLD/O              OPEN LINE
  8298.           
  8299.           F1                       1                   WORD
  8300.           SHFT-F1/F1               GOLD/1              CHANGE CASE
  8301.           
  8302.           F2                       2                   EOL
  8303.           SHIFT-F1/F2              GOLD/2              DELETE EOL
  8304.           
  8305.           F3                       3                   CUT
  8306.           SHIFT-F1/F3              GOLD/3              PASTE
  8307.           
  8308.  
  8309.  
  8310.                                       122
  8311.  
  8312.  
  8313.  
  8314.  
  8315.                              BBC KERMIT User Guide
  8316.  
  8317.  
  8318.           F4                       4                   ADVANCE
  8319.           SHIFT-F1/F4              GOLD/F1             BOTTOM
  8320.           
  8321.           F5                       5                   BACKUP
  8322.           SHIFT-F1/F5              GOLD/5              TOP
  8323.           
  8324.           F6                       6                   DELETE CHAR
  8325.           SHIFT-F1/F6              GOLD/F6             UNDELETE CHAR
  8326.           
  8327.           F7                       7                   PAGE
  8328.           SHIFT-F1/F7              GOLD/7              COMMAND
  8329.           
  8330.           F8                       8                   FIND NEXT
  8331.           SHIFT-F1/F8              GOLD/8              FIND
  8332.           
  8333.           F9                       9                   DELETE WORD
  8334.           SHIFT-F1/F9              GOLD/9              UNDELETE WORD
  8335.           
  8336.           UP                       UP                  CURSOR-UP
  8337.           SHIFT-F1/UP              GOLD/UP             REPLACE
  8338.           
  8339.           DOWN                     DOWN                CURSOR-DOWN
  8340.           SHIFT-F1/DOWN            GOLD/DOWN           SECT
  8341.           
  8342.           RIGHT                    RIGHT               CURSOR-RIGHT
  8343.           SHIFT-F1/RIGHT           GOLD/RIGHT          SPECINS
  8344.           
  8345.           LEFT                     LEFT                CURSOR-LEFT
  8346.           SHIFT-F1/LEFT            GOLD/LEFT           APPEND
  8347.           
  8348.           
  8349.           
  8350.      A3.3.2 The Master 128
  8351.      
  8352.      
  8353.           This  machine  possesses  a  keypad  to  the  right  of  the main
  8354.           keyboard, and the arrangement of  these  keys  closely  parallels
  8355.           what  you  would  find  on  a  real terminal. The key arrangement
  8356.           differs most in that the cursor keys on a real VT52  are  in  the
  8357.           keypad area: on the Master they are separate, and the keypad keys
  8358.           that occupy these positions are not used.
  8359.           
  8360.           
  8361.           The  keypad  sends  EDT  control sequences as follows. If the key
  8362.           diagram shows  two  functions,  the  upper  one  is  selected  by
  8363.           pressing  the  key  alone,  and  the  lower  is obtained by first
  8364.           pressing GOLD, then pressing the key.
  8365.           
  8366.           
  8367.           
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.                                       123
  8377.  
  8378.  
  8379.  
  8380.  
  8381.                              BBC KERMIT User Guide
  8382.  
  8383.  
  8384.                        ---------------------------------
  8385.                        !       !       !       !       !
  8386.                        ! GOLD  ! HELP  ! DEL L !       !
  8387.                        !       !       ! UND L !       !
  8388.                        !       !       !       !       !
  8389.                        ---------------------------------
  8390.                        !       !       !       !       !
  8391.                        ! PAGE  ! FNDNXT! DEL W !       !
  8392.                        ! COMND ! FIND  ! UND W !       !
  8393.                        !       !       !       !       !
  8394.                        ---------------------------------
  8395.                        !       !       !       !       !
  8396.                        ! ADV   ! BACKUP! DEL C !       !
  8397.                        ! BOTTOM! TOP   ! UND C !       !
  8398.                        !       !       !       !       !
  8399.                        ---------------------------------
  8400.                        !       !       !       !       !
  8401.                        ! WORD  ! EOL   ! CUT   !       !
  8402.                        ! C CASE! D EOL ! PASTE !       !
  8403.                        !       !       !       !       !
  8404.                        ---------------------------------
  8405.                        !       !       !               !
  8406.                        ! LINE  ! SELECT!    ENTER      !
  8407.                        ! OPN L ! RESET !    SUBS       !
  8408.                        !       !       !               !
  8409.                        ---------------------------------
  8410.      
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.                                       124
  8443.  
  8444.  
  8445.  
  8446.  
  8447.