home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
archives
/
bbcmicro.zip
/
bbckerdoc.txt
< prev
next >
Wrap
Text File
|
1988-08-16
|
273KB
|
8,447 lines
BBC KERMIT USER GUIDE
=====================
This guide describes how to use the implementation of KERMIT for the
BBC Computer produced by the Computing Department's Communications
Group at Lancaster University. BBC KERMIT may be used on BBC models B,
B+ and B+128; and also on the Master 128. It operates with the Acorn
DFS, 1770 DFS, ADFS, Econet, and any other Acorn-compatible filing
system.
The information in this edition applies to version 1.42
EDITION 4.1
July 1986
Alan Phillips
BBC KERMIT User Guide
CONTENTS
1. INTRODUCTION
1.1 BBC KERMIT capabilities at a glance
2. AN OVERVIEW OF KERMIT
3. CONTROLLING BBC KERMIT
3.1 Entering BBC KERMIT
3.1.1 The RAM version
3.1.2 The sideways ROM version
3.2 Leaving BBC KERMIT
3.3 BBC KERMIT command language
3.3.1 Command format
3.3.2 Abbreviating commands and parameters
3.3.3 Numeric parameters
3.3.4 Obtaining help
3.4 Reading commands from a file
3.5 Storing parameter settings
3.6 Setting the command screen width
3.7 Function and cursor keys
3.8 Using an auto-boot file
4. USING BBC KERMIT AS A TERMINAL EMULATOR
4.1 Running a terminal session
4.1.1 Choosing the terminal emulation required
4.1.2 Setting the line speed
4.1.3 Setting parity
4.1.4 Selecting the flow control method
4.1.5 Specifying an "ignore" character
4.1.6 Starting terminal emulation
4.1.7 Sending a break signal
4.1.8 Using the function keys
4.1.9 Using the cursor keys
4.1.10 Pausing screen output
4.1.11 Returning to command mode
4.2 Logging output to a disc file
4.3 Logging output to a printer
4.4 Sending files to a host without KERMIT
4.5 VT52 keypad emulation
BBC KERMIT User Guide
5. TRANSFERRING FILES WITH KERMIT
5.1 Principles
5.2 File type
5.2.1 Binary files
5.2.2 Printable text (ASCII) files
5.2.3 How to decide on the file type to use
5.3 Sending eight bit data
5.4 Starting up the mainframe KERMIT
5.5 Using BBC KERMIT with a remote server
5.5.1 Sending files to a server
5.5.2 Fetching files from a server
5.5.3 Controlling a remote server
5.5.4 Closing down the server
5.6 Using BBC KERMIT with a remote non-server
5.6.1 Sending files to a non-server
5.6.2 Receiving files from a non-server
5.7 Transferring data to and from memory
5.8 Transferring data to a parallel printer
5.9 Handling problems
5.10 Advanced facilities
5.10.1 Interrupting transfers
5.10.2 Using timeouts
5.10.3 File name translation
5.10.4 Detailed protocol control
Appendices
A1. BBC KERMIT COMMANDS
A1.1 Commands for general control of BBC KERMIT
A1.2 Commands for transferring data
A1.3 Commands for terminal emulation
A1.4 Commands for control of remote servers
A1.5 Commands for detailed protocol control
A2. OBTAINING, BUILDING AND MODIFYING BBC KERMIT
A2.1 Obtaining BBC KERMIT
A2.1.1 The source files
A2.2 Building BBC KERMIT from a hex file
A2.3 Building BBC KERMIT from source
A2.3.1 Source file layout
A2.3.2 The assembly process
A2.4 Changing KERMIT defaults
A2.4.1 Changing the source
A2.4.2 Patching the object code
A2.4.3 Format of the defaults block
A2.5 The hex to binary converter program
A2.6 Contact addresses
BBC KERMIT User Guide
A3. USING THE EDT EDITOR ON VAX/VMS
A3.1 Setting up the terminal details
A3.2 Edit keypad keys
A3.2.1 Models B, B+ and B+128
A3.2.2 The Master 128
BBC KERMIT User Guide
1: INTRODUCTION
This user guide describes the KERMIT implementation on the BBC
Micro produced by the Communications Group of the Computing Department
at Lancaster University. It is intended to provide enough information
for a novice KERMIT user to be able to transfer data to and from his
BBC micro to another KERMIT system. Other KERMIT systems are desribed
only in passing: thus you will almost certainly need to consult the
equivalent user guide for the KERMIT system on the other machine.
The guide is divided into several chapters. The next chapter is a
general overview of KERMIT as a whole, and explains its advantages as
a file transfer system over "dumb capture" pograms. The succeeding
chapter describes the command language that BBC KERMIT uses. Following
that are chapters that describe how to use BBC KERMIT as a terminal,
and how to use it to transfer data.
The appendices comprise the "reference section". They describe in
full detail the commands available in BBC KERMIT, grouping them by
functionality (i.e. "Commands for file transfer", "Commands for
terminal emulation", etc). They also describe how to obtain BBC
KERMIT, and, having obtained it, how to build it from the assembly
language sources or modify the compiled binary version.
BBC KERMIT is, of course, freely available to anyone who wants it.
It can be obtained from the KERMIT tapes distributed by Columbia
University; alternatively, it can be picked up from Lancaster
University's KERMIT distribution service. This latter option enables
it to be acquired either over file transfer from the Lancaster
University VAX 11/780 system, or on Acorn format discs, or (in small
numbers) as programmed EPROMs. The Lancaster KERMIT distribution
service also maintains on-line bulletin files giving details of new
releases of BBC KERMIT and of reported bugs: these can be consulted in
a public-access username.
Lancaster University intend to continue development of the BBC
KERMIT system. We welcome any comments or suggestions that you may
wish to pass on, as well as reports of bugs, problems and deficiencies
in the program or the documentation. The addresses are given in
Appendix 2.
1
BBC KERMIT User Guide
1.1 BBC KERMIT CAPABILITIES AT A GLANCE
Local operation Yes
Remote operation No
Transfer text files Yes
Transfer binary files Yes
Wildcard send Yes
^X/^Z interruption Yes
Filename collision avoidance Yes
Can time out Yes
8th-bit-prefixing Yes
Repeat count prefixing No
Alternate block checks No
Terminal emulation Yes
Communications settings Yes
Transmit BREAK Yes
IBM mainframe communication Yes
Transaction logging No
Session logging (raw download) Yes
Raw transmit Yes
Act as server No
Talk to server Yes
Advanced server functions No
Advanced commands for servers Yes
Local file management Yes
Handle file attributes No
Command files Yes
Command macros No
2
BBC KERMIT User Guide
2: AN OVERVIEW OF KERMIT
KERMIT is a system, devised at the Center for Computing Activities
at the University of Columbia in New York (CUCCA), to permit the
simple and flexible transfer of data from a microcomputer to a
mainframe or another microcomputer. CUCCA retain the copyright on
KERMIT (the programs are not "public domain"), but have published full
information on it and permit anyone to implement it on their own
machines, provided this is not done for commercial purposes and that
copies are sent to them for distribution. The result is that KERMIT is
now available on a very wide range of machines indeed: very few micros
and mainframes do not have a KERMIT of some sort suitable for them,
and the programs can be easily acquired from the Lancaster University
KERMIT distribution service.
The primary design aim of KERMIT is to permit the reliable transfer
of any data whatsoever between systems, and to make the data usable on
the system that receives it if this is possible. To illustrate why
this is important, and not possible with simple systems, we can
consider an ordinary terminal emulation system that allows data to be
captured into files or sent from them.
Simple terminal emulator systems, such as those commercially
available for the BBC micro, do permit you to transfer files from a
mainframe in a rudimentary way. You would tell the emulator to copy
any characters that appear on the screen into a file, then ask the
mainframe to display the file. The reverse process would let you input
data into a mainframe file from your BBC discs.
The problems arise in the nature of the communications system that
connect the micro to the mainframe, and how the mainframe itself uses
this system. A character of data in a file occupies one byte, which
consists of 8 binary digits or "bits". If you regard the pattern of
bits representing a character as a number, this allows numbers ranging
from 0 to 255 to be used. However, many communications systems will
allow only 7 of the eight bits to be transmitted along them. The most
significant bit, termed the "parity bit", is used by the
communications system as an error-checking device. Thus, even though
you send a byte of 8 bits to the mainframe, it may receive only 7 of
them. This immediately restricts the range of characters that can be
sent to those whose codes are in the range 0 to 127.
A further restriction may be imposed if the communications system
uses some of those characters for its own control purposes: thus
systems often will use the characters whose codes are 17 and 19 to
prevent overloads occurring. In such systems, you cannot transmit
these characters at all. To make matters even worse, some machines
will (apparently arbitrarily) decide that you could not possibly want
to send some characters, so, if you do send them, it will change them
into something else entirely.
As far as the BBC micro is concerned, you could just about live
with such problems. The character range 0 to 127 covers all the
printable characters, so that transferring text files should just
about be possible. Of course, if the communications line you are using
3
BBC KERMIT User Guide
is unreliable or noisy (a dial up connection over telephone lines, for
instance, can be expected to garble a significant number of
characters) there is nothing to prevent data being corrupted in
transmission, so that you will never be sure that the data that
arrives is the data that you sent.
But although text files are about manageable, those including
teletext control codes or word processor control codes are highly
unlikely to be, since such codes are likely to lie in the range 128 to
255. And tokenised BASIC programs produced by SAVE haven't a hope of
being transferred in any useful way at all.
KERMIT overcomes all these difficulties by encoding the data it
sends according to a standard set of rules or "protocol". The rules
recognise that many characters cannot be transmitted down a
communications line, so if those characters occur, they will be
translated into something that can be transmitted. The receiving end,
of course, will translate them back again to what they were. This
technique enables you to send any data at all, even SAVEd BASIC files
or machine code programs. It further guarantees that the data you send
is the data that arrives, since KERMIT uses special methods for
detecting garbling and will repeat any transmissions that did not get
through correctly. KERMIT's encoding and checking techniques are more
efficient than some other systems that offer this facility, since only
bytes that need encoding actually are encoded, thus keeping the volume
of data sent to the minimum possible.
Besides the problems of actually transferring data corectly, there
is the problem of making it usable on the other end of the
transmission link. If you are sending, say, a SAVEd BASIC program to a
VAX, this isn't a problem, since the VAX can't understand BBC BASIC
anyway. Nor does it matter if you use the VAX system only as an
archive: it's irrelevant how the data is held on the VAX, as long as
when it is brought back to the BBC side it looks the same as when it
was sent.
The usability problem does appear, though, if you want to move a
file from a BBC to a VAX and then actually use it on the VAX. You
might, for instance, word process a file on a BBC, then send it to a
VAX to be printed. In this case, you do not want to transfer the data
byte-for-byte, since the way the BBC and the VAX denote things like
the end of each line of text will almost certainly be different. What
you require is that the file of printable lines on the BBC, which you
can process on that machine, becomes a file of printable records on
the VAX, that can be processed there.
Using a dumb terminal emulator system would probably let you send
the data, but it would appear byte-for-byte as it was on the BBC. And
probably you would get a file on the VAX with extra line-feeds and
carriage-returns that would need laborious editing before you could
use the file sensibly.
With KERMIT the problem can easily be circumvented. The KERMIT
protocols define a standard way of indicating the end of a printable
line. When you send a file from the BBC, BBC KERMIT will translate
whatever ends the lines of text in your file into this standard form
4
BBC KERMIT User Guide
before sending the data. The receiving end, seeing this standard
end-of-line indicator, will translate it into however it indicates
end-of-line. You thus end up with a usable file of lines, with no
extra characters anywhere.
The requirements you must meet before using KERMIT are simple. You
will need a BBC KERMIT in your BBC micro; a KERMIT program in whatever
mainframe or micro you wish to transfer data to; and a way of linking
the machines, be it a network, an ordinary cable, or a piece of wet
string.
For a micro to micro transfer KERMIT is extremely simple to use.
You would, for example, tell one machine that it is going to receive a
file, tell the other to send it, and sit back and let them get on with
it. Micro to mainframe transfers involve an extra step, which is also
simple. BBC KERMIT includes its own terminal emulator program: you
initially use this to log in to the mainframe as though the BBC micro
were an ordinary terminal. Once logged in, you start the KERMIT
program on the mainframe, and can then flip from giving commands to
this mainframe KERMIT, to giving commands to BBC KERMIT. As before,
once you have told each side to transfer a file, you just sit back and
relax while it happens.
And KERMIT provides one further facility to help you spend your
time doing more useful things. As well as sending one file at a time
from one machine to the other, you can send them in groups: thus, you
could say "send all the files on my disc to the VAX" in one command.
The KERMIT programs will send the files one by one until all are gone,
quite automatically.
5
BBC KERMIT User Guide
3: CONTROLLING BBC KERMIT
In this section we shall look at how you start and stop BBC KERMIT,
and also how its command language operates.
6
BBC KERMIT User Guide
3.1 ENTERING BBC KERMIT
BBC KERMIT exists in two versions: one that runs as an ordinary
program in the BBC Computer's main memory, and one that is programmed
into an EPROM and runs as a sideways ROM. The versions have the same
file transfer facilities, but the version that runs in memory provides
only a 40-character terminal emulation on the model B as opposed to an
80-character VT52 emulation. On models B+ and B+128, and the Master
128, both versions give identical terminal emulation facilities.
BBC KERMIT is not compatible with the 6502 second processor, so if
you have been using one you will need to power it off and press
CONTROL-BREAK to reset the system. Similarly it will not run on the
Master Turbo-Card: you will need to use the control panel or
*CONFIGURE command to disable the card before using BBC KERMIT.
3.1.1 The RAM version
The RAM version of BBC KERMIT will be kept on a disc, and it is
up to you what you call the file. Assuming it is called KERMIT,
you could enter it with the command
*RUN KERMIT
If the file is in the default or library directory, you could run
it by simply typing
*KERMIT
The BBC Computer User Guide and the guide for the Disc Filing
System you are using will explain this in more detail if you wish
to consult them.
3.1.2 The sideways ROM version
The EPROM containing the sideways ROM version of BBC KERMIT
should be fitted into one of the sideways ROM sockets on your
machine in the same way as other sideways ROMs such as Wordwise.
If you are using a model B or B+ with a sideways RAM board, or
have a B+128 or Master 128, you will be able to load the BBC
KERMIT sideways ROM version to sideways RAM and run it there, as
the program is completely unprotected.
If you fit the BBC KERMIT ROM as the highest priority language
ROM in the machine, you will find that the KERMIT command mode
screen will appear when you power the machine on. Otherwise, you
will need to give an operating system command to enter KERMIT:
7
BBC KERMIT User Guide
simply type
*KERMIT
and the KERMIT command mode screen will appear.
The command you give can be abbreviated if you wish, but you must
follow the abbreviation with a ".". The minimum abbreviation
possible is "*KER.", so you could type any one of
*KER.
*KERM.
*KERMI.
or *KERMIT
if you wished.
8
BBC KERMIT User Guide
3.2 LEAVING BBC KERMIT
To leave either the RAM or sideways ROM versions of BBC KERMIT you
would normally use the EXIT command. This will reset the parts of the
system that KERMIT has been using, and will enter BASIC.
Alternatively, you can issue an operating system command such as
*WORDWISE if you wish to enter another language ROM. Here, though, you
may need to press the BREAK key to reset the screen if the new
language ROM does not do this itself.
Note that the RAM version of BBC KERMIT adjusts OSHWM so that
commands such as *COMPACT will not corrupt the KERMIT program. OSHWM
is reset when you use the EXIT command or press CONTROL-BREAK;
however, if you leave KERMIT with, for example, *BASIC, OSHWM is not
reset, so you will find that you have very little memory left for
programs. Pressing CONTROL-BREAK will correct this.
9
BBC KERMIT User Guide
3.3 BBC KERMIT COMMAND LANGUAGE
You control what you want BBC KERMIT to do, and how it should do
it, by giving it commands in its "command language". The format of the
command language closely follows that used on most other KERMIT
implementations on other machines.
There are some diferences in what commands are available between
the sideways ROM version and the RAM version of BBC KERMIT. These
differences will be noted in the following sections of this guide, and
are marked clearly in Appendix 1.
3.3.1. Command format
When you start BBC KERMIT, you will see a MODE 7 screen known as
the "command screen" appear. This will be showing a prompt line
saying
BBC>
in yellow, indicating that BBC KERMIT is expecting you to type a
command. You can type either a KERMIT command, or an operating
system command preceded as usual by a "*". This allows you, for
instance, to look at a disc catalogue, or to delete files from
within KERMIT. Like operating system commands, KERMIT commands
can be typed in upper case, lower case, or any mixture of the two
as you please.
KERMIT's own commands are not preceded by an asterisk. They all
take the form of a command name, such as "SET", sometimes
followed by one or more further pieces of information or
"parameters", which must be separated from each other by spaces.
For example, one command you might use is
SET PARITY EVEN
to set one of the values used for communicating with the other
system. Here the command is "SET", and "PARITY" and "EVEN" are
parameters to the command. Since there are a large number of
variations to the SET command, these are often referred to in
this guide as separate commands. Thus you will see references to
the "SET FILE TYPE" command, for instance. You can regard this as
either a command whose name has spaces in it, or as a form of the
SET command with its first parameters "FILE" and "TYPE". In
either case, the effect will be the same.
At the end of each command you should press the RETURN key to
send the line to KERMIT for action. If you have made a typing
mistake you can use the cursor keys and the DELETE key exactly as
for other BBC micro languages. Pressing CONTROL and U together
will cancel the entire input line.
10
BBC KERMIT User Guide
Appendix 1 gives the complete specification of all the BBC KERMIT
commands. The commands are grouped according to their function
(such as "file transfer control"), rather than in one
alphabetical list. Thus you will find variations of the SET
command appearing in many places, grouped with other commands
that function in the same area.
Sometimes, not all the parameters of some commands need be typed.
In these cases, BBC KERMIT will take a "default" value for the
parameter you did not supply. The reference section will tell you
which parameters can be omitted, and what values BBC KERMIT will
assume if they are omitted.
3.3.2. Abbreviating commands and parameters
To reduce the amount of typing that you need to do, BBC KERMIT
allows you to abbreviate all commands and most parameters. You
may abbreviate to as few characters as you wish, provided that
what you type is unique. Thus
TAKE
TAK
TA
are legal, but
S
is not, since it could stand for either SET, SAVE or SHOW. To
take a full example, you could type either
SET FILE TYPE BINARY
or abbreviate it as far as
SE FI T B
3.3.3. Numeric parameters
Except where explicitely stated, numeric parameters to commands
can be typed in either decimal or hexadecimal. By default, BBC
KERMIT expects the value to be decimal, but you can indicate a
hexadecimal number by preceding the parameter with either "X",
"$" or "&".
Thus
11
BBC KERMIT User Guide
123
is a decimal value, and
&123
is a hexadecimal value.
As an example: the number 28 (decimal) is expressed in
hexadecimal as 1C, so the two commands
SET SEND PADDING 28
and
SET SEND PADDING &1C
will have the same effect.
3.3.4. Obtaining help
Quite often, you may wish a reminder as to what parameters or
commands you can give. BBC KERMIT has an "auto-help" facility
that will act as an "aide-memoire" for you.
To use auto-help, simply type a "?" at any place in an input line
while typing a command. BBC KERMIT will immediately give you a
list of the commands or parameters that you can use at that place
in the line, or will output a short message explaining the use of
that parameter. It then retypes the command line up to the place
where you typed the question mark, so that you can type in one of
the options. You can, of course, change your mind and rub out all
or part of the line at this point, or press ESCAPE to cancel it
altogether.
For example, if you type a question mark after the prompt thus:
BBC> ?
BBC KERMIT will output a list of the commands you can use. If you
choose the LOGGING command, you might then type
BBC> LOGGING ?
BBC KERMIT will now tell you that you can type either ON or OFF
at this point, and will retype your line, so you will now see
BBC> LOGGING
with the cursor positioned after "LOGGING", ready for more input.
12
BBC KERMIT User Guide
If you type a question mark at a place where there are no more
possible parameters, BBC KERMIT will output
No more parameters for this command
to indicate that here you can only either type RETURN to obey the
command, or change the line to something else.
The examples above have shown the "?" character as the
"help-trigger" that invokes auto-help. There may, though, be
times when you require to type a "?" without it causing this
action - for example, as part of a remote filename. BBC KERMIT
lets you redefine the character that will trigger auto-help with
the SET HELP-TRIGGER command: you can set it to any of the
characters "?", "&", "/", "#", or "@".
Automatic line retyping will also occur if you make a mistake in
a command. BBC KERMIT will retype the line up to the point where
it found the error, so you will not need to type the entire line
again.
13
BBC KERMIT User Guide
3.4 READING COMMANDS FROM A FILE
As an alternative to typing commands in on the keyboard, you can
place them in a file (for example using *BUILD or a word processor)
known as a "TAKE file", and tell BBC KERMIT to read the commands from
there instead of from the keyboard. This is done with the TAKE
command.
BBC KERMIT will read the file in as though the characters were
coming from the keyboard, and will obey its contents as commands. You
can include either KERMIT commands or operating system commands in the
file, the only exception being another TAKE command, which is not
allowed. Additionally, you can place comment lines in the file to
describe what it does: any line that starts with a colon (":") will be
ignored by KERMIT. Blank lines are also ignored.
The SET TAKE-ECHO command allows to you specify whether you wish
KERMIT to display the lines it reads from the file as it goes. By
default you will see the commands on the screen before they are
obeyed.
If an error occurs in a TAKE file, KERMIT will close it and revert
to reading input from the keyboard. You can yourself stop the
execution of a TAKE file at any time by pressing the ESCAPE key.
The most common use of a TAKE file is to save you typing a number
of SET commands to configure BBC KERMIT every time you start it: the
job of configuration can then be done with one TAKE command. (Note,
though, that the LOAD and SAVE commands provide an even better way of
doing this).
14
BBC KERMIT User Guide
3.5 STORING PARAMETER SETTINGS
Once you have changed a number of parameters with the SET command,
it is useful to be able to store them to avoid repitition of the
commands at a later time. The SAVE command lets you record the values
of all the BBC KERMIT parameters in a disc file: subsequently the LOAD
command will read these values back and make them operative. You
could, for example, keep a number of sets of parameters in various
files to suit varying needs.
If you are running the sideways ROM version BBC KERMIT in sideways
RAM on an expansion board instead of in EPROM, you have the further
option of permanently changing the default settings. The FIX command
will replace the default values stored within BBC KERMIT with the
values currently in use. This command is not available in the RAM
version.
15
BBC KERMIT User Guide
3.6 SETTING THE COMMAND SCREEN WIDTH
The normal command screen used by BBC KERMIT uses the BBC
Computer's MODE 7, giving you a 40 character wide screen in colour.
This is quite adequate for operating BBC KERMIT normally, but there
are occasions, such as when you are using *TYPE to examine a file, or
when you are displaying output from a remote KERMIT server program
(described in section 5.4.3), when it is convenient to have a line of
80 characters.
If you have the sideways ROM version of BBC KERMIT on a model B, or
are using a B+, B+128 or Master 128 with either version, you may
change the width of the command screen to suit your needs with the
WIDTH command. Typing
WIDTH 80
will change the command screen into an 80 character screen, and
WIDTH 40
will return to a 40 character screen.
The characteristics of the 80 byte command screen are controlled by
the same commands as for the 80 byte terminal emulation screen: thus
the commands
SET VDU-COLOUR
and
SET TV
control the text colour and whether a *TV command is automatically
issued.
Remember, though, that the 80 character command screen will use the
BBC Computer's main memory down to address &4000 on all models, so you
should not use it if you have prepared data for transfer from memory
above that address. The status screen used to display the progress of
file transfers will always be in MODE 7, regardless of the use of the
WIDTH command.
16
BBC KERMIT User Guide
3.7 FUNCTION AND CURSOR KEYS
In command mode, the 10 red function keys on the BBC Computer
keyboard behave as they do in BASIC. You can program strings onto the
keys using the *KEY command as described in the BBC Computer User
Guide, and pressing the keys will produce the strings. The four cursor
keys also have their normal function, and you can use them, the COPY
key and the DELETE key to edit your command lines as you would lines
of BASIC.
17
BBC KERMIT User Guide
3.8 USING AN AUTOBOOT FILE
One way of starting BBC KERMIT up and automatically setting the
parameters to suitable values is to create a !BOOT file (using *BUILD
or a word processor, for example) on a disc containing the appropriate
commands. You should consult your Disc Filing System user guide for
details of how to set up the system so you can use autoboot.
For example, you might create the file to hold
*KERMIT
SET BAUD 1200 RECEIVE
SET BAUD 75 TRANSMIT
Then, when you press SHIFT-BREAK, the commands in the file will enter
BBC KERMIT, then set the baud rates up before returning control to
you.
18
BBC KERMIT User Guide
4: USING BBC KERMIT AS A TERMINAL EMULATOR
BBC KERMIT includes facilities that enable you to use your BBC
computer as a terminal connected to a mainframe computer. The
facilities are not as sophisticated as those offered by a ROM whose
sole purpose is terminal emulation, since the prime use of KERMIT as a
terminal is to allow you to start running a remote KERMIT program on a
mainframe, but it is still quite usable.
If you are using the RAM version of BBC KERMIT on a model B, the
only type of terminal emulation provided is as a 40 character wide
teletype device.
If you are using the sideways ROM version, or have a model B+,
B+128 or Master 128 with either version, you may choose from 3 types
of terminal emulations. By default, BBC KERMIT provides an 80
character wide terminal compatible with the DEC VT52 standard. If you
wish, you may select an 80 character wide simple teletype device, or a
40 character wide teletype. Normally, you would need the latter mode
only if you wanted to transfer a large amount of data to or from the
BBC's memory: the 40 character wide terminal emulation uses BBC mode
7, so that memory below &7C00 is available to you. The 80 character
wide teletype and VT52 emulations use memory down to &3D00.
19
BBC KERMIT User Guide
4.1 RUNNING A TERMINAL SESSION
In this section we shall look at how to set up BBC KERMIT for
terminal emulation and how to control the emulation functions.
4.1.1 Choosing the terminal emulation required
If you are using the RAM version of BBC KERMIT on a model B, you
should ignore this section, since only a 40 character teletype
emulation is provided. Although you are allowed to select other
emulation types, you will not be able to use them.
If you have the sideways ROM version of BBC KERMIT, or have a
model B+, B+128 or Master 128, you should first decide the
emulation mode you wish to choose. The command you will need here
is
SET TERMINAL
to choose the emulation you require.
For example, the command
SET TERMINAL TT80
will turn BBC KERMIT into a simple teletype device using an
80-column screen.
4.1.2 Setting the line speed
For both the RAM and sideways ROM versions of BBC KERMIT you may
need to change the speed at which characters are transmitted down
the communications line. The
SET BAUD
command accomplishes this. If you have the wrong setting, you
will find either gibberish or nothing at all appearing on the
screen. The default setting that BBC KERMIT uses is a speed of
9600 baud for both transmitting and receiving data. If you are
unsure of what setting to use, consult the Advisory or Systems
Support personnel of your computer centre. For example, the
command
SET BAUD 1200
would set up BBC KERMIT to use a baud rate of 1200 for transmit
and receive.
20
BBC KERMIT User Guide
Some communications equipment may require that data is
transmitted and received at different baud rates: for example,
some modems may enable the host to send data to you at 1200 baud,
but require you to send to the host at 75 baud. BBC KERMIT allows
you to select such a "split baud rate" mode by specifying a
further parameter to the SET BAUD command. In the example here,
of 1200 baud receive and 75 baud transmit, you should set the
baud rates with the two commands
SET BAUD 1200 RECEIVE
and
SET BAUD 75 TRANSMIT
4.1.3 Setting parity
For both the sideways ROM and RAM versions of BBC KERMIT you may
need to change the "parity" value which is used on the
communications line. The parity setting determines what is done
with the eighth bit of every data byte: some communications
systems or mainframes may insist that this byte be always set, or
always clear, or should reflect the contents of the other seven
bits in some way.
You change the parity setting with the
SET PARITY
command. As with line speed, if you use the wrong setting you
will probably see garbage appearing on the screen, and file
transfers will not work. As an example, the command
SET PARITY NONE
would tell BBC KERMIT to use a parity value of NONE (sometimes
expressed as "no parity"). You should consult the systems support
personnel at your site if you are unsure of the correct setting.
Parity also affects how KERMIT decides to transfer some types of
file, and you should consult section 5.3 for more information.
By default, BBC KERMIT uses a parity setting of SPACE.
4.1.4 Selecting the flow control method
When two computers transfer data between each other, some method
21
BBC KERMIT User Guide
is needed to control the data flow, to stop one side sending
faster than the other can receive and process that data. This
process is termed "flow control", and gives the machine that is
receiving the data the ability to tell the other side "don't send
any more data till I tell you, as I have a backlog of bytes to
display".
BBC KERMIT supports the two most common techniques of flow
control, and you can switch at will between them. The command
SET FLOW-CONTROL XON/XOFF
selects "XON/XOFF" flow control, whereby "stop" and "go" is
signalled by sending special byte values. Alternatively, the
command
SET FLOW-CONTROL CTS/RTS
will select "CTS/RTS" or "hardware" flow control, where "stop"
and "go" is signalled by changing voltages on the line connecting
the systems.
The setting you should use will depend entirely on the
communications system or mainframe you are using, and you should
consult the systems support personnel at your site for advice. If
you have the wrong setting you will probably find parts of output
lines missing when you use terminal mode.
By default, BBC KERMIT will use XON/XOFF flow control.
4.1.5 Specifying an "ignore" character
Some mainframe systems assume that all terminals connected to
them are produced by the same manufacturer, and will send
"filler" characters to them, assuming that the terminal will know
that they are not to be displayed on the screen. BBC KERMIT, of
course, is unaware that this is being done, so will take no
special action: all characters with ASCII codes greater than 31,
and the CR, LF, DEL, BS and FF characters will be output to the
screen. (TAB characters are expanded into spaces and ESCAPE is
handled specially).
If the filler character the mainframe sends is one that is
normally displayed by BBC KERMIT, you can suppress its output by
nominating it as the "ignore character". For example,
SET IGNORE &7F
would cause DEL characters (ASCII code &7F) to be ignored. Typing
SET IGNORE
22
BBC KERMIT User Guide
on its own would switch off the ignore facility once more.
4.1.6 Starting terminal emulation
To start BBC KERMIT as a terminal emulator, you should set up the
speed, parity, flow control and "ignore" character values as
described above, then type the command
CONNECT
This sets up the screen in the required mode and clears it. Any
characters you type now are sent directly to the RS423 output
port, exactly as they would be if the BBC were a real terminal.
You may now "wake up" the system you are connected to, and do
anything else you wish.
Note that if you have chosen a terminal emulation that BBC KERMIT
cannot provide (for instance, if you have selected VT52 mode with
the RAM version on a model B), the CONNECT command will be
rejected and the error message "Terminal not supported" will be
displayed.
In all terminal emulation modes BBC KERMIT will display a "status
line" at the top of the screen. The line contains a brief
reminder of the functions you can select by pressing the CONTROL
key with a function key and indicates what facilities are
currently operating.
4.1.7 Sending a break signal
Many mainframe computer or communications systems require the
terminal to send them a "break" signal for some operations.
BBC KERMIT allows you to send either of two types of break
signal. Pressing CONTROL and F9 will send a "short break" signal:
this is the most commonly-used type, and the break signal will
last about 240 milliseconds. In some circumstances a "long break"
signal may be needed: pressing CONTROL and F8 will send a signal
lasting 3.5 seconds. Your systems support or advisory service
will be able to tell you which, if any, break signal you need to
use.
Note that you should not press the key marked BREAK for sending
break signals.
23
BBC KERMIT User Guide
4.1.8 Using the function keys
In terminal emulation mode BBC KERMIT reserves the 10 function
keys for its own use: in VT52 emulation mode it uses them to
emulate the "keypad" keys of the real VT52. However, you can
still use the function keys to produce strings, but now you will
need to press the CONTROL and SHIFT keys at the same time as the
function key concerned.
As an example, suppose that in BBC KERMIT command mode (or indeed
before you started to run BBC KERMIT) you issued the Operating
System command
*KEY 0 type myfile.dat
Then, in terminal emulation mode, pressing CONTROL-SHIFT-F0 would
produce the string "type myfile.dat" on the screen exactly as if
you had typed it from the keyboard.
4.1.9 Using the cursor keys
BBC KERMIT uses the four cursor keys in one of two ways,
depending on what terminal emulation you have selected.
If you have selected either a 40 character or an 80 character
teletype emulation, the keys function as normal BBC Computer edit
keys. You can use them in conjunction with the COPY key to edit
lines, in exactly the same way as you would edit a BASIC program.
In VT52 emulation mode, though, the cursor keys will by default
produce VT52 ESCAPE sequences that programs such as the VAX/VMS
EDT editor expect, and these are described below. You can,
though, specify that they should be used as BBC edit keys by
pressing CONTROL and F4. An "E" will appear in the status line to
remind you, and the keys will now operate as BBC edit keys. Any
program you are running on the mainframe will not be aware that
you have pressed a cursor key. To return to using VT52-mode
cursor keys, press CONTROL and F4 once more.
4.1.10 Pausing screen output
You have several choices if you wish to stop output to the screen
for a moment (for example to study part of a file that is being
listed). One method uses the standard "stop scroll" mechanism of
the BBC Computer: output will stop if you hold the CONTROL and
24
BBC KERMIT User Guide
SHIFT keys down together, and will resume when you release them.
If you wish to hold the screen while you do something else,
though, a better method is to use BBC KERMIT's own mechanism. If
you press the CONTROL and F3 keys once, output to the screen will
stop. An "H" will be displayed on the status line to indicate
that you have suspended output. The screen will remain as it is
until you again press CONTROL and F3: unlike the first technique,
this lets you move away from the machine if you wish.
4.1.11 Returning to command mode
At some point, particularly if you are going to perform file
transfers, you will wish to leave terminal emulation mode and
return to the command screen, since the commands that perform
file transfer can be issued only from KERMIT command mode. To
return to command mode you should press CONTROL and F0 together:
the BBC KERMIT command screen will reappear and you may issue any
BBC KERMIT commands you wish, and return to terminal emulation
mode when you require.
25
BBC KERMIT User Guide
4.2 LOGGING OUTPUT TO A DISC FILE
You may wish to record your terminal session in a file on disc for
later use: this is a convenient way of down-loading a text file from a
mainframe if it does not have a KERMIT facility of its own (however,
it is strongly recommended that you do use KERMIT for file transfer
whenever possible).
Terminal logging must be initiated from the BBC KERMIT command
screen before you issue the CONNECT command to start terminal
emulation. You could type, for example
LOGGING ON MYLOG
which would initiate logging, and open a file called MYLOG to record
the data. At this point, though, although logging is initiated, it is
not active, so nothing will be sent to the file.
Once you have entered terminal emulation mode you can activate or
deactivate logging at will. Pressing CONTROL and F1 once will activate
logging: any character that appears on the screen will be copied to
the file. Pressing CONTROL and F1 again will deactivate logging, and
no characters will go the file. You may repeat this activation and
de-activation as often as you wish. A "D" will appear at the right
hand side of the status line whenever logging is active, to remind you
that output is being sent to disc.
When you have finished your terminal session, you should return to
the command screen by pressing CONTROL and F0, then issue the
LOGGING OFF
command to terminate logging and close the file. This step is
important: if you don't do it some data will be lost from the file.
A possible sequence you could use to capture a text file from a
mainframe would be this:
1. Issue the command, for example,
LOGGING ON MYFILE
to open a file and initiate logging.
2. Enter terminal emulation mode with the command
CONNECT
3. Log in to the mainframe, and type the command to list a file
to the terminal, but don't press RETURN to send the command
to the mainframe.
4. Activate logging to the disc file by pressing CONTROL and
F1.
26
BBC KERMIT User Guide
5. Press RETURN to send the listing command to the mainframe.
6. When the file has been displayed on the screen, press
CONTROL and F1 again to deactivate logging.
7. Return to the BBC KERMIT command screen by pressing CONTROL
and F0.
8. Terminate logging and close the file with the command
LOGGING OFF
27
BBC KERMIT User Guide
4.3 LOGGING OUTPUT TO A PRINTER
BBC KERMIT allows you to copy all the characters that appear on the
screen to a printer, to give a hard copy log of a terminal session. At
any time while you are in terminal mode, pressing CONTROL and F2
together will turn on the copying of bytes to the printer; pressing
CONTROL and F2 once more will turn it off again. A "P" will appear on
the right of the status line whenever bytes are being logged to the
printer.
An alternative, and preferable way of obtaining a hard copy of a
file on your printer is to use the file transfer facilities of BBC
KERMIT to move the file from the mainframe to your BBC system,
specifying that the data be sent directly to the printer with the
SET DESTINATION PRINTER
command. This method, although slower, has the advantages of providing
an error-free copy of the file, and enabling all possible character
values to be sent. The technique is further described in Chapter 5.
28
BBC KERMIT User Guide
4.4 SENDING A FILE TO A HOST WITHOUT KERMIT
BBC KERMIT contains facilities to let you transfer files from BBC
discs to another machine even if that machine does not have a KERMIT
program of its own. This facility, sometimes called "raw send" is
controlled by the TRANSMIT command. You should note, though, that ths
method offers no error-correction at all, so you should always use
KERMIT to transfer data if you can.
For example, suppose you wish to transfer the contents of a file
:1.RESULTS to a mainframe that does not have KERMIT. You can take the
following steps:
1. Use the CONNECT command to enter terminal mode, and log in
to the host.
2. Type the host command needed to store what you type in a
file. Your system may have an INPUT or CREATE command, or
you may need to use the editor to do this: if in doubt,
consult your systems support personnel or advisory service.
3. Press CONTROL and F0 to return to BBC KERMIT command mode.
4. Issue the TRANSMIT command. In this example, you would type
TRANSMIT :1.RESULTS
BBC KERMIT will now return to terminal mode, and the
contents of file :1.RESULTS will be sent to the host, just
as if you were typing at the keyboard. In order not to
overload the host system with data arriving at too high a
rate, BBC KERMIT will pause for half-a-second after sending
each line of the file.
5. Once the file has been sent, type whatever is needed to tell
the host that there is no more data to go into the file, and
carry on with your terminal session.
Note that you can press ESCAPE at any time to terminate sending the
file. BBC KERMIT will once more take input from the keyboard, exactly
as normal.
It may sometimes happen that your file contains line-feed (LF)
characters at the end of each line as well as the usual
carriage-return (CR) characters, and these can sometimes cause
problems at the host end. Accordingly, BBC KERMIT lets you control
what happens to them, as follows:
If the file type you have set with the SET FILE TYPE command is
ASCII CR, line-feed characters in the file are ignored and not
sent to the host.
If the file type is anything else, the data in the file is sent
exactly as it is, without any changes.
29
BBC KERMIT User Guide
4.5 VT52 KEYPAD EMULATION
Since the model B, B+ and B+128 keyboards do not possess a VT52
keypad, it is necessary to emulate these keys using the 10 function
keys. In VT52 terminal emulation mode the function and cursor keys
correspond to the VT52 keypad in the following way:
BBC key VT52 keypad key ESCAPE sequence
F0 0 ESC ? p
F1 1 ESC ? q
F2 2 ESC ? r
F3 3 ESC ? s
F4 4 ESC ? t
F5 5 ESC ? u
F6 6 ESC ? v
F7 7 ESC ? w
F8 8 ESC ? x
F9 9 ESC ? y
SHIFT-F1 PF1 ESC P
SHIFT-F2 PF2 ESC Q
SHIFT-F3 PF3 ESC R
SHIFT-F4 PF4 ESC S
SHIFT-F5 MINUS ESC ? m
SHIFT-F6 COMMA ESC ? l
SHIFT-F7 PERIOD ESC ? n
SHIFT-F8 ENTER ESC ? M
UP UP ESC A
DOWN DOWN ESC B
RIGHT RIGHT ESC C
LEFT LEFT ESC D
Note that keys PF4, MINUS and COMMA may not exist on a real VT52
device, although they are present and usable on a VT100 terminal that
is operating in VT52 mode.
The Master 128 allows you to use the above keys as described, but
also lets you use the built-in keypad, which is considerably easier.
The arrangement of the keys correspond to a real VT52 keypad closely,
and they have the following meaning:
30
BBC KERMIT User Guide
---------------------------------
! ! ! ! !
! PF1 ! PF2 ! PF3 ! PF4 !
! ! ! ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! 7 ! 8 ! 9 ! MINUS !
! ! ! ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! 4 ! 5 ! 6 ! !
! ! ! ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! 1 ! 2 ! 3 ! COMMA !
! ! ! ! !
! ! ! ! !
---------------------------------
! ! ! !
! 0 ! PERIOD! ENTER !
! ! ! !
! ! ! !
---------------------------------
Note that the keypad DELETE key is not used.
Appendix 3 details the use of the function keys with the EDT editor
available on the VAX/VMS Operating System.
31
BBC KERMIT User Guide
5: TRANSFERRING FILES WITH BBC KERMIT
The primary use of BBC KERMIT is to transfer files between it and a
mainframe computer, or between it and another microcomputer. The
methods used will be substantially the same whatever the other system
is, since any KERMIT system should be able to communicate with any
other. Though the general techniques will be the same, the exact
commands used to control the remote KERMIT will vary from one system
to another. You will need to consult the user guide for the remote
system to discover how it should be controlled. In this section we
shall cover in detail how BBC KERMIT is controlled.
32
BBC KERMIT User Guide
5.1 PRINCIPLES
KERMIT differs from other "dumb" file transfer systems (such as you
might find in a terminal emulator ROM, for instance) in that it aims
to transfer files not only reliably, but also in a usable way between
systems. Thus, if you have a program source on your BBC discs that you
can edit with some BBC micro editor, and transfer this to a mainframe,
the resulting file should also be editable on the mainframe's editors.
KERMIT will resolve all the differences in how files are stored on
your behalf, so that, in this example, the mainframe file will not
contain extra line-feed characters at inconvenient places that the
mainframe editors cannot handle.
Transferring files with KERMIT involves several discrete steps. We
shall consider here the most common case of transfer to and from a
mainframe and look at the several steps involved in a general way.
1. You start BBC KERMIT is and set it up for the transfer. In
particular, you may wish to tell it what types of file are to
be moved. You will also need to set the parameters for
terminal emulation, and, depending on the needs of the
communications system and the remote KERMIT, you may need to
change some of the more detailed aspects of BBC KERMIT's
operation (though this is unlikely).
2. You enter terminal emulation mode, and log the BBC system in
to the mainframe as though it were an ordinary terminal.
3. Using the BBC system as a terminal, you start the mainframe's
own KERMIT program running.
4. You can now give commands to the mainframe KERMIT (from
terminal emulation mode) and to the BBC KERMIT (from KERMIT
command mode) to transfer your files. The two KERMIT systems
will communicate with each other using the standard KERMIT
protocol.
5. After the transfers are done, you can log the BBC system out
from the mainframe.
In practice, the steps taken will range up and down this list as
required. For example, BBC KERMIT parameters can be changed at any
time, not only at the start, and if you are moving several tyes of
file you will need to change them frequently. Also, things may be made
much simpler if the mainframe KERMIT provides what is known as "server
mode operation" - we shall discuss this later. The following sections
will discuss the various aspects of file transfer in more detail.
33
BBC KERMIT User Guide
5.2 FILE TYPE
The most important thing that you will need to consider when
transferring files using BBC KERMIT is the file type of the files
involved. As we saw in the overview of KERMIT in chapter 2, one of the
facilities that KERMIT provides is that files are transferred in a
usable way, with the method the sending system uses to denote the end
of a line being automatically translated into the method the receiving
end uses. Many operating systems (for example MS-DOS) don't care at
all how you denote the end of a printable line, and will raise no
objections whether your file uses Carriage-Return bytes, Line-Feed
bytes or anything else. Mainframes, though, are usually much more
choosy, and can be quite perverse. Some mainframe systems store actual
byte sequences (such as an actual Carriage-Return byte) in the file to
mark the end of a line. Others may assume a line is finished when some
byte such as Carriage-Return is input, but don't store the actual byte
in the file, using instead some method of recording the number of
characters in the line. And even worse, some mainframe systems expect
you to decide what they should do - this can be particularly awkward
if you are transferring binary files that don't contain printable,
separate records anyway.
The way the KERMIT system in general handles this is that all
KERMITs, when sending a file, translate their own system's end-of-file
indication into a standard form. The KERMIT that receives the file
then knows exactly where each record ends, and translates the data
into whatever format its system needs.
Now this would be perfectly simple and easy, except for the fact
that on the BBC Computer there is no uniform way of denoting the end
of a record. Each program or ROM you may use can use whatever bytes it
likes to denote the end of a record, and these are likely to be
different. Thus a file you produce with *SPOOL contains
Line-Feed/Carriage-Return pairs at the end of a line, but a spooled
Wordwise file contains only Carriage-Returns. There is no way at all
for BBC KERMIT to know what bytes are used, so it is up to you to tell
it by setting a "file type".
How end-of-record is denoted is also of importance when you move
files to BBC KERMIT from another system. Here you will want BBC KERMIT
to translate the KERMIT standard end-of-record indicator into
something suitable for whatever program or ROM you are going to
process the file with.
In the sections below we shall look at the possible file types you
can select, then examine how you can work out what the type should be
for a particular file.
5.2.1 Binary files
These files contain data that is not primarily printable text,
34
BBC KERMIT User Guide
such as SAVEd BASIC programs, machine-code programs, screen dumps
or *SAVEd areas of memory. When you transfer these files, you
wish every byte in the file on one system to appear unchanged in
the file on the other system, regardless of what it is.
You tell BBC KERMIT that you are handling binary files with the
command
SET FILE TYPE BINARY
which tells it not to change any data that it either sends or
receives. You may need to issue a comparable command to the
remote KERMIT, to prevent it trying to manipulate the data
itself. Some remote KERMITs may not allow you to send pure binary
data, though, and you will not be able to send binary files to
them in this case.
5.2.2 Printable text (ASCII) files
These files contain printable text, such as you might produce
with the *BUILD command, or by spooling a BASIC program listing
to disc. When you transfer one of these files, you will want the
two KERMITs to translate the way end-of-record is indicated,
rather than transfer every byte exactly as it is.
You tell BBC KERMIT that ASCII text files are to be transferred
with the
SET FILE TYPE ASCII
command. This specifies that the files are text, but BBC KERMIT
will also need to know how the end of a printed line is indicated
in this file. The command shown above sets the end-of-line
indication to the default of Line-Feed followed by
Carriage-Return (LFCR), but this may not be what you require. You
can tell BBC KERMIT your needs with a further parameter, which is
one of the strings LFCR, CRLF, LF or CR.
Thus, for example,
SET FILE TYPE ASCII CR
tells BBC KERMIT that files are text, and end-of-line is
indicated by a Carriage-Return byte on its own. When you then
send a file, every CR byte is translated into the internal KERMIT
represenation of end-of-line. On receiving a file, the internal
KERMIT form will be translated into a CR for you.
35
BBC KERMIT User Guide
5.2.3 How to decide on the file type to use
There is, unfortunately, no easy way of telling how the end of a
printed line is denoted in a file. However, you can inspect the
file with the *DUMP command with, for instance
*DUMP FILE
This (on the Acorn DFS, at any rate) will print a file in hex and
character form on the screen. You can then locate the end of a
line of text and see what characters follow in the hex area of
the dump: a CR byte appears as 0D, and an LF will appear as 0A.
In this example, if your file contained only the lines
ABCDE
FGH
IJKL
you might see the dump looking like this
0000: 41 42 43 44 45 0D 46 47 ABCDE.FG
0008: 48 0D 49 4A 4B 4C 0D ** H.IJKL..
which would indicate that the file starts with a line "ABCDE",
terminated by one CR byte, then has a line "FGH" terminated by a
CR byte, then a line "IJKL" terminated with a CR byte. You would
then need
SET FILE TYPE ASCII CR
to transfer such a file.
The sequences you should look for in the dump are then:
0D CR
0A LF
0D 0A CRLF
0A 0D LFCR
If you ever encounter a sequence such as 0D 0D (CR CR) this
indicates that one line terminates with a CR, and the next line,
also terminating with a CR, is blank.
Some of the common files you will come across have the following
file type:
SAVEd BASIC BINARY
Spooled BASIC listings ASCII LFCR
Saved WORDWISE files BINARY
Spooled WORDWISE text ASCII CR
*BUILD files ASCII CR
36
BBC KERMIT User Guide
ADE editor files ASCII LFCR
*SAVEd files BINARY
Machine code programs BINARY
37
BBC KERMIT User Guide
5.3 SENDING EIGHT BIT DATA
As we saw in chapter 2, characters are stored in a file in "bytes",
and each byte consists of 8 separate binary digits or bits. Each byte
can contain a number between 0 and 255, and so there are 256 possible
characters that you can write into a file. Unfortunately, it is common
for communications systems to let through only 7 bits from each byte,
using the eighth bit for their own purposes. Thus you can normally
send only characters whose ASCII codes are in the range 0 to 127. Many
text files on the BBC, though, and every binary file will contain
bytes from the whole character set, with codes from 0 to 255, so there
is a potential problem in transferring such data correctly.
KERMIT in general has a technique for overcoming this restriction,
by encoding characters in the range 128 to 255 into special sequences
that can be sent down any communications line. Almost all modern
KERMITs will use this technique, which is known as "eighth bit
prefixing", but you may encounter an older implementation on some
machine that does not support it. In this case your data will be
garbled in transmission. There is, regrettably, no way round this
problem from within KERMIT, but BBC KERMIT will warn you when the
problem is detected: a message "WARNING : Non ASCII data encountered"
will appear on the display screen.
In order that the amount of data sent down the communication line
is not unnecessarily large, there are some rules governing when BBC
KERMIT and the remote KERMIT will perform eighth-bit-prefixing, since
the technique increases the amount of data that must be sent whenever
characters that use the eighth bit are encountered.
1. If the remote system has been set up with its own commands
to ask for eighth-bit-prefixing, BBC KERMIT will always use
it.
2. If you have used the SET PARITY command to select a value
that implies that only 7 data bits can be sent down the
communication line (i.e. if you have set the value to SPACE,
EVEN, ODD or MARK) then BBC KERMIT will attempt to use
eighth-bit-prefixing. Whenever you send a file from the BBC,
BBC KERMIT will request the remote system to use
eighth-bit-prefixing; whenever the remote sends a file to
the BBC, BBC KERMIT will use eighth-bit-prefixing unless the
remote KERMIT has said that it does not implement it.
The status screen will tell you whether or not eighth-bit-prefixing
is in use during a transfer so that you will know when you might
expect problems.
38
BBC KERMIT User Guide
5.4 STARTING UP THE MAINFRAME KERMIT
In order to run the KERMIT program on the mainframe system, you
will need to log your BBC computer in as a terminal, using BBC
KERMIT's terminal emulation facilities. This is described in detail in
Chapter 4.
Once you have logged in, you can start the mainframe's KERMIT
program. How this is done is of course dependent on the other system,
but the command is probably "KERMIT" or something similar. You should
consult the user guide for the mainframe system to find exactly what
to do.
The mainframe KERMIT will certainly be able to operate as a normal
KERMIT (termed non-server mode). In this mode, you will need to give
commands both to it and to BBC KERMIT for every file transfer (here a
transfer of a group of files in one go counts as one operation), which
will involve you in continual changes between BBC KERMIT command mode
and terminal mode. Alternatively, more sophisticated mainframe KERMITs
may operate in "server" mode. Here you issue one command to the
mainframe KERMIT (usually "SERVER" or something similar) to put it
into server mode. Now you can control all operations from BBC KERMIT
command mode: you do not need to continually switch to terminal mode
to give commands to the mainframe KERMIT. You can start file
transfers, and even, with some mainframe KERMITs, manipulate files and
obtain directory listings from the mainframe side simply by giving
commands to BBC KERMIT. In general, you should always set the
mainframe KERMIT into server mode if this is possible.
The exact way in which you transfer files will depend on whether
you are talking to a server or a non-server, and we shall consider
each in turn.
39
BBC KERMIT User Guide
5.5 USING BBC KERMIT WITH A REMOTE SERVER
As we have seen, you should put the remote KERMIT into server mode
with a command such as "SERVER". You will then probably see a message
telling you something like "use your micro's local escape sequence to
return to command mode": the exact text (and whether it appears at
all) depends on the remote system in use. You should press CONTROL and
F0 together, and BBC KERMIT will enter command mode, showing you the
command mode screen.
You can now control the whole operation from BBC KERMIT command
mode.
5.5.1. Sending files to a server
To send a file to a server you simply use the command SEND. The
reference section describes the use of the command, its
side-effects and facilities, in detail, and you should consult it
for further information.
The basic use of the command is simple. To send, for example, a
file called BEEBLE, you would type
SEND BEEBLE
You will now see the file transfer status screen appear, and
information about the transfer will be displayed. Normally, BBC
KERMIT will pause for 30 seconds here - this is because it has to
cater for the requirements of a non-server remote system as
described below. You can either wait the full time, after which
the transfer will start, or you can press any key to force the
transfer to begin at once. You can alter this pause period if you
wish with the SET DELAY command - this is described in the
reference section.
In this example, BBC KERMIT will ask the remote system to call
the file it receives BEEBLE.BBC (although the remote system
doesn't have to if it doesn't want to or if that isn't a legal
filename for it to use). If you wanted the file on the other
system to be called something else, you can use a different
format of the SEND command, putting
SEND BEEBLE /44d/frogspawn/pudding
Here BBC KERMIT will ask the remote system to store the data in
"/44d/frogspawn/pudding". You can put what you like in the
filename, providing that it does not contain spaces and is not
more than 48 characters long.
Alternatively, you can make BBC KERMIT add a different suffix
from ".BBC" when it is forming the remote file name. The command
40
BBC KERMIT User Guide
SET FILE SUFFIX TOAD
would cause BBC KERMIT to add ".TOAD" to the name, for example.
The command also allows you to stop any suffix at all being
added: you should consult the reference section for further
details.
You can, if you wish, send a group of files in one operation by
specifying "wildcard" characters in the name. BBC KERMIT will
then send all the files whose names match, one after the other
automatically. Two different wildcard characters can be used, as
follows:
1. The "*" character can be used to match against any number of
characters in the names of the files in the directory. Thus,
if you specified a name
B*S
then files called BIRDS, BAGS, BLINKS, BUS and BS would be
transferred.
If you specify a name simply as "*", then all files will be
transferred.
2. The "#" wildcard character can be used to match against
exactly one character in the real filenames. Thus, if you
specified a name
B#G
then files BUG and BIG would be transferred, but files BANG
and BG would not be.
BBC KERMIT uses the facilities of the Disc Filing System to
locate files whose names match a wildcarded one, and depending on
its operation there may be restrictions on where you can make it
search. If you using the Acorn DFS or DNFS, for example, only the
current directory is searched, so that although a wildcarded name
such as
DAT*
is acceptable, a name such as
:1.DAT*
cannot be used, and no matching files will be found for it.
41
BBC KERMIT User Guide
5.5.2. Fetching files from a server
Fetching files from a server is also simple. If the remote system
has a file called GROMMET.TXT, you can move it to the BBC with
GET GROMMET.TXT
The file transfer status screen will appear, and the transfer
will start immediately.
In this example, the data will be stored in a file called GROMMET
in the current directory and drive. If you want a different name,
you could put, for instance,
GET GROMMET.TXT :3.B.PLUG
and the data will be stored in file :3.B.PLUG.
In the first example, there is of course a risk that you may
already have a file called GROMMET: this risk is increased if BBC
KERMIT has to change the file name a lot to make it acceptable to
the Disc Filing System. Accordingly, by default BBC KERMIT will
try to amend the name it uses if there is a clash. Characters
will be changed, starting from the right, into "&" characters
until a unique name is formed. You will be told whenever this
occurs. If you wish, you can change this facility: issuing the
command
SET FILE WARNING OFF
will turn this check off, and BBC KERMIT will overwrite any file
whose name is the same as the new file, losing its original
contents.
Note that BBC KERMIT will transform unacceptable names to make
them legal to the Acorn filing system standard: it will not take
advantage of filing systems that allow, for example, file names
longer than 7 characters.
You can fetch a group of files from the server in one operation
by including the remote system's wildcard character in the name.
The remote system will then send each file in turn automatically.
5.5.3 Controlling a remote server
Many of the more modern mainframe KERMITs that support server
mode operation allow the micro KERMIT to perform a number of
useful operations on mainframe files through them. If the
mainframe KERMIT you are using is one of these, you will be able
42
BBC KERMIT User Guide
to do things such as listing files and directories, deleting and
renaming files, all with commands issued to BBC KERMIT without
the need to enter terminal emulation mode.
These operations are all initiated with the BBC KERMIT command
REMOTE, which passes a request to the mainframe system for some
action. The command is always followed by some parameters to
specify the action you are requesting, and we shall look at the
various possibilities below. You should note, though, that not
all servers implement all the facilities described here (some
implement none at all), and some interpret the commands
differently from others. You should consult the user guide for
the server in use to see the precise details.
Note here that some mainframes may take a long time to respond to
these commands, so that you may need to turn timeouts off if you
have been using them.
You can interrupt any REMOTE command producing a large amount of
output by pressing CONTROL and Z.
1. Listing a directory
The command
REMOTE DIR
will produce a directory listing from the server. The exact
layout and selection of names will depend on the server:
some will allow you to specify, for example
REMOTE DIR ABC*
to list all files with names starting "ABC".
2. Changing the current directory
The command
REMOTE CWD
will request the server to change the default place in which
it looks for files. Typing the command on its own will reset
the directory to whatever the default value is: if, though,
you typed something like
REMOTE CWD [.SUBDIR]
you would change the directory to [.SUBDIR]. If you do
specify a name here, BBC KERMIT will ask you for a password:
if your mainframe system requires one you should type it,
then press RETURN. The password will not be echoed on the
43
BBC KERMIT User Guide
screen as you type. If your system does not require a
password, simply press RETURN here.
3. Displaying a file
The command
REMOTE TYPE
will display a file owned by the mainframe on the BBC
screen. You could, for example, type
REMOTE TYPE MYLIST.LIS
to examine a file called MYLIST.LIS.
4. Obtaining help
The command
REMOTE HELP
requests the server to display some help information to you.
You can either type the command by itself, or, on some
systems, you can specify a topic. Thus
REMOTE HELP
will normally provide you with a "first level" display, and
REMOTE HELP files
for example might produce some help on the specific topic of
"files".
5. Displaying server status
Issuing the command
REMOTE STATUS
will produce a display giving details of the server's
operation.
6. Examining who is logged in
Issuing the command
44
BBC KERMIT User Guide
REMOTE WHO
will produce a list of all the users currently logged in.
7. Copying a file
The command
REMOTE COPY
requests the server to copy a file on the mainframe. You
could type, for example
REMOTE COPY LUMBER.TXT DUTCHELM.DED
to copy file LUMBER.TXT to a new file called DUTCHELM.DED.
8. Renaming a file
The command
REMOTE RENAME
requests the server to change the name of a file on the
mainframe. You could type, for instance
REMOTE RENAME /wondrous/thing /old/hat
to change the name of /wondrous/thing to /old/hat.
9. Deleting a file
The command
REMOTE DELETE
requests the server to delete a file on the mainframe. Thus,
typing
REMOTE DELETE DOCTOR.WHO
would delete the file DOCTOR.WHO.
10. Interrogating disc space usage
The command
REMOTE SPACE
45
BBC KERMIT User Guide
requests the server to report on your current disc usage.
Some servers may allow you to specify a selection parameter:
thus you might be able to type
REMOTE SPACE //disc99
to see how much space you have available on a specific disc
drive.
11. Issuing a host command
The command
REMOTE HOST
requests the server to issue a command to the command
interpreter of the host. The command to be issued is
whatever follows REMOTE HOST on the line: thus if you were
to type
REMOTE HOST CREATE/DIR [.FRED]
when using a VAX/VMS server, the command
CREATE/DIR [.FRED]
would be issued to the command interpreter to create a
directory.
Note that care is needed in the choice of command: it must
be one that requires no input from the terminal, since of
course, there is no terminal available to provide the input.
5.5.4. Closing down the server
Once you have finished moving data, you can close down the remote
KERMIT server. Again, you do this from BBC KERMIT command mode.
Typing the command
BYE
will tell the server to close down, and your terminal will be
automatically logged out.
Typing
FINISH
46
BBC KERMIT User Guide
will tell the remote KERMIT to cease operating, but here the
terminal will still be logged in.
47
BBC KERMIT User Guide
5.6 USING BBC KERMIT WITH A REMOTE NON-SERVER
Transferring data to and from a non-server is a little more
complicated, since you will need to continually change from BBC KERMIT
command mode to terminal mode and back again. With a little practice,
though, the technique becomes natural.
5.6.1. Sending files to a non-server
To send a file to a non-server you use the command SEND. However,
unlike sending files to a server, you must also tell the remote
KERMIT that a file is on its way.
One means of doing this is as follows:
1. In terminal mode, start the remote KERMIT program, and issue
its RECEIVE command. This tells it to expect a file from BBC
KERMIT. The remote system may output a message when you do
this, but more probably it will do nothing but wait for you
do something.
2. Press CONTROL and F0 to return BBC KERMIT to KERMIT command
mode.
3. Issue the BBC KERMIT SEND command. What happens now is
identical to the actions described above for sending files
to a server: you can use the same wildcard facilities to
select files, etc., as described in section 5.5.1.
If you are transferring to another micro KERMIT, you would need
to do this:
1. From BBC KERMIT command mode, issue the SEND command as
above.
2. From the other micro's command mode, issue its RECEIVE
command. BBC KERMIT by default allows you 30 seconds to do
this: you can change this interval if you wish. The command
SET DELAY 10
for example, changes the delay to 10 seconds.
48
BBC KERMIT User Guide
5.6.2. Receiving files from a non-server
If the remote KERMIT system is not a server, you will need to
transfer files from it by the exact reverse of the above SEND
procedure: all you need to do is reverse the roles of the two
machines. Thus, you could take the following steps:
1. In terminal mode, start the remote KERMIT program, and issue
its SEND command. This tells it to transfer a file to the
BBC system. There will normally be a delay before anything
happens - the interval may be anything from a few seconds
upwards, and is intended to let you do the next step before
the transfer starts. On many KERMITs there will be a command
to let you change the interval if you find it too short.
2. Press CONTROL and F0 to return to BBC KERMIT command mode.
3. Issue the RECEIVE command to BBC KERMIT. When the remote
system's delay time expires, it will start to send the file.
The RECEIVE command tells BBC KERMIT to sit and wait until
this happens.
If you are transferring files between micro systems, you could do
1. From BBC KERMIT command mode, issue the RECEIVE command.
2. On the remote system, issue the SEND command. The transfer
will start once the remote system's delay period has
expired.
The advantage of the above approach is that you have no need to
hurry to prepare the BBC system, since the RECEIVE command will
leave it waiting indefinitely for you to get the other side
going. You can't, though, use this method when you are talking to
a mainframe KERMIT, since once you issue the RECEIVE command you
cannot enter terminal mode to issue the corresponding SEND
command to the remote system.
49
BBC KERMIT User Guide
5.7 TRANSFERRING DATA TO AND FROM MEMORY
BBC KERMIT will transfer data not only to and from files on disc,
but also to and from the BBC's random-access memory. BBC KERMIT knows
at all times the currently-defined "source" and "destination" of data,
which tell it what to do when sending and receiving respectively.
Source and destination can be set to either "file" (the default) or
"memory".
For example, suppose you wished to send the contents of memory from
address &1900 to &357C inclusive to the remote system. You would issue
the command
SET SOURCE MEMORY 1900 357D
to tell BBC KERMIT that data it sends now comes from meory instead of
file, and also tells it where in memory. Note that the second address
given is "357D": this value is the last address to be transferred,
plus one.
When you now issue the SEND command, the contents of this area of
memory will be transferred. Since there is no BBC file involved, the
form of the SEND command changes slightly. There is now only one
parameter, which you must supply: this is the name of the file that
you wish to be used on the remote system. Thus you might type
SEND /mem/contents
to send the memory contents to a file "/mem/contents" on the remote
system.
Bringing data from the remote KERMIT into the BBC memory is also
simple. You might, for example, issue the command
SET DESTINATION MEMORY 1B00
to tell BBC KERMIT that data now goes into memory, starting at address
&1B00. Here also there is no BBC file involved, so the forms of the
GET and RECEIVE commands change slightly. RECEIVE now has no
parameters: all you are allowed to type is
RECEIVE
The GET command now has only one parameter, which is the name of the
file you wish the remote server to send you. Thus, you would type
GET /mem/dump
to bring the contents of file "/mem/dump" into the BBC's memory.
There are some points that you should bear in mind when doing
transfers to and from memory:
1. The effect of the SET SOURCE and SET DESTINATION commands
50
BBC KERMIT User Guide
persist until you specify otherwise. Thus, if you transfer a
group of files from the remote system to BBC KERMIT, all
will end up in the same memory area.
2. BBC KERMIT has no way of knowing whether the addresses you
specify are sensible: it is up to you to get them right.
3. Although no files are involved, the transfer of data to and
from memory still obeys the settings defined by the SET
FILE TYPE command. Thus if you wish to transfer the memory
contents as unchanged binary data, you must type
SET FILE TYPE BINARY
to tell BBC KERMIT this.
51
BBC KERMIT User Guide
5.8 TRANSFERRING DATA TO A PRINTER
When you transfer a file from another system to your BBC Computer,
BBC KERMIT will allow you to send it directly to a printer rather than
to disc or memory. The command
SET DESTINATION PRINTER
will select this option: after you have issued it, all files that you
transfer with RECEIVE or GET will go directly to the printer. Routing
to the printer will persist until you specify another destination.
This technique is very similar in result to using the terminal mode
"log to printer" facility described in chapter 4. However, terminal
logging, since it does not use the KERMIT transfer protocols, suffers
from all the restrictions described in the introductory chapters. It
is prone to error if you are using a noisy communications line, and
also, of course, you may not be able to transfer all the characters of
a particular file. Using the "transfer to printer" option will let you
accomplish the result using all of KERMIT's error detection and
transfer facilities.
A little care may be needed when using this facility, especially if
the KERMIT on the other machine is able to time out. Printers are far
slower than discs, of course, so it will take BBC KERMIT very much
longer to deal with output from the other system and acknowledge it.
The other system may expect a rapid response, and so may assume that
the data did not arrive and start to take recovery action. You can get
round this potential problem by either setting a very long timeout on
the remote system, or by disabling its time-out facility altogether.
In this mode BBC KERMIT will treat incoming data according to the
file type you have specified with the SET FILE TYPE command, even
though no file is involved. Thus, for instance, you might need to
specify
SET FILE TYPE BINARY
if you are transferring a graphics dump to a printer. You can also use
the file type to control whether lines of a text file are terminated
with a Carriage-Return and a Line-Feed, or simply by a
Carriage-Return. If you have your printer set to perform an automatic
line feed when a Carriage-Return byte is printed, you should use
SET FILE TYPE ASCII CR
otherwise, you should use
SET FILE TYPE ASCII CRLF
You should note here that the "printer ignore" byte set by *FX 6 is
not used by BBC KERMIT.
52
BBC KERMIT User Guide
5.9 HANDLING PROBLEMS
By design, KERMIT is a highly reliable file transfer system, and
performs considerably better than any "dumb capture" facility within a
terminal emulator. The error-detection capabilities of KERMIT ensure
that data is transmitted correctly: in the rare cases where the
communications system you are using is unreliable, KERMIT systems will
abort a file transfer rather than transfer garbage.
That said, there are some cases where you may need to give BBC
KERMIT some assistance. The most common case will arise when one byte
is transmitted by one system but does not arrive at the other. KERMIT
breaks data up into small chunks called "packets", and if the missing
byte is one of the ones that the KERMIT systems use to control these
packets, you may end up with a machine that is waiting forever for
something that will never arrive.
The simplest way out of this possible problem is for you to keep an
eye on the progress of the transfer and see when it appears to grind
to a halt. The file transfer status display shows you a continuous
count of the packets as they are transmitted and received: normally
the number will increment steadily. If the number does not change for
a significant time (and here you must bear in mind that the mainframe
you are talking to may be running very slowly, so allow a good
interval to pass), you can press the RETURN key once. This tells BBC
KERMIT to drop whatever it was doing, and retransmit its last packet
of data to the other end. If the other system was stuck waiting for
data that had been lost, the retransmission will prod it into life,
and the automatic recovery mechanisms of KERMIT should allow the two
ends to pick up the transfer from where it stopped.
If you wish, you can automate this recovery by using the "timeout"
facility of BBC KERMIT. This is described below in the section on
"Advanced facilities"
53
BBC KERMIT User Guide
5.10 ADVANCED FACILITIES
BBC KERMIT permits you to use some more advanced techniques to
control file transfers. Some of these facilities involve the remote
KERMIT system, and it is possible that you will find a system that
does not implement them, since they are fairly recent additions to the
KERMIT specification. However, BBC KERMIT will be able to detect this,
and will act accordingly.
5.10.1. Interrupting transfers
If you discover that you don't want a transfer to continue for
some reason, you may interrupt it at any point by pressing a
control key. There are two possibilities here:
1. To interrupt one file
Pressing CONTROL and X together will interrupt the sending
or receiving of a file. If the file was one of a group (i.e.
you have specified a wildcard character to one of the
systems), BBC KERMIT and the remote system will carry on
with the next file in the group.
2. To interrupt a group
Pressing CONTROL and Z together will interrupt the sending
and receiving of one file, as in (1) above. However, if the
file was part of a group, the whole group is abandoned.
As we saw earlier, transfer interruption uses some fairly
recently devised KERMIT facilities. BBC KERMIT will notify the
remote system that you wish to interrupt the transfer, and the
remote system will acknowledge this if it supports the facility.
However, if it does not support the interrupt facility, it will
not respond correctly. When BBC KERMIT detects this situation, it
will use a different method to abort the transfer, by simulating
an irrecoverable error. The transfer will be terminated as
before, but here the systems will not be able to carry on to the
next file of a group, so that CONTROL-X and CONTROL-Z will both
have the same effect.
A more drastic way of interrupting a transfer is to press the
CONTROL and E keys together. This causes BBC KERMIT to notify the
remote system of an irrecoverable error, which will cause a
transfer to be abandoned. This technique, though, should really
only be used if the transfer is going wrong in some way.
If you interrupt the reception of a file into BBC KERMIT (or,
indeed if an error such as "Disc full" or "Can't extend" occurs),
54
BBC KERMIT User Guide
you will be left with a file on disc that contains only part of
the data that should have been sent. By default, BBC KERMIT will
delete this partial file for you. If, though, you want to
preserve whatever data has been transferred, you can issue the
command
SET INCOMPLETE KEEP
after which BBC KERMIT will close the file normally and preserve
it. You can re-instate the normal situation at any time with the
command
SET INCOMPLETE DELETE
5.10.2. Using timeouts
As we saw above, it is possible to automate the detection that
the transfer has stopped. This is done by defining "timeout
periods": if one or other system has not received any data when
its timeout expires, it will try to re-establish contact with the
other.
You control the use of timeouts in two ways. The first way
enables you to tell the remote system what timeout interval it
should use when receiving data from BBC KERMIT. This information
is transmitted to the remote system when a transfer starts. By
default, BBC KERMIT asks the remote system to use a timeout of 30
seconds, but you can change this with the SET SEND TIMEOUT
command. Note, though, that the remote system may or may not do
as it is asked: it may not support the timeout facility; it may
ignore the value sent and use its own interval; or the timeout
facility may need to be switched on by your giving it a command.
BBC KERMIT can also timeout if data does not arrive from the
remote system within a given interval. By default, the timeout
facility is turned off, so BBC KERMIT will never time out.
Issuing the command
SET TIMER ON
will switch the timeout facility on, and by default BBC KERMIT
will time out if it has not received any data in 15 seconds. The
SET RECEIVE TIMEOUT command lets you change this interval as
required. You can turn the timeout facility off a any time with
SET TIMER OFF
Note that here the remote system may ask BBC KERMIT to use a
specified timeout period when a transfer starts. BBC KERMIT,
though, always ignores this request, and decides what to do on
the basis of the SET commands you have issued.
55
BBC KERMIT User Guide
5.10.3. File name translation
As the preceding sections explained, a KERMIT program that sends
a file will pass the receiving KERMIT a standard-form filename
derived from the real name. Thus, a remote system may tell BBC
KERMIT to receive a file called
DATA.DAT
which has the "normal" format "name.type".
By default, BBC KERMIT will translate the filenames the other
system sends it, in an attempt to form a name tht is legal for
the filing system in use. It will discard the dot and what
follows it, and use the rest of the name as its basis.
This approach is normally exactly what you require, especially
for mainframe-to-micro transfers. However, sometimes you may be
able to control the name the remote system sends, and may be able
to ensure that it is a legal BBC filename without translation.
For example, if you are sending a file from one BBC KERMIT to
another, the sending command
SEND MYFILE $.PROGRAM.LIST3
would pass the name "$.PROGRAM.LIST3" to the other machine - here
you have told the sender the name to use rather than letting it
generate a "name.type" form.
In this case, you would tell the receiving system to use the name
exactly as it is with the command
SET FILE NAME UNTRANSLATED
command. It will store the incoming data in a file called
$.PROGRAM.LIST3 - it's up to you to make sure this really is a
legal filename.
You can restore the normal translation action at any time with
the command
SET FILE NAME NORMAL
5.10.4. Detailed protocol control
The rules by which files are transferred between KERMIT systems
are termed the "KERMIT protocol". These rules define in detail
56
BBC KERMIT User Guide
how data should be transferred: they specify how much can be sent
in one chunk or packet; what control sequences indicate the start
and end of a packet; what character encoding is to be used, and
so on. In almost every case you will have no need to change any
of these settings, since they are carefully chosen so that any
KERMIT can communicate to any other KERMIT in just about every
circumstance.
However, it is possible that you may come across cases where you
need to change some of the protocol values, either to improve the
performance of the file transfer mechanism, or because the
standard settings are inappropriate and do not work.
The protocol values are changed by the SET command, and BBC
KERMIT allows you to change all the possible values. The
reference section details all the SET commands concerned and
their effects. A detailed discussion of the various possibilities
is beyond the scope of this user guide, though, since some
understanding of the KERMIT protocol is needed. You will find
this explained in the "KERMIT Protocol Manual" (Edition 5 or
later); or you might contact the systems support personnel at
your computer centre.
57
BBC KERMIT User Guide
APPENDIX 1 : BBC KERMIT COMMANDS
This appendix lists in full detail all the commands available in
BBC KERMIT. The commands are grouped in sections appropriate to their
usage.
Throughout the appendix, commands are presented in a formal way
that shows you exactly what you may or must type at each point. For
example, you might see a command described as having a format
SET PAUSE <number>
Here the fixed parts, that you must type, are shown in capitals
(although, of course, you can type the command in either upper or
lower case if you wish). The third part of this particular command,
"<number>" is shown enclosed in "<>" brackets: this indicates that you
must provide some sort of value yourself, rather than type the actual
word shown. The fact that the parameter is described as "number" tells
you that a number of some sort is needed: the description of the
command will tell you what sort of number, why you should supply it,
and whether you could leave it out and let BBC KERMIT itself provide a
suitable value. You shouldn't include the "<>" brackets in the command
that you type.
Thus, a valid way of typing the command in this example would be
SET PAUSE 10
where you have supplied the numeric value "10" in the expected place.
BBC KERMIT will always tell you if you either omit a necessary
parameter or supply too many parameters.
All commands, and most parameters, can be abbreviated to their
first few characters, provided that what you type uniquely identifies
the command or parameter you mean. The command specification will tell
you about the few cases where parameters must always be typed in full.
58
BBC KERMIT User Guide
A1.1 COMMANDS FOR GENERAL CONTROL OF BBC KERMIT
The commands listed in this section are used to control the general
operation of BBC KERMIT.
CLOSE
This command closes any files that may be open. The only
circumstance in which this command is needed is if you have
entered BBC KERMIT when the maximum number of permitted files is
already open: in such a case you would not be able to transfer
any data until the files were closed.
The command has no parameters.
Example:
CLOSE
DISPLAY
This command displays whatever follows it on the command line to
the screen. It is mostly for use within TAKE files, where it can
be used to indicate progress, etc.
The command format is:
DISPLAY <message>
The parameters are:
<message>
The text to be displayed. Unlike other command
parameters, spaces are not taken as delimiters here:
everything from the first non-space after the command
to the end of the line is output.
Example:
DISPLAY About to start
will output "About to start" on the screen.
EXIT
This command causes BBC KERMIT to return to BASIC at the end of a
session.
The command has no parameters.
59
BBC KERMIT User Guide
Example:
EXIT
FIX
This command, available in the sideways ROM version only, updates
the default parameter table within BBC KERMIT with the values
currently established with the SET command. Since the command
needs write access to the address area &8000 to &BFFF where the
BBC KERMIT code is held, it can be used only if you have BBC
KERMIT in sideways RAM.
The command will ask if you are sure that you wish to do this: if
you reply "Y" the default table will be changed. The new values
will then be the defaults used when you enteR BBC KERMIT again.
The command has no parameters.
Example:
FIX
JSR
This command, available in the sideway ROM version only, allows
you to call some machine code routines you may have written
yourself and loaded into memory. The code is entered with a JSR
instruction and should exit with an RTS.
The command format is:
JSR <address>
The parameters are as follows:
<address>
Specifies the address of the code to be entered.
Example:
JSR &2000
enters some of your code at address &2000.
LOAD
This command loads a complete set of BBC KERMIT parameters (i.e.
the values established by the SET command) from a file on disc
produced by the SAVE command. You could use this command to avoid
having to type a large number of SET commands every time you
start BBC KERMIT up.
The command format is :
60
BBC KERMIT User Guide
LOAD <filename>
The parameters are as follows :
<filename>
Specifies the name of a file produced by the SAVE
command.
If the file is in the correct format, BBC KERMIT will load its
contents into memory, overwriting all the previous control values
established by the SET command.
Example :
LOAD :1.K.PARAMS
would set all the KERMIT control values from the data held in
file :1.K.PARAMS.
RESET
This command restores all the KERMIT control values (i.e. the
values controlled by the SET command) to the values they had when
BBC KERMIT was started.
Using this command enables you to instantly restore the control
values to their initial state after changes without needing to
use the SET command.
The command has no parameters.
Example:
RESET
SAVE
This command records all the current KERMIT control values (i.e.
the values established by the SET command) in a file on disc. You
may subsequently use the LOAD command to re-establish the saved
values.
This command enables you to configure BBC KERMIT to your exact
requirements once only, record the new settings, then, whenever
you start BBC KERMIT again, you can reset these values in one
operation.
The command format is :
SAVE <filename>
The parameters are :
61
BBC KERMIT User Guide
<filename>
This is the name of a file on disc into which the
control values will be written.
Example:
SAVE :1.K.PARAMS
will write the current control values to the file :1.K.PARAMS.
SET BAUD
This command allows you to define the line speed ("baud rate")
that BBC KERMIT will use on the RS423 port. BBC KERMIT allows you
to set the receive and transmit rates to the same, or different,
values as you wish. The command format is:
SET BAUD <number> <direction>
The parameters are:
<number>
This specifies the baud rate to be used. It can be any
of the baud rates supported by the BBC micro, that is,
any of the values 75, 110, 300, 1200, 2400, 4800, 9600
or 19200.
<direction>
This specifies whether you wish to set the receive
rate, the transmit rate, or both and can be one of
RECEIVE, TRANSMIT or BOTH. If you omit the parameter,
BBC KERMIT assumes you mean BOTH.
The command takes immediate effect. By default, BBC KERMIT uses a
baud rate of 9600 baud for transmit and receive.
Examples:
SET BAUD 1200
will set the baud rate to 1200 baud for transmit and receive.
SET BAUD 75 TRANSMIT
will set the baud rate to 75 baud for transmitting data, but
leaves the receive baud rate unchanged.
SET DEBUGGING
This command allows you turn the BBC KERMIT debugging facility on
or off. The command format is:
SET DEBUGGING <action>
62
BBC KERMIT User Guide
The parameters are:
<action>
This must be either ON or OFF.
If debugging is on, BBC KERMIT will output information during all
file transfers to enable you to trace errors. It will record the
protocol state, the contents of all packets received and
transmitted, plus indications of its internal operations. This
information is output to the printer.
When debugging is on it can be suspended or activated during a
file transfer at will. Pressing CONTROL and D when the file
transfer status display is showing will suspend debugging;
pressing it again will restart it.
By default, debugging is OFF.
Example:
SET DEBUGGING ON
will turn the debugging facility ON.
SET FLOW-CONTROL
This command defines how BBC KERMIT controls the flow of data in
and out of the RS423 port, in order to stop either it or the
remote system becoming overloaded.
The command format is
SET FLOW-CONTROL <type>
The parameters are:
<type>
This defines the type of flow control you wish. It can
be either XON/XOFF if you wish flow control to be by
the method of sending XON and XOFF control characters,
or CTS/RTS if you wish flow control to be done by
hardware signals.
The type of flow control you should select will depend on the
system you are connected to: consult your systems support
personnel if you are unsure what to use.
By default, BBC KERMIT uses XON/XOFF flow control.
Example:
SET FLOW-CONTROL CTS/RTS
63
BBC KERMIT User Guide
will select hardware flow control.
SET HANDSHAKE
This command specifies whether "handshaking" is to be done in
file transfer mode. This operation is needed if BBC KERMIT is
linked to some IBM mainframes, and causes it to wait for a
"handshake" character to be sent from the mainframe before it
attempts to send a data packet.
The command format is
SET HANDSHAKE <type>
The parameters are:
<type>
The type of handshake byte the mainframe is using. The
value should be one of NONE, BELL, CR, LF, XON or XOFF.
The first value specifies that no handshaking is to be
done: the others specify that it is to be done with
handshake bytes of &07, &0D, &0A, &11 or &13
respectively.
By default, BBC KERMIT uses a value of NONE and handshaking is
not performed.
Example:
SET HANDSHAKE XON
will turn handshaking on, and specify that an XON byte (code &13)
is to be used.
SET MUX-WAIT
This command is used in cases where the communications system
that BBC KERMIT is connected to is slow to respond to characters.
It causes BBC KERMIT to wait for a specified number of byte
periods before checking that it is clear to transmit each byte.
This delay is independent of the type of flow-control selected.
The command format is:
SET MUX-WAIT <number>
The parameters are:
<number>
The number of byte periods for which BBC KERMIT will
64
BBC KERMIT User Guide
wait, in the range 0 to 255.
By default, a value of 0 is used, so BBC KERMIT imposes no delay
before transmitting each byte.
Example:
SET MUX-WAIT 1
causes BBC KERMIT to delay for one byte period before testing
that it is clear to send a character.
SET PARITY
This command lets you define how characters are sent and received
on the RS423 port in terms of what happens to the eighth or
"parity" bit of each byte.
The command format is
SET PARITY <type>
The parameters are:
<type>
This selects the type of parity you wish to be applied.
It can be one of MARK, SPACE, ODD, EVEN or NONE.
The setting of parity you select is dependent on the system you
are connected to: you should consult your systems support
personnel for advice if you are unsure of what to use.
The setting of parity also affects how the file transfer
mechanism copes with data whose ASCII codes are in the range
128..255. If parity is anything other than NONE, BBC KERMIT will
assume that it cannot send such data directly, and will try to
arrange with the remote system to encode it in a way that can be
transmitted correctly. If parity is NONE, however, BBC KERMIT
will assume that all data can be transmitted, and will only use
the encoding technique if the remote system explicitely asks for
it. In the case of some networks this may cause confusion, since
the network may not use parity, and the recommended way of using
terminals might then be with parity NONE. However, the mainframe
system itself may operate with, say, SPACE parity, and may
discard the parity bit from every byte it sends or receives. This
requires BBC KERMIT to encode bytes in the range 128..255, but if
parity is NONE it will do this only if the other system asks for
it. To be safe, you would normally set parity to SPACE in such
cases.
By default, BBC KERMIT sets parity to SPACE.
Example:
65
BBC KERMIT User Guide
SET PARITY EVEN
selects EVEN parity.
SET TAKE-ECHO
This command defines whether the commands that BBC KERMIT obeys
from a TAKE file instead of the keyboard are displayed on the
screen as they are executed.
The command format is
SET TAKE-ECHO <action>
The parameters are
<action>
This must be either ON or OFF
Setting TAKE-ECHO to ON will cause all the commands from the TAKE
file to be displayed on screen before they are obeyed. If it is
set to OFF, the commands will be obeyed, but you will not see
them on the screen.
By default, TAKE-ECHO is ON.
Example:
SET TAKE-ECHO OFF
will turn off the display of commands from TAKE files.
SHOW
This command displays the values of all the KERMIT control
values. The display is broken up into several screens full: after
each screen you are given the option of pressing the RETURN key
to see the next screen, or the ESCAPE key to quit and input
another command.
The output of the SHOW command uses a 40 byte MODE 7 screen
whether or not you have used the WIDTH command to select an 80
byte wide command screen.
The command has no parameters.
Example:
SHOW
66
BBC KERMIT User Guide
TAKE
This command causes BBC KERMIT to read all further commands from
a file instead of from the keyboard. The file can be constructed
with an editor, a word-processing system, or with the *BUILD
command as you prefer.
The command format is:
TAKE <filename>
The parameters are:
<filename>
This specifies the name of a file containing BBC KERMIT
commands, in the same format as if they were typed at
the keyboard.
Once you issue the TAKE command, BBC KERMIT will read characters
from the specified file instead of the keyboard. Any KERMIT or
Operating System command can be issued from within a TAKE file,
except a further TAKE command. By default, BBC KERMIT will
display each command on the screen as it is obeyed, but you can
switch this echo off with the SET TAKE-ECHO command.
You may stop the use of the TAKE file at any point by pressing
the ESCAPE key. Execution will also stop if any command within
the TAKE file causes an error, or if you interrupt a file
transfer with by pressing CONTROL and Z (but not CONTROL and X).
Example:
TAKE :3.THINGS
will read subsequent commands from the file :3.THINGS.
WAIT
This command, primarily used within TAKE files, causes BBC KERMIT
to wait before proceeding with the next command. You can specify
an indefinite wait, or nominate a length of time: in either case
pressing any key will terminate the command.
The command format is:
WAIT <time>
The parameters are:
<time>
The interval in seconds for which BBC KERMIT will wait,
in the range 0 to 255. If you omit the value, BBC
KERMIT waits until a key is pressed.
67
BBC KERMIT User Guide
Example:
WAIT 30
causes BBC KERMIT to wait for 30 seconds, or until a key is
pressed.
WIDTH
This command allows you to choose between a 40 character and an
80 character command screen. It may not be used in the RAM
version on a model B.
Normally, BBC KERMIT uses a MODE 7 command screen, but if you
wish to *TYPE a BBC file or are using the REMOTE command to
obtain information from a remote server then an 80 byte wide
screen can be more convenient. The text colour used for the 80
character screen is controlled by the SET VDU-COLOUR command, and
the SET TV command determines whether a *TV command is issued
automatically on changing from 40 character to 80 character
screens.
The command format is
WIDTH <width>
The parameters are:
<width>
Specifies the width of the command screen. The value
can be either 40 or 80.
By default, BBC KERMIT uses a 40 character command screen.
Example:
WIDTH 80
selects an 80 character command screen.
68
BBC KERMIT User Guide
A1.2 COMMANDS FOR TRANSFERRING DATA
In this section we shall look at the detailed format of the
commands that you use to transfer files using BBC KERMIT, and to
control how BBC KERMIT will perform the transfers.
GET
This command should only be used if the remote KERMIT is running
in server mode. BBC KERMIT will send the server a command,
requesting it to transfer a file: the effect is to "pull" a file
from the remote server to BBC KERMIT.
The format of the command is this:
GET <remote-file> <local-file>
The parameters are as follows:
<remote-file>
This parameter is mandatory, and specifies the name of
the file on the remote machine. The format of the name
will, of course, be that required by the remote
machine.
<local-file>
This parameter is optional, and specifies the name of
the file on the BBC system into which you wish data to
be transferred. This name may include drive and
directory specifications if you wish the file to be on
a drive and directory other than the current default.
When this command is issued, BBC KERMIT will send a command to
the remote server to pull the file from it. The transfer will
take place automatically, and you need do nothing further.
There are several points to be considered about the format and
use of the filename parameters.
1. If you have used the SET DESTINATION MEMORY or SET
DESTINATION PRINTER commands to transfer data into the BBC's
RAM or to a printer instead of into a file, you must omit
the <local-file> parameter.
2. If the destination of the data is a file, and you omit the
<local-file> parameter, BBC KERMIT will try to generate a
legal BBC filename from the <remote-file> you supplied. If
this name is the same as a file that already exists, then by
default BBC KERMIT will try to alter it until there is no
clash. The display will tell you what is happening, and give
you the name of the file that is actually going to be
69
BBC KERMIT User Guide
written. You may prevent this renaming operation with the
SET FILE WARNING command: if you turn the facility off, any
existing file will be overwritten.
3. If you do specify a <local-file> parameter, then BBC KERMIT
will use this file for the received data whether or not it
exists already. It will not attempt to rename the file to
miss an existing one.
4. You may GET a group of files from the remote server by
putting that system's wildcard characters into the
<remote-file>. The remote server will send each file in turn
automatically, and you need take no action until the group
transfer is complete. Note that, if you do include wildcards
in the <remote-file> parameter, you must omit the
<local-file> parameter or all the files from the remote
server will be placed in the same BBC file.
RECEIVE
This command should be used only if the remote KERMIT is not
running in server mode, and causes BBC KERMIT to wait for a file
transfer to be started by the remote system. You will thus need
to issue a SEND command to the other KERMIT in order to make
something happen.
The command format is this:
RECEIVE <local-file>
The parameters are:
<local-file>
This parameter is optional, and specifies the name of a
file on the BBC system into which you wish data to be
transferred. It must be a legal BBC filename, and can
include drive and directory specifications.
When the command is issued, BBC KERMIT will wait passively for a
signal from the remote KERMIT that a file transfer is beginning.
This signal will include the name of the file that is being sent:
if you have included the <local-file> parameter, this name is for
information only, and the data will be written to the file you
have identified.
If you do omit the <local-file> parameter, BBC KERMIT will
attempt to generate a suitable BBC filename from the name
supplied by the remote system. The actions taken are the same as
those described above in the GET command.
Some points that must be considered when using the RECEIVE
command are:
1. If you have used the SET DESTINATION MEMORY or SET
DESTINATION PRINTER commands to transfer data into the BBC's
70
BBC KERMIT User Guide
RAM or to a printer instead of into a file, you must omit
the <local-file> parameter.
2. If you have directed the remote system to send a group of
files by including a wildcard in the filename, you should
omit the <local-file> parameter, or all the data will end up
in the one BBC file, each file overwriting the previous
ones.
SEND
This command is used whether or not the remote KERMIT is a
server, and sends a file or group of files to it.
The command has two possible formats:
SEND <local-file> <remote-file>
used if you are transferring data from a BBC file, and
SEND <remote-file>
if you are sending data from the BBC's memory.
The parameters are as follows:
<local-file>
This parameter specifies the name of the file on the
BBC that you wish to send, and can be any legal BBC
filename.
<remote-file>
This parameter is optional if you are sending data from
a file, and mandatory if you are sending data from the
BBC's memory. It specifies the filename that BBC KERMIT
will send to the remote system to identify the file:
this may be used by the remote system as the name of
the file that it puts the data into, but this is
entirely up to the remote system. If the filename is
legal for the remote system, the file would normally be
called by this name.
If the remote KERMIT is not running in server mode, you must
issue a RECEIVE command to the remote system to prepare it for
this SEND. You can either do this before you issue the SEND
command, or you can issue the SEND first and then issue the
RECEIVE to the other system. To allow you to do this latter
option, BBC KERMIT will pause after you issue the SEND command
(by default for 30 seconds) before it actually starts sending.
You can change this pause interval with the SET DELAY command;
alternatively, pressing any key while BBC KERMIT is waiting will
make it start the transfer immediately.
71
BBC KERMIT User Guide
Some points to note about the SEND command are:
1. If you omit the <remote-file> parameter, BBC KERMIT will
generate a "generally acceptable" name from the <local-file>
parameter and pass this to the remote system. It forms this
name by stripping off any drive and directory
specifications, then adding a filename suffix in the form
".XXX" to what remains. By default, the suffix added is
".BBC", but the SET FILE SUFFIX command allows you to change
this, or suppress it altogether.
2. You may send a group of files in one operation by including
the "*" or "#" wildcard characters in <local-file>. BBC
KERMIT will then send all files in the current directory
whose names match. You should not specify drive or directory
details in the name if you include wildcards: you may select
different drives with the DFS *DRIVE command before you
issue the SEND if you need to. You must omit the
<remote-file> name if you include wildcards in <local-file>.
SET DELAY
This command sets the period for which BBC KERMIT will wait after
you issue a SEND command.
The command format is
SET DELAY <number>
The parameters are
<number>
The delay in seconds, in the range 0 to 255.
When you issue a SEND command, BBC KERMIT will do nothing for the
specified period to enable you to issue commands to a remote
system. You can interrupt the delay and make BBC KERMIT proceed
by pressing any key.
By default, BBC KERMIT will delay for 30 seconds after you issue
a SEND command.
Example:
SET DELAY 5
will cause BBC KERMIT to wait after a SEND command for 5 seconds,
or until a key is pressed.
SET DESTINATION FILE
This command specifies that any data received by BBC KERMIT is to
be stored in a file, rather than placed into the BBC's memory or
72
BBC KERMIT User Guide
sent directly to the parallel printer.
The command format is
SET DESTINATION FILE
This is the default condition when BBC KERMIT is entered.
SET DESTINATION MEMORY
This command, available in the sideways ROM version only,
specifies that data received by BBC KERMIT is to be placed into
the BBC's memory rather than being stored in a file.
The command format is
SET DESTINATION MEMORY <address>
The parameters are:
<address>
This specifies the address where you want the first
byte received to be placed. The value must be from 1 to
4 hexadecimal digits, optionally preceded by "X", "$"
or "&".
After issuing this command, any data that you receive is placed
in memory instead of a file. The first byte is placed at the
specified address, and subsequent bytes are placed at higher
addresses. BBC KERMIT will not allow the received data to
overflow into the mode 7 file transfer status display screen, so
that the highest address available is &7BFF.
BBC KERMIT makes no checks on the address supplied: it is up to
you to ensure that you direct data to a sensible place. The
destination for incoming data will remain the BBC's memory until
you specify otherwise.
Note that BBC KERMIT will process the data received according to
the currently defined file type, even though the destination is
not a file.
The default condition for BBC KERMIT is to place data in files.
The RAM version of BBC KERMIT always uses destination FILE.
Example:
SET DESTINATION MEMORY 1900
will cause incoming data to go to memory, starting at address
&1900 (the default value of PAGE for Acorn DFS systems).
73
BBC KERMIT User Guide
SET DESTINATION PRINTER
This command specifies that data received by BBC KERMIT is to be
transferred directly to a printer rather that stored in a file or
in memory.
The command format is
SET DESTINATION PRINTER
The default condition is for BBC KERMIT to transfer data into
files.
Note that BBC KERMIT will process the data received according to
the currently defined file type, even though no file is involved.
SET INCOMPLETE
This command defines what BBC KERMIT will do if either you
interrupt the reception of a file, or if an error occurs while a
file is being received.
The command format is
SET INCOMPLETE <action>
The parameters are
<action>
This must be either KEEP or DELETE.
If the action is set to DELETE, BBC KERMIT will delete any file
whose reception is interrupted and is thus incomplete. If the
action is set to KEEP, BBC KERMIT will close the file normally,
and you will be able to use whatever data was received before the
interruption or error.
By default, BBC KERMIT will DELETE an incomplete file.
Example:
SET INCOMPLETE KEEP
causes BBC KERMIT to leave an incomplete file on the disc after
the transfer.
74
BBC KERMIT User Guide
SET FILE BUFFER-SIZE
This command, available in the sideways ROM version only, defines
the size of buffer BBC KERMIT uses when reading or writing files.
The command format is
SET FILE BUFFER-SIZE <number>
The parameters are:
<number>
This specifies the size of the buffer, in 256 byte
pages. It must be a value from 1 to 64.
BBC KERMIT uses the file buffer to read and write files in large
chunks, which can improve performance in some cases. However,
with large buffers, although BBC KERMIT will access the discs
less frequently, it will take longer when it does, so the remote
KERMIT may mistakenly think that contact has been lost. If this
occurs, the buffer size can be reduced.
By default, BBC KERMIT uses a buffer of 16 pages (4K bytes).
The RAM version of BBC KERMIT uses a file buffer of 8 pages (2K
bytes).
Example:
SET FILE BUFFER-SIZE 1
changes the file buffer to be 1 256 byte page long.
SET FILE SUFFIX
This command defines the characters that BBC KERMIT will add to a
BBC filename when generating a "generally acceptable" filename to
send to the remote system.
The command format is
SET FILE SUFFIX <string>
The parameters are
<string>
This is the suffix you wish added, consisting of up to
8 characters. The "." is not part of the suffix and
should not be included.
BBC KERMIT will, when generating a "generally acceptable"
75
BBC KERMIT User Guide
filename, take the final part of the BBC filename, add a ".",
then add the suffix defined by this command. This command lets
you change the suffix to suit your requirements. If you omit the
string, BBC KERMIT will not add anything to the BBC filename at
all (not even the ".")
By default, the suffix added to the BBC filename is "BBC".
Examples:
SET FILE SUFFIX ADE
will cause BBC KERMIT to add ".ADE" to BBC filenames for the
remote name.
SET FILE SUFFIX
will cause it not to add anything at all to the BBC filename.
SET FILE NAME
This command controls how BBC KERMIT handles the filename given
it by a remote system when it is receiving a file.
The command format is
SET FILE NAME <action>
The parameters are
<action>
This can be one of NORMAL or UNTRANSLATED.
If you set the action to NORMAL, BBC KERMIT will assume that the
name given by the remote system has the standard "name.type"
form, and will generate a BBC filename from it. If the action is
UNTRANSLATED, BBC KERMIT will use the exact name to create the
file: it is up to you to ensure that what the remote system gives
it really is a valid BBC file name.
By default, BBC KERMIT will translate filenames sent by the
remote system. (action NORMAL).
Example:
SET FILE NAME UNTRANSLATED
causes BBC KERMIT to use the name sent exactly as it is.
76
BBC KERMIT User Guide
SET FILE TYPE ASCII
This command tells BBC KERMIT that files it transmits and
receives are to taken as containing printable ASCII text and to
transform them accordingly.
The command format is
SET FILE TYPE ASCII <end-of-line>
The parameters are
<end-of-line>
This optional parameter tells BBC KERMIT how a file you
are sending denotes the end of a line of text, or how
you wish this to be denoted in a file you receive. It
can be one of LFCR, CRLF, CR or LF, where LF stands for
the Line Feed character, and CR for Carriage Return. If
you omit the parameter, BBC KERMIT assumes LFCR.
After using this command, BBC KERMIT treats all files as
containing printable ASCII text, with the end of each line
indicated by the specified sequence of control characters. When
sending a file, it will transform every occurrence of the
specified sequence into KERMIT's standard "end of line"
indicator, and the remote KERMIT should then change this into
whatever the standard representation of end-of-line is on its own
system. When receiving files, BBC KERMIT will change every
occurrence of the standard KERMIT indicator into the specified
sequence of bytes.
Note that this command has effect even if the source or
destination of data is memory rather than files. Also, you may
need to give an equivalent command to the remote KERMIT system to
make it treat the data correctly.
By default, BBC KERMIT treats files as ASCII, with end of line
indicated by LFCR bytes.
Example:
SET FILE TYPE ASCII CR
specifies a file type of ASCII, with lines being terminated with
a CR (&0D) byte.
SET FILE TYPE BINARY
This command tells BBC KERMIT that all files it receives or sends
should be treated as containing binary data.
The command format is
SET FILE TYPE BINARY
77
BBC KERMIT User Guide
After using this command, BBC KERMIT will transmit the bytes from
a file exactly as they are, and will not change any of them.
Similarly, the data it receives will be written to file with no
alteration.
Note that this command has effect even if the source or
destination of data is the BBC's memory or the parallel printer
rather than a file. Also, you may need to give an equivalent
command to the remote KERMIT system to make it treat the data
correctly.
By default, BBC KERMITs treats files as ASCII text.
Example:
SET FILE TYPE BINARY
makes BBC KERMIT treat files as containing binary data.
SET FILE WARNING
This command specifies the action that BBC KERMIT must take on
receiving a file if the name it tries to store the data under
clashes with that of an existing file.
The command format is
SET FILE WARNING <action>
The parameters are
<action>
This must be either ON or OFF.
If the file warning facility is ON, BBC KERMIT will check whether
the name it wishes to use to store incoming data clashes with an
existing file name. If it does, a warning is displayed on the
screen, and BBC KERMIT will change the right-most character of
the name to a "+" and check again. If this still clashes, the
next right-most characer is changed, and so on. An error will
occur if no unique name is found by the time the name has been
changed to be entirely "+" characters.
If file warning is OFF, BBC KERMIT will make no checks. Any
existing file will be overwritten with the new data.
By default, file warning is ON.
Example:
SET FILE WARNING OFF
78
BBC KERMIT User Guide
turns off the file warning facility.
SET RECEIVE TIMEOUT
This command defines the interval after which BBC KERMIT will
take action if it has received no data from the remote system.
The command format is
SET RECEIVE TIMEOUT <interval>
The parameters are
<interval>
Specifies the timeout period in seconds, in the range 0
to 255.
The command defines the timeout that BBC KERMIT is to use. Note,
though, that BBC KERMIT will not perform any timeout at all
unless you have used the SET TIMER command to turn the facility
on - by default it is OFF.
The choice of the timeout period will depend on many factors.
Regard should be paid to how fast the remote system is running -
if it is mainframe, it could be running slowly due to heavy use -
and also to the delays that operating over a network may impose.
Care should be taken not to set the value too low, or BBC KERMIT
will repeatedly timeout unnecessarily.
By default, a timeout interval of 15 seconds is set.
Example:
SET RECEIVE TIMEOUT 10
causes BBC KERMIT to timeout if no data has been received after
10 seconds, providing that the timeout facility is turned on.
SET SEND TIMEOUT
This command sets the timeout interval that BBC KERMIT asks the
remote system to use. The remote system should timeout if no data
has been received from BBC KERMIT after this interval.
The command format is
SET SEND TIMEOUT <interval>
The parameters are
<interval>
specifies the interval required in seconds, in the
79
BBC KERMIT User Guide
range 0 to 94.
BBC KERMIT will pass this value to the remote system at the
beginning of every file transfer. Note, though, that it is
entirely up to the remote system whether it uses this value,
ignores it, or uses a value of its own. You may need to give the
remote system commands to turn its timeout facility on.
By default, BBC KERMIT requests the remote system to time out
after 15 seconds.
Example
SET SEND TIMEOUT 10
causes BBC KERMIT to ask the remote system to time out after 10
seconds if no data has been received from the BBC system
SET SOURCE FILE
This command, available in the sideways ROM version only,
specifies that data transmitted to the remote system is taken
from files rather than the BBC's memory.
The command format is
SET SOURCE FILE
This is the default condition when BBC KERMIT is entered.
The RAM version of BBC KERMIT always uses source FILE.
SET SOURCE MEMORY
This command, available in the sideways ROM version only, causes
data transmitted to the remote system to be taken from the BBC's
memory rather than from files.
The command format is
SET SOURCE MEMORY <start-address> <end-address>
The parameters are
<start-address>
Specifies the address of the first byte to be
transferred. The value must be from 1 to 4 hexadecimal
digits, optionally preceded by "X", "$" or "&".
<end-address>
Specifies the address of the last byte to be
transferred plus one. The value must be from 1 to 4
hexadecimal digits, optionally preceded by "X", "$" or
80
BBC KERMIT User Guide
"&".
After issuing this command, BBC KERMIT will send data from the
BBC's memory instead of from a file. the area of memory to be
transmitted is defined by the two command parameters: it is up to
you to ensure that the addresses are sensible.
Note that BBC KERMIT will still process the data transmitted
according to the defined file type, even though the source of
data is not a file.
By default, BBC KERMIT will use source FILE.
The RAM version of BBC KERMIT always uses source FILE.
Example
SET SOURCE MEMORY 1B00 3200
will cause BBC KERMIT to send the data between memory addresses
&1B00 and &31FF inclusive in a SEND command.
SET TIMER
This command controls whether BBC KERMIT will timeout if no data
is received from the remote system after the timeout period has
expired.
The command format is
SET TIMER <action>
The parameters are
<action>
This must be either ON or OFF.
If the timer facility is turned ON, BBC KERMIT will use the value
defined by SET RECEIVE TIMEOUT to time the remote system out. If
it is OFF, the value is ignored, and BBC KERMIT will wait for
ever for data.
By default, the timer is OFF.
Example
SET TIMER ON
turns the timeout facility on.
81
BBC KERMIT User Guide
A1.3: COMMANDS FOR TERMINAL EMULATION
In this section we shall consider the commands that you can use to
control the terminal emulation facilities of BBC KERMIT.
CONNECT
This command changes BBC KERMIT from command mode into terminal
emulation mode. Once you have issued the command the screen will
clear and will become a 40 character or 80 character wide
terminal screen. From this point, anything you type will not be
examined by BBC KERMIT, but will be sent directly to the RS423
output and the system you are linked to.
You may now operate your BBC micro as if it were an ordinary
terminal. Depending on how you have set up BBC KERMIT, this will
be either an ordinary teletype device, or one compatible with the
DEC VT52 standard.
At any time you can return to KERMIT command mode by pressing the
CONTROL and F0 keys together. You will then be able to issue
KERMIT commands as before: the CONNECT command will re-instate
you as a terminal at the point where you left off.
Note that if you have selected a terminal type that is not
possible (for exaple, you have selected a VT52 in the RAM version
on a model B), the command will produce an error message
"Terminal not supported"
The command has no parameters.
Example:
CONNECT
Whenever you enter terminal mode with the CONNECT command,
printer logging will be off, disc logging will be deactivated,
and any pause you may have placed on screen output will be
lifted.
LOGGING
This command is used to initiate or terminate terminal session
logging, the facility by which all characters appearing on the
screen in terminal mode are also written to a file.
The command has two formats:
82
BBC KERMIT User Guide
LOGGING ON <filename>
or
LOGGING OFF
The first format initiates terminal session logging and opens a
file of name <filename>. The second format terminates logging and
closes the file.
When you use the command to initiate logging, BBC KERMIT will
open a file on disc in readiness. At this point, though, no
logging will take place. To cause characters to be written to the
files, you will need to press the CONTROL and F1 keys from
terminal mode (i.e. after using the CONNECT command). Now
characters appearing on screen will be written to the further.
Pressing CONTROL and F1 again will stop logging; a further press
will restart it, and so on.
You should remember to always use the
LOGGING OFF
command when you have finished, or you may lose some data that
has not yet been written to the disc.
Example:
LOGGING ON LOGFILE
opens a file LOGFILE for terminal logging.
SET IGNORE
This command nominates one character that will be totally ignored
when it is received from the host.
The command format is
SET IGNORE <number>
The parameters are:
<number>
The numeric code of the character to be ignored. If you
omit the value, any previous setting will be cancelled
and all characters will be actioned.
By default, BBC KERMIT will display all characters with ASCII
codes greater than 31, and also the CR, LF, DEL, BS and FF
control codes. TAB characters are expanded into spaces, and
ESCAPE is either displayed or taken as starting a VT52 ESCAPE
sequence. All other characters are always ignored.
83
BBC KERMIT User Guide
Example:
SET IGNORE &7F
causes the DEL character (code &7F) to be ignored if the host
sends it.
SET KEY-CLICK
This command controls whether an audible click is produced
whenever you press a key in terminal emulation mode.
The command format is
SET KEY-CLICK <action>
The parameters are:
<action>
This must be either ON or OFF
Setting key-click to ON will cause a click to be produced whenver
you press a key.
By default, key-click is OFF.
Example
SET KEY-CLICK ON
will turn the audible key-click ON.
SET LOCAL-ECHO
This command lets you define how characters you type on the
keyboard in terminal emulation mode are to be displayed on the
screen. When you press a key, the character is sent to the remote
system, which may then echo it back to your screen.
Alternatively, it may not perform this echo: in this case BBC
KERMIT must put the character on the screen itself.
The command format is
SET LOCAL-ECHO <action>
The parameters are:
<action>
This must be either ON or OFF
If local echo is ON, BBC KERMIT itself will display characters on
84
BBC KERMIT User Guide
the screen. If it is OFF, the remote system is expected to echo
each character back as you type it.
By default, local echo is OFF.
Example
SET LOCAL-ECHO ON
will turn local echo on.
SET TERMINAL
This command allows you to select the type of terminal emulation
you reuire in terminal mode.
The command format is
SET TERMINAL <type>
The parameters are:
<type>
This can be one of TT40, TT80 or VT52. The first two
provide teletype emulations using 40 or 80 byte wide
screens, and the last gives VT52 emulation. Some other
types may be selectable by ths command, but only the
three above are used in this release of BBC KERMIT.
Note that the command will allow you to select any type of
emulation, whether or not it can actually be provided. The
CONNECT command will fail, though, if the type required is not
available.
By default, the sideways ROM version of BBC KERMIT provides VT52
emulation on all machines. The RAM version of BBC KERMIT provides
VT52 emulation on the B+, B+128 and Master 128, and TT40 on the
model B.
Example
SET TERMINAL TT80
Makes the BBC micro appear as a simple teletype device using an
80 column screen.
85
BBC KERMIT User Guide
SET TV
This command lets you specify whether BBC KERMIT should
automatically issue a *TV command when it enters terminal
emulation mode or 80 character command screen mode.
The command format is
SET TV <number-1> <number-2>
The parameters are:
<number-1>
The first *TV parameter to be used.
<number-2>
The second *TV parameter to be used.
If you omit both parameters, BBC KERMIT will no longer issue a
*TV command: however, the effect of any previously issued command
will persist. By default, BBC KERMIT issues a *TV 0 1 to turn off
interlace.
Example:
SET TV 255 1
causes BBC KERMIT to issue a *TV 255 1 command on entering
terminal mode or 80 character command screen mode.
SET VDU-COLOUR
This command, available in the sideways ROM version only, lets
you select the colour used for text in 80 character terminal
emulation mode or 80 character command screen mode. The command
has no effect for 40 character terminal mode. The background
colour cannot be changed, and will always be black.
The command format is
SET VDU-COLOUR <colour>
The parameters are:
<colour>
Specifies the colour to be used, and must be one of
RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN or WHITE.
By default, the text colour used is white.
Example:
SET VDU-COLOUR GREEN
will select green text on a black background.
86
BBC KERMIT User Guide
TRANSMIT
This command allows you to send a text file from the BBC to a
host that does not have KERMIT. Binary files cannot normally be
sent in this way.
The command format is
TRANSMIT <filename>
The parameters are:
<filename>
This specifies the file you wish to send.
When you issue this command, BBC KERMIT will automatically enter
terminal mode and will send the contents of the file to the host.
It will remain in terminal mode after all the data has been sent,
and you will be able to type at the keyboard as normal. Sending
the file can be interruped at any time by pressing ESCAPE.
Example:
TRANSMIT DELEG8
will send the text file DELEG8 to the host in terminal mode.
87
BBC KERMIT User Guide
A1.4 COMMANDS FOR CONTROL OF REMOTE SERVERS
This section specifies the command that you can use to control the
operation of a remote server.
It is important to note that servers vary in which commands they
implement from this section, and also on the exact way in which they
action others. All servers should implement the BYE and FINISH
commands, but some may treat them both as FINISH and leave the
terminal session logged in. Some servers implement all the facilities
described under the REMOTE command below, some implement them
partially or in different ways, and some don't implement them at all.
In particular, some servers may implement commands such as REMOTE
DIRECTORY but ignore any parameters you supply. The only way to be
sure is to consult the user guide for the server concerned.
If you do attempt to use a server command that is not available, an
error message such as "Unimplemented server command" will be
displayed.
In all cases, you can interrupt a REMOTE command that is producing a
large amount of output by pressing CONTROL and Z. The techniques
described in chapter 5 for handling problems are also applicable here
should the transfer of the output stop for some reason: however the
REMOTE command does not provide you with any indication of the
progress or otherwise of the transfer.
Most of the REMOTE commands produce at least one line of output from
the remote server which is displayed on BBC KERMIT's command screen.
Often this output will be formatted assuming that the screen is 80
characters wide: if you are using the sideways ROM version of BBC
KERMIT, or are using a B+, B+128 or Master 128, you can change the
command screen width from 40 to 80 characters with the command
WIDTH 80
so that the output layout looks correct.
BYE
This command tells the remote server to cease operation, and also
to log out the terminal job in which it is running.
The command has no parameters.
Example:
BYE
88
BBC KERMIT User Guide
FINISH
This command tells the remote server to cease operation, but to
leave the terminal session logged in.
The command has no parameters.
Example:
FINISH
REMOTE COPY
This command instructs the server to copy one file to another,
leaving the source file unchanged.
The command format is
REMOTE COPY <oldfile> <newfile>
The parameters are:
<oldfile>
Specifies the source file for the copy operation.
<newfile>
Specifies the name of the file the data is to be copied
into.
Example:
REMOTE COPY LURGI.ILL SICKNOTE.LIS
would copy the contents of file LURGI.ILL into a new file
SICKNOTE.LIS.
REMOTE CWD
This command instructs the server to change its current working
directory (or wherever it looks for files unless told otherwise).
The command format is
REMOTE CWD <directory>
The parameters are:
<directory>
This optional parameter specifies the name of the
directory to be used in future.
89
BBC KERMIT User Guide
If you omit the directory name, the server should reset its
current directory to that in force when you logged in. If you do
specify a name, BBC KERMIT will prompt you for a password, in
case the server system requires one. You can either type the
password, which will not be echoed to the screen, then press
RETURN; or, if no password is needed, simply press RETURN.
Example:
REMOTE CWD [.SUBDIR]
would tell a server running under VAX/VMS to set the current
directory to be [.SUBDIR]
REMOTE DELETE
This command instructs the server to delete the specified file.
The command format is
REMOTE DELETE <filename>
The parameters are:
<filename>
Specifies the file you wish deleted. The server may
permit you to specify a wildcarded name, or it may not.
Example:
REMOTE DELETE /temp/notalotofgood
would ask the server to delete the file /temp/notalotofgood.
REMOTE DIRECTORY
This command instructs the server to produce a directory listing,
which is displayed on BBC KERMIT's command screen.
The command format is
REMOTE DIRECTORY <filespec>
The parameters are:
<filespec>
This optional parameter gives a file specification or
other string that refines a directory listing
selection. If you omit it, the server would usually
display a list of all files in the current directory.
90
BBC KERMIT User Guide
Example:
REMOTE DIRECTORY WORD*.LIS
would ask the server for a listing of the names of all the files
with names starting "WORD" and with file type "LIS".
REMOTE HELP
This command asks the server to display some help information
about itself.
The command format is
REMOTE HELP <topic>
The parameters are:
<topic>
This optional parameter specifies a specific topic on
which help is needed: the server may refine its output
to suit, or it may ignore the selection. If you omit it
the server would usually output some general
information. Unlike other command parameters, <topic>
consists of the whole of the rest of the command line
and so may include spaces.
Example:
REMOTE HELP
asks the server for general help information.
REMOTE HOST
This command asks the server to pass a command string to the
mainframe operating system's command interpreter for execution.
The command format is
REMOTE HOST <command>
The parameters are:
<command>
This is the command you wish to be executed. Unlike
other command parameters it consists of the whole of
the rest of the command line, and so can contain
spaces.
Some care is needed in the choice of command that you ask to be
executed. Since the operating system has no means of carrying on
91
BBC KERMIT User Guide
a dialogue with you, commands that require interaction, or
otherwise cannot run in batch mode are unsuitable.
Example:
REMOTE HOST %allow readaccess data.dat
would pass a command "%allow readaccess data.dat" to the server's
operating system for execution.
REMOTE RENAME
This command requests the server to change the name of a file.
The command format is
REMOTE RENAME <oldname> <newname>
The parameters are:
<oldname>
Specifies the file whose name is to be changed.
<newname>
Specifies the new name to be given to the file.
Example:
REMOTE RENAME napoleon snowball
asks the server to change the name of file "napoleon" to
"snowball".
REMOTE SPACE
This command asks the server to display details of your disc
usage.
The command format is
REMOTE SPACE <selector>
The parameters are:
<selector>
This optional parameter specifies some selector by
which the server refines its calculations of disc
usage.
Example:
REMOTE SPACE
92
BBC KERMIT User Guide
produces a display of the disc space you are using.
REMOTE STATUS
This command requests the server to display details about its own
status.
The command has no parameters.
Example:
REMOTE STATUS
REMOTE TYPE
This command request the server to type a file on the BBC KERMIT
command screen.
The command format is
REMOTE TYPE <filename>
The parameters are:
<filename>
The name of the file you wish to be typed. The server
may permit you to specify wildcards, in which case the
matching files will be displayed one after the other.
Example:
REMOTE TYPE DATA.LIS
would type the contents of file DATA.LIS.
REMOTE WHO
This command requests the server to display details of other
users logged in to the system.
The command has no parameters.
Example:
REMOTE WHO
93
BBC KERMIT User Guide
A1.5: COMMANDS FOR DETAILED PROTOCOL CONTROL
The commands described in this section are used to exert detailed
control over the KERMIT protocol. As explained earlier, it is unlikely
that you would ever need to use them. You should consult the KERMIT
Protocol Manual for a detailed description of the facilities they
control.
SET EIGHT-BIT-PREFIX
This command defines the eight-bit-prefix character that BBC
KERMIT will ask the remote system to agree to use.
The command format is
SET EIGHT-BIT-PREFIX <character>
The parameters are
<character>
The printable character to be used.
By default, BBC KERMIT will attempt to use the "&" character as
its eight-bit prefix.
Example
SET EIGHT-BIT-PREFIX %
sets the eight-bit prefix character to be "%".
SET PAUSE
This command defines a "turn-round" delay that BBC KERMIT will
use in packet transmission. It defines the time that BBC KERMIT
will wait, after receiving a packet from the remote system,
before transmitting the next to it. This overcomes problems with
some systems that cannot accept input that comes too soon after
output.
The command format is
SET PAUSE <number>
The parameters are
<number>
The pause time in seconds, in the range 0 to 255.
94
BBC KERMIT User Guide
By default, BBC KERMIT does not pause (i.e. the pause value is
0).
Example
SET PAUSE 1
causes BBC KERMIT to pause for 1 second after receiving a packet
before transmitting one.
SET RECEIVE END-OF-LINE
This command defines the value that BBC KERMIT requests the other
end to use to signal the end of a packet.
The command format is
SET RECEIVE END-OF-LINE <number>
The parameters are
<number>
The number of the control character in the range 0 to
31.
By default, BBC KERMIT asks for packets to be terminated with
Carriage Return (&0D).
Example
SET RECEIVE END-OF-LINE &0A
requests the remote KERMIT to terminate packets with Line Feed
(code &0A).
SET RECEIVE PACKET-LENGTH
This command defines the maximum packet size that BBC KERMIT will
ask the remote system to send. You can use this command to
optimise transfers on a noisy communications line: short packets
will have a higher chance of succesful transmission in such
circumstances.
The command format is
SET RECEIVE PACKET-LENGTH <number>
The parameters are
95
BBC KERMIT User Guide
<number>
The maximum size of packet wanted from the remote
system, in the range 35 to 94.
By default, BBC KERMIT asks the remote system to use a maximum
packet size of 94 bytes.
Example
SET RECEIVE PACKET-LENGTH 60
causes BBC KERMIT to request the remote system to use a maximum
packet size of 60 bytes.
SET RECEIVE PADCHAR
This command defines the character that BBC KERMIT requests the
other to use when padding before sending a packet.
The command format is
SET RECEIVE PADCHAR <number>
The parameters are
<number>
The numeric code of the character to be used for
padding in the range 0 to 31.
By default, BBC KERMIT will ask for a pad character of code 0.
Example
SET RECEIVE PADCHAR &07
requests the remote KERMIT to pad with &07 characters.
SET RECEIVE PADDING
This command defines the number of pad characters that BBC KERMIT
will ask the other end to send before each packet.
The command format is
SET RECEIVE PADDING <number>
The parameters are
<number>
The number of pad characters to be requested, in the
96
BBC KERMIT User Guide
range 0 to 94.
By default, BBC KERMIT asks for no pad characters to be sent.
Example
SET RECEIVE PADDING 10
will cause BBC KERMIT to request the remote system to precede
each packet with 10 pad characters.
SET RECEIVE START-OF-PACKET
This command defines to BBC KERMIT the character that the remote
system will use to indicate the start of each packet.
The command format is
SET RECEIVE START-OF-PACKET <number>
The parameters are
<number>
The numeric code of the character the remote system
will use, in the range 0 to 31.
By default, BBC KERMIT will expect the remote system to precede
each packet with a &01 character.
Example
SET RECEIVE START-OF-PACKET &03
tells BBC KERMIT that the remote system will precede each packet
with a &03 character.
SET RETRIES
This command defines the number of times BBC KERMIT will repeat
an attempt to transmit a packet to, or receive a packet from, the
remote system. You may need to increase the number of attempts
allowed if you are using a noisy communications line.
The command format is
SET RETRIES <number>
The parameters are:
<number>
The number of retries to be made, in the range 1 to
255.
97
BBC KERMIT User Guide
By default, BBC KERMIT will make 5 retry attempts (i.e. a total
of 6 attempts in all) before deciding that a packet cannot be
transmitted or received correctly and abandoning the file
transfer.
Example:
SET RETRIES 16
will cause BBC KERMIT to make 16 retry attempts before abandoning
the transfer.
SET SEND END-OF-LINE
This command defines the character that BBC KERMIT will use to
terminate the first packet it sends to the remote system in each
transfer. Subsequent packets will be terminated by the character
that the remote system requests when it tells BBC KERMIT its
requirements.
The command format is
SET SEND END-OF-LINE <number>
The parameters are
<number>
The numeric code of the character to be used, in the
range 0 to 31.
By default, BBC KERMIT uses &0D (Carriage Return).
Example
SET SEND END-OF-LINE &0A
causes the first packet sent in each transfer to be ended with
Line Feed (code &0A).
SET SEND PADCHAR
This command defines the padding character with which BBC KERMIT
will precede the first packet to be sent in a transfer.
Subsequent packets will be preceded by the character requested by
the remote system in its SEND-INIT packet.
The command format is
SET SEND PADCHAR <number>
98
BBC KERMIT User Guide
The parameters are
<number>
The numeric code of the character to be used, in the
range 0 to 255.
By default, BBC KERMIT uses a pad character of NUL (code &00).
Example
SET SEND PADCHAR &03
sets the pad character used to be &03.
SET SEND PADDING
This command defines the number of pad characters BBC KERMIT will
send before the first packet in a transfer. Subsequent packets
will be preceded by the number requested by the remote system
when it tells BBC KERMIT its requirements.
The command format is
SET SEND PADDING <number>
The parameters are
<number>
The number of pad characters to be sent, in the range 0
to 255.
By default, BBC KERMIT sends no pad characters.
Example
SET SEND PADDING 21
causes BBC KERMIT to send 21 pad characters before its first
packet.
SET SEND QUOTE
This command defines the character that BBC KERMIT will use to
prefix control characters in data packets that it sends. Since
every occurence of the quote character in a file must itself be
preceded by a quote when transmitted, this command lets you
minimise the data to be moved if the file contains a large number
of the normal quote character.
The command format is
SET SEND QUOTE <character>
The parameters are
99
BBC KERMIT User Guide
<character>
The printable character to be used.
By default, BBC KERMIT uses the "#" character.
Example
SET SEND QUOTE $
causes BBC KERMIT to prefix control characters it sends in data
packets with a "$".
SET SEND START-OF-PACKET
This command defines the character that BBC KERMIT will send to
indicate the start of every packet.
The command format is
SET SEND START-OF-PACKET <number>
The parameters are
<number>
The numeric code of the character to be sent, in the
range 0 to 31.
By default, BBC KERMIT sends a &01 character in front of every
packet.
Example
SET SEND START-OF-PACKET &04
causes BBC KERMIT to precede every packet it sends with a &04
character.
100
BBC KERMIT User Guide
APPENDIX 2 : OBTAINING, BUILDING AND MODIFYING BBC KERMIT
This appendix describes how you can get hold of BBC KERMIT and
build it from the assembly language sources, or modify an existing
version.
101
BBC KERMIT User Guide
A2.1 OBTAINING BBC KERMIT
There are several ways of acquiring a BBC KERMIT, as follows:
1. You can obtain the files from the KERMIT tapes distributed by
Columbia University in New York, or by anonymous FTP from their
CU20B system.
2. You can obtain the files from Lancaster KERMIT distribution by
file transfer over the JANET or PSS networks, by using KERMIT
itself, or on magnetic tape. The files are held online on a VAX
11/780 running VMS and can be freely accessed by anyone.
3. You can obtain the files on Acorn DFS format discs from
Lancaster KERMIT distribution: the sources and the compiled
binaries will need 1 double-sided 80 track drive, and the
documentation (in Wordwise Plus and printable format) needs 2
more.
If you are within the UK you should use option 2 or 3 above:
Columbia will refer all KERMIT supply enquiries from the UK to
Lancaster in the first instance. Also, Lancaster will generally have a
more up-to-date release of BBC KERMIT than is available from Columbia.
Options 2 and 3 will get you the source files exactly as you need
them for the ADE assembler. For reasons of space, though, the sources
are distributed by Columbia as one monolithic file: you will need to
process this file with an editor on your mainframe to split it into
its components at the clearly marked points before moving it to a BBC
machine.
However you get the files, you will eventually have a set of
assembler source files from which you need to generate compiled
binaries. If you get BBC KERMIT on disc from Lancaster distribution
you will find binary files already there, called ROMnnn for the
sideways ROM version and RAMnnn for the RAM version (where nnn is the
mark and version number). Otherwise you will find files called
BBCROM.HEX and BBCRAM.HEX, which are Intel hex dumps of the compiled
binaries. You should get these onto a BBC disc, then run the small
BASIC program BBCDEHEX.BAS to convert them to binary form.
The binary of the RAM version can be *RUN immediately: that for the
sideways ROM version should either be loaded into sideways RAM at
address &8000 or programmed into a 16K 27128 EPROM. For those sites
not possessing EPROM programming facilities, Lancaster KERMIT
distribution is willing to program a small number of EPROMs for anyone
who supplies them.
A2.1.1 The source files
The BBC KERMIT assembler source is held in a fair number of files
102
BBC KERMIT User Guide
and is now very large (and still growing). The source is split by
functionality, and further divided to keep the files small enough
to permit easy and quick editing (we have taken about 800 lines
as the limit for a file). The organisation is not fixed - we
shall refine it with experience and as the system changes, so the
names are not guaranteed to be unchanged from one release to
another.
For version 1.40 the files that make up BBC KERMIT are as
follows:
a. Files supplied on disc
BBC KERMIT as issued on disc consists of two sets of files. The
first set consists of the assembler source files and two compiled
binary files: the files are
BBCMIT This is the first file to be assembled, containing
compilation switches and messages.
BBCDEF Various global defines.
BBCWKS Workspace declarations
BBCMAI The entry code to the system.
BBCCPR The command processor.
BBCCMD Command routines for general commands such as
TAKE, SEND, etc.
BBCGEN Command routines for generic functions such as
BYE, REMOTE etc.
BBCST1 The SET command part 1.
BBCST2 The SET command part 2.
BBCSHW The SHOW command.
BBCREC Code for receiving files.
BBCSND Code for sending files.
BBCCOM Communications handling code.
BBCTM1 Terminal emulation part 1.
BBCTM2 Terminal emulation part 2.
BBCPM1 Packet handling code part 1.
BBCPM2 Packet handling code part 2.
BBCPM3 Packet handling code part 3.
BBCFIL File handling code.
BBCSB1 General subroutines.
BBCSB2 General subroutines.
BBCSB3 General subroutines.
BBCSB4 General subroutines.
BBCTX1 Texts for messages part 1.
BBCTX2 Texts for messages part 2.
ROMnnn The compiled binary file for the sideways ROM
version. Here "nnn" gives the mark and version
number.
RAMnnn The compiled binary file for the version running
in RAM.
A.Assem A compiled binary file for a 65C02 assembler that
you can use as an alternative to ADE.
103
BBC KERMIT User Guide
A.ReadMe Notes on the 65C02 assembler, describing its
differences from ADE.
The second set of the files is that comprising the User Guide.
This is supplied as Wordwise Plus source files, and as a spooled,
printable file.
b. Files on the Lancaster VAX filestore
The VAX filestore contains most of the above files apart from
the WordWise Plus source files for the User Guide. The assembler
source files have the same names as those on the discs, but each
filename has a suffix ".ADE" added to it.
The other files are:
BBCKERMIT.DOC A printable copy of the user guide. This
contains no printer control characters, and
uses 66 lines on each printed page.
BBCKERMIT.BWR An up-to-date list of known bugs and problems.
(Note that this file may not always be
present)
BBCROM.HEX The compiled sideways ROM version in Intel hex
format.
BBCRAM.HEX The compiled RAM version in Intel hex format.
BBCHEX.BAS The BASIC program used to convert the binary
files to Intel hex.
BBCDEHEX.BAS A BASIC program to convert from Intel hex to
binary. Note that the version supplied with
BBC KERMIT release 1.02 is not suitable for
use with release 1.30 and later versions.
BBCASM.HEX An Intel hex form of the 65C02 assembler that
you can use as an alternative to ADE.
BBCASM.DOC Notes on the 65C02 assembler.
c. Files on tapes from Columbia
Here the files consist of one large source file BBCKERMIT.ADE,
containing a concatenation of the separate sources, plus the
additional files listed above in (b). The Wordwise Plus format
files for the User Guide are not available from Columbia.
104
BBC KERMIT User Guide
A2.2 BUILDING BBC KERMIT FROM A HEX FILE
The easiest way to obtain a binary version of BBC KERMIT, apart
from getting one on a disc from Lancaster KERMIT distribution, is to
generate it from one of the Intel hex format files.
The hex files will be found on Columbia tapes and in Lancaster
filestore as BBCROM.HEX and BBCRAM.HEX. They are in completely
standard format, so can be converted with any utility you may already
have. However a small BASIC program is provided to do this for you:
this is in file BBCDEHEX.BAS, and is also listed below.
You will need to get the Intel hex files you require to use onto a
BBC disc in some way to start with. An ordinary terminal emulator with
dumb capture facility will suffice for this. You will also need the
BBCDEHEX.BAS program: you can capture this in the same way, or, since
it is short, type it in from the listing. Note that earlier releases
of this program should not be used with BBC KERMIT version 1.30 and
later. If you capture the program, say into a file called DEHEX, you
will need to convert it from text form into a BASIC program in memory.
You can do this with the commands
*EXEC DEHEX
SAVE"BDEHEX"
for example.
Once the program is ready you can simply RUN it. It will ask you to
name the input and output files to use, then will do all the necessary
conversion work.
105
BBC KERMIT User Guide
A2.3 BUILDING BBC KERMIT FROM SOURCE
Generating BBC KERMIT from the assembly sources is a fairly easy
process. You will need to arrange the source files on the discs to
match the CHN directives, as described below.
BBC KERMIT was developed using the ADE assembler/editor ROM,
available commercially (see Appendix 2 section 6 for the address). An
alternative to ADE is now available: a 65C02 macro assembler written
at Lancaster is distributed with BBC KERMIT. This assembler runs
either in a 27128 EPROM or in sideways RAM, and is substantially
faster than ADE. From version 1.42 onwards the sources are compatible
with both assemblers.
A2.3.1 Source file layout
To compile BBC KERMIT you will need either 2 80 track
single-sided units, or 1 80 track double-sided unit if you are
using DFS, or an Econet file server.
The source files are divided into 2 groups, reflecting how they
can be held on 80 track BBC discs. Files from BBCMIT to BBCSND
inclusive should be held on one disc surface. Files BBCCOM to
BBCTX2 can be held on either the reverse side of this disc, or on
side 1 of another disc. Questions output from the BBCMIT file
during assembly allow the system to configure itself to point to
the right drives: you should reply "N" to the initial question
"All files on one disc surface?"
There should be space for the object file to be placed on the
first of the two surfaces.
Note that if you are using an Econet file server you can place
all the files on one disc: in this case you should reply "Y" to
the question "All files on one disc surface?".
A2.3.2 The assembly process
Having arranged the files on your BBC discs as described above,
you can compile them very simply.
a. Using ADE
To use the ADE assembler, simply type the command
106
BBC KERMIT User Guide
*ASM BBCMIT KERMIT
Precede this command with CTRL-B if you wish to produce a
listing on a printer.
The file BBCMIT will output some questions to you to
determine what it is to do. The first question is whether or
not you are using the ADE assembler: reply "Y" to this.
Futher questions will be on the disc layout, whether you
wish to build the sideways ROM or the RAM version, and
whether you wish a listing to be output, then will do the
assembly.
b. Using the Lancaster 65C02 assembler
To use the Lancaster 65C02 assembler, you will need to
either program the code into a 27128 EPROM or load it into
sideways RAM. Once there, you can compile BBC KERMIT.
To simply check the syntax of the sources, without producing
an object code file, type the command
*ASSEMBLE BBCMIT -A
File BBCMIT will ask you if you are using ADE: reply "N" to
this. It then asks you the same questions on disc layout as
described above.
To produce object code, the command you use becomes, for
example
*ASSEMBLE BBCMIT -A -OKERMIT
where the output code file here is called KERMIT.
Both the commands shown above produce listings to the screen
only. To list to a printer, you should add a "-P" option to
the command: thus, for example
*ASSEMBLE BBCMIT -A -OKERMIT -P
produces object code in file KERMIT and a listing to the
printer.
Note that the "-A" option is essential if you use the
Lancaster 65C02 assembler for BBC KERMIT.
Whichever assembler you use, the listing is configured to be
produced on an EPSON FX80 or compatible printer, and switches
itself into 8 lines per inch, condensed print mode. If your
printer is not EPSON-compatible, you will need to change the PAGE
and SYSVDU commands in file BBCMIT to suit your requirements.
The output listing from ADE will need up to 132 characters on a
107
BBC KERMIT User Guide
line. On the Lancaster 65C02 assembler the line width is
configurable: if your printer only has 80 byte lines then change
the PAGE directive in file BBCMIT to read
PAGE 88,80
The listing currently takes over 2 hours to print on an EPSON
FX80, and occupies over 200 pages.
If you wish, you can list only some of the source files in a
compilation. File BBCMIT contains a number of boolean switches,
one for each source file, that dictate whether that file is to be
listed if "selective listing" is specified. You should change the
switches for the files you wish to list, then specify "selective
listing" to the question that is output at the start of
compilation.
108
BBC KERMIT User Guide
A2.4 CHANGING KERMIT DEFAULTS
There are several ways to arrange for BBC KERMIT to use different
control values. The easiest is to leave the code as it is, and use the
LOAD, SAVE or TAKE commands to reset the values as you want them when
you start up. You can, of course, change the source and recompile: or
you can leave the source alone and patch the object code.
BBC KERMIT maintains the current control values in a RAM table, and
the SET command manipulates the values therein. On start up, or using
the RESET command, KERMIT copies a block of defaults into the RAM
table. The SAVE command writes the RAM table to a file, and the LOAD
command reloads from a file into the table.
A2.4.1 Changing the source
You can change the defaults by altering the values held in the
main defaults table. This is held in the source file BBCMAI, and
is clearly marked. Each value is commented to show which
parameter it defines: for possible values see below.
A2.4.2 Patching the object code
If you do not wish to recompile, you can load the object file to
memory and patch it with a machine-code monitor such as EXMON
before programming another EPROM or saving it to disc.
Alternatively, you can use a default setting program written in
BASIC by Dave Walker of University College Cardiff to do the
changes: this is available on disc in file B.Patcher, or from the
Lancaster distribution machine in file BBCPATCHER.BAS. This
program handles the process automatically, so there is no need to
consult the following section.
The defaults block is not in a fixed place in the program image,
but the code contains pointers to let you locate it. You can find
the base of the defaults table in the following way:
a. The sideways ROM version
1. Look at byte $8007. This gives an offset to the copyright
text in the ROM header. Add $8000 to the contents to form
the address of the zero byte preceding the string.
2. Follow to the end of the copyright string (which currently
109
BBC KERMIT User Guide
reads "(C) CUCCA 1986") and find the terminating zero byte.
3. The succeeding bytes are then as follows:
Byte 0 The mark number of this release.
1 The version number.
2-3 The address (low-high) of the first byte of the
defaults table in the ROM.
4-5 The address (low-high) of the first unused byte in
the ROM.
b. The RAM version
The first bytes of the program are as follows
Byte 0-2 A JMP instruction to the first executable byte of
the image.
3 The mark number of this release.
4 The version number.
5-6 The address (low-high) of the first byte of the
defaults table in the program.
7-8 The address (low-high) of the first unused byte in
the program.
Note that if you wish to add patch code to the program, you
should place it after the last byte of the image, then alter
the address held in bytes 7-8 to be that of the next byte
after your added code. Failure to change this address will
result in your patch being overwritten by the
dynamically-allocated file buffer when the program runs.
A2.4.3 Format of the defaults block
The data in the defaults block is defined as follows:
Byte 0 The transmit baud rate. This should be set to a number
in the range 1..8, where the value is as for the *FX 7
command. (SET BAUD n TRANSMIT)
1 The receive baud rate. This should be set to a number
in the range 1..8, where the value is as for the *FX 8
command. (SET BAUD n RECEIVE)
2 The local echo flag, set to 0 for off or 1 for on.
(SET LOCAL-ECHO)
3 No longer used.
4 The debug flag, set to 0 for off or 1 for on. (SET
DEBUGGING)
110
BBC KERMIT User Guide
5 No longer used.
6 The timeout value BBC KERMIT will ask the other system
to use, in the range 0..94. (SET SEND TIMEOUT)
7 The timeout value BBC KERMIT will use on the remote
system (if TIMER is on) in the range 0..255. (SET
RECEIVE TIMEOUT)
8 The TIMER flag, set to 0 for off or 1 for on. (SET
TIMER)
9 The pause BBC KERMIT uses on packet turnround, in the
range 0..255 (SET PAUSE)
10 The delay after the SEND command is issued, in the
range 0..255 (SET DELAY)
11 No longer used.
12 No longer used.
13 The terminal mode keyclick flag, set to 0 for off or 1
for on. (SET KEY-CLICK)
14 The quote character BBC KERMIT will send. (SET QUOTE)
15 The eight-bit prefix BBC KERMIT will use for
preference. (SET EIGHT-BIT-PREFIX)
16 The end-of-line byte that BBC KERMIT uses for the
first packet it sends. (SET SEND END-OF-LINE)
17 The end-of-line byte the remote system will use. (SET
RECEIVE END-OF-LINE)
18 The pad character BBC KERMIT will send. (SET SEND
PADCHAR)
19 The number of pad characters BBC KERMIT will send.
(SET SEND PADDING)
20 The pad character BBC KERMIT will ask the remote
system to send. (SET RECEIVE PADCHAR)
21 The number of pad characters BBC KERMIT will ask the
other end to send. (SET RECEIVE PADDING)
22 The current parity setting. This should be one of:
0 MARK
1 SPACE
2 EVEN
3 ODD
4 NONE
23 The current file type. This should be 0 for ASCII or 1
111
BBC KERMIT User Guide
for BINARY. (SET FILE TYPE)
24 The current end-of-record type used for ASCII files
(SET FILE TYPE ASCII). The value should be one of:
0 LFCR
1 CRLF
2 LF
3 CR
25 The current source of data. The value is 0 for FILE or
1 for MEMORY. (SET SOURCE)
26-27 The base address for the source memory area
(low-high). This must be set if byte 25 is 1. (SET
SOURCE MEMORY)
28-29 The top address for the source memory area plus 1
(low-high). This must be set if byte 25 is 1. (SET
SOURCE MEMORY)
30 The current destination for data (SET DESTINATION).
Values are
0 FILE
1 MEMORY
2 PRINTER
31-32 The base address for the destination memory area
(low-high). This must be set if byte 30 is 1. (SET
DESTINATION MEMORY)
33-34 The highest address for the destination memory area
(low-high). The value is normally the base of the MODE
7 screen area $7BFF, and must be set if byte 30 is 1
(SET DESTINATION MEMORY).
35 The start of packet character that BBC KERMIT will
send. (SET SEND START-OF-PACKET)
36 The start of packet character that the remote system
will send. (SET RECEIVE START-OF-PACKET)
37 The maximum packet size BBC KERMIT asks the remote
system to send. (SET RECEIVE PACKET-LENGTH)
38 The size of the file buffer area used in pages. the
value must be in the range 1..64. (SET FILE
BUFFER-SIZE)
39 The file warning flag, set to 0 for off or 1 for on.
(SET FILE WARNING)
40 The incomplete file disposition flag, set to 0 for
DELETE or 1 for KEEP. (SET INCOMPLETE)
41 The current flow control method, set to 0 for XON/XOFF
112
BBC KERMIT User Guide
or 1 for CTS/RTS. (SET FLOW-CONTROL)
42 The significant size of the file suffix string defined
in the next field. The value is 1..8 if a suffix is
wanted, or 0 if none is to be added. (SET FILE SUFFIX)
43-50 The suffix added to a BBC name to generate a remote
file name. The number of characters used is defined by
byte 42. Note that the suffix does not include the "."
character. (SET FILE SUFFIX).
51 The TAKE-echo flag, set to 0 for off or 1 for on. (SET
TAKE-ECHO)
52 The colour to be used for text in 80 character
terminal mode. Colours available are red, green,
yellow, blue, magenta, cyan and white, corresponding
to values 1..7 (SET VDU-COLOUR)
53 *TV flag, set to 1 if a *TV is to be done on entry to
terminal mode and 0 if it is not. (SET TV)
54-55 The two *TV parameters to be used if byte 53 is 1.
(SET TV)
56 VDU ignore flag, set to 1 if an ignore character is
defined, and 0 if it is not. (SET IGNORE)
57 The incoming terminal-mode character to be ignored if
byte 56 is 1. (SET IGNORE)
58 The number of byte periods to wait before testing
clear-to-send when transmitting a character. (SET
MUX-WAIT)
59 The character that triggers a help display in command
mode. (SET HELP-TRIGGER)
60 The maximum number of retries BBC KERMIT will make in
an attempt to send a packet (SET RETRIES)
61 The handshake type in use (SET HANDSHAKE). The value
should be one of
0 NONE
1 BELL
2 CR
3 LF
4 XON
5 XOFF
62 The terminal emulation type to be used (SET TERMINAL).
The values currently allocated are:
0 TT40
1 TT80
2 VT52
113
BBC KERMIT User Guide
3 VT100
4 TEK
5 Un-named (A)
6 Un-named (B)
If the value is set to $FF, BBC Kermit will use the
default appropriate to the machine it is running in.
63 Controls how filenames sent by the remote system are
handled (SET FILE NAME). Values allowed are:
0 Translate name from name.type format
1 Use name exactly as specified
The table format is fixed, and will not be changed by Lancaster
in later releases. Additional facilities will be added to the end
of the block only. Note that it is up to you to make sure that
the values you put in the default block make sense: what BBC
KERMIT does with inconsistent ones is unlikely to be anything
you'ld like it to.
114
BBC KERMIT User Guide
A2.5 THE HEX TO BINARY CONVERTER PROGRAM
The Intel hex forms of the compiled BBC KERMIT and the Lancaster
65C02 assembler can be converted into binary files using a simple
converter supplied as the file BBCDEHEX.BAS. This can be brought
on to a BBC disc and *EXEC'd to give a BASIC program:
alternatively, since the program is short, it can be typed in
directly. For convenience, a listing of the program is supplied
below.
100 REM Intel hex to binary converter
120 REM Version 2 November 1985
140
160 CLOSE#0
180 DIM image 20480
200
220 INPUT "Name of input hex file? " in$
240 INPUT "Name of output binary file? " out$
260 in%=OPENIN(in$)
280 IF in%=0 THEN PRINT"Input file does not exist":END
300
320 imagesize% = 0
340 record% = 0
360 REPEAT
380 REPEAT
400 UNTIL (BGET#in%=ASC(":")) OR EOF#in%
420 IF EOF#in% THEN PROCsave:CLOSE#0:END ELSE PROCreadrecord
440 UNTIL FALSE
460
480 END
500
520
540 DEF PROCreadrecord
560 LOCAL count%,address%,storedcsum%,type%
580 record%=record%+1
600 csum%=0
620 count%=FNgetbyte
640 address%=FNgetbyte*256+FNgetbyte
660 IF record%=1 THEN base% = address%
680 PRINT"Record ";record%;" : Size ";count%;", address
$";~address%
700
720 type% = FNgetbyte
740 IF type%<>0 AND type%<>1 THEN PRINT"*** Unknown record type
";type%;" detected":CLOSE#0:END
760 IF type% <> 0 THEN PRINT"+++ End-of-file record
detected":ENDPROC
780 PROCreaddata(count%)
800 storedcsum% = FNgetbyte
820 IF csum%<>0 THEN PRINT"*** Checksum error":CLOSE#0:END
840 ENDPROC
860
880 DEF FNgetbyte
900 LOCAL value%
115
BBC KERMIT User Guide
920 value%=FNgetnibble*16 + FNgetnibble
940 csum% = (csum% + value%) AND &FF
960 =value%
980
1000 DEF FNgetnibble
1020 LOCAL char%
1040 char% = BGET#in%
1060 IF char%>=ASC("A") THEN =char%-ASC("A")+10 ELSE
=char%-ASC("0")
1080
1100 DEF PROCreaddata(count%)
1120 LOCAL I%
1140 pointer% = address% - base%
1160 FOR I% = 1 TO count%
1180 image?pointer% = FNgetbyte
1200 address% = address% + 1
1220 pointer% = pointer% + 1
1240 NEXT
1260 IF pointer% > imagesize% THEN imagesize% = pointer%
1280 ENDPROC
1300
1320 DEF PROCsave
1340 loadaddress% = base% OR &FFFF0000
1360 OSCLI("*SAVE
"+out$+" "+STR$~image+" "+STR$~(imagesize%+image)+" "+STR$~loadad
dress%+" "+STR$~loadaddress%)
1380 ENDPROC
116
BBC KERMIT User Guide
A2.6 CONTACT ADDRESSES
If you wish to use the ADE assembler/editor, you can obtain it from
SYSTEM
12 Collegiate Crescent
Sheffield
UK
See adverts in Acorn User for the current price. Currently BBC KERMIT
is compiled using version 2.02. ADE will continue to be the primary
assembly method used for BBC KERMIT, but all releases from 1.42
onwards will be also be fully compatible with the Lancaster 65C02
assembler supplied with it. The 65C02 assembler does not contain an
editor, but you can use any word processor or other editor to
manipulate the source files.
If you wish advice, or have any bug reports or comments on BBC
KERMIT, you can contact me at Lancaster University in several ways.
Postal address
Alan Phillips
Communications Group
Department of Computing
Computer Building
Lancaster University
Lancaster UK
Telephone
0524-65201 x 4881
Electronic mail
SYSKERMIT @ LANCS.VAX1
JANET address 000010404000.FTP.MAIL
PSS address 234252400101.000010404000.FTP.MAIL
Contact by electronic mail is the preferred method if you can
manage it: please remember to specify your name, where you are mailing
from, and the full mail address and NRS name (if you have one) for the
reply. I can reply only with difficulty and no guarantee of success
over ARPA, as the gateway I have to use is of low reliability: I have
no authorisation for uucp so cannot reply at all by this route. A
JANET address is preferred if you can provide one. I will attempt to
reply to all enquiries, and will usually do so within one or two
weeks: if you don't hear from me by then, you should assume that I am
unable to get mail to you for some reason and contact me by another
route.
I will be pleased to supply details of our KERMIT distribution
service on request: we have a complete collection of all available
117
BBC KERMIT User Guide
KERMIT implementations, and can distribute these on magnetic tape,
over the JANET or PSS networks, or, for some versions, on floppy disc.
Distribution is free to all educational or research council
institutions: commercial customers are asked to pay a small handling
charge. The increasing use of this service means that we cannot
currently undertake distribution to new customers outside the UK or
Eire.
118
BBC KERMIT User Guide
APPENDIX 3 : USING THE EDT EDITOR ON VAX/VMS
If you are using the sideways ROM version of BBC KERMIT on a model
B, or either version on a B+, B+128 or Master 128, you will be able to
use the EDT screen editor on VAX/VMS mainframes to edit your files.
This Appendix describes how you should set up your job to do this, and
how the BBC Computer's function keys are used to control the editor.
If you are using the RAM version of BBC KERMIT on a model B, which
emulates only a 40 character wide teletype, you will still be able to
use EDT, but only in line mode.
119
BBC KERMIT User Guide
A3.1 SETTING UP THE TERMINAL DETAILS
In order to use the full facilities of the EDT editor you must, of
course, set BBC KERMIT to provide a VT52 terminal emulation. This is
the default setting, but if you have changed the terminal type you can
return to VT52 mode with the command
SET TERMINAL VT52
before you use the CONNECT command to enter terminal mode.
Depending on how the VAX/VMS system has been set up, you may also
need to configure it to know that your terminal is a VT52 and not, for
instance, a VT100. You can see what VMS thinks your terminal is by
issuing the DCL command
$ SHOW TERMINAL
during a job. If the default terminal type is a VT52, you need take no
further action: EDT will automatically adapt itself to use the correct
screen control commands.
If, though, the default terminal type is not a VT52, you will need
to take some action. You can do one of several things here:
1. If you are connected to your VAX system with a directly
connected permanent line, you could ask your system manager to
set the terminal characteristics that VMS will use. This will
be permanent, and once it is done the default terminal type for
that line will be a VT52. This will not, though, be possible if
you are using some sort of network to link you to the VAX
system.
2. Whenever you start a terminal job, you could issue the command
$ SET TERMINAL/DEVICE=VT52
to tell VMS that you are using a VT52. You must do this before
you use the EDT editor (or anything else, such as MAIL, that
sends screen-control characters). You could include the command
in your LOGIN.COM file to save you having to remember to issue
it every time: however, the terminal type will then be wrong if
you ever use a device that is not a VT52.
3. You could include in your LOGIN.COM file the command
$ SET TERM/INQUIRE
This will make VMS send an "inquiry sequence" to the terminal
when you log in: BBC KERMIT will then identify itself as a
VT52, and VMS will set itself up accordingly. This is probably
the preferable method, since it will adapt itself automatically
whatver device type you use. However, there are some drawbacks.
If you use a device that does not respond to the inquiry
sequence you will see some rubbish charaters appear, and login
120
BBC KERMIT User Guide
may be slowed down slightly: also, any commands you type while
waiting for the login sequence to complete will be discarded.
There is also the problem that some peculiar terminals (ICL
terminals are apparently bad here) may interpret the inquiry
sequence as something else entirely, and may do something
strange or even stop working altogether.
121
BBC KERMIT User Guide
A3.2 EDIT KEYPAD KEYS
As we saw in section 4.4, the models B, B+ and B+128 do not possess
keys corresponding to the VT52 keypad, so BBC KERMIT emulates them
using the red function keys. Section 4.4 specified the actual ESCAPE
sequences that the keys will send to the host computer in VT52 mode:
here we shall consider the use of the keys in terms of the EDT editor.
If you have a Master 128 you will be able to use the keypad keys to
send the ESCAPE sequences.
A3.2.1 Models B, B+ and B+128
These machines do not have keypads, so you will need to use the
red function keys to send the ESCAPE sequences to EDT. Note that
some editor functions are invoked by pressing a sequence of keys:
in the list below
F3
indicates that you should press key F3, and
SHIFT-F1/F3
indicates that you should press SHIFT-F1 (the GOLD function) then
F3.
BBC key sequence VT52 keypad key EDT function
SHIFT-F1 PF1 GOLD
SHIFT-F2 PF2 HELP
SHIFT-F3 PF3 DELETE LINE
SHIFT-F1/SHIFT-F3 GOLD/PF1 UNDELETE LINE
SHIFT-F7 PERIOD SELECT
SHIFT-F1/SHIFT-F7 GOLD/PERIOD RESET
SHIFT-F8 ENTER ENTER
SHIFT-F1/SHIFT-F8 GOLD/ENTER SUBS
F0 0 LINE
SHIFT-F1/F0 GOLD/O OPEN LINE
F1 1 WORD
SHFT-F1/F1 GOLD/1 CHANGE CASE
F2 2 EOL
SHIFT-F1/F2 GOLD/2 DELETE EOL
F3 3 CUT
SHIFT-F1/F3 GOLD/3 PASTE
122
BBC KERMIT User Guide
F4 4 ADVANCE
SHIFT-F1/F4 GOLD/F1 BOTTOM
F5 5 BACKUP
SHIFT-F1/F5 GOLD/5 TOP
F6 6 DELETE CHAR
SHIFT-F1/F6 GOLD/F6 UNDELETE CHAR
F7 7 PAGE
SHIFT-F1/F7 GOLD/7 COMMAND
F8 8 FIND NEXT
SHIFT-F1/F8 GOLD/8 FIND
F9 9 DELETE WORD
SHIFT-F1/F9 GOLD/9 UNDELETE WORD
UP UP CURSOR-UP
SHIFT-F1/UP GOLD/UP REPLACE
DOWN DOWN CURSOR-DOWN
SHIFT-F1/DOWN GOLD/DOWN SECT
RIGHT RIGHT CURSOR-RIGHT
SHIFT-F1/RIGHT GOLD/RIGHT SPECINS
LEFT LEFT CURSOR-LEFT
SHIFT-F1/LEFT GOLD/LEFT APPEND
A3.3.2 The Master 128
This machine possesses a keypad to the right of the main
keyboard, and the arrangement of these keys closely parallels
what you would find on a real terminal. The key arrangement
differs most in that the cursor keys on a real VT52 are in the
keypad area: on the Master they are separate, and the keypad keys
that occupy these positions are not used.
The keypad sends EDT control sequences as follows. If the key
diagram shows two functions, the upper one is selected by
pressing the key alone, and the lower is obtained by first
pressing GOLD, then pressing the key.
123
BBC KERMIT User Guide
---------------------------------
! ! ! ! !
! GOLD ! HELP ! DEL L ! !
! ! ! UND L ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! PAGE ! FNDNXT! DEL W ! !
! COMND ! FIND ! UND W ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! ADV ! BACKUP! DEL C ! !
! BOTTOM! TOP ! UND C ! !
! ! ! ! !
---------------------------------
! ! ! ! !
! WORD ! EOL ! CUT ! !
! C CASE! D EOL ! PASTE ! !
! ! ! ! !
---------------------------------
! ! ! !
! LINE ! SELECT! ENTER !
! OPN L ! RESET ! SUBS !
! ! ! !
---------------------------------
124