€CEAcorn Computers
€CEAdvanced VLSI Research Group

€CETerminal software

   This document describes the first internal release of the terminal
software developed by the VLSI group for internal use.  This document
is aimed primarily at users of large computers who wish to make full
use of the file transfer facilities in this software.

   NOTE that this software is currently subject to development, and
is in a state of flux.  Likely changes from the current implementation
will be marked in the text below whenever possible.

   The program being distributed is in two parts:  the first is a
terminal program, much like any other, which lets you talk to a remote
computer.  The second is a bona-fide BBC Micro filing system.

   The filing system aspect is the new feature of this code which makes
it different from previous terminal roms.  The rom implements most of the
filing system entry points defined by the MOS. It accepts commands through
these entry points, and converts the commands into protocol which it sends
across the RS423.

   Each host system runs a program which interfaces to this protocol,
and which converts the BBC file operations into host file opertaions.
Usually, this conversion will be one to one; the operations of
LOAD file and SAVE file are fairly straightforward; BGET and BPUT are
likewise relatively simple.  Operating system obscurities (such as
records in place of lines with <crs>) can be hidden by this program.

   Hosts which cannot directly implement some calls (such as the
PTR# call from BASIC) have the option of either returning an error
string (which will force an error on the micro) or emulating the
operation by implementing a pseudo-disk in some way.

   Storing an open file as an array in ram would be one way of achieving
this effect.


€CEProtocol definition

   This describes the exact definition of the protocol which must be
implemented by a host to talk to the current rom.  This software to
implement this should be written in a modular fashion and be easily
alterable, as the likelyhood of these protocols changing is fairly high.

   A sample implementation is provided (in Modula2 for Unix), but this
should be used only as a rough guide in case of doubt.  We really want
to see new implementations in different languages, to distribute to
others sites along with the rom.  It is intended that the current rom
and any host software should be distributed free.  Acorn may take up
the idea later and support the package, including writing new host
support packages for the more common machines.  If this happens, the
software will be sold by Acornsoft, and implementors of early host
support packages may be approached to see if they are willing to part
with their code for cash.  So, remember to include a copyright string
in anything you write.  Nothing written outside Acorn will be sold
without explicit permission of its authors.

   The current system is predicated upon having single character I/O
on the host system, although fully transparent 8-bit I/O is not required.
The systems uses the ASCII printable set, and the character <esc> (hex1B).
A future version may allow for hosts which can only send and receive data
in buffered lines.  <esc> was chosen, as it almost certain that any system
which can use cursor-addressable terminals (which use <esc>) will be
able to receive this character.  Some systems may use <esc> as an
interrupt character, but these normally have a way of re-defining the
interrupt character to be something else.  If this issue proves
problematic, the final rom will be changed to allow the internal <esc>
character to be re-defined.

   Here is the protocol:

Definitions

   <hex pair>          byte in range ASC("0")..ASC("0")+15 twice
                          (note that this is NOT 0..9, A..F)

   <esc>               byte of decimal 27 (hex 1B)

Basic operations:

   LOAD                  L
   SAVE                  S
   OPEN INPUT            I
   OPEN OUTPUT           O
   REMOTE COMMAND        X
   DIR                   D
   LIB                   R
   CAT                   C
   DELETE                K
   RENAME                M
   COPY                  T
   FILE ENQUIRE          F
   BGET                  !
   BPUT                  <hex pair>
   CLOSE INPUT           {
   CLOSE OUTPUT          }
   KILL FILING SYSTEM    .

LOAD

           BBC -> HOST                HOST -> BBC

           L
                                      <esc>
                                      <16 hex pairs>
                                      <esc>
           <esc>
                                      <multiple hex pairs>
                                      <esc>
           <esc>


